=e&&t.s<=e+n}},_findTargetItemIndex:function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){var i=t.__legendDataIndex;null==a&&null!=i&&(a=e),i===n&&(o=e)}),null!=o?o:a):0;var o,a}});_f("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})});cD.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var lL=rs,uL=Rl,hL=Bl,cL=A,dL=R,fL="horizontal",pL="vertical",gL=["line","bar","candlestick","scatter"],mL=pD.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){mL.superApply(this,"render",arguments),kc(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){mL.superApply(this,"remove",arguments),Pc(this,"_dispatchZoomAction")},dispose:function(){mL.superApply(this,"dispose",arguments),Pc(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Ci;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===fL?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Iu(t.option);R(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=bu(a,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===pL&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),a=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==fL||o?i===fL&&o?{scale:r?[-1,1]:[-1,-1]}:i!==pL||o?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new lL({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new lL({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:A(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=n.getDataExtent(o),r=.3*(a[1]-a[0]);a=[a[0]-r,a[1]+r];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],d=u[1]/(n.count()-1),f=0,p=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(0e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var i;if(dL(this.getTargetCoordInfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinateSystem;i=e.getRect&&e.getRect()}}),!i){var t=this.api.getWidth(),e=this.api.getHeight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function vL(t){return"vertical"===t?"ns-resize":"ew-resize"}cD.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var yL="\0_ec_dataZoom_roams";function xL(t,n){var e=wL(t),o=n.dataZoomId,a=n.coordId;R(e,function(t,e){var i=t.dataZoomInfos;i[o]&&_(n.allCoordIds,a)<0&&(delete i[o],t.count--)}),bL(e);var i=e[a];i||((i=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(t,r){var e=new Vy(t.getZr());return R(["pan","zoom","scrollMove"],function(a){e.on(a,function(n){var o=[];R(r.dataZoomInfos,function(t){if(n.isAvailableBehavior(t.dataZoomModel.option)){var e=(t.getRange||{})[a],i=e&&e(r.controller,n);!t.dataZoomModel.get("disabled",!0)&&i&&o.push({dataZoomId:t.dataZoomId,start:i[0],end:i[1]})}}),o.length&&r.dispatchAction(o)})}),e}(t,i),i.dispatchAction=T(SL,t)),i.dataZoomInfos[o]||i.count++,i.dataZoomInfos[o]=n;var r=function(t){var n,o={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return R(t,function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");o["type_"+n]"],L(t)&&(t=t.slice(),n=!0),o=e?t:n?[u(t[0]),u(t[1])]:u(t),E(l)?l.replace("{value}",n?o[0]:o).replace("{value2}",n?o[1]:o):C(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+o[1]:t[1]===s[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=GL([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;0<=o;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),o=e.controller||(e.controller={});m(n,i),m(o,i);var u=this.isCategory();function a(n){BL(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")},VL(this.stateList,function(t){var e=n[t];if(E(e)){var i=OL(e,"active",u);i?(n[t]={},n[t][e]=i):delete n[t]}},this)}a.call(this,n),a.call(this,o),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},VL(n,function(t,e){if(g_.isValidType(e)){var i=OL(e,"inactive",u);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,n,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");VL(this.stateList,function(t){var e=this.itemSize,i=a[t];null==(i=i||(a[t]={color:u?l:[l]})).symbol&&(i.symbol=r&&k(r)||(u?"roundRect":["roundRect"])),null==i.symbolSize&&(i.symbolSize=s&&k(s)||(u?e[0]:[e[0],e[0]])),i.symbol=EL(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var n=i.symbolSize;if(null!=n){var o=-1/0;zL(n,function(t){oe[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){WL.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Bl((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(n){var o=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){n[0]<=t&&t<=n[1]&&i.push(e)},this),o.push({seriesId:t.id,dataIndex:i})},this),o},getVisualMeta:function(i){var t=UL(this,"outOfRange",this.getExtent()),e=UL(this,"inRange",this.option.range.slice()),n=[];function o(t,e){n.push({value:t,color:i(t,e)})}for(var a=0,r=0,s=e.length,l=t.length;rt[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new Ci("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(n,o){if(this._useHandle){var a=this._shapes,r=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels;KL([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=n[t];var i=pl(a.handleLabelPoints[t],fl(e,this.group));l[t].setStyle({x:i[0],y:i[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",a.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=qL(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",function(t,e,i,n){return t?[[0,-$L(e,JL(i,0))],[6,0],[0,$L(e,JL(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});h.setStyle("fill",c);var d=pl(u.indicatorLabelPoint,fl(h,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var n=this;this._shapes.barGroup.on("mousemove",function(t){if(n._hovering=!0,!n._dragging){var e=n.visualMapModel.itemSize,i=n._applyTransform([t.offsetX,t.offsetY],n._shapes.barGroup,!0,!0);i[1]=$L(JL(0,i[1]),e[1]),n._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=e[0])}}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=$L(JL(o[0],t),o[1]);var r=function(t,e,i){var n=6,o=t.get("hoverLinkDataSize");o&&(n=qL(o,e,i,!0)/2);return n}(i,a,o),s=[t-r,t+r],l=qL(t,o,a,!0),u=[qL(s[0],o,a,!0),qL(s[1],o,a,!0)];s[0] ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||ek(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=function(t,e){var i={},n={};return o(t||[],i),o(e||[],n,i),[a(i),a(n)];function o(t,e,i){for(var n=0,o=t.length;ni&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:a,outerColors:r}}function n(t,e){var i=s.getRepresentValue({interval:t});e=e||s.getValueState(i);var n=o(i,e);t[0]===-1/0?r[0]=n:t[1]===1/0?r[1]=n:a.push({value:t[0],color:n},{value:t[1],color:n})}}}),ok={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var r=0,s=n[0];r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};function ak(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}XL.extend({type:"visualMap.piecewise",doRender:function(){var a=this.group;a.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),i=e.endsText,d=W(r.get("showLabel",!0),!i);i&&this._renderEndsText(a,i[0],c,d,h),R(e.viewPieceList,function(t){var e=t.piece,i=new Ci;i.onclick=A(this._onItemClick,this,e),this._enableHoverLink(i,t.indexInModelPieceList);var n=r.getRepresentValue(e);if(this._createItemSymbol(i,n,[0,0,c[0],c[1]]),d){var o=this.visualMapModel.getValueState(n);i.add(new Ur({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===o?.5:1}}))}a.add(i)},this),i&&this._renderEndsText(a,i[1],c,d,h),wu(r.get("orient"),a,r.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},_enableHoverLink:function(t,i){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:jL(e.findTargetDataIndices(i),e)})}t.on("mouseover",A(e,this,"highlight")).on("mouseout",A(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return YL(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new Ci,r=this.visualMapModel.textStyleModel;a.add(new Ur({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=O(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i=i&&i.slice().reverse(),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(wg(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=k(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[o]=!0,R(n,function(t,e){n[e]=e===o})):n[o]=!n[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});yf(DL);var rk,sk="urn:schemas-microsoft-com:vml",lk="undefined"==typeof window?null:window,uk=!1,hk=lk&&lk.document;function ck(t){return rk(t)}if(hk&&!v.canvasSupported)try{hk.namespaces.zrvml||hk.namespaces.add("zrvml",sk),rk=function(t){return hk.createElement("')}}catch(t){rk=function(t){return hk.createElement("<"+t+' xmlns="'+sk+'" class="zrvml">')}}var dk,fk=rr.CMD,pk=Math.round,gk=Math.sqrt,mk=Math.abs,vk=Math.cos,yk=Math.sin,xk=Math.max;if(!v.canvasSupported){var _k=",",wk="progid:DXImageTransform.Microsoft",bk=21600,Sk=bk/2,Mk=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=bk+","+bk,t.coordorigin="0,0"},Ik=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},Tk=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},Ak=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},Dk=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},Ck=Yn,Lk=function(t,e,i){var n=Fe(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=Ik(n[0],n[1],n[2]),t.opacity=i*n[3])},kk=function(t,e,i,n){var o="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof cs&&Ak(t,a),a=a||ck(e),o?function(t,e,i){var n,o,a=e.fill;if(null!=a)if(a instanceof cs){var r,s=0,l=[0,0],u=0,h=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===a.type){r="gradient";var p=i.transform,g=[a.x*d,a.y*f],m=[a.x2*d,a.y2*f];p&&(bt(g,g,p),bt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{r="gradientradial";g=[a.x*d,a.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&bt(g,g,p),_/=x[0]*bk,w/=x[1]*bk;var b=xk(_,w);u=0/b,h=2*a.r/b-u}var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],T=[],A=0;A=c&&d<=i+1){for(var n=[],o=0;o=c&&d<=o+1)return _P(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var r=a();if(r)return r}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1 \n\r<"))}},R(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(t){OP.prototype[t]=function(t){return function(){vi('In SVG mode painter not support method "'+t+'"')}}(t)}),Po("svg",OP),t.version="4.9.0",t.dependencies={zrender:"4.3.2"},t.PRIORITY=Ld,t.init=function(t,e,i){var n=mf(t);if(n)return n;var o=new Ed(t,e,i);return o.id="ec_"+cf++,uf[o.id]=o,Jo(t,ff,o.id),function(n){var o="__connectUpdateStatus";function a(t,e){for(var i=0;i -1 ? "&" : "?") + "dialog=1";
+ var area = Fast.config.openArea != undefined ? Fast.config.openArea : [$(window).width() > 800 ? '800px' : '95%', $(window).height() > 600 ? '600px' : '95%'];
+ var success = options && typeof options.success === 'function' ? options.success : $.noop;
+ if (options && typeof options.success === 'function') {
+ delete options.success;
+ }
+ options = $.extend({
+ type: 2,
+ title: title,
+ shadeClose: true,
+ shade: false,
+ maxmin: true,
+ moveOut: true,
+ area: area,
+ content: url,
+ zIndex: Layer.zIndex,
+ success: function (layero, index) {
+ var that = this;
+ //存储callback事件
+ $(layero).data("callback", that.callback);
+ //$(layero).removeClass("layui-layer-border");
+ Layer.setTop(layero);
+ try {
+ var frame = Layer.getChildFrame('html', index);
+ var layerfooter = frame.find(".layer-footer");
+ Fast.api.layerfooter(layero, index, that);
+
+ //绑定事件
+ if (layerfooter.length > 0) {
+ // 监听窗口内的元素及属性变化
+ // Firefox和Chrome早期版本中带有前缀
+ var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
+ if (MutationObserver) {
+ // 选择目标节点
+ var target = layerfooter[0];
+ // 创建观察者对象
+ var observer = new MutationObserver(function (mutations) {
+ Fast.api.layerfooter(layero, index, that);
+ mutations.forEach(function (mutation) {
+ });
+ });
+ // 配置观察选项:
+ var config = {attributes: true, childList: true, characterData: true, subtree: true}
+ // 传入目标节点和观察选项
+ observer.observe(target, config);
+ // 随后,你还可以停止观察
+ // observer.disconnect();
+ }
+ }
+ } catch (e) {
+
+ }
+ if ($(layero).height() > $(window).height()) {
+ //当弹出窗口大于浏览器可视高度时,重定位
+ Layer.style(index, {
+ top: 0,
+ height: $(window).height()
+ });
+ }
+ success.call(this, layero, index);
+ }
+ }, options ? options : {});
+ if ($(window).width() < 480 || (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && top.$(".tab-pane.active").length > 0)) {
+ if (top.$(".tab-pane.active").length > 0) {
+ options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"];
+ options.offset = [top.$(".tab-pane.active").scrollTop() + "px", "0px"];
+ } else {
+ options.area = [$(window).width() + "px", $(window).height() + "px"];
+ options.offset = ["0px", "0px"];
+ }
+ }
+ return Layer.open(options);
+ },
+ //关闭窗口并回传数据
+ close: function (data) {
+ var index = parent.Layer.getFrameIndex(window.name);
+ var callback = parent.$("#layui-layer" + index).data("callback");
+ //再执行关闭
+ parent.Layer.close(index);
+ //再调用回传函数
+ if (typeof callback === 'function') {
+ callback.call(undefined, data);
+ }
+ },
+ layerfooter: function (layero, index, that) {
+ var frame = Layer.getChildFrame('html', index);
+ var layerfooter = frame.find(".layer-footer");
+ if (layerfooter.length > 0) {
+ $(".layui-layer-footer", layero).remove();
+ var footer = $("
").addClass('layui-layer-btn layui-layer-footer');
+ footer.html(layerfooter.html());
+ if ($(".row", footer).length === 0) {
+ $(">", footer).wrapAll("
");
+ }
+ footer.insertAfter(layero.find('.layui-layer-content'));
+ //绑定事件
+ footer.on("click", ".btn", function () {
+ if ($(this).hasClass("disabled") || $(this).parent().hasClass("disabled")) {
+ return;
+ }
+ var index = footer.find('.btn').index(this);
+ $(".btn:eq(" + index + ")", layerfooter).trigger("click");
+ });
+
+ var titHeight = layero.find('.layui-layer-title').outerHeight() || 0;
+ var btnHeight = layero.find('.layui-layer-btn').outerHeight() || 0;
+ //重设iframe高度
+ $("iframe", layero).height(layero.height() - titHeight - btnHeight);
+ }
+ //修复iOS下弹出窗口的高度和iOS下iframe无法滚动的BUG
+ if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
+ var titHeight = layero.find('.layui-layer-title').outerHeight() || 0;
+ var btnHeight = layero.find('.layui-layer-btn').outerHeight() || 0;
+ $("iframe", layero).parent().css("height", layero.height() - titHeight - btnHeight);
+ $("iframe", layero).css("height", "100%");
+ }
+ },
+ success: function (options, callback) {
+ var type = typeof options === 'function';
+ if (type) {
+ callback = options;
+ }
+ return Layer.msg(__('Operation completed'), $.extend({
+ offset: 0, icon: 1
+ }, type ? {} : options), callback);
+ },
+ error: function (options, callback) {
+ var type = typeof options === 'function';
+ if (type) {
+ callback = options;
+ }
+ return Layer.msg(__('Operation failed'), $.extend({
+ offset: 0, icon: 2
+ }, type ? {} : options), callback);
+ },
+ msg: function (message, url) {
+ var callback = typeof url === 'function' ? url : function () {
+ if (typeof url !== 'undefined' && url) {
+ location.href = url;
+ }
+ };
+ Layer.msg(message, {
+ time: 2000
+ }, callback);
+ },
+ escape: function (text) {
+ if (typeof text === 'string') {
+ return text
+ .replace(/&/g, '&')
+ .replace(//g, '>')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''')
+ .replace(/`/g, '`');
+ }
+ return text;
+ },
+ toastr: Toastr,
+ layer: Layer
+ },
+ lang: function () {
+ var args = arguments,
+ string = args[0],
+ i = 1;
+ string = string.toLowerCase();
+ //string = typeof Lang[string] != 'undefined' ? Lang[string] : string;
+ if (typeof Lang !== 'undefined' && typeof Lang[string] !== 'undefined') {
+ if (typeof Lang[string] == 'object')
+ return Lang[string];
+ string = Lang[string];
+ } else if (string.indexOf('.') !== -1 && false) {
+ var arr = string.split('.');
+ var current = Lang[arr[0]];
+ for (var i = 1; i < arr.length; i++) {
+ current = typeof current[arr[i]] != 'undefined' ? current[arr[i]] : '';
+ if (typeof current != 'object')
+ break;
+ }
+ if (typeof current == 'object')
+ return current;
+ string = current;
+ } else {
+ string = args[0];
+ }
+ return string.replace(/%((%)|s|d)/g, function (m) {
+ // m is the matched format, e.g. %s, %d
+ var val = null;
+ if (m[2]) {
+ val = m[2];
+ } else {
+ val = args[i];
+ // A switch statement so that the formatter can be extended. Default is %s
+ switch (m) {
+ case '%d':
+ val = parseFloat(val);
+ if (isNaN(val)) {
+ val = 0;
+ }
+ break;
+ }
+ i++;
+ }
+ return val;
+ });
+ },
+ init: function () {
+ // jQuery兼容处理
+ $.fn.extend({
+ size: function () {
+ return $(this).length;
+ }
+ });
+ // 对相对地址进行处理
+ $.ajaxSetup({
+ beforeSend: function (xhr, setting) {
+ setting.url = Fast.api.fixurl(setting.url);
+ }
+ });
+ Layer.config({
+ skin: 'layui-layer-fast'
+ });
+ // 绑定ESC关闭窗口事件
+ $(window).keyup(function (e) {
+ if (e.keyCode == 27) {
+ if ($(".layui-layer").length > 0) {
+ var index = 0;
+ $(".layui-layer").each(function () {
+ index = Math.max(index, parseInt($(this).attr("times")));
+ });
+ if (index) {
+ Layer.close(index);
+ }
+ }
+ }
+ });
+
+ //公共代码
+ //配置Toastr的参数
+ Toastr.options = Fast.config.toastr;
+ }
+ };
+ //将Layer暴露到全局中去
+ window.Layer = Layer;
+ //将Toastr暴露到全局中去
+ window.Toastr = Toastr;
+ //将语言方法暴露到全局中去
+ window.__ = Fast.lang;
+ //将Fast渲染至全局
+ window.Fast = Fast;
+
+ //默认初始化执行的代码
+ Fast.init();
+ return Fast;
+});
diff --git a/public/assets/js/frontend-init.js b/public/assets/js/frontend-init.js
new file mode 100755
index 0000000..f67722f
--- /dev/null
+++ b/public/assets/js/frontend-init.js
@@ -0,0 +1,3 @@
+define(['frontend'], function (Frontend) {
+
+});
\ No newline at end of file
diff --git a/public/assets/js/frontend.js b/public/assets/js/frontend.js
new file mode 100755
index 0000000..0bd60fd
--- /dev/null
+++ b/public/assets/js/frontend.js
@@ -0,0 +1,115 @@
+define(['fast', 'template', 'moment'], function (Fast, Template, Moment) {
+ var Frontend = {
+ api: Fast.api,
+ init: function () {
+ var si = {};
+ //发送验证码
+ $(document).on("click", ".btn-captcha", function (e) {
+ var type = $(this).data("type") ? $(this).data("type") : 'mobile';
+ var btn = this;
+ Frontend.api.sendcaptcha = function (btn, type, data, callback) {
+ $(btn).addClass("disabled", true).text("发送中...");
+
+ Frontend.api.ajax({url: $(btn).data("url"), data: data}, function (data, ret) {
+ clearInterval(si[type]);
+ var seconds = 60;
+ si[type] = setInterval(function () {
+ seconds--;
+ if (seconds <= 0) {
+ clearInterval(si);
+ $(btn).removeClass("disabled").text("发送验证码");
+ } else {
+ $(btn).addClass("disabled").text(seconds + "秒后可再次发送");
+ }
+ }, 1000);
+ if (typeof callback == 'function') {
+ callback.call(this, data, ret);
+ }
+ }, function () {
+ $(btn).removeClass("disabled").text('发送验证码');
+ });
+ };
+ if (['mobile', 'email'].indexOf(type) > -1) {
+ var element = $(this).data("input-id") ? $("#" + $(this).data("input-id")) : $("input[name='" + type + "']", $(this).closest("form"));
+ var text = type === 'email' ? '邮箱' : '手机号码';
+ if (element.val() === "") {
+ Layer.msg(text + "不能为空!");
+ element.focus();
+ return false;
+ } else if (type === 'mobile' && !element.val().match(/^1[3-9]\d{9}$/)) {
+ Layer.msg("请输入正确的" + text + "!");
+ element.focus();
+ return false;
+ } else if (type === 'email' && !element.val().match(/^[\w\+\-]+(\.[\w\+\-]+)*@[a-z\d\-]+(\.[a-z\d\-]+)*\.([a-z]{2,4})$/)) {
+ Layer.msg("请输入正确的" + text + "!");
+ element.focus();
+ return false;
+ }
+ element.isValid(function (v) {
+ if (v) {
+ var data = {event: $(btn).data("event")};
+ data[type] = element.val();
+ Frontend.api.sendcaptcha(btn, type, data);
+ } else {
+ Layer.msg("请确认已经输入了正确的" + text + "!");
+ }
+ });
+ } else {
+ var data = {event: $(btn).data("event")};
+ Frontend.api.sendcaptcha(btn, type, data, function (data, ret) {
+ Layer.open({title: false, area: ["400px", "430px"], content: "扫一扫关注公众号获取验证码
", type: 1});
+ });
+ }
+ return false;
+ });
+ //tooltip和popover
+ if (!('ontouchstart' in document.documentElement)) {
+ $('body').tooltip({selector: '[data-toggle="tooltip"]'});
+ }
+ $('body').popover({selector: '[data-toggle="popover"]'});
+
+ // 手机端左右滑动切换菜单栏
+ if ('ontouchstart' in document.documentElement) {
+ var startX, startY, moveEndX, moveEndY, relativeX, relativeY, element;
+ element = $('body', document);
+ element.on("touchstart", function (e) {
+ startX = e.originalEvent.changedTouches[0].pageX;
+ startY = e.originalEvent.changedTouches[0].pageY;
+ });
+ element.on("touchend", function (e) {
+ moveEndX = e.originalEvent.changedTouches[0].pageX;
+ moveEndY = e.originalEvent.changedTouches[0].pageY;
+ relativeX = moveEndX - startX;
+ relativeY = moveEndY - startY;
+
+ // 判断标准
+ //右滑
+ if (relativeX > 45) {
+ if ((Math.abs(relativeX) - Math.abs(relativeY)) > 50) {
+ element.addClass("sidebar-open");
+ }
+ }
+ //左滑
+ else if (relativeX < -45) {
+ if ((Math.abs(relativeX) - Math.abs(relativeY)) > 50) {
+ element.removeClass("sidebar-open");
+ }
+ }
+ });
+ }
+ $(document).on("click", ".sidebar-toggle", function () {
+ $("body").toggleClass("sidebar-open");
+ });
+ }
+ };
+ Frontend.api = $.extend(Fast.api, Frontend.api);
+ //将Template渲染至全局,以便于在子框架中调用
+ window.Template = Template;
+ //将Moment渲染至全局,以便于在子框架中调用
+ window.Moment = Moment;
+ //将Frontend渲染至全局,以便于在子框架中调用
+ window.Frontend = Frontend;
+
+ Frontend.init();
+ return Frontend;
+});
diff --git a/public/assets/js/frontend/user.js b/public/assets/js/frontend/user.js
new file mode 100755
index 0000000..cfbfaa6
--- /dev/null
+++ b/public/assets/js/frontend/user.js
@@ -0,0 +1,195 @@
+define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, undefined, Frontend, Form, Template) {
+ var validatoroptions = {
+ invalid: function (form, errors) {
+ $.each(errors, function (i, j) {
+ Layer.msg(j);
+ });
+ }
+ };
+ var Controller = {
+ login: function () {
+
+ //本地验证未通过时提示
+ $("#login-form").data("validator-options", validatoroptions);
+
+ //为表单绑定事件
+ Form.api.bindevent($("#login-form"), function (data, ret) {
+ setTimeout(function () {
+ location.href = ret.url ? ret.url : "/";
+ }, 1000);
+ });
+
+ //忘记密码
+ $(document).on("click", ".btn-forgot", function () {
+ var id = "resetpwdtpl";
+ var content = Template(id, {});
+ Layer.open({
+ type: 1,
+ title: __('Reset password'),
+ area: [$(window).width() < 450 ? ($(window).width() - 10) + "px" : "450px", "355px"],
+ content: content,
+ success: function (layero) {
+ var rule = $("#resetpwd-form input[name='captcha']").data("rule");
+ Form.api.bindevent($("#resetpwd-form", layero), function (data) {
+ Layer.closeAll();
+ });
+ $(layero).on("change", "input[name=type]", function () {
+ var type = $(this).val();
+ $("div.form-group[data-type]").addClass("hide");
+ $("div.form-group[data-type='" + type + "']").removeClass("hide");
+ $('#resetpwd-form').validator("setField", {
+ captcha: rule.replace(/remote\((.*)\)/, "remote(" + $(this).data("check-url") + ", event=resetpwd, " + type + ":#" + type + ")")
+ });
+ $(".btn-captcha").data("url", $(this).data("send-url")).data("type", type);
+ });
+ }
+ });
+ });
+ },
+ register: function () {
+ //本地验证未通过时提示
+ $("#register-form").data("validator-options", validatoroptions);
+
+ //为表单绑定事件
+ Form.api.bindevent($("#register-form"), function (data, ret) {
+ setTimeout(function () {
+ location.href = ret.url ? ret.url : "/";
+ }, 1000);
+ }, function (data) {
+ $("input[name=captcha]").next(".input-group-btn").find("img").trigger("click");
+ });
+ },
+ changepwd: function () {
+ //本地验证未通过时提示
+ $("#changepwd-form").data("validator-options", validatoroptions);
+
+ //为表单绑定事件
+ Form.api.bindevent($("#changepwd-form"), function (data, ret) {
+ setTimeout(function () {
+ location.href = ret.url ? ret.url : "/";
+ }, 1000);
+ });
+ },
+ profile: function () {
+ // 给上传按钮添加上传成功事件
+ $("#faupload-avatar").data("upload-success", function (data) {
+ var url = Fast.api.cdnurl(data.url);
+ $(".profile-user-img").prop("src", url);
+ Toastr.success(__('Uploaded successful'));
+ });
+ Form.api.bindevent($("#profile-form"));
+ $(document).on("click", ".btn-change", function () {
+ var that = this;
+ var id = $(this).data("type") + "tpl";
+ var content = Template(id, {});
+ Layer.open({
+ type: 1,
+ title: "修改",
+ area: [$(window).width() < 450 ? ($(window).width() - 10) + "px" : "450px", "355px"],
+ content: content,
+ success: function (layero) {
+ var form = $("form", layero);
+ Form.api.bindevent(form, function (data) {
+ location.reload();
+ Layer.closeAll();
+ });
+ }
+ });
+ });
+ },
+ attachment: function () {
+ require(['table'], function (Table) {
+
+ // 初始化表格参数配置
+ Table.api.init({
+ extend: {
+ index_url: 'user/attachment',
+ }
+ });
+ var urlArr = [];
+ var multiple = Fast.api.query('multiple');
+ multiple = multiple == 'true' ? true : false;
+
+ var table = $("#table");
+
+ table.on('check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table', function (e, row) {
+ if (e.type == 'check' || e.type == 'uncheck') {
+ row = [row];
+ } else {
+ urlArr = [];
+ }
+ $.each(row, function (i, j) {
+ if (e.type.indexOf("uncheck") > -1) {
+ var index = urlArr.indexOf(j.url);
+ if (index > -1) {
+ urlArr.splice(index, 1);
+ }
+ } else {
+ urlArr.indexOf(j.url) == -1 && urlArr.push(j.url);
+ }
+ });
+ });
+
+ // 初始化表格
+ table.bootstrapTable({
+ url: $.fn.bootstrapTable.defaults.extend.index_url,
+ sortName: 'id',
+ showToggle: false,
+ showExport: false,
+ fixedColumns: true,
+ fixedRightNumber: 1,
+ columns: [
+ [
+ {field: 'state', checkbox: multiple, visible: multiple, operate: false},
+ {field: 'id', title: __('Id'), operate: false},
+ {
+ field: 'url', title: __('Preview'), formatter: function (value, row, index) {
+ var html = '';
+ if (row.mimetype.indexOf("image") > -1) {
+ html = ' ';
+ } else {
+ html = ' ';
+ }
+ return '' + html + '
';
+ }
+ },
+ {
+ field: 'filename', title: __('Filename'), formatter: function (value, row, index) {
+ return '' + Table.api.formatter.search.call(this, value, row, index) + '
';
+ }, operate: 'like'
+ },
+ {field: 'imagewidth', title: __('Imagewidth'), operate: false},
+ {field: 'imageheight', title: __('Imageheight'), operate: false},
+ {field: 'mimetype', title: __('Mimetype'), formatter: Table.api.formatter.search},
+ {field: 'createtime', title: __('Createtime'), width: 120, formatter: Table.api.formatter.datetime, datetimeFormat: 'YYYY-MM-DD', operate: 'RANGE', addclass: 'datetimerange', sortable: true},
+ {
+ field: 'operate', title: __('Operate'), width: 85, events: {
+ 'click .btn-chooseone': function (e, value, row, index) {
+ Fast.api.close({url: row.url, multiple: multiple});
+ },
+ }, formatter: function () {
+ return ' ' + __('Choose') + ' ';
+ }
+ }
+ ]
+ ]
+ });
+
+ // 选中多个
+ $(document).on("click", ".btn-choose-multi", function () {
+ Fast.api.close({url: urlArr.join(","), multiple: multiple});
+ });
+
+ // 为表格绑定事件
+ Table.api.bindevent(table);
+ require(['upload'], function (Upload) {
+ Upload.api.upload($("#toolbar .faupload"), function () {
+ $(".btn-refresh").trigger("click");
+ });
+ });
+
+ });
+ }
+ };
+ return Controller;
+});
diff --git a/public/assets/js/html5shiv.js b/public/assets/js/html5shiv.js
new file mode 100755
index 0000000..77dace4
--- /dev/null
+++ b/public/assets/js/html5shiv.js
@@ -0,0 +1,322 @@
+/**
+* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+*/
+;(function(window, document) {
+/*jshint evil:true */
+ /** version */
+ var version = '3.7.2';
+
+ /** Preset options */
+ var options = window.html5 || {};
+
+ /** Used to skip problem elements */
+ var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+ /** Not all elements can be cloned in IE **/
+ var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+ /** Detect whether the browser supports default html5 styles */
+ var supportsHtml5Styles;
+
+ /** Name of the expando, to work with multiple documents or to re-shiv one document */
+ var expando = '_html5shiv';
+
+ /** The id for the the documents expando */
+ var expanID = 0;
+
+ /** Cached data for each document */
+ var expandoData = {};
+
+ /** Detect whether the browser supports unknown elements */
+ var supportsUnknownElements;
+
+ (function() {
+ try {
+ var a = document.createElement('a');
+ a.innerHTML = ' ';
+ //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
+ supportsHtml5Styles = ('hidden' in a);
+
+ supportsUnknownElements = a.childNodes.length == 1 || (function() {
+ // assign a false positive if unable to shiv
+ (document.createElement)('a');
+ var frag = document.createDocumentFragment();
+ return (
+ typeof frag.cloneNode == 'undefined' ||
+ typeof frag.createDocumentFragment == 'undefined' ||
+ typeof frag.createElement == 'undefined'
+ );
+ }());
+ } catch(e) {
+ // assign a false positive if detection fails => unable to shiv
+ supportsHtml5Styles = true;
+ supportsUnknownElements = true;
+ }
+
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Creates a style sheet with the given CSS text and adds it to the document.
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @param {String} cssText The CSS text.
+ * @returns {StyleSheet} The style element.
+ */
+ function addStyleSheet(ownerDocument, cssText) {
+ var p = ownerDocument.createElement('p'),
+ parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
+
+ p.innerHTML = 'x';
+ return parent.insertBefore(p.lastChild, parent.firstChild);
+ }
+
+ /**
+ * Returns the value of `html5.elements` as an array.
+ * @private
+ * @returns {Array} An array of shived element node names.
+ */
+ function getElements() {
+ var elements = html5.elements;
+ return typeof elements == 'string' ? elements.split(' ') : elements;
+ }
+
+ /**
+ * Extends the built-in list of html5 elements
+ * @memberOf html5
+ * @param {String|Array} newElements whitespace separated list or array of new element names to shiv
+ * @param {Document} ownerDocument The context document.
+ */
+ function addElements(newElements, ownerDocument) {
+ var elements = html5.elements;
+ if(typeof elements != 'string'){
+ elements = elements.join(' ');
+ }
+ if(typeof newElements != 'string'){
+ newElements = newElements.join(' ');
+ }
+ html5.elements = elements +' '+ newElements;
+ shivDocument(ownerDocument);
+ }
+
+ /**
+ * Returns the data associated to the given document
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @returns {Object} An object of data.
+ */
+ function getExpandoData(ownerDocument) {
+ var data = expandoData[ownerDocument[expando]];
+ if (!data) {
+ data = {};
+ expanID++;
+ ownerDocument[expando] = expanID;
+ expandoData[expanID] = data;
+ }
+ return data;
+ }
+
+ /**
+ * returns a shived element for the given nodeName and document
+ * @memberOf html5
+ * @param {String} nodeName name of the element
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived element.
+ */
+ function createElement(nodeName, ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createElement(nodeName);
+ }
+ if (!data) {
+ data = getExpandoData(ownerDocument);
+ }
+ var node;
+
+ if (data.cache[nodeName]) {
+ node = data.cache[nodeName].cloneNode();
+ } else if (saveClones.test(nodeName)) {
+ node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+ } else {
+ node = data.createElem(nodeName);
+ }
+
+ // Avoid adding some elements to fragments in IE < 9 because
+ // * Attributes like `name` or `type` cannot be set/changed once an element
+ // is inserted into a document/fragment
+ // * Link elements with `src` attributes that are inaccessible, as with
+ // a 403 response, will cause the tab/window to crash
+ // * Script elements appended to fragments will execute when their `src`
+ // or `text` property is set
+ return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
+ }
+
+ /**
+ * returns a shived DocumentFragment for the given document
+ * @memberOf html5
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived DocumentFragment.
+ */
+ function createDocumentFragment(ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createDocumentFragment();
+ }
+ data = data || getExpandoData(ownerDocument);
+ var clone = data.frag.cloneNode(),
+ i = 0,
+ elems = getElements(),
+ l = elems.length;
+ for(;i0&&i.which!=g.which){return}if(e(i.target).is(g.not)){return}if(g.handle&&!e(i.target).closest(g.handle,i.currentTarget).length){return}d.touched=i.type=="touchstart"?this:null;g.propagates=1;g.mousedown=this;g.interactions=[d.interaction(this,g)];g.target=i.target;g.pageX=i.pageX;g.pageY=i.pageY;g.dragging=null;h=d.hijack(i,"draginit",g);if(!g.propagates){return}h=d.flatten(h);if(h&&h.length){g.interactions=[];e.each(h,function(){g.interactions.push(d.interaction(this,g))})}g.propagates=g.interactions.length;if(g.drop!==false&&a.drop){a.drop.handler(i,g)}d.textselect(false);if(d.touched){b.add(d.touched,"touchmove touchend",d.handler,g)}else{b.add(document,"mousemove mouseup",d.handler,g)}if(!d.touched||g.live){return false}},interaction:function(h,g){var i=e(h)[g.relative?"position":"offset"]()||{top:0,left:0};return{drag:h,callback:new d.callback(),droppable:[],offset:i}},handler:function(h){var g=h.data;switch(h.type){case !g.dragging&&"touchmove":h.preventDefault();case !g.dragging&&"mousemove":if(Math.pow(h.pageX-g.pageX,2)+Math.pow(h.pageY-g.pageY,2)0){e.removeData(this,"suppress."+g.type);return}return f.apply(this,arguments)};if(b.fixHooks!==undefined){var c=b.fixHooks.touchstart=b.fixHooks.touchmove=b.fixHooks.touchend=b.fixHooks.touchcancel={props:"clientX clientY pageX pageY screenX screenY".split(" "),filter:function(h,i){if(i){var g=(i.touches&&i.touches[0])||(i.changedTouches&&i.changedTouches[0])||null;if(g){e.each(c.props,function(j,k){h[k]=g[k]})}}return h}};}a.draginit=a.dragstart=a.dragend=d})(jQuery);
\ No newline at end of file
diff --git a/public/assets/js/jquery.drop.min.js b/public/assets/js/jquery.drop.min.js
new file mode 100755
index 0000000..a819712
--- /dev/null
+++ b/public/assets/js/jquery.drop.min.js
@@ -0,0 +1,6 @@
+/*!
+ * jquery.event.drop - v 2.2
+ * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
+ * Open Source MIT License - http://threedubmedia.com/code/license
+ */
+;(function(d){d.fn.drop=function(i,e,h){var g=typeof i=="string"?i:"",f=d.isFunction(i)?i:d.isFunction(e)?e:null;if(g.indexOf("drop")!==0){g="drop"+g}h=(i==f?e:h)||{};return f?this.bind(g,h,f):this.trigger(g)};d.drop=function(e){e=e||{};b.multi=e.multi===true?Infinity:e.multi===false?1:!isNaN(e.multi)?e.multi:b.multi;b.delay=e.delay||b.delay;b.tolerance=d.isFunction(e.tolerance)?e.tolerance:e.tolerance===null?null:b.tolerance;b.mode=e.mode||b.mode||"intersect"};var c=d.event,a=c.special,b=d.event.special.drop={multi:1,delay:20,mode:"overlap",targets:[],datakey:"dropdata",noBubble:true,add:function(f){var e=d.data(this,b.datakey);e.related+=1},remove:function(){d.data(this,b.datakey).related-=1},setup:function(){if(d.data(this,b.datakey)){return}var e={related:0,active:[],anyactive:0,winner:0,location:{}};d.data(this,b.datakey,e);b.targets.push(this);return false},teardown:function(){var f=d.data(this,b.datakey)||{};if(f.related){return}d.removeData(this,b.datakey);var e=this;b.targets=d.grep(b.targets,function(g){return(g!==e)})},handler:function(g,e){var f,h;if(!e){return}switch(g.type){case"mousedown":case"touchstart":h=d(b.targets);if(typeof e.drop=="string"){h=h.filter(e.drop)}h.each(function(){var i=d.data(this,b.datakey);i.active=[];i.anyactive=0;i.winner=0});e.droppable=h;a.drag.hijack(g,"dropinit",e);break;case"mousemove":case"touchmove":b.event=g;if(!b.timer){b.tolerate(e)}break;case"mouseup":case"touchend":b.timer=clearTimeout(b.timer);if(e.propagates){a.drag.hijack(g,"drop",e);a.drag.hijack(g,"dropend",e)}break}},locate:function(k,h){var l=d.data(k,b.datakey),g=d(k),i=g.offset()||{},e=g.outerHeight(),j=g.outerWidth(),f={elem:k,width:j,height:e,top:i.top,left:i.left,right:i.left+j,bottom:i.top+e};if(l){l.location=f;l.index=h;l.elem=k}return f},contains:function(e,f){return((f[0]||f.left)>=e.left&&(f[0]||f.right)<=e.right&&(f[1]||f.top)>=e.top&&(f[1]||f.bottom)<=e.bottom)},modes:{intersect:function(f,e,g){return this.contains(g,[f.pageX,f.pageY])?1000000000:this.modes.overlap.apply(this,arguments)},overlap:function(f,e,g){return Math.max(0,Math.min(g.bottom,e.bottom)-Math.max(g.top,e.top))*Math.max(0,Math.min(g.right,e.right)-Math.max(g.left,e.left))},fit:function(f,e,g){return this.contains(g,e)?1:0},middle:function(f,e,g){return this.contains(g,[e.left+e.width*0.5,e.top+e.height*0.5])?1:0}},sort:function(f,e){return(e.winner-f.winner)||(f.index-e.index)},tolerate:function(q){var k,e,n,j,l,m,g,p=0,f,h=q.interactions.length,r=[b.event.pageX,b.event.pageY],o=b.tolerance||b.modes[b.mode];do{if(f=q.interactions[p]){if(!f){return}f.drop=[];l=[];m=f.droppable.length;if(o){n=b.locate(f.proxy)}k=0;do{if(g=f.droppable[k]){j=d.data(g,b.datakey);e=j.location;if(!e){continue}j.winner=o?o.call(b,b.event,n,e):b.contains(e,r)?1:0;l.push(j)}}while(++kx.cacheLength&&delete e[t.shift()],e[i+" "]=n}}function n(t){return t[O]=!0,t}function o(t){var e=S.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function s(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&rt(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function r(t){return n(function(e){return e=+e,n(function(i,n){for(var o,a=t([],i.length,e),s=a.length;s--;)i[o=a[s]]&&(i[o]=!(n[o]=i[o]))})})}function l(t){return t&&void 0!==t.getElementsByTagName&&t}function c(t){var i,n=t?t.ownerDocument||t:kt;return n!=S&&9===n.nodeType&&n.documentElement&&(T=(S=n).documentElement,D=!mt.isXMLDoc(S),E=T.matches||T.webkitMatchesSelector||T.msMatchesSelector,T.msMatchesSelector&&kt!=S&&(i=S.defaultView)&&i.top!==i&&i.addEventListener("unload",st),lt.getById=o(function(t){return T.appendChild(t).id=mt.expando,!S.getElementsByName||!S.getElementsByName(mt.expando).length}),lt.disconnectedMatch=o(function(t){return E.call(t,"*")}),lt.scope=o(function(){return S.querySelectorAll(":scope")}),lt.cssHas=o(function(){try{return S.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}}),lt.getById?(x.filter.ID=function(t){var e=t.replace(nt,ot);return function(t){return t.getAttribute("id")===e}},x.find.ID=function(t,e){if(void 0!==e.getElementById&&D){var i=e.getElementById(t);return i?[i]:[]}}):(x.filter.ID=function(t){var e=t.replace(nt,ot);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},x.find.ID=function(t,e){if(void 0!==e.getElementById&&D){var i,n,o,a=e.getElementById(t);if(a){if((i=a.getAttributeNode("id"))&&i.value===t)return[a];for(o=e.getElementsByName(t),n=0;a=o[n++];)if((i=a.getAttributeNode("id"))&&i.value===t)return[a]}return[]}}),x.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},x.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&D)return e.getElementsByClassName(t)},$=[],o(function(t){var e;T.appendChild(t).innerHTML=" ",t.querySelectorAll("[selected]").length||$.push("\\["+bt+"*(?:value|"+j+")"),t.querySelectorAll("[id~="+O+"-]").length||$.push("~="),t.querySelectorAll("a#"+O+"+*").length||$.push(".#.+[+~]"),t.querySelectorAll(":checked").length||$.push(":checked"),(e=S.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),T.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&$.push(":enabled",":disabled"),(e=S.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||$.push("\\["+bt+"*name"+bt+"*="+bt+"*(?:''|\"\")")}),lt.cssHas||$.push(":has"),$=$.length&&new RegExp($.join("|")),R=function(t,i){if(t===i)return C=!0,0;var n=!t.compareDocumentPosition-!i.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(i.ownerDocument||i)?t.compareDocumentPosition(i):1)||!lt.sortDetached&&i.compareDocumentPosition(t)===n?t===S||t.ownerDocument==kt&&e.contains(kt,t)?-1:i===S||i.ownerDocument==kt&&e.contains(kt,i)?1:_?it.call(_,t)-it.call(_,i):0:4&n?-1:1)}),S}function d(){}function u(t,i){var n,o,a,s,r,l,c,d=L[t+" "];if(d)return i?0:d.slice(0);for(r=t,l=[],c=x.preFilter;r;){for(s in n&&!(o=U.exec(r))||(o&&(r=r.slice(o[0].length)||r),l.push(a=[])),n=!1,(o=W.exec(r))&&(n=o.shift(),a.push({value:n,type:o[0].replace(wt," ")}),r=r.slice(n.length)),x.filter)!(o=X[s].exec(r))||c[s]&&!(o=c[s](o))||(n=o.shift(),a.push({value:n,type:s,matches:o}),r=r.slice(n.length));if(!n)break}return i?r.length:r?e.error(t):L(t,l).slice(0)}function h(t){for(var e=0,i=t.length,n="";e+~]|"+bt+")"+bt+"*"),q=new RegExp(bt+"|>"),V=new RegExp(z),G=new RegExp("^"+Y+"$"),X={ID:new RegExp("^#("+Y+")"),CLASS:new RegExp("^\\.("+Y+")"),TAG:new RegExp("^("+Y+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+bt+"*(even|odd|(([+-]|)(\\d*)n|)"+bt+"*(?:([+-]|)"+bt+"*(\\d+)|))"+bt+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+bt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+bt+"*((?:-\\d)?\\d*)"+bt+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,tt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/[+~]/,nt=new RegExp("\\\\[\\da-fA-F]{1,6}"+bt+"?|\\\\([^\\r\\n\\f])","g"),ot=function(t,e){var i="0x"+t.slice(1)-65536;return e||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},st=function(){c()},rt=p(function(t){return!0===t.disabled&&a(t,"fieldset")},{dir:"parentNode",next:"legend"});try{A.apply(K=J.call(kt.childNodes),kt.childNodes),K[kt.childNodes.length].nodeType}catch(w){A={apply:function(t,e){_t.apply(t,J.call(e))},call:function(t){_t.apply(t,J.call(arguments,1))}}}for(w in e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if(c(t),D&&!N[i+" "]&&(!$||!$.test(i)))try{var n=E.call(t,i);if(n||lt.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){N(i,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(nt,ot),t[3]=(t[3]||t[4]||t[5]||"").replace(nt,ot),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return X.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&V.test(i)&&(e=u(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(nt,ot).toLowerCase();return"*"===t?function(){return!0}:function(t){return a(t,e)}},CLASS:function(t){var e=P[t+" "];return e||(e=new RegExp("(^|"+bt+")"+t+"("+bt+"|$)"))&&P(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,n){return function(o){var a=e.attr(o,t);return null==a?"!="===i:!i||(a+="","="===i?a===n:"!="===i?a!==n:"^="===i?n&&0===a.indexOf(n):"*="===i?n&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;mt.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?mt.find.matchesSelector(n,t)?[n]:[]:mt.find.matches(t,mt.grep(e,function(t){return 1===t.nodeType}))},mt.fn.extend({find:function(t){var e,i,n=this.length,o=this;if("string"!=typeof t)return this.pushStack(mt(t).filter(function(){for(e=0;e)[^>]*|#([\w-]+))$/;(mt.fn.init=function(t,e,i){var n,o;if(!t)return this;if(i=i||$t,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:Et.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof mt?e[0]:e,mt.merge(this,mt.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:ut,!0)),Dt.test(n[1])&&mt.isPlainObject(e))for(n in e)ct(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(o=ut.getElementById(n[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):ct(t)?void 0!==i.ready?i.ready(t):t(mt):mt.makeArray(t,this)}).prototype=mt.fn,$t=mt(ut);var At=/^(?:parents|prev(?:Until|All))/,Ot={children:!0,contents:!0,next:!0,prev:!0};mt.fn.extend({has:function(t){var e=mt(t,this),i=e.length;return this.filter(function(){for(var t=0;t\x20\t\r\n\f]*)/i,ee=/^$|^module$|\/(?:java|ecma)script/i;Kt=ut.createDocumentFragment().appendChild(ut.createElement("div")),(Zt=ut.createElement("input")).setAttribute("type","radio"),Zt.setAttribute("checked","checked"),Zt.setAttribute("name","t"),Kt.appendChild(Zt),lt.checkClone=Kt.cloneNode(!0).cloneNode(!0).lastChild.checked,Kt.innerHTML="",lt.noCloneChecked=!!Kt.cloneNode(!0).lastChild.defaultValue,Kt.innerHTML=" ",lt.option=!!Kt.lastChild;var ie={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};ie.tbody=ie.tfoot=ie.colgroup=ie.caption=ie.thead,ie.th=ie.td,lt.option||(ie.optgroup=ie.option=[1,""," "]);var ne=/<|?\w+;/,oe=/^([^.]*)(?:\.(.+)|)/;mt.event={global:{},add:function(t,e,i,n,o){var a,s,r,l,c,d,u,h,p,f,m,g=jt.get(t);if(Rt(t))for(i.handler&&(i=(a=i).handler,o=a.selector),o&&mt.find.matchesSelector(qt,o),i.guid||(i.guid=mt.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(e){return void 0!==mt&&mt.event.triggered!==e.type?mt.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(Ft)||[""]).length;c--;)p=m=(r=oe.exec(e[c])||[])[1],f=(r[2]||"").split(".").sort(),p&&(u=mt.event.special[p]||{},p=(o?u.delegateType:u.bindType)||p,u=mt.event.special[p]||{},d=mt.extend({type:p,origType:m,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&mt.expr.match.needsContext.test(o),namespace:f.join(".")},a),(h=l[p])||((h=l[p]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(t,n,f,s)||t.addEventListener&&t.addEventListener(p,s)),u.add&&(u.add.call(t,d),d.handler.guid||(d.handler.guid=i.guid)),o?h.splice(h.delegateCount++,0,d):h.push(d),mt.event.global[p]=!0)},remove:function(t,e,i,n,o){var a,s,r,l,c,d,u,h,p,f,m,g=jt.hasData(t)&&jt.get(t);if(g&&(l=g.events)){for(c=(e=(e||"").match(Ft)||[""]).length;c--;)if(p=m=(r=oe.exec(e[c])||[])[1],f=(r[2]||"").split(".").sort(),p){for(u=mt.event.special[p]||{},h=l[p=(n?u.delegateType:u.bindType)||p]||[],r=r[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=a=h.length;a--;)d=h[a],!o&&m!==d.origType||i&&i.guid!==d.guid||r&&!r.test(d.namespace)||n&&n!==d.selector&&("**"!==n||!d.selector)||(h.splice(a,1),d.selector&&h.delegateCount--,u.remove&&u.remove.call(t,d));s&&!h.length&&(u.teardown&&!1!==u.teardown.call(t,f,g.handle)||mt.removeEvent(t,p,g.handle),delete l[p])}else for(p in l)mt.event.remove(t,p+e[c],i,n,!0);mt.isEmptyObject(l)&&jt.remove(t,"handle events")}},dispatch:function(t){var e,i,n,o,a,s,r=new Array(arguments.length),l=mt.event.fix(t),c=(jt.get(this,"events")||Object.create(null))[l.type]||[],d=mt.event.special[l.type]||{};for(r[0]=l,e=1;e\s*$/g;mt.extend({htmlPrefilter:function(t){return t},clone:function(t,e,i){var n,o,a,s,r,l,c,d=t.cloneNode(!0),u=Vt(t);if(!(lt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||mt.isXMLDoc(t)))for(s=b(d),n=0,o=(a=b(t)).length;n").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&o("error"===t.type?404:200,t.type)}),ut.head.appendChild(e[0])},abort:function(){i&&i()}}});var Ke,Ze=[],Je=/(=)\?(?=&|$)|\?\?/;mt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ze.pop()||mt.expando+"_"+Oe.guid++;return this[t]=!0,t}}),mt.ajaxPrefilter("json jsonp",function(e,i,n){var o,a,s,r=!1!==e.jsonp&&(Je.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Je.test(e.data)&&"data");if(r||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=ct(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,r?e[r]=e[r].replace(Je,"$1"+o):!1!==e.jsonp&&(e.url+=(Fe.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return s||mt.error(o+" was not called"),s[0]},e.dataTypes[0]="json",a=t[o],t[o]=function(){s=arguments},n.always(function(){void 0===a?mt(t).removeProp(o):t[o]=a,e[o]&&(e.jsonpCallback=i.jsonpCallback,Ze.push(o)),s&&ct(a)&&a(s[0]),s=a=void 0}),"script"}),lt.createHTMLDocument=((Ke=ut.implementation.createHTMLDocument("").body).innerHTML="",2===Ke.childNodes.length),mt.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(lt.createHTMLDocument?((n=(e=ut.implementation.createHTMLDocument("")).createElement("base")).href=ut.location.href,e.head.appendChild(n)):e=ut),a=!i&&[],(o=Dt.exec(t))?[e.createElement(o[1])]:(o=x([t],e,a),a&&a.length&&mt(a).remove(),mt.merge([],o.childNodes)));var n,o,a},mt.fn.load=function(t,e,i){var n,o,a,s=this,r=t.indexOf(" ");return-1").append(mt.parseHTML(t)).find(n):t)}).always(i&&function(t,e){s.each(function(){i.apply(this,a||[t.responseText,e,t])})}),this},mt.expr.pseudos.animated=function(t){return mt.grep(mt.timers,function(e){return t===e.elem}).length},mt.offset={setOffset:function(t,e,i){var n,o,a,s,r,l,c=mt.css(t,"position"),d=mt(t),u={};"static"===c&&(t.style.position="relative"),r=d.offset(),a=mt.css(t,"top"),l=mt.css(t,"left"),("absolute"===c||"fixed"===c)&&-1<(a+l).indexOf("auto")?(s=(n=d.position()).top,o=n.left):(s=parseFloat(a)||0,o=parseFloat(l)||0),ct(e)&&(e=e.call(t,i,mt.extend({},r))),null!=e.top&&(u.top=e.top-r.top+s),null!=e.left&&(u.left=e.left-r.left+o),"using"in e?e.using.call(t,u):d.css(u)}},mt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){mt.offset.setOffset(this,t,e)});var e,i,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],o={top:0,left:0};if("fixed"===mt.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===mt.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((o=mt(t).offset()).top+=mt.css(t,"borderTopWidth",!0),o.left+=mt.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-mt.css(n,"marginTop",!0),left:e.left-o.left-mt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===mt.css(t,"position");)t=t.offsetParent;return t||qt})}}),mt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;mt.fn[t]=function(n){return Lt(this,function(t,n,o){var a;if(dt(t)?a=t:9===t.nodeType&&(a=t.defaultView),void 0===o)return a?a[e]:t[n];a?a.scrollTo(i?a.pageXOffset:o,i?o:a.pageYOffset):t[n]=o},t,n,arguments.length)}}),mt.each(["top","left"],function(t,e){mt.cssHooks[e]=M(lt.pixelPosition,function(t,i){if(i)return i=F(t,e),le.test(i)?mt(t).position()[e]+"px":i})}),mt.each({Height:"height",Width:"width"},function(t,e){mt.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){mt.fn[n]=function(o,a){var s=arguments.length&&(i||"boolean"!=typeof o),r=i||(!0===o||!0===a?"margin":"border");return Lt(this,function(e,i,o){var a;return dt(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(a=e.documentElement,Math.max(e.body["scroll"+t],a["scroll"+t],e.body["offset"+t],a["offset"+t],a["client"+t])):void 0===o?mt.css(e,i,r):mt.style(e,i,o,r)},e,s?o:void 0,s)}})}),mt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){mt.fn[e]=function(t){return this.on(e,t)}}),mt.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),mt.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){mt.fn[e]=function(t,i){return 03)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var o=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.alert");o||i.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(i)})}var i='[data-dismiss="alert"]',n=function(e){t(e).on("click",i,this.close)};n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function i(){s.detach().trigger("closed.bs.alert").remove()}var o=t(this),a=o.attr("data-target");a||(a=o.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,"")),a="#"===a?[]:a;var s=t(document).find(a);e&&e.preventDefault(),s.length||(s=o.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",i,n.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.button"),a="object"==typeof e&&e;o||n.data("bs.button",o=new i(this,a)),"toggle"==e?o.toggle():e&&o.setState(e)})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.4.2",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,o=n.is("input")?"val":"text",a=n.data();e+="Text",null==a.resetText&&n.data("resetText",n[o]()),setTimeout(t.proxy(function(){n[o](null==a[e]?this.options[e]:a[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i).prop(i,!1))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var n=t(i.target).closest(".btn");e.call(n,"toggle"),t(i.target).is('input[type="radio"], input[type="checkbox"]')||(i.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.carousel"),a=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),s="string"==typeof e?e:a.slide;o||n.data("bs.carousel",o=new i(this,a)),"number"==typeof e?o.to(e):s?o[s]():a.interval&&o.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.4.1",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var n="prev"==t?-1:1,o=(i+n)%this.$items.length;return this.$items.eq(o)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){if(!this.sliding)return this.slide("next")},i.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},i.prototype.slide=function(e,n){var o=this.$element.find(".item.active"),a=n||this.getItemForDirection(e,o),s=this.interval,r="next"==e?"left":"right",l=this;if(a.hasClass("active"))return this.sliding=!1;var c=a[0],d=t.Event("slide.bs.carousel",{relatedTarget:c,direction:r});if(this.$element.trigger(d),!d.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(a)]);u&&u.addClass("active")}var h=t.Event("slid.bs.carousel",{relatedTarget:c,direction:r});return t.support.transition&&this.$element.hasClass("slide")?(a.addClass(e),"object"==typeof a&&a.length&&a[0].offsetWidth,o.addClass(r),a.addClass(r),o.one("bsTransitionEnd",function(){a.removeClass([e,r].join(" ")).addClass("active"),o.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(h)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(o.removeClass("active"),a.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var o=function(i){i.preventDefault();var n=t(this),o=n.attr("href");o&&(o=o.replace(/.*(?=#[^\s]+$)/,""));var a=n.attr("data-target")||o,s=t(document).find(a);if(s.hasClass("carousel")){var r=t.extend({},s.data(),n.data()),l=n.attr("data-slide-to");l&&(r.interval=!1),e.call(s,r),l&&s.data("bs.carousel").to(l)}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(document).find(n)}function i(e){return this.each(function(){var i=t(this),o=i.data("bs.collapse"),a=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e);!o&&a.toggle&&/show|hide/.test(e)&&(a.toggle=!1),o||i.data("bs.collapse",o=new n(this,a)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,
+this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.4.1",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"))&&e.transitioning)){var a=t.Event("show.bs.collapse");if(this.$element.trigger(a),!a.isDefaultPrevented()){o&&o.length&&(i.call(o,"hide"),e||o.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[s](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return o.call(this);this.$element[i](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(n.TRANSITION_DURATION)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,n){var o=t(n);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var o=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var o=t(this);o.attr("data-target")||n.preventDefault();var a=e(o),s=a.data("bs.collapse"),r=s?"toggle":o.data();i.call(a,r)})}(jQuery),function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n="#"!==i?t(document).find(i):null;return n&&n.length?n:e.parent()}function i(i){i&&3===i.which||(t(o).remove(),t(a).each(function(){var n=t(this),o=e(n),a={relatedTarget:this};o.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(o[0],i.target)||(o.trigger(i=t.Event("hide.bs.dropdown",a)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",a)))))}))}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new s(this)),"string"==typeof e&&n[e].call(i)})}var o=".dropdown-backdrop",a='[data-toggle="dropdown"]',s=function(e){t(e).on("click.bs.dropdown",this.toggle)};s.VERSION="3.4.1",s.prototype.toggle=function(n){var o=t(this);if(!o.is(".disabled, :disabled")){var a=e(o),s=a.hasClass("open");if(i(),!s){"ontouchstart"in document.documentElement&&!a.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var r={relatedTarget:this};if(a.trigger(n=t.Event("show.bs.dropdown",r)),n.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),a.toggleClass("open").trigger(t.Event("shown.bs.dropdown",r))}return!1}},s.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),s=o.hasClass("open");if(!s&&27!=i.which||s&&27==i.which)return 27==i.which&&o.find(a).trigger("focus"),n.trigger("click");var r=o.find(".dropdown-menu li:not(.disabled):visible a");if(r.length){var l=r.index(i.target);38==i.which&&l>0&&l--,40==i.which&&ldocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:r},d.prototype.init=function(e,i,n){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),a=o.length;a--;){var s=o[a];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var r="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},d.prototype.getDefaults=function(){return d.DEFAULTS},d.prototype.getOptions=function(e){var n=this.$element.data();for(var a in n)n.hasOwnProperty(a)&&-1!==t.inArray(a,o)&&delete n[a];return e=t.extend({},this.getDefaults(),n,e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e.sanitize&&(e.template=i(e.template,e.whiteList,e.sanitizeFn)),e},d.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},d.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},d.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},d.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)}},d.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var n=this,o=this.tip(),a=this.getUID(this.type);this.setContent(),o.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,r=/\s?auto?\s?/i,l=r.test(s);l&&(s=s.replace(r,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(t(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),u=o[0].offsetWidth,h=o[0].offsetHeight;if(l){var p=s,f=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>f.bottom?"top":"top"==s&&c.top-hf.width?"left":"left"==s&&c.left-us.top+s.height&&(o.top=s.top+s.height-l)}else{var c=e.left-a,d=e.left+a+i;cs.right&&(o.left=s.left+s.width-d)}return o},d.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},d.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},d.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},d.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},d.prototype.enable=function(){this.enabled=!0},d.prototype.disable=function(){this.enabled=!1},d.prototype.toggleEnabled=function(){this.enabled=!this.enabled},d.prototype.toggle=function(e){var i=this;e&&((i=t(e.currentTarget).data("bs."+this.type))||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},d.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},d.prototype.sanitizeHtml=function(t){return i(t,this.options.whiteList,this.options.sanitizeFn)};var u=t.fn.tooltip;t.fn.tooltip=n,t.fn.tooltip.Constructor=d,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=u,this}}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.popover"),a="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||n.data("bs.popover",o=new i(this,a)),"string"==typeof e&&o[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.4.1",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var n=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===n&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===n?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery),function(t){"use strict";function e(i,n){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each(function(){var n=t(this),o=n.data("bs.scrollspy"),a="object"==typeof i&&i;o||n.data("bs.scrollspy",o=new e(this,a)),"string"==typeof i&&o[i]()})}e.VERSION="3.4.1",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),a=/^#./.test(o)&&t(o);return a&&a.length&&a.is(":visible")&&[[a[i]().top+n,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),o=this.offsets,a=this.targets,s=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return s!=(t=a[a.length-1])&&this.activate(t);if(s&&e=o[t]&&(void 0===o[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var s=n.find("> .active"),r=o&&t.support.transition&&(s.length&&s.hasClass("fade")||!!n.find("> .fade").length);s.length&&r?s.one("bsTransitionEnd",a).emulateTransitionEnd(i.TRANSITION_DURATION):a(),s.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var o=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.affix"),a="object"==typeof e&&e;o||n.data("bs.affix",o=new i(this,a)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n);var o=this.options.target===i.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=o.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.4.1",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,n){var o=this.$target.scrollTop(),a=this.$element.offset(),s=this.$target.height();if(null!=i&&"top"==this.affixed)return o=t-n&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,o=n.top,a=n.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(a=o=n),"function"==typeof o&&(o=n.top(this.$element)),"function"==typeof a&&(a=n.bottom(this.$element));var r=this.getState(s,e,o,a);if(this.affixed!=r){null!=this.unpin&&this.$element.css("top","");var l="affix"+(r?"-"+r:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=r,this.unpin="bottom"==r?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==r&&this.$element.offset({top:s-e-a})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)})})}(jQuery),define("bootstrap",["jquery"],function(){}),require.config({urlArgs:"v="+requirejs.s.contexts._.config.config.site.version,packages:[{name:"moment",location:"../libs/moment",main:"moment"}],include:["css","layer","toastr","fast","backend","backend-init","table","form","dragsort","addtabs","selectpage","bootstrap-daterangepicker"],paths:{lang:"empty:",form:"require-form",table:"require-table",upload:"require-upload",dropzone:"dropzone.min",echarts:"echarts.min","echarts-theme":"echarts-theme",adminlte:"adminlte","bootstrap-table-commonsearch":"bootstrap-table-commonsearch","bootstrap-table-template":"bootstrap-table-template",jquery:"../libs/jquery/dist/jquery.min",bootstrap:"../libs/bootstrap/dist/js/bootstrap.min","bootstrap-datetimepicker":"../libs/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min","bootstrap-daterangepicker":"../libs/bootstrap-daterangepicker/daterangepicker","bootstrap-select":"../libs/bootstrap-select/dist/js/bootstrap-select.min","bootstrap-select-lang":"../libs/bootstrap-select/dist/js/i18n/defaults-zh_CN",
+"bootstrap-table":"../libs/bootstrap-table/dist/bootstrap-table.min","bootstrap-table-export":"../libs/bootstrap-table/dist/extensions/export/bootstrap-table-export.min","bootstrap-table-fixed-columns":"../libs/bootstrap-table/dist/extensions/fixed-columns/bootstrap-table-fixed-columns","bootstrap-table-mobile":"../libs/bootstrap-table/dist/extensions/mobile/bootstrap-table-mobile","bootstrap-table-lang":"../libs/bootstrap-table/dist/locale/bootstrap-table-zh-CN","bootstrap-table-jumpto":"../libs/bootstrap-table/dist/extensions/page-jumpto/bootstrap-table-jumpto","bootstrap-slider":"../libs/bootstrap-slider/bootstrap-slider",tableexport:"../libs/tableExport.jquery.plugin/tableExport.min",dragsort:"../libs/fastadmin-dragsort/jquery.dragsort",sortable:"../libs/Sortable/Sortable.min",addtabs:"../libs/fastadmin-addtabs/jquery.addtabs",slimscroll:"../libs/jquery-slimscroll/jquery.slimscroll",validator:"../libs/nice-validator/dist/jquery.validator","validator-lang":"../libs/nice-validator/dist/local/zh-CN",toastr:"../libs/toastr/toastr",jstree:"../libs/jstree/dist/jstree.min",layer:"../libs/fastadmin-layer/dist/layer",cookie:"../libs/jquery.cookie/jquery.cookie",cxselect:"../libs/fastadmin-cxselect/js/jquery.cxselect",template:"../libs/art-template/dist/template-native",selectpage:"../libs/fastadmin-selectpage/selectpage",citypicker:"../libs/fastadmin-citypicker/dist/js/city-picker.min","citypicker-data":"../libs/fastadmin-citypicker/dist/js/city-picker.data"},shim:{addons:["backend"],bootstrap:["jquery"],"bootstrap-table":{deps:["bootstrap"],exports:"$.fn.bootstrapTable"},"bootstrap-table-lang":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-export":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-fixed-columns":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-mobile":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-advancedsearch":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-commonsearch":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-template":{deps:["bootstrap-table","template"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-jumpto":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},tableexport:{deps:["jquery"],exports:"$.fn.extend"},slimscroll:{deps:["jquery"],exports:"$.fn.extend"},adminlte:{deps:["bootstrap","slimscroll"],exports:"$.AdminLTE"},"bootstrap-daterangepicker":["moment/locale/zh-cn"],"bootstrap-datetimepicker":["moment/locale/zh-cn"],"bootstrap-select-lang":["bootstrap-select"],jstree:["css!../libs/jstree/dist/themes/default/style.css"],"validator-lang":["validator"],citypicker:["citypicker-data","css!../libs/fastadmin-citypicker/dist/css/city-picker.css"]},baseUrl:requirejs.s.contexts._.config.config.site.cdnurl+"/assets/js/",map:{"*":{css:"../libs/require-css/css.min"}},waitSeconds:60,charset:"utf-8"}),require(["jquery","bootstrap"],function(t,e){var i=requirejs.s.contexts._.config.config;window.Config=i;var n={};n.lang=i.moduleurl+"/ajax/lang?callback=define&controllername="+i.controllername+"&lang="+i.language,n["backend/"]="backend/",require.config({paths:n}),t(function(){require(["fast"],function(t){require(["backend","backend-init","addons"],function(t,e,n){i.jsname&&require([i.jsname],function(t){t.hasOwnProperty(i.actionname)?t[i.actionname]():t.hasOwnProperty("_empty")&&t._empty()},function(t){console.error(t)})})})})}),define("require-backend",function(){}),define("../libs/require-css/css.min",[],function(){if("undefined"==typeof window)return{load:function(t,e,i){i()}};var t=document.getElementsByTagName("head")[0],e=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/)||0,i=!1,n=!0;e[1]||e[7]?i=parseInt(e[1])<6||parseInt(e[7])<=9:e[2]||e[8]?n=!1:e[4]&&(i=parseInt(e[4])<18);var o={};o.pluginBuilder="./css-builder";var a,s,r,l=function(){a=document.createElement("style"),t.appendChild(a),s=a.styleSheet||a.sheet},c=0,d=[],u=function(t){s.addImport(t),a.onload=function(){h()},31==++c&&(l(),c=0)},h=function(){r();var t=d.shift();return t?(r=t[1],void u(t[0])):void(r=null)},p=function(t,e){if(s&&s.addImport||l(),s&&s.addImport)r?d.push([t,e]):(u(t),r=e);else{a.textContent='@import "'+t+'";';var i=setInterval(function(){try{a.sheet.cssRules,clearInterval(i),e()}catch(t){}},10)}},f=function(e,i){var o=document.createElement("link");if(o.type="text/css",o.rel="stylesheet",n)o.onload=function(){o.onload=function(){},setTimeout(i,7)};else var a=setInterval(function(){for(var t=0;t0;n--)if("interactive"===e[n].readyState){t=e[n].src;break}return t||e[i].src}();return(t.LAYUI_GLOBAL||{}).layer_dir||e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(e,i){var n=e.currentStyle?e.currentStyle:t.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(e,i,n){if(s.path){var o=document.getElementsByTagName("head")[0],r=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||e).replace(/\.|\//g,""),c="layuicss-"+l,d="creating",u=0;r.rel="stylesheet",r.href=s.path+e,r.id=c,document.getElementById(c)||o.appendChild(r),"function"==typeof i&&function e(n){var o=document.getElementById(c);return++u>100?t.console&&console.error(l+".css: Invalid"):void(1989===parseInt(a.getStyle(o,"width"))?(n===d&&o.removeAttribute("lay-status"),o.getAttribute("lay-status")===d?setTimeout(e,100):i()):(o.setAttribute("lay-status",d),setTimeout(function(){e(d)},100)))}()}}},s={v:"3.5.2",ie:function(){var e=navigator.userAgent.toLowerCase();return!!(t.ActiveXObject||"ActiveXObject"in t)&&((e.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:t.layer&&t.layer.v?1e5:0,path:a.getPath,config:function(t,e){return t=t||{},c=s.cache=a.config=i.extend({},a.config,t),s.path=a.config.path||s.path,"string"==typeof t.extend&&(t.extend=[t.extend]),a.config.path&&s.ready(),t.extend?(o?layui.addcss("modules/layer/"+t.extend):a.link("theme/"+t.extend),this):this},ready:function(t){var e="layer",i=(o?"modules/layer/":"theme/")+"default/layer.css?v="+s.v;return o?layui.addcss(i,t,e):a.link(i,t,e),this},alert:function(t,e,n){var o="function"==typeof e;return o&&(n=e),s.open(i.extend({content:t,yes:n},o?{}:e))},confirm:function(t,e,n,o){var r="function"==typeof e;return r&&(o=n,n=e),s.open(i.extend({content:t,btn:a.btn,yes:n,btn2:o},r?{}:e))},msg:function(t,e,n){var o="function"==typeof e,r=a.config.skin,c=(r?r+" "+r+"-msg":"")||"layui-layer-msg",d=l.anim.length-1;return o&&(n=e),s.open(i.extend({content:t,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:n},o&&!a.config.skin?{skin:c+" layui-layer-hui",anim:d}:function(){return e=e||{},-1!==e.icon&&void 0!==e.icon||(e.skin=c+" "+(e.skin||"layui-layer-hui")),e}()))},load:function(t,e){return s.open(i.extend({type:3,icon:t||0,resize:!1,shade:.01},e))},tips:function(t,e,n){return s.open(i.extend({type:4,content:[t,e],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:260},n))}},r=function(t){var e=this,n=function(){e.creat()};e.index=++s.index,e.config=i.extend({},e.config,a.config,t),document.body?n():setTimeout(function(){n()},30)};r.pt=r.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],l.SHADE="layui-layer-shade",l.MOVE="layui-layer-move",r.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,minStack:!0,focusBtn:0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},r.pt.vessel=function(t,e){var n=this,o=n.index,s=n.config,r=s.zIndex+o,c="object"==typeof s.title,d=s.maxmin&&(1===s.type||2===s.type),u=s.title?''+(c?s.title[0]:s.title)+"
":"";return s.zIndex=r,e([s.shade?'
':"",''+(t&&2!=s.type?"":u)+'
'+(0==s.type&&-1!==s.icon?' ':"")+(1==s.type&&t?"":s.content||"")+'
'+function(){var t=d?' ':"";return s.closeBtn&&(t+=' '),t}()+" "+(s.btn?function(){var t="";"string"==typeof s.btn&&(s.btn=[s.btn]);for(var e=0,i=s.btn.length;e
'+s.btn[e]+"";return' '+t+"
"}():"")+(s.resize?' ':"")+" "],u,i('
')),n},r.pt.creat=function(){var t=this,e=t.config,o=t.index,r=e.content,c="object"==typeof r,d=i("body");if(!e.id||!i("#"+e.id)[0]){switch("string"==typeof e.area&&(e.area="auto"===e.area?["",""]:[e.area,""]),e.shift&&(e.anim=e.shift),6==s.ie&&(e.fixed=!1),e.type){case 0:e.btn="btn"in e?e.btn:a.btn[0],s.closeAll("dialog");break;case 2:var r=e.content=c?e.content:[e.content||"","auto"];e.content='';break;case 3:delete e.title,delete e.closeBtn,-1===e.icon&&e.icon,s.closeAll("loading");break;case 4:c||(e.content=[e.content,"body"]),e.follow=e.content[1],e.content=e.content[0]+' ',delete e.title,e.tips="object"==typeof e.tips?e.tips:[e.tips,!0],e.tipsMore||s.closeAll("tips")}if(t.vessel(c,function(n,s,u){d.append(n[0]),c?function(){2==e.type||4==e.type?function(){i("body").append(n[1])}():function(){r.parents("."+l[0])[0]||(r.data("display",r.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+o).find("."+l[5]).before(s))}()}():d.append(n[1]),i("#"+l.MOVE)[0]||d.append(a.moveElem=u),t.layero=i("#"+l[0]+o),t.shadeo=i("#"+l.SHADE+o),e.scrollbar||l.html.css("overflow","hidden").attr("layer-full",o)}).auto(o),t.shadeo.css({"background-color":e.shade[1]||"#000",opacity:e.shade[0]||e.shade}),2==e.type&&6==s.ie&&t.layero.find("iframe").attr("src",r[0]),4==e.type?t.tips():function(){t.offset(),parseInt(a.getStyle(document.getElementById(l.MOVE),"z-index"))||function(){t.layero.css("visibility","hidden"),s.ready(function(){t.offset(),t.layero.css("visibility","visible")})}()}(),e.fixed&&n.on("resize",function(){t.offset(),(/^\d+%$/.test(e.area[0])||/^\d+%$/.test(e.area[1]))&&t.auto(o),4==e.type&&t.tips()}),e.time<=0||setTimeout(function(){s.close(t.index)},e.time),t.move().callback(),l.anim[e.anim]){var u="layer-anim "+l.anim[e.anim];t.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}e.isOutAnim&&t.layero.data("isOutAnim",!0)}},r.pt.auto=function(t){var e=this,o=e.config,a=i("#"+l[0]+t);""===o.area[0]&&o.maxWidth>0&&(s.ie&&s.ie<8&&o.btn&&a.width(a.innerWidth()),a.outerWidth()>o.maxWidth&&a.width(o.maxWidth));var r=[a.innerWidth(),a.innerHeight()],c=a.find(l[1]).outerHeight()||0,d=a.find("."+l[6]).outerHeight()||0,u=function(t){t=a.find(t),t.height(r[1]-c-d-2*(0|parseFloat(t.css("padding-top"))))};switch(o.type){case 2:u("iframe");break;default:""===o.area[1]?o.maxHeight>0&&a.outerHeight()>o.maxHeight?(r[1]=o.maxHeight,u("."+l[5])):o.fixed&&r[1]>=n.height()&&(r[1]=n.height(),u("."+l[5])):u("."+l[5])}return e},r.pt.offset=function(){var t=this,e=t.config,i=t.layero,o=[i.outerWidth(),i.outerHeight()],a="object"==typeof e.offset;t.offsetTop=(n.height()-o[1])/2,t.offsetLeft=(n.width()-o[0])/2,a?(t.offsetTop=e.offset[0],t.offsetLeft=e.offset[1]||t.offsetLeft):"auto"!==e.offset&&("t"===e.offset?t.offsetTop=0:"r"===e.offset?t.offsetLeft=n.width()-o[0]:"b"===e.offset?t.offsetTop=n.height()-o[1]:"l"===e.offset?t.offsetLeft=0:"lt"===e.offset?(t.offsetTop=0,t.offsetLeft=0):"lb"===e.offset?(t.offsetTop=n.height()-o[1],t.offsetLeft=0):"rt"===e.offset?(t.offsetTop=0,t.offsetLeft=n.width()-o[0]):"rb"===e.offset?(t.offsetTop=n.height()-o[1],t.offsetLeft=n.width()-o[0]):t.offsetTop=e.offset),e.fixed||(t.offsetTop=/%$/.test(t.offsetTop)?n.height()*parseFloat(t.offsetTop)/100:parseFloat(t.offsetTop),t.offsetLeft=/%$/.test(t.offsetLeft)?n.width()*parseFloat(t.offsetLeft)/100:parseFloat(t.offsetLeft),t.offsetTop+=n.scrollTop(),t.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(t.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),t.offsetLeft=i.css("left")),i.css({top:t.offsetTop,left:t.offsetLeft})},r.pt.tips=function(){var t=this,e=t.config,o=t.layero,a=[o.outerWidth(),o.outerHeight()],s=i(e.follow);s[0]||(s=i("body"));var r={width:s.outerWidth(),height:s.outerHeight(),top:s.offset().top,left:s.offset().left},c=o.find(".layui-layer-TipsG"),d=e.tips[0];e.tips[1]||c.remove(),r.autoLeft=function(){r.left+a[0]-n.width()>0?(r.tipLeft=r.left+r.width-a[0],c.css({right:12,left:"auto"})):r.tipLeft=r.left},r.where=[function(){r.autoLeft(),r.tipTop=r.top-a[1]-10,c.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",e.tips[1])},function(){r.tipLeft=r.left+r.width+10,r.tipTop=r.top,c.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",e.tips[1])},function(){r.autoLeft(),r.tipTop=r.top+r.height+10,c.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",e.tips[1])},function(){r.tipLeft=r.left-a[0]-10,r.tipTop=r.top,c.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",e.tips[1])}],r.where[d-1](),1===d?r.top-(n.scrollTop()+a[1]+16)<0&&r.where[2]():2===d?n.width()-(r.left+r.width+a[0]+16)>0||r.where[3]():3===d?r.top-n.scrollTop()+r.height+a[1]+16-n.height()>0&&r.where[0]():4===d&&a[0]+16-r.left>0&&r.where[1](),o.find("."+l[5]).css({"background-color":e.tips[1],"padding-right":e.closeBtn?"30px":""}),o.css({left:r.tipLeft-(e.fixed?n.scrollLeft():0),top:r.tipTop-(e.fixed?n.scrollTop():0)})},r.pt.move=function(){var t=this,e=t.config,o=i(document),r=t.layero,l=r.find(e.move),c=r.find(".layui-layer-resize"),d={};return e.move&&l.css("cursor","move"),l.on("mousedown",function(t){t.preventDefault(),e.move&&(d.moveStart=!0,d.offset=[t.clientX-parseFloat(r.css("left")),t.clientY-parseFloat(r.css("top"))],a.moveElem.css("cursor","move").show())}),c.on("mousedown",function(t){t.preventDefault(),d.resizeStart=!0,d.offset=[t.clientX,t.clientY],d.area=[r.outerWidth(),r.outerHeight()],a.moveElem.css("cursor","se-resize").show()}),o.on("mousemove",function(i){if(d.moveStart){var o=i.clientX-d.offset[0],a=i.clientY-d.offset[1],l="fixed"===r.css("position");if(i.preventDefault(),d.stX=l?0:n.scrollLeft(),d.stY=l?0:n.scrollTop(),!e.moveOut){var c=n.width()-r.outerWidth()+d.stX,u=n.height()-r.outerHeight()+d.stY;oc&&(o=c),au&&(a=u)}r.css({left:o,top:a})}if(e.resize&&d.resizeStart){var o=i.clientX-d.offset[0],a=i.clientY-d.offset[1];i.preventDefault(),s.style(t.index,{width:d.area[0]+o,height:d.area[1]+a}),d.isResize=!0,e.resizing&&e.resizing(r)}}).on("mouseup",function(t){d.moveStart&&(delete d.moveStart,a.moveElem.hide(),e.moveEnd&&e.moveEnd(r)),d.resizeStart&&(delete d.resizeStart,a.moveElem.hide())}),t},r.pt.callback=function(){function t(){!1===(o.cancel&&o.cancel(e.index,n))||s.close(e.index)}var e=this,n=e.layero,o=e.config;if(e.openLayer(),o.success&&(2==o.type?n.find("iframe").on("load",function(){o.success(n,e.index)}):o.success(n,e.index)),6==s.ie&&e.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var t=i(this).index();if(0===t)o.yes?o.yes(e.index,n):o.btn1?o.btn1(e.index,n):s.close(e.index);else{!1===(o["btn"+(t+1)]&&o["btn"+(t+1)](e.index,n))||s.close(e.index)}}),"number"==typeof o.focusBtn){n.find("."+l[6]).children("a").each(function(){var t=i(this),e=i(" ").addClass("layui-layer-confirm");t.css("position","relative").attr("tabindex",-1).append(e),e.click(function(){return t.trigger("click"),!1})});var r=n.find("."+l[6]).find("button.layui-layer-confirm").eq(o.focusBtn);r.length>0&&r.focus()}n.find("."+l[7]).on("click",t),o.shadeClose&&e.shadeo.on("click",function(){s.close(e.index)}),n.find(".layui-layer-min").on("click",function(){!1===(o.min&&o.min(n,e.index))||s.min(e.index,o)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(s.restore(e.index),o.restore&&o.restore(n,e.index)):(s.full(e.index,o),setTimeout(function(){o.full&&o.full(n,e.index)},100))}),o.end&&(a.end[e.index]=o.end)},a.reselect=function(){i.each(i("select"),function(t,e){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},r.pt.IE6=function(t){i("select").each(function(t,e){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},r.pt.openLayer=function(){var t=this;s.zIndex=t.config.zIndex,s.setTop=function(t){var e=function(){s.zIndex++,t.css("z-index",s.zIndex+1)};return s.zIndex=parseInt(t[0].style.zIndex),t.on("mousedown",e),s.zIndex}},a.record=function(t){var e=[t.width(),t.height(),t.position().top,t.position().left+parseFloat(t.css("margin-left"))];t.find(".layui-layer-max").addClass("layui-layer-maxmin"),t.attr({area:e})},a.rescollbar=function(t){l.html.attr("layer-full")==t&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},t.layer=s,s.getChildFrame=function(t,e){return e=e||i("."+l[4]).attr("times"),i("#"+l[0]+e).find("iframe").contents().find(t)},s.getFrameIndex=function(t){return i("#"+t).parents("."+l[4]).attr("times")},s.iframeAuto=function(t){if(t){var e=s.getChildFrame("html",t).outerHeight(),n=i("#"+l[0]+t),o=n.find(l[1]).outerHeight()||0,a=n.find("."+l[6]).outerHeight()||0;n.css({height:e+o+a}),n.find("iframe").css({height:e})}},s.iframeSrc=function(t,e){i("#"+l[0]+t).find("iframe").attr("src",e)},s.style=function(t,e,n){var o=i("#"+l[0]+t),s=o.find(".layui-layer-content"),r=o.attr("type"),c=o.find(l[1]).outerHeight()||0,d=o.find("."+l[6]).outerHeight()||0;if(o.attr("minLeft"),r!==a.type[3]&&r!==a.type[4])if(n||(parseFloat(e.width)<=260&&(e.width=260),parseFloat(e.height)-c-d<=64&&(e.height=64+c+d)),o.css(e),d=o.find("."+l[6]).outerHeight()||0,r===a.type[2])o.find("iframe").css({height:parseFloat(e.height)-c-d});else{var u="border-box"==s.css("box-sizing");s.css({height:parseFloat(e.height)-c-d-parseFloat(u?0:s.css("padding-top"))-parseFloat(u?0:s.css("padding-bottom"))})}},s.min=function(t,e){e=e||{};var o=i("#"+l[0]+t),r=i("#"+l.SHADE+t),c=o.find(l[1]).outerHeight()||0,d=o.attr("minLeft")||181*a.minIndex+"px",u=o.css("position"),h={width:180,height:c,position:"fixed",overflow:"hidden"};a.record(o),a.minLeft[0]&&(d=a.minLeft[0],a.minLeft.shift()),e.minStack&&(h.left=d,h.top=n.height()-c,o.attr("minLeft")||a.minIndex++,o.attr("minLeft",d)),o.attr("position",u),s.style(t,h,!0),o.find(".layui-layer-min").hide(),"page"===o.attr("type")&&o.find(l[4]).hide(),a.rescollbar(t),r.hide()},s.restore=function(t){var e=i("#"+l[0]+t),n=i("#"+l.SHADE+t),o=e.attr("area").split(",");e.attr("type"),s.style(t,{width:parseFloat(o[0]),height:parseFloat(o[1]),top:parseFloat(o[2]),left:parseFloat(o[3]),position:e.attr("position"),overflow:"visible"},!0),e.find(".layui-layer-max").removeClass("layui-layer-maxmin"),e.find(".layui-layer-min").show(),"page"===e.attr("type")&&e.find(l[4]).show(),a.rescollbar(t),n.show()},s.full=function(t){var e,o=i("#"+l[0]+t);a.record(o),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",t),clearTimeout(e),e=setTimeout(function(){var e="fixed"===o.css("position");s.style(t,{top:e?0:n.scrollTop(),left:e?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),o.find(".layui-layer-min").hide()},100)},s.title=function(t,e){i("#"+l[0]+(e||s.index)).find(l[1]).html(t)},s.close=function(t,e){var n=i("#"+l[0]+t),o=n.attr("type");if(n[0]){var r="layui-layer-wrap",c=function(){if(o===a.type[1]&&"object"===n.attr("conType")){n.children(":not(."+l[5]+")").remove();for(var s=n.find("."+r),c=0;c<2;c++)s.unwrap();s.css("display",s.data("display")).removeClass(r)}else{if(o===a.type[2])try{var d=i("#"+l[4]+t)[0];d.contentWindow.document.write(""),d.contentWindow.close(),n.find("."+l[5])[0].removeChild(d)}catch(t){}n[0].innerHTML="",n.remove()}"function"==typeof a.end[t]&&a.end[t](),delete a.end[t],"function"==typeof e&&e()};n.data("isOutAnim")&&n.addClass("layer-anim layer-anim-close"),i("#layui-layer-moves, #"+l.SHADE+t).remove(),6==s.ie&&a.reselect(),a.rescollbar(t),n.attr("minLeft")&&(a.minIndex--,a.minLeft.push(n.attr("minLeft"))),s.ie&&s.ie<10||!n.data("isOutAnim")?c():setTimeout(function(){c()},200)}},s.closeAll=function(t,e){"function"==typeof t&&(e=t,t=null);var n=i("."+l[0]);i.each(n,function(o){var a=i(this),r=t?a.attr("type")===t:1;r&&s.close(a.attr("times"),o===n.length-1?e:null),r=null}),0===n.length&&"function"==typeof e&&e()};var c=s.cache||{},d=function(t){return c.skin?" "+c.skin+" "+c.skin+"-"+t:""};s.prompt=function(t,e){var o="";if(t=t||{},"function"==typeof t&&(e=t),t.area){var a=t.area;o='style="width: '+a[0]+"; height: "+a[1]+';"',delete t.area}var r,l=2==t.formType?'":function(){return' '}(),c=t.success;return delete t.success,s.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+d("prompt"),maxWidth:n.width(),success:function(e){r=e.find(".layui-layer-input"),r.val(t.value||"").focus(),"function"==typeof c&&c(e)},resize:!1,yes:function(i){var n=r.val();""===n?r.focus():n.length>(t.maxlength||500)?s.tips("最多输入"+(t.maxlength||500)+"个字数",r,{tips:1}):e&&e(n,i,r)}},t))},s.tab=function(t){t=t||{};var e=t.tab||{},n="layui-this",o=t.success;return delete t.success,s.open(i.extend({type:1,skin:"layui-layer-tab"+d("tab"),resize:!1,title:function(){var t=e.length,i=1,o="";if(t>0)for(o=''+e[0].title+" ";i"+e[i].title+"";return o}(),content:''+function(){var t=e.length,i=1,o="";if(t>0)for(o=''+(e[0].content||"no content")+" ";i'+(e[i].content||"no content")+"";return o}()+" ",success:function(e){var a=e.find(".layui-layer-title").children(),s=e.find(".layui-layer-tabmain").children();a.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var o=i(this),a=o.index();o.addClass(n).siblings().removeClass(n),s.eq(a).show().siblings().hide(),"function"==typeof t.change&&t.change(a)}),"function"==typeof o&&o(e)}},t))},s.photos=function(e,n,o){var a={};if(e=e||{},e.photos){e.zoom=void 0===e.zoom||!!e.zoom;var r=!("string"==typeof e.photos||e.photos instanceof i),l=r?e.photos:{},c=l.data||[],u=l.start||0;a.imgIndex=1+(0|u),e.img=e.img||"img";var h=e.success;if(delete e.success,r){if(0===c.length)return s.msg("没有图片")}else{var p=i(e.photos),f=function(){c=[],p.find(e.img).each(function(t){var e=i(this);e.attr("layer-index",t),c.push({alt:e.attr("alt"),pid:e.attr("layer-pid"),src:e.attr("layer-src")||e.attr("src"),thumb:e.attr("src")})})};if(f(),0===c.length)return;if(n||p.on("click",e.img,function(){f();var t=i(this),n=t.attr("layer-index");s.photos(i.extend(e,{photos:{start:n,data:c,tab:e.tab},full:e.full}),!0)}),!n)return}a.imgprev=function(t){a.imgIndex--,a.imgIndex<1&&(a.imgIndex=c.length),a.tabimg(t)},a.imgnext=function(t,e){++a.imgIndex>c.length&&(a.imgIndex=1,e)||a.tabimg(t)},a.keyup=function(t){if(!a.end){var e=t.keyCode;t.preventDefault(),37===e?a.imgprev(!0):39===e?a.imgnext(!0):27===e&&s.close(a.index)}},a.tabimg=function(t){if(!(c.length<=1))return l.start=a.imgIndex-1,s.close(a.index),s.photos(e,!0,t)},a.event=function(){a.bigimg.find(".layui-layer-imgprev").on("click",function(t){t.preventDefault(),a.imgprev(!0)}),a.bigimg.find(".layui-layer-imgnext").on("click",function(t){t.preventDefault(),a.imgnext(!0)}),i(document).on("keyup",a.keyup),e.zoom&&a.bigimg.on("wheel mousewheel",i(">img",a.bigimg),function(t){var e=i(this).offset(),n=t.originalEvent.wheelDelta>0,o=n?"+=":"-=",a=Math.floor(12);return!(!n&&(i(this).width()<50||i(this).height()<50)||(i(this).width(o+24).height(o+24).offset({left:n?e.left-a:e.left+a,top:n?e.top-a:e.top+a}),1))})},a.loadi=s.load(1,{shade:!("shade"in e)&&.9,scrollbar:!1}),function(t,e,i){var n=new Image;return n.src=t,n.complete?e(n):(n.onload=function(){n.onload=null,e(n)},void(n.onerror=function(t){n.onerror=null,i(t)}))}(c[u].src,function(n){s.close(a.loadi),o&&(e.anim=-1),a.index=s.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var o=[n.width,n.height],a=[i(t).width()-100,i(t).height()-100];if(!e.full&&(o[0]>a[0]||o[1]>a[1])){var s=[o[0]/a[0],o[1]/a[1]];s[0]>s[1]?(o[0]=o[0]/s[0],o[1]=o[1]/s[0]):s[0] '+function(){return c.length>1?'":""}()+"",success:function(t,i){a.bigimg=t.find(".layui-layer-phimg"),a.imgsee=t.find(".layui-layer-imgbar"),a.event(t),e.tab&&e.tab(c[u],t),"function"==typeof h&&h(t)},end:function(){a.end=!0,i(document).off("keyup",a.keyup)}},e))},function(){s.close(a.loadi),s.msg("当前图片地址异常 是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){c.length>1&&a.imgnext(!0,!0)}})})}},a.run=function(e){i=e,n=i(t),l.html=i("html"),s.open=function(t){return new r(t).index}},t.layui&&layui.define?(s.ready(),layui.define("jquery",function(e){s.path=layui.cache.dir,a.run(layui.$),t.layer=s,e("layer",s)})):"function"==typeof define&&define.amd?define("layer",["jquery"],function(){return a.run(t.jQuery),s}):function(){s.ready(),a.run(t.jQuery)}()}(window),function(t){t("toastr",["jquery"],function(t){return function(){function e(t,e,i){return f({type:x.error,iconClass:m().iconClasses.error,message:t,optionsOverride:i,title:e})}function i(e,i){return e||(e=m()),v=t("#"+e.containerId),v.length?v:(i&&(v=u(e)),v)}function n(t,e,i){return f({type:x.info,iconClass:m().iconClasses.info,message:t,optionsOverride:i,title:e})}function o(t){y=t}function a(t,e,i){return f({type:x.success,iconClass:m().iconClasses.success,message:t,optionsOverride:i,title:e})}function s(t,e,i){return f({type:x.warning,iconClass:m().iconClasses.warning,message:t,optionsOverride:i,title:e})}function r(t,e){var n=m();v||i(n),d(t,n,e)||c(n)}function l(e){var n=m();if(v||i(n),e&&0===t(":focus",e).length)return void g(e);v.children().length&&v.remove()}function c(e){for(var i=v.children(),n=i.length-1;n>=0;n--)d(t(i[n]),e)}function d(e,i,n){var o=!(!n||!n.force)&&n.force;return!(!e||!o&&0!==t(":focus",e).length)&&(e[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){g(e)}}),!0)}function u(e){return v=t("
").attr("id",e.containerId).addClass(e.positionClass),v.appendTo(t(e.target)),v}function h(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'× ',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function p(t){y&&y(t)}function f(e){function n(t){return null==t&&(t=""),t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function o(){var t="";switch(e.iconClass){case"toast-success":case"toast-info":t="polite";break;default:t="assertive"}S.attr("aria-live",t)}function a(){e.iconClass&&S.addClass(k.toastClass).addClass(_)}function s(){k.newestOnTop?v.prepend(S):v.append(S)}function r(){if(e.title){var t=e.title;k.escapeHtml&&(t=n(e.title)),T.append(t).addClass(k.titleClass),S.append(T)}}function l(){if(e.message){var t=e.message;k.escapeHtml&&(t=n(e.message)),D.append(t).addClass(k.messageClass),S.append(D)}}function c(){k.closeButton&&(E.addClass(k.closeClass).attr("role","button"),S.prepend(E))}function d(){k.progressBar&&($.addClass(k.progressClass),S.prepend($))}function u(){k.rtl&&S.addClass("rtl")}function h(e){var i=e&&!1!==k.closeMethod?k.closeMethod:k.hideMethod,n=e&&!1!==k.closeDuration?k.closeDuration:k.hideDuration,o=e&&!1!==k.closeEasing?k.closeEasing:k.hideEasing;if(!t(":focus",S).length||e)return clearTimeout(A.intervalId),S[i]({duration:n,easing:o,complete:function(){g(S),clearTimeout(C),k.onHidden&&"hidden"!==O.state&&k.onHidden(),O.state="hidden",O.endTime=new Date,p(O)}})}function f(){(k.timeOut>0||k.extendedTimeOut>0)&&(C=setTimeout(h,k.extendedTimeOut),A.maxHideTime=parseFloat(k.extendedTimeOut),A.hideEta=(new Date).getTime()+A.maxHideTime)}function y(){clearTimeout(C),A.hideEta=0,S.stop(!0,!0)[k.showMethod]({duration:k.showDuration,easing:k.showEasing})}function x(){var t=(A.hideEta-(new Date).getTime())/A.maxHideTime*100;$.width(t+"%")}var k=m(),_=e.iconClass||k.iconClass
+;if(void 0!==e.optionsOverride&&(k=t.extend(k,e.optionsOverride),_=e.optionsOverride.iconClass||_),!function(t,e){if(t.preventDuplicates){if(e.message===b)return!0;b=e.message}return!1}(k,e)){w++,v=i(k,!0);var C=null,S=t("
"),T=t("
"),D=t("
"),$=t("
"),E=t(k.closeHtml),A={intervalId:null,hideEta:null,maxHideTime:null},O={toastId:w,state:"visible",startTime:new Date,options:k,map:e};return function(){a(),r(),l(),c(),d(),u(),s(),o()}(),function(){S.hide(),S[k.showMethod]({duration:k.showDuration,easing:k.showEasing,complete:k.onShown}),k.timeOut>0&&(C=setTimeout(h,k.timeOut),A.maxHideTime=parseFloat(k.timeOut),A.hideEta=(new Date).getTime()+A.maxHideTime,k.progressBar&&(A.intervalId=setInterval(x,10)))}(),function(){k.closeOnHover&&S.hover(y,f),!k.onclick&&k.tapToDismiss&&S.click(h),k.closeButton&&E&&E.click(function(t){t.stopPropagation?t.stopPropagation():void 0!==t.cancelBubble&&!0!==t.cancelBubble&&(t.cancelBubble=!0),k.onCloseClick&&k.onCloseClick(t),h(!0)}),k.onclick&&S.click(function(t){k.onclick(t),h()})}(),p(O),k.debug&&console&&console.log(O),S}}function m(){return t.extend({},h(),k.options)}function g(t){v||(v=i()),t.is(":visible")||(t.remove(),t=null,0===v.children().length&&(v.remove(),b=void 0))}var v,y,b,w=0,x={error:"error",info:"info",success:"success",warning:"warning"},k={clear:r,remove:l,error:e,getContainer:i,info:n,options:{},subscribe:o,success:a,version:"2.1.4",warning:s};return k}()})}("function"==typeof define&&define.amd?define:function(t,e){"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):window.toastr=e(window.jQuery)}),define("fast",["jquery","bootstrap","toastr","layer","lang"],function(t,e,i,n,o){var a={config:{toastr:{closeButton:!0,debug:!1,newestOnTop:!1,progressBar:!1,positionClass:"toast-top-center",preventDuplicates:!1,onclick:null,showDuration:"300",hideDuration:"1000",timeOut:"5000",extendedTimeOut:"1000",showEasing:"swing",hideEasing:"linear",showMethod:"fadeIn",hideMethod:"fadeOut"}},events:{onAjaxSuccess:function(t,e){var n=void 0!==t.data?t.data:null,o=void 0!==t.msg&&t.msg?t.msg:__("Operation completed");if("function"==typeof e){if(!1===e.call(this,n,t))return}i.success(o)},onAjaxError:function(t,e){var n=void 0!==t.data?t.data:null;if("function"==typeof e){if(!1===e.call(this,n,t))return}i.error(t.msg)},onAjaxResponse:function(e){try{var i="object"==typeof e?e:JSON.parse(e);i.hasOwnProperty("code")||t.extend(i,{code:-2,msg:e,data:null})}catch(t){var i={code:-1,msg:t.message,data:null}}return i}},api:{ajax:function(e,i,o){e="string"==typeof e?{url:e}:e;var s;return(void 0===e.loading||e.loading)&&(s=n.load(e.loading||0)),e=t.extend({type:"POST",dataType:"json",xhrFields:{withCredentials:!0},success:function(t){s&&n.close(s),t=a.events.onAjaxResponse(t),1===t.code?a.events.onAjaxSuccess(t,i):a.events.onAjaxError(t,o)},error:function(t){s&&n.close(s);var e={code:t.status,msg:t.statusText,data:null};a.events.onAjaxError(e,o)}},e),t.ajax(e)},fixurl:function(t){if("/"!==t.substr(0,1)){new RegExp("^(?:[a-z]+:)?//","i").test(t)||(t=Config.moduleurl+"/"+t)}else"/addons/"===t.substr(0,8)&&(t=Config.__PUBLIC__.replace(/(\/*$)/g,"")+t);return t},cdnurl:function(t,e){var i=new RegExp("^((?:[a-z]+:)?\\/\\/|data:image\\/)","i"),n=Config.upload.cdnurl;return void 0!==e&&!0!==e&&0!==n.indexOf("/")||(t=i.test(t)||n&&0===t.indexOf(n)?t:n+t),e&&!i.test(t)&&(e="string"==typeof e?e:location.origin,t=e+t),t},query:function(t,e){if(e||(e=window.location.href),!t)return"";t=t.replace(/[\[\]]/g,"\\$&");var i=new RegExp("[?&/]"+t+"([=/]([^/?]*)|&|#|$)"),n=i.exec(e);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},open:function(i,o,s){o=s&&s.title?s.title:o||"",i=a.api.fixurl(i),i=i+(i.indexOf("?")>-1?"&":"?")+"dialog=1";var r=a.config.openArea!=e?a.config.openArea:[t(window).width()>800?"800px":"95%",t(window).height()>600?"600px":"95%"],l=s&&"function"==typeof s.success?s.success:t.noop;return s&&"function"==typeof s.success&&delete s.success,s=t.extend({type:2,title:o,shadeClose:!0,shade:!1,maxmin:!0,moveOut:!0,area:r,content:i,zIndex:n.zIndex,success:function(e,i){var o=this;t(e).data("callback",o.callback),n.setTop(e);try{var s=n.getChildFrame("html",i),r=s.find(".layer-footer");if(a.api.layerfooter(e,i,o),r.length>0){var c=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(c){var d=r[0],u=new c(function(t){a.api.layerfooter(e,i,o),t.forEach(function(t){})}),h={attributes:!0,childList:!0,characterData:!0,subtree:!0};u.observe(d,h)}}}catch(t){}t(e).height()>t(window).height()&&n.style(i,{top:0,height:t(window).height()}),l.call(this,e,i)}},s||{}),(t(window).width()<480||/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&top.$(".tab-pane.active").length>0)&&(top.$(".tab-pane.active").length>0?(s.area=[top.$(".tab-pane.active").width()+"px",top.$(".tab-pane.active").height()+"px"],s.offset=[top.$(".tab-pane.active").scrollTop()+"px","0px"]):(s.area=[t(window).width()+"px",t(window).height()+"px"],s.offset=["0px","0px"])),n.open(s)},close:function(t){var i=parent.Layer.getFrameIndex(window.name),n=parent.$("#layui-layer"+i).data("callback");parent.Layer.close(i),"function"==typeof n&&n.call(e,t)},layerfooter:function(e,i,o){var a=n.getChildFrame("html",i),s=a.find(".layer-footer");if(s.length>0){t(".layui-layer-footer",e).remove();var r=t("
").addClass("layui-layer-btn layui-layer-footer");r.html(s.html()),0===t(".row",r).length&&t(">",r).wrapAll("
"),r.insertAfter(e.find(".layui-layer-content")),r.on("click",".btn",function(){if(!t(this).hasClass("disabled")&&!t(this).parent().hasClass("disabled")){var e=r.find(".btn").index(this);t(".btn:eq("+e+")",s).trigger("click")}});var l=e.find(".layui-layer-title").outerHeight()||0,c=e.find(".layui-layer-btn").outerHeight()||0;t("iframe",e).height(e.height()-l-c)}if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream){var l=e.find(".layui-layer-title").outerHeight()||0,c=e.find(".layui-layer-btn").outerHeight()||0;t("iframe",e).parent().css("height",e.height()-l-c),t("iframe",e).css("height","100%")}},success:function(e,i){var o="function"==typeof e;return o&&(i=e),n.msg(__("Operation completed"),t.extend({offset:0,icon:1},o?{}:e),i)},error:function(e,i){var o="function"==typeof e;return o&&(i=e),n.msg(__("Operation failed"),t.extend({offset:0,icon:2},o?{}:e),i)},msg:function(t,e){var i="function"==typeof e?e:function(){void 0!==e&&e&&(location.href=e)};n.msg(t,{time:2e3},i)},escape:function(t){return"string"==typeof t?t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):t},toastr:i,layer:n},lang:function(){var t=arguments,e=t[0],i=1;if(e=e.toLowerCase(),void 0!==o&&void 0!==o[e]){if("object"==typeof o[e])return o[e];e=o[e]}else if(e.indexOf("."),1)e=t[0];else{for(var n=e.split("."),a=o[n[0]],i=1;i0){var i=0;t(".layui-layer").each(function(){i=Math.max(i,parseInt(t(this).attr("times")))}),i&&n.close(i)}}),i.options=a.config.toastr}};return window.Layer=n,window.Toastr=i,window.__=a.lang,window.Fast=a,a.init(),a}),function(){function t(t){return t.replace(b,"").replace(w,",").replace(x,"").replace(k,"").replace(_,"").split(C)}function e(t){return"'"+t.replace(/('|\\)/g,"\\$1").replace(/\r/g,"\\r").replace(/\n/g,"\\n")+"'"}function i(i,n){function o(t){return h+=t.split(/\n/).length-1,d&&(t=t.replace(/\s+/g," ").replace(//g,"")),t&&(t=y[1]+e(t)+y[2]+"\n"),t}function a(e){var i=h;if(c?e=c(e,n):s&&(e=e.replace(/\n/g,function(){return"$line="+ ++h+";"})),0===e.indexOf("=")){var o=u&&!/^=[=#]/.test(e);if(e=e.replace(/^=[=#]?|[\s;]*$/g,""),o){var a=e.replace(/\s*\([^\)]+\)/,"");p[a]||/^(include|print)$/.test(a)||(e="$escape("+e+")")}else e="$string("+e+")";e=y[1]+e+y[2]}return s&&(e="$line="+i+";"+e),v(t(e),function(t){if(t&&!m[t]){var e;e="print"===t?w:"include"===t?x:p[t]?"$utils."+t:f[t]?"$helpers."+t:"$data."+t,k+=t+"="+e+",",m[t]=!0}}),e+"\n"}var s=n.debug,r=n.openTag,l=n.closeTag,c=n.parser,d=n.compress,u=n.escape,h=1,m={$data:1,$filename:1,$utils:1,$helpers:1,$out:1,$line:1},g="".trim,y=g?["$out='';","$out+=",";","$out"]:["$out=[];","$out.push(",");","$out.join('')"],b=g?"$out+=text;return $out;":"$out.push(text);",w="function(){var text=''.concat.apply('',arguments);"+b+"}",x="function(filename,data){data=data||$data;var text=$utils.$include(filename,data,$filename);"+b+"}",k="'use strict';var $utils=this,$helpers=$utils.$helpers,"+(s?"$line=0,":""),_=y[0],C="return new String("+y[3]+");";v(i.split(r),function(t){t=t.split(l);var e=t[0],i=t[1];1===t.length?_+=o(e):(_+=a(e),i&&(_+=o(i)))});var S=k+_+C;s&&(S="try{"+S+"}catch(e){throw {filename:$filename,name:'Render Error',message:e.message,line:$line,source:"+e(i)+".split(/\\n/)[$line-1].replace(/^\\s+/,'')};}");try{var T=new Function("$data","$filename",S);return T.prototype=p,T}catch(t){throw t.temp="function anonymous($data,$filename) {"+S+"}",t}}var n=function(t,e){return"string"==typeof e?g(e,{filename:t}):s(t,e)};n.version="3.0.0",n.config=function(t,e){o[t]=e};var o=n.defaults={openTag:"<%",closeTag:"%>",escape:!0,cache:!0,compress:!1,parser:null},a=n.cache={};n.render=function(t,e){return g(t)(e)};var s=n.renderFile=function(t,e){var i=n.get(t)||m({filename:t,name:"Render Error",message:"Template not found"});return e?i(e):i};n.get=function(t){var e;if(a[t])e=a[t];else if("object"==typeof document){var i=document.getElementById(t);if(i){var n=(i.value||i.innerHTML).replace(/^\s*|\s*$/g,"");e=g(n,{filename:t})}}return e};var r=function(t,e){return"string"!=typeof t&&(e=typeof t,"number"===e?t+="":t="function"===e?r(t.call(t)):""),t},l={"<":"<",">":">",'"':""","'":"'","&":"&"},c=function(t){return l[t]},d=function(t){return r(t).replace(/&(?![\w#]+;)|[<>"']/g,c)},u=Array.isArray||function(t){return"[object Array]"==={}.toString.call(t)},h=function(t,e){var i,n;if(u(t))for(i=0,n=t.length;i\n"+t[i]+"\n\n";"object"==typeof console&&console.error(e)};var m=function(t){return n.onerror(t),function(){return"{Template Error}"}},g=n.compile=function(t,e){function n(i){try{return new l(i,r)+""}catch(n){return e.debug?m(n)():(e.debug=!0,g(t,e)(i))}}e=e||{};for(var s in o)void 0===e[s]&&(e[s]=o[s]);var r=e.filename;try{var l=i(t,e)}catch(t){return t.filename=r||"anonymous",t.name="Syntax Error",m(t)}return n.prototype=l.prototype,n.toString=function(){return l.toString()},r&&e.cache&&(a[r]=n),n},v=p.$each,y="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,undefined",b=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|\s*\.\s*[$\w\.]+/g,w=/[^\w$]+/g,x=new RegExp(["\\b"+y.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),k=/^\d[^,]*|,\d[^,]*/g,_=/^,+|,+$/g,C=/^$|,+/;"object"==typeof exports&&"undefined"!=typeof module?module.exports=n:"function"==typeof define?define("template",[],function(){return n}):this.template=n}(),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("moment/moment",e):t.moment=e()}(this,function(){"use strict";function t(){return Kn.apply(null,arguments)}function e(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function i(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function o(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(n(t,e))return!1;return!0}function a(t){return void 0===t}function s(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function r(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var i,n=[],o=t.length;for(i=0;i0)for(i=0;i=0?i?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}function D(t,e,i,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),t&&(lo[t]=o),e&&(lo[e[0]]=function(){return T(o.apply(this,arguments),e[1],e[2])}),i&&(lo[i]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function $(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function E(t){var e,i,n=t.match(ao);for(e=0,i=n.length;e=0&&so.test(t);)t=t.replace(so,i),so.lastIndex=0,n-=1;return t}function F(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.match(ao).map(function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t}).join(""),this._longDateFormat[t])}function M(){return this._invalidDate}function P(t){return this._ordinal.replace("%d",t)}function L(t,e,i,n){var o=this._relativeTime[i];return x(o)?o(t,e,i,n):o.replace(/%d/i,t)}function I(t,e){var i=this._relativeTime[t>0?"future":"past"];return x(i)?i(e):i.replace(/%s/i,e)}function N(t){return"string"==typeof t?po[t]||po[t.toLowerCase()]:void 0}function R(t){var e,i,o={};for(i in t)n(t,i)&&(e=N(i))&&(o[e]=t[i]);return o}function j(t){var e,i=[];for(e in t)n(t,e)&&i.push({unit:e,priority:fo[e]});return i.sort(function(t,e){return t.priority-e.priority}),i}function Y(t,e,i){no[t]=x(e)?e:function(t,n){return t&&i?i:e}}function H(t,e){return n(no,t)?no[t](e._strict,e._locale):new RegExp(z(t))}function z(t){return B(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,o){return e||i||n||o}))}function B(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function U(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function W(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=U(e)),i}function q(t,e){var i,n,o=e;for("string"==typeof t&&(t=[t]),s(e)&&(o=function(t,i){i[e]=W(t)}),n=t.length,i=0;i=0?(r=new Date(t+400,e,i,n,o,a,s),isFinite(r.getFullYear())&&r.setFullYear(t)):r=new Date(t,e,i,n,o,a,s),r}function gt(t){var e,i;return t<100&&t>=0?(i=Array.prototype.slice.call(arguments),i[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function vt(t,e,i){var n=7+e-i;return-(7+gt(t,0,n).getUTCDay()-e)%7+n-1}function yt(t,e,i,n,o){var a,s,r=(7+i-n)%7,l=vt(t,n,o),c=1+7*(e-1)+r+l;return c<=0?(a=t-1,s=Q(a)+c):c>Q(t)?(a=t+1,s=c-Q(t)):(a=t,s=c),{year:a,dayOfYear:s}}function bt(t,e,i){var n,o,a=vt(t.year(),e,i),s=Math.floor((t.dayOfYear()-a-1)/7)+1;return s<1?(o=t.year()-1,n=s+wt(o,e,i)):s>wt(t.year(),e,i)?(n=s-wt(t.year(),e,i),o=t.year()+1):(o=t.year(),n=s),{week:n,year:o}}function wt(t,e,i){var n=vt(t,e,i),o=vt(t+1,e,i);return(Q(t)-n+o)/7}function xt(t){return bt(t,this._week.dow,this._week.doy).week}function kt(){return this._week.dow}function _t(){return this._week.doy}function Ct(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function St(t){var e=bt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Tt(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Dt(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function $t(t,e){return t.slice(e,7).concat(t.slice(0,e))}function Et(t,i){var n=e(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(i)?"format":"standalone"];return!0===t?$t(n,this._week.dow):t?n[t.day()]:n}function At(t){return!0===t?$t(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Ot(t){return!0===t?$t(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Ft(t,e,i){var n,o,a,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=d([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return i?"dddd"===e?(o=Uo.call(this._weekdaysParse,s),-1!==o?o:null):"ddd"===e?(o=Uo.call(this._shortWeekdaysParse,s),-1!==o?o:null):(o=Uo.call(this._minWeekdaysParse,s),-1!==o?o:null):"dddd"===e?-1!==(o=Uo.call(this._weekdaysParse,s))?o:-1!==(o=Uo.call(this._shortWeekdaysParse,s))?o:(o=Uo.call(this._minWeekdaysParse,s),-1!==o?o:null):"ddd"===e?-1!==(o=Uo.call(this._shortWeekdaysParse,s))?o:-1!==(o=Uo.call(this._weekdaysParse,s))?o:(o=Uo.call(this._minWeekdaysParse,s),-1!==o?o:null):-1!==(o=Uo.call(this._minWeekdaysParse,s))?o:-1!==(o=Uo.call(this._weekdaysParse,s))?o:(o=Uo.call(this._shortWeekdaysParse,s),-1!==o?o:null)}function Mt(t,e,i){var n,o,a;if(this._weekdaysParseExact)return Ft.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=d([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}}function Pt(t){if(!this.isValid())return null!=t?this:NaN;var e=J(this,"Day");return null!=t?(t=Tt(t,this.localeData()),this.add(t-e,"d")):e}function Lt(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function It(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Dt(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Nt(t){return this._weekdaysParseExact?(n(this,"_weekdaysRegex")||Yt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(n(this,"_weekdaysRegex")||(this._weekdaysRegex=ea),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Rt(t){return this._weekdaysParseExact?(n(this,"_weekdaysRegex")||Yt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(n(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ia),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function jt(t){return this._weekdaysParseExact?(n(this,"_weekdaysRegex")||Yt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(n(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=na),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Yt(){function t(t,e){return e.length-t.length}var e,i,n,o,a,s=[],r=[],l=[],c=[];for(e=0;e<7;e++)i=d([2e3,1]).day(e),n=B(this.weekdaysMin(i,"")),o=B(this.weekdaysShort(i,"")),a=B(this.weekdays(i,"")),s.push(n),r.push(o),l.push(a),c.push(n),c.push(o),c.push(a);s.sort(t),r.sort(t),l.sort(t),c.sort(t),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ht(){return this.hours()%12||12}function zt(){return this.hours()||24}function Bt(t,e){D(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Ut(t,e){return e._meridiemParse}function Wt(t){return"p"===(t+"").toLowerCase().charAt(0)}function qt(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function Vt(t,e){var i,n=Math.min(t.length,e.length);for(i=0;i0;){if(n=Kt(o.slice(0,e).join("-")))return n;if(i&&i.length>=e&&Vt(o,i)>=e-1)break;e--}a++}return oa}function Qt(t){return!(!t||!t.match("^[^/\\\\]*$"))}function Kt(t){var e,i=null;if(void 0===la[t]&&"undefined"!=typeof module&&module&&module.exports&&Qt(t))try{i=oa._abbr,e=require,e("./locale/"+t),Zt(i)}catch(e){la[t]=null}return la[t]}function Zt(t,e){var i;return t&&(i=a(e)?ee(t):Jt(t,e),i?oa=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),oa._abbr}function Jt(t,e){if(null!==e){var i,n=ra;if(e.abbr=t,null!=la[t])w("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=la[t]._config;else if(null!=e.parentLocale)if(null!=la[e.parentLocale])n=la[e.parentLocale]._config;else{if(null==(i=Kt(e.parentLocale)))return ca[e.parentLocale]||(ca[e.parentLocale]=[]),ca[e.parentLocale].push({name:t,config:e}),null;n=i._config}return la[t]=new C(_(n,e)),ca[t]&&ca[t].forEach(function(t){Jt(t.name,t.config)}),Zt(t),la[t]}return delete la[t],null}function te(t,e){if(null!=e){var i,n,o=ra;null!=la[t]&&null!=la[t].parentLocale?la[t].set(_(la[t]._config,e)):(n=Kt(t),null!=n&&(o=n._config),e=_(o,e),null==n&&(e.abbr=t),i=new C(e),i.parentLocale=la[t],la[t]=i),Zt(t)}else null!=la[t]&&(null!=la[t].parentLocale?(la[t]=la[t].parentLocale,t===Zt()&&Zt(t)):null!=la[t]&&delete la[t]);return la[t]}function ee(t){var i;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return oa;if(!e(t)){if(i=Kt(t))return i;t=[t]}return Xt(t)}function ie(){return io(la)}function ne(t){var e,i=t._a;return i&&-2===h(t).overflow&&(e=i[Io]<0||i[Io]>11?Io:i[No]<1||i[No]>ot(i[Lo],i[Io])?No:i[Ro]<0||i[Ro]>24||24===i[Ro]&&(0!==i[jo]||0!==i[Yo]||0!==i[Ho])?Ro:i[jo]<0||i[jo]>59?jo:i[Yo]<0||i[Yo]>59?Yo:i[Ho]<0||i[Ho]>999?Ho:-1,h(t)._overflowDayOfYear&&(eNo)&&(e=No),h(t)._overflowWeeks&&-1===e&&(e=zo),h(t)._overflowWeekday&&-1===e&&(e=Bo),h(t).overflow=e),t}function oe(t){var e,i,n,o,a,s,r=t._i,l=da.exec(r)||ua.exec(r),c=pa.length,d=fa.length;if(l){for(h(t).iso=!0,e=0,i=c;eQ(a)||0===t._dayOfYear)&&(h(t)._overflowDayOfYear=!0),i=gt(a,0,t._dayOfYear),t._a[Io]=i.getUTCMonth(),t._a[No]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=n[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Ro]&&0===t._a[jo]&&0===t._a[Yo]&&0===t._a[Ho]&&(t._nextDay=!0,t._a[Ro]=0),t._d=(t._useUTC?gt:mt).apply(null,s),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Ro]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(h(t).weekdayMismatch=!0)}}function me(t){var e,i,n,o,a,s,r,l,c;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(a=1,s=4,i=he(e.GG,t._a[Lo],bt(Ce(),1,4).year),n=he(e.W,1),((o=he(e.E,1))<1||o>7)&&(l=!0)):(a=t._locale._week.dow,s=t._locale._week.doy,c=bt(Ce(),a,s),i=he(e.gg,t._a[Lo],c.year),n=he(e.w,c.week),null!=e.d?((o=e.d)<0||o>6)&&(l=!0):null!=e.e?(o=e.e+a,(e.e<0||e.e>6)&&(l=!0)):o=a),n<1||n>wt(i,a,s)?h(t)._overflowWeeks=!0:null!=l?h(t)._overflowWeekday=!0:(r=yt(i,n,o,a,s),t._a[Lo]=r.year,t._dayOfYear=r.dayOfYear)}function ge(e){if(e._f===t.ISO_8601)return void oe(e);if(e._f===t.RFC_2822)return void de(e);e._a=[],h(e).empty=!0;var i,n,o,a,s,r,l,c=""+e._i,d=c.length,u=0;for(o=O(e._f,e._locale).match(ao)||[],l=o.length,i=0;i0&&h(e).unusedInput.push(s),c=c.slice(c.indexOf(n)+n.length),u+=n.length),lo[a]?(n?h(e).empty=!1:h(e).unusedTokens.push(a),G(a,n,e)):e._strict&&!n&&h(e).unusedTokens.push(a);h(e).charsLeftOver=d-u,c.length>0&&h(e).unusedInput.push(c),e._a[Ro]<=12&&!0===h(e).bigHour&&e._a[Ro]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[Ro]=ve(e._locale,e._a[Ro],e._meridiem),r=h(e).era,null!==r&&(e._a[Lo]=e._locale.erasConvertYear(r,e._a[Lo])),fe(e),ne(e)}function ve(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(n=t.isPM(i),n&&e<12&&(e+=12),n||12!==e||(e=0),e):e}function ye(t){var e,i,n,o,a,s,r=!1,l=t._f.length;if(0===l)return h(t).invalidFormat=!0,void(t._d=new Date(NaN));for(o=0;othis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function qe(){if(!a(this._isDSTShifted))return this._isDSTShifted;var t,e={};return m(e,this),e=xe(e),e._a?(t=e._isUTC?d(e._a):Ce(e._a),this._isDSTShifted=this.isValid()&&Pe(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Ve(){return!!this.isValid()&&!this._isUTC}function Ge(){return!!this.isValid()&&this._isUTC}function Xe(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Qe(t,e){var i,o,a,r=t,l=null;return Fe(t)?r={ms:t._milliseconds,d:t._days,M:t._months}:s(t)||!isNaN(+t)?(r={},e?r[e]=+t:r.milliseconds=+t):(l=_a.exec(t))?(i="-"===l[1]?-1:1,r={y:0,d:W(l[No])*i,h:W(l[Ro])*i,m:W(l[jo])*i,s:W(l[Yo])*i,ms:W(Me(1e3*l[Ho]))*i}):(l=Ca.exec(t))?(i="-"===l[1]?-1:1,r={y:Ke(l[2],i),M:Ke(l[3],i),w:Ke(l[4],i),d:Ke(l[5],i),h:Ke(l[6],i),m:Ke(l[7],i),s:Ke(l[8],i)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(a=Je(Ce(r.from),Ce(r.to)),r={},r.ms=a.milliseconds,r.M=a.months),o=new Oe(r),Fe(t)&&n(t,"_locale")&&(o._locale=t._locale),Fe(t)&&n(t,"_isValid")&&(o._isValid=t._isValid),o}function Ke(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function Ze(t,e){var i={};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Je(t,e){var i;return t.isValid()&&e.isValid()?(e=Ne(e,t),t.isBefore(e)?i=Ze(t,e):(i=Ze(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function ti(t,e){return function(i,n){var o,a;return null===n||isNaN(+n)||(w(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=i,i=n,n=a),o=Qe(i,n),ei(this,o,t),this}}function ei(e,i,n,o){var a=i._milliseconds,s=Me(i._days),r=Me(i._months);e.isValid()&&(o=null==o||o,r&&ct(e,J(e,"Month")+r*n),s&&tt(e,"Date",J(e,"Date")+s*n),a&&e._d.setTime(e._d.valueOf()+a*n),o&&t.updateOffset(e,s||r))}function ii(t){return"string"==typeof t||t instanceof String}function ni(t){return v(t)||r(t)||ii(t)||s(t)||ai(t)||oi(t)||null===t||void 0===t}function oi(t){var e,a,s=i(t)&&!o(t),r=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=l.length;for(e=0;ei.valueOf():i.valueOf()9999?A(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",A(i,"Z")):A(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wi(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,i,n,o="moment",a="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),t="["+o+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",n=a+'[")]',this.format(t+e+i+n)}function xi(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var i=A(this,e);return this.localeData().postformat(i)}function ki(t,e){return this.isValid()&&(v(t)&&t.isValid()||Ce(t).isValid())?Qe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function _i(t){return this.from(Ce(),t)}function Ci(t,e){return this.isValid()&&(v(t)&&t.isValid()||Ce(t).isValid())?Qe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Si(t){return this.to(Ce(),t)}function Ti(t){var e;return void 0===t?this._locale._abbr:(e=ee(t),null!=e&&(this._locale=e),this)}function Di(){return this._locale}function $i(t,e){return(t%e+e)%e}function Ei(t,e,i){return t<100&&t>=0?new Date(t+400,e,i)-Oa:new Date(t,e,i).valueOf()}function Ai(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-Oa:Date.UTC(t,e,i)}function Oi(e){var i,n;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?Ai:Ei,e){case"year":i=n(this.year(),0,1);break;case"quarter":i=n(this.year(),this.month()-this.month()%3,1);break;case"month":i=n(this.year(),this.month(),1);break;case"week":i=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":i=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":i=n(this.year(),this.month(),this.date());break;case"hour":i=this._d.valueOf(),i-=$i(i+(this._isUTC?0:this.utcOffset()*Ea),Aa);break;case"minute":i=this._d.valueOf(),i-=$i(i,Ea);break;case"second":i=this._d.valueOf(),i-=$i(i,$a)}return this._d.setTime(i),t.updateOffset(this,!0),this}function Fi(e){var i,n;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?Ai:Ei,e){case"year":i=n(this.year()+1,0,1)-1;break;case"quarter":i=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":i=n(this.year(),this.month()+1,1)-1;break;case"week":i=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":i=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":i=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":i=this._d.valueOf(),i+=Aa-$i(i+(this._isUTC?0:this.utcOffset()*Ea),Aa)-1;break;case"minute":i=this._d.valueOf(),i+=Ea-$i(i,Ea)-1;break;case"second":i=this._d.valueOf(),i+=$a-$i(i,$a)-1}return this._d.setTime(i),t.updateOffset(this,!0),this}function Mi(){return this._d.valueOf()-6e4*(this._offset||0)}function Pi(){return Math.floor(this.valueOf()/1e3)}function Li(){return new Date(this.valueOf())}function Ii(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Ni(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Ri(){return this.isValid()?this.toISOString():null}function ji(){return p(this)}function Yi(){return c({},h(this))}function Hi(){return h(this).overflow}function zi(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Bi(e,i){var n,o,a,s=this._eras||ee("en")._eras;for(n=0,o=s.length;n=0)return l[n]}function Wi(e,i){var n=e.since<=e.until?1:-1;return void 0===i?t(e.since).year():t(e.since).year()+(i-e.offset)*n}function qi(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;ta&&(e=a),pn.call(this,t,e,i,n,o))}function pn(t,e,i,n,o){var a=yt(t,e,i,n,o),s=gt(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function fn(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function mn(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function gn(t,e){e[Ho]=W(1e3*("0."+t))}function vn(){return this._isUTC?"UTC":""}function yn(){return this._isUTC?"Coordinated Universal Time":""}function bn(t){return Ce(1e3*t)}function wn(){return Ce.apply(null,arguments).parseZone()}function xn(t){return t}function kn(t,e,i,n){var o=ee(),a=d().set(n,e);return o[i](a,t)}function _n(t,e,i){if(s(t)&&(e=t,t=void 0),t=t||"",null!=e)return kn(t,e,i,"month");var n,o=[];for(n=0;n<12;n++)o[n]=kn(t,n,i,"month");return o}function Cn(t,e,i,n){"boolean"==typeof t?(s(e)&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,s(e)&&(i=e,e=void 0),e=e||"");var o,a=ee(),r=t?a._week.dow:0,l=[];if(null!=i)return kn(e,(i+r)%7,n,"day");for(o=0;o<7;o++)l[o]=kn(e,(o+r)%7,n,"day");return l}function Sn(t,e){return _n(t,e,"months")}function Tn(t,e){return _n(t,e,"monthsShort")}function Dn(t,e,i){return Cn(t,e,i,"weekdays")}function $n(t,e,i){return Cn(t,e,i,"weekdaysShort")}function En(t,e,i){return Cn(t,e,i,"weekdaysMin")}function An(){var t=this._data;return this._milliseconds=ja(this._milliseconds),this._days=ja(this._days),this._months=ja(this._months),t.milliseconds=ja(t.milliseconds),t.seconds=ja(t.seconds),t.minutes=ja(t.minutes),t.hours=ja(t.hours),t.months=ja(t.months),t.years=ja(t.years),this}function On(t,e,i,n){var o=Qe(e,i);return t._milliseconds+=n*o._milliseconds,t._days+=n*o._days,t._months+=n*o._months,t._bubble()}function Fn(t,e){return On(this,t,e,1)}function Mn(t,e){return On(this,t,e,-1)}function Pn(t){return t<0?Math.floor(t):Math.ceil(t)}function Ln(){var t,e,i,n,o,a=this._milliseconds,s=this._days,r=this._months,l=this._data;return a>=0&&s>=0&&r>=0||a<=0&&s<=0&&r<=0||(a+=864e5*Pn(Nn(r)+s),s=0,r=0),l.milliseconds=a%1e3,t=U(a/1e3),l.seconds=t%60,e=U(t/60),l.minutes=e%60,i=U(e/60),l.hours=i%24,s+=U(i/24),o=U(In(s)),r+=o,s-=Pn(Nn(o)),n=U(r/12),r%=12,l.days=s,l.months=r,l.years=n,this}function In(t){return 4800*t/146097}function Nn(t){return 146097*t/4800}function Rn(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=N(t))||"quarter"===t||"year"===t)switch(e=this._days+n/864e5,i=this._months+In(e),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(Nn(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}}function jn(t){return function(){return this.as(t)}}function Yn(){return Qe(this)}function Hn(t){return t=N(t),this.isValid()?this[t+"s"]():NaN}function zn(t){return function(){return this.isValid()?this._data[t]:NaN}}function Bn(){return U(this.days()/7)}function Un(t,e,i,n,o){return o.relativeTime(e||1,!!i,t,n)}function Wn(t,e,i,n){var o=Qe(t).abs(),a=ns(o.as("s")),s=ns(o.as("m")),r=ns(o.as("h")),l=ns(o.as("d")),c=ns(o.as("M")),d=ns(o.as("w")),u=ns(o.as("y")),h=a<=i.ss&&["s",a]||a0,h[4]=n,Un.apply(null,h)}function qn(t){return void 0===t?ns:"function"==typeof t&&(ns=t,!0)}function Vn(t,e){return void 0!==os[t]&&(void 0===e?os[t]:(os[t]=e,"s"===t&&(os.ss=e-1),!0))}function Gn(t,e){if(!this.isValid())return this.localeData().invalidDate();var i,n,o=!1,a=os;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(o=t),"object"==typeof e&&(a=Object.assign({},os,e),null!=e.s&&null==e.ss&&(a.ss=e.s-1)),i=this.localeData(),n=Wn(this,!o,a,i),o&&(n=i.pastFuture(+this,n)),i.postformat(n)}function Xn(t){return(t>0)-(t<0)||+t}function Qn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,n,o,a,s,r,l=as(this._milliseconds)/1e3,c=as(this._days),d=as(this._months),u=this.asSeconds();return u?(t=U(l/60),e=U(t/60),l%=60,t%=60,i=U(d/12),d%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=u<0?"-":"",a=Xn(this._months)!==Xn(u)?"-":"",s=Xn(this._days)!==Xn(u)?"-":"",r=Xn(this._milliseconds)!==Xn(u)?"-":"",o+"P"+(i?a+i+"Y":"")+(d?a+d+"M":"")+(c?s+c+"D":"")+(e||t||l?"T":"")+(e?r+e+"H":"")+(t?r+t+"M":"")+(l?r+n+"S":"")):"P0D"}var Kn,Zn;Zn=Array.prototype.some?Array.prototype.some:function(t){var e,i=Object(this),n=i.length>>>0;for(e=0;e68?1900:2e3)};var Uo,Wo=Z("FullYear",!0);Uo=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;ethis?this:t:f()}),wa=function(){return Date.now?Date.now():+new Date},xa=["year","quarter","month","week","day","hour","minute","second","millisecond"];Le("Z",":"),Le("ZZ",""),Y("Z",Eo),Y("ZZ",Eo),q(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Ie(Eo,t)});var ka=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var _a=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ca=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Qe.fn=Oe.prototype,Qe.invalid=Ae;var Sa=ti(1,"add"),Ta=ti(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Da=b("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)}),$a=1e3,Ea=60*$a,Aa=60*Ea,Oa=3506328*Aa;D("N",0,0,"eraAbbr"),D("NN",0,0,"eraAbbr"),D("NNN",0,0,"eraAbbr"),D("NNNN",0,0,"eraName"),D("NNNNN",0,0,"eraNarrow"),D("y",["y",1],"yo","eraYear"),D("y",["yy",2],0,"eraYear"),D("y",["yyy",3],0,"eraYear"),D("y",["yyyy",4],0,"eraYear"),Y("N",Ji),Y("NN",Ji),Y("NNN",Ji),Y("NNNN",tn),Y("NNNNN",en),q(["N","NN","NNN","NNNN","NNNNN"],function(t,e,i,n){var o=i._locale.erasParse(t,n,i._strict);o?h(i).era=o:h(i).invalidEra=t}),Y("y",To),Y("yy",To),Y("yyy",To),Y("yyyy",To),Y("yo",nn),q(["y","yy","yyy","yyyy"],Lo),q(["yo"],function(t,e,i,n){var o;i._locale._eraYearOrdinalRegex&&(o=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?e[Lo]=i._locale.eraYearOrdinalParse(t,o):e[Lo]=parseInt(t,10)}),D(0,["gg",2],0,function(){return this.weekYear()%100}),D(0,["GG",2],0,function(){return this.isoWeekYear()%100}),an("gggg","weekYear"),an("ggggg","weekYear"),an("GGGG","isoWeekYear"),an("GGGGG","isoWeekYear"),Y("G",Do),Y("g",Do),Y("GG",wo,go),Y("gg",wo,go),Y("GGGG",Co,yo),Y("gggg",Co,yo),Y("GGGGG",So,bo),Y("ggggg",So,bo),V(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=W(t)}),V(["gg","GG"],function(e,i,n,o){i[o]=t.parseTwoDigitYear(e)}),D("Q",0,"Qo","quarter"),Y("Q",mo),q("Q",function(t,e){e[Io]=3*(W(t)-1)}),D("D",["DD",2],"Do","date"),Y("D",wo,Fo),Y("DD",wo,go),Y("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),q(["D","DD"],No),q("Do",function(t,e){e[No]=W(t.match(wo)[0])});var Fa=Z("Date",!0);D("DDD",["DDDD",3],"DDDo","dayOfYear"),Y("DDD",_o),Y("DDDD",vo),q(["DDD","DDDD"],function(t,e,i){i._dayOfYear=W(t)}),D("m",["mm",2],0,"minute"),Y("m",wo,Mo),Y("mm",wo,go),q(["m","mm"],jo);var Ma=Z("Minutes",!1);D("s",["ss",2],0,"second"),Y("s",wo,Mo),Y("ss",wo,go),q(["s","ss"],Yo);var Pa=Z("Seconds",!1);D("S",0,0,function(){return~~(this.millisecond()/100)}),D(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),D(0,["SSS",3],0,"millisecond"),D(0,["SSSS",4],0,function(){return 10*this.millisecond()}),D(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),D(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),D(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),D(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),D(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Y("S",_o,mo),Y("SS",_o,go),Y("SSS",_o,vo);var La,Ia;for(La="SSSS";La.length<=9;La+="S")Y(La,To);for(La="S";La.length<=9;La+="S")q(La,gn);Ia=Z("Milliseconds",!1),D("z",0,0,"zoneAbbr"),D("zz",0,0,"zoneName");var Na=g.prototype;Na.add=Sa,Na.calendar=li,Na.clone=ci,Na.diff=gi,Na.endOf=Fi,Na.format=xi,Na.from=ki,Na.fromNow=_i,Na.to=Ci,Na.toNow=Si,Na.get=et,Na.invalidAt=Hi,Na.isAfter=di,Na.isBefore=ui,Na.isBetween=hi,Na.isSame=pi,Na.isSameOrAfter=fi,Na.isSameOrBefore=mi,Na.isValid=ji,Na.lang=Da,Na.locale=Ti,Na.localeData=Di,Na.max=ba,Na.min=ya,Na.parsingFlags=Yi,Na.set=it,Na.startOf=Oi,Na.subtract=Ta,Na.toArray=Ii,Na.toObject=Ni,Na.toDate=Li,Na.toISOString=bi,Na.inspect=wi,"undefined"!=typeof Symbol&&null!=Symbol.for&&(Na[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Na.toJSON=Ri,Na.toString=yi,Na.unix=Pi,Na.valueOf=Mi,Na.creationData=zi,Na.eraName=qi,Na.eraNarrow=Vi,Na.eraAbbr=Gi,Na.eraYear=Xi,Na.year=Wo,Na.isLeapYear=K,Na.weekYear=sn,Na.isoWeekYear=rn,Na.quarter=Na.quarters=fn,Na.month=dt,Na.daysInMonth=ut,Na.week=Na.weeks=Ct,Na.isoWeek=Na.isoWeeks=St,Na.weeksInYear=dn,Na.weeksInWeekYear=un,Na.isoWeeksInYear=ln,Na.isoWeeksInISOWeekYear=cn,Na.date=Fa,Na.day=Na.days=Pt,Na.weekday=Lt,Na.isoWeekday=It,Na.dayOfYear=mn,Na.hour=Na.hours=sa,Na.minute=Na.minutes=Ma,Na.second=Na.seconds=Pa,Na.millisecond=Na.milliseconds=Ia,Na.utcOffset=je,Na.utc=He,Na.local=ze,Na.parseZone=Be,Na.hasAlignedHourOffset=Ue,Na.isDST=We,Na.isLocal=Ve,Na.isUtcOffset=Ge,Na.isUtc=Xe,Na.isUTC=Xe,Na.zoneAbbr=vn,Na.zoneName=yn,Na.dates=b("dates accessor is deprecated. Use date instead.",Fa),Na.months=b("months accessor is deprecated. Use month instead",dt),Na.years=b("years accessor is deprecated. Use year instead",Wo),Na.zone=b("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ye),Na.isDSTShifted=b("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",qe);var Ra=C.prototype;Ra.calendar=S,Ra.longDateFormat=F,Ra.invalidDate=M,Ra.ordinal=P,Ra.preparse=xn,Ra.postformat=xn,Ra.relativeTime=L,Ra.pastFuture=I,Ra.set=k,Ra.eras=Bi,Ra.erasParse=Ui,Ra.erasConvertYear=Wi,Ra.erasAbbrRegex=Ki,Ra.erasNameRegex=Qi,Ra.erasNarrowRegex=Zi,Ra.months=at,Ra.monthsShort=st,Ra.monthsParse=lt,Ra.monthsRegex=pt,Ra.monthsShortRegex=ht,Ra.week=xt,Ra.firstDayOfYear=_t,Ra.firstDayOfWeek=kt,Ra.weekdays=Et,Ra.weekdaysMin=Ot,Ra.weekdaysShort=At,Ra.weekdaysParse=Mt,Ra.weekdaysRegex=Nt,Ra.weekdaysShortRegex=Rt,Ra.weekdaysMinRegex=jt,Ra.isPM=Wt,Ra.meridiem=qt,Zt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===W(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),t.lang=b("moment.lang is deprecated. Use moment.locale instead.",Zt),t.langData=b("moment.langData is deprecated. Use moment.localeData instead.",ee);var ja=Math.abs,Ya=jn("ms"),Ha=jn("s"),za=jn("m"),Ba=jn("h"),Ua=jn("d"),Wa=jn("w"),qa=jn("M"),Va=jn("Q"),Ga=jn("y"),Xa=Ya,Qa=zn("milliseconds"),Ka=zn("seconds"),Za=zn("minutes"),Ja=zn("hours"),ts=zn("days"),es=zn("months"),is=zn("years"),ns=Math.round,os={ss:44,s:45,m:45,h:22,d:26,w:null,M:11},as=Math.abs,ss=Oe.prototype;return ss.isValid=Ee,ss.abs=An,ss.add=Fn,ss.subtract=Mn,ss.as=Rn,ss.asMilliseconds=Ya,ss.asSeconds=Ha,ss.asMinutes=za,ss.asHours=Ba,ss.asDays=Ua,ss.asWeeks=Wa,ss.asMonths=qa,ss.asQuarters=Va,ss.asYears=Ga,ss.valueOf=Xa,ss._bubble=Ln,ss.clone=Yn,ss.get=Hn,ss.milliseconds=Qa,ss.seconds=Ka,ss.minutes=Za,ss.hours=Ja,ss.days=ts,ss.weeks=Bn,ss.months=es,ss.years=is,ss.humanize=Gn,ss.toISOString=Qn,ss.toString=Qn,ss.toJSON=Qn,ss.locale=Ti,ss.localeData=Di,ss.toIsoString=b("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qn),ss.lang=Da,D("X",0,0,"unix"),D("x",0,0,"valueOf"),Y("x",Do),Y("X",Ao),q("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t))}),q("x",function(t,e,i){i._d=new Date(W(t))}),t.version="2.30.1",function(t){Kn=t}(Ce),t.fn=Na,t.min=Te,t.max=De,t.now=wa,t.utc=d,t.unix=bn,t.months=Sn,t.isDate=r,t.locale=Zt,t.invalid=f,t.duration=Qe,t.isMoment=v,t.weekdays=Dn,t.parseZone=wn,t.localeData=ee,t.isDuration=Fe,t.monthsShort=Tn,t.weekdaysMin=En,t.defineLocale=Jt,t.updateLocale=te,t.locales=ie,t.weekdaysShort=$n,t.normalizeUnits=N,t.relativeTimeRounding=qn,t.relativeTimeThreshold=Vn,t.calendarFormat=ri,t.prototype=Na,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t}),define("moment",["moment/moment"],function(t){return t}),define("backend",["fast","template","moment"],function(t,e,i){var n={api:{sidebar:function(e){colorArr=["red","green","yellow","blue","teal","orange","purple"],$colorNums=colorArr.length,badgeList={},$.each(e,function(e,i){$url=t.api.fixurl(e),$.isArray(i)?($nums=void 0!==i[0]?i[0]:0,$color=void 0!==i[1]?i[1]:colorArr[(isNaN($nums)?$nums.length:$nums)%$colorNums],$class=void 0!==i[2]?i[2]:"label"):($nums=i,$color=colorArr[(isNaN($nums)?$nums.length:$nums)%$colorNums],$class="label"),badgeList[$url]=$nums>0?''+$nums+" ":""}),$.each(badgeList,function(t,e){var i=top.window.$("li a[addtabs][url='"+t+"']");i&&(top.window.$(".pull-right-container",i).html(e),top.window.$(".nav-addtabs li a[node-id='"+i.attr("addtabs")+"'] .pull-right-container").html(e))})},addtabs:function(e,i,n){var o="a[url='{url}']",a=top.window.$(o.replace(/\{url\}/,e));if(a.length>0)a.trigger("click");else if(e=t.api.fixurl(e),a=top.window.$(o.replace(/\{url\}/,e)),a.length>0){var s=a.parent().hasClass("active")?"dblclick":"click";a.trigger(s)}else{var r=e.substr(0,e.indexOf("?")>-1?e.indexOf("?"):e.length);a=top.window.$(o.replace(/\{url\}/,r)),a.length>0&&(n=void 0!==n?n:a.find("i").attr("class"),i=void 0!==i?i:a.find("span:first").text(),a.trigger("fa.event.toggleitem"));var l=top.window.$(".nav-tabs ul li a[node-url='"+e+"']");if(l.length>0)l.trigger("click");else{var c=Math.floor((new Date).valueOf()*Math.random());n=void 0!==n?n:"fa fa-circle-o",i=void 0!==i?i:"",top.window.$(" ").append(' '+i+" ").prop("href",e).attr({url:e,addtabs:c}).addClass("hide").appendTo(top.window.document.body).trigger("click")}}},closetabs:function(e){if(void 0===e)top.window.$("ul.nav-addtabs li.active .close-tab").trigger("click");else{var i="a[url='{url}']",n=top.window.$(i.replace(/\{url\}/,e));if(0===n.length)if(e=t.api.fixurl(e),n=top.window.$(i.replace(/\{url\}/,e)),0===n.length);else{var o=e.substr(0,e.indexOf("?")>-1?e.indexOf("?"):e.length);n=top.window.$(i.replace(/\{url\}/,o)),0===n.length&&(n=top.window.$(".nav-tabs ul li a[node-url='"+e+"']"))}n.length>0&&n.attr("addtabs")&&top.window.$("ul.nav-addtabs li#tab_"+n.attr("addtabs")+" .close-tab").trigger("click")}},replaceids:function(t,e){if(e.indexOf("{ids}")>-1){var i=0,n=$(t).data("table-id");if(n&&$("#"+n).length>0&&$("#"+n).data("bootstrap.table")){i=require("table").api.selectedids($("#"+n)).join(",")}e=e.replace(/\{ids\}/g,i)}return e},refreshmenu:function(){top.window.$(".sidebar-menu").trigger("refresh")},gettablecolumnbutton:function(t){if(void 0!==t.tableId&&void 0!==t.fieldIndex&&void 0!==t.buttonIndex){var e=$("#"+t.tableId).bootstrapTable("getOptions");if(e){var i=null;if($.each(e.columns,function(e,n){if($.each(n,function(e,n){if(void 0!==n.fieldIndex&&n.fieldIndex===t.fieldIndex)return i=n,!1}),i)return!1}),i)return i.buttons[t.buttonIndex]}}return null}},init:function(){/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&$("html").addClass("ios-fix"),Toastr.options.positionClass="index"===Config.controllername?"toast-top-right-index":"toast-top-right",$(document).on("click",".btn-dialog,.dialogit",function(t){var e=this,i=$.extend({},$(e).data()||{}),o=n.api.replaceids(e,$(e).data("url")||$(e).attr("href")),a=$(e).attr("title")||$(e).data("title")||$(e).data("original-title"),s=n.api.gettablecolumnbutton(i);return s&&"function"==typeof s.callback&&(i.callback=s.callback),void 0!==i.confirm?Layer.confirm(i.confirm,function(t){n.api.open(o,a,i),Layer.close(t)}):window[$(e).data("window")||"self"].Backend.api.open(o,a,i),!1}),$(document).on("click",".btn-addtabs,.addtabsit",function(t){var e=this,i=$.extend({},$(e).data()||{}),o=n.api.replaceids(e,$(e).data("url")||$(e).attr("href")),a=$(e).attr("title")||$(e).data("title")||$(e).data("original-title"),s=$(e).attr("icon")||$(e).data("icon");return void 0!==i.confirm?Layer.confirm(i.confirm,function(t){n.api.addtabs(o,a,s),Layer.close(t)}):n.api.addtabs(o,a,s),!1}),$(document).on("click",".btn-ajax,.ajaxit",function(t){var e=this,i=$.extend({},$(e).data()||{});void 0===i.url&&$(e).attr("href")&&(i.url=$(e).attr("href")),i.url=n.api.replaceids(this,i.url);var o="function"==typeof i.success?i.success:null,a="function"==typeof i.error?i.error:null;delete i.success,delete i.error;var s=n.api.gettablecolumnbutton(i);return s&&("function"==typeof s.success&&(o=s.success),"function"==typeof s.error&&(a=s.error)),!o&&void 0!==i.tableId&&void 0!==i.refresh&&i.refresh&&(o=function(){$("#"+i.tableId).bootstrapTable("refresh")}),void 0!==i.confirm?Layer.confirm(i.confirm,function(t){n.api.ajax(i,o,a),Layer.close(t)}):n.api.ajax(i,o,a),!1}),$(document).on("click",".btn-click,.clickit",function(t){var e=this,i=$.extend({},$(e).data()||{}),o={};if(void 0!==i.tableId){var a=parseInt(i.rowIndex),s=$("#"+i.tableId).bootstrapTable("getData");o=void 0!==s[a]?s[a]:{}}var r=n.api.gettablecolumnbutton(i),l="function"==typeof r.click?r.click:$.noop;return void 0!==i.confirm?Layer.confirm(i.confirm,function(t){l.apply(e,[i,o,r]),Layer.close(t)}):l.apply(e,[i,o,r]),!1}),$(".fixed-footer").length>0&&$(document.body).css("padding-bottom",$(".fixed-footer").outerHeight()),$(".layer-footer").length>0&&self===top&&$(".layer-footer").show(),"ontouchstart"in document.documentElement||$("body").tooltip({selector:'[data-toggle="tooltip"]',trigger:"hover"}),$("body").popover({selector:'[data-toggle="popover"]'})}};return n.api=$.extend(t.api,n.api),window.Template=e,window.Moment=i,window.Backend=n,n.init(),n}),define("backend-init",["backend"],function(t){}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?e(require("../moment")):"function"==typeof define&&define.amd?define("moment/locale/zh-cn",["../moment"],e):e(t.moment)}(this,function(t){"use strict";return t.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(t,e){return 12===t&&(t=0),"凌晨"===e||"早上"===e||"上午"===e?t:"下午"===e||"晚上"===e?t+12:t>=11?t:t+12},meridiem:function(t,e,i){var n=100*t+e;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(t){return t.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(t){return this.week()!==t.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"周";default:return t}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}),function(t){"use strict";function e(t){var e=arguments,i=!0,n=1;return t=t.replace(/%s/g,function(){var t=e[n++];return void 0===t?(i=!1,""):t}),i?t:""}function i(e,i){var n=-1;return t.each(e,function(t,e){return e.field!==i||(n=t,!1)}),n}function n(){var e,i,n;return null===u&&(n=t("
").addClass("fixed-table-scroll-inner"),(e=t("
").addClass("fixed-table-scroll-outer")).append(n),t("body").append(e),i=n[0].offsetWidth,e.css("overflow","scroll"),i===(n=n[0].offsetWidth)&&(n=e[0].clientWidth),e.remove(),u=i-n),u}function o(i,n,o,a){var s,r=n;return"string"==typeof n&&(1<(s=n.split(".")).length?(r=window,t.each(s,function(t,e){r=r[e]})):r=window[n]),"object"==typeof r?r:"function"==typeof r?r.apply(i,o||[]):!r&&"string"==typeof n&&e.apply(this,[n].concat(o))?e.apply(this,[n].concat(o)):a}function a(e,i,n){var o,a=Object.getOwnPropertyNames(e),s=Object.getOwnPropertyNames(i);if(n&&a.length!==s.length)return!1;for(var r=0;r /g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):t}function r(t){for(var e in t){var i=e.split(/(?=[A-Z])/).join("-").toLowerCase();i!==e&&(t[i]=t[e],delete t[e])}return t}function l(t,e,i){var n=t;if("string"!=typeof e||t.hasOwnProperty(e))return i?s(t[e]):t[e];var o,a=e.split(".");for(o in a)a.hasOwnProperty(o)&&(n=n&&n[a[o]]);return i?s(n):n}function c(){return!!(0','
',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'':"",'','','
','
',this.options.formatLoadingMessage(),"
","
",'',"bottom"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'':"","
",""].join("")),this.$container.insertAfter(this.$el),this.$tableContainer=this.$container.find(".fixed-table-container"),this.$tableHeader=this.$container.find(".fixed-table-header"),this.$tableBody=this.$container.find(".fixed-table-body"),this.$tableLoading=this.$container.find(".fixed-table-loading"),this.$tableFooter=this.$container.find(".fixed-table-footer"),this.$toolbar=this.$container.find(".fixed-table-toolbar"),this.$pagination=this.$container.find(".fixed-table-pagination"),this.$tableBody.append(this.$el),this.$container.after('
'),this.$el.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped"),-1!==t.inArray("table-no-bordered",this.options.classes.split(" "))&&this.$tableContainer.addClass("table-no-bordered")},d.prototype.initTable=function(){for(var e,i,n,o=this,a=[],s=[],l=(this.$header=this.$el.find(">thead"),this.$header.length||(this.$header=t(" ").appendTo(this.$el)),this.$header.find("tr").each(function(){var e=[];t(this).find("th").each(function(){void 0!==t(this).data("field")&&t(this).data("field",t(this).data("field")+""),e.push(t.extend({},{title:t(this).html(),class:t(this).attr("class"),titleTooltip:t(this).attr("title"),rowspan:t(this).attr("rowspan")?+t(this).attr("rowspan"):void 0,colspan:t(this).attr("colspan")?+t(this).attr("colspan"):void 0},t(this).data()))}),a.push(e)}),t.isArray(this.options.columns[0])||(this.options.columns=[this.options.columns]),this.options.columns=t.extend(!0,[],a,this.options.columns),this.columns=[],this.options.columns),c=0,u=[],h=0;htbody>tr").each(function(i){var n={};n._id=t(this).attr("id"),n._class=t(this).attr("class"),n._data=r(t(this).data()),t(this).find(">td").each(function(a){for(var s,l,c=t(this),d=+c.attr("colspan")||1,u=+c.attr("rowspan")||1;e[i]&&e[i][a];a++);for(s=a;s"),0===a&&!i.options.cardView&&i.options.detailView&&o.push(e('
',i.options.columns.length)),t.each(r,function(t,a){var r,l,c,d="",u=e(' class="%s"',a.class),h=(i.options.sortOrder||a.order,"px"),p=a.width;if(void 0===a.width||i.options.cardView||"string"==typeof a.width&&-1!==a.width.indexOf("%")&&(h="%"),a.width&&"string"==typeof a.width&&(p=a.width.replace("%","").replace("px","")),r=e("text-align: %s; ",a.halign||a.align),l=e("text-align: %s; ",a.align),c=e("vertical-align: %s; ",a.valign),c+=e("width: %s; ",!a.checkbox&&!a.radio||p?p?p+h:void 0:"36px"),void 0!==a.fieldIndex){if(i.header.fields[a.fieldIndex]=a.field,i.header.styles[a.fieldIndex]=l+c,i.header.classes[a.fieldIndex]=u,i.header.formatters[a.fieldIndex]=a.formatter,i.header.events[a.fieldIndex]=a.events,i.header.sorters[a.fieldIndex]=a.sorter,i.header.sortNames[a.fieldIndex]=a.sortName,i.header.cellStyles[a.fieldIndex]=a.cellStyle,i.header.searchables[a.fieldIndex]=a.searchable,!a.visible)return;if(i.options.cardView&&!a.cardVisible)return;n[a.field]=a}o.push(""),o.push(e('',i.options.sortable&&a.sortable?"sortable both":"")),d=i.options.escape?s(a.title):a.title,a.checkbox&&(!i.options.singleSelect&&i.options.checkboxHeader&&(d=' '),i.header.stateField=a.field),a.radio&&(d="",i.header.stateField=a.field,i.options.singleSelect=!0),o.push(d),o.push("
"),o.push('
'),o.push(""),o.push(" ")}),o.push("")}),this.$header.html(o.join("")),this.$header.find("th[data-field]").each(function(e){t(this).data(n[t(this).data("field")])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(e){var n=t(this);if(i.options.detailView&&n.closest(".bootstrap-table")[0]!==i.$container[0])return!1;i.options.sortable&&n.parent().data().sortable&&i.onSort(e)}),this.$header.children().children().off("keypress").on("keypress",function(e){i.options.sortable&&t(this).data().sortable&&13==(e.keyCode||e.which)&&i.onSort(e)}),t(window).off("resize.bootstrap-table"),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$tableHeader.hide(),this.$tableLoading.css("top",0)):(this.$header.show(),this.$tableHeader.show(),this.$tableLoading.css("top",this.$header.outerHeight()+1),this.getCaret(),t(window).on("resize.bootstrap-table",t.proxy(this.resetWidth,this))),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$selectAll.off("click").on("click",function(){var e=t(this).prop("checked");i[e?"checkAll":"uncheckAll"](),i.updateSelected()})},d.prototype.initFooter=function(){!this.options.showFooter||this.options.cardView?this.$tableFooter.hide():this.$tableFooter.show()},d.prototype.initData=function(t,e){this.data="append"===e?this.data.concat(t):"prepend"===e?[].concat(t).concat(this.data):t||this.options.data,this.options.data="append"===e?this.options.data.concat(t):"prepend"===e?[].concat(t).concat(this.options.data):this.data,"server"!==this.options.sidePagination&&this.initSort()},d.prototype.initSort=function(){var i=this,n=this.options.sortName,a="desc"===this.options.sortOrder?-1:1,s=t.inArray(this.options.sortName,this.header.fields);this.options.customSort!==t.noop?this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]):-1!==s&&(this.options.sortStable&&t.each(this.data,function(t,e){e.hasOwnProperty("_position")||(e._position=t)}),
+this.data.sort(function(e,r){i.header.sortNames[s]&&(n=i.header.sortNames[s]);var c=l(e,n,i.options.escape),d=l(r,n,i.options.escape),u=o(i.header,i.header.sorters[s],[c,d]);return void 0!==u?a*u:(null==c&&(c=""),null==d&&(d=""),i.options.sortStable&&c===d&&(c=e._position,d=r._position),t.isNumeric(c)&&t.isNumeric(d)?(c=parseFloat(c))<(d=parseFloat(d))?-1*a:a:c===d?0:-1===(c="string"!=typeof c?c.toString():c).localeCompare(d)?-1*a:a)}),void 0!==this.options.sortClass)&&(clearTimeout(0),setTimeout(function(){i.$el.removeClass(i.options.sortClass);var t=i.$header.find(e('[data-field="%s"]',i.options.sortName).index()+1);i.$el.find(e("tr td:nth-child(%s)",t)).addClass(i.options.sortClass)},250))},d.prototype.onSort=function(e){var e="keypress"===e.type?t(e.currentTarget):t(e.currentTarget).parent(),i=this.$header.find("th").eq(e.index());this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===e.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=e.data("field"),this.options.sortOrder="asc"===e.data("order")?"desc":"asc"),this.trigger("sort",this.options.sortName,this.options.sortOrder),e.add(i).data("order",this.options.sortOrder),this.getCaret(),"server"===this.options.sidePagination?this.initServer(this.options.silentSort):(this.initSort(),this.initBody())},d.prototype.initToolbar=function(){var i,n=this,a=[],s=0,r=0;this.$toolbar.find(".bs-bars").children().length&&t("body").append(t(this.options.toolbar)),this.$toolbar.html(""),"string"!=typeof this.options.toolbar&&"object"!=typeof this.options.toolbar||t(e('
',this.options.toolbarAlign)).appendTo(this.$toolbar).append(t(this.options.toolbar)),a=[e('',this.options.buttonsAlign,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=o(null,this.options.icons)),this.options.showPaginationSwitch&&a.push(e('
',this.options.formatPaginationSwitch()),e(' ',this.options.iconsPrefix,this.options.icons.paginationSwitchDown)," "),this.options.showRefresh&&a.push(e('
',this.options.formatRefresh()),e(' ',this.options.iconsPrefix,this.options.icons.refresh)," "),this.options.showToggle&&a.push(e('
',this.options.formatToggle()),e(' ',this.options.iconsPrefix,this.options.icons.toggle)," "),this.options.showColumns&&(a.push(e('
',this.options.formatColumns()),'',e(' ',this.options.iconsPrefix,this.options.icons.columns),' '," ",'","
")),a.push("
"),(this.showToolbar||2',e(' ',this.options.formatSearch()),""),this.$toolbar.append(a.join("")),(i=this.$toolbar.find(".search input")).off("keyup drop blur").on("keyup drop blur",function(e){n.options.searchOnEnterKey&&13!==e.keyCode||-1this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),d.push('",'")}this.$pagination.html(d.join("")),this.options.onlyInfoPagination||(h=this.$pagination.find(".page-list a"),o=this.$pagination.find(".page-first"),a=this.$pagination.find(".page-pre"),s=this.$pagination.find(".page-next"),r=this.$pagination.find(".page-last"),l=this.$pagination.find(".page-number"),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(p.length<2||this.options.totalRows<=p[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),this.options.paginationLoop||(1===this.options.pageNumber&&a.addClass("disabled"),this.options.pageNumber===this.totalPages&&s.addClass("disabled")),u&&(this.options.pageSize=this.options.formatAllRows()),h.off("click").on("click",t.proxy(this.onPageListChange,this)),o.off("click").on("click",t.proxy(this.onPageFirst,this)),a.off("click").on("click",t.proxy(this.onPagePre,this)),s.off("click").on("click",t.proxy(this.onPageNext,this)),r.off("click").on("click",t.proxy(this.onPageLast,this)),l.off("click").on("click",t.proxy(this.onPageNumber,this)))}else this.$pagination.hide()},d.prototype.updatePagination=function(e){e&&t(e.currentTarget).hasClass("disabled")||(this.options.maintainSelected||this.resetRows(),this.initPagination(),"server"===this.options.sidePagination?this.initServer():this.initBody(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize))},d.prototype.onPageListChange=function(e){var i=t(e.currentTarget);return i.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=i.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+i.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(e),!1},d.prototype.onPageFirst=function(t){return this.options.pageNumber=1,this.updatePagination(t),!1},d.prototype.onPagePre=function(t){return this.options.pageNumber-1==0?this.options.pageNumber=this.options.totalPages:this.options.pageNumber--,this.updatePagination(t),!1},d.prototype.onPageNext=function(t){return this.options.pageNumber+1>this.options.totalPages?this.options.pageNumber=1:this.options.pageNumber++,this.updatePagination(t),!1},d.prototype.onPageLast=function(t){return this.options.pageNumber=this.totalPages,this.updatePagination(t),!1},d.prototype.onPageNumber=function(e){if(this.options.pageNumber!==+t(e.currentTarget).text())return this.options.pageNumber=+t(e.currentTarget).text(),this.updatePagination(e),!1},d.prototype.initRow=function(i,n,a,r){var c,d=this,u=[],h={},p=[],f="",m={},g=[];if(!(-1"),this.options.cardView&&u.push(e('',this.header.fields.length)),!this.options.cardView&&this.options.detailView&&u.push("
",'',e(' ',this.options.iconsPrefix,this.options.icons.detailOpen)," "," "),t.each(this.header.fields,function(a,r){var c="",f=l(i,r,d.options.escape),m="",g={},v="",y=d.header.classes[a],b="",w="",x="",k="",_=d.columns[a];if((!d.fromHtml||void 0!==f)&&_.visible&&(!d.options.cardView||_.cardVisible)){if(_.escape&&(f=s(f)),h=e('style="%s"',p.concat(d.header.styles[a]).join("; ")),i["_"+r+"_id"]&&(v=e(' id="%s"',i["_"+r+"_id"])),i["_"+r+"_class"]&&(y=e(' class="%s"',i["_"+r+"_class"])),i["_"+r+"_rowspan"]&&(w=e(' rowspan="%s"',i["_"+r+"_rowspan"])),i["_"+r+"_colspan"]&&(x=e(' colspan="%s"',i["_"+r+"_colspan"])),i["_"+r+"_title"]&&(k=e(' title="%s"',i["_"+r+"_title"])),(g=o(d.header,d.header.cellStyles[a],[f,i,n,r],g)).classes&&(y=e(' class="%s"',g.classes)),g.css){var C,S=[];for(C in g.css)S.push(C+": "+g.css[C]);h=e('style="%s"',S.concat(d.header.styles[a]).join("; "))}var T,D,$,E,A,m=o(_,d.header.formatters[a],[f,i,n],f);i["_"+r+"_data"]&&!t.isEmptyObject(i["_"+r+"_data"])&&t.each(i["_"+r+"_data"],function(t,i){"index"!==t&&(b+=e(' data-%s="%s"',t,i))}),_.checkbox||_.radio?(T=_.checkbox?"checkbox":"",T=_.radio?"radio":T,c=[e(d.options.cardView?'
':'
',_.class||"")," ",d.header.formatters[a]&&"string"==typeof m?m:"",d.options.cardView?"":" "].join(""),i[d.header.stateField]=!0===m||m&&m.checked):(m=null==m?d.options.undefinedText:m,c=(d.options.cardView?['
',d.options.showHeader?e('%s ',h,(T=d.columns,D="field",$="title",E=r,A="",t.each(T,function(t,e){return e[D]!==E||(A=e[$],!1)}),A)):"",e('%s ',m),"
"]:[e("
",v,y,h,b,w,x,k),m," "]).join(""),d.options.cardView&&d.options.smartDisplay&&""===m&&(c='
')),u.push(c)}}),this.options.cardView&&u.push("
"),u.push(""),u.join(" ")}},d.prototype.initBody=function(n){for(var a=this,s=this.getData(),r=(this.trigger("pre-body",s),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=t(" ").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=s.length),t(document.createDocumentFragment())),c=this.pageFrom-1;c'+e('%s ',this.$header.find("th").length,this.options.formatNoMatches())+""),this.$body.html(r),n||this.scrollTo(0),this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(n){var o=t(this),s=o.parent(),r=a.data[s.data("index")],c=o[0].cellIndex,c=a.getVisibleFields()[a.options.detailView&&!a.options.cardView?c-1:c],d=a.columns[i(a.columns,c)],u=l(r,c,a.options.escape);o.find(".detail-icon").length||(a.trigger("click"===n.type?"click-cell":"dbl-click-cell",c,u,r,o),a.trigger("click"===n.type?"click-row":"dbl-click-row",r,s,c),"click"===n.type&&a.options.clickToSelect&&d.clickToSelect&&(u=s.find(e('[name="%s"]',a.options.selectItemName))).length&&u[0].click())}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var i=t(this),n=i.parent().parent(),r=n.data("index"),l=s[r];return n.next().is("tr.detail-view")?(i.find("i").attr("class",e("%s %s",a.options.iconsPrefix,a.options.icons.detailOpen)),a.trigger("collapse-row",r,l),n.next().remove()):(i.find("i").attr("class",e("%s %s",a.options.iconsPrefix,a.options.icons.detailClose)),n.after(e(' ',n.find("td").length)),i=n.next().find("td"),n=o(a.options,a.options.detailFormatter,[r,l,i],""),1===i.length&&i.append(n),a.trigger("expand-row",r,l,i)),a.resetView(),!1}),this.$selectItem=this.$body.find(e('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(e){e.stopImmediatePropagation();var e=t(this),i=e.prop("checked"),n=a.data[e.data("index")];a.options.maintainSelected&&t(this).is(":radio")&&t.each(a.options.data,function(t,e){e[a.header.stateField]=!1}),n[a.header.stateField]=i,a.options.singleSelect&&(a.$selectItem.not(this).each(function(){a.data[t(this).data("index")][a.header.stateField]=!1}),a.$selectItem.filter(":checked").not(this).prop("checked",!1)),a.updateSelected(),a.trigger(i?"check":"uncheck",n,e)}),t.each(this.header.events,function(e,i){if(i){"string"==typeof i&&(i=o(null,i));var n,s=a.header.fields[e],r=t.inArray(s,a.getVisibleFields());for(n in a.options.detailView&&!a.options.cardView&&(r+=1),i)a.$body.find(">tr:not(.no-records-found)").each(function(){var e=t(this),o=e.find(a.options.cardView?".card-view":">td").eq(r),l=n.indexOf(" "),c=n.substring(0,l),l=n.substring(l+1),d=i[n];o.find(l).off(c).on(c,function(t){var i=e.data("index"),n=a.data[i],o=n[s],r=s.split(".");if(1o.clientWidth&&o.scrollHeight>o.clientHeight+this.$header.outerHeight()?n():0,this.$el.css("margin-top",-this.$header.outerHeight()),0<(i=t(":focus")).length&&0<(i=i.parents("th")).length&&void 0!==(i=i.attr("data-field"))&&0<(i=this.$header.find("[data-field='"+i+"']")).length&&i.find(":input").addClass("focus-temp"),this.$header_=this.$header.clone(!0,!0),this.$selectAll_=this.$header_.find('[name="btSelectAll"]'),this.$tableHeader.css({"margin-right":o}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_),0<(i=t(".focus-temp:visible:eq(0)")).length&&(i.focus(),this.$header.find(".focus-temp").removeClass("focus-temp")),this.$header.find("th[data-field]").each(function(i){r.$header_.find(e('th[data-field="%s"]',t(this).data("field"))).data(t(this).data())}),a=this.getVisibleFields(),s=this.$header_.find("th"),this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(i){var n=t(this),o=i,i=(r.options.detailView&&!r.options.cardView&&(0===i&&r.$header_.find("th.detail").find(".fht-cell").width(n.innerWidth()),o=i-1),r.$header_.find(e('th[data-field="%s"]',a[o])));(i=1
'),t.each(this.columns,function(t,s){var r,l,c,d,u=[],h=e(' class="%s"',s.class);if(s.visible&&(!i.options.cardView||s.cardVisible)){if(l=e("text-align: %s; ",s.falign||s.align),c=e("vertical-align: %s; ",s.valign),(d=o(null,i.options.footerStyle))&&d.css)for(r in d.css)u.push(r+": "+d.css[r]);a.push(""),a.push(''),a.push(o(s,s.footerFormatter,[n]," ")||" "),a.push("
"),a.push('
'),a.push(""),a.push(" ")}}),this.$tableFooter.find("tr").html(a.join("")),this.$tableFooter.show(),clearTimeout(this.timeoutFooter_),this.timeoutFooter_=setTimeout(t.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0))},d.prototype.fitFooter=function(){var e,i,o;clearTimeout(this.timeoutFooter_),this.$el.is(":hidden")?this.timeoutFooter_=setTimeout(t.proxy(this.fitFooter,this),100):(o=(i=this.$el.css("width"))>this.$tableBody.width()?n():0,this.$tableFooter.css({"margin-right":o}).find("table").css("width",i).attr("class",this.$el.attr("class")),e=this.$tableFooter.find("td"),this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(i){var n=t(this);e.eq(i).find(".fht-cell").width(n.innerWidth())}))},d.prototype.toggleColumn=function(t,i,n){var o;-1!==t&&(this.columns[t].visible=i,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)&&(o=this.$toolbar.find(".keep-open input").prop("disabled",!1),n&&o.filter(e('[value="%s"]',t)).prop("checked",i),o.filter(":checked").length<=this.options.minimumCountColumns)&&o.filter(":checked").prop("disabled",!0)},d.prototype.getVisibleFields=function(){var e=this,n=[];return t.each(this.header.fields,function(t,o){e.columns[i(e.columns,o)].visible&&n.push(o)}),n},d.prototype.resetView=function(t){var e,i=0;t&&t.height&&(this.options.height=t.height),this.$selectAll.prop("checked",0tr");if(this.options.detailView&&!this.options.cardView&&(a+=1),e=l.eq(o).find(">td").eq(a),!(o<0||a<0||o>=this.data.length)){for(i=o;itd").eq(n).hide();e.attr("rowspan",s).attr("colspan",r).show()}},d.prototype.updateCell=function(t){t.hasOwnProperty("index")&&t.hasOwnProperty("field")&&t.hasOwnProperty("value")&&(this.data[t.index][t.field]=t.value,!1!==t.reinit)&&(this.initSort(),this.initBody(!0))},d.prototype.getOptions=function(){return this.options},d.prototype.getSelections=function(){var e=this;return t.grep(this.options.data,function(t){return!0===t[e.header.stateField]})},d.prototype.getAllSelections=function(){var e=this;return t.grep(this.options.data,function(t){return t[e.header.stateField]})},d.prototype.checkAll=function(){this.checkAll_(!0)},d.prototype.uncheckAll=function(){this.checkAll_(!1)},d.prototype.checkInvert=function(){var e=this,i=e.$selectItem.filter(":enabled"),n=i.filter(":checked");i.each(function(){t(this).prop("checked",!t(this).prop("checked"))}),e.updateRows(),e.updateSelected(),e.trigger("uncheck-some",n),n=e.getSelections(),e.trigger("check-some",n)},d.prototype.checkAll_=function(t){var e;t||(e=this.getSelections()),this.$selectAll.add(this.$selectAll_).prop("checked",t),
+this.$selectItem.filter(":enabled").prop("checked",t),this.updateRows(),t&&(e=this.getSelections()),this.trigger(t?"check-all":"uncheck-all",e)},d.prototype.check=function(t){this.check_(!0,t)},d.prototype.uncheck=function(t){this.check_(!1,t)},d.prototype.check_=function(t,i){var n=this.$selectItem.filter(e('[data-index="%s"]',i)).prop("checked",t);this.data[i][this.header.stateField]=t,this.updateSelected(),this.trigger(t?"check":"uncheck",this.data[i],n)},d.prototype.checkBy=function(t){this.checkBy_(!0,t)},d.prototype.uncheckBy=function(t){this.checkBy_(!1,t)},d.prototype.checkBy_=function(i,n){var o,a;n.hasOwnProperty("field")&&n.hasOwnProperty("values")&&(a=[],t.each((o=this).options.data,function(s,r){if(!r.hasOwnProperty(n.field))return!1;-1!==t.inArray(r[n.field],n.values)&&(s=o.$selectItem.filter(":enabled").filter(e('[data-index="%s"]',s)).prop("checked",i),r[o.header.stateField]=i,a.push(r),o.trigger(i?"check":"uncheck",r,s))}),this.updateSelected(),this.trigger(i?"check-some":"uncheck-some",a))},d.prototype.destroy=function(){this.$el.insertBefore(this.$container),t(this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")},d.prototype.showLoading=function(){this.$tableLoading.show()},d.prototype.hideLoading=function(){this.$tableLoading.hide()},d.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var t=this.$toolbar.find('button[name="paginationSwitch"] i');this.options.pagination?t.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown):t.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp),this.updatePagination()},d.prototype.refresh=function(t){t&&t.url&&(this.options.url=t.url),t&&t.pageNumber&&(this.options.pageNumber=t.pageNumber),t&&t.pageSize&&(this.options.pageSize=t.pageSize),this.initServer(t&&t.silent,t&&t.query,t&&t.url),this.trigger("refresh",t)},d.prototype.resetWidth=function(){this.options.showHeader&&this.options.height&&this.fitHeader(),this.options.showFooter&&this.fitFooter()},d.prototype.showColumn=function(t){this.toggleColumn(i(this.columns,t),!0,!0)},d.prototype.hideColumn=function(t){this.toggleColumn(i(this.columns,t),!1,!0)},d.prototype.getHiddenColumns=function(){return t.grep(this.columns,function(t){return!t.visible})},d.prototype.getVisibleColumns=function(){return t.grep(this.columns,function(t){return t.visible})},d.prototype.toggleAllColumns=function(e){var i;t.each(this.columns,function(t,i){this.columns[t].visible=e}),this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns&&(i=this.$toolbar.find(".keep-open input").prop("disabled",!1)).filter(":checked").length<=this.options.minimumCountColumns&&i.filter(":checked").prop("disabled",!0)},d.prototype.showAllColumns=function(){this.toggleAllColumns(!0)},d.prototype.hideAllColumns=function(){this.toggleAllColumns(!1)},d.prototype.filterBy=function(e){this.filterColumns=t.isEmptyObject(e)?{}:e,this.options.pageNumber=1,this.initSearch(),this.updatePagination()},d.prototype.scrollTo=function(t){if("number"==typeof(t="string"==typeof t?"bottom"===t?this.$tableBody[0].scrollHeight:0:t)&&this.$tableBody.scrollTop(t),void 0===t)return this.$tableBody.scrollTop()},d.prototype.getScrollPosition=function(){return this.scrollTo()},d.prototype.selectPage=function(t){0 tr[data-index="%s"]',i)),i.next().is("tr.detail-view")===!t&&i.find("> td > .detail-icon").click()},d.prototype.expandRow=function(t){this.expandRow_(!0,t)},d.prototype.collapseRow=function(t){this.expandRow_(!1,t)},d.prototype.expandAllRows=function(i){if(i){var i=this.$body.find(e('> tr[data-index="%s"]',0)),n=this,o=null,a=!1,s=-1;if(i.next().is("tr.detail-view")?i.next().next().is("tr.detail-view")||(i.next().find(".detail-icon").click(),a=!0):(i.find("> td > .detail-icon").click(),a=!0),a)try{s=setInterval(function(){0<(o=n.$body.find("tr.detail-view").last().find(".detail-icon")).length?o.click():clearInterval(s)},1)}catch(i){clearInterval(s)}}else for(var r=this.$body.children(),l=0;l.btn-group")).find("div.export").length&&(a=t(['','',e(' ',this.options.iconsPrefix,this.options.icons.export),' '," ",'","
"].join("")).appendTo(s).find(".dropdown-menu"),r=this.options.exportTypes,"string"==typeof this.options.exportTypes&&(s=this.options.exportTypes.slice(1,-1).replace(/ /g,"").split(","),r=[],t.each(s,function(t,e){r.push(e.slice(1,-1))})),t.each(r,function(t,e){i.hasOwnProperty(e)&&a.append(['','',i[e]," "," "].join(""))}),a.find("li").click(function(){var e=this;if("function"!=typeof require)throw new Error("RequireJS not found");require(["tableexport"],function(){function i(){n.$el.tableExport(t.extend({},n.options.exportOptions,{type:r,escape:!1}))}var o,a,s,r=t(e).data("type");"all"===n.options.exportDataType&&n.options.pagination?(n.$el.one("server"===n.options.sidePagination?"post-body.bs.table":"page-change.bs.table",function(){i(),n.togglePagination()}),n.togglePagination()):"selected"===n.options.exportDataType?(o=n.getData(),s=n.getAllSelections(),"server"===n.options.sidePagination&&((o={total:n.options.totalRows})[n.options.dataField]=n.getData(),a="function"==typeof require?require("table"):null,(s={total:n.options.totalRows})[n.options.dataField]=a&&n.options.maintainSelected?a.api.selecteddata(n.$el):n.getAllSelections()),n.load(s),i(),n.load(o)):i()})}))}}(jQuery),define("bootstrap-table-export",["bootstrap-table"],function(t){return function(){return t.$.fn.bootstrapTable.defaults}}(this)),function(t){"function"==typeof define&&define.amd?define("dropzone",["jquery"],t):t(jQuery)}(function(t){function e(t){"@babel/helpers - typeof";return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,i){return!i||"object"!==e(i)&&"function"!=typeof i?o(t):i}function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var i=0;i1?i-1:0),o=1;o '),this.element.appendChild(t));var l=t.getElementsByTagName("span")[0];return l&&(null!=l.textContent?l.textContent=this.options.dictFallbackMessage:null!=l.innerText&&(l.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t,e,i,n){var o={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},a=t.width/t.height;null==e&&null==i?(e=o.srcWidth,i=o.srcHeight):null==e?e=i*a:null==i&&(i=e/a),e=Math.min(e,o.srcWidth),i=Math.min(i,o.srcHeight);var s=e/i;if(o.srcWidth>e||o.srcHeight>i)if("crop"===n)a>s?(o.srcHeight=t.height,o.srcWidth=o.srcHeight*s):(o.srcWidth=t.width,o.srcHeight=o.srcWidth/s);else{if("contain"!==n)throw new Error("Unknown resizeMethod '".concat(n,"'"));a>s?i=e/a:e=i*a}return o.srcX=(t.width-o.srcWidth)/2,o.srcY=(t.height-o.srcHeight)/2,o.trgWidth=e,o.trgHeight=i,o},transformFile:function(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:'\n
\n
\n
\n
\n
\n
\n Check \n \n \n \n \n
\n
\n
\n Error \n \n \n \n \n \n \n
\n
',drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:function(t){},dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:function(t){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var i=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){t.previewElement=e.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement);var n=!0,o=!1,a=void 0;try{for(var s,r=t.previewElement.querySelectorAll("[data-dz-name]")[Symbol.iterator]();!(n=(s=r.next()).done);n=!0){var l=s.value;l.textContent=t.name}}catch(t){o=!0,a=t}finally{try{n||null==r.return||r.return()}finally{if(o)throw a}}var c=!0,d=!1,u=void 0;try{for(var h,p=t.previewElement.querySelectorAll("[data-dz-size]")[Symbol.iterator]();!(c=(h=p.next()).done);c=!0)l=h.value,l.innerHTML=this.filesize(t.size)}catch(t){d=!0,u=t}finally{try{c||null==p.return||p.return()}finally{if(d)throw u}}this.options.addRemoveLinks&&(t._removeLink=e.createElement(''.concat(this.options.dictRemoveFile," ")),t.previewElement.appendChild(t._removeLink));var f=function(n){return n.preventDefault(),n.stopPropagation(),t.status===e.UPLOADING?e.confirm(i.options.dictCancelUploadConfirmation,function(){return i.removeFile(t)}):i.options.dictRemoveFileConfirmation?e.confirm(i.options.dictRemoveFileConfirmation,function(){return i.removeFile(t)}):i.removeFile(t)},m=!0,g=!1,v=void 0;try{for(var y,b=t.previewElement.querySelectorAll("[data-dz-remove]")[Symbol.iterator]();!(m=(y=b.next()).done);m=!0){y.value.addEventListener("click",f)}}catch(t){g=!0,v=t}finally{try{m||null==b.return||b.return()}finally{if(g)throw v}}}},removedfile:function(t){return null!=t.previewElement&&null!=t.previewElement.parentNode&&t.previewElement.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){if(t.previewElement){t.previewElement.classList.remove("dz-file-preview");var i=!0,n=!1,o=void 0;try{for(var a,s=t.previewElement.querySelectorAll("[data-dz-thumbnail]")[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var r=a.value;r.alt=t.name,r.src=e}}catch(t){n=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(n)throw o}}return setTimeout(function(){return t.previewElement.classList.add("dz-image-preview")},1)}},error:function(t,e){if(t.previewElement){t.previewElement.classList.add("dz-error"),"String"!=typeof e&&e.error&&(e=e.error);var i=!0,n=!1,o=void 0;try{for(var a,s=t.previewElement.querySelectorAll("[data-dz-errormessage]")[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){a.value.textContent=e}}catch(t){n=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(n)throw o}}}},errormultiple:function(){},processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(t,e,i){if(t.previewElement){var n=!0,o=!1,a=void 0;try{for(var s,r=t.previewElement.querySelectorAll("[data-dz-uploadprogress]")[Symbol.iterator]();!(n=(s=r.next()).done);n=!0){var l=s.value;"PROGRESS"===l.nodeName?l.value=e:l.style.width="".concat(e,"%")}}catch(t){o=!0,a=t}finally{try{n||null==r.return||r.return()}finally{if(o)throw a}}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(t){return this.emit("error",t,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(t){if(t._removeLink&&(t._removeLink.innerHTML=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n'.concat(this.options.dictDefaultMessage," "))),this.clickableElements.length){!function i(){return t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null===t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!==t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!==t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",e.getElement(t.options.hiddenInputContainer,"hiddenInputContainer").appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",function(){var e=t.hiddenFileInput.files;if(e.length){var n=!0,o=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(n=(s=r.next()).done);n=!0){var l=s.value;t.addFile(l)}}catch(t){o=!0,a=t}finally{try{n||null==r.return||r.return()}finally{if(o)throw a}}}return t.emit("addedfiles",e),i()})}()}this.URL=null!==window.URL?window.URL:window.webkitURL;var i=!0,n=!1,o=void 0;try{for(var a,s=this.events[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var r=a.value;this.on(r,this.options[r])}}catch(t){n=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(n)throw o}}this.on("uploadprogress",function(){return t.updateTotalUploadProgress()}),this.on("removedfile",function(){return t.updateTotalUploadProgress()}),this.on("canceled",function(e){return t.emit("complete",e)}),this.on("complete",function(e){if(0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length)return setTimeout(function(){return t.emit("queuecomplete")},0)});var l=function(t){return t.dataTransfer.types&&t.dataTransfer.types.some(function(t){return"Files"==t})},c=function(t){if(l(t))return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(e){return t.emit("dragstart",e)},dragenter:function(e){return c(e),t.emit("dragenter",e)},dragover:function(e){var i;try{i=e.dataTransfer.effectAllowed}catch(t){}return e.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy",c(e),t.emit("dragover",e)},dragleave:function(e){return t.emit("dragleave",e)},drop:function(e){return c(e),t.drop(e)},dragend:function(e){return t.emit("dragend",e)}}}],this.clickableElements.forEach(function(i){return t.listeners.push({element:i,events:{click:function(n){return(i!==t.element||n.target===t.element||e.elementInside(n.target,t.element.querySelector(".dz-message")))&&t.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,e.instances.splice(e.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var t,e=0,i=0;if(this.getActiveFiles().length){var n=!0,o=!1,a=void 0;try{for(var s,r=this.getActiveFiles()[Symbol.iterator]();!(n=(s=r.next()).done);n=!0){var l=s.value;e+=l.upload.bytesSent,i+=l.upload.total}}catch(t){o=!0,a=t}finally{try{n||null==r.return||r.return()}finally{if(o)throw a}}t=100*e/i}else t=100;return this.emit("totaluploadprogress",t,i,e)}},{key:"_getParamName",value:function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(t,"]"):"")}},{key:"_renameFile",value:function(t){return"function"!=typeof this.options.renameFile?t.name:this.options.renameFile(t)}},{
+key:"getFallbackForm",value:function(){var t,i;if(t=this.getExistingFallback())return t;var n='');var o=e.createElement(n);return"FORM"!==this.element.tagName?(i=e.createElement('')),i.appendChild(o)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=i?i:o}},{key:"getExistingFallback",value:function(){for(var t=0,e=["div","form"];t0){for(var n=["tb","gb","mb","kb","b"],o=0;o=Math.pow(this.options.filesizeBase,4-o)/10){e=t/Math.pow(this.options.filesizeBase,4-o),i=a;break}}e=Math.round(10*e)/10}return"".concat(e," ").concat(this.options.dictFileSizeUnits[i])}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(t){if(t.dataTransfer){this.emit("drop",t);for(var e=[],i=0;i0){var o=!0,a=!1,s=void 0;try{for(var r,l=n[Symbol.iterator]();!(o=(r=l.next()).done);o=!0){var c=r.value;c.isFile?c.file(function(t){if(!i.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath="".concat(e,"/").concat(t.name),i.addFile(t)}):c.isDirectory&&i._addFilesFromDirectory(c,"".concat(e,"/").concat(c.name))}}catch(t){a=!0,s=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw s}}t()}return null},o)}()}},{key:"accept",value:function(t,i){this.options.maxFilesize&&t.size>1024*this.options.maxFilesize*1024?i(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):e.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(i(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,i):i(this.options.dictInvalidFileType)}},{key:"addFile",value:function(t){var i=this;t.upload={uuid:e.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t)},this.files.push(t),t.status=e.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,function(e){e?(t.accepted=!1,i._errorProcessing([t],e)):(t.accepted=!0,i.options.autoQueue&&i.enqueueFile(t)),i._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(t){var e=!0,i=!1,n=void 0;try{for(var o,a=t[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var s=o.value;this.enqueueFile(s)}}catch(t){i=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(i)throw n}}return null}},{key:"enqueueFile",value:function(t){var i=this;if(t.status!==e.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=e.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return i.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(t){var e=this;if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout(function(){return e._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var t=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(i){return t.emit("thumbnail",e,i),t._processingThumbnail=!1,t._processThumbnailQueue()})}}},{key:"removeFile",value:function(t){if(t.status===e.UPLOADING&&this.cancelUpload(t),this.files=m(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(t){null==t&&(t=!1);var i=!0,n=!1,o=void 0;try{for(var a,s=this.files.slice()[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var r=a.value;(r.status!==e.UPLOADING||t)&&this.removeFile(r)}}catch(t){n=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(n)throw o}}return null}},{key:"resizeImage",value:function(t,i,n,o,a){var s=this;return this.createThumbnail(t,i,n,o,!0,function(i,n){if(null==n)return a(t);var o=s.options.resizeMimeType;null==o&&(o=t.type);var r=n.toDataURL(o,s.options.resizeQuality);return"image/jpeg"!==o&&"image/jpg"!==o||(r=b.restore(t.dataURL,r)),a(e.dataURItoBlob(r))})}},{key:"createThumbnail",value:function(t,e,i,n,o,a){var s=this,r=new FileReader;r.onload=function(){if(t.dataURL=r.result,"image/svg+xml"===t.type)return void(null!=a&&a(r.result));s.createThumbnailFromUrl(t,e,i,n,o,a)},r.readAsDataURL(t)}},{key:"displayExistingFile",value:function(t,e,i,n){var o=this,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this.emit("addedfile",t),this.emit("complete",t),a){var s=function(e){o.emit("thumbnail",t,e),i&&i()};t.dataURL=e,this.createThumbnailFromUrl(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.resizeMethod,this.options.fixOrientation,s,n)}else this.emit("thumbnail",t,e),i&&i()}},{key:"createThumbnailFromUrl",value:function(t,e,i,n,o,a,s){var r=this,l=document.createElement("img");return s&&(l.crossOrigin=s),l.onload=function(){var s=function(t){return t(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&o&&(s=function(t){return EXIF.getData(l,function(){return t(EXIF.getTag(this,"Orientation"))})}),s(function(o){t.width=l.width,t.height=l.height;var s=r.options.resize.call(r,t,e,i,n),c=document.createElement("canvas"),d=c.getContext("2d");switch(c.width=s.trgWidth,c.height=s.trgHeight,o>4&&(c.width=s.trgHeight,c.height=s.trgWidth),o){case 2:d.translate(c.width,0),d.scale(-1,1);break;case 3:d.translate(c.width,c.height),d.rotate(Math.PI);break;case 4:d.translate(0,c.height),d.scale(1,-1);break;case 5:d.rotate(.5*Math.PI),d.scale(1,-1);break;case 6:d.rotate(.5*Math.PI),d.translate(0,-c.width);break;case 7:d.rotate(.5*Math.PI),d.translate(c.height,-c.width),d.scale(-1,1);break;case 8:d.rotate(-.5*Math.PI),d.translate(-c.height,0)}y(d,l,null!=s.srcX?s.srcX:0,null!=s.srcY?s.srcY:0,s.srcWidth,s.srcHeight,null!=s.trgX?s.trgX:0,null!=s.trgY?s.trgY:0,s.trgWidth,s.trgHeight);var u=c.toDataURL("image/png");if(null!=a)return a(u,c)})},null!=a&&(l.onerror=a),l.src=t.dataURL}},{key:"processQueue",value:function(){var t=this.options.parallelUploads,e=this.getUploadingFiles().length,i=e;if(!(e>=t)){var n=this.getQueuedFiles();if(n.length>0){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,t-e));for(;i1?e-1:0),n=1;ni.options.chunkSize),t[0].upload.totalChunkCount=Math.ceil(o.size/i.options.chunkSize)}if(t[0].upload.chunked){var a=t[0],s=n[0],r=0;a.upload.chunks=[];var l=function(){for(var n=0;void 0!==a.upload.chunks[n];)n++;if(!(n>=a.upload.totalChunkCount)){r++;var o=n*i.options.chunkSize,l=Math.min(o+i.options.chunkSize,a.size),c={name:i._getParamName(0),data:s.webkitSlice?s.webkitSlice(o,l):s.slice(o,l),filename:a.upload.filename,chunkIndex:n};a.upload.chunks[n]={file:a,index:n,dataBlock:c,status:e.UPLOADING,progress:0,retries:0},i._uploadData(t,[c])}};if(a.upload.finishedChunkUpload=function(n,o){var s=!0;n.status=e.SUCCESS,i.options.chunkSuccess.call(i,n,a,o),n.dataBlock=null,n.xhr=null;for(var r=0;r=s;r?a++:a--)o[a]=e.charCodeAt(a);return new Blob([n],{type:i})};var m=function(t,e){return t.filter(function(t){return t!==e}).map(function(t){return t})},g=function(t){return t.replace(/[\-_](\w)/g,function(t){return t.charAt(1).toUpperCase()})};f.createElement=function(t){var e=document.createElement("div");return e.innerHTML=t,e.childNodes[0]},f.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},f.getElement=function(t,e){var i;if("string"==typeof t?i=document.querySelector(t):null!=t.nodeType&&(i=t),null==i)throw new Error("Invalid `".concat(e,"` option provided. Please provide a CSS selector or a plain HTML element."));return i},f.getElements=function(t,e){var i,n;if(t instanceof Array){n=[];try{var o=!0,a=!1,s=void 0;try{for(var r,l=t[Symbol.iterator]();!(o=(r=l.next()).done);o=!0)i=r.value,n.push(this.getElement(i,e))}catch(t){a=!0,s=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw s}}}catch(t){n=null}}else if("string"==typeof t){n=[];var c=!0,d=!1,u=void 0;try{for(var h,p=document.querySelectorAll(t)[Symbol.iterator]();!(c=(h=p.next()).done);c=!0)i=h.value,n.push(i)}catch(t){d=!0,u=t}finally{try{c||null==p.return||p.return()}finally{if(d)throw u}}}else null!=t.nodeType&&(n=[t]);if(null==n||!n.length)throw new Error("Invalid `".concat(e,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return n},f.confirm=function(t,e,i){return window.confirm(t)?e():null!=i?i():void 0},f.isValidFile=function(t,e){if(!e)return!0;e=e.split(",");var i=t.type,n=i.replace(/\/.*$/,""),o=!0,a=!1,s=void 0;try{for(var r,l=e[Symbol.iterator]();!(o=(r=l.next()).done);o=!0){var c=r.value;if(c=c.trim(),"."===c.charAt(0)){if(-1!==t.name.toLowerCase().indexOf(c.toLowerCase(),t.name.length-c.length))return!0}else if(/\/\*$/.test(c)){if(n===c.replace(/\/.*$/,""))return!0}else if(i===c)return!0}}catch(t){a=!0,s=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw s}}return!1},void 0!==t&&null!==t&&(t.fn.dropzone=function(t){return this.each(function(){return new f(this,t)})}),void 0!==h&&null!==h?h.exports=f:window.Dropzone=f,f.ADDED="added",f.QUEUED="queued",f.ACCEPTED=f.QUEUED,f.UPLOADING="uploading",f.PROCESSING=f.UPLOADING,f.CANCELED="canceled",f.ERROR="error",f.SUCCESS="success";var v=function(t){var e=(t.naturalWidth,t.naturalHeight),i=document.createElement("canvas");i.width=1,i.height=e;var n=i.getContext("2d");n.drawImage(t,0,0);for(var o=n.getImageData(1,0,1,e),a=o.data,s=0,r=e,l=e;l>s;){0===a[4*(l-1)+3]?r=l:s=l,l=r+s>>1}var c=l/e;return 0===c?1:c},y=function(t,e,i,n,o,a,s,r,l,c){var d=v(e);return t.drawImage(e,i,n,o,a,s,r,l,c/d)},b=function(){function t(){r(this,t)}return c(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(t){for(var e="",i=void 0,n=void 0,o="",a=void 0,s=void 0,r=void 0,l="",c=0;;)if(i=t[c++],n=t[c++],o=t[c++],a=i>>2,s=(3&i)<<4|n>>4,r=(15&n)<<2|o>>6,l=63&o,isNaN(n)?r=l=64:isNaN(o)&&(l=64),e=e+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(l),i=n=o="",a=s=r=l="",!(ct.length)break}return i}},{key:"decode64",value:function(t){var e=void 0,i=void 0,n="",o=void 0,a=void 0,s=void 0,r="",l=0,c=[],d=/[^A-Za-z0-9\+\/\=]/g;for(d.exec(t)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");;)if(o=this.KEY_STR.indexOf(t.charAt(l++)),a=this.KEY_STR.indexOf(t.charAt(l++)),s=this.KEY_STR.indexOf(t.charAt(l++)),r=this.KEY_STR.indexOf(t.charAt(l++)),e=o<<2|a>>4,i=(15&a)<<4|s>>2,n=(3&s)<<6|r,c.push(e),64!==s&&c.push(i),64!==r&&c.push(n),e=i=n="",o=a=s=r="",!(l \';this.onerror=null;" class="img-responsive"> '},events:{onInit:function(){},onUploadSuccess:function(e,i,n){var a=e.element,s=e.options.onUploadSuccess,r=void 0!==i.data?i.data:null;if(a){var l=t(a).data("input-id")?t(a).data("input-id"):"";if(l){var c=[],d=t("#"+l);t(a).data("multiple")&&""!==d.val()&&c.push(d.val());var u=Config.upload.fullmode?r.fullurl?r.fullurl:Fast.api.cdnurl(r.url):r.url;c.push(u),d.val(c.join(",")).trigger("change").trigger("validate")}var h=t(a).data("upload-success");if(h&&("function"!=typeof h&&"function"==typeof o.api.custom[h]&&(h=o.api.custom[h]),"function"==typeof h)){var p=h.call(a,r,i,e,n);if(!1===p)return}}if("function"==typeof s){var p=s.call(a,r,i,e,n);if(!1===p)return}},onUploadError:function(e,i,n){var a=e.element,s=e.options.onUploadError,r=void 0!==i.data?i.data:null;if(a){var l=t(a).data("upload-error");if(l&&("function"!=typeof l&&"function"==typeof o.api.custom[l]&&(l=o.api.custom[l]),"function"==typeof l)){var c=l.call(a,r,i,e,n);if(!1===c)return}}if("function"==typeof s){var c=s.call(a,r,i,e,n);if(!1===c)return}Toastr.error(i.msg.toString().replace(/(<([^>]+)>)/gi,"")+"(code:"+i.code+")")},onUploadResponse:function(e,i,n){try{var o="object"==typeof e?e:JSON.parse(e);o.hasOwnProperty("code")||t.extend(o,{code:-2,msg:e,data:null})}catch(t){var o={code:-1,msg:t.message,data:null}}return o},onUploadComplete:function(e,i){var n=e.element,a=e.options.onUploadComplete;if(n){var s=t(n).data("upload-complete");if(s&&("function"!=typeof s&&"function"==typeof o.api.custom[s]&&(s=o.api.custom[s]),"function"==typeof s)){var r=s.call(n,i);if(!1===r)return}}if("function"==typeof a){var r=a.call(n,i);if(!1===r)return}}},api:{upload:function(e,a,s,r){e=void 0===e?o.config.classname:e,t(e,o.config.container).each(function(){if(t(this).attr("initialized"))return!0;t(this).attr("initialized",!0);var e=this,l=t(this).prop("id")||t(this).prop("name")||i.uuidv4(),c=t(this).data("url"),d=t(this).data("maxsize"),u=t(this).data("maxcount"),h=t(this).data("mimetype"),p=t(this).data("multipart"),f=t(this).data("multiple"),m=t(e).data("input-id")?t(e).data("input-id"):"",g=t(e).data("preview-id")?t(e).data("preview-id"):"";c=c||Config.upload.uploadurl,c=Fast.api.fixurl(c);var v=Config.upload.chunksize||2097152,y=Config.upload.timeout||6e5;d=void 0!==d?d:Config.upload.maxsize,h=void 0!==h?h:Config.upload.mimetype,p=void 0!==p?p:Config.upload.multipart,f=void 0!==f?f:Config.upload.multiple,h=h.split(",").map(function(t){return t.indexOf("/")>-1?t:t&&"*"!==t&&"."!==t.charAt(0)?"."+t:t}).join(","),h="*"===h?null:h;var b=function(t){var e=t.toString().match(/^([0-9\.]+)(\w+)$/),i=e?parseFloat(e[1]):parseFloat(t),n=e?e[2].toLowerCase():"b",o={b:0,k:1,kb:1,m:2,mb:2,gb:3,g:3,tb:4,t:4},a=void 0!==o[n]?o[n]:0;return i*Math.pow(1024,a)/Math.pow(1024,2)}(d),w=t(this).data()||{};w=t.extend(!0,{},w,t(this).data("upload-options")||{}),delete w.success,delete w.url,p=t.isArray(p)?{}:p;var x=t(this).data("params")||{};void 0!==x.category||t(this).data("category");o.list[l]=new i(this,t.extend({url:c,params:function(e,i,n){var o=p;return n?t.extend({},o,{filesize:n.file.size,filename:n.file.name,chunkid:n.file.upload.uuid,chunkindex:n.index,chunkcount:n.file.upload.totalChunkCount,chunksize:this.options.chunkSize,chunkfilesize:n.dataBlock.data.size,width:n.file.width||0,height:n.file.height||0,type:n.file.type}):o},chunking:!1,chunkSize:v,maxFilesize:b,acceptedFiles:h,maxFiles:u&&parseInt(u)>1?u:f?null:1,timeout:y,parallelUploads:1,previewsContainer:!1,dictDefaultMessage:__("Drop files here to upload"),dictFallbackMessage:__("Your browser does not support drag'n'drop file uploads"),dictFallbackText:__("Please use the fallback form below to upload your files like in the olden days"),dictFileTooBig:__("File is too big (%sMiB), Max filesize: %sMiB","{{filesize}}","{{maxFilesize}}"),dictInvalidFileType:__("You can't upload files of this type"),dictResponseError:__("Server responded with %s code.","{{statusCode}}"),dictCancelUpload:__("Cancel upload"),dictUploadCanceled:__("Upload canceled"),dictCancelUploadConfirmation:__("Are you sure you want to cancel this upload?"),dictRemoveFile:__("Remove file"),dictMaxFilesExceeded:__("You can only upload a maximum of %s files","{{maxFiles}}"),init:function(){o.events.onInit.call(this),t(">i",this.element).addClass("dz-message"),this.options.elementHtml=t(this.element).html()},sending:function(t,e,i){void 0!==t.category&&i.append("category",t.category)},addedfile:function(e){
+var i=t(this.element).data("params")||{},n=void 0!==i.category?i.category:t(this.element).data("category")||"";e.category="function"==typeof n?n.call(this,e):n},addedfiles:function(e){if(this.options.maxFiles&&(!this.options.maxFiles||this.options.maxFiles>1)&&this.options.inputId){var i=t("#"+this.options.inputId);if(i.length>0){var n=t.trim(i.val()),o=""===n?0:n.split(/\,/).length,a=this.options.maxFiles-o;if(0===a||e.length>a){e=Array.prototype.slice.call(e,a);for(var s=0;s"+(n&&void 0!==n.responseText?n.responseText:i)+"");a.find("style, title, script").remove();var s=a.text()||__("Network error"),r={code:0,data:null,msg:s};o.events.onUploadError(this,r,e)},uploadprogress:function(e,i,n){e.upload.chunked&&t(this.element).prop("disabled",!0).html(" "+__("Upload")+Math.floor(e.upload.bytesSent/e.size*100)+"%")},totaluploadprogress:function(e,i){this.getActiveFiles().length>0&&!this.options.chunking&&t(this.element).prop("disabled",!0).html(" "+__("Upload")+Math.floor(e)+"%")},queuecomplete:function(){o.events.onUploadComplete(this,this.files),this.removeAllFiles(!0),t(this.element).prop("disabled",!1).html(this.options.elementHtml)},chunkSuccess:function(t,e,i){},chunksUploaded:function(e,i){var n=this;Fast.api.ajax({url:this.options.url,data:t.extend({},p,{action:"merge",filesize:e.size,filename:e.name,chunkid:e.upload.uuid,chunkcount:e.upload.totalChunkCount})},function(t,e){return i(JSON.stringify(e)),!1},function(t,i){e.accepted=!1,n._errorProcessing([e],i.msg)})},onUploadSuccess:a,onUploadError:s,onUploadComplete:r},o.options,w)),g&&f&&require(["dragsort"],function(){t("#"+g).dragsort({dragSelector:"li a:not(.btn-trash)",dragEnd:function(){t("#"+g).trigger("fa.preview.change")},placeHolderTemplate:' '})});var k=function(e){var i={},n=t("textarea[name='"+e+"']"),o=n.prev("ul");t.each(t("input,select,textarea",o).serializeArray(),function(t,e){var n=/\[?(\w+)\]?\[(\w+)\]$/g,o=n.exec(e.name);if(!o)return!0;isNaN(o[2])?(o[1]="x"+parseInt(o[1]),void 0===i[o[1]]&&(i[o[1]]={}),i[o[1]][o[2]]=e.value):i[t]=e.value});var a=[];t.each(i,function(t,e){a.push(e)}),n.val(JSON.stringify(a))};g&&m&&(t(document.body).on("keyup change","#"+m,function(i){var a=t("#"+m).val(),s=a.split(/\,/),r=t("#"+g);r.empty();var l=r.data("template")?r.data("template"):"",c=r.next().is("textarea")?r.next("textarea").val():"{}",d={};try{d=JSON.parse(c)}catch(i){}t.each(s,function(i,a){if(!a)return!0;var s=/[\.]?([a-zA-Z0-9]+)$/.exec(a);s=s?s[1]:"file";var c=t(e).data(),u=void 0!==c.cdnurl?Fast.api.cdnurl(a,c.cdnurl):Fast.api.cdnurl(a);a=Config.upload.fullmode?u:a;var h=d&&void 0!==d[i]?d[i]:null,p={url:a,fullurl:u,data:c,key:i,index:i,value:h,row:h,suffix:s},f=l?n(l,p):n.render(o.config.previewtpl,p);r.append(f)}),k(r.data("name"))}),t("#"+m).trigger("change")),g&&(t("#"+g).on("change keyup","input,textarea,select",function(){k(t(this).closest("ul").data("name"))}),t(document.body).on("fa.preview.change","#"+g,function(){var e=[];t("#"+g+" [data-url]").each(function(i,n){e.push(t(this).data("url"))}),m&&t("#"+m).val(e.join(",")),k(t("#"+g).data("name"))}),t(document.body).on("click","#"+g+" .btn-trash",function(){t(this).closest("li").remove(),t("#"+g).trigger("fa.preview.change")})),m&&(t("#"+m).closest("form").on("reset",function(){setTimeout(t.proxy(function(){t("#"+m,this).trigger("change")},this),0)}),t("body").on("paste drop","#"+m,function(e){var i=e.originalEvent,n=t(".plupload[data-input-id='"+t(this).attr("id")+"'],.faupload[data-input-id='"+t(this).attr("id")+"']");if("paste"===e.type&&i.clipboardData&&i.clipboardData.items){var a=i.clipboardData.items;if(!(1===a.length&&a[0].type.indexOf("text")>-1||2===a.length&&a[1].type.indexOf("text")>-1))return o.list[n.attr("id")].paste(i),!1}if("drop"===e.type&&i.dataTransfer&&i.dataTransfer.files)return o.list[n.attr("id")].drop(i),!1}))})},plupload:function(t,e,i,n){return o.api.upload(t,e,i,n)},faupload:function(t,e,i,n){return o.api.upload(t,e,i,n)},send:function(e,n,a,s){var r=Layer.msg(__("Uploading"),{offset:"t",time:0}),l="dropzone-"+i.uuidv4();t(' ').appendTo("body"),t("#"+l).data("upload-complete",function(t){Layer.close(r),o.list[l].removeAllFiles(!0)}),o.api.upload("#"+l,n,a,s),setTimeout(function(){o.list[l].addFile(e)},1)},custom:{afteruploadcallback:function(t){console.log(this,t),alert("Custom Callback,Response URL:"+t.url)}}}};return o}),function(t){"object"==typeof module&&module.exports?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define("validator",["jquery"],t):t(jQuery)}(function(t,e){"use strict";function i(e,n){function o(){a.$el=t(e),a.$el.length?a._init(a.$el[0],n):F(e)&&(I[e]=n)}var a=this;if(!(a instanceof i))return new i(e,n);i.pending?t(window).on("validatorready",o):o()}function n(e){function i(){var e=this.options;for(var i in e)i in R&&(this[i]=e[i]);t.extend(this,{_valHook:function(){return"true"===this.element.contentEditable?"text":"val"},getValue:function(){var e=this.element;return"number"===e.type&&e.validity&&e.validity.badInput?"NaN":t(e)[this._valHook()]()},setValue:function(e){t(this.element)[this._valHook()](this.value=e)},getRangeMsg:function(t,e,i){function n(t,e){return l?t>e:t>=e}if(e){var o,a=this,s=a.messages[a._r]||"",r=e[0].split("~"),l="false"===e[1],c=r[0],d=r[1],u="rg",h=[""],p=A(t)&&+t==+t;return 2===r.length?c&&d?(p&&n(t,+c)&&n(+d,t)&&(o=!0),h=h.concat(r),u=l?"gtlt":"rg"):c&&!d?(p&&n(t,+c)&&(o=!0),h.push(c),u=l?"gt":"gte"):!c&&d&&(p&&n(+d,t)&&(o=!0),h.push(d),u=l?"lt":"lte"):(t===+c&&(o=!0),h.push(c),u="eq"),s&&(i&&s[u+i]&&(u+=i),h[0]=s[u]),o||a._rules&&(a._rules[a._i].msg=a.renderMsg.apply(null,h))}},renderMsg:function(){var t=arguments,e=t[0],i=t.length;if(e){for(;--i;)e=e.replace("{"+i+"}",t[i]);return e}}})}function n(i,n,o){this.key=i,this.validator=e,t.extend(this,o,n)}return i.prototype=e,n.prototype=new i,n}function o(t,e){if(M(t)){var i,n=e?!0===e?this:e:o.prototype;for(i in t)p(i)&&(n[i]=s(t[i]))}}function a(t,e){if(M(t)){var i,n=e?!0===e?this:e:a.prototype;for(i in t)n[i]=t[i]}}function s(e){switch(t.type(e)){case"function":return e;case"array":var i=function(){return e[0].test(this.value)||e[1]||!1};return i.msg=e[1],i;case"regexp":return function(){return e.test(this.value)}}}function r(e){var i,n,o;if(e&&e.tagName){switch(e.tagName){case"INPUT":case"SELECT":case"TEXTAREA":case"BUTTON":case"FIELDSET":i=e.form||t(e).closest("."+y);break;case"FORM":i=e;break;default:i=t(e).closest("."+y)}for(n in I)if(t(i).is(n)){o=I[n];break}return t(i).data(g)||t(i)[g](o).data(g)}}function l(t,e){var i=A(L(t,b+"-"+e));if(i&&(i=new Function("return "+i)()))return s(i)}function c(t,e,i){var n=e.msg,o=e._r;return M(n)&&(n=n[o]),F(n)||(n=L(t,w+"-"+o)||L(t,w)||(i?F(i)?i:i[o]:"")),n}function d(t){var e;return t&&(e=S.exec(t)),e&&e[0]}function u(t){return"INPUT"===t.tagName&&"checkbox"===t.type||"radio"===t.type}function h(t){return Date.parse(t.replace(/\.|\-/g,"/"))}function p(t){return/^\w+$/.test(t)}function f(t){var e="#"===t.charAt(0);return t=t.replace(/([:.{(|)}/\[\]])/g,"\\$1"),e?t:'[name="'+t+'"]:first'}var m,g="validator",v="."+g,y="nice-"+g,b="data-rule",w="data-msg",x=/(&)?(!)?\b(\w+)(?:\[\s*(.*?\]?)\s*\]|\(\s*(.*?\)?)\s*\))?\s*(;|\|)?/g,k=/(\w+)(?:\[\s*(.*?\]?)\s*\]|\(\s*(.*?\)?)\s*\))?/,_=/(?:([^:;\(\[]*):)?(.*)/,C=/[^\x00-\xff]/g,S=/top|right|bottom|left/,T=/(?:(cors|jsonp):)?(?:(post|get):)?(.+)/i,D=/[<>'"`\\]|?\d+[A-F]?;?|%3[A-F]/gim,$=t.noop,E=t.proxy,A=t.trim,O=t.isFunction,F=function(t){return"string"==typeof t},M=function(t){return t&&"[object Object]"===Object.prototype.toString.call(t)},P=document.documentMode||+(navigator.userAgent.match(/MSIE (\d+)/)&&RegExp.$1),L=function(t,i,n){return t&&t.tagName?n===e?t.getAttribute(i):void(null===n?t.removeAttribute(i):t.setAttribute(i,""+n)):null},I={},N={debug:0,theme:"default",ignore:"",focusInvalid:!0,focusCleanup:!1,stopOnError:!1,beforeSubmit:null,valid:null,invalid:null,validation:null,formClass:"n-default",validClass:"n-valid",invalidClass:"n-invalid",bindClassTo:null,remoteDataType:"cors"},R={timely:1,display:null,target:null,ignoreBlank:!1,showOk:!0,dataFilter:function(t){if(F(t)||M(t)&&("error"in t||"ok"in t))return t},msgMaker:function(e){var i;return i=''+e.arrow,e.result?t.each(e.result,function(t,n){i+=''+e.icon+''+n.msg+" "}):i+=e.icon+''+e.msg+" ",i+=" "},msgWrapper:"span",msgArrow:"",msgIcon:' ',msgClass:"n-right",msgStyle:"",msgShow:null,msgHide:null},j={};return t.fn.validator=function(e){var n=this,o=arguments;return n.is(":verifiable")?n:(n.is("form")||(n=this.find("form")),n.length||(n=this),n.each(function(){var n=t(this).data(g);if(n)if(F(e)){if("_"===e.charAt(0))return;n[e].apply(n,[].slice.call(o,1))}else e&&(n._reset(!0),n._init(this,e));else new i(this,e)}),this)},t.fn.isValid=function(t,i){var n,o,a=r(this[0]),s=O(t);return!a||(s||i!==e||(i=t),a.checkOnly=!!i,o=a.options,n=a._multiValidate(this.is(":verifiable")?this:this.find(":verifiable"),function(e){e||!o.focusInvalid||a.checkOnly||a.$el.find("[aria-invalid]:first").focus(),s&&(t.length?t(e):e&&t()),a.checkOnly=!1}),s?this:n)},t.extend(t.expr.pseudos||t.expr[":"],{verifiable:function(t){var e=t.nodeName.toLowerCase();return("input"===e&&!{submit:1,button:1,reset:1,image:1}[t.type]||"select"===e||"textarea"===e||"true"===t.contentEditable)&&!t.disabled},filled:function(e){return!!A(t(e).val())}}),i.prototype={_init:function(e,i){var s,r,l,c=this;O(i)&&(i={valid:i}),i=c._opt=i||{},l=L(e,"data-"+g+"-option"),l=c._dataOpt=l&&"{"===l.charAt(0)?new Function("return "+l)():{},r=c._themeOpt=j[i.theme||l.theme||N.theme],s=c.options=t.extend({},N,R,r,c.options,i,l),c.rules=new o(s.rules,!0),c.messages=new a(s.messages,!0),c.Field=n(c),c.elements=c.elements||{},c.deferred={},c.errors={},c.fields={},c._initFields(s.fields),c.$el.data(g)||(c.$el.data(g,c).addClass(y+" "+s.formClass).on("form-submit-validate",function(t,e,i,n,o){c.vetoed=o.veto=!c.isValid,c.ajaxFormOptions=n}).on("submit"+v+" validate"+v,E(c,"_submit")).on("reset"+v,E(c,"_reset")).on("showmsg"+v,E(c,"_showmsg")).on("hidemsg"+v,E(c,"_hidemsg")).on("focusin"+v+" click"+v,":verifiable",E(c,"_focusin")).on("focusout"+v+" validate"+v,":verifiable",E(c,"_focusout")).on("keyup"+v+" input"+v+" compositionstart compositionend",":verifiable",E(c,"_focusout")).on("click"+v,":radio,:checkbox","click",E(c,"_focusout")).on("change"+v,'select,input[type="file"]',"change",E(c,"_focusout")),c._NOVALIDATE=L(e,"novalidate"),L(e,"novalidate","novalidate")),F(s.target)&&c.$el.find(s.target).addClass("msg-container")},_guessAjax:function(e){function i(e,i,n){return!!(e&&e[i]&&t.map(e[i],function(t){return~t.namespace.indexOf(n)?1:null}).length)}var n=this;if(!(n.isAjaxSubmit=!!n.options.valid)){var o=(t._data||t.data)(e,"events");n.isAjaxSubmit=i(o,"valid","form")||i(o,"submit","form-plugin")}},_initFields:function(t){function e(t,e){if(null===e||s){var i=a.elements[t];i&&a._resetElement(i,!0),delete a.fields[t]}else a.fields[t]=new a.Field(t,F(e)?{rule:e}:e,a.fields[t])}var i,n,o,a=this,s=null===t;if(s&&(t=a.fields),M(t))for(i in t)if(~i.indexOf(","))for(n=i.split(","),o=n.length;o--;)e(A(n[o]),t[i]);else e(i,t[i]);a.$el.find(":verifiable").each(function(){a._parse(this)})},_parse:function(t){var e,i,n,o=this,a=t.name,s=L(t,b);return s&&L(t,b,null),t.id&&("#"+t.id in o.fields||!a||null!==s&&(e=o.fields[a])&&s!==e.rule&&t.id!==e.key)&&(a="#"+t.id),a||(a="#"+(t.id="N"+String(Math.random()).slice(-12))),e=o.getField(a,!0),e.rule=s||e.rule,(i=L(t,"data-display"))&&(e.display=i),e.rule&&((null!==L(t,"data-must")||/\b(?:match|checked)\b/.test(e.rule))&&(e.must=!0),/\brequired\b/.test(e.rule)&&(e.required=!0),(n=L(t,"data-timely"))?e.timely=+n:e.timely>3&&L(t,"data-timely",e.timely),o._parseRule(e),e.old={}),F(e.target)&&L(t,"data-target",e.target),F(e.tip)&&L(t,"data-tip",e.tip),o.fields[a]=e},_parseRule:function(i){var n=_.exec(i.rule);n&&(i._i=0,n[1]&&(i.display=n[1]),n[2]&&(i._rules=[],n[2].replace(x,function(){var n=arguments;n[4]=n[4]||n[5],i._rules.push({and:"&"===n[1],not:"!"===n[2],or:"|"===n[6],method:n[3],params:n[4]?t.map(n[4].split(", "),A):e})})))},_multiValidate:function(i,n){var o=this,a=o.options;return o.hasError=!1,a.ignore&&(i=i.not(a.ignore)),i.each(function(){if(o._validate(this),o.hasError&&a.stopOnError)return!1}),n&&(o.validating=!0,t.when.apply(null,t.map(o.deferred,function(t){return t})).done(function(){n.call(o,!o.hasError),o.validating=!1})),t.isEmptyObject(o.deferred)?!o.hasError:e},_submit:function(i){var n=this,o=n.options,a=i.target,s="submit"===i.type&&"FORM"===a.tagName&&!i.isDefaultPrevented();i.preventDefault(),m&&~(m=!1)||n.submiting||"validate"===i.type&&n.$el[0]!==a||O(o.beforeSubmit)&&!1===o.beforeSubmit.call(n,a)||(n.isAjaxSubmit===e&&n._guessAjax(a),n._debug("log","\n<<< event: "+i.type),n._reset(),n.submiting=!0,n._multiValidate(n.$el.find(":verifiable"),function(e){var i,r=e||2===o.debug?"valid":"invalid";e||(o.focusInvalid&&n.$el.find("[aria-invalid]:first").focus(),i=t.map(n.errors,function(t){return t})),n.submiting=!1,n.isValid=e,O(o[r])&&o[r].call(n,a,i),n.$el.trigger(r+".form",[a,i]),n._debug("log",">>> "+r),e&&(n.vetoed?t(a).ajaxSubmit(n.ajaxFormOptions):s&&!n.isAjaxSubmit&&document.createElement("form").submit.call(a))}))},_reset:function(t){var e=this;e.errors={},t&&(e.reseting=!0,e.$el.find(":verifiable").each(function(){e._resetElement(this)}),delete e.reseting)},_resetElement:function(t,e){this._setClass(t,null),this.hideMsg(t)},_focusin:function(t){var e,i,n=this,o=n.options,a=t.target;n.validating||"click"===t.type&&document.activeElement===a||(o.focusCleanup&&"true"===L(a,"aria-invalid")&&(n._setClass(a,null),n.hideMsg(a)),i=L(a,"data-tip"),i?n.showMsg(a,{type:"tip",msg:i}):(L(a,b)&&n._parse(a),(e=L(a,"data-timely"))&&(8!==e&&9!==e||n._focusout(t))))},_focusout:function(e){var i,n,o,a,s,r,l,c,d,h=this,p=h.options,f=e.target,m=e.type,g="focusin"===m,v="validate"===m,y=0;if("compositionstart"===m&&(h.pauseValidate=!0),"compositionend"===m&&(h.pauseValidate=!1),!h.pauseValidate&&(n=f.name&&u(f)?h.$el.find('input[name="'+f.name+'"]').get(0):f,(o=h.getField(n))&&o.rule)){if(i=o._e,o._e=m,d=o.timely,!v){if(!d||u(f)&&"click"!==m)return;if(s=o.getValue(),o.ignoreBlank&&!s&&!g)return void h.hideMsg(f);if("focusout"===m){if("change"===i)return;if(2===d||8===d){if(a=o.old,!s||!a)return;o.isValid&&!a.showOk?h.hideMsg(f):h._makeMsg(f,o,a)}}else{if(d<2&&!e.data)return;if((r=+new Date)-(f._ts||0)<100)return;if(f._ts=r,"keyup"===m){if("input"===i)return;if(l=e.keyCode,c={8:1,9:1,16:1,32:1,46:1},9===l&&!s)return;if(l<48&&!c[l])return}g||(y=d<100?"click"===m||"SELECT"===f.tagName?0:400:d)}}p.ignore&&t(f).is(p.ignore)||(clearTimeout(o._t),y?o._t=setTimeout(function(){h._validate(f,o)},y):(v&&(o.old={}),h._validate(f,o)))}},_setClass:function(e,i){var n=t(e),o=this.options;o.bindClassTo&&(n=n.closest(o.bindClassTo)),n.removeClass(o.invalidClass+" "+o.validClass),null!==i&&n.addClass(i?o.validClass:o.invalidClass)},_showmsg:function(t,e,i){var n=this,o=t.target;n.$el.is(o)?M(e)?n.showMsg(e):"tip"===e&&n.$el.find(":verifiable[data-tip]",o).each(function(){n.showMsg(this,{type:e,msg:i})}):n.showMsg(o,{type:e,msg:i})},_hidemsg:function(e){var i=t(e.target);i.is(":verifiable")&&this.hideMsg(i)},_validatedField:function(e,i,n){var o=this,a=o.options,s=i.isValid=n.isValid=!!n.isValid,r=s?"valid":"invalid";n.key=i.key,n.ruleName=i._r,n.id=e.id,n.value=i.value,o.elements[i.key]=n.element=e,o.isValid=o.$el[0].isValid=s?o.isFormValid():s,s?n.type="ok":(o.submiting&&(o.errors[i.key]=n.msg),o.hasError=!0),i.old=n,O(i[r])&&i[r].call(o,e,n),O(a.validation)&&a.validation.call(o,e,n),t(e).attr("aria-invalid",!s||null).trigger(r+".field",[n,o]),o.$el.triggerHandler("validation",[n,o]),o.checkOnly||(o._setClass(e,n.skip||"tip"===n.type?null:s),o._makeMsg.apply(o,arguments))},_makeMsg:function(e,i,n){i.msgMaker&&(n=t.extend({},n),"focusin"===i._e&&(n.type="tip"),this[n.showOk||n.msg||"tip"===n.type?"showMsg":"hideMsg"](e,n,i))},_validatedRule:function(i,n,o,a){n=n||u.getField(i),a=a||{};var s,r,l,d,u=this,h=n._r,p=n.timely,f=9===p||8===p,m=!1;if(null===o)return u._validatedField(i,n,{isValid:!0,skip:!0}),void(n._i=0);if(o===e?l=!0:!0===o||""===o?m=!0:F(o)?s=o:M(o)?o.error?s=o.error:(s=o.ok,m=!0):m=!!o,r=n._rules[n._i],r.not&&(s=e,m="required"===h||!m),r.or)if(m)for(;n._i "+(m||s)),(m||f)&&n._i").attr({class:"msg-box"+(n.cls?" "+n.cls:""),style:n.style||e,for:a}),r)o.appendTo(r);else if(u(i)){var c=l.parent();o.appendTo(c.is("label")?c.parent():c)}else o[n.pos&&"right"!==n.pos?"insertBefore":"insertAfter"](l);return o},showMsg:function(e,i,n){if(e){var o,a,s,r,l=this,c=l.options;if(M(e)&&!e.jquery&&!i)return void t.each(e,function(t,e){var i=l.elements[t]||l.$el.find(f(t))[0];l.showMsg(i,e)});t(e).is(":verifiable")&&(n=n||l.getField(e)),(a=(n||c).msgMaker)&&(i=l._getMsgOpt(i,n),e=(e.name&&u(e)?l.$el.find('input[name="'+e.name+'"]'):t(e)).get(0),i.msg||"error"===i.type||null!==(s=L(e,"data-"+i.type))&&(i.msg=s),F(i.msg)&&(r=l._getMsgDOM(e,i),!S.test(r[0].className)&&r.addClass(i.cls),6===P&&"bottom"===i.pos&&(r[0].style.marginTop=t(e).outerHeight()+"px"),r.html(a.call(l,i))[0].style.display="",O(o=n&&n.msgShow||c.msgShow)&&o.call(l,r,i.type)))}},hideMsg:function(e,i,n){var o,a,s=this,r=s.options;e=t(e).get(0),t(e).is(":verifiable")&&(n=n||s.getField(e))&&(n.isValid||s.reseting)&&L(e,"aria-invalid",null),i=s._getMsgOpt(i,n),i.hide=!0,a=s._getMsgDOM(e,i),a.length&&(O(o=n&&n.msgHide||r.msgHide)?o.call(s,a,i.type):(a[0].style.display="none",a[0].innerHTML=""))},getField:function(t,i){var n,o,a=this;if(F(t))n=t,t=e;else{if(L(t,b))return a._parse(t);n=t.id&&"#"+t.id in a.fields||!t.name?"#"+t.id:t.name}return((o=a.fields[n])||i&&(o=new a.Field(n)))&&(o.element=t),o},setField:function(t,e){var i={};t&&(F(t)?i[t]=e:i=t,this._initFields(i))},isFormValid:function(){var t,e,i=this.fields;for(t in i)if(e=i[t],e._rules&&(e.required||e.must||e.value)&&!e.isValid)return!1;return!0},holdSubmit:function(t){this.submiting=t===e||t},cleanUp:function(){this._reset(1)},destroy:function(){this._reset(1),this.$el.off(v).removeData(g),L(this.$el[0],"novalidate",this._NOVALIDATE)}},t(window).on("beforeunload",function(){this.focus()}),t(document).on("click",":submit",function(){var t,e=this;e.form&&((t=e.getAttributeNode("formnovalidate"))&&null!==t.nodeValue||null!==L(e,"novalidate"))&&(m=!0)}).on("focusin submit validate","form,."+y,function(e){if(null===L(this,"novalidate")){var i,n=t(this);!n.data(g)&&(i=r(this))&&(t.isEmptyObject(i.fields)?(L(this,"novalidate","novalidate"),n.off(v).removeData(g)):"focusin"===e.type?i._focusin(e):i._submit(e))}}),new a({fallback:"This field is not valid.",loading:"Validating..."}),new o({required:function(e,i){var n=this,o=A(n.value),a=!0;if(i)if(1===i.length){if(p(i[0])){if(n.rules[i[0]]){if(!o&&!n.test(e,i[0]))return null;n._r="required"}}else if(!o&&!t(i[0],n.$el).length)return null}else if("not"===i[0])t.each(i.slice(1),function(){return a=o!==A(this)});else if("from"===i[0]){var s,r=n.$el.find(i[1]);return a=r.filter(function(){var t=n.getField(this);return t&&!!A(t.getValue())}).length>=(i[2]||1),a?o||(s=null):s=c(r[0],n)||!1,t(e).data("_validated_")||r.data("_validated_",1).each(function(){e!==this&&n._validate(this)}).removeData("_validated_"),s}return a&&!!o},integer:function(t,e){var i,n="0|",o="[1-9]\\d*",a=e?e[0]:"*";switch(a){case"+":i=o;break;case"-":i="-"+o;break;case"+0":i=n+o;break;case"-0":i="0|-"+o;break;default:i="0|-?"+o}return i="^(?:"+i+")$",new RegExp(i).test(this.value)||this.messages.integer&&this.messages.integer[a]},match:function(e,i){if(i){var n,o,a,s,r,l,c,d=this,u=!0,p="eq";if(1===i.length?a=i[0]:(p=i[0],a=i[1]),r=f(a),l=d.$el.find(r)[0]){if(c=d.getField(l),n=d.value,o=c.getValue(),d._match||(d.$el.on("valid.field"+v,r,function(){t(e).trigger("validate")}),d._match=c._match=1),!d.required&&""===n&&""===o)return null;if(s=i[2],s&&(/^date(time)?$/i.test(s)?(n=h(n),o=h(o)):"time"===s&&(n=+n.replace(/:/g,""),o=+o.replace(/:/g,""))),"eq"!==p&&!isNaN(+n)&&isNaN(+o))return!0;switch(p){case"lt":u=+n<+o;break;case"lte":u=+n<=+o;break;case"gte":u=+n>=+o;break;case"gt":u=+n>+o;break;case"neq":u=n!==o;break;default:u=n===o}return u||M(d.messages.match)&&d.messages.match[p].replace("{1}",d._getDisplay(l,c.display||a))}}},range:function(t,e){return this.getRangeMsg(this.value,e)},checked:function(t,e){if(u(t)){var i,n,o=this;return t.name?n=o.$el.find('input[name="'+t.name+'"]').filter(function(){var t=this;return!i&&u(t)&&(i=t),!t.disabled&&t.checked}).length:(i=t,n=i.checked),e?o.getRangeMsg(n,e):!!n||c(i,o,"")||o.messages.required||!1}},length:function(t,e){var i=this.value,n=("true"===e[1]?i.replace(C,"xx"):i).length;return this.getRangeMsg(n,e,e[1]?"_2":"")},remote:function(e,i){if(i){var n,o=this,a=T.exec(i[0]),s=o._rules[o._i],r={},l="",c=a[3],d=a[2]||"POST",u=(a[1]||this.validator.options.remoteDataType||"").toLowerCase();return s.must=!0,(r[e.name]=o.value,i[1]&&t.map(i.slice(1),function(t){var e,i;~t.indexOf("=")?l+="&"+t:(e=t.split(":"),t=A(e[0]),i=A(e[1])||t,r[t]=o.$el.find(f(i)).val())}),r=t.param(r)+l,!o.must&&s.data&&s.data===r)?s.result:("cors"!==u&&/^https?:/.test(c)&&!~c.indexOf(location.host)&&(n="jsonp"),t.ajax({url:c,type:d,data:r,dataType:n}))}},filter:function(t,e){var i=this.value,n=i.replace(e?new RegExp("["+e[0]+"]","gm"):D,"");n!==i&&this.setValue(n)}}),i.config=function(e,i){function n(t,e){"rules"===t?new o(e):"messages"===t?new a(e):t in R?R[t]=e:N[t]=e}M(e)?t.each(e,n):F(e)&&n(e,i)},i.setTheme=function(e,i){M(e)?t.extend(!0,j,e):F(e)&&M(i)&&(j[e]=t.extend(j[e],i))},i.load=function(e){if(e){var n,o,a,s=document,r={},l=s.scripts[0];e.replace(/([^?=&]+)=([^]*)/g,function(t,e,i){r[e]=i}),n=r.dir||i.dir,i.css||""===r.css||(o=s.createElement("link"),o.rel="stylesheet",o.href=i.css=n+"jquery.validator.css",l.parentNode.insertBefore(o,l)),!i.local&&~e.indexOf("local")&&""!==r.local&&(i.local=(r.local||s.documentElement.lang||"en").replace("_","-"),i.pending=1,o=s.createElement("script"),o.src=n+"local/"+i.local+".js",a="onload"in o?"onload":"onreadystatechange",o[a]=function(){o.readyState&&!/loaded|complete/.test(o.readyState)||(o=o[a]=null,delete i.pending,t(window).triggerHandler("validatorready"))},l.parentNode.insertBefore(o,l))}},function(){for(var t,e,n=document.scripts,o=n.length,a=/(.*validator(?:\.min)?.js)(\?.*(?:local|css|dir)(?:=[\w\-]*)?)?/;o--&&!e;)t=n[o],e=(t.hasAttribute?t.src:t.getAttribute("src",4)||"").match(a);e&&(i.dir=e[1].split("/").slice(0,-1).join("/")+"/",i.load(e[2]))}(),t[g]=i}),function(t){"object"==typeof module&&module.exports?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define("validator-lang",["jquery"],t):t(jQuery)}(function(t){t.validator.config({rules:{digits:[/^\d+$/,"请填写数字"],letters:[/^[a-z]+$/i,"请填写字母"],date:[/^\d{4}-\d{2}-\d{2}$/,"请填写有效的日期,格式:yyyy-mm-dd"],time:[/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/,"请填写有效的时间,00:00到23:59之间"],email:[/^[\w\+\-]+(\.[\w\+\-]+)*@[a-z\d\-]+(\.[a-z\d\-]+)*\.([a-z]{2,4})$/i,"请填写有效的邮箱"],url:[/^(https?|s?ftp):\/\/\S+$/i,"请填写有效的网址"],qq:[/^[1-9]\d{4,}$/,"请填写有效的QQ号"],IDcard:[/^\d{6}(19|2\d)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)?$/,"请填写正确的身份证号码"],tel:[/^(?:(?:0\d{2,3}[\- ]?[1-9]\d{6,7})|(?:[48]00[\- ]?[1-9]\d{6}))$/,"请填写有效的电话号码"],mobile:[/^1[3-9]\d{9}$/,"请填写有效的手机号"],zipcode:[/^\d{6}$/,"请检查邮政编码格式"],chinese:[/^[\u0391-\uFFE5]+$/,"请填写中文字符"],username:[/^\w{3,12}$/,"请填写3-12位数字、字母、下划线"],password:[/^[\S]{6,16}$/,"请填写6-16位字符,不能包含空格"],accept:function(e,i){if(!i)return!0;var n=i[0],o=t(e).val();return"*"===n||new RegExp(".(?:"+n+")$","i").test(o)||this.renderMsg("只接受{1}后缀的文件",n.replace(/\|/g,","))}},messages:{0:"此处",fallback:"{0}格式不正确",loading:"正在验证...",error:"网络异常",timeout:"请求超时",required:"{0}不能为空",remote:"{0}已被使用",integer:{"*":"请填写整数","+":"请填写正整数","+0":"请填写正整数或0","-":"请填写负整数","-0":"请填写负整数或0"},match:{eq:"{0}与{1}不一致",neq:"{0}与{1}不能相同",lt:"{0}必须小于{1}",gt:"{0}必须大于{1}",lte:"{0}不能大于{1}",gte:"{0}不能小于{1}"},range:{rg:"请填写{1}到{2}的数",gte:"请填写不小于{1}的数",lte:"请填写最大{1}的数",gtlt:"请填写{1}到{2}之间的数",gt:"请填写大于{1}的数",lt:"请填写小于{1}的数"},checked:{eq:"请选择{1}项",rg:"请选择{1}到{2}项",gte:"请至少选择{1}项",lte:"请最多选择{1}项"},length:{eq:"请填写{1}个字符",rg:"请填写{1}到{2}个字符",gte:"请至少填写{1}个字符",lte:"请最多填写{1}个字符",eq_2:"",rg_2:"",gte_2:"",lte_2:""}}});var e='◆ ◆ ';t.validator.setTheme({simple_right:{formClass:"n-simple",msgClass:"n-right"},simple_bottom:{formClass:"n-simple",msgClass:"n-bottom"},yellow_top:{formClass:"n-yellow",msgClass:"n-top",msgArrow:e},yellow_right:{formClass:"n-yellow",msgClass:"n-right",msgArrow:e},yellow_right_effect:{formClass:"n-yellow",msgClass:"n-right",msgArrow:e,msgShow:function(t,e){var i=t.children();i.is(":animated")||("error"===e?i.css({left:"20px",opacity:0}).delay(100).show().stop().animate({left:"-4px",opacity:1},150).animate({left:"3px"},80).animate({left:0},80):i.css({left:0,opacity:1}).fadeIn(200))},msgHide:function(t,e){t.children().stop().delay(100).show().animate({left:"20px",opacity:0},300,function(){t.hide()})}}})}),define("form",["jquery","bootstrap","upload","validator","validator-lang"],function(t,e,i,n,e){var o={config:{fieldlisttpl:' '},events:{validator:function(e,i,n,a){e.is("form")&&(e.validator(t.extend({rules:{username:[/^\w{3,30}$/,__("Username must be 3 to 30 characters")],password:[/^[\S]{6,30}$/,__("Password must be 6 to 30 characters")]},validClass:"has-success",invalidClass:"has-error",bindClassTo:".form-group",formClass:"n-default n-bootstrap",msgClass:"n-right",stopOnError:!0,display:function(e){return t(e).closest(".form-group").find(".control-label").text().replace(/\:/,"")},dataFilter:function(t){return 1===t.code?t.msg?{ok:t.msg}:"":t.msg},target:function(e){var i=t(e).data("target");if(i&&t(i).length>0)return t(i);var n=t(e).closest(".form-group"),o=n.find("span.msg-box");return o.length?o:[]},valid:function(s){var r=this,l=t(".layer-footer [type=submit]",e);return r.holdSubmit(!0),l.addClass("disabled"),o.api.submit(t(s),function(e,n){if(r.holdSubmit(!1),l.removeClass("disabled"),!1===t(this).triggerHandler("success.form",[e,n]))return!1;if("function"==typeof i&&!1===i.call(t(this),e,n))return!1;var o=n.hasOwnProperty("msg")&&""!==n.msg?n.msg:__("Operation completed");if(parent.Toastr.success(o),parent.$(".btn-refresh").trigger("click"),window.name){var a=parent.Layer.getFrameIndex(window.name);parent.Layer.close(a)}return!1},function(e,i){return r.holdSubmit(!1),!1!==t(this).triggerHandler("error.form",[e,i])&&(l.removeClass("disabled"),("function"!=typeof n||!1!==n.call(t(this),e,i))&&void 0)},a)||(r.holdSubmit(!1),l.removeClass("disabled")),!1}},e.data("validator-options")||{})),t(".layer-footer [type=submit],.fixed-footer [type=submit],.normal-footer [type=submit]",e).removeClass("disabled"),e.on("click",".layer-close",function(){if(window.name){var t=parent.Layer.getFrameIndex(window.name);parent.Layer.close(t)}return!1}))},selectpicker:function(e){t(".selectpicker",e).length>0&&require(["bootstrap-select","bootstrap-select-lang"],function(){t.fn.selectpicker.Constructor.BootstrapVersion="3",t(".selectpicker",e).selectpicker(),t(e).on("reset",function(){setTimeout(function(){t(".selectpicker").selectpicker("refresh").trigger("change")},1)})})},selectpage:function(e){t(".selectpage",e).length>0&&(require(["selectpage"],function(){t(".selectpage",e).selectPage({eAjaxSuccess:function(t){return t.list=void 0!==t.rows?t.rows:void 0!==t.list?t.list:[],t.totalRow=void 0!==t.total?t.total:void 0!==t.totalRow?t.totalRow:t.list.length,t}})}),t(document).on("change",".sp_hidden",function(){t(this).trigger("validate")}),t(document).on("change",".sp_input",function(){t(this).closest(".sp_container").find(".sp_hidden").trigger("change")}),t(e).on("reset",function(){setTimeout(function(){t(".selectpage",e).each(function(){t(this).data("selectPageObject").elem.hidden.val(t(this).val()),t(this).selectPageRefresh()})},1)}))},cxselect:function(e){t("[data-toggle='cxselect']",e).length>0&&require(["cxselect"],function(){t.cxSelect.defaults.jsonName="name",t.cxSelect.defaults.jsonValue="value",
+t.cxSelect.defaults.jsonSpace="data",t("[data-toggle='cxselect']",e).cxSelect()})},citypicker:function(e){t("[data-toggle='city-picker']",e).length>0&&require(["citypicker"],function(){t(e).on("reset",function(){setTimeout(function(){t("[data-toggle='city-picker']").citypicker("refresh")},1)})})},datetimepicker:function(e){t(".datetimepicker",e).length>0&&require(["bootstrap-datetimepicker"],function(){var i={format:"YYYY-MM-DD HH:mm:ss",icons:{time:"fa fa-clock-o",date:"fa fa-calendar",up:"fa fa-chevron-up",down:"fa fa-chevron-down",previous:"fa fa-chevron-left",next:"fa fa-chevron-right",today:"fa fa-history",clear:"fa fa-trash",close:"fa fa-remove"},showTodayButton:!0,showClose:!0};t(".datetimepicker",e).parent().css("position","relative"),t(".datetimepicker",e).datetimepicker(i).on("dp.change",function(e){t(this,document).trigger("changed")})})},daterangepicker:function(e){t(".datetimerange",e).length>0&&require(["bootstrap-daterangepicker"],function(){var i={};i[__("Today")]=[Moment().startOf("day"),Moment().endOf("day")],i[__("Yesterday")]=[Moment().subtract(1,"days").startOf("day"),Moment().subtract(1,"days").endOf("day")],i[__("Last 7 Days")]=[Moment().subtract(6,"days").startOf("day"),Moment().endOf("day")],i[__("Last 30 Days")]=[Moment().subtract(29,"days").startOf("day"),Moment().endOf("day")],i[__("This Month")]=[Moment().startOf("month"),Moment().endOf("month")],i[__("Last Month")]=[Moment().subtract(1,"month").startOf("month"),Moment().subtract(1,"month").endOf("month")];var n={timePicker:!1,autoUpdateInput:!1,timePickerSeconds:!0,timePicker24Hour:!0,autoApply:!0,locale:{format:"YYYY-MM-DD HH:mm:ss",customRangeLabel:__("Custom Range"),applyLabel:__("Apply"),cancelLabel:__("Clear")},ranges:i},o=function(e,i){t(this.element).val(e.format(this.locale.format)+" - "+i.format(this.locale.format)),t(this.element).trigger("change").trigger("validate")};t(".datetimerange",e).each(function(){var e="function"==typeof t(this).data("callback")?t(this).data("callback"):o;t(this).on("apply.daterangepicker",function(t,i){e.call(i,i.startDate,i.endDate)}),t(this).on("cancel.daterangepicker",function(e,i){t(this).val("").trigger("change").trigger("validate")}),t(this).daterangepicker(t.extend(!0,{},n,t(this).data()||{},t(this).data("daterangepicker-options")||{}))})})},plupload:function(t){o.events.faupload(t)},faupload:function(e){t(".plupload,.faupload",e).length>0&&i.api.upload(t(".plupload,.faupload",e))},faselect:function(e){t(".faselect,.fachoose",e).length>0&&t(".faselect,.fachoose",e).off("click").on("click",function(){var e=this,i=!!t(this).data("multiple")&&t(this).data("multiple"),n=t(this).data("mimetype")?t(this).data("mimetype"):"",o=t(this).data("admin-id")?t(this).data("admin-id"):"",a=t(this).data("user-id")?t(this).data("user-id"):"";n=n.replace(/\/\*/gi,"/");var s=t(this).data("url")?t(this).data("url"):"undefined"!=typeof Backend?"general/attachment/select":"user/attachment";return parent.Fast.api.open(s+"?element_id="+t(this).attr("id")+"&multiple="+i+"&mimetype="+n+"&admin_id="+o+"&user_id="+a,__("Choose"),{callback:function(i){var n=t(e),o=t(n).data("maxcount"),a=t(n).data("input-id")?t(n).data("input-id"):"";if(o=void 0!==o?o:0,a&&i.multiple){var s=[],r=t("#"+a),l=t.trim(r.val());""!==l&&s.push(r.val());var c=""===l?0:l.split(/\,/).length,d=""!==i.url?i.url.split(/\,/):[];if(t.each(d,function(t,e){var i=Config.upload.fullmode?Fast.api.cdnurl(e):e;s.push(i)}),o>0){var u=o-c;if(d.length>u)return Toastr.error(__("You can choose up to %d file%s",u)),!1}var h=s.join(",");r.val(h).trigger("change").trigger("validate")}else if(a){var p=Config.upload.fullmode?Fast.api.cdnurl(i.url):i.url;t("#"+a).val(p).trigger("change").trigger("validate")}n.trigger("fa.event.selectedfile",i)}}),!1})},fieldlist:function(e){t(".fieldlist",e).length>0&&require(["dragsort","template"],function(i,n){var a=function(i){var n={},o=i.data("name"),a=t("textarea[name='"+o+"']",e),s=i.data("template");t.each(t("input,select,textarea",i).serializeArray(),function(t,e){var i=/\[(\w+)\]\[(\w+)\]$/g,o=i.exec(e.name);if(!o)return!0;o[1]="x"+parseInt(o[1]),void 0===n[o[1]]&&(n[o[1]]={}),n[o[1]][o[2]]=e.value});var r=i.data("usearray")||!1,l=i.data("keepempty")||!1,c=s||r?[]:{},d=Object.keys(Object.values(n)[0]||{}),u=!r&&d.indexOf("value")>-1&&(1===d.length||2===d.length&&d.indexOf("key")>-1);u&&2===d.length&&(c={}),t.each(n,function(t,e){e&&(u?2===d.length?(""!=e.key||l)&&(c["__PLACEHOLDKEY__"+e.key]=e.value):c.push(e.value):c.push(e))}),a.val(JSON.stringify(c).replace(/__PLACEHOLDKEY__/g,""))},s=function(e,i,a){var s=e.data("tag")||(e.is("table")?"tr":"dd"),r=e.data("index"),l=e.data("name"),c=e.data("template"),d=e.data();r=r?parseInt(r):0,e.data("index",r+1),i=i||{},i=void 0===i.key||void 0===i.value?{key:"",value:i}:i;var u=e.data("fieldlist-options")||{},h={index:r,name:l,data:d,options:u,key:i.key,value:i.value,row:i.value},p=c?n(c,h):n.render(o.config.fieldlisttpl,h),f=t(p);return!1!==u.deleteBtn&&!1!==u.removeBtn||!a||f.find(".btn-remove").remove(),!1===u.dragsortBtn&&a&&f.find(".btn-dragsort").remove(),!0!==u.readonlyKey&&!0!==u.disableKey||!a||f.find("input[name$='[key]']").prop("readonly",!0),f.attr("fieldlist-item",!0),f.insertAfter(t(s+"[fieldlist-item]",e).length>0?t(s+"[fieldlist-item]:last",e):t(s+":first",e)),t(".btn-append,.append",e).length>0?t(".btn-append,.append",e).trigger("fa.event.appendfieldlist",f):e.trigger("fa.event.appendfieldlist",f),f},r=t(".fieldlist",e);e.on("reset",function(){setTimeout(function(){r.trigger("fa.event.refreshfieldlist")})}),t(document).on("change keyup changed",".fieldlist input,.fieldlist textarea,.fieldlist select",function(){var e=t(this).closest(".fieldlist");a(e)}),r.on("click",".btn-append,.append",function(e,i){var n=t(this).closest(".fieldlist");s(n,i),a(n)}),r.on("click",".btn-remove",function(){var e=t(this).closest(".fieldlist"),i=e.data("tag")||(e.is("table")?"tr":"dd");t(this).closest(i).remove(),a(e)}),r.on("fa.event.appendtofieldlist",function(e,i){var n=t(this);s(n,i),a(n)}),r.on("fa.event.refreshfieldlist",function(){var i=t(this),n=t("textarea[name='"+i.data("name")+"']",e);t("[fieldlist-item]",i).remove();var o={};try{var a=n.val().replace(/"(\d+)"\:/g,'"__PLACEHOLDERKEY__$1":');o=JSON.parse(a)}catch(t){}t.each(o,function(t,e){s(i,{key:t.toString().replace("__PLACEHOLDERKEY__",""),value:e},!0)})}),r.each(function(){var i=t(this),n=i.data("tag")||(i.is("table")?"tr":"dd");i.dragsort({itemSelector:n,dragSelector:".btn-dragsort",dragEnd:function(){a(i)},placeHolderTemplate:t("<"+n+"/>")}),"object"==typeof i.data("options")&&!1===i.data("options").appendBtn&&t(".btn-append,.append",i).hide(),t("textarea[name='"+i.data("name")+"']",e).on("fa.event.refreshfieldlist",function(){t(this).closest(".fieldlist").trigger("fa.event.refreshfieldlist")})}),r.trigger("fa.event.refreshfieldlist")})},switcher:function(e){e.on("click","[data-toggle='switcher']",function(){if(t(this).hasClass("disabled"))return!1;var e=t.proxy(function(){var e=t(this).prev("input");if(e=t(this).data("input-id")?t("#"+t(this).data("input-id")):e,e.length>0){var i=t(this).data("yes"),n=t(this).data("no");e.val()==i?(e.val(n),t("i",this).addClass("fa-flip-horizontal text-gray")):(e.val(i),t("i",this).removeClass("fa-flip-horizontal text-gray")),e.trigger("change")}},this);return void 0!==t(this).data("confirm")?Layer.confirm(t(this).data("confirm"),function(t){e(),Layer.close(t)}):e(),!1})},bindevent:function(t){},slider:function(e){t("[data-role='slider'],input.slider",e).length>0&&require(["bootstrap-slider"],function(){t("[data-role='slider'],input.slider").removeClass("hidden").css("width",function(e,i){return t(this).parents(".form-control").width()}).slider().on("slide",function(e){var i=t(this).data();void 0!==i.unit&&t(this).parents(".form-control").siblings(".value").text(e.value+i.unit)})})},tagsinput:function(e){t("[data-role='tagsinput']",e).length>0&&require(["tagsinput","autocomplete"],function(){t("[data-role='tagsinput']").tagsinput(),e.on("reset",function(){setTimeout(function(){t("[data-role='tagsinput']").tagsinput("reset")},0)})})},autocomplete:function(e){t("[data-role='autocomplete']",e).length>0&&require(["autocomplete"],function(){t("[data-role='autocomplete']").autocomplete({onSelect:function(){t(this).trigger("change").trigger("validate")}})})},favisible:function(e){if(0!=t("[data-favisible]",e).length){var i=function(i){var n,o,a=i.split(/&&/),s=0,r=/^([a-z0-9\_]+)([>|<|=|\!]=?)(.*)$/i,l=/^('|")(.*)('|")$/,c=/^regex:(.*)$/,d={">":function(t,e){return t>e},">=":function(t,e){return t>=e},"<":function(t,e){return t-1},regex:function(t,e){var i=e.match(/^\/(.*?)\/([gim]*)$/);return(i?new RegExp(i[1],i[2]):new RegExp(e)).test(t)}},u=e.find(":disabled").removeAttr("disabled"),h=e.serializeArray(),p={};return u.attr("disabled","disabled"),t(h).each(function(t,e){n=e.name,o=e.value,n="[]"===n.substr(-2)?n.substr(0,n.length-2):n,p[n]=void 0!==p[n]?[p[n],o].join(","):o}),t.each(a,function(e,i){var n=r.exec(i);if(n){var o=n[1],a=n[2],u=n[3].toString();if("="===a){var h=l.exec(u);a=h?"==":"in",u=h?h[2]:u}var f=c.exec(u);f&&(a="regex",u=f[1]);var m="row["+o+"]";if(void 0===p[m])return!1;var g=p[m];t.isArray(g)&&(g=p[m].join(",")),[">",">=","<","<="].indexOf(a)>-1&&(g=parseFloat(g),u=parseFloat(u));var v=d[a](g,u);s+=v?1:0}}),s===a.length};e.on("keyup change click configchange","input,textarea,select",function(){t("[data-favisible][data-favisible!='']",e).each(function(){var e=t(this).data("favisible"),n=e?e.toString().split(/\|\|/):[],o=0;t.each(n,function(t,e){i(e)&&o++}),o>0?t(this).removeClass("hidden"):t(this).addClass("hidden")})}),setTimeout(function(){var t=e.data("validator");t&&(t.options.ignore+=(t.options.ignore?",":"")+".hidden[data-favisible] :hidden,.hidden[data-favisible]:hidden")},0),t("input,textarea,select",e).trigger("configchange")}}},api:{submit:function(e,i,n,o){if(0===e.length)return Toastr.error("表单未初始化完成,无法提交"),!1;if("function"==typeof o&&!1===o.call(e,i,n))return!1;var a=e.attr("method")?e.attr("method").toUpperCase():"GET";a=!a||"GET"!==a&&"POST"!==a?"GET":a,url=e.attr("action"),url=url||location.href;var s={},r=t("[name$='[]']",e);if(r.length>0){var l=e.serializeArray().map(function(e){return t(e).prop("name")});t.each(r,function(e,i){l.indexOf(t(this).prop("name"))<0&&(s[t(this).prop("name")]="")})}return Fast.api.ajax({type:a,url:url,data:e.serialize()+(Object.keys(s).length>0?"&"+t.param(s):""),dataType:"json",complete:function(e){var i=e.getResponseHeader("__token__");i&&t("input[name='__token__']").val(i)}},function(n,o){if(t(".form-group",e).removeClass("has-feedback has-success has-error"),n&&"object"==typeof n&&(void 0!==n.token&&t("input[name='__token__']").val(n.token),void 0!==n.callback&&"function"==typeof n.callback&&n.callback.call(e,n)),"function"==typeof i&&!1===i.call(e,n,o))return!1},function(i,o){if(i&&"object"==typeof i&&void 0!==i.token&&t("input[name='__token__']").val(i.token),"function"==typeof n&&!1===n.call(e,i,o))return!1}),!0},bindevent:function(e,i,n,a){e="object"==typeof e?e:t(e);var s=o.events;s.bindevent(e),s.validator(e,i,n,a),s.selectpicker(e),s.daterangepicker(e),s.selectpage(e),s.cxselect(e),s.citypicker(e),s.datetimepicker(e),s.faupload(e),s.faselect(e),s.fieldlist(e),s.slider(e),s.switcher(e),s.tagsinput(e),s.autocomplete(e),s.favisible(e)},custom:{}}};return o}),function(t){"use strict";var e=[],i=t.fn.bootstrapTable.utils.sprintf,n=function(e,n){var a=o(e,n),s=i('',n.options.searchFormVisible?"":"hidden");s+=a,s+="
",n.$container.prepend(t(s)),n.$commonsearch=t(".commonsearch-table",n.$container);var r=t("form.form-commonsearch",n.$commonsearch);require(["form"],function(t){t.api.bindevent(r),r.validator("destroy")}),r.on("submit",function(t){return t.preventDefault(),n.onCommonSearch(),!1}),r.on("click","button[type=reset]",function(t){r[0].reset(),setTimeout(function(){n.onCommonSearch()},1)})},o=function(n,o){if(o.options.searchFormTemplate)return Template(o.options.searchFormTemplate,{columns:n,table:o});var r=[];r.push(i('"),r.join("")},a=function(t){var e=[],n=t.options.formatCommonSubmitButton(),o=t.options.formatCommonResetButton();return e.push(''),e.push(i('%s ',n)),e.push(i('%s ',o)),e.push("
"),e},s=function(e,n,o){var a=e.constructor===Array,s=[];return s.push(i('%s ',o.options.formatCommonChoose())),t.each(e,function(t,e){e.constructor===Object?(t=e.id,e=e.name):t=a?e:t,s.push(i(""+Fast.api.escape(e)+" ",t==n.defaultValue?"selected":""))}),s},r=function(t){return!(!t.options.commonSearch||"server"!=t.options.sidePagination||!t.options.url)},l=function(i,n){var o={},a={},s="";return t("form.form-commonsearch .operate",i.$commonsearch).each(function(r){var l=t(this).data("name"),c=t(this).is("select")?t("option:selected",this).val():t(this).val().toUpperCase(),d=t("[name='"+l+"']",i.$commonsearch);if(0==d.length)return!0;var u=e[r],h=!i.options.searchFormTemplate&&u&&"function"==typeof u.process?u.process:null;if(d.length>1)if(/BETWEEN$/.test(c)){var p=t.trim(t("[name='"+l+"']:first",i.$commonsearch).val()),f=t.trim(t("[name='"+l+"']:last",i.$commonsearch).val());p.length||f.length?(h&&(p=h(p,"begin"),f=h(f,"end")),s=p+","+f):s="",t("[name='"+l+"']:first",i.$commonsearch).hasClass("datetimepicker")&&(c="RANGE")}else s=t("[name='"+l+"']:checked",i.$commonsearch).val(),s=h?h(s):s;else s=h?h(d.val()):d.val();if(n&&(""===s||null==s||t.isArray(s)&&0===s.length)&&!c.match(/null/i))return!0;o[l]=c,a[l]=s}),{op:o,filter:a}},c=function(e,i,n){return e.filter="Object"==typeof e.filter?e.filter:e.filter?JSON.parse(e.filter):{},e.op="Object"==typeof e.op?e.op:e.op?JSON.parse(e.op):{},e.filter=t.extend({},e.filter,i.filter),e.op=t.extend({},e.op,i.op),n&&t.each(e.filter,function(i,n){(""==n||null==n||t.isArray(n)&&0==n.length)&&!e.op[i].match(/null/i)&&(delete e.filter[i],delete e.op[i])}),e.filter=JSON.stringify(e.filter),e.op=JSON.stringify(e.op),e};t.extend(t.fn.bootstrapTable.defaults,{commonSearch:!1,titleForm:"Common search",actionForm:"",searchFormTemplate:"",searchFormVisible:!0,searchClass:"searchit",showSearch:!0,renderDefault:!0,onCommonSearch:function(t,e){return!1},onPostCommonSearch:function(t){return!1}}),t.extend(t.fn.bootstrapTable.defaults.icons,{commonSearchIcon:"glyphicon-search"}),t.extend(t.fn.bootstrapTable.Constructor.EVENTS,{"common-search.bs.table":"onCommonSearch","post-common-search.bs.table":"onPostCommonSearch"}),t.extend(t.fn.bootstrapTable.locales[t.fn.bootstrapTable.defaults.locale],{formatCommonSearch:function(){return"Common search"},formatCommonSubmitButton:function(){return"Search"},formatCommonResetButton:function(){return"Reset"},formatCommonCloseButton:function(){return"Close"},formatCommonChoose:function(){return"Choose"}}),t.extend(t.fn.bootstrapTable.defaults,t.fn.bootstrapTable.locales);var d=t.fn.bootstrapTable.Constructor,u=d.prototype.initHeader,h=d.prototype.initToolbar,p=d.prototype.load,f=d.prototype.initSearch;d.prototype.initHeader=function(){u.apply(this,Array.prototype.slice.apply(arguments)),this.$header.find("th[data-field]").each(function(e){var i=t(this).data();void 0!==i.width&&-1===i.width.toString().indexOf("%")&&(t(".th-inner",this).outerWidth(i.width),t(this).css("max-width",i.width))}),this.options.stateField=this.header.stateField},d.prototype.initToolbar=function(){if(h.apply(this,Array.prototype.slice.apply(arguments)),r(this)){var e=this,o=[];e.options.showSearch&&(o.push(i('',this.options.buttonsAlign,this.options.buttonsAlign)),o.push(i('',void 0===e.options.iconSize?"":" btn-"+e.options.iconSize,e.options.formatCommonSearch())),o.push(i(' ',e.options.iconsPrefix,e.options.icons.commonSearchIcon)),o.push("
")),e.$toolbar.find(".pull-right").length>0?t(o.join("")).insertBefore(e.$toolbar.find(".pull-right:first")):e.$toolbar.append(o.join("")),n(e.columns,e),e.$toolbar.find('button[name="commonSearch"]').off("click").on("click",function(){e.$commonsearch.toggleClass("hidden")}),e.$container.on("click","."+e.options.searchClass,function(){var i=t(this).data("value"),n=t(this).data("field"),o=e.$container.closest(".panel-intro").find("ul[data-field='"+n+"']");if(o.length>0)return void t('li a[data-value="'+i+'"][data-toggle="tab"]',o).trigger("click");var a=t("form [name='"+n+"']",e.$commonsearch);a.length>0&&(a.is("select")?t("option[value='"+i+"']",a).prop("selected",!0):a.length>1?t("form [name='"+n+"'][value='"+i+"']",e.$commonsearch).prop("checked",!0):a.val(i+""),a.trigger("change"),t("form",e.$commonsearch).trigger("submit"))});var a=e.options.queryParams;this.options.queryParams=function(t){return a(c(t,l(e,!0)))},this.trigger("post-common-search",e)}},d.prototype.onCommonSearch=function(){var t=l(this);this.trigger("common-search",this,t),this.options.pageNumber=1,this.refresh({})},d.prototype.load=function(t){p.apply(this,Array.prototype.slice.apply(arguments)),r(this)},d.prototype.initSearch=function(){if(f.apply(this,Array.prototype.slice.apply(arguments)),r(this)){var e=this,i=t.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=i?t.grep(this.data,function(n,o){for(var a in i){var s=i[a].toLowerCase(),r=n[a];if(r=t.fn.bootstrapTable.utils.calculateObjectValue(e.header,e.header.formatters[t.inArray(a,e.header.fields)],[r,n,o],r),-1===t.inArray(a,e.header.fields)||"string"!=typeof r&&"number"!=typeof r||-1===(r+"").toLowerCase().indexOf(s))return!1}return!0}):this.data}}}(jQuery),define("bootstrap-table-commonsearch",["bootstrap-table"],function(t){return function(){return t.$.fn.bootstrapTable.defaults}}(this)),function(t){"use strict";t.extend(t.fn.bootstrapTable.defaults,{templateView:!1,templateFormatter:"itemtpl",templateParentClass:"row row-flex",templateTableClass:"table-template"});var e=t.fn.bootstrapTable.Constructor,i=e.prototype.initContainer,n=e.prototype.initBody,o=e.prototype.initRow;e.prototype.initContainer=function(){i.apply(this,Array.prototype.slice.apply(arguments));var t=this;t.options.templateView&&(t.options.cardView=!0)},e.prototype.initBody=function(){var e=this;t.extend(e.options,{showHeader:!e.options.templateView&&t.fn.bootstrapTable.defaults.showHeader,showFooter:!e.options.templateView&&t.fn.bootstrapTable.defaults.showFooter}),t(e.$el).toggleClass(e.options.templateTableClass,e.options.templateView),n.apply(this,Array.prototype.slice.apply(arguments)),e.options.templateView&&t("> *:not(.no-records-found)",e.$body).wrapAll(t("
").addClass(e.options.templateParentClass))},e.prototype.initRow=function(t,e,i,n){var a=this;if(!a.options.templateView)return o.apply(a,Array.prototype.slice.apply(arguments));var s="";if("function"==typeof a.options.templateFormatter)s=a.options.templateFormatter.call(a,t,e,i);else{s=require("template")(a.options.templateFormatter,{item:t,i:e,data:i})}return s}}(jQuery),define("bootstrap-table-template",["bootstrap-table","template"],function(t){return function(){return t.$.fn.bootstrapTable.defaults}}(this)),function(t){"use strict";var e=t.fn.bootstrapTable.utils.sprintf;t.extend(t.fn.bootstrapTable.defaults,{showJumpto:!1,exportOptions:{}}),t.extend(t.fn.bootstrapTable.locales,{formatJumpto:function(){return"GO"}}),t.extend(t.fn.bootstrapTable.defaults,t.fn.bootstrapTable.locales);var i=t.fn.bootstrapTable.Constructor,n=i.prototype.initPagination;i.prototype.initPagination=function(){if(this.showToolbar=this.options.showExport,n.apply(this,Array.prototype.slice.apply(arguments)),this.options.showJumpto){var i=this,o=this.$pagination.find("ul.pagination"),a=o.find("li.jumpto");a.length||(a=t(['',' ',''+this.options.formatJumpto()," "," "].join("")).appendTo(o),a.find("button").click(function(){i.selectPage(parseInt(a.find("input").val()))}))}}}(jQuery),define("bootstrap-table-jumpto",["bootstrap-table"],function(t){return function(){return t.$.fn.bootstrapTable.defaults}}(this)),function(t){"use strict";function e(t){var e=0,a=0,s=0,r=0;return"detail"in t&&(a=t.detail),"wheelDelta"in t&&(a=-t.wheelDelta/120),"wheelDeltaY"in t&&(a=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=a,a=0),s=e*i,r=a*i,"deltaY"in t&&(r=t.deltaY),"deltaX"in t&&(s=t.deltaX),(s||r)&&t.deltaMode&&(1===t.deltaMode?(s*=n,r*=n):(s*=o,r*=o)),s&&!e&&(e=s<1?-1:1),r&&!a&&(a=r<1?-1:1),{spinX:e,spinY:a,pixelX:s,pixelY:r}}var i=10,n=40,o=800,a=null,s=function(){if(null===a){var e=t("
").addClass("fixed-table-scroll-inner"),i=t("
").addClass("fixed-table-scroll-outer"),n=void 0,o=void 0;i.append(e),t("body").append(i),n=e[0].offsetWidth,i.css("overflow","scroll"),o=e[0].offsetWidth,n===o&&(o=i[0].clientWidth),i.remove(),a=n-o}return a},r=function(t){return t[0].scrollHeight>t[0].clientHeight?15:0};t.extend(t.fn.bootstrapTable.defaults,{fixedColumns:!1,fixedNumber:0,fixedRightNumber:0});var l=t.fn.bootstrapTable.Constructor,c=l.prototype.initBody,d=l.prototype.initContainer,u=l.prototype.trigger,h=l.prototype.hideLoading,p=l.prototype.updateSelected;l.prototype.fixedColumnsSupported=function(){var t=this;return t.options.fixedColumns&&!t.options.detailView&&!t.options.cardView},l.prototype.initFixedContainer=function(){this.options.fixedNumber&&(0==this.$tableContainer.find(".fixed-columns").length&&this.$tableContainer.append('
'),this.$fixedColumns=this.$tableContainer.find(".fixed-columns")),this.options.fixedRightNumber&&(0==this.$tableContainer.find(".fixed-columns-right").length&&this.$tableContainer.append('
'),this.$fixedColumnsRight=this.$tableContainer.find(".fixed-columns-right"))},l.prototype.initContainer=function(){d.apply(this,Array.prototype.slice.apply(arguments)),this.initFixedContainer()},l.prototype.initBody=function(){c.apply(this,Array.prototype.slice.apply(arguments)),this.fixedColumnsSupported()&&(this.options.showHeader&&this.options.height||(this.initFixedColumnsBody(),this.initFixedColumnsEvents()))},l.prototype.trigger=function(){var t=this;u.apply(this,Array.prototype.slice.apply(arguments)),"pre-body"===arguments[0]&&this.options.cardView&&this.$tableBody.css("height","auto"),"toggle"===arguments[0]&&(arguments[1]?(this.$tableBody.css("height","auto"),this.$fixedColumns&&this.$fixedColumns.hide(),this.$fixedColumnsRight&&this.$fixedColumnsRight.hide()):(this.$tableBody.css("height","100%"),this.$fixedColumns&&this.$fixedColumns.show(),this.$fixedColumnsRight&&this.$fixedColumnsRight.show(),this.$fixedHeaderRight&&this.$fixedHeaderRight.scrollLeft(this.$tableBody.find("table").width()),this.$fixedBodyRight&&this.$fixedBodyRight.scrollLeft(this.$tableBody.find("table").width()))),t.fixedColumnsSupported()&&("post-header"===arguments[0]?this.initFixedColumnsHeader():"scroll-body"===arguments[0]?(this.needFixedColumns&&this.options.fixedNumber&&this.$fixedBody&&this.$fixedBody.scrollTop(this.$tableBody.scrollTop()),this.needFixedColumns&&this.options.fixedRightNumber&&this.$fixedBodyRight&&this.$fixedBodyRight.scrollTop(this.$tableBody.scrollTop())):"load-success"===arguments[0]&&this.hideLoading())},l.prototype.updateSelected=function(){var e=this;p.apply(this,Array.prototype.slice.apply(arguments)),this.fixedColumnsSupported()&&this.$tableBody.find("tr").each(function(i,n){var o=t(n),a=o.data("index"),s=o.attr("class"),r='[name="'+e.options.selectItemName+'"]',l=o.find(r);if(void 0!==a){var c=function(t,i){var n=i.find('tr[data-index="'+a+'"]');n.attr("class",s),l.length&&n.find(r).prop("checked",l.prop("checked")),e.$selectAll.length&&t.add(i).find('[name="btSelectAll"]').prop("checked",e.$selectAll.prop("checked"))};e.$fixedBody&&e.options.fixedNumber&&c(e.$fixedHeader,e.$fixedBody),e.$fixedBodyRight&&e.options.fixedRightNumber&&c(e.$fixedHeaderRight,e.$fixedBodyRight)}})},l.prototype.hideLoading=function(){h.apply(this,Array.prototype.slice.apply(arguments)),this.needFixedColumns&&this.options.fixedNumber&&this.$fixedColumns.find(".fixed-table-loading").hide(),this.needFixedColumns&&this.options.fixedRightNumber&&this.$fixedColumnsRight.find(".fixed-table-loading").hide()},l.prototype.initFixedColumnsHeader=function(){var t=this;this.options.height?this.needFixedColumns=this.$tableHeader.outerWidth(!0)a.clientWidth?s():0,l=t(".fixed-table-pagination",e.$tableContainer).height();void 0!==e.options.height&&(l=0),i.css({height:"calc(100% - "+(l+r)+"px)"}),o.css({height:"calc(100% - "+n.height()+"px)",overflow:"hidden"})};return t(window).on("resize",r),r(),o};this.needFixedColumns&&this.options.fixedNumber&&(this.$fixedBody=i(this.$fixedColumns,this.$fixedHeader)),this.needFixedColumns&&this.options.fixedRightNumber&&(this.$fixedBodyRight=i(this.$fixedColumnsRight,this.$fixedHeaderRight),this.$fixedBodyRight.scrollLeft(this.$fixedBodyRight.find("table").width()),this.$fixedBodyRight.css("overflow-y","hidden"))},l.prototype.getFixedColumnsWidth=function(t){var e=this.getVisibleFields(),i=0,n=this.options.fixedNumber;t&&(e=e.reverse(),n=this.options.fixedRightNumber,this.$fixedColumnsRight.css("right",r(this.$tableBody)));for(var o=0;o-1,a=o?"DOMMouseScroll":"mousewheel",s=function(t,n){var o=e(t),a=Math.ceil(o.pixelY),s=i.$tableBody.scrollTop()+a;(a<0&&s>0||a>0&&s table > tbody > tr[data-index] > td").off("click dblclick").on("click dblclick",function(e){var n=t(this).closest("tr[data-index]").data("index");t(i.$selectItem[n]).closest("tr[data-index]").find(">td:eq("+t(this).index()+")").trigger("click")})),t("div.fixed-table-body").off("scroll"),this.$tableBody.off("scroll").on("scroll",function(t){i.$tableHeader.scrollLeft(0),i.$tableBody.scrollLeft()>0&&(i.$tableHeader.scrollLeft(i.$tableBody.scrollLeft()),i.options.showFooter&&!i.options.cardView&&i.$tableFooter.scrollLeft(i.$tableBody.scrollLeft()));var e=i.$tableBody.scrollTop();i.$fixedBody&&i.$fixedBody.scrollTop(e),i.$fixedBodyRight&&i.$fixedBodyRight.scrollTop(e)}),
+this.needFixedColumns&&this.options.fixedRightNumber&&(this.$fixedBodyRight.find("tr").hover(function(t){n(t,!0)},function(t){n(t,!1)}),this.$fixedBodyRight[0].addEventListener(a,function(t){s(t,i.$fixedBodyRight[0])}),this.$fixedBodyRight.find('input[name="'+this.options.selectItemName+'"]').off("click").on("click",function(e){e.stopImmediatePropagation();var n=t(e.target).data("index");t(i.$selectItem[n]).trigger("click")}),this.$fixedBodyRight.find("> table > tbody > tr[data-index] > td").off("click dblclick").on("click dblclick",function(e){var n=t(this).closest("tr[data-index]").data("index");t(i.$selectItem[n]).closest("tr[data-index]").find(">td:eq("+t(this).index()+")").trigger("click")})),this.options.filterControl&&t(this.$fixedColumns).off("keyup change").on("keyup change",function(e){var n=t(e.target),o=n.val(),a=n.parents("th").data("field"),s=i.$header.find('th[data-field="'+a+'"]');if(n.is("input"))s.find("input").val(o);else if(n.is("select")){var r=s.find("select");r.find("option[selected]").removeAttr("selected"),r.find('option[value="'+o+'"]').attr("selected",!0)}i.triggerSearch()})}}(jQuery),define("bootstrap-table-fixed-columns",["bootstrap-table"],function(t){return function(){return t.$.fn.bootstrapTable.defaults}}(this)),define("table",["jquery","bootstrap","moment","moment/locale/zh-cn","bootstrap-table","bootstrap-table-lang","bootstrap-table-export","bootstrap-table-commonsearch","bootstrap-table-template","bootstrap-table-jumpto","bootstrap-table-fixed-columns"],function(t,e,i){var n={list:{},defaults:{url:"",sidePagination:"server",method:"get",toolbar:".toolbar",search:!0,cache:!1,commonSearch:!0,searchFormVisible:!1,titleForm:"",idTable:"commonTable",showExport:!0,exportDataType:"auto",exportTypes:["json","xml","csv","txt","doc","excel"],exportOptions:{fileName:"export_"+i().format("YYYY-MM-DD"),preventInjection:!1,mso:{onMsoNumberFormat:function(e,i,n){return isNaN(t(e).text())?"":"\\@"}},ignoreColumn:[0,"operate"]},pageSize:Config.pagesize||localStorage.getItem("pagesize")||10,pageList:[10,15,20,25,50,"All"],pagination:!0,clickToSelect:!0,dblClickToEdit:!0,singleSelect:!1,showRefresh:!1,showJumpto:!0,locale:"zh-cn"===Config.language?"zh-CN":"en-US",showToggle:!0,showColumns:!0,pk:"id",sortName:"id",sortOrder:"desc",paginationFirstText:__("First"),paginationPreText:__("Previous"),paginationNextText:__("Next"),paginationLastText:__("Last"),cardView:!1,iosCardView:!0,checkOnInit:!0,escape:!0,fixDropdownPosition:!0,dragCheckboxMultiselect:!0,selectedIds:[],selectedData:[],extend:{index_url:"",add_url:"",edit_url:"",del_url:"",import_url:"",multi_url:"",dragsort_url:"ajax/weigh"}},columnDefaults:{align:"center",valign:"middle"},config:{checkboxtd:"tbody>tr>td.bs-checkbox",toolbar:".toolbar",refreshbtn:".btn-refresh",addbtn:".btn-add",editbtn:".btn-edit",delbtn:".btn-del",importbtn:".btn-import",multibtn:".btn-multi",disabledbtn:".btn-disabled",editonebtn:".btn-editone",restoreonebtn:".btn-restoreone",destroyonebtn:".btn-destroyone",restoreallbtn:".btn-restoreall",destroyallbtn:".btn-destroyall",dragsortfield:"weigh"},button:{edit:{name:"edit",icon:"fa fa-pencil",title:__("Edit"),extend:'data-toggle="tooltip" data-container="body"',classname:"btn btn-xs btn-success btn-editone"},del:{name:"del",icon:"fa fa-trash",title:__("Del"),extend:'data-toggle="tooltip" data-container="body"',classname:"btn btn-xs btn-danger btn-delone"},dragsort:{name:"dragsort",icon:"fa fa-arrows",title:__("Drag to sort"),extend:'data-toggle="tooltip"',classname:"btn btn-xs btn-primary btn-dragsort"}},api:{init:function(e,i,o){e=e||{},i=i||{},o=o||{},t.fn.bootstrapTable.Constructor.prototype.getSelectItem=function(){return this.$selectItem};var a=t.fn.bootstrapTable.Constructor.prototype.onPageListChange;t.fn.bootstrapTable.Constructor.prototype.onPageListChange=function(){return a.apply(this,Array.prototype.slice.apply(arguments)),localStorage.setItem("pagesize",this.options.pageSize),!1},t.extend(!0,t.fn.bootstrapTable.defaults,n.defaults,e),t.extend(t.fn.bootstrapTable.columnDefaults,n.columnDefaults,i),t.extend(t.fn.bootstrapTable.locales[n.defaults.locale],{formatCommonSearch:function(){return __("Common search")},formatCommonSubmitButton:function(){return __("Search")},formatCommonResetButton:function(){return __("Reset")},formatCommonCloseButton:function(){return __("Close")},formatCommonChoose:function(){return __("Choose")},formatJumpto:function(){return __("Go")}},o),t.fn.bootstrapTable.defaults.iosCardView&&navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(n.defaults.cardView=!0,t.fn.bootstrapTable.defaults.cardView=!0),void 0!==e.exportTypes&&(t.fn.bootstrapTable.defaults.exportTypes=e.exportTypes)},bindevent:function(e){var i=e.closest(".bootstrap-table"),o=e.bootstrapTable("getOptions"),a=t(o.toolbar,i),s=t(".btn-selected-tips",i);0===s.length&&(s=t(' '+__("Multiple selection mode: %s checked","0 ")+" ").appendTo(a)),s.off("click").on("click",function(t){e.trigger("uncheckbox"),e.bootstrapTable("refresh")}),e.on("uncheckbox",function(t,e,i){o.selectedIds=[],o.selectedData=[],s.tooltip("hide"),s.addClass("hide")}),e.on("load-error.bs.table",function(t,e,i){0!==i.status&&Toastr.error(__("Unknown data format"))}),e.on("load-success.bs.table",function(t,e){void 0===e.rows&&void 0!==e.code&&Toastr.error(e.msg)}),e.on("refresh.bs.table",function(e,i,o){t(n.config.refreshbtn,a).find(".fa").addClass("fa-spin"),t(".layui-layer-autocontent").remove()}),e.on("search.bs.table common-search.bs.table",function(t,i,n){e.trigger("uncheckbox")}),o.dblClickToEdit&&e.on("dbl-click-row.bs.table",function(e,i,o,a){t(n.config.editonebtn,o).trigger("click")}),e.on("pre-body.bs.table",function(e,i){o.maintainSelected&&t.each(i,function(e,i){i[o.stateField]=t.inArray(i[o.pk],o.selectedIds)>-1})}),e.on("post-body.bs.table",function(i,s){if(t(n.config.refreshbtn,a).find(".fa").removeClass("fa-spin"),t(n.config.checkboxtd+":first",e).find("input[type='checkbox'][data-index]").length>0){var r,l,c,d=!1,u=!1,h=function(i){if(d){var o=Math.min(i.pageX,r),a=Math.min(i.pageY,l),s=Math.abs(r-i.pageX),u=Math.abs(l-i.pageY);c.css({left:o+"px",top:a+"px",width:s+"px",height:u+"px"});var h={x:o,y:a,width:s,height:u};t(n.config.checkboxtd,e).each(function(){var e=t("input:checkbox",this),i=this.getBoundingClientRect();i.x+=document.documentElement.scrollLeft,i.y+=document.documentElement.scrollTop;var n=i.x,o=i.y,a=i.x+i.width,s=i.y+i.height,r=h.x,l=h.y,c=h.x+h.width,d=h.y+h.height;n<=c&&a>=r&&o<=d&&s>=l?t(this).hasClass("overlaped")||(t(this).addClass("overlaped"),e.trigger("click")):t(this).hasClass("overlaped")&&(t(this).removeClass("overlaped"),e.trigger("click"))})}},p=function(){return!1},f=function(){d&&(t(document).off("mousemove",h),t(document).off("selectstart",p),c.remove()),d=!1,u=!1,t(document.body).css({MozUserSelect:"",webkitUserSelect:""}).attr("unselectable","off")};t(n.config.checkboxtd,e).on("mousedown",function(e){if(2===e.button||t(e.target).is("input"))return!1;r=e.pageX,l=e.pageY,u=!0}).on("mousemove",function(i){u&&!d&&(d=!0,c=t("
"),c.css({position:"absolute",width:0,height:0,border:"1px dashed blue",background:"#0029ff",left:i.pageX+"px",top:i.pageY+"px",opacity:.1}),c.appendTo(document.body),t(document.body).css({MozUserSelect:"none",webkitUserSelect:"none"}).attr("unselectable","on"),t(document).on("mousemove",h).on("mouseup",f).on("selectstart",p),o.dragCheckboxMultiselect&&t(n.config.checkboxtd,e).removeClass("overlaped"))})}});var r=o.exportDataType;if(e.on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table post-body.bs.table",function(i){var l=[];t.each(e.bootstrapTable("getData"),function(t,e){l.push(void 0!==e[o.pk]?e[o.pk]:"")});var c=n.api.selectedids(e,!0),d=n.api.selecteddata(e,!0);o.maintainSelected?(o.selectedIds=o.selectedIds.filter(function(e,i,n){return-1===t.inArray(e,l)}).concat(c),o.selectedData=o.selectedData.filter(function(e,i,n){return-1===t.inArray(e[o.pk],l)}).concat(d),o.selectedIds.length>c.length?(t("b",s).text(o.selectedIds.length),s.removeClass("hide")):s.addClass("hide")):(o.selectedIds=c,o.selectedData=d),"auto"===r&&(o.exportDataType=c.length>0?"selected":"all",0===t(".export .exporttips").length&&t(".export .dropdown-menu").prepend(" "),t(".export .exporttips").html("导出记录:"+(c.length>0?"选中":"全部"))),t(n.config.disabledbtn,a).toggleClass("disabled",!o.selectedIds.length)}),e.on("common-search.bs.table",function(i,n,o){var a=t(".panel-heading [data-field]",e.closest(".panel-intro")),s=a.data("field"),r=t("li.active > a",a).data("value");o.filter&&void 0!==o.filter[s]&&o.filter[s]!=r&&(t("li",a).removeClass("active"),t("li > a[data-value='"+o.filter[s]+"']",a).parent().addClass("active"))}),t('.panel-heading [data-field] a[data-toggle="tab"]',e.closest(".panel-intro")).on("shown.bs.tab",function(i){var n=t(this).closest("[data-field]").data("field"),o=t(this).data("value"),a=t("[name='"+n+"']",e.closest(".bootstrap-table").find(".commonsearch-table"));return"SELECT"===a.prop("tagName")?t("option[value='"+o+"']",a).prop("selected",!0):a.val(o),e.trigger("uncheckbox"),e.bootstrapTable("getOptions").totalRows=0,e.bootstrapTable("refresh",{pageNumber:1}),!1}),t("form",e.closest(".bootstrap-table").find(".commonsearch-table")).on("reset",function(){setTimeout(function(){},0),t(".panel-heading [data-field] li",e.closest(".panel-intro")).removeClass("active"),t(".panel-heading [data-field] li:first",e.closest(".panel-intro")).addClass("active")}),a.on("click",n.config.refreshbtn,function(){e.bootstrapTable("refresh")}),a.on("click",n.config.addbtn,function(){var i=n.api.selectedids(e),a=o.extend.add_url;-1!==a.indexOf("{ids}")&&(a=n.api.replaceurl(a,{ids:i.length>0?i.join(","):0},e)),Fast.api.open(a,t(this).data("original-title")||t(this).attr("title")||__("Add"),t(this).data()||{})}),t(n.config.importbtn,a).length>0&&require(["upload"],function(i){i.api.upload(t(n.config.importbtn,a),function(t,i){Fast.api.ajax({url:o.extend.import_url,data:{file:t.url}},function(t,i){e.trigger("uncheckbox"),e.bootstrapTable("refresh")})})}),a.on("click",n.config.editbtn,function(){var i=this;if(!(n.api.selectedids(e).length>10)){var a=t(i).data("title")||t(i).attr("title")||__("Edit"),s=t(i).data()||{};delete s.title,t.each(n.api.selecteddata(e),function(i,r){var l=o.extend.edit_url;r=t.extend({},r||{},{ids:r[o.pk]}),l=n.api.replaceurl(l,r,e),Fast.api.open(l,"function"==typeof a?a.call(e,r):a,s)})}}),t(document).on("click",n.config.destroyallbtn,function(){var i=this;return Layer.confirm(__("Are you sure you want to truncate?"),function(){var n=t(i).data("url")?t(i).data("url"):t(i).attr("href");Fast.api.ajax(n,function(){Layer.closeAll(),e.trigger("uncheckbox"),e.bootstrapTable("refresh")},function(){Layer.closeAll()})}),!1}),t(document).on("click",n.config.restoreallbtn,function(){var i=this,n=t(i).data("url")?t(i).data("url"):t(i).attr("href");return Fast.api.ajax(n,function(){Layer.closeAll(),e.trigger("uncheckbox"),e.bootstrapTable("refresh")},function(){Layer.closeAll()}),!1}),t(document).on("click",n.config.restoreonebtn+","+n.config.destroyonebtn,function(){var i=this,a=t(i).data("url")?t(i).data("url"):t(i).attr("href"),s=n.api.getrowbyindex(e,t(i).data("row-index"));return Fast.api.ajax({url:a,data:{ids:s[o.pk]}},function(){e.trigger("uncheckbox"),e.bootstrapTable("refresh")}),!1}),a.on("click",n.config.multibtn,function(){var i=n.api.selectedids(e);n.api.multi(t(this).data("action"),i,e,this)}),a.on("click",n.config.delbtn,function(){var t=this,i=n.api.selectedids(e);Layer.confirm(__("Are you sure you want to delete the %s selected item?",i.length),{icon:3,title:__("Warning"),offset:0,shadeClose:!0,btn:[__("OK"),__("Cancel")]},function(o){n.api.multi("del",i,e,t),Layer.close(o)})}),require(["dragsort"],function(){t("tbody",e).dragsort({itemSelector:"tr:visible",dragSelector:"a.btn-dragsort",dragEnd:function(i,o){var a=t("a.btn-dragsort",this),s=e.bootstrapTable("getData"),r=s[parseInt(t(this).data("index"))],l=e.bootstrapTable("getOptions"),c=t.map(t("tbody tr:visible",e),function(e){return s[parseInt(t(e).data("index"))][l.pk]}),d=r[l.pk],u=void 0!==r.pid?r.pid:"",h={url:e.bootstrapTable("getOptions").extend.dragsort_url,data:{ids:c.join(","),changeid:d,pid:u,field:n.config.dragsortfield,orderway:l.sortOrder,table:l.extend.table,pk:l.pk}};Fast.api.ajax(h,function(i,n){var o=t(a).data("success")||t.noop;if("function"==typeof o&&!1===o.call(a,i,n))return!1;e.bootstrapTable("refresh")},function(i,n){var o=t(a).data("error")||t.noop;if("function"==typeof o&&!1===o.call(a,i,n))return!1;e.bootstrapTable("refresh")})},placeHolderTemplate:""})}),e.on("click","input[data-id][name='checkbox']",function(i){var n=t(this).data("id");e.bootstrapTable(t(this).prop("checked")?"checkBy":"uncheckBy",{field:o.pk,values:[n]})}),e.on("click","[data-id].btn-change",function(i){i.preventDefault();var o=t.proxy(function(){n.api.multi(t(this).data("action")?t(this).data("action"):"",[t(this).data("id")],e,this)},this);void 0!==t(this).data("confirm")?Layer.confirm(t(this).data("confirm"),function(t){o(),Layer.close(t)}):o()}),e.on("click","[data-id].btn-edit",function(i){i.preventDefault();var a=t(this).data("id"),s=n.api.getrowbyid(e,a);s.ids=a;var r=n.api.replaceurl(o.extend.edit_url,s,e);Fast.api.open(r,t(this).data("original-title")||t(this).attr("title")||__("Edit"),t(this).data()||{})}),e.on("click","[data-id].btn-del",function(i){i.preventDefault();var o=t(this).data("id"),a=this;Layer.confirm(__("Are you sure you want to delete this item?"),{icon:3,title:__("Warning"),shadeClose:!0,btn:[__("OK"),__("Cancel")]},function(t){n.api.multi("del",o,e,a),Layer.close(t)})}),e.on("mouseenter mouseleave",".autocontent",function(e){var i=t(".autocontent-item",this).get(0);i&&("mouseenter"===e.type?i.scrollWidth>i.offsetWidth&&0===t(".autocontent-caret",this).length&&t(this).append("
"):t(".autocontent-caret",this).remove())}),e.on("click mouseenter",".autocontent-caret",function(e){var i=t(this).prev().hasClass("autocontent-hover");if(i||"mouseenter"!==e.type){var n=t(this).prev().text(),o=t(this).parent().get(0).getBoundingClientRect(),a=Layer.open({id:"autocontent",skin:"layui-layer-fast layui-layer-autocontent",title:!1,content:n,btn:!1,anim:!1,shade:0,isOutAnim:!1,area:"auto",maxWidth:450,maxHeight:350,offset:[o.y,o.x]});i&&t(document).one("mouseleave","#layui-layer"+a,function(){Layer.close(a)});var s=function(e){0===t(e.target).closest(".layui-layer").length&&(Layer.close(a),t(document).off("mousedown",s))};t(document).off("mousedown",s).on("mousedown",s)}}),o.fixDropdownPosition){var l=e.closest(".fixed-table-body");e.on("show.bs.dropdown fa.event.refreshdropdown",".btn-group",function(e){var i,n,o,a=t(".dropdown-menu",this),s=t(this),r=a.hasClass("pull-right")||a.hasClass("dropdown-menu-right");o="fixed",n=s.offset().top-t(window).scrollTop()+s.outerHeight(),n+a.outerHeight()>t(window).height()&&(n=s.offset().top-a.outerHeight()-5),i=r?s.offset().left+s.outerWidth()-a.outerWidth():s.offset().left,(i||n)&&a.css({position:o,left:i,top:n,right:"inherit"})});var c=function(){t(".btn-group.open",e).length>0&&"fixed"==t(".btn-group.open .dropdown-menu",e).css("position")&&t(".btn-group.open",e).trigger("fa.event.refreshdropdown")};t(window).on("scroll",function(){c()}),l.on("scroll",function(){c()})}var d=e.attr("id");return n.list[d]=e,e},multi:function(e,i,n,o){var a=n.bootstrapTable("getOptions"),s=o?t(o).data():{};i=t.isArray(i)?i.join(","):i,a={url:void 0!==s.url?s.url:"del"==e?a.extend.del_url:a.extend.multi_url,data:{action:e,ids:i,params:void 0!==s.params?"object"==typeof s.params?t.param(s.params):s.params:""}},Fast.api.ajax(a,function(e,i){n.trigger("uncheckbox");var a=t(o).data("success")||t.noop;if("function"==typeof a&&!1===a.call(o,e,i))return!1;n.bootstrapTable("refresh")},function(e,i){var n=t(o).data("error")||t.noop;if("function"==typeof n&&!1===n.call(o,e,i))return!1})},events:{operate:{"click .btn-editone":function(e,i,o,a){e.stopPropagation(),e.preventDefault();var s=t(this).closest("table"),r=s.bootstrapTable("getOptions"),l=o[r.pk];o=t.extend({},o||{},{ids:l});var c=r.extend.edit_url;Fast.api.open(n.api.replaceurl(c,o,s),t(this).data("original-title")||t(this).attr("title")||__("Edit"),t(this).data()||{})},"click .btn-delone":function(i,o,a,s){i.stopPropagation(),i.preventDefault();var r=this,l=t(r).offset().top-t(window).scrollTop(),c=t(r).offset().left-t(window).scrollLeft()-260;l+154>t(window).height()&&(l-=154),t(window).width()<480&&(l=c=e),Layer.confirm(__("Are you sure you want to delete this item?"),{icon:3,title:__("Warning"),offset:[l,c],shadeClose:!0,btn:[__("OK"),__("Cancel")]},function(e){var i=t(r).closest("table"),o=i.bootstrapTable("getOptions");n.api.multi("del",a[o.pk],i,r),Layer.close(e)})}},image:{"click .img-center":function(e,i,n,o){var a=[];i=null===i?"":i.toString();var s,r=""!=i?i.split(","):[];t.each(r,function(t,e){s=Fast.api.cdnurl(e),a.push({src:s,thumb:s.match(/^(\/|data:image\\)/)?s:s+Config.upload.thumbstyle})}),Layer.photos({photos:{start:t(this).parent().index(),data:a},anim:5})}}},formatter:{icon:function(t,e,i){return t=null===t?"":t.toString(),'-1?t:"fa fa-"+t)+'"> '+t},image:function(t,e,i){return n.api.formatter.images.call(this,t,e,i)},images:function(e,i,n){e=null==e||0===e.length?"":e.toString();var o,a=void 0!==this.classname?this.classname:"img-sm img-center",s=""!==e?-1===e.indexOf("data:image/")?e.split(","):[e]:[],r=[];return t.each(s,function(t,e){e=e||"/assets/img/blank.gif",o=Fast.api.cdnurl(e,!0),o=!Config.upload.thumbstyle||o.match(/^(\/|data:image\/)/)||o.indexOf(Config.upload.thumbstyle.substring(0,1))>-1?o:o+Config.upload.thumbstyle,r.push(' ')}),r.join(" ")},file:function(t,e,i){return n.api.formatter.files.call(this,t,e,i)},files:function(e,i,n){e=null==e||0===e.length?"":e.toString();var o,a,s=void 0!==this.classname?this.classname:"img-sm img-center",r=""!==e?-1===e.indexOf("data:image/")?e.split(","):[e]:[],l=[];return t.each(r,function(t,e){e=Fast.api.cdnurl(e,!0),o=/[\.]?([a-zA-Z0-9]+)$/.exec(e),o=o?o[1]:"file",a=Fast.api.fixurl("ajax/icon?suffix="+o),l.push(' ')}),l.join(" ")},content:function(t,i,n){var o=this.width!=e?this.width.toString().match(/^\d+$/)?this.width+"px":this.width:"250px";return""+t+"
"},status:function(e,i,o){var a={normal:"success",hidden:"gray",deleted:"danger",locked:"info"};return void 0!==this.custom&&(a=t.extend(a,this.custom)),this.custom=a,this.icon="fa fa-circle",n.api.formatter.normal.call(this,e,i,o)},normal:function(e,i,n){var o=["primary","success","danger","warning","info","gray","red","yellow","aqua","blue","navy","teal","olive","lime","fuchsia","purple","maroon"],a={};void 0!==this.custom&&(a=t.extend(a,this.custom)),e=i[this.field]||e,e=null==e||0===e.length?"":e.toString();var s="object"==typeof this.searchList?Object.keys(this.searchList):[],n=s.indexOf(e),r=e&&void 0!==a[e]?a[e]:null,l=n>-1?this.searchList[e]:null,c=void 0!==this.icon?this.icon:null;r||(r=n>-1&&void 0!==o[n]?o[n]:"primary"),l||(l=__(e.charAt(0).toUpperCase()+e.slice(1))),e=Fast.api.escape(e),l=Fast.api.escape(l);var d=''+(c?' ':"")+l+" ";return 0!=this.operate&&(d=''+d+" "),d},toggle:function(t,e,i){var n=this.table,o=n?n.bootstrapTable("getOptions"):{},a=o.pk||"id",s=void 0!==this.color?this.color:"success",r=void 0!==this.yes?this.yes:1,l=void 0!==this.no?this.no:0,c=void 0!==this.url?this.url:"",d="",u=!1;return void 0!==this.confirm&&(d="function"==typeof this.confirm?this.confirm.call(this,t,e,i):this.confirm),void 0!==this.disable&&(u="function"==typeof this.disable?this.disable.call(this,t,e,i):this.disable)," "},url:function(t,e,i){return''},search:function(t,i,n){var o=this.field;if(void 0!==this.customField){var a=this.customField.split(".").reduce(function(t,i){return null===t||t===e?"":t[i]},i);t=Fast.api.escape(a),o=this.customField}return''+t+" "},addtabs:function(t,e,i){var o=n.api.replaceurl(this.url||"",e,this.table),a=this.atitle?this.atitle:__("Search %s",t);return''+t+" "},dialog:function(t,e,i){var o=n.api.replaceurl(this.url||"",e,this.table),a=this.atitle?this.atitle:__("View %s",t);return''+t+" "},flag:function(i,n,o){var a=this;i=null==i||0===i.length?"":i.toString();var s={index:"success",hot:"warning",recommend:"danger",new:"info"};void 0!==this.custom&&(s=t.extend(s,this.custom));var r=this.field;if(void 0!==this.customField){var l=this.customField.split(".").reduce(function(t,i){return null===t||t===e?"":t[i]},n);i=Fast.api.escape(l),r=this.customField}if("object"==typeof a.searchList&&"function"==typeof a.searchList.then&&t.when(a.searchList).done(function(e){e.data&&e.data.searchlist&&t.isArray(e.data.searchlist)?a.searchList=e.data.searchlist:e.constructor!==Array&&e.constructor!==Object||(a.searchList=e)}),"object"==typeof a.searchList&&void 0===a.custom){var c=0,d=Object.values(s);t.each(a.searchList,function(t,e){void 0===s[t]&&(s[t]=d[c],c=void 0===d[c+1]?0:c+1)})}var u,h,p,f=[],m=t.isArray(i)?i:""!=i?i.split(","):[];return t.each(m,function(t,e){if(""===(e=null==e||0===e.length?"":e.toString()))return!0;u=e&&void 0!==s[e]?s[e]:"primary",h=void 0!==a.searchList&&void 0!==a.searchList[e]?a.searchList[e]:__(e.charAt(0).toUpperCase()+e.slice(1)),e=Fast.api.escape(e),h=Fast.api.escape(h),p=''+h+" ",a.operate?f.push(''+p+" "):f.push(p)}),f.join(" ")},label:function(t,e,i){return n.api.formatter.flag.call(this,t,e,i)},datetime:function(t,e,n){var o=void 0===this.datetimeFormat?"YYYY-MM-DD HH:mm:ss":this.datetimeFormat;return isNaN(t)?t?i(t).format(o):__("None"):t?i(1e3*parseInt(t)).format(o):__("None")},operate:function(e,i,o){var a=this.table,s=a?a.bootstrapTable("getOptions"):{},r=t.extend([],this.buttons||[]),l=[];return r.forEach(function(t){l.push(t.name)}),""!==s.extend.dragsort_url&&-1===l.indexOf("dragsort")&&r.push(n.button.dragsort),""!==s.extend.edit_url&&-1===l.indexOf("edit")&&(n.button.edit.url=s.extend.edit_url,r.push(n.button.edit)),""!==s.extend.del_url&&-1===l.indexOf("del")&&r.push(n.button.del),n.api.buttonlink(this,r,e,i,o,"operate")},buttons:function(e,i,o){var a=t.extend([],this.buttons||[]);return n.api.buttonlink(this,a,e,i,o,"buttons")}},buttonlink:function(e,i,o,a,s,r){var l=e.table;e.clickToSelect=!1,r=void 0===r?"buttons":r;var c,d,u,h,p,f,m,g,v,y,b,w,x,k=l?l.bootstrapTable("getOptions"):{},_=[],C=e.fieldIndex,S={};if(t.each(i,function(t,e){if("operate"===r){if("dragsort"===e.name&&void 0===a[n.config.dragsortfield])return!0;if(["add","edit","del","multi","dragsort"].indexOf(e.name)>-1&&!k.extend[e.name+"_url"])return!0}var i=l.data(r+"-"+e.name);if(void 0===i||i){if(c="function"==typeof e.hidden?e.hidden.call(l,a,e):void 0!==e.hidden&&e.hidden)return!0;if(!(d="function"==typeof e.visible?e.visible.call(l,a,e):void 0===e.visible||e.visible))return!0;w=e.dropdown?e.dropdown:"",h=e.url?e.url:"",h="function"==typeof h?h.call(l,a,e):h?Fast.api.fixurl(n.api.replaceurl(h,a,l)):"javascript:;",p=e.classname?e.classname:w?"btn-"+name+"one":"btn-primary btn-"+name+"one",f=e.icon?e.icon:"",m="function"==typeof e.text?e.text.call(l,a,e):e.text?e.text:"",g="function"==typeof e.title?e.title.call(l,a,e):e.title?e.title:m,v=e.refresh?'data-refresh="'+e.refresh+'"':"",y="function"==typeof e.confirm?e.confirm.call(l,a,e):void 0!==e.confirm&&e.confirm,y=y?'data-confirm="'+y+'"':"",b="function"==typeof e.extend?e.extend.call(l,a,e):void 0!==e.extend?e.extend:"",u="function"==typeof e.disable?e.disable.call(l,a,e):void 0!==e.disable&&e.disable,u&&(p+=" disabled"),x=' '+(m?" "+m:"")+" ",w?(void 0===S[w]&&(S[w]=[]),S[w].push(x)):_.push(x)}}),!t.isEmptyObject(S)){var T=[];t.each(S,function(t,e){T.push(''+t+'
")}),_.unshift(T.join(" "))}return _.join(" ")},replaceurl:function(t,i,n){var o=n?n.bootstrapTable("getOptions"):null,a=o?i[o.pk]:0;return i.ids=a||(void 0!==i.ids?i.ids:0),t=null==t||0===t.length?"":t.toString(),t=t.match(/(?=([?&]ids=)|(\/ids\/)|(\{ids}))/i)?t:t+(t.match(/(\?|&)+/)?"&ids=":"/ids/")+"{ids}",t=t.replace(/\{(.*?)\}/gi,function(t){t=t.substring(1,t.length-1);var n=t.split(".").reduce(function(t,i){return null===t||t===e?"":t[i]},i);return n=Fast.api.escape(n)})},selectedids:function(e,i){var n=e.bootstrapTable("getOptions");return!i&&n.maintainSelected?n.selectedIds:t.map(e.bootstrapTable("getSelections"),function(t){return t[n.pk]})},selecteddata:function(t,e){var i=t.bootstrapTable("getOptions");return!e&&i.maintainSelected?i.selectedData:t.bootstrapTable("getSelections")},toggleattr:function(e){t("input[type='checkbox']",e).trigger("click")},getrowdata:function(t,e){e=parseInt(e);var i=t.bootstrapTable("getData");return void 0!==i[e]?i[e]:null},getrowbyindex:function(t,e){return n.api.getrowdata(t,e)},getrowbyid:function(e,i){var o={},a=e.bootstrapTable("getOptions");return t.each(n.api.selecteddata(e),function(t,e){if(e[a.pk]==i)return o=e,!1}),o}}};return n}),function(t){t.fn.dragsort=function(e){if("destroy"==e)return void t(this.selector).trigger("dragsort-uninit");var i=t.extend({},t.fn.dragsort.defaults,e),n=[],o=null,a=null;return this.each(function(e,s){t(s).is("table")&&1==t(s).children().length&&t(s).children().is("tbody")&&(s=t(s).children().get(0));var r={draggedItem:null,placeHolderItem:null,pos:null,offset:null,offsetLimit:null,scroll:null,container:s,init:function(){i.tagName=""==i.tagName?0==t(this.container).children().length?"li":t(this.container).children().get(0).tagName.toLowerCase():i.tagName,""==i.itemSelector&&(i.itemSelector=i.tagName),""==i.dragSelector&&(i.dragSelector=i.tagName),""==i.placeHolderTemplate&&(i.placeHolderTemplate="<"+i.tagName+"> "+i.tagName+">"),t(this.container).attr("data-listidx",e).mousedown(this.grabItem).bind("dragsort-uninit",this.uninit),this.styleDragHandlers(!0)},uninit:function(){var e=n[t(this).attr("data-listidx")];t(e.container).unbind("mousedown",e.grabItem).unbind("dragsort-uninit"),e.styleDragHandlers(!1)},getItems:function(){return t(this.container).children(i.itemSelector)},styleDragHandlers:function(e){this.getItems().map(function(){return t(this).is(i.dragSelector)?this:t(this).find(i.dragSelector).get()}).css("cursor",e?"pointer":"")},grabItem:function(e){var o=n[t(this).attr("data-listidx")],a=t(e.target).closest("[data-listidx] > "+i.tagName).get(0),s=o.getItems().filter(function(){return this==a}).length>0;if(!(1!=e.which||t(e.target).is(i.dragSelectorExclude)||t(e.target).closest(i.dragSelectorExclude).length>0)&&s&&(t(e.target).is(i.dragSelector)||t(e.target).closest(i.dragSelector).length)){e.preventDefault();for(var r=e.target;!t(r).is(i.dragSelector);){if(r==this)return;r=r.parentNode}t(r).attr("data-cursor",t(r).css("cursor")),t(r).css("cursor","move");var l=this,c=function(){o.dragStart.call(l,e),t(o.container).unbind("mousemove",c)};t(o.container).mousemove(c).mouseup(function(){t(o.container).unbind("mousemove",c),t(r).css("cursor",t(r).attr("data-cursor"))})}},dragStart:function(e){null!=o&&null!=o.draggedItem&&o.dropItem(),o=n[t(this).attr("data-listidx")],o.draggedItem=t(e.target).closest("[data-listidx] > "+i.tagName),o.draggedItem.attr("data-origpos",t(this).attr("data-listidx")+"-"+t(o.container).children().index(o.draggedItem));var a=parseInt(o.draggedItem.css("marginTop")),s=parseInt(o.draggedItem.css("marginLeft"));if(o.offset=o.draggedItem.offset(),o.offset.top=e.pageY-o.offset.top+(isNaN(a)?0:a)-1,o.offset.left=e.pageX-o.offset.left+(isNaN(s)?0:s)-1,!i.dragBetween){var r=0==t(o.container).outerHeight()?Math.max(1,Math.round(.5+o.getItems().length*o.draggedItem.outerWidth()/t(o.container).outerWidth()))*o.draggedItem.outerHeight():t(o.container).outerHeight();o.offsetLimit=t(o.container).offset(),o.offsetLimit.right=o.offsetLimit.left+t(o.container).outerWidth()-o.draggedItem.outerWidth(),o.offsetLimit.bottom=o.offsetLimit.top+r-o.draggedItem.outerHeight()}var l=o.draggedItem.height(),c=o.draggedItem.width();if("tr"==i.tagName?(o.draggedItem.children().each(function(){t(this).width(t(this).width())}),o.placeHolderItem=o.draggedItem.clone().attr("data-placeholder",!0),o.draggedItem.after(o.placeHolderItem),o.placeHolderItem.children().each(function(){t(this).html(" ")})):(o.draggedItem.after(i.placeHolderTemplate),o.placeHolderItem=o.draggedItem.next().css({height:l,width:c}).attr("data-placeholder",!0)),"td"==i.tagName){var d=o.draggedItem.closest("table").get(0);t("").appendTo("body").children().append(o.draggedItem)}var u=o.draggedItem.attr("style");o.draggedItem.attr("data-origstyle",u||""),o.draggedItem.css({position:"absolute",opacity:.8,"z-index":999,height:l,width:c}),o.scroll={moveX:0,moveY:0,maxX:t(document).width()-t(window).width(),maxY:t(document).height()-t(window).height()},o.scroll.scrollY=window.setInterval(function(){if(i.scrollContainer!=window)return void t(i.scrollContainer).scrollTop(t(i.scrollContainer).scrollTop()+o.scroll.moveY);var e=t(i.scrollContainer).scrollTop();(o.scroll.moveY>0&&e0)&&(t(i.scrollContainer).scrollTop(e+o.scroll.moveY),o.draggedItem.css("top",o.draggedItem.offset().top+o.scroll.moveY+1))},10),o.scroll.scrollX=window.setInterval(function(){if(i.scrollContainer!=window)return void t(i.scrollContainer).scrollLeft(t(i.scrollContainer).scrollLeft()+o.scroll.moveX);var e=t(i.scrollContainer).scrollLeft()
+;(o.scroll.moveX>0&&e0)&&(t(i.scrollContainer).scrollLeft(e+o.scroll.moveX),o.draggedItem.css("left",o.draggedItem.offset().left+o.scroll.moveX+1))},10),t(n).each(function(t,e){e.createDropTargets(),e.buildPositionTable()}),o.setPos(e.pageX,e.pageY),t(document).bind("mousemove",o.swapItems),t(document).bind("mouseup",o.dropItem),i.scrollContainer!=window&&t(window).bind("wheel",o.wheel)},setPos:function(e,n){var a=n-this.offset.top,s=e-this.offset.left;i.dragBetween||(a=Math.min(this.offsetLimit.bottom,Math.max(a,this.offsetLimit.top)),s=Math.min(this.offsetLimit.right,Math.max(s,this.offsetLimit.left)));var r=this.draggedItem.offsetParent().not("body").offset();if(null!=r&&(a-=r.top,s-=r.left),i.scrollContainer==window)n-=t(window).scrollTop(),e-=t(window).scrollLeft(),n=Math.max(0,n-t(window).height()+5)+Math.min(0,n-5),e=Math.max(0,e-t(window).width()+5)+Math.min(0,e-5);else{var l=t(i.scrollContainer),c=l.offset();n=Math.max(0,n-l.height()-c.top)+Math.min(0,n-c.top),e=Math.max(0,e-l.width()-c.left)+Math.min(0,e-c.left)}o.scroll.moveX=0==e?0:e*i.scrollSpeed/Math.abs(e),o.scroll.moveY=0==n?0:n*i.scrollSpeed/Math.abs(n),this.draggedItem.css({top:a,left:s})},wheel:function(e){if(o&&i.scrollContainer!=window){var n=t(i.scrollContainer),a=n.offset();if(e=e.originalEvent,e.clientX>a.left&&e.clientXa.top&&e.clientY0?s.before(o.draggedItem):0==a[1]?t(n[a[0]].container).prepend(o.draggedItem):t(n[a[0]].container).append(o.draggedItem)}return o.draggedItem.removeAttr("data-origpos"),o.draggedItem=null,t(document).unbind("mousemove",o.swapItems),t(document).unbind("mouseup",o.dropItem),i.scrollContainer!=window&&t(window).unbind("wheel",o.wheel),!1}},swapItems:function(e){if(null==o.draggedItem)return!1;o.setPos(e.pageX,e.pageY);for(var s=o.findPos(e.pageX,e.pageY),r=o,l=0;-1==s&&i.dragBetween&&lo.draggedItem.offset().top||a.left>o.draggedItem.offset().left?t(r.pos[s].elm).before(o.placeHolderItem):t(r.pos[s].elm).after(o.placeHolderItem),d.each(function(){var e=c().eq(this.idx).get(0);this!=e&&c().index(this)t&&this.pos[i].tope)return i;return-1},createDropTargets:function(){i.dragBetween&&t(n).each(function(){var e=t(this.container).find("[data-placeholder]"),n=t(this.container).find("[data-droptarget]");e.length>0&&n.length>0?n.remove():0==e.length&&0==n.length&&("td"==i.tagName?t(i.placeHolderTemplate).attr("data-droptarget",!0).appendTo(this.container):t(this.container).append(o.placeHolderItem.removeAttr("data-placeholder").clone().attr("data-droptarget",!0)),o.placeHolderItem.attr("data-placeholder",!0))})}};r.init(),n.push(r)}),this},t.fn.dragsort.defaults={tagName:"",itemSelector:"",dragSelector:"",dragSelectorExclude:"input, textarea",dragEnd:function(){},dragBetween:!1,placeHolderTemplate:"",scrollContainer:window,scrollSpeed:5}}(jQuery),define("dragsort",function(){}),function(t){t.fn.addtabs=function(e){var i=t(this);e=t.extend({content:"",close:!0,monitor:"body",nav:".nav-addtabs",tab:".tab-addtabs",iframeUse:!0,simple:!1,iframeHeight:t(window).height()-50,iframeForceRefresh:!1,iframeForceRefreshTable:!1,callback:function(){}},e||{});var n=t(e.nav),o=t(e.tab);history.pushState&&t(window).on("popstate",function(i){var n=i.originalEvent.state;n&&t("a[addtabs="+n.id+"]",e.monitor).data("pushstate",!0).trigger("click")}),t(e.monitor).on("click","[addtabs]",function(i){if(0!==t(this).attr("url").indexOf("javascript:")){t(this).is("a")&&i.preventDefault();var n=t(this).attr("addtabs"),o=t(this).attr("title")?t(this).attr("title"):t.trim(t(this).text()),s=t(this).attr("url"),r=e.content?e.content:t(this).attr("content"),l="1"===t(this).attr("ajax")||"true"===t(this).attr("ajax"),c={url:s,title:o,id:n,content:r,ajax:l};if(document.title=o,history.pushState&&!t(this).data("pushstate")){var d=-1===s.indexOf("ref=addtabs")?s+(s.indexOf("?")>-1?"&":"?")+"ref=addtabs":s;try{window.history.pushState(c,o,d)}catch(i){}}t(this).data("pushstate",null),a.call(this,{id:n,title:t(this).attr("title")?t(this).attr("title"):t(this).html(),content:r,url:s,ajax:l})}}),n.on("click",".close-tab",function(){var e=t(this).prev("a").attr("aria-controls");return s(e),!1}),n.on("dblclick","li[role=presentation]",function(){t(this).find(".close-tab").trigger("click")}),n.on("click","li[role=presentation]",function(){t("a[addtabs="+t("a",this).attr("node-id")+"]").trigger("click")}),t(window).resize(function(){if("object"==typeof e.nav){var i=0;n.siblings().each(function(){i+=t(this).outerWidth()}),n.width(n.parent().width()-i)}else t("#nav").width(t("#header").find("> .navbar").width()-t(".sidebar-toggle").outerWidth()-t(".navbar-custom-menu").outerWidth()-20);r()});var a=function(i){var a,s,l,c;a=i.id,s="tab_"+i.id,l="con_"+i.id,c=i.url,c+=i.url.indexOf("?")>-1?"&addtabs=1":"?addtabs=1",e.simple&&(n.find("[role='presentation']").remove(),o.find("[role='tabpanel']").remove());var d=t("#"+s,n),u=t("#"+l,o);if(n.find("[role='presentation']").removeClass("active"),o.find("[role='tabpanel']").removeClass("active"),0===d.length){if(d=t(''+i.title+" "),e.close&&t("li",n).length>0&&d.append(' '),0===u.length){if(u=t('
'),i.content)u.append(i.content);else if(e.iframeUse&&!i.ajax){var h=e.iframeHeight;u.append('')}else t.get(c,function(t){u.append(t)});o.append(u)}e.simple||(t(".tabdrop li",n).length>0?t(".tabdrop ul",n).append(d):n.append(d))}else if(e.iframeForceRefresh)t("#"+l+" iframe").attr("src",function(t,e){return e});else if(e.iframeForceRefreshTable)try{t("#"+l+" iframe").contents().find(".btn-refresh:not([data-force-refresh=false])").length>0&&t("#"+l+" iframe")[0].contentWindow.$(".btn-refresh:not([data-force-refresh=false])").trigger("click")}catch(t){}sessionStorage.setItem("addtabs",t(this).prop("outerHTML")),d.addClass("active"),u.addClass("active"),r()},s=function(a){var s="tab_"+a,l="con_"+a,c=t("#"+s,n),d=t("#"+l,o);if(i.find("li.active").not(".tabdrop").attr("id")===s){var u=c.prev().not(".tabdrop"),h=c.next().not(".tabdrop");u.length>0?u.find("a").trigger("click"):h.length>0?h.find("a").trigger("click"):t(">li:not(.tabdrop):last > a",n).trigger("click")}c.remove(),d.remove(),r(),e.callback()},r=function(){n.refreshAddtabs()}},t.fn.refreshAddtabs=function(){var e=t(this),i=t(".tabdrop",e);0===i.length&&(i=t(' '),i.prependTo(e)),e.parent().is(".tabs-below")&&i.addClass("dropup");var n=0,o=e.width()-65,a=0,s=e.append(i.find("li")).find(">li").not(".tabdrop"),r=0;s.each(function(){r+=t(this).outerWidth(!0)}),e.width()o&&(i.find("ul").append(t(this)),n++)}),n>0&&(i.removeClass("hide"),1===i.find(".active").length?i.addClass("active"):i.removeClass("active"))):i.addClass("hide")}}(jQuery),define("addtabs",function(){}),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data(d.dataKey),o=t.extend({},c,i.data(),n&&n.option,"object"==typeof e&&e);n||i.data(d.dataKey,n=new d(this,o))})}function i(e){return t(e).closest("div.sp_container").find("input.sp_input")}function n(){return this.each(function(){var t=i(this),e=t.data(d.dataKey);e&&(e.prop.init_set=!0,e.clearAll(e),e.prop.init_set=!1)})}function o(){return this.each(function(){var t=i(this),e=t.data(d.dataKey);e&&e.elem.hidden.val()&&e.setInitRecord(!0)})}function a(e){return this.each(function(){if(e&&t.isArray(e)){var n=i(this),o=n.data(d.dataKey);o&&(o.clearAll(o),o.option.data=e)}})}function s(e){var n=!1;return this.each(function(){var o=i(this),a=o.data(d.dataKey);a&&("undefined"!==t.type(e)?a.disabled(a,e):n=a.disabled(a))}),n}function r(){var e="";return this.each(function(){var n=i(this),o=n.data(d.dataKey);if(o)if(o.option.multiple){var a=[];o.elem.element_box.find("li.selected_tag").each(function(e,i){a.push(t(i).text())}),e+=a.toString()}else e+=o.elem.combo_input.val()}),e}function l(){var e=[];return this.each(function(){var n=i(this),o=n.data(d.dataKey);if(o)if(o.option.multiple)o.elem.element_box.find("li.selected_tag").each(function(i,n){e.push(t(n).data("dataObj"))});else{var a=o.elem.combo_input.data("dataObj");a&&e.push(a)}}),e}var c={data:void 0,lang:"cn",multiple:!1,pagination:!0,dropButton:!0,listSize:10,multipleControlbar:!0,maxSelectLimit:0,selectToCloseList:!1,initRecord:void 0,dbTable:"tbl",keyField:"id",showField:"name",searchField:void 0,escape:!0,andOr:"OR",separator:",",orderBy:void 0,pageSize:10,params:void 0,formatItem:void 0,autoFillResult:!1,autoSelectFirst:!1,noResultClean:!0,selectOnly:!1,inputDelay:.5,eSelect:void 0,eOpen:void 0,eAjaxSuccess:void 0,eTagRemove:void 0,eClear:void 0},d=function(e,i){t.each({data:"source",keyField:"primaryKey",showField:"field",pageSize:"perPage"},function(t,e){void 0!==i[e]&&(i[t]=i[e],delete i[e])}),this.setOption(i),this.setLanguage(),this.setCssClass(),this.setProp(),this.setElem(e),this.setButtonAttrDefault(),this.setInitRecord(),this.eDropdownButton(),this.eInput(),this.eWhole()};d.version="2.19",d.dataKey="selectPageObject",d.prototype.setOption=function(e){e.searchField=e.searchField||e.showField,e.andOr=e.andOr.toUpperCase(),"AND"!==e.andOr&&"OR"!==e.andOr&&(e.andOr="AND");for(var i=["searchField"],n=0;n /g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):t},d.prototype.strToArray=function(t){return t?t.replace(/[\s ]+/g,"").split(","):""},d.prototype.setOrderbyOption=function(e,i){var n=[],o=[];if("object"==typeof e)for(var a=0;a#item_text# ',textKey:"#item_text#",valueKey:"#item_value#"},page:{current:"page_num",total:"page_count"},msg:{maxSelectLimit:"max_selected_limit"}}},d.prototype.elementRealSize=function(e,i){var n,o,a,s={absolute:!1,clone:!1,includeMargin:!1,display:"block"},r=s,l=e.eq(0),c=[],d="";n=function(){a=l.parents().addBack().filter(":hidden"),d+="visibility: hidden !important; display: "+r.display+" !important; ",!0===r.absolute&&(d+="position: absolute !important;"),a.each(function(){var e=t(this),i=e.attr("style");c.push(i),e.attr("style",i?i+";"+d:d)})},o=function(){a.each(function(e){var i=t(this),n=c[e];void 0===n?i.removeAttr("style"):i.attr("style",n)})},n();var u=/(outer)/.test(i)?l[i](r.includeMargin):l[i]();return o(),u},d.prototype.setElem=function(e){var i={},n=this.option,o=this.css_class,a=this.message,s=t(e),r=s.css("width"),l=s.outerWidth();r.indexOf("%")>-1||s.parent().length>0&&s.parent().width()==l?l="100%":(l<=0&&(l=this.elementRealSize(s,"outerWidth")),l<150&&(l=150)),i.combo_input=s.attr({autocomplete:"off"}).addClass(o.input).wrap(""),n.selectOnly&&i.combo_input.prop("readonly",!0),i.container=i.combo_input.parent().addClass(o.container),i.combo_input.prop("disabled")&&(n.multiple?i.container.addClass(o.disabled):i.combo_input.addClass(o.input_off)),i.container.width(l),i.button=t("
").addClass(o.button),i.dropdown=t('
'),i.clear_btn=t("
").html(t("
").addClass("spfont sp-close")).addClass(o.clear_btn).attr("title",a.clear),n.dropButton||i.clear_btn.addClass(o.align_right),i.element_box=t("").addClass(o.element_box),n.multiple&&n.multipleControlbar&&(i.control=t("").addClass(o.control_box)),i.result_area=t("
").addClass(o.re_area),n.pagination&&(i.navi=t("
").addClass("sp_pagination").append("
")),i.results=t("").addClass(o.results);var c=i.combo_input.attr("id")||i.combo_input.attr("name"),d=i.combo_input.attr("name")||"selectPage",u=d,h=c;if(i.hidden=t(' ').attr({name:u,id:h}).val(""),i.combo_input.attr({name:void 0!==s.data("name")?s.data("name"):d+"_text",id:c+"_text"}),i.hidden.attr("data-rule",i.combo_input.data("rule")||""),i.combo_input.attr("novalidate","novalidate"),i.container.append(i.hidden),n.dropButton&&(i.container.append(i.button),i.button.append(i.dropdown)),t(document.body).append(i.result_area),i.result_area.append(i.results),n.pagination&&i.result_area.append(i.navi),n.multiple){n.multipleControlbar&&(i.control.append(' '),i.control.append(' '),i.control.append(' '),i.control_text=t(""),i.control.append(i.control_text),i.result_area.prepend(i.control)),i.container.addClass("sp_container_combo"),i.combo_input.addClass("sp_combo_input").before(i.element_box);var p=t("
").addClass("input_box");p.append(i.combo_input),i.element_box.append(p),i.combo_input.attr("placeholder")&&i.combo_input.attr("placeholder_bak",i.combo_input.attr("placeholder"))}this.elem=i},d.prototype.setButtonAttrDefault=function(){this.option.dropButton&&this.elem.button.attr("title",this.message.close_btn)},d.prototype.setInitRecord=function(e){var i=this,n=i.option,o=i.elem,a="";if("undefined"!=t.type(o.combo_input.data("init"))&&(n.initRecord=String(o.combo_input.data("init"))),e||n.initRecord||!o.combo_input.val()||(n.initRecord=o.combo_input.val()),o.combo_input.val(""),e||o.hidden.val(n.initRecord),a=e&&o.hidden.val()?o.hidden.val():n.initRecord)if("object"==typeof n.data){var s=new Array,r=a.split(",");t.each(r,function(t,e){for(var i=0;i1&&(s=[s[0]]),i.afterInit(i,s)}else{var l=n.params,c={},d=(n.searchField,{searchTable:n.dbTable,searchKey:n.keyField,searchValue:a,orderBy:n.orderBy,showField:n.showField,keyField:n.keyField,keyValue:a,searchField:n.searchField});if(l){var u=t.isFunction(l)?l(i):l;c=u&&t.isPlainObject(u)?t.extend({},d,u):d}else c=d;t.ajax({dataType:"json",type:"POST",url:n.data,data:c,success:function(e){var o=null;n.eAjaxSuccess&&t.isFunction(n.eAjaxSuccess)&&(o=n.eAjaxSuccess(e)),i.afterInit(i,o.list)},error:function(t,e,n){i.ajaxErrorNotify(i,n)}})}},d.prototype.afterInit=function(e,i){if(i&&(!t.isArray(i)||0!==i.length)){t.isArray(i)||(i=[i]);var n=e.option,o=e.css_class;if(e.data=i,n.multiple)e.prop.init_set=!0,e.clearAll(e),t.each(i,function(t,i){var o=n.escape?e.escapeHTML(i[n.keyField]):i[n.keyField],a=n.escape?e.escapeHTML(i[n.showField]):i[n.showField],s={text:a,value:o};e.isAlreadySelected(e,s)||e.addNewTag(e,i,s)}),e.tagValuesSet(e),e.inputResize(e),e.elem.hidden.blur(),e.prop.init_set=!1;else{var a=i[0],s=n.escape?e.escapeHTML(a[n.keyField]):a[n.keyField],r=n.escape?e.escapeHTML(a[n.showField]):a[n.showField];e.elem.combo_input.val(r),e.elem.hidden.val(s),e.prop.prev_value=r,e.prop.selected_text=r,n.selectOnly&&e.elem.combo_input.attr("title",e.message.select_ok).removeClass(o.select_ng).addClass(o.select_ok),e.putClearButton()}}},d.prototype.eDropdownButton=function(){var t=this;t.option.dropButton&&t.elem.button.mouseup(function(e){e.stopPropagation(),t.elem.result_area.is(":hidden")&&!t.elem.combo_input.prop("disabled")?t.elem.combo_input.focus():t.hideResults(t)})},d.prototype.eInput=function(){var e=this,i=e.option,n=e.elem,o=e.message,a=function(){e.prop.page_move=!1,e.suggest(e),e.setCssFocusedInput(e)};n.combo_input.keyup(function(t){e.processKey(e,t)}).keydown(function(t){e.processControl(e,t)}).focus(function(t){n.result_area.is(":hidden")&&(t.stopPropagation(),e.prop.first_show=!0,a())}),n.container.on("click.SelectPage","div."+e.css_class.clear_btn,function(n){n.stopPropagation(),e.disabled(e)||(e.clearAll(e,!0),e.elem.hidden.change(),i.eClear&&t.isFunction(i.eClear)&&i.eClear(e))}),n.result_area.on("mousedown.SelectPage",function(t){t.stopPropagation()}),i.multiple&&(i.multipleControlbar&&(n.control.find(".sp_select_all").on("click.SelectPage",function(t){e.selectAllLine(e)}).hover(function(){n.control_text.html(o.select_all)},function(){n.control_text.html("")}),n.control.find(".sp_unselect_all").on("click.SelectPage",function(t){e.unSelectAllLine(e)}).hover(function(){n.control_text.html(o.unselect_all)},function(){n.control_text.html("")}),n.control.find(".sp_clear_all").on("click.SelectPage",function(t){e.clearAll(e,!0)}).hover(function(){n.control_text.html(o.clear_all)},function(){n.control_text.html("")})),n.element_box.on("click.SelectPage",function(e){var i=e.target||e.srcElement;t(i).is("ul")&&n.combo_input.focus()}),n.element_box.on("click.SelectPage","span.tag_close",function(){var n=t(this).closest("li"),o=n.data("dataObj");e.removeTag(e,n),a(),i.eTagRemove&&t.isFunction(i.eTagRemove)&&i.eTagRemove([o])}),e.inputResize(e))},d.prototype.eWhole=function(){var e=this,i=e.css_class,n=function(t){t.elem.combo_input.val(""),t.option.multiple||t.elem.hidden.val(""),t.prop.selected_text=""};t(document.body).off("mousedown.selectPage").on("mousedown.selectPage",function(e){var o=e.target||e.srcElement,a=t(o).closest("div."+i.container);t("div."+i.container+"."+i.container_open).each(function(){if(this!=a[0]){var e=t(this),o=e.find("input."+i.input).data(d.dataKey);if(!o.elem.combo_input.val()&&o.elem.hidden.val()&&!o.option.multiple)return o.prop.current_page=1,n(o),o.hideResults(o),!0;o.elem.results.find("li").not("."+i.message_box).length?o.option.autoFillResult?o.elem.hidden.val()?o.hideResults(o):o.elem.results.find("li.sp_over").length?o.selectCurrentLine(o,!0):o.option.autoSelectFirst?(o.nextLine(o),o.selectCurrentLine(o,!0)):o.hideResults(o):o.hideResults(o):(o.option.noResultClean?n(o):o.option.multiple||o.elem.hidden.val(""),o.hideResults(o))}})})},d.prototype.eResultList=function(){var e=this,i=this.css_class;e.elem.results.children("li").hover(function(){if(e.prop.key_select)return void(e.prop.key_select=!1);t(this).hasClass(i.selected)||t(this).hasClass(i.message_box)||(t(this).addClass(i.select),e.setCssFocusedResults(e))},function(){t(this).removeClass(i.select)}).click(function(n){if(e.prop.key_select)return void(e.prop.key_select=!1);n.preventDefault(),n.stopPropagation(),t(this).hasClass(i.selected)||e.selectCurrentLine(e,!1)})},d.prototype.eScroll=function(){var e=this.css_class;t(window).on("scroll.SelectPage",function(i){t("div."+e.container+"."+e.container_open).each(function(){var i=t(this),n=i.find("input."+e.input).data(d.dataKey),o=n.elem.result_area.offset(),a=t(window).scrollTop(),s=t(document).height(),r=t(window).height(),l=n.elem.result_area.outerHeight(),c=o.top+l,u=s>r,h=n.elem.result_area.hasClass("shadowDown");u&&(h?c>r+a&&n.calcResultsSize(n):o.top '+e+" ";t.elem.results.empty().append(i).show(),t.calcResultsSize(t),t.setOpenStatus(t,!0),t.elem.control&&t.elem.control.hide(),t.option.pagination&&t.elem.navi.hide()}},d.prototype.scrollWindow=function(e,i){var n,o=e.getCurrentLine(e),a=o&&!i?o.offset().top:e.elem.container.offset().top;e.prop.size_li=e.elem.results.children("li:first").outerHeight(),n=e.prop.size_li;var s,r=t(window).height(),l=t(window).scrollTop(),c=l+r-n;if(o.length)if(ar)s=a-l;else{if(!(a>c))return;s=a-c}else a-1&&e.elem.result_area.is(":visible")||t.inArray(i.keyCode,[13,9])>-1&&e.getCurrentLine(e))switch(i.preventDefault(),i.stopPropagation(),i.cancelBubble=!0,i.returnValue=!1,i.keyCode){case 37:i.shiftKey?e.firstPage(e):e.prevPage(e);break;case 38:e.prop.key_select=!0,e.prevLine(e);break;case 39:i.shiftKey?e.lastPage(e):e.nextPage(e);break;case 40:e.elem.results.children("li").length?(e.prop.key_select=!0,e.nextLine(e)):e.suggest(e);break;case 9:e.prop.key_paging=!0,e.selectCurrentLine(e,!0);break;case 13:e.selectCurrentLine(e,!0);break;case 27:e.prop.key_paging=!0,e.hideResults(e)}},d.prototype.abortAjax=function(t){t.prop.xhr&&(t.prop.xhr.abort(),t.prop.xhr=!1)},d.prototype.suggest=function(e){var i,n=t.trim(e.elem.combo_input.val());i=e.option.multiple?n:n&&n==e.prop.selected_text?"":n,i=i.split(e.option.separator),e.option.eOpen&&t.isFunction(e.option.eOpen)&&e.option.eOpen.call(e),e.abortAjax(e);var o=e.prop.current_page||1;"object"==typeof e.option.data?e.searchForJson(e,i,o):e.searchForDb(e,i,o)},d.prototype.setLoading=function(t){""===t.elem.results.html()&&t.setOpenStatus(t,!0)},d.prototype.searchForDb=function(e,i,n){var o=e.option;o.eAjaxSuccess&&t.isFunction(o.eAjaxSuccess)||e.hideResults(e);var a=o.params,s={},r=o.searchField;i.length&&i[0]&&i.join(e.option.separator)!==e.prop.prev_value&&(n=1);var l={q_word:i,pageNumber:n,pageSize:o.pageSize,andOr:o.andOr,orderBy:o.orderBy,searchTable:o.dbTable,showField:e.option.showField,keyField:e.option.keyField,searchField:e.option.searchField};if(!1!==o.orderBy&&(l.orderBy=o.orderBy),l[r]=i[0],a){var c=t.isFunction(a)?a(e):a;s=c&&t.isPlainObject(c)?t.extend({},l,c):l}else s=l;e.prop.xhr=t.ajax({dataType:"json",url:o.data,type:"POST",data:s,success:function(a){if(!a||!t.isPlainObject(a))return e.hideResults(e),void e.ajaxErrorNotify(e,errorThrown);var s={},r={};try{s=o.eAjaxSuccess(a),r.originalResult=s.list,r.cnt_whole=s.totalRow}catch(t){return void e.showMessage(e,e.message.ajax_error)}if(e.elem.navi&&t(e.elem.navi).toggleClass("hide",r.cnt_whole<=r.originalResult.length),r.candidate=[],r.keyField=[],"object"!=typeof r.originalResult)return e.prop.xhr=null,void e.notFoundSearch(e);r.cnt_page=r.originalResult.length;for(var l=0;l '),e.append(' '),e.append(' '+a()+" "),
+e.append(' '),e.append(' '),e.show()}else e.find("li.pageInfoBox a").html(a())}(t,a,n,s);var r="disabled",l=a.find("li.csFirstPage"),c=a.find("li.csPreviousPage"),d=a.find("li.csNextPage"),u=a.find("li.csLastPage");1===n||0===n?(l.hasClass(r)||l.addClass(r),c.hasClass(r)||c.addClass(r)):(l.hasClass(r)&&l.removeClass(r),c.hasClass(r)&&c.removeClass(r)),n===s||0===s?(d.hasClass(r)||d.addClass(r),u.hasClass(r)||u.addClass(r)):(d.hasClass(r)&&d.removeClass(r),u.hasClass(r)&&u.removeClass(r)),s>1&&t.ePaging()},d.prototype.displayResults=function(e,i,n){var o=e.option,a=e.elem;if(a.results.hide().empty(),o.multiple&&"number"===t.type(o.maxSelectLimit)&&o.maxSelectLimit>0){var s=a.element_box.find("li.selected_tag").length;if(s>0&&s>=o.maxSelectLimit){var r=e.message.max_selected;return void e.showMessage(e,r.replace(e.template.msg.maxSelectLimit,o.maxSelectLimit))}}if(i.candidate.length)for(var l=i.candidate,c=i.keyField,d=a.hidden.val(),u=d?d.split(","):[],h="",p=0;p").html(h).attr({pkey:c[p],index:p});o.formatItem||f.attr("title",h),-1!==t.inArray(c[p].toString(),u)&&f.addClass(e.css_class.selected),f.data("dataObj",i.originalResult[p]),a.results.append(f)}else{var m=' '+e.message.not_found+" ";a.results.append(m)}a.results.show(),o.multiple&&o.multipleControlbar&&a.control.show(),o.pagination&&a.navi.show(),e.calcResultsSize(e),e.setOpenStatus(e,!0),e.eResultList(),e.eScroll(),n&&i.candidate.length&&o.autoSelectFirst&&e.nextLine(e)},d.prototype.calcResultsSize=function(e){var i=e.option,n=e.elem,o=function(){if("static"!==n.container.css("position")){if(!i.pagination){var e=n.results.find("li:first").outerHeight(!0),o=e*i.listSize;n.results.css({"max-height":o,"overflow-y":"auto"})}var a=t(document).width(),s=t(document).height(),r=t(window).height(),l=n.container.offset(),c=t(window).scrollTop(),d=n.result_area.outerWidth(),o=n.result_area.outerHeight(),u=l.left,h=n.container.outerHeight(),p=l.left+d>a?u-(d-n.container.outerWidth()):u,f=l.top,m=0,g=f+h+o+5,v=f+o+5,y=s>r;return f-c-5>o&&y&&g>r+c||!y&&g>r&&f>=v?(m=l.top-o-5,n.result_area.removeClass("shadowUp shadowDown").addClass("shadowUp")):(m=l.top+(i.multiple?n.container.outerHeight():h),n.result_area.removeClass("shadowUp shadowDown").addClass("shadowDown"),m+=5),{top:m+"px",left:p+"px"}}var l=n.combo_input.offset();n.result_area.css({top:l.top+n.combo_input.outerHeight()+"px",left:l.left+"px"})};if(n.result_area.is(":visible"))n.result_area.css(o());else{var a=o();n.result_area.css(a).show(1,function(){var t=o();a.top===t.top&&a.left===t.left||n.result_area.css(t)})}},d.prototype.hideResults=function(e){e.prop.key_paging&&(e.scrollWindow(e,!0),e.prop.key_paging=!1),e.setCssFocusedInput(e),e.option.autoFillResult,e.elem.results.empty(),e.elem.result_area.hide(),e.setOpenStatus(e,!1),t(window).off("scroll.SelectPage"),e.abortAjax(e),e.setButtonAttrDefault()},d.prototype.disabled=function(e,i){var n=(e.option,e.elem);if("undefined"===t.type(i))return n.combo_input.prop("disabled");"boolean"===t.type(i)&&(n.combo_input.prop("disabled",i),i?n.container.addClass(e.css_class.disabled):n.container.removeClass(e.css_class.disabled))},d.prototype.firstPage=function(t){t.prop.current_page>1&&(t.prop.current_page=1,t.prop.page_move=!0,t.suggest(t))},d.prototype.prevPage=function(t){t.prop.current_page>1&&(t.prop.current_page--,t.prop.page_move=!0,t.suggest(t))},d.prototype.nextPage=function(t){t.prop.current_page0&&i.maxSelectLimit===e.elem.element_box.find("li.selected_tag").length)return!1}),i.eSelect&&t.isFunction(i.eSelect)&&i.eSelect(n,e),e.afterAction(e,!0)},d.prototype.unSelectAllLine=function(e){var i=e.option,n=(e.elem.results.find("li").length,[]);e.elem.results.find("li").each(function(i,o){var a=t(o).attr("pkey"),s=e.elem.element_box.find('li.selected_tag[itemvalue="'+a+'"]');s.length&&n.push(s.data("dataObj")),e.removeTag(e,s)}),e.afterAction(e,!0),i.eTagRemove&&t.isFunction(i.eTagRemove)&&i.eTagRemove(n)},d.prototype.clearAll=function(e,i){var n=e.option,o=[];n.multiple&&(e.elem.element_box.find("li.selected_tag").each(function(e,i){o.push(t(i).data("dataObj")),i.remove()}),e.elem.element_box.find("li.selected_tag").remove()),e.reset(e),e.afterAction(e,i),n.multiple?n.eTagRemove&&t.isFunction(n.eTagRemove)&&n.eTagRemove(o):e.elem.clear_btn.remove()},d.prototype.reset=function(t){t.elem.combo_input.val(""),t.elem.hidden.val(""),t.prop.prev_value="",t.prop.selected_text="",t.prop.current_page=1},d.prototype.getCurrentLine=function(t){if(t.elem.result_area.is(":hidden"))return!1;var e=t.elem.results.find("li."+t.css_class.select);return!!e.length&&e},d.prototype.isAlreadySelected=function(e,i){var n=!1;if(i.value){var o=e.elem.hidden.val();if(o){var a=o.split(",");a&&a.length&&-1!=t.inArray(i.value,a)&&(n=!0)}}return n},d.prototype.addNewTag=function(e,i,n){if(e.option.multiple&&i&&n){var o,a=e.template.tag.content;a=a.replace(e.template.tag.textKey,n.text),a=a.replace(e.template.tag.valueKey,n.value),o=t(a),o.data("dataObj",i),e.elem.combo_input.prop("disabled")&&o.find("span.tag_close").hide(),e.elem.combo_input.closest("li").before(o)}},d.prototype.removeTag=function(e,i){var n=t(i).attr("itemvalue"),o=e.elem.hidden.val();if("undefined"!=t.type(n)&&o){var a=o.split(","),s=t.inArray(n.toString(),a);-1!=s&&(a.splice(s,1),e.elem.hidden.val(a.toString()).trigger("change"))}t(i).remove(),e.inputResize(e)},d.prototype.tagValuesSet=function(e){if(e.option.multiple){var i=e.elem.element_box.find("li.selected_tag");if(i&&i.length){var n=new Array;t.each(i,function(e,i){var o=t(i).attr("itemvalue");"undefined"!==t.type(o)&&n.push(o)}),n.length&&e.elem.hidden.val(n.join(",")).trigger("change")}}},d.prototype.inputResize=function(t){if(t.option.multiple){var e=t.elem.combo_input.closest("li");0===t.elem.element_box.find("li.selected_tag").length?(e.hasClass("full_width")||e.addClass("full_width"),t.elem.combo_input.attr("placeholder_bak")&&t.elem.combo_input.attr("placeholder",t.elem.combo_input.attr("placeholder_bak")).removeAttr("style")):function(t,e){e.removeClass("full_width");var i=t.elem.combo_input.val().length+1,n=.75*i+"em";t.elem.combo_input.css("width",n).removeAttr("placeholder")}(t,e)}},d.prototype.nextLine=function(t){var e,i=t.getCurrentLine(t);if(i?(e=t.elem.results.children("li").index(i),i.removeClass(t.css_class.select)):e=-1,++e-1){t.elem.results.children("li").eq(e).addClass(t.css_class.select),t.setCssFocusedResults(t)}else t.setCssFocusedInput(t);t.scrollWindow(t,!1)};var u=t.fn.selectPage;t.fn.selectPage=e,t.fn.selectPage.Constructor=d,t.fn.selectPageClear=n,t.fn.selectPageRefresh=o,t.fn.selectPageData=a,t.fn.selectPageDisabled=s,t.fn.selectPageText=r,t.fn.selectPageSelectedData=l,t.fn.selectPage.noConflict=function(){return t.fn.selectPage=u,this}}(window.jQuery),define("selectpage",function(){}),function(t,e){if("function"==typeof define&&define.amd)define("bootstrap-daterangepicker",["moment","jquery"],function(t,i){return i.fn||(i.fn={}),e(t,i)});else if("object"==typeof module&&module.exports){var i="undefined"!=typeof window?window.jQuery:void 0;i||(i=require("jquery"),i.fn||(i.fn={}));var n="undefined"!=typeof window&&void 0!==window.moment?window.moment:require("moment");module.exports=e(n,i)}else t.daterangepicker=e(t.moment,t.jQuery)}(this,function(t,e){var i=function(i,n,o){if(this.parentEl="body",this.element=e(i),this.startDate=t().startOf("day"),this.endDate=t().endOf("day"),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.showCustomRangeLabel=!0,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyClass="btn-success",this.cancelClass="btn-default",this.locale={direction:"ltr",format:t.localeData().longDateFormat("L"),separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:t.weekdaysMin(),monthNames:t.monthsShort(),firstDay:t.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},"object"==typeof n&&null!==n||(n={}),n=e.extend(this.element.data(),n),"string"==typeof n.template||n.template instanceof e||(n.template=''),this.parentEl=e(n.parentEl&&e(n.parentEl).length?n.parentEl:this.parentEl),this.container=e(n.template).appendTo(this.parentEl),"object"==typeof n.locale&&("string"==typeof n.locale.direction&&(this.locale.direction=n.locale.direction),"string"==typeof n.locale.format&&(this.locale.format=n.locale.format),"string"==typeof n.locale.separator&&(this.locale.separator=n.locale.separator),"object"==typeof n.locale.daysOfWeek&&(this.locale.daysOfWeek=n.locale.daysOfWeek.slice()),"object"==typeof n.locale.monthNames&&(this.locale.monthNames=n.locale.monthNames.slice()),"number"==typeof n.locale.firstDay&&(this.locale.firstDay=n.locale.firstDay),"string"==typeof n.locale.applyLabel&&(this.locale.applyLabel=n.locale.applyLabel),"string"==typeof n.locale.cancelLabel&&(this.locale.cancelLabel=n.locale.cancelLabel),"string"==typeof n.locale.weekLabel&&(this.locale.weekLabel=n.locale.weekLabel),"string"==typeof n.locale.customRangeLabel)){var a=document.createElement("textarea");a.innerHTML=n.locale.customRangeLabel;var s=a.value;this.locale.customRangeLabel=s}if(this.container.addClass(this.locale.direction),"string"==typeof n.startDate&&(this.startDate=t(n.startDate,this.locale.format)),"string"==typeof n.endDate&&(this.endDate=t(n.endDate,this.locale.format)),"string"==typeof n.minDate&&(this.minDate=t(n.minDate,this.locale.format)),"string"==typeof n.maxDate&&(this.maxDate=t(n.maxDate,this.locale.format)),"object"==typeof n.startDate&&(this.startDate=t(n.startDate)),"object"==typeof n.endDate&&(this.endDate=t(n.endDate)),"object"==typeof n.minDate&&(this.minDate=t(n.minDate)),"object"==typeof n.maxDate&&(this.maxDate=t(n.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),"string"==typeof n.applyClass&&(this.applyClass=n.applyClass),"string"==typeof n.cancelClass&&(this.cancelClass=n.cancelClass),"object"==typeof n.dateLimit&&(this.dateLimit=n.dateLimit),"string"==typeof n.opens&&(this.opens=n.opens),"string"==typeof n.drops&&(this.drops=n.drops),"boolean"==typeof n.showWeekNumbers&&(this.showWeekNumbers=n.showWeekNumbers),"boolean"==typeof n.showISOWeekNumbers&&(this.showISOWeekNumbers=n.showISOWeekNumbers),"string"==typeof n.buttonClasses&&(this.buttonClasses=n.buttonClasses),"object"==typeof n.buttonClasses&&(this.buttonClasses=n.buttonClasses.join(" ")),"boolean"==typeof n.showDropdowns&&(this.showDropdowns=n.showDropdowns),"boolean"==typeof n.showCustomRangeLabel&&(this.showCustomRangeLabel=n.showCustomRangeLabel),"boolean"==typeof n.singleDatePicker&&(this.singleDatePicker=n.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof n.timePicker&&(this.timePicker=n.timePicker),"boolean"==typeof n.timePickerSeconds&&(this.timePickerSeconds=n.timePickerSeconds),"number"==typeof n.timePickerIncrement&&(this.timePickerIncrement=n.timePickerIncrement),"boolean"==typeof n.timePicker24Hour&&(this.timePicker24Hour=n.timePicker24Hour),"boolean"==typeof n.autoApply&&(this.autoApply=n.autoApply),"boolean"==typeof n.autoUpdateInput&&(this.autoUpdateInput=n.autoUpdateInput),"boolean"==typeof n.linkedCalendars&&(this.linkedCalendars=n.linkedCalendars),"function"==typeof n.isInvalidDate&&(this.isInvalidDate=n.isInvalidDate),"function"==typeof n.isCustomDate&&(this.isCustomDate=n.isCustomDate),"boolean"==typeof n.alwaysShowCalendars&&(this.alwaysShowCalendars=n.alwaysShowCalendars),0!=this.locale.firstDay)for(var r=this.locale.firstDay;r>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),r--;var l,c,d;if(void 0===n.startDate&&void 0===n.endDate&&e(this.element).is("input[type=text]")){var u=e(this.element).val(),h=u.split(this.locale.separator);l=c=null,2==h.length?(l=t(h[0],this.locale.format),c=t(h[1],this.locale.format)):this.singleDatePicker&&""!==u&&(l=t(u,this.locale.format),c=t(u,this.locale.format)),null!==l&&null!==c&&(this.setStartDate(l),this.setEndDate(c))}if("object"==typeof n.ranges){for(d in n.ranges){l="string"==typeof n.ranges[d][0]?t(n.ranges[d][0],this.locale.format):t(n.ranges[d][0]),c="string"==typeof n.ranges[d][1]?t(n.ranges[d][1],this.locale.format):t(n.ranges[d][1]),this.minDate&&l.isBefore(this.minDate)&&(l=this.minDate.clone());var p=this.maxDate;if(this.dateLimit&&p&&l.clone().add(this.dateLimit).isAfter(p)&&(p=l.clone().add(this.dateLimit)),p&&c.isAfter(p)&&(c=p.clone()),!(this.minDate&&c.isBefore(this.minDate,this.timepicker?"minute":"day")||p&&l.isAfter(p,this.timepicker?"minute":"day"))){var a=document.createElement("textarea");a.innerHTML=d;var s=a.value;this.ranges[s]=[l,c]}}var f="";for(d in this.ranges)f+=''+d+" ";this.showCustomRangeLabel&&(f+=''+this.locale.customRangeLabel+" "),f+=" ",this.container.find(".ranges").prepend(f)}"function"==typeof o&&(this.callback=o),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&"object"!=typeof n.ranges?this.container.find(".ranges").hide():this.autoApply&&this.container.find(".applyBtn, .cancelBtn").addClass("hide"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".calendar.left").addClass("single"),this.container.find(".calendar.left").show(),this.container.find(".calendar.right").hide(),this.container.find(".daterangepicker_input input, .daterangepicker_input > i").hide(),this.timePicker?this.container.find(".ranges ul").hide():this.container.find(".ranges").hide()),(void 0===n.ranges&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),void 0!==n.ranges&&"right"==this.opens&&this.container.find(".ranges").prependTo(this.container.find(".calendar.left").parent()),this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyClass.length&&this.container.find(".applyBtn").addClass(this.applyClass),this.cancelClass.length&&this.container.find(".cancelBtn").addClass(this.cancelClass),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".calendar").on("click.daterangepicker",".prev",e.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",e.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",e.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",e.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",e.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",e.proxy(this.timeChanged,this)).on("click.daterangepicker",".daterangepicker_input input",e.proxy(this.showCalendars,this)).on("focus.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsFocused,this)).on("blur.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsBlurred,this)).on("change.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsChanged,this)).on("keydown.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsKeydown,this)),this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",e.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",e.proxy(this.clickCancel,this)).on("click.daterangepicker","li",e.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",e.proxy(this.hoverRange,this)).on("mouseleave.daterangepicker","li",e.proxy(this.updateFormInputs,this)),this.element.is("input")||this.element.is("button")?this.element.on({"click.daterangepicker":e.proxy(this.show,this),"focus.daterangepicker":e.proxy(this.show,this),"keyup.daterangepicker":e.proxy(this.elementChanged,this),"keydown.daterangepicker":e.proxy(this.keydown,this)}):(this.element.on("click.daterangepicker",e.proxy(this.toggle,this)),this.element.on("keydown.daterangepicker",e.proxy(this.toggle,this))),this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))};return i.prototype={constructor:i,setStartDate:function(e){"string"==typeof e&&(this.startDate=t(e,this.locale.format)),"object"==typeof e&&(this.startDate=t(e)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(e){"string"==typeof e&&(this.endDate=t(e,this.locale.format)),"object"==typeof e&&(this.endDate=t(e)),this.timePicker||(this.endDate=this.endDate.add(1,"d").startOf("day").subtract(1,"second")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),this.dateLimit&&this.startDate.clone().add(this.dateLimit).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.dateLimit)),this.previousRightTime=this.endDate.clone(),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").removeAttr("disabled").removeClass("disabled"):this.container.find(".right .calendar-time select").attr("disabled","disabled").addClass("disabled")),this.endDate?(this.container.find('input[name="daterangepicker_end"]').removeClass("active"),this.container.find('input[name="daterangepicker_start"]').addClass("active")):(this.container.find('input[name="daterangepicker_end"]').addClass("active"),this.container.find('input[name="daterangepicker_start"]').removeClass("active")),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){if(this.timePicker){var t,e,i;if(this.endDate){if(t=parseInt(this.container.find(".left .hourselect").val(),10),e=parseInt(this.container.find(".left .minuteselect").val(),10),i=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,!this.timePicker24Hour){var n=this.container.find(".left .ampmselect").val();"PM"===n&&t<12&&(t+=12),"AM"===n&&12===t&&(t=0)}}else if(t=parseInt(this.container.find(".right .hourselect").val(),10),e=parseInt(this.container.find(".right .minuteselect").val(),10),i=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,!this.timePicker24Hour){var n=this.container.find(".right .ampmselect").val();"PM"===n&&t<12&&(t+=12),"AM"===n&&12===t&&(t=0)}this.leftCalendar.month.hour(t).minute(e).second(i),this.rightCalendar.month.hour(t).minute(e).second(i)}this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate&&this.calculateChosenLabel()},renderCalendar:function(i){var n="left"==i?this.leftCalendar:this.rightCalendar,o=n.month.month(),a=n.month.year(),s=n.month.hour(),r=n.month.minute(),l=n.month.second(),c=t([a,o]).daysInMonth(),d=t([a,o,1]),u=t([a,o,c]),h=t(d).subtract(1,"month").month(),p=t(d).subtract(1,"month").year(),f=t([p,h]).daysInMonth(),m=d.day(),n=[];n.firstDay=d,n.lastDay=u;for(var g=0;g<6;g++)n[g]=[];var v=f-m+this.locale.firstDay+1;v>f&&(v-=7),m==this.locale.firstDay&&(v=f-6);for(var y,b,w=t([p,h,v,12,r,l]),g=0,y=0,b=0;g<42;g++,y++,w=t(w).add(24,"hour"))g>0&&y%7==0&&(y=0,b++),n[b][y]=w.clone().hour(s).minute(r).second(l),w.hour(12),this.minDate&&n[b][y].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&n[b][y].isBefore(this.minDate)&&"left"==i&&(n[b][y]=this.minDate.clone()),this.maxDate&&n[b][y].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&n[b][y].isAfter(this.maxDate)&&"right"==i&&(n[b][y]=this.maxDate.clone());"left"==i?this.leftCalendar.calendar=n:this.rightCalendar.calendar=n;var x="left"==i?this.minDate:this.startDate,k=this.maxDate,_=("left"==i?this.startDate:this.endDate,"ltr"==this.locale.direction?{left:"chevron-left",right:"chevron-right"}:{left:"chevron-right",right:"chevron-left"}),C='';C+="",C+="",(this.showWeekNumbers||this.showISOWeekNumbers)&&(C+=" "),x&&!x.isBefore(n.firstDay)||this.linkedCalendars&&"left"!=i?C+=" ":C+=' ';var S=this.locale.monthNames[n[1][1].month()]+n[1][1].format(" YYYY");if(this.showDropdowns){for(var T=n[1][1].month(),D=n[1][1].year(),$=k&&k.year()||D+5,E=x&&x.year()||D-50,A=D==E,O=D==$,F='',M=0;M<12;M++)(!A||M>=x.month())&&(!O||M<=k.month())?F+=""+this.locale.monthNames[M]+" ":F+=""+this.locale.monthNames[M]+" ";F+=" ";for(var P='',L=E;L<=$;L++)P+='"+L+" ";P+=" ",S=F+P}if(C+=''+S+" ",k&&!k.isAfter(n.lastDay)||this.linkedCalendars&&"right"!=i&&!this.singleDatePicker?C+=" ":C+=' ',C+=" ",C+="",(this.showWeekNumbers||this.showISOWeekNumbers)&&(C+=''+this.locale.weekLabel+" "),e.each(this.locale.daysOfWeek,function(t,e){C+=""+e+" "}),C+=" ",C+=" ",C+="",null==this.endDate&&this.dateLimit){var I=this.startDate.clone().add(this.dateLimit).endOf("day");k&&!I.isBefore(k)||(k=I)}for(var b=0;b<6;b++){C+="",this.showWeekNumbers?C+=''+n[b][0].week()+" ":this.showISOWeekNumbers&&(C+=''+n[b][0].isoWeek()+" ");for(var y=0;y<7;y++){var N=[];n[b][y].isSame(new Date,"day")&&N.push("today"),n[b][y].isoWeekday()>5&&N.push("weekend"),n[b][y].month()!=n[1][1].month()&&N.push("off"),this.minDate&&n[b][y].isBefore(this.minDate,"day")&&N.push("off","disabled"),k&&n[b][y].isAfter(k,"day")&&N.push("off","disabled"),this.isInvalidDate(n[b][y])&&N.push("off","disabled"),n[b][y].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&N.push("active","start-date"),null!=this.endDate&&n[b][y].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&N.push("active","end-date"),null!=this.endDate&&n[b][y]>this.startDate&&n[b][y]'+n[b][y].date()+""}C+=" "}C+=" ",C+="
",this.container.find(".calendar."+i+" .calendar-table").html(C)},renderTimePicker:function(t){if("right"!=t||this.endDate){var e,i,n,o=this.maxDate;if(!this.dateLimit||this.maxDate&&!this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)||(o=this.startDate.clone().add(this.dateLimit)),"left"==t)i=this.startDate.clone(),n=this.minDate;else if("right"==t){i=this.endDate.clone(),n=this.startDate;var a=this.container.find(".calendar.right .calendar-time div");if(""!=a.html()&&(i.hour(a.find(".hourselect option:selected").val()||i.hour()),i.minute(a.find(".minuteselect option:selected").val()||i.minute()),i.second(a.find(".secondselect option:selected").val()||i.second()),!this.timePicker24Hour)){var s=a.find(".ampmselect option:selected").val();"PM"===s&&i.hour()<12&&i.hour(i.hour()+12),"AM"===s&&12===i.hour()&&i.hour(0)}i.isBefore(this.startDate)&&(i=this.startDate.clone()),o&&i.isAfter(o)&&(i=o.clone())}e='';for(var r=this.timePicker24Hour?0:1,l=this.timePicker24Hour?23:12,c=r;c<=l;c++){var d=c;this.timePicker24Hour||(d=i.hour()>=12?12==c?12:c+12:12==c?0:c);var u=i.clone().hour(d),h=!1;n&&u.minute(59).isBefore(n)&&(h=!0),o&&u.minute(0).isAfter(o)&&(h=!0),d!=i.hour()||h?e+=h?''+c+" ":''+c+" ":e+=''+c+" "}e+=" ",e+=': ';for(var c=0;c<60;c+=this.timePickerIncrement){var p=c<10?"0"+c:c,u=i.clone().minute(c),h=!1;n&&u.second(59).isBefore(n)&&(h=!0),o&&u.second(0).isAfter(o)&&(h=!0),i.minute()!=c||h?e+=h?''+p+" ":''+p+" ":e+=''+p+" "}if(e+=" ",this.timePickerSeconds){e+=': ';for(var c=0;c<60;c++){var p=c<10?"0"+c:c,u=i.clone().second(c),h=!1;n&&u.isBefore(n)&&(h=!0),o&&u.isAfter(o)&&(h=!0),i.second()!=c||h?e+=h?''+p+" ":''+p+" ":e+=''+p+" "}e+=" "}if(!this.timePicker24Hour){e+='';var f="",m="";n&&i.clone().hour(12).minute(0).second(0).isBefore(n)&&(f=' disabled="disabled" class="disabled"'),o&&i.clone().hour(0).minute(0).second(0).isAfter(o)&&(m=' disabled="disabled" class="disabled"'),
+i.hour()>=12?e+='AM PM ":e+='AM PM ",e+=" "}this.container.find(".calendar."+t+" .calendar-time div").html(e)}},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").is(":focus")||this.container.find("input[name=daterangepicker_end]").is(":focus")||(this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.locale.format)),this.endDate&&this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.locale.format)),this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled"))},move:function(){var t,i={top:0,left:0},n=e(window).width();this.parentEl.is("body")||(i={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},n=this.parentEl[0].clientWidth+this.parentEl.offset().left),t="up"==this.drops?this.element.offset().top-this.container.outerHeight()-i.top:this.element.offset().top+this.element.outerHeight()-i.top,this.container["up"==this.drops?"addClass":"removeClass"]("dropup"),"left"==this.opens?(this.container.css({top:t,right:n-this.element.offset().left-this.element.outerWidth(),left:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):"center"==this.opens?(this.container.css({top:t,left:this.element.offset().left-i.left+this.element.outerWidth()/2-this.container.outerWidth()/2,right:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:t,left:this.element.offset().left-i.left,right:"auto"}),this.container.offset().left+this.container.outerWidth()>e(window).width()&&this.container.css({left:"auto",right:0}))},show:function(t){this.isShowing||(this._outsideClickProxy=e.proxy(function(t){this.outsideClick(t)},this),e(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),e(window).on("resize.daterangepicker",e.proxy(function(t){this.move(t)},this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.previousRightTime=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(t){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate,this.endDate,this.chosenLabel),this.updateElement(),e(document).off(".daterangepicker"),e(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(t){this.isShowing?this.hide():this.show()},outsideClick:function(t){var i=e(t.target);"focusin"==t.type||i.closest(this.element).length||i.closest(this.container).length||i.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},hoverRange:function(t){if(!this.container.find("input[name=daterangepicker_start]").is(":focus")&&!this.container.find("input[name=daterangepicker_end]").is(":focus")){var e=t.target.getAttribute("data-range-key");if(e==this.locale.customRangeLabel)this.updateView();else{var i=this.ranges[e];this.container.find("input[name=daterangepicker_start]").val(i[0].format(this.locale.format)),this.container.find("input[name=daterangepicker_end]").val(i[1].format(this.locale.format))}}},clickRange:function(t){var e=t.target.getAttribute("data-range-key");if(this.chosenLabel=e,e==this.locale.customRangeLabel)this.showCalendars();else{var i=this.ranges[e];this.startDate=i[0],this.endDate=i[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply()}},clickPrev:function(t){e(t.target).parents(".calendar").hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(t){e(t.target).parents(".calendar").hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(t){if(e(t.target).hasClass("available")){var i=e(t.target).attr("data-title"),n=i.substr(1,1),o=i.substr(3,1),a=e(t.target).parents(".calendar"),s=a.hasClass("left")?this.leftCalendar.calendar[n][o]:this.rightCalendar.calendar[n][o];this.endDate&&!this.container.find("input[name=daterangepicker_start]").is(":focus")?this.container.find("input[name=daterangepicker_start]").val(s.format(this.locale.format)):this.endDate||this.container.find("input[name=daterangepicker_end]").is(":focus")||this.container.find("input[name=daterangepicker_end]").val(s.format(this.locale.format));var r=this.leftCalendar,l=this.rightCalendar,c=this.startDate;this.endDate||this.container.find(".calendar tbody td").each(function(t,i){if(!e(i).hasClass("week")){var n=e(i).attr("data-title"),o=n.substr(1,1),a=n.substr(3,1),d=e(i).parents(".calendar"),u=d.hasClass("left")?r.calendar[o][a]:l.calendar[o][a];u.isAfter(c)&&u.isBefore(s)||u.isSame(s,"day")?e(i).addClass("in-range"):e(i).removeClass("in-range")}})}},clickDate:function(t){if(e(t.target).hasClass("available")){var i=e(t.target).attr("data-title"),n=i.substr(1,1),o=i.substr(3,1),a=e(t.target).parents(".calendar"),s=a.hasClass("left")?this.leftCalendar.calendar[n][o]:this.rightCalendar.calendar[n][o];if(this.endDate||s.isBefore(this.startDate,"day")){if(this.timePicker){var r=parseInt(this.container.find(".left .hourselect").val(),10);if(!this.timePicker24Hour){var l=this.container.find(".left .ampmselect").val();"PM"===l&&r<12&&(r+=12),"AM"===l&&12===r&&(r=0)}var c=parseInt(this.container.find(".left .minuteselect").val(),10),d=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;s=s.clone().hour(r).minute(c).second(d)}this.endDate=null,this.setStartDate(s.clone())}else if(!this.endDate&&s.isBefore(this.startDate))this.setEndDate(this.startDate.clone());else{if(this.timePicker){var r=parseInt(this.container.find(".right .hourselect").val(),10);if(!this.timePicker24Hour){var l=this.container.find(".right .ampmselect").val();"PM"===l&&r<12&&(r+=12),"AM"===l&&12===r&&(r=0)}var c=parseInt(this.container.find(".right .minuteselect").val(),10),d=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0;s=s.clone().hour(r).minute(c).second(d)}this.setEndDate(s.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply())}this.singleDatePicker&&(this.setEndDate(this.startDate),this.timePicker||this.clickApply()),this.updateView(),t.stopPropagation()}},calculateChosenLabel:function(){var t=!0,e=0;for(var i in this.ranges){if(this.timePicker){var n=this.timePickerSeconds?"YYYY-MM-DD hh:mm:ss":"YYYY-MM-DD hh:mm";if(this.startDate.format(n)==this.ranges[i][0].format(n)&&this.endDate.format(n)==this.ranges[i][1].format(n)){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").html();break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[i][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[i][1].format("YYYY-MM-DD")){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").html();break}e++}t&&(this.showCustomRangeLabel?this.chosenLabel=this.container.find(".ranges li:last").addClass("active").html():this.chosenLabel=null,this.showCalendars())},clickApply:function(t){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(t){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(t){var i=e(t.target).closest(".calendar").hasClass("left"),n=i?"left":"right",o=this.container.find(".calendar."+n),a=parseInt(o.find(".monthselect").val(),10),s=o.find(".yearselect").val();i||(sthis.maxDate.year()||s==this.maxDate.year()&&a>this.maxDate.month())&&(a=this.maxDate.month(),s=this.maxDate.year()),i?(this.leftCalendar.month.month(a).year(s),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(a).year(s),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(t){var i=e(t.target).closest(".calendar"),n=i.hasClass("left"),o=parseInt(i.find(".hourselect").val(),10),a=parseInt(i.find(".minuteselect").val(),10),s=this.timePickerSeconds?parseInt(i.find(".secondselect").val(),10):0;if(!this.timePicker24Hour){var r=i.find(".ampmselect").val();"PM"===r&&o<12&&(o+=12),"AM"===r&&12===o&&(o=0)}if(n){var l=this.startDate.clone();l.hour(o),l.minute(a),l.second(s),this.setStartDate(l),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==l.format("YYYY-MM-DD")&&this.endDate.isBefore(l)&&this.setEndDate(l.clone())}else if(this.endDate){var c=this.endDate.clone();c.hour(o),c.minute(a),c.second(s),this.setEndDate(c)}this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},formInputsChanged:function(i){var n=e(i.target).closest(".calendar").hasClass("right"),o=t(this.container.find('input[name="daterangepicker_start"]').val(),this.locale.format),a=t(this.container.find('input[name="daterangepicker_end"]').val(),this.locale.format);o.isValid()&&a.isValid()&&(n&&a.isBefore(o)&&(o=a.clone()),this.setStartDate(o),this.setEndDate(a),n?this.container.find('input[name="daterangepicker_start"]').val(this.startDate.format(this.locale.format)):this.container.find('input[name="daterangepicker_end"]').val(this.endDate.format(this.locale.format))),this.updateView()},formInputsFocused:function(t){this.container.find('input[name="daterangepicker_start"], input[name="daterangepicker_end"]').removeClass("active"),e(t.target).addClass("active"),e(t.target).closest(".calendar").hasClass("right")&&(this.endDate=null,this.setStartDate(this.startDate.clone()),this.updateView())},formInputsBlurred:function(e){if(!this.endDate){var i=this.container.find('input[name="daterangepicker_end"]').val(),n=t(i,this.locale.format);n.isValid()&&(this.setEndDate(n),this.updateView())}},formInputsKeydown:function(t){13===t.keyCode&&(t.preventDefault(),this.formInputsChanged(t))},elementChanged:function(){if(this.element.is("input")&&this.element.val().length){var e=this.element.val().split(this.locale.separator),i=null,n=null;2===e.length&&(i=t(e[0],this.locale.format),n=t(e[1],this.locale.format)),(this.singleDatePicker||null===i||null===n)&&(i=t(this.element.val(),this.locale.format),n=i),i.isValid()&&n.isValid()&&(this.setStartDate(i),this.setEndDate(n),this.updateView())}},keydown:function(t){9!==t.keyCode&&13!==t.keyCode||this.hide(),27===t.keyCode&&(t.preventDefault(),t.stopPropagation(),this.hide())},updateElement:function(){this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData()}},e.fn.daterangepicker=function(t,n){var o=e.extend(!0,{},e.fn.daterangepicker.defaultOptions,t);return this.each(function(){var t=e(this);t.data("daterangepicker")&&t.data("daterangepicker").remove(),t.data("daterangepicker",new i(t,o,n))}),this},i});
\ No newline at end of file
diff --git a/public/assets/js/require-css.min.js b/public/assets/js/require-css.min.js
new file mode 100755
index 0000000..2e1d120
--- /dev/null
+++ b/public/assets/js/require-css.min.js
@@ -0,0 +1 @@
+define(function(){if("undefined"==typeof window)return{load:function(e,t,n){n()}};var e=document.getElementsByTagName("head")[0],t=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/)||0,n=!1,r=!0;t[1]||t[7]?n=parseInt(t[1])<6||parseInt(t[7])<=9:t[2]||t[8]?r=!1:t[4]&&(n=parseInt(t[4])<18);var o={};o.pluginBuilder="./css-builder";var a,i,s,l=function(){a=document.createElement("style"),e.appendChild(a),i=a.styleSheet||a.sheet},u=0,d=[],c=function(e){u++,32==u&&(l(),u=0),i.addImport(e),a.onload=function(){f()}},f=function(){s();var e=d.shift();return e?(s=e[1],void c(e[0])):void(s=null)},h=function(e,t){if(i&&i.addImport||l(),i&&i.addImport)s?d.push([e,t]):(c(e),s=t);else{a.textContent='@import "'+e+'";';var n=setInterval(function(){try{a.sheet.cssRules,clearInterval(n),t()}catch(e){}},10)}},p=function(t,n){var o=document.createElement("link");if(o.type="text/css",o.rel="stylesheet",r)o.onload=function(){o.onload=function(){},setTimeout(n,7)};else var a=setInterval(function(){for(var e=0;e '
+ },
+ events: {
+ validator: function (form, success, error, submit) {
+ if (!form.is("form"))
+ return;
+ //绑定表单事件
+ form.validator($.extend({
+ rules: {
+ username: [/^\w{3,30}$/, __('Username must be 3 to 30 characters')],
+ password: [/^[\S]{6,30}$/, __('Password must be 6 to 30 characters')]
+ },
+ validClass: 'has-success',
+ invalidClass: 'has-error',
+ bindClassTo: '.form-group',
+ formClass: 'n-default n-bootstrap',
+ msgClass: 'n-right',
+ stopOnError: true,
+ display: function (elem) {
+ return $(elem).closest('.form-group').find(".control-label").text().replace(/\:/, '');
+ },
+ dataFilter: function (data) {
+ if (data.code === 1) {
+ return data.msg ? {"ok": data.msg} : '';
+ } else {
+ return data.msg;
+ }
+ },
+ target: function (input) {
+ var target = $(input).data("target");
+ if (target && $(target).length > 0) {
+ return $(target);
+ }
+ var $formitem = $(input).closest('.form-group'),
+ $msgbox = $formitem.find('span.msg-box');
+ if (!$msgbox.length) {
+ return [];
+ }
+ return $msgbox;
+ },
+ valid: function (ret) {
+ var that = this, submitBtn = $(".layer-footer [type=submit]", form);
+ that.holdSubmit(true);
+ submitBtn.addClass("disabled");
+ //验证通过提交表单
+ var submitResult = Form.api.submit($(ret), function (data, ret) {
+ that.holdSubmit(false);
+ submitBtn.removeClass("disabled");
+ if (false === $(this).triggerHandler("success.form", [data, ret])) {
+ return false;
+ }
+ if (typeof success === 'function') {
+ if (false === success.call($(this), data, ret)) {
+ return false;
+ }
+ }
+ //提示及关闭当前窗口
+ var msg = ret.hasOwnProperty("msg") && ret.msg !== "" ? ret.msg : __('Operation completed');
+ parent.Toastr.success(msg);
+ parent.$(".btn-refresh").trigger("click");
+ if (window.name) {
+ var index = parent.Layer.getFrameIndex(window.name);
+ parent.Layer.close(index);
+ }
+ return false;
+ }, function (data, ret) {
+ that.holdSubmit(false);
+ if (false === $(this).triggerHandler("error.form", [data, ret])) {
+ return false;
+ }
+ submitBtn.removeClass("disabled");
+ if (typeof error === 'function') {
+ if (false === error.call($(this), data, ret)) {
+ return false;
+ }
+ }
+ }, submit);
+ //如果提交失败则释放锁定
+ if (!submitResult) {
+ that.holdSubmit(false);
+ submitBtn.removeClass("disabled");
+ }
+ return false;
+ }
+ }, form.data("validator-options") || {}));
+
+ //移除提交按钮的disabled类
+ $(".layer-footer [type=submit],.fixed-footer [type=submit],.normal-footer [type=submit]", form).removeClass("disabled");
+ //自定义关闭按钮事件
+ form.on("click", ".layer-close", function () {
+ if (window.name) {
+ var index = parent.Layer.getFrameIndex(window.name);
+ parent.Layer.close(index);
+ }
+ return false;
+ });
+ },
+ selectpicker: function (form) {
+ //绑定select元素事件
+ if ($(".selectpicker", form).length > 0) {
+ require(['bootstrap-select', 'bootstrap-select-lang'], function () {
+ $.fn.selectpicker.Constructor.BootstrapVersion = '3';
+ $('.selectpicker', form).selectpicker();
+ $(form).on("reset", function () {
+ setTimeout(function () {
+ $('.selectpicker').selectpicker('refresh').trigger("change");
+ }, 1);
+ });
+ });
+ }
+ },
+ selectpage: function (form) {
+ //绑定selectpage元素事件
+ if ($(".selectpage", form).length > 0) {
+ require(['selectpage'], function () {
+ $('.selectpage', form).selectPage({
+ eAjaxSuccess: function (data) {
+ data.list = typeof data.rows !== 'undefined' ? data.rows : (typeof data.list !== 'undefined' ? data.list : []);
+ data.totalRow = typeof data.total !== 'undefined' ? data.total : (typeof data.totalRow !== 'undefined' ? data.totalRow : data.list.length);
+ return data;
+ }
+ });
+ });
+ //给隐藏的元素添加上validate验证触发事件
+ $(document).on("change", ".sp_hidden", function () {
+ $(this).trigger("validate");
+ });
+ $(document).on("change", ".sp_input", function () {
+ $(this).closest(".sp_container").find(".sp_hidden").trigger("change");
+ });
+ $(form).on("reset", function () {
+ setTimeout(function () {
+ $(".selectpage", form).each(function () {
+ var selectpage = $(this).data("selectPageObject");
+ selectpage.elem.hidden.val($(this).val());
+ $(this).selectPageRefresh();
+ });
+ }, 1);
+ });
+ }
+ },
+ cxselect: function (form) {
+ //绑定cxselect元素事件
+ if ($("[data-toggle='cxselect']", form).length > 0) {
+ require(['cxselect'], function () {
+ $.cxSelect.defaults.jsonName = 'name';
+ $.cxSelect.defaults.jsonValue = 'value';
+ $.cxSelect.defaults.jsonSpace = 'data';
+ $("[data-toggle='cxselect']", form).cxSelect();
+ });
+ }
+ },
+ citypicker: function (form) {
+ //绑定城市远程插件
+ if ($("[data-toggle='city-picker']", form).length > 0) {
+ require(['citypicker'], function () {
+ $(form).on("reset", function () {
+ setTimeout(function () {
+ $("[data-toggle='city-picker']").citypicker('refresh');
+ }, 1);
+ });
+ });
+ }
+ },
+ datetimepicker: function (form) {
+ //绑定日期时间元素事件
+ if ($(".datetimepicker", form).length > 0) {
+ require(['bootstrap-datetimepicker'], function () {
+ var options = {
+ format: 'YYYY-MM-DD HH:mm:ss',
+ icons: {
+ time: 'fa fa-clock-o',
+ date: 'fa fa-calendar',
+ up: 'fa fa-chevron-up',
+ down: 'fa fa-chevron-down',
+ previous: 'fa fa-chevron-left',
+ next: 'fa fa-chevron-right',
+ today: 'fa fa-history',
+ clear: 'fa fa-trash',
+ close: 'fa fa-remove'
+ },
+ showTodayButton: true,
+ showClose: true
+ };
+ $('.datetimepicker', form).parent().css('position', 'relative');
+ $('.datetimepicker', form).datetimepicker(options).on('dp.change', function (e) {
+ $(this, document).trigger("changed");
+ });
+ });
+ }
+ },
+ daterangepicker: function (form) {
+ //绑定日期时间元素事件
+ if ($(".datetimerange", form).length > 0) {
+ require(['bootstrap-daterangepicker'], function () {
+ var ranges = {};
+ ranges[__('Today')] = [Moment().startOf('day'), Moment().endOf('day')];
+ ranges[__('Yesterday')] = [Moment().subtract(1, 'days').startOf('day'), Moment().subtract(1, 'days').endOf('day')];
+ ranges[__('Last 7 Days')] = [Moment().subtract(6, 'days').startOf('day'), Moment().endOf('day')];
+ ranges[__('Last 30 Days')] = [Moment().subtract(29, 'days').startOf('day'), Moment().endOf('day')];
+ ranges[__('This Month')] = [Moment().startOf('month'), Moment().endOf('month')];
+ ranges[__('Last Month')] = [Moment().subtract(1, 'month').startOf('month'), Moment().subtract(1, 'month').endOf('month')];
+ var options = {
+ timePicker: false,
+ autoUpdateInput: false,
+ timePickerSeconds: true,
+ timePicker24Hour: true,
+ autoApply: true,
+ locale: {
+ format: 'YYYY-MM-DD HH:mm:ss',
+ customRangeLabel: __("Custom Range"),
+ applyLabel: __("Apply"),
+ cancelLabel: __("Clear"),
+ },
+ ranges: ranges,
+ };
+ var origincallback = function (start, end) {
+ $(this.element).val(start.format(this.locale.format) + " - " + end.format(this.locale.format));
+ $(this.element).trigger('change').trigger('validate');
+ };
+ $(".datetimerange", form).each(function () {
+ var callback = typeof $(this).data('callback') == 'function' ? $(this).data('callback') : origincallback;
+ $(this).on('apply.daterangepicker', function (ev, picker) {
+ callback.call(picker, picker.startDate, picker.endDate);
+ });
+ $(this).on('cancel.daterangepicker', function (ev, picker) {
+ $(this).val('').trigger('change').trigger('validate');
+ });
+ $(this).daterangepicker($.extend(true, {}, options, $(this).data() || {}, $(this).data("daterangepicker-options") || {}));
+ });
+ });
+ }
+ },
+ /**
+ * 绑定上传事件
+ * @param form
+ * @deprecated Use faupload instead.
+ */
+ plupload: function (form) {
+ Form.events.faupload(form);
+ },
+ /**
+ * 绑定上传事件
+ * @param form
+ */
+ faupload: function (form) {
+ //绑定上传元素事件
+ if ($(".plupload,.faupload", form).length > 0) {
+ Upload.api.upload($(".plupload,.faupload", form));
+ }
+ },
+ faselect: function (form) {
+ //绑定fachoose选择附件事件
+ if ($(".faselect,.fachoose", form).length > 0) {
+ $(".faselect,.fachoose", form).off('click').on('click', function () {
+ var that = this;
+ var multiple = $(this).data("multiple") ? $(this).data("multiple") : false;
+ var mimetype = $(this).data("mimetype") ? $(this).data("mimetype") : '';
+ var admin_id = $(this).data("admin-id") ? $(this).data("admin-id") : '';
+ var user_id = $(this).data("user-id") ? $(this).data("user-id") : '';
+ mimetype = mimetype.replace(/\/\*/ig, '/');
+ var url = $(this).data("url") ? $(this).data("url") : (typeof Backend !== 'undefined' ? "general/attachment/select" : "user/attachment");
+ parent.Fast.api.open(url + "?element_id=" + $(this).attr("id") + "&multiple=" + multiple + "&mimetype=" + mimetype + "&admin_id=" + admin_id + "&user_id=" + user_id, __('Choose'), {
+ callback: function (data) {
+ var button = $(that);
+ var maxcount = $(button).data("maxcount");
+ var input_id = $(button).data("input-id") ? $(button).data("input-id") : "";
+ maxcount = typeof maxcount !== "undefined" ? maxcount : 0;
+ if (input_id && data.multiple) {
+ var urlArr = [];
+ var inputObj = $("#" + input_id);
+ var value = $.trim(inputObj.val());
+ if (value !== "") {
+ urlArr.push(inputObj.val());
+ }
+ var nums = value === '' ? 0 : value.split(/\,/).length;
+ var files = data.url !== "" ? data.url.split(/\,/) : [];
+ $.each(files, function (i, j) {
+ var url = Config.upload.fullmode ? Fast.api.cdnurl(j) : j;
+ urlArr.push(url);
+ });
+ if (maxcount > 0) {
+ var remains = maxcount - nums;
+ if (files.length > remains) {
+ Toastr.error(__('You can choose up to %d file%s', remains));
+ return false;
+ }
+ }
+ var result = urlArr.join(",");
+ inputObj.val(result).trigger("change").trigger("validate");
+ } else if (input_id) {
+ var url = Config.upload.fullmode ? Fast.api.cdnurl(data.url) : data.url;
+ $("#" + input_id).val(url).trigger("change").trigger("validate");
+ }
+
+ // 触发选择文件自定义事件
+ button.trigger("fa.event.selectedfile", data);
+ }
+ });
+ return false;
+ });
+ }
+ },
+ fieldlist: function (form) {
+ //绑定fieldlist
+ if ($(".fieldlist", form).length > 0) {
+ require(['dragsort', 'template'], function (undefined, Template) {
+ //刷新隐藏textarea的值
+ var refresh = function (container) {
+ var data = {};
+ var name = container.data("name");
+ var textarea = $("textarea[name='" + name + "']", form);
+ var template = container.data("template");
+ $.each($("input,select,textarea", container).serializeArray(), function (i, j) {
+ var reg = /\[(\w+)\]\[(\w+)\]$/g;
+ var match = reg.exec(j.name);
+ if (!match)
+ return true;
+ match[1] = "x" + parseInt(match[1]);
+ if (typeof data[match[1]] == 'undefined') {
+ data[match[1]] = {};
+ }
+ data[match[1]][match[2]] = j.value;
+ });
+ //使用数组保存
+ var usearray = container.data("usearray") || false;
+ //保留空数据
+ var keepempty = container.data("keepempty") || false;
+
+ var result = template || usearray ? [] : {};
+ var keys = Object.keys(Object.values(data)[0] || {});
+
+ var isassociative = !usearray && keys.indexOf("value") > -1 && (keys.length === 1 || (keys.length === 2 && keys.indexOf("key") > -1));
+ if(isassociative && keys.length ===2){
+ result = {};
+ }
+
+ $.each(data, function (i, j) {
+ if (j) {
+ if (isassociative) {
+ if (keys.length === 2) {
+ if (j.key != '' || keepempty) {
+ result['__PLACEHOLDKEY__' + j.key] = j.value;
+ }
+ } else {
+ //一维数组
+ result.push(j.value);
+ }
+ } else {
+ result.push(j);
+ }
+ }
+ });
+ textarea.val(JSON.stringify(result).replace(/__PLACEHOLDKEY__/g, ''));
+ };
+ //追加一行数据
+ var append = function (container, row, initial) {
+ var tagName = container.data("tag") || (container.is("table") ? "tr" : "dd");
+ var index = container.data("index");
+ var name = container.data("name");
+ var template = container.data("template");
+ var data = container.data();
+ index = index ? parseInt(index) : 0;
+ container.data("index", index + 1);
+ row = row ? row : {};
+ row = typeof row.key === 'undefined' || typeof row.value === 'undefined' ? {key: '', value: row} : row;
+ var options = container.data("fieldlist-options") || {};
+ var vars = {index: index, name: name, data: data, options: options, key: row.key, value: row.value, row: row.value};
+ var html = template ? Template(template, vars) : Template.render(Form.config.fieldlisttpl, vars);
+ var obj = $(html);
+ if ((options.deleteBtn === false || options.removeBtn === false) && initial)
+ obj.find(".btn-remove").remove();
+ if (options.dragsortBtn === false && initial)
+ obj.find(".btn-dragsort").remove();
+ if ((options.readonlyKey === true || options.disableKey === true) && initial) {
+ obj.find("input[name$='[key]']").prop("readonly", true);
+ }
+ obj.attr("fieldlist-item", true);
+ obj.insertAfter($(tagName + "[fieldlist-item]", container).length > 0 ? $(tagName + "[fieldlist-item]:last", container) : $(tagName + ":first", container));
+ if ($(".btn-append,.append", container).length > 0) {
+ //兼容旧版本事件
+ $(".btn-append,.append", container).trigger("fa.event.appendfieldlist", obj);
+ } else {
+ //新版本事件
+ container.trigger("fa.event.appendfieldlist", obj);
+ }
+ return obj;
+ };
+ var fieldlist = $(".fieldlist", form);
+ //表单重置
+ form.on("reset", function () {
+ setTimeout(function () {
+ fieldlist.trigger("fa.event.refreshfieldlist");
+ });
+ });
+ //监听文本框改变事件
+ $(document).on('change keyup changed', ".fieldlist input,.fieldlist textarea,.fieldlist select", function () {
+ var container = $(this).closest(".fieldlist");
+ refresh(container);
+ });
+ //追加控制(点击按钮)
+ fieldlist.on("click", ".btn-append,.append", function (e, row) {
+ var container = $(this).closest(".fieldlist");
+ append(container, row);
+ refresh(container);
+ });
+ //移除控制(点击按钮)
+ fieldlist.on("click", ".btn-remove", function () {
+ var container = $(this).closest(".fieldlist");
+ var tagName = container.data("tag") || (container.is("table") ? "tr" : "dd");
+ $(this).closest(tagName).remove();
+ refresh(container);
+ });
+ //追加控制(通过事件)
+ fieldlist.on("fa.event.appendtofieldlist", function (e, row) {
+ var container = $(this);
+ append(container, row);
+ refresh(container);
+ });
+ //根据textarea内容重新渲染
+ fieldlist.on("fa.event.refreshfieldlist", function () {
+ var container = $(this);
+ var textarea = $("textarea[name='" + container.data("name") + "']", form);
+ //先清空已有的数据
+ $("[fieldlist-item]", container).remove();
+ var json = {};
+ try {
+ var val = textarea.val().replace(/"(\d+)"\:/g, "\"__PLACEHOLDERKEY__$1\":");
+ json = JSON.parse(val);
+ } catch (e) {
+ }
+ $.each(json, function (i, j) {
+ append(container, {key: i.toString().replace("__PLACEHOLDERKEY__", ""), value: j}, true);
+ });
+ });
+ //拖拽排序
+ fieldlist.each(function () {
+ var container = $(this);
+ var tagName = container.data("tag") || (container.is("table") ? "tr" : "dd");
+ container.dragsort({
+ itemSelector: tagName,
+ dragSelector: ".btn-dragsort",
+ dragEnd: function () {
+ refresh(container);
+ },
+ placeHolderTemplate: $("<" + tagName + "/>")
+ });
+ if (typeof container.data("options") === 'object' && container.data("options").appendBtn === false) {
+ $(".btn-append,.append", container).hide();
+ }
+ $("textarea[name='" + container.data("name") + "']", form).on("fa.event.refreshfieldlist", function () {
+ //兼容旧版本事件
+ $(this).closest(".fieldlist").trigger("fa.event.refreshfieldlist");
+ });
+ });
+ fieldlist.trigger("fa.event.refreshfieldlist");
+ });
+ }
+ },
+ switcher: function (form) {
+ form.on("click", "[data-toggle='switcher']", function () {
+ if ($(this).hasClass("disabled")) {
+ return false;
+ }
+ var switcher = $.proxy(function () {
+ var input = $(this).prev("input");
+ input = $(this).data("input-id") ? $("#" + $(this).data("input-id")) : input;
+ if (input.length > 0) {
+ var yes = $(this).data("yes");
+ var no = $(this).data("no");
+ if (input.val() == yes) {
+ input.val(no);
+ $("i", this).addClass("fa-flip-horizontal text-gray");
+ } else {
+ input.val(yes);
+ $("i", this).removeClass("fa-flip-horizontal text-gray");
+ }
+ input.trigger('change');
+ }
+ }, this);
+ if (typeof $(this).data("confirm") !== 'undefined') {
+ Layer.confirm($(this).data("confirm"), function (index) {
+ switcher();
+ Layer.close(index);
+ });
+ } else {
+ switcher();
+ }
+
+ return false;
+ });
+ },
+ bindevent: function (form) {
+
+ },
+ slider: function (form) {
+ if ($("[data-role='slider'],input.slider", form).length > 0) {
+ require(['bootstrap-slider'], function () {
+ $("[data-role='slider'],input.slider").removeClass('hidden').css('width', function (index, value) {
+ return $(this).parents('.form-control').width();
+ }).slider().on('slide', function (ev) {
+ var data = $(this).data();
+ if (typeof data.unit !== 'undefined') {
+ $(this).parents('.form-control').siblings('.value').text(ev.value + data.unit);
+ }
+ });
+ });
+ }
+ },
+ tagsinput: function (form) {
+ if ($("[data-role='tagsinput']", form).length > 0) {
+ require(['tagsinput', 'autocomplete'], function () {
+ $("[data-role='tagsinput']").tagsinput();
+ form.on("reset", function () {
+ setTimeout(function () {
+ $("[data-role='tagsinput']").tagsinput('reset');
+ }, 0);
+ });
+ });
+ }
+ },
+ autocomplete: function (form) {
+ if ($("[data-role='autocomplete']", form).length > 0) {
+ require(['autocomplete'], function () {
+ $("[data-role='autocomplete']").autocomplete({
+ onSelect: function () {
+ $(this).trigger('change').trigger('validate');
+ }
+ });
+ });
+ }
+ },
+ favisible: function (form) {
+ if ($("[data-favisible]", form).length == 0) {
+ return;
+ }
+ var checkCondition = function (condition) {
+ var conditionArr = condition.split(/&&/);
+ var success = 0;
+ var baseregex = /^([a-z0-9\_]+)([>|<|=|\!]=?)(.*)$/i, strregex = /^('|")(.*)('|")$/, regregex = /^regex:(.*)$/;
+ // @formatter:off
+ var operator_result = {
+ '>': function (a, b) {
+ return a > b;
+ },
+ '>=': function (a, b) {
+ return a >= b;
+ },
+ '<': function (a, b) {
+ return a < b;
+ },
+ '<=': function (a, b) {
+ return a <= b;
+ },
+ '==': function (a, b) {
+ return a == b;
+ },
+ '!=': function (a, b) {
+ return a != b;
+ },
+ 'in': function (a, b) {
+ return b.split(/\,/).indexOf(a) > -1;
+ },
+ 'regex': function (a, b) {
+ var regParts = b.match(/^\/(.*?)\/([gim]*)$/);
+ var regexp = regParts ? new RegExp(regParts[1], regParts[2]) : new RegExp(b);
+ return regexp.test(a);
+ }
+ };
+ // @formatter:on
+ var $disabledElements = form.find(':disabled').removeAttr('disabled');
+ var dataArr = form.serializeArray(), dataObj = {}, fieldName, fieldValue;
+ $disabledElements.attr('disabled', 'disabled');
+ $(dataArr).each(function (i, field) {
+ fieldName = field.name;
+ fieldValue = field.value;
+ fieldName = fieldName.substr(-2) === '[]' ? fieldName.substr(0, fieldName.length - 2) : fieldName;
+ dataObj[fieldName] = typeof dataObj[fieldName] !== 'undefined' ? [dataObj[fieldName], fieldValue].join(',') : fieldValue;
+ });
+
+ $.each(conditionArr, function (i, item) {
+ var basematches = baseregex.exec(item);
+ if (basematches) {
+ var name = basematches[1], operator = basematches[2], value = basematches[3].toString();
+ if (operator === '=') {
+ var strmatches = strregex.exec(value);
+ operator = strmatches ? '==' : 'in';
+ value = strmatches ? strmatches[2] : value;
+ }
+ var regmatches = regregex.exec(value);
+ if (regmatches) {
+ operator = 'regex';
+ value = regmatches[1];
+ }
+ var chkname = "row[" + name + "]";
+ if (typeof dataObj[chkname] === 'undefined') {
+ return false;
+ }
+ var objvalue = dataObj[chkname];
+ if ($.isArray(objvalue)) {
+ objvalue = dataObj[chkname].join(",");
+ }
+ if (['>', '>=', '<', '<='].indexOf(operator) > -1) {
+ objvalue = parseFloat(objvalue);
+ value = parseFloat(value);
+ }
+ var result = operator_result[operator](objvalue, value);
+ success += (result ? 1 : 0);
+ }
+ });
+ return success === conditionArr.length;
+ };
+ form.on("keyup change click configchange", "input,textarea,select", function () {
+ $("[data-favisible][data-favisible!='']", form).each(function () {
+ var visible = $(this).data("favisible");
+ var groupArr = visible ? visible.toString().split(/\|\|/) : [];
+ var success = 0;
+ $.each(groupArr, function (i, j) {
+ if (checkCondition(j)) {
+ success++;
+ }
+ });
+ if (success > 0) {
+ $(this).removeClass("hidden");
+ } else {
+ $(this).addClass("hidden");
+ }
+ });
+ });
+
+ //追加上忽略元素
+ setTimeout(function () {
+ var validator = form.data('validator');
+ if (validator) {
+ validator.options.ignore += ((validator.options.ignore ? ',' : '') + '.hidden[data-favisible] :hidden,.hidden[data-favisible]:hidden');
+ }
+ }, 0);
+
+ $("input,textarea,select", form).trigger("configchange");
+ }
+ },
+ api: {
+ submit: function (form, success, error, submit) {
+ if (form.length === 0) {
+ Toastr.error("表单未初始化完成,无法提交");
+ return false;
+ }
+ if (typeof submit === 'function') {
+ if (false === submit.call(form, success, error)) {
+ return false;
+ }
+ }
+ var type = form.attr("method") ? form.attr("method").toUpperCase() : 'GET';
+ type = type && (type === 'GET' || type === 'POST') ? type : 'GET';
+ url = form.attr("action");
+ url = url ? url : location.href;
+ //修复当存在多选项元素时提交的BUG
+ var params = {};
+ var multipleList = $("[name$='[]']", form);
+ if (multipleList.length > 0) {
+ var postFields = form.serializeArray().map(function (obj) {
+ return $(obj).prop("name");
+ });
+ $.each(multipleList, function (i, j) {
+ if (postFields.indexOf($(this).prop("name")) < 0) {
+ params[$(this).prop("name")] = '';
+ }
+ });
+ }
+ //调用Ajax请求方法
+ Fast.api.ajax({
+ type: type,
+ url: url,
+ data: form.serialize() + (Object.keys(params).length > 0 ? '&' + $.param(params) : ''),
+ dataType: 'json',
+ complete: function (xhr) {
+ var token = xhr.getResponseHeader('__token__');
+ if (token) {
+ $("input[name='__token__']").val(token);
+ }
+ }
+ }, function (data, ret) {
+ $('.form-group', form).removeClass('has-feedback has-success has-error');
+ if (data && typeof data === 'object') {
+ //刷新客户端token
+ if (typeof data.token !== 'undefined') {
+ $("input[name='__token__']").val(data.token);
+ }
+ //调用客户端事件
+ if (typeof data.callback !== 'undefined' && typeof data.callback === 'function') {
+ data.callback.call(form, data);
+ }
+ }
+ if (typeof success === 'function') {
+ if (false === success.call(form, data, ret)) {
+ return false;
+ }
+ }
+ }, function (data, ret) {
+ if (data && typeof data === 'object' && typeof data.token !== 'undefined') {
+ $("input[name='__token__']").val(data.token);
+ }
+ if (typeof error === 'function') {
+ if (false === error.call(form, data, ret)) {
+ return false;
+ }
+ }
+ });
+ return true;
+ },
+ bindevent: function (form, success, error, submit) {
+
+ form = typeof form === 'object' ? form : $(form);
+
+ var events = Form.events;
+
+ events.bindevent(form);
+
+ events.validator(form, success, error, submit);
+
+ events.selectpicker(form);
+
+ events.daterangepicker(form);
+
+ events.selectpage(form);
+
+ events.cxselect(form);
+
+ events.citypicker(form);
+
+ events.datetimepicker(form);
+
+ events.faupload(form);
+
+ events.faselect(form);
+
+ events.fieldlist(form);
+
+ events.slider(form);
+
+ events.switcher(form);
+
+ events.tagsinput(form);
+
+ events.autocomplete(form);
+
+ events.favisible(form);
+ },
+ custom: {}
+ },
+ };
+ return Form;
+});
diff --git a/public/assets/js/require-frontend.js b/public/assets/js/require-frontend.js
new file mode 100755
index 0000000..67f259c
--- /dev/null
+++ b/public/assets/js/require-frontend.js
@@ -0,0 +1,153 @@
+require.config({
+ urlArgs: "v=" + requirejs.s.contexts._.config.config.site.version,
+ packages: [{
+ name: 'moment',
+ location: '../libs/moment',
+ main: 'moment'
+ }],
+ //在打包压缩时将会把include中的模块合并到主文件中
+ include: ['css', 'layer', 'toastr', 'fast', 'frontend', 'frontend-init', 'table', 'form', 'dragsort', 'selectpage'],
+ paths: {
+ 'lang': "empty:",
+ 'form': 'require-form',
+ 'table': 'require-table',
+ 'upload': 'require-upload',
+ 'dropzone': 'dropzone.min',
+ 'echarts': 'echarts.min',
+ 'echarts-theme': 'echarts-theme',
+ 'adminlte': 'adminlte',
+ 'bootstrap-table-commonsearch': 'bootstrap-table-commonsearch',
+ 'bootstrap-table-template': 'bootstrap-table-template',
+ //
+ // 以下的包从bower的libs目录加载
+ 'jquery': '../libs/jquery/dist/jquery.min',
+ 'bootstrap': '../libs/bootstrap/dist/js/bootstrap.min',
+ 'bootstrap-datetimepicker': '../libs/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min',
+ 'bootstrap-daterangepicker': '../libs/bootstrap-daterangepicker/daterangepicker',
+ 'bootstrap-select': '../libs/bootstrap-select/dist/js/bootstrap-select.min',
+ 'bootstrap-select-lang': '../libs/bootstrap-select/dist/js/i18n/defaults-zh_CN',
+ 'bootstrap-table': '../libs/bootstrap-table/dist/bootstrap-table.min',
+ 'bootstrap-table-export': '../libs/bootstrap-table/dist/extensions/export/bootstrap-table-export.min',
+ 'bootstrap-table-fixed-columns': '../libs/bootstrap-table/dist/extensions/fixed-columns/bootstrap-table-fixed-columns',
+ 'bootstrap-table-mobile': '../libs/bootstrap-table/dist/extensions/mobile/bootstrap-table-mobile',
+ 'bootstrap-table-lang': '../libs/bootstrap-table/dist/locale/bootstrap-table-zh-CN',
+ 'bootstrap-table-jumpto': '../libs/bootstrap-table/dist/extensions/page-jumpto/bootstrap-table-jumpto',
+ 'tableexport': '../libs/tableExport.jquery.plugin/tableExport.min',
+ 'dragsort': '../libs/fastadmin-dragsort/jquery.dragsort',
+ 'sortable': '../libs/Sortable/Sortable.min',
+ 'addtabs': '../libs/fastadmin-addtabs/jquery.addtabs',
+ 'slimscroll': '../libs/jquery-slimscroll/jquery.slimscroll',
+ 'validator': '../libs/nice-validator/dist/jquery.validator',
+ 'validator-lang': '../libs/nice-validator/dist/local/zh-CN',
+ 'toastr': '../libs/toastr/toastr',
+ 'jstree': '../libs/jstree/dist/jstree.min',
+ 'layer': '../libs/fastadmin-layer/dist/layer',
+ 'cookie': '../libs/jquery.cookie/jquery.cookie',
+ 'cxselect': '../libs/fastadmin-cxselect/js/jquery.cxselect',
+ 'template': '../libs/art-template/dist/template-native',
+ 'selectpage': '../libs/fastadmin-selectpage/selectpage',
+ 'citypicker': '../libs/fastadmin-citypicker/dist/js/city-picker.min',
+ 'citypicker-data': '../libs/fastadmin-citypicker/dist/js/city-picker.data'
+ },
+ // shim依赖配置
+ shim: {
+ 'addons': ['frontend'],
+ 'bootstrap': ['jquery'],
+ 'bootstrap-table': {
+ deps: ['bootstrap'],
+ exports: '$.fn.bootstrapTable'
+ },
+ 'bootstrap-table-lang': {
+ deps: ['bootstrap-table'],
+ exports: '$.fn.bootstrapTable.defaults'
+ },
+ 'bootstrap-table-export': {
+ deps: ['bootstrap-table'],
+ exports: '$.fn.bootstrapTable.defaults'
+ },
+ 'bootstrap-table-fixed-columns': {
+ deps: ['bootstrap-table'],
+ exports: '$.fn.bootstrapTable.defaults'
+ },
+ 'bootstrap-table-mobile': {
+ deps: ['bootstrap-table'],
+ exports: '$.fn.bootstrapTable.defaults'
+ },
+ 'bootstrap-table-advancedsearch': {
+ deps: ['bootstrap-table'],
+ exports: '$.fn.bootstrapTable.defaults'
+ },
+ 'bootstrap-table-commonsearch': {
+ deps: ['bootstrap-table'],
+ exports: '$.fn.bootstrapTable.defaults'
+ },
+ 'bootstrap-table-template': {
+ deps: ['bootstrap-table', 'template'],
+ exports: '$.fn.bootstrapTable.defaults'
+ },
+ 'bootstrap-table-jumpto': {
+ deps: ['bootstrap-table'],
+ exports: '$.fn.bootstrapTable.defaults'
+ },
+ 'tableexport': {
+ deps: ['jquery'],
+ exports: '$.fn.extend'
+ },
+ 'slimscroll': {
+ deps: ['jquery'],
+ exports: '$.fn.extend'
+ },
+ 'adminlte': {
+ deps: ['bootstrap', 'slimscroll'],
+ exports: '$.AdminLTE'
+ },
+ 'bootstrap-daterangepicker': [
+ 'moment/locale/zh-cn'
+ ],
+ 'bootstrap-datetimepicker': [
+ 'moment/locale/zh-cn',
+ ],
+ 'bootstrap-select-lang': ['bootstrap-select'],
+ 'jstree': ['css!../libs/jstree/dist/themes/default/style.css'],
+ 'validator-lang': ['validator'],
+ 'citypicker': ['citypicker-data', 'css!../libs/fastadmin-citypicker/dist/css/city-picker.css']
+ },
+ baseUrl: requirejs.s.contexts._.config.config.site.cdnurl + '/assets/js/', //资源基础路径
+ map: {
+ '*': {
+ 'css': '../libs/require-css/css.min'
+ }
+ },
+ waitSeconds: 60,
+ charset: 'utf-8' // 文件编码
+});
+
+require(['jquery', 'bootstrap'], function ($, undefined) {
+ //初始配置
+ var Config = requirejs.s.contexts._.config.config;
+ //将Config渲染到全局
+ window.Config = Config;
+ // 配置语言包的路径
+ var paths = {};
+ paths['lang'] = Config.moduleurl + '/ajax/lang?callback=define&controllername=' + Config.controllername + '&lang=' + Config.language;
+ // 避免目录冲突
+ paths['frontend/'] = 'frontend/';
+ require.config({paths: paths});
+
+ // 初始化
+ $(function () {
+ require(['fast'], function (Fast) {
+ require(['frontend', 'frontend-init', 'addons'], function (Frontend, Addons) {
+ //加载相应模块
+ if (Config.jsname) {
+ require([Config.jsname], function (Controller) {
+ Controller[Config.actionname] != undefined && Controller[Config.actionname]();
+ }, function (e) {
+ console.error(e);
+ // 这里可捕获模块加载的错误
+ });
+ }
+ });
+ });
+ });
+});
diff --git a/public/assets/js/require-frontend.min.js b/public/assets/js/require-frontend.min.js
new file mode 100755
index 0000000..4814b44
--- /dev/null
+++ b/public/assets/js/require-frontend.min.js
@@ -0,0 +1,68 @@
+/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
+
+/*! layer-v3.5.5 Web 通用弹出层组件 MIT License http://layer.layui.com/ By 贤心 */
+
+/*
+ * Toastr
+ * Copyright 2012-2015
+ * Authors: John Papa, Hans Fjällemark, and Tim Ferrell.
+ * All Rights Reserved.
+ * Use, reproduction, distribution, and modification of this code is subject to the terms and
+ * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
+ *
+ * ARIA Support: Greta Krafsig
+ *
+ * Project: https://github.com/CodeSeven/toastr
+ */
+
+/*!art-template - Template Engine | http://aui.github.com/artTemplate/*/
+
+//! moment.js
+//! version : 2.30.1
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+
+/*
+* bootstrap-table - v1.11.10 - 2023-06-14
+https://github.com/wenzhixin/bootstrap-table
+* Copyright (c) 2017 zhixin wen
+* Licensed MIT License
+*/
+
+/*
+* bootstrap-table - v1.11.12 - 2024-03-28
+https://github.com/wenzhixin/bootstrap-table
+* Copyright (c) 2017 zhixin wen
+* Licensed MIT License
+*/
+
+// License: http://dragsort.codeplex.com/license
+
+/**
+ * @summary SelectPage
+ * @desc Simple and powerful selection plugin
+ * @file selectpage.js
+ * @version 2.21
+ * @author TerryZeng
+ * @contact https://terryz.github.io/
+ * @license MIT License
+ *
+ */
+
+if(function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";function i(t,e,i){var n,o,a=(i=i||ut).createElement("script");if(a.text=t,e)for(n in pt)(o=e[n]||e.getAttribute&&e.getAttribute(n))&&a.setAttribute(n,o);i.head.appendChild(a).parentNode.removeChild(a)}function n(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?nt[ot.call(t)]||"object":typeof t}function o(t){var e=!!t&&"length"in t&&t.length,i=n(t);return!ct(t)&&!dt(t)&&("array"===i||0===e||"number"==typeof e&&0w.cacheLength&&delete e[t.shift()],e[i+" "]=n}}function n(t){return t[A]=!0,t}function o(t){var e=S.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function r(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&st(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function s(t){return n(function(e){return e=+e,n(function(i,n){for(var o,a=t([],i.length,e),r=a.length;r--;)i[o=a[r]]&&(i[o]=!(n[o]=i[o]))})})}function l(t){return t&&void 0!==t.getElementsByTagName&&t}function c(t){var i,n=t?t.ownerDocument||t:_t;return n!=S&&9===n.nodeType&&n.documentElement&&(T=(S=n).documentElement,D=!mt.isXMLDoc(S),E=T.matches||T.webkitMatchesSelector||T.msMatchesSelector,T.msMatchesSelector&&_t!=S&&(i=S.defaultView)&&i.top!==i&&i.addEventListener("unload",rt),lt.getById=o(function(t){return T.appendChild(t).id=mt.expando,!S.getElementsByName||!S.getElementsByName(mt.expando).length}),lt.disconnectedMatch=o(function(t){return E.call(t,"*")}),lt.scope=o(function(){return S.querySelectorAll(":scope")}),lt.cssHas=o(function(){try{return S.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}}),lt.getById?(w.filter.ID=function(t){var e=t.replace(nt,ot);return function(t){return t.getAttribute("id")===e}},w.find.ID=function(t,e){if(void 0!==e.getElementById&&D){var i=e.getElementById(t);return i?[i]:[]}}):(w.filter.ID=function(t){var e=t.replace(nt,ot);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},w.find.ID=function(t,e){if(void 0!==e.getElementById&&D){var i,n,o,a=e.getElementById(t);if(a){if((i=a.getAttributeNode("id"))&&i.value===t)return[a];for(o=e.getElementsByName(t),n=0;a=o[n++];)if((i=a.getAttributeNode("id"))&&i.value===t)return[a]}return[]}}),w.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},w.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&D)return e.getElementsByClassName(t)},$=[],o(function(t){var e;T.appendChild(t).innerHTML=" ",t.querySelectorAll("[selected]").length||$.push("\\["+bt+"*(?:value|"+j+")"),t.querySelectorAll("[id~="+A+"-]").length||$.push("~="),t.querySelectorAll("a#"+A+"+*").length||$.push(".#.+[+~]"),t.querySelectorAll(":checked").length||$.push(":checked"),(e=S.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),T.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&$.push(":enabled",":disabled"),(e=S.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||$.push("\\["+bt+"*name"+bt+"*="+bt+"*(?:''|\"\")")}),lt.cssHas||$.push(":has"),$=$.length&&new RegExp($.join("|")),I=function(t,i){if(t===i)return C=!0,0;var n=!t.compareDocumentPosition-!i.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(i.ownerDocument||i)?t.compareDocumentPosition(i):1)||!lt.sortDetached&&i.compareDocumentPosition(t)===n?t===S||t.ownerDocument==_t&&e.contains(_t,t)?-1:i===S||i.ownerDocument==_t&&e.contains(_t,i)?1:k?it.call(k,t)-it.call(k,i):0:4&n?-1:1)}),S}function d(){}function u(t,i){var n,o,a,r,s,l,c,d=N[t+" "];if(d)return i?0:d.slice(0);for(s=t,l=[],c=w.preFilter;s;){for(r in n&&!(o=U.exec(s))||(o&&(s=s.slice(o[0].length)||s),l.push(a=[])),n=!1,(o=q.exec(s))&&(n=o.shift(),a.push({value:n,type:o[0].replace(xt," ")}),s=s.slice(n.length)),w.filter)!(o=X[r].exec(s))||c[r]&&!(o=c[r](o))||(n=o.shift(),a.push({value:n,type:r,matches:o}),s=s.slice(n.length));if(!n)break}return i?s.length:s?e.error(t):N(t,l).slice(0)}function p(t){for(var e=0,i=t.length,n="";e+~]|"+bt+")"+bt+"*"),W=new RegExp(bt+"|>"),V=new RegExp(Y),G=new RegExp("^"+H+"$"),X={ID:new RegExp("^#("+H+")"),CLASS:new RegExp("^\\.("+H+")"),TAG:new RegExp("^("+H+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+Y),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+bt+"*(even|odd|(([+-]|)(\\d*)n|)"+bt+"*(?:([+-]|)"+bt+"*(\\d+)|))"+bt+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+bt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+bt+"*((?:-\\d)?\\d*)"+bt+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,tt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/[+~]/,nt=new RegExp("\\\\[\\da-fA-F]{1,6}"+bt+"?|\\\\([^\\r\\n\\f])","g"),ot=function(t,e){var i="0x"+t.slice(1)-65536;return e||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},rt=function(){c()},st=h(function(t){return!0===t.disabled&&a(t,"fieldset")},{dir:"parentNode",next:"legend"});try{F.apply(K=J.call(_t.childNodes),_t.childNodes),K[_t.childNodes.length].nodeType}catch(x){F={apply:function(t,e){kt.apply(t,J.call(e))},call:function(t){kt.apply(t,J.call(arguments,1))}}}for(x in e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if(c(t),D&&!P[i+" "]&&(!$||!$.test(i)))try{var n=E.call(t,i);if(n||lt.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){P(i,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(nt,ot),t[3]=(t[3]||t[4]||t[5]||"").replace(nt,ot),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return X.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&V.test(i)&&(e=u(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(nt,ot).toLowerCase();return"*"===t?function(){return!0}:function(t){return a(t,e)}},CLASS:function(t){var e=L[t+" "];return e||(e=new RegExp("(^|"+bt+")"+t+"("+bt+"|$)"))&&L(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,n){return function(o){var a=e.attr(o,t);return null==a?"!="===i:!i||(a+="","="===i?a===n:"!="===i?a!==n:"^="===i?n&&0===a.indexOf(n):"*="===i?n&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;mt.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?mt.find.matchesSelector(n,t)?[n]:[]:mt.find.matches(t,mt.grep(e,function(t){return 1===t.nodeType}))},mt.fn.extend({find:function(t){var e,i,n=this.length,o=this;if("string"!=typeof t)return this.pushStack(mt(t).filter(function(){for(e=0;e)[^>]*|#([\w-]+))$/;(mt.fn.init=function(t,e,i){var n,o;if(!t)return this;if(i=i||$t,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:Et.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof mt?e[0]:e,mt.merge(this,mt.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:ut,!0)),Dt.test(n[1])&&mt.isPlainObject(e))for(n in e)ct(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(o=ut.getElementById(n[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):ct(t)?void 0!==i.ready?i.ready(t):t(mt):mt.makeArray(t,this)}).prototype=mt.fn,$t=mt(ut);var Ft=/^(?:parents|prev(?:Until|All))/,At={children:!0,contents:!0,next:!0,prev:!0};mt.fn.extend({has:function(t){var e=mt(t,this),i=e.length;return this.filter(function(){for(var t=0;t\x20\t\r\n\f]*)/i,ee=/^$|^module$|\/(?:java|ecma)script/i;Kt=ut.createDocumentFragment().appendChild(ut.createElement("div")),(Zt=ut.createElement("input")).setAttribute("type","radio"),Zt.setAttribute("checked","checked"),Zt.setAttribute("name","t"),Kt.appendChild(Zt),lt.checkClone=Kt.cloneNode(!0).cloneNode(!0).lastChild.checked,Kt.innerHTML="",lt.noCloneChecked=!!Kt.cloneNode(!0).lastChild.defaultValue,Kt.innerHTML=" ",lt.option=!!Kt.lastChild;var ie={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};ie.tbody=ie.tfoot=ie.colgroup=ie.caption=ie.thead,ie.th=ie.td,lt.option||(ie.optgroup=ie.option=[1,""," "]);var ne=/<|?\w+;/,oe=/^([^.]*)(?:\.(.+)|)/;mt.event={global:{},add:function(t,e,i,n,o){var a,r,s,l,c,d,u,p,h,f,m,g=jt.get(t);if(It(t))for(i.handler&&(i=(a=i).handler,o=a.selector),o&&mt.find.matchesSelector(Wt,o),i.guid||(i.guid=mt.guid++),(l=g.events)||(l=g.events=Object.create(null)),(r=g.handle)||(r=g.handle=function(e){return void 0!==mt&&mt.event.triggered!==e.type?mt.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(Ot)||[""]).length;c--;)h=m=(s=oe.exec(e[c])||[])[1],f=(s[2]||"").split(".").sort(),h&&(u=mt.event.special[h]||{},h=(o?u.delegateType:u.bindType)||h,u=mt.event.special[h]||{},d=mt.extend({type:h,origType:m,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&mt.expr.match.needsContext.test(o),namespace:f.join(".")},a),(p=l[h])||((p=l[h]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(t,n,f,r)||t.addEventListener&&t.addEventListener(h,r)),u.add&&(u.add.call(t,d),d.handler.guid||(d.handler.guid=i.guid)),o?p.splice(p.delegateCount++,0,d):p.push(d),mt.event.global[h]=!0)},remove:function(t,e,i,n,o){var a,r,s,l,c,d,u,p,h,f,m,g=jt.hasData(t)&&jt.get(t);if(g&&(l=g.events)){for(c=(e=(e||"").match(Ot)||[""]).length;c--;)if(h=m=(s=oe.exec(e[c])||[])[1],f=(s[2]||"").split(".").sort(),h){for(u=mt.event.special[h]||{},p=l[h=(n?u.delegateType:u.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=a=p.length;a--;)d=p[a],!o&&m!==d.origType||i&&i.guid!==d.guid||s&&!s.test(d.namespace)||n&&n!==d.selector&&("**"!==n||!d.selector)||(p.splice(a,1),d.selector&&p.delegateCount--,u.remove&&u.remove.call(t,d));r&&!p.length&&(u.teardown&&!1!==u.teardown.call(t,f,g.handle)||mt.removeEvent(t,h,g.handle),delete l[h])}else for(h in l)mt.event.remove(t,h+e[c],i,n,!0);mt.isEmptyObject(l)&&jt.remove(t,"handle events")}},dispatch:function(t){var e,i,n,o,a,r,s=new Array(arguments.length),l=mt.event.fix(t),c=(jt.get(this,"events")||Object.create(null))[l.type]||[],d=mt.event.special[l.type]||{};for(s[0]=l,e=1;e\s*$/g;mt.extend({htmlPrefilter:function(t){return t},clone:function(t,e,i){var n,o,a,r,s,l,c,d=t.cloneNode(!0),u=Vt(t);if(!(lt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||mt.isXMLDoc(t)))for(r=b(d),n=0,o=(a=b(t)).length;n").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&o("error"===t.type?404:200,t.type)}),ut.head.appendChild(e[0])},abort:function(){i&&i()}}});var Ke,Ze=[],Je=/(=)\?(?=&|$)|\?\?/;mt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ze.pop()||mt.expando+"_"+Ae.guid++;return this[t]=!0,t}}),mt.ajaxPrefilter("json jsonp",function(e,i,n){var o,a,r,s=!1!==e.jsonp&&(Je.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Je.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=ct(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Je,"$1"+o):!1!==e.jsonp&&(e.url+=(Oe.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return r||mt.error(o+" was not called"),r[0]},e.dataTypes[0]="json",a=t[o],t[o]=function(){r=arguments},n.always(function(){void 0===a?mt(t).removeProp(o):t[o]=a,e[o]&&(e.jsonpCallback=i.jsonpCallback,Ze.push(o)),r&&ct(a)&&a(r[0]),r=a=void 0}),"script"}),lt.createHTMLDocument=((Ke=ut.implementation.createHTMLDocument("").body).innerHTML="",2===Ke.childNodes.length),mt.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(lt.createHTMLDocument?((n=(e=ut.implementation.createHTMLDocument("")).createElement("base")).href=ut.location.href,e.head.appendChild(n)):e=ut),a=!i&&[],(o=Dt.exec(t))?[e.createElement(o[1])]:(o=w([t],e,a),a&&a.length&&mt(a).remove(),mt.merge([],o.childNodes)));var n,o,a},mt.fn.load=function(t,e,i){var n,o,a,r=this,s=t.indexOf(" ");return-1").append(mt.parseHTML(t)).find(n):t)}).always(i&&function(t,e){r.each(function(){i.apply(this,a||[t.responseText,e,t])})}),this},mt.expr.pseudos.animated=function(t){return mt.grep(mt.timers,function(e){return t===e.elem}).length},mt.offset={setOffset:function(t,e,i){var n,o,a,r,s,l,c=mt.css(t,"position"),d=mt(t),u={};"static"===c&&(t.style.position="relative"),s=d.offset(),a=mt.css(t,"top"),l=mt.css(t,"left"),("absolute"===c||"fixed"===c)&&-1<(a+l).indexOf("auto")?(r=(n=d.position()).top,o=n.left):(r=parseFloat(a)||0,o=parseFloat(l)||0),ct(e)&&(e=e.call(t,i,mt.extend({},s))),null!=e.top&&(u.top=e.top-s.top+r),null!=e.left&&(u.left=e.left-s.left+o),"using"in e?e.using.call(t,u):d.css(u)}},mt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){mt.offset.setOffset(this,t,e)});var e,i,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],o={top:0,left:0};if("fixed"===mt.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===mt.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((o=mt(t).offset()).top+=mt.css(t,"borderTopWidth",!0),o.left+=mt.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-mt.css(n,"marginTop",!0),left:e.left-o.left-mt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===mt.css(t,"position");)t=t.offsetParent;return t||Wt})}}),mt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;mt.fn[t]=function(n){return Nt(this,function(t,n,o){var a;if(dt(t)?a=t:9===t.nodeType&&(a=t.defaultView),void 0===o)return a?a[e]:t[n];a?a.scrollTo(i?a.pageXOffset:o,i?o:a.pageYOffset):t[n]=o},t,n,arguments.length)}}),mt.each(["top","left"],function(t,e){mt.cssHooks[e]=M(lt.pixelPosition,function(t,i){if(i)return i=O(t,e),le.test(i)?mt(t).position()[e]+"px":i})}),mt.each({Height:"height",Width:"width"},function(t,e){mt.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){mt.fn[n]=function(o,a){var r=arguments.length&&(i||"boolean"!=typeof o),s=i||(!0===o||!0===a?"margin":"border");return Nt(this,function(e,i,o){var a;return dt(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(a=e.documentElement,Math.max(e.body["scroll"+t],a["scroll"+t],e.body["offset"+t],a["offset"+t],a["client"+t])):void 0===o?mt.css(e,i,s):mt.style(e,i,o,s)},e,r?o:void 0,r)}})}),mt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){mt.fn[e]=function(t){return this.on(e,t)}}),mt.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),mt.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){mt.fn[e]=function(t,i){return 03)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var o=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.alert");o||i.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(i)})}var i='[data-dismiss="alert"]',n=function(e){t(e).on("click",i,this.close)};n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function i(){r.detach().trigger("closed.bs.alert").remove()}var o=t(this),a=o.attr("data-target");a||(a=o.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,"")),a="#"===a?[]:a;var r=t(document).find(a);e&&e.preventDefault(),r.length||(r=o.closest(".alert")),r.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",i,n.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.button"),a="object"==typeof e&&e;o||n.data("bs.button",o=new i(this,a)),"toggle"==e?o.toggle():e&&o.setState(e)})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.4.2",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,o=n.is("input")?"val":"text",a=n.data();e+="Text",null==a.resetText&&n.data("resetText",n[o]()),setTimeout(t.proxy(function(){n[o](null==a[e]?this.options[e]:a[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i).prop(i,!1))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var n=t(i.target).closest(".btn");e.call(n,"toggle"),t(i.target).is('input[type="radio"], input[type="checkbox"]')||(i.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.carousel"),a=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),r="string"==typeof e?e:a.slide;o||n.data("bs.carousel",o=new i(this,a)),"number"==typeof e?o.to(e):r?o[r]():a.interval&&o.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.4.1",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var n="prev"==t?-1:1,o=(i+n)%this.$items.length;return this.$items.eq(o)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){if(!this.sliding)return this.slide("next")},i.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},i.prototype.slide=function(e,n){var o=this.$element.find(".item.active"),a=n||this.getItemForDirection(e,o),r=this.interval,s="next"==e?"left":"right",l=this;if(a.hasClass("active"))return this.sliding=!1;var c=a[0],d=t.Event("slide.bs.carousel",{relatedTarget:c,direction:s});if(this.$element.trigger(d),!d.isDefaultPrevented()){if(this.sliding=!0,r&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(a)]);u&&u.addClass("active")}var p=t.Event("slid.bs.carousel",{relatedTarget:c,direction:s});return t.support.transition&&this.$element.hasClass("slide")?(a.addClass(e),"object"==typeof a&&a.length&&a[0].offsetWidth,o.addClass(s),a.addClass(s),o.one("bsTransitionEnd",function(){a.removeClass([e,s].join(" ")).addClass("active"),o.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(p)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(o.removeClass("active"),a.addClass("active"),this.sliding=!1,this.$element.trigger(p)),r&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var o=function(i){i.preventDefault();var n=t(this),o=n.attr("href");o&&(o=o.replace(/.*(?=#[^\s]+$)/,""));var a=n.attr("data-target")||o,r=t(document).find(a);if(r.hasClass("carousel")){var s=t.extend({},r.data(),n.data()),l=n.attr("data-slide-to");l&&(s.interval=!1),e.call(r,s),l&&r.data("bs.carousel").to(l)}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(document).find(n)}function i(e){return this.each(function(){var i=t(this),o=i.data("bs.collapse"),a=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e);!o&&a.toggle&&/show|hide/.test(e)&&(a.toggle=!1),o||i.data("bs.collapse",o=new n(this,a)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,
+this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.4.1",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"))&&e.transitioning)){var a=t.Event("show.bs.collapse");if(this.$element.trigger(a),!a.isDefaultPrevented()){o&&o.length&&(i.call(o,"hide"),e||o.data("bs.collapse",null));var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return s.call(this);var l=t.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[r](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return o.call(this);this.$element[i](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(n.TRANSITION_DURATION)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,n){var o=t(n);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var o=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var o=t(this);o.attr("data-target")||n.preventDefault();var a=e(o),r=a.data("bs.collapse"),s=r?"toggle":o.data();i.call(a,s)})}(jQuery),function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n="#"!==i?t(document).find(i):null;return n&&n.length?n:e.parent()}function i(i){i&&3===i.which||(t(o).remove(),t(a).each(function(){var n=t(this),o=e(n),a={relatedTarget:this};o.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(o[0],i.target)||(o.trigger(i=t.Event("hide.bs.dropdown",a)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",a)))))}))}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new r(this)),"string"==typeof e&&n[e].call(i)})}var o=".dropdown-backdrop",a='[data-toggle="dropdown"]',r=function(e){t(e).on("click.bs.dropdown",this.toggle)};r.VERSION="3.4.1",r.prototype.toggle=function(n){var o=t(this);if(!o.is(".disabled, :disabled")){var a=e(o),r=a.hasClass("open");if(i(),!r){"ontouchstart"in document.documentElement&&!a.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var s={relatedTarget:this};if(a.trigger(n=t.Event("show.bs.dropdown",s)),n.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),a.toggleClass("open").trigger(t.Event("shown.bs.dropdown",s))}return!1}},r.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),r=o.hasClass("open");if(!r&&27!=i.which||r&&27==i.which)return 27==i.which&&o.find(a).trigger("focus"),n.trigger("click");var s=o.find(".dropdown-menu li:not(.disabled):visible a");if(s.length){var l=s.index(i.target);38==i.which&&l>0&&l--,40==i.which&&ldocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:s},d.prototype.init=function(e,i,n){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),a=o.length;a--;){var r=o[a];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var s="hover"==r?"mouseenter":"focusin",l="hover"==r?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},d.prototype.getDefaults=function(){return d.DEFAULTS},d.prototype.getOptions=function(e){var n=this.$element.data();for(var a in n)n.hasOwnProperty(a)&&-1!==t.inArray(a,o)&&delete n[a];return e=t.extend({},this.getDefaults(),n,e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e.sanitize&&(e.template=i(e.template,e.whiteList,e.sanitizeFn)),e},d.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},d.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},d.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},d.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)}},d.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var n=this,o=this.tip(),a=this.getUID(this.type);this.setContent(),o.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&o.addClass("fade");var r="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,l=s.test(r);l&&(r=r.replace(s,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this),this.options.container?o.appendTo(t(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),u=o[0].offsetWidth,p=o[0].offsetHeight;if(l){var h=r,f=this.getPosition(this.$viewport);r="bottom"==r&&c.bottom+p>f.bottom?"top":"top"==r&&c.top-p
f.width?"left":"left"==r&&c.left-ur.top+r.height&&(o.top=r.top+r.height-l)}else{var c=e.left-a,d=e.left+a+i;cr.right&&(o.left=r.left+r.width-d)}return o},d.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},d.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},d.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},d.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},d.prototype.enable=function(){this.enabled=!0},d.prototype.disable=function(){this.enabled=!1},d.prototype.toggleEnabled=function(){this.enabled=!this.enabled},d.prototype.toggle=function(e){var i=this;e&&((i=t(e.currentTarget).data("bs."+this.type))||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},d.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},d.prototype.sanitizeHtml=function(t){return i(t,this.options.whiteList,this.options.sanitizeFn)};var u=t.fn.tooltip;t.fn.tooltip=n,t.fn.tooltip.Constructor=d,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=u,this}}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.popover"),a="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||n.data("bs.popover",o=new i(this,a)),"string"==typeof e&&o[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.4.1",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var n=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===n&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===n?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery),function(t){"use strict";function e(i,n){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each(function(){var n=t(this),o=n.data("bs.scrollspy"),a="object"==typeof i&&i;o||n.data("bs.scrollspy",o=new e(this,a)),"string"==typeof i&&o[i]()})}e.VERSION="3.4.1",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),a=/^#./.test(o)&&t(o);return a&&a.length&&a.is(":visible")&&[[a[i]().top+n,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),o=this.offsets,a=this.targets,r=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return r!=(t=a[a.length-1])&&this.activate(t);if(r&&e=o[t]&&(void 0===o[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var r=n.find("> .active"),s=o&&t.support.transition&&(r.length&&r.hasClass("fade")||!!n.find("> .fade").length);r.length&&s?r.one("bsTransitionEnd",a).emulateTransitionEnd(i.TRANSITION_DURATION):a(),r.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var o=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.affix"),a="object"==typeof e&&e;o||n.data("bs.affix",o=new i(this,a)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n);var o=this.options.target===i.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=o.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.4.1",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,n){var o=this.$target.scrollTop(),a=this.$element.offset(),r=this.$target.height();if(null!=i&&"top"==this.affixed)return o=t-n&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,o=n.top,a=n.bottom,r=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(a=o=n),"function"==typeof o&&(o=n.top(this.$element)),"function"==typeof a&&(a=n.bottom(this.$element));var s=this.getState(r,e,o,a);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:r-e-a})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)})})}(jQuery),define("bootstrap",["jquery"],function(){}),require.config({urlArgs:"v="+requirejs.s.contexts._.config.config.site.version,packages:[{name:"moment",location:"../libs/moment",main:"moment"}],include:["css","layer","toastr","fast","frontend","frontend-init","table","form","dragsort","selectpage"],paths:{lang:"empty:",form:"require-form",table:"require-table",upload:"require-upload",dropzone:"dropzone.min",echarts:"echarts.min","echarts-theme":"echarts-theme",adminlte:"adminlte","bootstrap-table-commonsearch":"bootstrap-table-commonsearch","bootstrap-table-template":"bootstrap-table-template",jquery:"../libs/jquery/dist/jquery.min",bootstrap:"../libs/bootstrap/dist/js/bootstrap.min","bootstrap-datetimepicker":"../libs/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min","bootstrap-daterangepicker":"../libs/bootstrap-daterangepicker/daterangepicker","bootstrap-select":"../libs/bootstrap-select/dist/js/bootstrap-select.min","bootstrap-select-lang":"../libs/bootstrap-select/dist/js/i18n/defaults-zh_CN",
+"bootstrap-table":"../libs/bootstrap-table/dist/bootstrap-table.min","bootstrap-table-export":"../libs/bootstrap-table/dist/extensions/export/bootstrap-table-export.min","bootstrap-table-fixed-columns":"../libs/bootstrap-table/dist/extensions/fixed-columns/bootstrap-table-fixed-columns","bootstrap-table-mobile":"../libs/bootstrap-table/dist/extensions/mobile/bootstrap-table-mobile","bootstrap-table-lang":"../libs/bootstrap-table/dist/locale/bootstrap-table-zh-CN","bootstrap-table-jumpto":"../libs/bootstrap-table/dist/extensions/page-jumpto/bootstrap-table-jumpto",tableexport:"../libs/tableExport.jquery.plugin/tableExport.min",dragsort:"../libs/fastadmin-dragsort/jquery.dragsort",sortable:"../libs/Sortable/Sortable.min",addtabs:"../libs/fastadmin-addtabs/jquery.addtabs",slimscroll:"../libs/jquery-slimscroll/jquery.slimscroll",validator:"../libs/nice-validator/dist/jquery.validator","validator-lang":"../libs/nice-validator/dist/local/zh-CN",toastr:"../libs/toastr/toastr",jstree:"../libs/jstree/dist/jstree.min",layer:"../libs/fastadmin-layer/dist/layer",cookie:"../libs/jquery.cookie/jquery.cookie",cxselect:"../libs/fastadmin-cxselect/js/jquery.cxselect",template:"../libs/art-template/dist/template-native",selectpage:"../libs/fastadmin-selectpage/selectpage",citypicker:"../libs/fastadmin-citypicker/dist/js/city-picker.min","citypicker-data":"../libs/fastadmin-citypicker/dist/js/city-picker.data"},shim:{addons:["frontend"],bootstrap:["jquery"],"bootstrap-table":{deps:["bootstrap"],exports:"$.fn.bootstrapTable"},"bootstrap-table-lang":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-export":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-fixed-columns":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-mobile":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-advancedsearch":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-commonsearch":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-template":{deps:["bootstrap-table","template"],exports:"$.fn.bootstrapTable.defaults"},"bootstrap-table-jumpto":{deps:["bootstrap-table"],exports:"$.fn.bootstrapTable.defaults"},tableexport:{deps:["jquery"],exports:"$.fn.extend"},slimscroll:{deps:["jquery"],exports:"$.fn.extend"},adminlte:{deps:["bootstrap","slimscroll"],exports:"$.AdminLTE"},"bootstrap-daterangepicker":["moment/locale/zh-cn"],"bootstrap-datetimepicker":["moment/locale/zh-cn"],"bootstrap-select-lang":["bootstrap-select"],jstree:["css!../libs/jstree/dist/themes/default/style.css"],"validator-lang":["validator"],citypicker:["citypicker-data","css!../libs/fastadmin-citypicker/dist/css/city-picker.css"]},baseUrl:requirejs.s.contexts._.config.config.site.cdnurl+"/assets/js/",map:{"*":{css:"../libs/require-css/css.min"}},waitSeconds:60,charset:"utf-8"}),require(["jquery","bootstrap"],function(t,e){var i=requirejs.s.contexts._.config.config;window.Config=i;var n={};n.lang=i.moduleurl+"/ajax/lang?callback=define&controllername="+i.controllername+"&lang="+i.language,n["frontend/"]="frontend/",require.config({paths:n}),t(function(){require(["fast"],function(t){require(["frontend","frontend-init","addons"],function(t,n){i.jsname&&require([i.jsname],function(t){t[i.actionname]!=e&&t[i.actionname]()},function(t){console.error(t)})})})})}),define("require-frontend",function(){}),define("../libs/require-css/css.min",[],function(){if("undefined"==typeof window)return{load:function(t,e,i){i()}};var t=document.getElementsByTagName("head")[0],e=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/)||0,i=!1,n=!0;e[1]||e[7]?i=parseInt(e[1])<6||parseInt(e[7])<=9:e[2]||e[8]?n=!1:e[4]&&(i=parseInt(e[4])<18);var o={};o.pluginBuilder="./css-builder";var a,r,s,l=function(){a=document.createElement("style"),t.appendChild(a),r=a.styleSheet||a.sheet},c=0,d=[],u=function(t){r.addImport(t),a.onload=function(){p()},31==++c&&(l(),c=0)},p=function(){s();var t=d.shift();return t?(s=t[1],void u(t[0])):void(s=null)},h=function(t,e){if(r&&r.addImport||l(),r&&r.addImport)s?d.push([t,e]):(u(t),s=e);else{a.textContent='@import "'+t+'";';var i=setInterval(function(){try{a.sheet.cssRules,clearInterval(i),e()}catch(t){}},10)}},f=function(e,i){var o=document.createElement("link");if(o.type="text/css",o.rel="stylesheet",n)o.onload=function(){o.onload=function(){},setTimeout(i,7)};else var a=setInterval(function(){for(var t=0;t0;n--)if("interactive"===e[n].readyState){t=e[n].src;break}return t||e[i].src}();return(t.LAYUI_GLOBAL||{}).layer_dir||e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(e,i){var n=e.currentStyle?e.currentStyle:t.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(e,i,n){if(r.path){var o=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||e).replace(/\.|\//g,""),c="layuicss-"+l,d="creating",u=0;s.rel="stylesheet",s.href=r.path+e,s.id=c,document.getElementById(c)||o.appendChild(s),"function"==typeof i&&function e(n){var o=document.getElementById(c);return++u>100?t.console&&console.error(l+".css: Invalid"):void(1989===parseInt(a.getStyle(o,"width"))?(n===d&&o.removeAttribute("lay-status"),o.getAttribute("lay-status")===d?setTimeout(e,100):i()):(o.setAttribute("lay-status",d),setTimeout(function(){e(d)},100)))}()}}},r={v:"3.5.2",ie:function(){var e=navigator.userAgent.toLowerCase();return!!(t.ActiveXObject||"ActiveXObject"in t)&&((e.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:t.layer&&t.layer.v?1e5:0,path:a.getPath,config:function(t,e){return t=t||{},c=r.cache=a.config=i.extend({},a.config,t),r.path=a.config.path||r.path,"string"==typeof t.extend&&(t.extend=[t.extend]),a.config.path&&r.ready(),t.extend?(o?layui.addcss("modules/layer/"+t.extend):a.link("theme/"+t.extend),this):this},ready:function(t){var e="layer",i=(o?"modules/layer/":"theme/")+"default/layer.css?v="+r.v;return o?layui.addcss(i,t,e):a.link(i,t,e),this},alert:function(t,e,n){var o="function"==typeof e;return o&&(n=e),r.open(i.extend({content:t,yes:n},o?{}:e))},confirm:function(t,e,n,o){var s="function"==typeof e;return s&&(o=n,n=e),r.open(i.extend({content:t,btn:a.btn,yes:n,btn2:o},s?{}:e))},msg:function(t,e,n){var o="function"==typeof e,s=a.config.skin,c=(s?s+" "+s+"-msg":"")||"layui-layer-msg",d=l.anim.length-1;return o&&(n=e),r.open(i.extend({content:t,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:n},o&&!a.config.skin?{skin:c+" layui-layer-hui",anim:d}:function(){return e=e||{},-1!==e.icon&&void 0!==e.icon||(e.skin=c+" "+(e.skin||"layui-layer-hui")),e}()))},load:function(t,e){return r.open(i.extend({type:3,icon:t||0,resize:!1,shade:.01},e))},tips:function(t,e,n){return r.open(i.extend({type:4,content:[t,e],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:260},n))}},s=function(t){var e=this,n=function(){e.creat()};e.index=++r.index,e.config=i.extend({},e.config,a.config,t),document.body?n():setTimeout(function(){n()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],l.SHADE="layui-layer-shade",l.MOVE="layui-layer-move",s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,minStack:!0,focusBtn:0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(t,e){var n=this,o=n.index,r=n.config,s=r.zIndex+o,c="object"==typeof r.title,d=r.maxmin&&(1===r.type||2===r.type),u=r.title?''+(c?r.title[0]:r.title)+"
":"";return r.zIndex=s,e([r.shade?'
':"",''+(t&&2!=r.type?"":u)+'
'+(0==r.type&&-1!==r.icon?' ':"")+(1==r.type&&t?"":r.content||"")+'
'+function(){var t=d?' ':"";return r.closeBtn&&(t+=' '),t}()+" "+(r.btn?function(){var t="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var e=0,i=r.btn.length;e
'+r.btn[e]+"";return' '+t+"
"}():"")+(r.resize?' ':"")+" "],u,i('
')),n},s.pt.creat=function(){var t=this,e=t.config,o=t.index,s=e.content,c="object"==typeof s,d=i("body");if(!e.id||!i("#"+e.id)[0]){switch("string"==typeof e.area&&(e.area="auto"===e.area?["",""]:[e.area,""]),e.shift&&(e.anim=e.shift),6==r.ie&&(e.fixed=!1),e.type){case 0:e.btn="btn"in e?e.btn:a.btn[0],r.closeAll("dialog");break;case 2:var s=e.content=c?e.content:[e.content||"","auto"];e.content='';break;case 3:delete e.title,delete e.closeBtn,-1===e.icon&&e.icon,r.closeAll("loading");break;case 4:c||(e.content=[e.content,"body"]),e.follow=e.content[1],e.content=e.content[0]+' ',delete e.title,e.tips="object"==typeof e.tips?e.tips:[e.tips,!0],e.tipsMore||r.closeAll("tips")}if(t.vessel(c,function(n,r,u){d.append(n[0]),c?function(){2==e.type||4==e.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+o).find("."+l[5]).before(r))}()}():d.append(n[1]),i("#"+l.MOVE)[0]||d.append(a.moveElem=u),t.layero=i("#"+l[0]+o),t.shadeo=i("#"+l.SHADE+o),e.scrollbar||l.html.css("overflow","hidden").attr("layer-full",o)}).auto(o),t.shadeo.css({"background-color":e.shade[1]||"#000",opacity:e.shade[0]||e.shade}),2==e.type&&6==r.ie&&t.layero.find("iframe").attr("src",s[0]),4==e.type?t.tips():function(){t.offset(),parseInt(a.getStyle(document.getElementById(l.MOVE),"z-index"))||function(){t.layero.css("visibility","hidden"),r.ready(function(){t.offset(),t.layero.css("visibility","visible")})}()}(),e.fixed&&n.on("resize",function(){t.offset(),(/^\d+%$/.test(e.area[0])||/^\d+%$/.test(e.area[1]))&&t.auto(o),4==e.type&&t.tips()}),e.time<=0||setTimeout(function(){r.close(t.index)},e.time),t.move().callback(),l.anim[e.anim]){var u="layer-anim "+l.anim[e.anim];t.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}e.isOutAnim&&t.layero.data("isOutAnim",!0)}},s.pt.auto=function(t){var e=this,o=e.config,a=i("#"+l[0]+t);""===o.area[0]&&o.maxWidth>0&&(r.ie&&r.ie<8&&o.btn&&a.width(a.innerWidth()),a.outerWidth()>o.maxWidth&&a.width(o.maxWidth));var s=[a.innerWidth(),a.innerHeight()],c=a.find(l[1]).outerHeight()||0,d=a.find("."+l[6]).outerHeight()||0,u=function(t){t=a.find(t),t.height(s[1]-c-d-2*(0|parseFloat(t.css("padding-top"))))};switch(o.type){case 2:u("iframe");break;default:""===o.area[1]?o.maxHeight>0&&a.outerHeight()>o.maxHeight?(s[1]=o.maxHeight,u("."+l[5])):o.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return e},s.pt.offset=function(){var t=this,e=t.config,i=t.layero,o=[i.outerWidth(),i.outerHeight()],a="object"==typeof e.offset;t.offsetTop=(n.height()-o[1])/2,t.offsetLeft=(n.width()-o[0])/2,a?(t.offsetTop=e.offset[0],t.offsetLeft=e.offset[1]||t.offsetLeft):"auto"!==e.offset&&("t"===e.offset?t.offsetTop=0:"r"===e.offset?t.offsetLeft=n.width()-o[0]:"b"===e.offset?t.offsetTop=n.height()-o[1]:"l"===e.offset?t.offsetLeft=0:"lt"===e.offset?(t.offsetTop=0,t.offsetLeft=0):"lb"===e.offset?(t.offsetTop=n.height()-o[1],t.offsetLeft=0):"rt"===e.offset?(t.offsetTop=0,t.offsetLeft=n.width()-o[0]):"rb"===e.offset?(t.offsetTop=n.height()-o[1],t.offsetLeft=n.width()-o[0]):t.offsetTop=e.offset),e.fixed||(t.offsetTop=/%$/.test(t.offsetTop)?n.height()*parseFloat(t.offsetTop)/100:parseFloat(t.offsetTop),t.offsetLeft=/%$/.test(t.offsetLeft)?n.width()*parseFloat(t.offsetLeft)/100:parseFloat(t.offsetLeft),t.offsetTop+=n.scrollTop(),t.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(t.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),t.offsetLeft=i.css("left")),i.css({top:t.offsetTop,left:t.offsetLeft})},s.pt.tips=function(){var t=this,e=t.config,o=t.layero,a=[o.outerWidth(),o.outerHeight()],r=i(e.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},c=o.find(".layui-layer-TipsG"),d=e.tips[0];e.tips[1]||c.remove(),s.autoLeft=function(){s.left+a[0]-n.width()>0?(s.tipLeft=s.left+s.width-a[0],c.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-a[1]-10,c.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",e.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,c.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",e.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,c.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",e.tips[1])},function(){s.tipLeft=s.left-a[0]-10,s.tipTop=s.top,c.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",e.tips[1])}],s.where[d-1](),1===d?s.top-(n.scrollTop()+a[1]+16)<0&&s.where[2]():2===d?n.width()-(s.left+s.width+a[0]+16)>0||s.where[3]():3===d?s.top-n.scrollTop()+s.height+a[1]+16-n.height()>0&&s.where[0]():4===d&&a[0]+16-s.left>0&&s.where[1](),o.find("."+l[5]).css({"background-color":e.tips[1],"padding-right":e.closeBtn?"30px":""}),o.css({left:s.tipLeft-(e.fixed?n.scrollLeft():0),top:s.tipTop-(e.fixed?n.scrollTop():0)})},s.pt.move=function(){var t=this,e=t.config,o=i(document),s=t.layero,l=s.find(e.move),c=s.find(".layui-layer-resize"),d={};return e.move&&l.css("cursor","move"),l.on("mousedown",function(t){t.preventDefault(),e.move&&(d.moveStart=!0,d.offset=[t.clientX-parseFloat(s.css("left")),t.clientY-parseFloat(s.css("top"))],a.moveElem.css("cursor","move").show())}),c.on("mousedown",function(t){t.preventDefault(),d.resizeStart=!0,d.offset=[t.clientX,t.clientY],d.area=[s.outerWidth(),s.outerHeight()],a.moveElem.css("cursor","se-resize").show()}),o.on("mousemove",function(i){if(d.moveStart){var o=i.clientX-d.offset[0],a=i.clientY-d.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),d.stX=l?0:n.scrollLeft(),d.stY=l?0:n.scrollTop(),!e.moveOut){var c=n.width()-s.outerWidth()+d.stX,u=n.height()-s.outerHeight()+d.stY;oc&&(o=c),au&&(a=u)}s.css({left:o,top:a})}if(e.resize&&d.resizeStart){var o=i.clientX-d.offset[0],a=i.clientY-d.offset[1];i.preventDefault(),r.style(t.index,{width:d.area[0]+o,height:d.area[1]+a}),d.isResize=!0,e.resizing&&e.resizing(s)}}).on("mouseup",function(t){d.moveStart&&(delete d.moveStart,a.moveElem.hide(),e.moveEnd&&e.moveEnd(s)),d.resizeStart&&(delete d.resizeStart,a.moveElem.hide())}),t},s.pt.callback=function(){function t(){!1===(o.cancel&&o.cancel(e.index,n))||r.close(e.index)}var e=this,n=e.layero,o=e.config;if(e.openLayer(),o.success&&(2==o.type?n.find("iframe").on("load",function(){o.success(n,e.index)}):o.success(n,e.index)),6==r.ie&&e.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var t=i(this).index();if(0===t)o.yes?o.yes(e.index,n):o.btn1?o.btn1(e.index,n):r.close(e.index);else{!1===(o["btn"+(t+1)]&&o["btn"+(t+1)](e.index,n))||r.close(e.index)}}),"number"==typeof o.focusBtn){n.find("."+l[6]).children("a").each(function(){var t=i(this),e=i(" ").addClass("layui-layer-confirm");t.css("position","relative").attr("tabindex",-1).append(e),e.click(function(){return t.trigger("click"),!1})});var s=n.find("."+l[6]).find("button.layui-layer-confirm").eq(o.focusBtn);s.length>0&&s.focus()}n.find("."+l[7]).on("click",t),o.shadeClose&&e.shadeo.on("click",function(){r.close(e.index)}),n.find(".layui-layer-min").on("click",function(){!1===(o.min&&o.min(n,e.index))||r.min(e.index,o)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(e.index),o.restore&&o.restore(n,e.index)):(r.full(e.index,o),setTimeout(function(){o.full&&o.full(n,e.index)},100))}),o.end&&(a.end[e.index]=o.end)},a.reselect=function(){i.each(i("select"),function(t,e){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(t){i("select").each(function(t,e){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var t=this;r.zIndex=t.config.zIndex,r.setTop=function(t){var e=function(){r.zIndex++,t.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(t[0].style.zIndex),t.on("mousedown",e),r.zIndex}},a.record=function(t){var e=[t.width(),t.height(),t.position().top,t.position().left+parseFloat(t.css("margin-left"))];t.find(".layui-layer-max").addClass("layui-layer-maxmin"),t.attr({area:e})},a.rescollbar=function(t){l.html.attr("layer-full")==t&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},t.layer=r,r.getChildFrame=function(t,e){return e=e||i("."+l[4]).attr("times"),i("#"+l[0]+e).find("iframe").contents().find(t)},r.getFrameIndex=function(t){return i("#"+t).parents("."+l[4]).attr("times")},r.iframeAuto=function(t){if(t){var e=r.getChildFrame("html",t).outerHeight(),n=i("#"+l[0]+t),o=n.find(l[1]).outerHeight()||0,a=n.find("."+l[6]).outerHeight()||0;n.css({height:e+o+a}),n.find("iframe").css({height:e})}},r.iframeSrc=function(t,e){i("#"+l[0]+t).find("iframe").attr("src",e)},r.style=function(t,e,n){var o=i("#"+l[0]+t),r=o.find(".layui-layer-content"),s=o.attr("type"),c=o.find(l[1]).outerHeight()||0,d=o.find("."+l[6]).outerHeight()||0;if(o.attr("minLeft"),s!==a.type[3]&&s!==a.type[4])if(n||(parseFloat(e.width)<=260&&(e.width=260),parseFloat(e.height)-c-d<=64&&(e.height=64+c+d)),o.css(e),d=o.find("."+l[6]).outerHeight()||0,s===a.type[2])o.find("iframe").css({height:parseFloat(e.height)-c-d});else{var u="border-box"==r.css("box-sizing");r.css({height:parseFloat(e.height)-c-d-parseFloat(u?0:r.css("padding-top"))-parseFloat(u?0:r.css("padding-bottom"))})}},r.min=function(t,e){e=e||{};var o=i("#"+l[0]+t),s=i("#"+l.SHADE+t),c=o.find(l[1]).outerHeight()||0,d=o.attr("minLeft")||181*a.minIndex+"px",u=o.css("position"),p={width:180,height:c,position:"fixed",overflow:"hidden"};a.record(o),a.minLeft[0]&&(d=a.minLeft[0],a.minLeft.shift()),e.minStack&&(p.left=d,p.top=n.height()-c,o.attr("minLeft")||a.minIndex++,o.attr("minLeft",d)),o.attr("position",u),r.style(t,p,!0),o.find(".layui-layer-min").hide(),"page"===o.attr("type")&&o.find(l[4]).hide(),a.rescollbar(t),s.hide()},r.restore=function(t){var e=i("#"+l[0]+t),n=i("#"+l.SHADE+t),o=e.attr("area").split(",");e.attr("type"),r.style(t,{width:parseFloat(o[0]),height:parseFloat(o[1]),top:parseFloat(o[2]),left:parseFloat(o[3]),position:e.attr("position"),overflow:"visible"},!0),e.find(".layui-layer-max").removeClass("layui-layer-maxmin"),e.find(".layui-layer-min").show(),"page"===e.attr("type")&&e.find(l[4]).show(),a.rescollbar(t),n.show()},r.full=function(t){var e,o=i("#"+l[0]+t);a.record(o),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",t),clearTimeout(e),e=setTimeout(function(){var e="fixed"===o.css("position");r.style(t,{top:e?0:n.scrollTop(),left:e?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),o.find(".layui-layer-min").hide()},100)},r.title=function(t,e){i("#"+l[0]+(e||r.index)).find(l[1]).html(t)},r.close=function(t,e){var n=i("#"+l[0]+t),o=n.attr("type");if(n[0]){var s="layui-layer-wrap",c=function(){if(o===a.type[1]&&"object"===n.attr("conType")){n.children(":not(."+l[5]+")").remove();for(var r=n.find("."+s),c=0;c<2;c++)r.unwrap();r.css("display",r.data("display")).removeClass(s)}else{if(o===a.type[2])try{var d=i("#"+l[4]+t)[0];d.contentWindow.document.write(""),d.contentWindow.close(),n.find("."+l[5])[0].removeChild(d)}catch(t){}n[0].innerHTML="",n.remove()}"function"==typeof a.end[t]&&a.end[t](),delete a.end[t],"function"==typeof e&&e()};n.data("isOutAnim")&&n.addClass("layer-anim layer-anim-close"),i("#layui-layer-moves, #"+l.SHADE+t).remove(),6==r.ie&&a.reselect(),a.rescollbar(t),n.attr("minLeft")&&(a.minIndex--,a.minLeft.push(n.attr("minLeft"))),r.ie&&r.ie<10||!n.data("isOutAnim")?c():setTimeout(function(){c()},200)}},r.closeAll=function(t,e){"function"==typeof t&&(e=t,t=null);var n=i("."+l[0]);i.each(n,function(o){var a=i(this),s=t?a.attr("type")===t:1;s&&r.close(a.attr("times"),o===n.length-1?e:null),s=null}),0===n.length&&"function"==typeof e&&e()};var c=r.cache||{},d=function(t){return c.skin?" "+c.skin+" "+c.skin+"-"+t:""};r.prompt=function(t,e){var o="";if(t=t||{},"function"==typeof t&&(e=t),t.area){var a=t.area;o='style="width: '+a[0]+"; height: "+a[1]+';"',delete t.area}var s,l=2==t.formType?'":function(){return' '}(),c=t.success;return delete t.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+d("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.val(t.value||"").focus(),"function"==typeof c&&c(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(t.maxlength||500)?r.tips("最多输入"+(t.maxlength||500)+"个字数",s,{tips:1}):e&&e(n,i,s)}},t))},r.tab=function(t){t=t||{};var e=t.tab||{},n="layui-this",o=t.success;return delete t.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+d("tab"),resize:!1,title:function(){var t=e.length,i=1,o="";if(t>0)for(o=''+e[0].title+" ";i"+e[i].title+"";return o}(),content:''+function(){var t=e.length,i=1,o="";if(t>0)for(o=''+(e[0].content||"no content")+" ";i'+(e[i].content||"no content")+"";return o}()+" ",success:function(e){var a=e.find(".layui-layer-title").children(),r=e.find(".layui-layer-tabmain").children();a.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var o=i(this),a=o.index();o.addClass(n).siblings().removeClass(n),r.eq(a).show().siblings().hide(),"function"==typeof t.change&&t.change(a)}),"function"==typeof o&&o(e)}},t))},r.photos=function(e,n,o){var a={};if(e=e||{},e.photos){e.zoom=void 0===e.zoom||!!e.zoom;var s=!("string"==typeof e.photos||e.photos instanceof i),l=s?e.photos:{},c=l.data||[],u=l.start||0;a.imgIndex=1+(0|u),e.img=e.img||"img";var p=e.success;if(delete e.success,s){if(0===c.length)return r.msg("没有图片")}else{var h=i(e.photos),f=function(){c=[],h.find(e.img).each(function(t){var e=i(this);e.attr("layer-index",t),c.push({alt:e.attr("alt"),pid:e.attr("layer-pid"),src:e.attr("layer-src")||e.attr("src"),thumb:e.attr("src")})})};if(f(),0===c.length)return;if(n||h.on("click",e.img,function(){f();var t=i(this),n=t.attr("layer-index");r.photos(i.extend(e,{photos:{start:n,data:c,tab:e.tab},full:e.full}),!0)}),!n)return}a.imgprev=function(t){a.imgIndex--,a.imgIndex<1&&(a.imgIndex=c.length),a.tabimg(t)},a.imgnext=function(t,e){++a.imgIndex>c.length&&(a.imgIndex=1,e)||a.tabimg(t)},a.keyup=function(t){if(!a.end){var e=t.keyCode;t.preventDefault(),37===e?a.imgprev(!0):39===e?a.imgnext(!0):27===e&&r.close(a.index)}},a.tabimg=function(t){if(!(c.length<=1))return l.start=a.imgIndex-1,r.close(a.index),r.photos(e,!0,t)},a.event=function(){a.bigimg.find(".layui-layer-imgprev").on("click",function(t){t.preventDefault(),a.imgprev(!0)}),a.bigimg.find(".layui-layer-imgnext").on("click",function(t){t.preventDefault(),a.imgnext(!0)}),i(document).on("keyup",a.keyup),e.zoom&&a.bigimg.on("wheel mousewheel",i(">img",a.bigimg),function(t){var e=i(this).offset(),n=t.originalEvent.wheelDelta>0,o=n?"+=":"-=",a=Math.floor(12);return!(!n&&(i(this).width()<50||i(this).height()<50)||(i(this).width(o+24).height(o+24).offset({left:n?e.left-a:e.left+a,top:n?e.top-a:e.top+a}),1))})},a.loadi=r.load(1,{shade:!("shade"in e)&&.9,scrollbar:!1}),function(t,e,i){var n=new Image;return n.src=t,n.complete?e(n):(n.onload=function(){n.onload=null,e(n)},void(n.onerror=function(t){n.onerror=null,i(t)}))}(c[u].src,function(n){r.close(a.loadi),o&&(e.anim=-1),a.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var o=[n.width,n.height],a=[i(t).width()-100,i(t).height()-100];if(!e.full&&(o[0]>a[0]||o[1]>a[1])){var r=[o[0]/a[0],o[1]/a[1]];r[0]>r[1]?(o[0]=o[0]/r[0],o[1]=o[1]/r[0]):r[0] '+function(){return c.length>1?'":""}()+" ",success:function(t,i){a.bigimg=t.find(".layui-layer-phimg"),a.imgsee=t.find(".layui-layer-imgbar"),a.event(t),e.tab&&e.tab(c[u],t),"function"==typeof p&&p(t)},end:function(){a.end=!0,i(document).off("keyup",a.keyup)}},e))},function(){r.close(a.loadi),r.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){c.length>1&&a.imgnext(!0,!0)}})})}},a.run=function(e){i=e,n=i(t),l.html=i("html"),r.open=function(t){return new s(t).index}},t.layui&&layui.define?(r.ready(),layui.define("jquery",function(e){r.path=layui.cache.dir,a.run(layui.$),t.layer=r,e("layer",r)})):"function"==typeof define&&define.amd?define("layer",["jquery"],function(){return a.run(t.jQuery),r}):function(){r.ready(),a.run(t.jQuery)}()}(window),function(t){t("toastr",["jquery"],function(t){return function(){function e(t,e,i){return f({type:w.error,iconClass:m().iconClasses.error,message:t,optionsOverride:i,title:e})}function i(e,i){return e||(e=m()),v=t("#"+e.containerId),v.length?v:(i&&(v=u(e)),v)}function n(t,e,i){return f({type:w.info,iconClass:m().iconClasses.info,message:t,optionsOverride:i,title:e})}function o(t){y=t}function a(t,e,i){return f({type:w.success,iconClass:m().iconClasses.success,message:t,optionsOverride:i,title:e})}function r(t,e,i){return f({type:w.warning,iconClass:m().iconClasses.warning,message:t,optionsOverride:i,title:e})}function s(t,e){var n=m();v||i(n),d(t,n,e)||c(n)}function l(e){var n=m();if(v||i(n),e&&0===t(":focus",e).length)return void g(e);v.children().length&&v.remove()}function c(e){for(var i=v.children(),n=i.length-1;n>=0;n--)d(t(i[n]),e)}function d(e,i,n){var o=!(!n||!n.force)&&n.force;return!(!e||!o&&0!==t(":focus",e).length)&&(e[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){g(e)}}),!0)}function u(e){return v=t("
").attr("id",e.containerId).addClass(e.positionClass),v.appendTo(t(e.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'
× ',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function h(t){y&&y(t)}function f(e){function n(t){return null==t&&(t=""),t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function o(){var t="";switch(e.iconClass){case"toast-success":case"toast-info":t="polite";break;default:t="assertive"}S.attr("aria-live",t)}function a(){e.iconClass&&S.addClass(_.toastClass).addClass(k)}function r(){_.newestOnTop?v.prepend(S):v.append(S)}function s(){if(e.title){var t=e.title;_.escapeHtml&&(t=n(e.title)),T.append(t).addClass(_.titleClass),S.append(T)}}function l(){if(e.message){var t=e.message;_.escapeHtml&&(t=n(e.message)),D.append(t).addClass(_.messageClass),S.append(D)}}function c(){_.closeButton&&(E.addClass(_.closeClass).attr("role","button"),S.prepend(E))}function d(){_.progressBar&&($.addClass(_.progressClass),S.prepend($))}function u(){_.rtl&&S.addClass("rtl")}function p(e){var i=e&&!1!==_.closeMethod?_.closeMethod:_.hideMethod,n=e&&!1!==_.closeDuration?_.closeDuration:_.hideDuration,o=e&&!1!==_.closeEasing?_.closeEasing:_.hideEasing;if(!t(":focus",S).length||e)return clearTimeout(F.intervalId),S[i]({duration:n,easing:o,complete:function(){g(S),clearTimeout(C),_.onHidden&&"hidden"!==A.state&&_.onHidden(),A.state="hidden",A.endTime=new Date,h(A)}})}function f(){(_.timeOut>0||_.extendedTimeOut>0)&&(C=setTimeout(p,_.extendedTimeOut),F.maxHideTime=parseFloat(_.extendedTimeOut),F.hideEta=(new Date).getTime()+F.maxHideTime)}function y(){clearTimeout(C),F.hideEta=0,S.stop(!0,!0)[_.showMethod]({duration:_.showDuration,easing:_.showEasing})}function w(){var t=(F.hideEta-(new Date).getTime())/F.maxHideTime*100;$.width(t+"%")}var _=m(),k=e.iconClass||_.iconClass;if(void 0!==e.optionsOverride&&(_=t.extend(_,e.optionsOverride),k=e.optionsOverride.iconClass||k),!function(t,e){if(t.preventDuplicates){if(e.message===b)return!0
+;b=e.message}return!1}(_,e)){x++,v=i(_,!0);var C=null,S=t("
"),T=t("
"),D=t("
"),$=t("
"),E=t(_.closeHtml),F={intervalId:null,hideEta:null,maxHideTime:null},A={toastId:x,state:"visible",startTime:new Date,options:_,map:e};return function(){a(),s(),l(),c(),d(),u(),r(),o()}(),function(){S.hide(),S[_.showMethod]({duration:_.showDuration,easing:_.showEasing,complete:_.onShown}),_.timeOut>0&&(C=setTimeout(p,_.timeOut),F.maxHideTime=parseFloat(_.timeOut),F.hideEta=(new Date).getTime()+F.maxHideTime,_.progressBar&&(F.intervalId=setInterval(w,10)))}(),function(){_.closeOnHover&&S.hover(y,f),!_.onclick&&_.tapToDismiss&&S.click(p),_.closeButton&&E&&E.click(function(t){t.stopPropagation?t.stopPropagation():void 0!==t.cancelBubble&&!0!==t.cancelBubble&&(t.cancelBubble=!0),_.onCloseClick&&_.onCloseClick(t),p(!0)}),_.onclick&&S.click(function(t){_.onclick(t),p()})}(),h(A),_.debug&&console&&console.log(A),S}}function m(){return t.extend({},p(),_.options)}function g(t){v||(v=i()),t.is(":visible")||(t.remove(),t=null,0===v.children().length&&(v.remove(),b=void 0))}var v,y,b,x=0,w={error:"error",info:"info",success:"success",warning:"warning"},_={clear:s,remove:l,error:e,getContainer:i,info:n,options:{},subscribe:o,success:a,version:"2.1.4",warning:r};return _}()})}("function"==typeof define&&define.amd?define:function(t,e){"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):window.toastr=e(window.jQuery)}),define("fast",["jquery","bootstrap","toastr","layer","lang"],function(t,e,i,n,o){var a={config:{toastr:{closeButton:!0,debug:!1,newestOnTop:!1,progressBar:!1,positionClass:"toast-top-center",preventDuplicates:!1,onclick:null,showDuration:"300",hideDuration:"1000",timeOut:"5000",extendedTimeOut:"1000",showEasing:"swing",hideEasing:"linear",showMethod:"fadeIn",hideMethod:"fadeOut"}},events:{onAjaxSuccess:function(t,e){var n=void 0!==t.data?t.data:null,o=void 0!==t.msg&&t.msg?t.msg:__("Operation completed");if("function"==typeof e){if(!1===e.call(this,n,t))return}i.success(o)},onAjaxError:function(t,e){var n=void 0!==t.data?t.data:null;if("function"==typeof e){if(!1===e.call(this,n,t))return}i.error(t.msg)},onAjaxResponse:function(e){try{var i="object"==typeof e?e:JSON.parse(e);i.hasOwnProperty("code")||t.extend(i,{code:-2,msg:e,data:null})}catch(t){var i={code:-1,msg:t.message,data:null}}return i}},api:{ajax:function(e,i,o){e="string"==typeof e?{url:e}:e;var r;return(void 0===e.loading||e.loading)&&(r=n.load(e.loading||0)),e=t.extend({type:"POST",dataType:"json",xhrFields:{withCredentials:!0},success:function(t){r&&n.close(r),t=a.events.onAjaxResponse(t),1===t.code?a.events.onAjaxSuccess(t,i):a.events.onAjaxError(t,o)},error:function(t){r&&n.close(r);var e={code:t.status,msg:t.statusText,data:null};a.events.onAjaxError(e,o)}},e),t.ajax(e)},fixurl:function(t){if("/"!==t.substr(0,1)){new RegExp("^(?:[a-z]+:)?//","i").test(t)||(t=Config.moduleurl+"/"+t)}else"/addons/"===t.substr(0,8)&&(t=Config.__PUBLIC__.replace(/(\/*$)/g,"")+t);return t},cdnurl:function(t,e){var i=new RegExp("^((?:[a-z]+:)?\\/\\/|data:image\\/)","i"),n=Config.upload.cdnurl;return void 0!==e&&!0!==e&&0!==n.indexOf("/")||(t=i.test(t)||n&&0===t.indexOf(n)?t:n+t),e&&!i.test(t)&&(e="string"==typeof e?e:location.origin,t=e+t),t},query:function(t,e){if(e||(e=window.location.href),!t)return"";t=t.replace(/[\[\]]/g,"\\$&");var i=new RegExp("[?&/]"+t+"([=/]([^/?]*)|&|#|$)"),n=i.exec(e);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},open:function(i,o,r){o=r&&r.title?r.title:o||"",i=a.api.fixurl(i),i=i+(i.indexOf("?")>-1?"&":"?")+"dialog=1";var s=a.config.openArea!=e?a.config.openArea:[t(window).width()>800?"800px":"95%",t(window).height()>600?"600px":"95%"],l=r&&"function"==typeof r.success?r.success:t.noop;return r&&"function"==typeof r.success&&delete r.success,r=t.extend({type:2,title:o,shadeClose:!0,shade:!1,maxmin:!0,moveOut:!0,area:s,content:i,zIndex:n.zIndex,success:function(e,i){var o=this;t(e).data("callback",o.callback),n.setTop(e);try{var r=n.getChildFrame("html",i),s=r.find(".layer-footer");if(a.api.layerfooter(e,i,o),s.length>0){var c=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(c){var d=s[0],u=new c(function(t){a.api.layerfooter(e,i,o),t.forEach(function(t){})}),p={attributes:!0,childList:!0,characterData:!0,subtree:!0};u.observe(d,p)}}}catch(t){}t(e).height()>t(window).height()&&n.style(i,{top:0,height:t(window).height()}),l.call(this,e,i)}},r||{}),(t(window).width()<480||/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&top.$(".tab-pane.active").length>0)&&(top.$(".tab-pane.active").length>0?(r.area=[top.$(".tab-pane.active").width()+"px",top.$(".tab-pane.active").height()+"px"],r.offset=[top.$(".tab-pane.active").scrollTop()+"px","0px"]):(r.area=[t(window).width()+"px",t(window).height()+"px"],r.offset=["0px","0px"])),n.open(r)},close:function(t){var i=parent.Layer.getFrameIndex(window.name),n=parent.$("#layui-layer"+i).data("callback");parent.Layer.close(i),"function"==typeof n&&n.call(e,t)},layerfooter:function(e,i,o){var a=n.getChildFrame("html",i),r=a.find(".layer-footer");if(r.length>0){t(".layui-layer-footer",e).remove();var s=t("
").addClass("layui-layer-btn layui-layer-footer");s.html(r.html()),0===t(".row",s).length&&t(">",s).wrapAll("
"),s.insertAfter(e.find(".layui-layer-content")),s.on("click",".btn",function(){if(!t(this).hasClass("disabled")&&!t(this).parent().hasClass("disabled")){var e=s.find(".btn").index(this);t(".btn:eq("+e+")",r).trigger("click")}});var l=e.find(".layui-layer-title").outerHeight()||0,c=e.find(".layui-layer-btn").outerHeight()||0;t("iframe",e).height(e.height()-l-c)}if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream){var l=e.find(".layui-layer-title").outerHeight()||0,c=e.find(".layui-layer-btn").outerHeight()||0;t("iframe",e).parent().css("height",e.height()-l-c),t("iframe",e).css("height","100%")}},success:function(e,i){var o="function"==typeof e;return o&&(i=e),n.msg(__("Operation completed"),t.extend({offset:0,icon:1},o?{}:e),i)},error:function(e,i){var o="function"==typeof e;return o&&(i=e),n.msg(__("Operation failed"),t.extend({offset:0,icon:2},o?{}:e),i)},msg:function(t,e){var i="function"==typeof e?e:function(){void 0!==e&&e&&(location.href=e)};n.msg(t,{time:2e3},i)},escape:function(t){return"string"==typeof t?t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):t},toastr:i,layer:n},lang:function(){var t=arguments,e=t[0],i=1;if(e=e.toLowerCase(),void 0!==o&&void 0!==o[e]){if("object"==typeof o[e])return o[e];e=o[e]}else if(e.indexOf("."),1)e=t[0];else{for(var n=e.split("."),a=o[n[0]],i=1;i
0){var i=0;t(".layui-layer").each(function(){i=Math.max(i,parseInt(t(this).attr("times")))}),i&&n.close(i)}}),i.options=a.config.toastr}};return window.Layer=n,window.Toastr=i,window.__=a.lang,window.Fast=a,a.init(),a}),function(){function t(t){return t.replace(b,"").replace(x,",").replace(w,"").replace(_,"").replace(k,"").split(C)}function e(t){return"'"+t.replace(/('|\\)/g,"\\$1").replace(/\r/g,"\\r").replace(/\n/g,"\\n")+"'"}function i(i,n){function o(t){return p+=t.split(/\n/).length-1,d&&(t=t.replace(/\s+/g," ").replace(//g,"")),t&&(t=y[1]+e(t)+y[2]+"\n"),t}function a(e){var i=p;if(c?e=c(e,n):r&&(e=e.replace(/\n/g,function(){return"$line="+ ++p+";"})),0===e.indexOf("=")){var o=u&&!/^=[=#]/.test(e);if(e=e.replace(/^=[=#]?|[\s;]*$/g,""),o){var a=e.replace(/\s*\([^\)]+\)/,"");h[a]||/^(include|print)$/.test(a)||(e="$escape("+e+")")}else e="$string("+e+")";e=y[1]+e+y[2]}return r&&(e="$line="+i+";"+e),v(t(e),function(t){if(t&&!m[t]){var e;e="print"===t?x:"include"===t?w:h[t]?"$utils."+t:f[t]?"$helpers."+t:"$data."+t,_+=t+"="+e+",",m[t]=!0}}),e+"\n"}var r=n.debug,s=n.openTag,l=n.closeTag,c=n.parser,d=n.compress,u=n.escape,p=1,m={$data:1,$filename:1,$utils:1,$helpers:1,$out:1,$line:1},g="".trim,y=g?["$out='';","$out+=",";","$out"]:["$out=[];","$out.push(",");","$out.join('')"],b=g?"$out+=text;return $out;":"$out.push(text);",x="function(){var text=''.concat.apply('',arguments);"+b+"}",w="function(filename,data){data=data||$data;var text=$utils.$include(filename,data,$filename);"+b+"}",_="'use strict';var $utils=this,$helpers=$utils.$helpers,"+(r?"$line=0,":""),k=y[0],C="return new String("+y[3]+");";v(i.split(s),function(t){t=t.split(l);var e=t[0],i=t[1];1===t.length?k+=o(e):(k+=a(e),i&&(k+=o(i)))});var S=_+k+C;r&&(S="try{"+S+"}catch(e){throw {filename:$filename,name:'Render Error',message:e.message,line:$line,source:"+e(i)+".split(/\\n/)[$line-1].replace(/^\\s+/,'')};}");try{var T=new Function("$data","$filename",S);return T.prototype=h,T}catch(t){throw t.temp="function anonymous($data,$filename) {"+S+"}",t}}var n=function(t,e){return"string"==typeof e?g(e,{filename:t}):r(t,e)};n.version="3.0.0",n.config=function(t,e){o[t]=e};var o=n.defaults={openTag:"<%",closeTag:"%>",escape:!0,cache:!0,compress:!1,parser:null},a=n.cache={};n.render=function(t,e){return g(t)(e)};var r=n.renderFile=function(t,e){var i=n.get(t)||m({filename:t,name:"Render Error",message:"Template not found"});return e?i(e):i};n.get=function(t){var e;if(a[t])e=a[t];else if("object"==typeof document){var i=document.getElementById(t);if(i){var n=(i.value||i.innerHTML).replace(/^\s*|\s*$/g,"");e=g(n,{filename:t})}}return e};var s=function(t,e){return"string"!=typeof t&&(e=typeof t,"number"===e?t+="":t="function"===e?s(t.call(t)):""),t},l={"<":"<",">":">",'"':""","'":"'","&":"&"},c=function(t){return l[t]},d=function(t){return s(t).replace(/&(?![\w#]+;)|[<>"']/g,c)},u=Array.isArray||function(t){return"[object Array]"==={}.toString.call(t)},p=function(t,e){var i,n;if(u(t))for(i=0,n=t.length;i\n"+t[i]+"\n\n";"object"==typeof console&&console.error(e)};var m=function(t){return n.onerror(t),function(){return"{Template Error}"}},g=n.compile=function(t,e){function n(i){try{return new l(i,s)+""}catch(n){return e.debug?m(n)():(e.debug=!0,g(t,e)(i))}}e=e||{};for(var r in o)void 0===e[r]&&(e[r]=o[r]);var s=e.filename;try{var l=i(t,e)}catch(t){return t.filename=s||"anonymous",t.name="Syntax Error",m(t)}return n.prototype=l.prototype,n.toString=function(){return l.toString()},s&&e.cache&&(a[s]=n),n},v=h.$each,y="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,undefined",b=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|\s*\.\s*[$\w\.]+/g,x=/[^\w$]+/g,w=new RegExp(["\\b"+y.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),_=/^\d[^,]*|,\d[^,]*/g,k=/^,+|,+$/g,C=/^$|,+/;"object"==typeof exports&&"undefined"!=typeof module?module.exports=n:"function"==typeof define?define("template",[],function(){return n}):this.template=n}(),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("moment/moment",e):t.moment=e()}(this,function(){"use strict";function t(){return Kn.apply(null,arguments)}function e(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function i(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function o(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(n(t,e))return!1;return!0}function a(t){return void 0===t}function r(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function s(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var i,n=[],o=t.length;for(i=0;i0)for(i=0;i=0?i?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}function D(t,e,i,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),t&&(lo[t]=o),e&&(lo[e[0]]=function(){return T(o.apply(this,arguments),e[1],e[2])}),i&&(lo[i]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function $(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function E(t){var e,i,n=t.match(ao);for(e=0,i=n.length;e=0&&ro.test(t);)t=t.replace(ro,i),ro.lastIndex=0,n-=1;return t}function O(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.match(ao).map(function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t}).join(""),this._longDateFormat[t])}function M(){return this._invalidDate}function L(t){return this._ordinal.replace("%d",t)}function N(t,e,i,n){var o=this._relativeTime[i];return w(o)?o(t,e,i,n):o.replace(/%d/i,t)}function R(t,e){var i=this._relativeTime[t>0?"future":"past"];return w(i)?i(e):i.replace(/%s/i,e)}function P(t){return"string"==typeof t?ho[t]||ho[t.toLowerCase()]:void 0}function I(t){var e,i,o={};for(i in t)n(t,i)&&(e=P(i))&&(o[e]=t[i]);return o}function j(t){var e,i=[];for(e in t)n(t,e)&&i.push({unit:e,priority:fo[e]});return i.sort(function(t,e){return t.priority-e.priority}),i}function H(t,e,i){no[t]=w(e)?e:function(t,n){return t&&i?i:e}}function z(t,e){return n(no,t)?no[t](e._strict,e._locale):new RegExp(Y(t))}function Y(t){return B(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,o){return e||i||n||o}))}function B(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function U(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function q(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=U(e)),i}function W(t,e){var i,n,o=e;for("string"==typeof t&&(t=[t]),r(e)&&(o=function(t,i){i[e]=q(t)}),n=t.length,i=0;i=0?(s=new Date(t+400,e,i,n,o,a,r),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,i,n,o,a,r),s}function gt(t){var e,i;return t<100&&t>=0?(i=Array.prototype.slice.call(arguments),i[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function vt(t,e,i){var n=7+e-i;return-(7+gt(t,0,n).getUTCDay()-e)%7+n-1}function yt(t,e,i,n,o){var a,r,s=(7+i-n)%7,l=vt(t,n,o),c=1+7*(e-1)+s+l;return c<=0?(a=t-1,r=Q(a)+c):c>Q(t)?(a=t+1,r=c-Q(t)):(a=t,r=c),{year:a,dayOfYear:r}}function bt(t,e,i){var n,o,a=vt(t.year(),e,i),r=Math.floor((t.dayOfYear()-a-1)/7)+1;return r<1?(o=t.year()-1,n=r+xt(o,e,i)):r>xt(t.year(),e,i)?(n=r-xt(t.year(),e,i),o=t.year()+1):(o=t.year(),n=r),{week:n,year:o}}function xt(t,e,i){var n=vt(t,e,i),o=vt(t+1,e,i);return(Q(t)-n+o)/7}function wt(t){return bt(t,this._week.dow,this._week.doy).week}function _t(){return this._week.dow}function kt(){return this._week.doy}function Ct(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function St(t){var e=bt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Tt(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Dt(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function $t(t,e){return t.slice(e,7).concat(t.slice(0,e))}function Et(t,i){var n=e(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(i)?"format":"standalone"];return!0===t?$t(n,this._week.dow):t?n[t.day()]:n}function Ft(t){return!0===t?$t(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function At(t){return!0===t?$t(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Ot(t,e,i){var n,o,a,r=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=d([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return i?"dddd"===e?(o=Uo.call(this._weekdaysParse,r),-1!==o?o:null):"ddd"===e?(o=Uo.call(this._shortWeekdaysParse,r),-1!==o?o:null):(o=Uo.call(this._minWeekdaysParse,r),-1!==o?o:null):"dddd"===e?-1!==(o=Uo.call(this._weekdaysParse,r))?o:-1!==(o=Uo.call(this._shortWeekdaysParse,r))?o:(o=Uo.call(this._minWeekdaysParse,r),-1!==o?o:null):"ddd"===e?-1!==(o=Uo.call(this._shortWeekdaysParse,r))?o:-1!==(o=Uo.call(this._weekdaysParse,r))?o:(o=Uo.call(this._minWeekdaysParse,r),-1!==o?o:null):-1!==(o=Uo.call(this._minWeekdaysParse,r))?o:-1!==(o=Uo.call(this._weekdaysParse,r))?o:(o=Uo.call(this._shortWeekdaysParse,r),-1!==o?o:null)}function Mt(t,e,i){var n,o,a;if(this._weekdaysParseExact)return Ot.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=d([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}}function Lt(t){if(!this.isValid())return null!=t?this:NaN;var e=J(this,"Day");return null!=t?(t=Tt(t,this.localeData()),this.add(t-e,"d")):e}function Nt(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Rt(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Dt(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Pt(t){return this._weekdaysParseExact?(n(this,"_weekdaysRegex")||Ht.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(n(this,"_weekdaysRegex")||(this._weekdaysRegex=ea),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function It(t){return this._weekdaysParseExact?(n(this,"_weekdaysRegex")||Ht.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(n(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ia),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function jt(t){return this._weekdaysParseExact?(n(this,"_weekdaysRegex")||Ht.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(n(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=na),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ht(){function t(t,e){return e.length-t.length}var e,i,n,o,a,r=[],s=[],l=[],c=[];for(e=0;e<7;e++)i=d([2e3,1]).day(e),n=B(this.weekdaysMin(i,"")),o=B(this.weekdaysShort(i,"")),a=B(this.weekdays(i,"")),r.push(n),s.push(o),l.push(a),c.push(n),c.push(o),c.push(a);r.sort(t),s.sort(t),l.sort(t),c.sort(t),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function zt(){return this.hours()%12||12}function Yt(){return this.hours()||24}function Bt(t,e){D(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Ut(t,e){return e._meridiemParse}function qt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Wt(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function Vt(t,e){var i,n=Math.min(t.length,e.length);for(i=0;i0;){if(n=Kt(o.slice(0,e).join("-")))return n;if(i&&i.length>=e&&Vt(o,i)>=e-1)break;e--}a++}return oa}function Qt(t){return!(!t||!t.match("^[^/\\\\]*$"))}function Kt(t){var e,i=null;if(void 0===la[t]&&"undefined"!=typeof module&&module&&module.exports&&Qt(t))try{i=oa._abbr,e=require,e("./locale/"+t),Zt(i)}catch(e){la[t]=null}return la[t]}function Zt(t,e){var i;return t&&(i=a(e)?ee(t):Jt(t,e),i?oa=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),oa._abbr}function Jt(t,e){if(null!==e){var i,n=sa;if(e.abbr=t,null!=la[t])x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=la[t]._config;else if(null!=e.parentLocale)if(null!=la[e.parentLocale])n=la[e.parentLocale]._config;else{if(null==(i=Kt(e.parentLocale)))return ca[e.parentLocale]||(ca[e.parentLocale]=[]),ca[e.parentLocale].push({name:t,config:e}),null;n=i._config}return la[t]=new C(k(n,e)),ca[t]&&ca[t].forEach(function(t){Jt(t.name,t.config)}),Zt(t),la[t]}return delete la[t],null}function te(t,e){if(null!=e){var i,n,o=sa;null!=la[t]&&null!=la[t].parentLocale?la[t].set(k(la[t]._config,e)):(n=Kt(t),null!=n&&(o=n._config),e=k(o,e),null==n&&(e.abbr=t),i=new C(e),i.parentLocale=la[t],la[t]=i),Zt(t)}else null!=la[t]&&(null!=la[t].parentLocale?(la[t]=la[t].parentLocale,t===Zt()&&Zt(t)):null!=la[t]&&delete la[t]);return la[t]}function ee(t){var i;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return oa;if(!e(t)){if(i=Kt(t))return i;t=[t]}return Xt(t)}function ie(){return io(la)}function ne(t){var e,i=t._a;return i&&-2===p(t).overflow&&(e=i[Ro]<0||i[Ro]>11?Ro:i[Po]<1||i[Po]>ot(i[No],i[Ro])?Po:i[Io]<0||i[Io]>24||24===i[Io]&&(0!==i[jo]||0!==i[Ho]||0!==i[zo])?Io:i[jo]<0||i[jo]>59?jo:i[Ho]<0||i[Ho]>59?Ho:i[zo]<0||i[zo]>999?zo:-1,p(t)._overflowDayOfYear&&(ePo)&&(e=Po),p(t)._overflowWeeks&&-1===e&&(e=Yo),p(t)._overflowWeekday&&-1===e&&(e=Bo),p(t).overflow=e),t}function oe(t){var e,i,n,o,a,r,s=t._i,l=da.exec(s)||ua.exec(s),c=ha.length,d=fa.length;if(l){for(p(t).iso=!0,e=0,i=c;eQ(a)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),i=gt(a,0,t._dayOfYear),t._a[Ro]=i.getUTCMonth(),t._a[Po]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=r[e]=n[e];for(;e<7;e++)t._a[e]=r[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Io]&&0===t._a[jo]&&0===t._a[Ho]&&0===t._a[zo]&&(t._nextDay=!0,t._a[Io]=0),t._d=(t._useUTC?gt:mt).apply(null,r),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Io]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(p(t).weekdayMismatch=!0)}}function me(t){var e,i,n,o,a,r,s,l,c;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(a=1,r=4,i=pe(e.GG,t._a[No],bt(Ce(),1,4).year),n=pe(e.W,1),((o=pe(e.E,1))<1||o>7)&&(l=!0)):(a=t._locale._week.dow,r=t._locale._week.doy,c=bt(Ce(),a,r),i=pe(e.gg,t._a[No],c.year),n=pe(e.w,c.week),null!=e.d?((o=e.d)<0||o>6)&&(l=!0):null!=e.e?(o=e.e+a,(e.e<0||e.e>6)&&(l=!0)):o=a),n<1||n>xt(i,a,r)?p(t)._overflowWeeks=!0:null!=l?p(t)._overflowWeekday=!0:(s=yt(i,n,o,a,r),t._a[No]=s.year,t._dayOfYear=s.dayOfYear)}function ge(e){if(e._f===t.ISO_8601)return void oe(e);if(e._f===t.RFC_2822)return void de(e);e._a=[],p(e).empty=!0;var i,n,o,a,r,s,l,c=""+e._i,d=c.length,u=0;for(o=A(e._f,e._locale).match(ao)||[],l=o.length,i=0;i0&&p(e).unusedInput.push(r),c=c.slice(c.indexOf(n)+n.length),u+=n.length),lo[a]?(n?p(e).empty=!1:p(e).unusedTokens.push(a),G(a,n,e)):e._strict&&!n&&p(e).unusedTokens.push(a);p(e).charsLeftOver=d-u,c.length>0&&p(e).unusedInput.push(c),e._a[Io]<=12&&!0===p(e).bigHour&&e._a[Io]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[Io]=ve(e._locale,e._a[Io],e._meridiem),s=p(e).era,null!==s&&(e._a[No]=e._locale.erasConvertYear(s,e._a[No])),fe(e),ne(e)}function ve(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(n=t.isPM(i),n&&e<12&&(e+=12),n||12!==e||(e=0),e):e}function ye(t){var e,i,n,o,a,r,s=!1,l=t._f.length;if(0===l)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(o=0;othis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function We(){if(!a(this._isDSTShifted))return this._isDSTShifted;var t,e={};return m(e,this),e=we(e),e._a?(t=e._isUTC?d(e._a):Ce(e._a),this._isDSTShifted=this.isValid()&&Le(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Ve(){return!!this.isValid()&&!this._isUTC}function Ge(){return!!this.isValid()&&this._isUTC}function Xe(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Qe(t,e){var i,o,a,s=t,l=null;return Oe(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:r(t)||!isNaN(+t)?(s={},e?s[e]=+t:s.milliseconds=+t):(l=ka.exec(t))?(i="-"===l[1]?-1:1,s={y:0,d:q(l[Po])*i,h:q(l[Io])*i,m:q(l[jo])*i,s:q(l[Ho])*i,ms:q(Me(1e3*l[zo]))*i}):(l=Ca.exec(t))?(i="-"===l[1]?-1:1,s={y:Ke(l[2],i),M:Ke(l[3],i),w:Ke(l[4],i),d:Ke(l[5],i),h:Ke(l[6],i),m:Ke(l[7],i),s:Ke(l[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(a=Je(Ce(s.from),Ce(s.to)),s={},s.ms=a.milliseconds,s.M=a.months),o=new Ae(s),Oe(t)&&n(t,"_locale")&&(o._locale=t._locale),Oe(t)&&n(t,"_isValid")&&(o._isValid=t._isValid),o}function Ke(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function Ze(t,e){var i={};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Je(t,e){var i;return t.isValid()&&e.isValid()?(e=Pe(e,t),t.isBefore(e)?i=Ze(t,e):(i=Ze(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function ti(t,e){return function(i,n){var o,a;return null===n||isNaN(+n)||(x(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=i,i=n,n=a),o=Qe(i,n),ei(this,o,t),this}}function ei(e,i,n,o){var a=i._milliseconds,r=Me(i._days),s=Me(i._months);e.isValid()&&(o=null==o||o,s&&ct(e,J(e,"Month")+s*n),r&&tt(e,"Date",J(e,"Date")+r*n),a&&e._d.setTime(e._d.valueOf()+a*n),o&&t.updateOffset(e,r||s))}function ii(t){return"string"==typeof t||t instanceof String}function ni(t){return v(t)||s(t)||ii(t)||r(t)||ai(t)||oi(t)||null===t||void 0===t}function oi(t){var e,a,r=i(t)&&!o(t),s=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=l.length;for(e=0;ei.valueOf():i.valueOf()9999?F(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):w(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",F(i,"Z")):F(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function xi(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,i,n,o="moment",a="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),t="["+o+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",n=a+'[")]',this.format(t+e+i+n)}function wi(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var i=F(this,e);return this.localeData().postformat(i)}function _i(t,e){return this.isValid()&&(v(t)&&t.isValid()||Ce(t).isValid())?Qe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ki(t){return this.from(Ce(),t)}function Ci(t,e){return this.isValid()&&(v(t)&&t.isValid()||Ce(t).isValid())?Qe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Si(t){return this.to(Ce(),t)}function Ti(t){var e;return void 0===t?this._locale._abbr:(e=ee(t),null!=e&&(this._locale=e),this)}function Di(){return this._locale}function $i(t,e){return(t%e+e)%e}function Ei(t,e,i){return t<100&&t>=0?new Date(t+400,e,i)-Aa:new Date(t,e,i).valueOf()}function Fi(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-Aa:Date.UTC(t,e,i)}function Ai(e){var i,n;if(void 0===(e=P(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?Fi:Ei,e){case"year":i=n(this.year(),0,1);break;case"quarter":i=n(this.year(),this.month()-this.month()%3,1);break;case"month":i=n(this.year(),this.month(),1);break;case"week":i=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":i=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":i=n(this.year(),this.month(),this.date());break;case"hour":i=this._d.valueOf(),i-=$i(i+(this._isUTC?0:this.utcOffset()*Ea),Fa);break;case"minute":i=this._d.valueOf(),i-=$i(i,Ea);break;case"second":i=this._d.valueOf(),i-=$i(i,$a)}return this._d.setTime(i),t.updateOffset(this,!0),this}function Oi(e){var i,n;if(void 0===(e=P(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?Fi:Ei,e){case"year":i=n(this.year()+1,0,1)-1;break;case"quarter":i=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":i=n(this.year(),this.month()+1,1)-1;break;case"week":i=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":i=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":i=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":i=this._d.valueOf(),i+=Fa-$i(i+(this._isUTC?0:this.utcOffset()*Ea),Fa)-1;break;case"minute":i=this._d.valueOf(),i+=Ea-$i(i,Ea)-1;break;case"second":i=this._d.valueOf(),i+=$a-$i(i,$a)-1}return this._d.setTime(i),t.updateOffset(this,!0),this}function Mi(){return this._d.valueOf()-6e4*(this._offset||0)}function Li(){return Math.floor(this.valueOf()/1e3)}function Ni(){return new Date(this.valueOf())}function Ri(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Pi(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Ii(){return this.isValid()?this.toISOString():null}function ji(){return h(this)}function Hi(){return c({},p(this))}function zi(){return p(this).overflow}function Yi(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Bi(e,i){var n,o,a,r=this._eras||ee("en")._eras;for(n=0,o=r.length;n=0)return l[n]}function qi(e,i){var n=e.since<=e.until?1:-1;return void 0===i?t(e.since).year():t(e.since).year()+(i-e.offset)*n}function Wi(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;ta&&(e=a),hn.call(this,t,e,i,n,o))}function hn(t,e,i,n,o){var a=yt(t,e,i,n,o),r=gt(a.year,0,a.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function fn(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function mn(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function gn(t,e){e[zo]=q(1e3*("0."+t))}function vn(){return this._isUTC?"UTC":""}function yn(){return this._isUTC?"Coordinated Universal Time":""}function bn(t){return Ce(1e3*t)}function xn(){return Ce.apply(null,arguments).parseZone()}function wn(t){return t}function _n(t,e,i,n){var o=ee(),a=d().set(n,e);return o[i](a,t)}function kn(t,e,i){if(r(t)&&(e=t,t=void 0),t=t||"",null!=e)return _n(t,e,i,"month");var n,o=[];for(n=0;n<12;n++)o[n]=_n(t,n,i,"month");return o}function Cn(t,e,i,n){"boolean"==typeof t?(r(e)&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,r(e)&&(i=e,e=void 0),e=e||"");var o,a=ee(),s=t?a._week.dow:0,l=[];if(null!=i)return _n(e,(i+s)%7,n,"day");for(o=0;o<7;o++)l[o]=_n(e,(o+s)%7,n,"day");return l}function Sn(t,e){return kn(t,e,"months")}function Tn(t,e){return kn(t,e,"monthsShort")}function Dn(t,e,i){return Cn(t,e,i,"weekdays")}function $n(t,e,i){return Cn(t,e,i,"weekdaysShort")}function En(t,e,i){return Cn(t,e,i,"weekdaysMin")}function Fn(){var t=this._data;return this._milliseconds=ja(this._milliseconds),this._days=ja(this._days),this._months=ja(this._months),t.milliseconds=ja(t.milliseconds),t.seconds=ja(t.seconds),t.minutes=ja(t.minutes),t.hours=ja(t.hours),t.months=ja(t.months),t.years=ja(t.years),this}function An(t,e,i,n){var o=Qe(e,i);return t._milliseconds+=n*o._milliseconds,t._days+=n*o._days,t._months+=n*o._months,t._bubble()}function On(t,e){return An(this,t,e,1)}function Mn(t,e){return An(this,t,e,-1)}function Ln(t){return t<0?Math.floor(t):Math.ceil(t)}function Nn(){var t,e,i,n,o,a=this._milliseconds,r=this._days,s=this._months,l=this._data;return a>=0&&r>=0&&s>=0||a<=0&&r<=0&&s<=0||(a+=864e5*Ln(Pn(s)+r),r=0,s=0),l.milliseconds=a%1e3,t=U(a/1e3),l.seconds=t%60,e=U(t/60),l.minutes=e%60,i=U(e/60),l.hours=i%24,r+=U(i/24),o=U(Rn(r)),s+=o,r-=Ln(Pn(o)),n=U(s/12),s%=12,l.days=r,l.months=s,l.years=n,this}function Rn(t){return 4800*t/146097}function Pn(t){return 146097*t/4800}function In(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=P(t))||"quarter"===t||"year"===t)switch(e=this._days+n/864e5,i=this._months+Rn(e),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(Pn(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}}function jn(t){return function(){return this.as(t)}}function Hn(){return Qe(this)}function zn(t){return t=P(t),this.isValid()?this[t+"s"]():NaN}function Yn(t){return function(){return this.isValid()?this._data[t]:NaN}}function Bn(){return U(this.days()/7)}function Un(t,e,i,n,o){return o.relativeTime(e||1,!!i,t,n)}function qn(t,e,i,n){var o=Qe(t).abs(),a=nr(o.as("s")),r=nr(o.as("m")),s=nr(o.as("h")),l=nr(o.as("d")),c=nr(o.as("M")),d=nr(o.as("w")),u=nr(o.as("y")),p=a<=i.ss&&["s",a]||a0,p[4]=n,Un.apply(null,p)}function Wn(t){return void 0===t?nr:"function"==typeof t&&(nr=t,!0)}function Vn(t,e){return void 0!==or[t]&&(void 0===e?or[t]:(or[t]=e,"s"===t&&(or.ss=e-1),!0))}function Gn(t,e){if(!this.isValid())return this.localeData().invalidDate();var i,n,o=!1,a=or;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(o=t),"object"==typeof e&&(a=Object.assign({},or,e),null!=e.s&&null==e.ss&&(a.ss=e.s-1)),i=this.localeData(),n=qn(this,!o,a,i),o&&(n=i.pastFuture(+this,n)),i.postformat(n)}function Xn(t){return(t>0)-(t<0)||+t}function Qn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,n,o,a,r,s,l=ar(this._milliseconds)/1e3,c=ar(this._days),d=ar(this._months),u=this.asSeconds();return u?(t=U(l/60),e=U(t/60),l%=60,t%=60,i=U(d/12),d%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=u<0?"-":"",a=Xn(this._months)!==Xn(u)?"-":"",r=Xn(this._days)!==Xn(u)?"-":"",s=Xn(this._milliseconds)!==Xn(u)?"-":"",o+"P"+(i?a+i+"Y":"")+(d?a+d+"M":"")+(c?r+c+"D":"")+(e||t||l?"T":"")+(e?s+e+"H":"")+(t?s+t+"M":"")+(l?s+n+"S":"")):"P0D"}var Kn,Zn;Zn=Array.prototype.some?Array.prototype.some:function(t){var e,i=Object(this),n=i.length>>>0;for(e=0;e68?1900:2e3)};var Uo,qo=Z("FullYear",!0);Uo=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;ethis?this:t:f()}),xa=function(){return Date.now?Date.now():+new Date},wa=["year","quarter","month","week","day","hour","minute","second","millisecond"];Ne("Z",":"),Ne("ZZ",""),H("Z",Eo),H("ZZ",Eo),W(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Re(Eo,t)});var _a=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var ka=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ca=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Qe.fn=Ae.prototype,Qe.invalid=Fe;var Sa=ti(1,"add"),Ta=ti(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Da=b("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)}),$a=1e3,Ea=60*$a,Fa=60*Ea,Aa=3506328*Fa;D("N",0,0,"eraAbbr"),D("NN",0,0,"eraAbbr"),D("NNN",0,0,"eraAbbr"),D("NNNN",0,0,"eraName"),D("NNNNN",0,0,"eraNarrow"),D("y",["y",1],"yo","eraYear"),D("y",["yy",2],0,"eraYear"),D("y",["yyy",3],0,"eraYear"),D("y",["yyyy",4],0,"eraYear"),H("N",Ji),H("NN",Ji),H("NNN",Ji),H("NNNN",tn),H("NNNNN",en),W(["N","NN","NNN","NNNN","NNNNN"],function(t,e,i,n){var o=i._locale.erasParse(t,n,i._strict);o?p(i).era=o:p(i).invalidEra=t}),H("y",To),H("yy",To),H("yyy",To),H("yyyy",To),H("yo",nn),W(["y","yy","yyy","yyyy"],No),W(["yo"],function(t,e,i,n){var o;i._locale._eraYearOrdinalRegex&&(o=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?e[No]=i._locale.eraYearOrdinalParse(t,o):e[No]=parseInt(t,10)}),D(0,["gg",2],0,function(){return this.weekYear()%100}),D(0,["GG",2],0,function(){return this.isoWeekYear()%100}),an("gggg","weekYear"),an("ggggg","weekYear"),an("GGGG","isoWeekYear"),an("GGGGG","isoWeekYear"),H("G",Do),H("g",Do),H("GG",xo,go),H("gg",xo,go),H("GGGG",Co,yo),H("gggg",Co,yo),H("GGGGG",So,bo),H("ggggg",So,bo),V(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=q(t)}),V(["gg","GG"],function(e,i,n,o){i[o]=t.parseTwoDigitYear(e)}),D("Q",0,"Qo","quarter"),H("Q",mo),W("Q",function(t,e){e[Ro]=3*(q(t)-1)}),D("D",["DD",2],"Do","date"),H("D",xo,Oo),H("DD",xo,go),H("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),W(["D","DD"],Po),W("Do",function(t,e){e[Po]=q(t.match(xo)[0])});var Oa=Z("Date",!0);D("DDD",["DDDD",3],"DDDo","dayOfYear"),H("DDD",ko),H("DDDD",vo),W(["DDD","DDDD"],function(t,e,i){i._dayOfYear=q(t)}),D("m",["mm",2],0,"minute"),H("m",xo,Mo),H("mm",xo,go),W(["m","mm"],jo);var Ma=Z("Minutes",!1);D("s",["ss",2],0,"second"),H("s",xo,Mo),H("ss",xo,go),W(["s","ss"],Ho);var La=Z("Seconds",!1);D("S",0,0,function(){return~~(this.millisecond()/100)}),D(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),D(0,["SSS",3],0,"millisecond"),D(0,["SSSS",4],0,function(){return 10*this.millisecond()}),D(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),D(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),D(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),D(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),D(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),H("S",ko,mo),H("SS",ko,go),H("SSS",ko,vo);var Na,Ra;for(Na="SSSS";Na.length<=9;Na+="S")H(Na,To);for(Na="S";Na.length<=9;Na+="S")W(Na,gn);Ra=Z("Milliseconds",!1),D("z",0,0,"zoneAbbr"),D("zz",0,0,"zoneName");var Pa=g.prototype;Pa.add=Sa,Pa.calendar=li,Pa.clone=ci,Pa.diff=gi,Pa.endOf=Oi,Pa.format=wi,Pa.from=_i,Pa.fromNow=ki,Pa.to=Ci,Pa.toNow=Si,Pa.get=et,Pa.invalidAt=zi,Pa.isAfter=di,Pa.isBefore=ui,Pa.isBetween=pi,Pa.isSame=hi,Pa.isSameOrAfter=fi,Pa.isSameOrBefore=mi,Pa.isValid=ji,Pa.lang=Da,Pa.locale=Ti,Pa.localeData=Di,Pa.max=ba,Pa.min=ya,Pa.parsingFlags=Hi,Pa.set=it,Pa.startOf=Ai,Pa.subtract=Ta,Pa.toArray=Ri,Pa.toObject=Pi,Pa.toDate=Ni,Pa.toISOString=bi,Pa.inspect=xi,"undefined"!=typeof Symbol&&null!=Symbol.for&&(Pa[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Pa.toJSON=Ii,Pa.toString=yi,Pa.unix=Li,Pa.valueOf=Mi,Pa.creationData=Yi,Pa.eraName=Wi,Pa.eraNarrow=Vi,Pa.eraAbbr=Gi,Pa.eraYear=Xi,Pa.year=qo,Pa.isLeapYear=K,Pa.weekYear=rn,Pa.isoWeekYear=sn,Pa.quarter=Pa.quarters=fn,Pa.month=dt,Pa.daysInMonth=ut,Pa.week=Pa.weeks=Ct,Pa.isoWeek=Pa.isoWeeks=St,Pa.weeksInYear=dn,Pa.weeksInWeekYear=un,Pa.isoWeeksInYear=ln,Pa.isoWeeksInISOWeekYear=cn,Pa.date=Oa,Pa.day=Pa.days=Lt,Pa.weekday=Nt,Pa.isoWeekday=Rt,Pa.dayOfYear=mn,Pa.hour=Pa.hours=ra,Pa.minute=Pa.minutes=Ma,Pa.second=Pa.seconds=La,Pa.millisecond=Pa.milliseconds=Ra,Pa.utcOffset=je,Pa.utc=ze,Pa.local=Ye,Pa.parseZone=Be,Pa.hasAlignedHourOffset=Ue,Pa.isDST=qe,Pa.isLocal=Ve,Pa.isUtcOffset=Ge,Pa.isUtc=Xe,Pa.isUTC=Xe,Pa.zoneAbbr=vn,Pa.zoneName=yn,Pa.dates=b("dates accessor is deprecated. Use date instead.",Oa),Pa.months=b("months accessor is deprecated. Use month instead",dt),Pa.years=b("years accessor is deprecated. Use year instead",qo),Pa.zone=b("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",He),Pa.isDSTShifted=b("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",We);var Ia=C.prototype;Ia.calendar=S,Ia.longDateFormat=O,Ia.invalidDate=M,Ia.ordinal=L,Ia.preparse=wn,Ia.postformat=wn,Ia.relativeTime=N,Ia.pastFuture=R,Ia.set=_,Ia.eras=Bi,Ia.erasParse=Ui,Ia.erasConvertYear=qi,Ia.erasAbbrRegex=Ki,Ia.erasNameRegex=Qi,Ia.erasNarrowRegex=Zi,Ia.months=at,Ia.monthsShort=rt,Ia.monthsParse=lt,Ia.monthsRegex=ht,Ia.monthsShortRegex=pt,Ia.week=wt,Ia.firstDayOfYear=kt,Ia.firstDayOfWeek=_t,Ia.weekdays=Et,Ia.weekdaysMin=At,Ia.weekdaysShort=Ft,Ia.weekdaysParse=Mt,Ia.weekdaysRegex=Pt,Ia.weekdaysShortRegex=It,Ia.weekdaysMinRegex=jt,Ia.isPM=qt,Ia.meridiem=Wt,Zt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===q(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),t.lang=b("moment.lang is deprecated. Use moment.locale instead.",Zt),t.langData=b("moment.langData is deprecated. Use moment.localeData instead.",ee);var ja=Math.abs,Ha=jn("ms"),za=jn("s"),Ya=jn("m"),Ba=jn("h"),Ua=jn("d"),qa=jn("w"),Wa=jn("M"),Va=jn("Q"),Ga=jn("y"),Xa=Ha,Qa=Yn("milliseconds"),Ka=Yn("seconds"),Za=Yn("minutes"),Ja=Yn("hours"),tr=Yn("days"),er=Yn("months"),ir=Yn("years"),nr=Math.round,or={ss:44,s:45,m:45,h:22,d:26,w:null,M:11},ar=Math.abs,rr=Ae.prototype;return rr.isValid=Ee,rr.abs=Fn,rr.add=On,rr.subtract=Mn,rr.as=In,rr.asMilliseconds=Ha,rr.asSeconds=za,rr.asMinutes=Ya,rr.asHours=Ba,rr.asDays=Ua,rr.asWeeks=qa,rr.asMonths=Wa,rr.asQuarters=Va,rr.asYears=Ga,rr.valueOf=Xa,rr._bubble=Nn,rr.clone=Hn,rr.get=zn,rr.milliseconds=Qa,rr.seconds=Ka,rr.minutes=Za,rr.hours=Ja,rr.days=tr,rr.weeks=Bn,rr.months=er,rr.years=ir,rr.humanize=Gn,rr.toISOString=Qn,rr.toString=Qn,rr.toJSON=Qn,rr.locale=Ti,rr.localeData=Di,rr.toIsoString=b("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qn),rr.lang=Da,D("X",0,0,"unix"),D("x",0,0,"valueOf"),H("x",Do),H("X",Fo),W("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t))}),W("x",function(t,e,i){i._d=new Date(q(t))}),t.version="2.30.1",function(t){Kn=t}(Ce),t.fn=Pa,t.min=Te,t.max=De,t.now=xa,t.utc=d,t.unix=bn,t.months=Sn,t.isDate=s,t.locale=Zt,t.invalid=f,t.duration=Qe,t.isMoment=v,t.weekdays=Dn,t.parseZone=xn,t.localeData=ee,t.isDuration=Oe,t.monthsShort=Tn,t.weekdaysMin=En,t.defineLocale=Jt,t.updateLocale=te,t.locales=ie,t.weekdaysShort=$n,t.normalizeUnits=P,t.relativeTimeRounding=Wn,t.relativeTimeThreshold=Vn,t.calendarFormat=si,t.prototype=Pa,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t}),define("moment",["moment/moment"],function(t){return t}),define("frontend",["fast","template","moment"],function(t,e,i){var n={api:t.api,init:function(){var t={};if($(document).on("click",".btn-captcha",function(e){var i=$(this).data("type")?$(this).data("type"):"mobile",o=this;if(n.api.sendcaptcha=function(e,i,o,a){$(e).addClass("disabled",!0).text("发送中..."),n.api.ajax({url:$(e).data("url"),data:o},function(n,o){clearInterval(t[i]);var r=60;t[i]=setInterval(function(){r--,r<=0?(clearInterval(t),$(e).removeClass("disabled").text("发送验证码")):$(e).addClass("disabled").text(r+"秒后可再次发送")},1e3),"function"==typeof a&&a.call(this,n,o)},function(){$(e).removeClass("disabled").text("发送验证码")})},["mobile","email"].indexOf(i)>-1){var a=$(this).data("input-id")?$("#"+$(this).data("input-id")):$("input[name='"+i+"']",$(this).closest("form")),r="email"===i?"邮箱":"手机号码";if(""===a.val())return Layer.msg(r+"不能为空!"),a.focus(),!1;if("mobile"===i&&!a.val().match(/^1[3-9]\d{9}$/))return Layer.msg("请输入正确的"+r+"!"),a.focus(),!1;if("email"===i&&!a.val().match(/^[\w\+\-]+(\.[\w\+\-]+)*@[a-z\d\-]+(\.[a-z\d\-]+)*\.([a-z]{2,4})$/))return Layer.msg("请输入正确的"+r+"!"),a.focus(),!1;a.isValid(function(t){if(t){var e={event:$(o).data("event")};e[i]=a.val(),n.api.sendcaptcha(o,i,e)}else Layer.msg("请确认已经输入了正确的"+r+"!")})}else{var s={event:$(o).data("event")};n.api.sendcaptcha(o,i,s,function(t,e){Layer.open({title:!1,area:["400px","430px"],content:"扫一扫关注公众号获取验证码
",type:1})})}return!1}),"ontouchstart"in document.documentElement||$("body").tooltip({selector:'[data-toggle="tooltip"]'}),$("body").popover({selector:'[data-toggle="popover"]'}),"ontouchstart"in document.documentElement){var e,i,o,a,r,s,l;l=$("body",document),l.on("touchstart",function(t){e=t.originalEvent.changedTouches[0].pageX,i=t.originalEvent.changedTouches[0].pageY}),l.on("touchend",function(t){o=t.originalEvent.changedTouches[0].pageX,a=t.originalEvent.changedTouches[0].pageY,r=o-e,s=a-i,r>45?Math.abs(r)-Math.abs(s)>50&&l.addClass("sidebar-open"):r<-45&&Math.abs(r)-Math.abs(s)>50&&l.removeClass("sidebar-open")})}$(document).on("click",".sidebar-toggle",function(){$("body").toggleClass("sidebar-open")})}};return n.api=$.extend(t.api,n.api),window.Template=e,window.Moment=i,window.Frontend=n,n.init(),n}),define("frontend-init",["frontend"],function(t){}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?e(require("../moment")):"function"==typeof define&&define.amd?define("moment/locale/zh-cn",["../moment"],e):e(t.moment)}(this,function(t){"use strict";return t.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(t,e){return 12===t&&(t=0),"凌晨"===e||"早上"===e||"上午"===e?t:"下午"===e||"晚上"===e?t+12:t>=11?t:t+12},meridiem:function(t,e,i){var n=100*t+e;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(t){return t.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(t){return this.week()!==t.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"周";default:return t}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}),function(t){"use strict";function e(t){var e=arguments,i=!0,n=1;return t=t.replace(/%s/g,function(){var t=e[n++];return void 0===t?(i=!1,""):t}),i?t:""}function i(e,i){var n=-1;return t.each(e,function(t,e){return e.field!==i||(n=t,!1)}),n}function n(){var e,i,n;return null===u&&(n=t("
").addClass("fixed-table-scroll-inner"),(e=t("
").addClass("fixed-table-scroll-outer")).append(n),t("body").append(e),i=n[0].offsetWidth,e.css("overflow","scroll"),i===(n=n[0].offsetWidth)&&(n=e[0].clientWidth),e.remove(),u=i-n),u}function o(i,n,o,a){var r,s=n;return"string"==typeof n&&(1<(r=n.split(".")).length?(s=window,t.each(r,function(t,e){s=s[e]})):s=window[n]),"object"==typeof s?s:"function"==typeof s?s.apply(i,o||[]):!s&&"string"==typeof n&&e.apply(this,[n].concat(o))?e.apply(this,[n].concat(o)):a}function a(e,i,n){var o,a=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(i);if(n&&a.length!==r.length)return!1;for(var s=0;s /g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):t}function s(t){for(var e in t){var i=e.split(/(?=[A-Z])/).join("-").toLowerCase();i!==e&&(t[i]=t[e],delete t[e])}return t}function l(t,e,i){var n=t;if("string"!=typeof e||t.hasOwnProperty(e))return i?r(t[e]):t[e];var o,a=e.split(".");for(o in a)a.hasOwnProperty(o)&&(n=n&&n[a[o]]);return i?r(n):n}function c(){return!!(0','
',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'':"",'','','
','
',this.options.formatLoadingMessage(),"
","
",'',"bottom"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'':"","
"," "].join("")),this.$container.insertAfter(this.$el),this.$tableContainer=this.$container.find(".fixed-table-container"),this.$tableHeader=this.$container.find(".fixed-table-header"),this.$tableBody=this.$container.find(".fixed-table-body"),this.$tableLoading=this.$container.find(".fixed-table-loading"),this.$tableFooter=this.$container.find(".fixed-table-footer"),this.$toolbar=this.$container.find(".fixed-table-toolbar"),this.$pagination=this.$container.find(".fixed-table-pagination"),this.$tableBody.append(this.$el),this.$container.after('
'),this.$el.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped"),-1!==t.inArray("table-no-bordered",this.options.classes.split(" "))&&this.$tableContainer.addClass("table-no-bordered")},d.prototype.initTable=function(){for(var e,i,n,o=this,a=[],r=[],l=(this.$header=this.$el.find(">thead"),this.$header.length||(this.$header=t(" ").appendTo(this.$el)),this.$header.find("tr").each(function(){var e=[];t(this).find("th").each(function(){void 0!==t(this).data("field")&&t(this).data("field",t(this).data("field")+""),e.push(t.extend({},{title:t(this).html(),class:t(this).attr("class"),titleTooltip:t(this).attr("title"),rowspan:t(this).attr("rowspan")?+t(this).attr("rowspan"):void 0,colspan:t(this).attr("colspan")?+t(this).attr("colspan"):void 0},t(this).data()))}),a.push(e)}),t.isArray(this.options.columns[0])||(this.options.columns=[this.options.columns]),this.options.columns=t.extend(!0,[],a,this.options.columns),this.columns=[],this.options.columns),c=0,u=[],p=0;ptbody>tr").each(function(i){var n={};n._id=t(this).attr("id"),n._class=t(this).attr("class"),n._data=s(t(this).data()),t(this).find(">td").each(function(a){for(var r,l,c=t(this),d=+c.attr("colspan")||1,u=+c.attr("rowspan")||1;e[i]&&e[i][a];a++);for(r=a;r"),0===a&&!i.options.cardView&&i.options.detailView&&o.push(e('
',i.options.columns.length)),t.each(s,function(t,a){var s,l,c,d="",u=e(' class="%s"',a.class),p=(i.options.sortOrder||a.order,"px"),h=a.width;if(void 0===a.width||i.options.cardView||"string"==typeof a.width&&-1!==a.width.indexOf("%")&&(p="%"),a.width&&"string"==typeof a.width&&(h=a.width.replace("%","").replace("px","")),s=e("text-align: %s; ",a.halign||a.align),l=e("text-align: %s; ",a.align),c=e("vertical-align: %s; ",a.valign),c+=e("width: %s; ",!a.checkbox&&!a.radio||h?h?h+p:void 0:"36px"),void 0!==a.fieldIndex){if(i.header.fields[a.fieldIndex]=a.field,i.header.styles[a.fieldIndex]=l+c,i.header.classes[a.fieldIndex]=u,i.header.formatters[a.fieldIndex]=a.formatter,i.header.events[a.fieldIndex]=a.events,i.header.sorters[a.fieldIndex]=a.sorter,i.header.sortNames[a.fieldIndex]=a.sortName,i.header.cellStyles[a.fieldIndex]=a.cellStyle,i.header.searchables[a.fieldIndex]=a.searchable,!a.visible)return;if(i.options.cardView&&!a.cardVisible)return;n[a.field]=a}o.push(""),o.push(e('',i.options.sortable&&a.sortable?"sortable both":"")),d=i.options.escape?r(a.title):a.title,a.checkbox&&(!i.options.singleSelect&&i.options.checkboxHeader&&(d=' '),i.header.stateField=a.field),a.radio&&(d="",i.header.stateField=a.field,i.options.singleSelect=!0),o.push(d),o.push("
"),o.push('
'),o.push(""),o.push(" ")}),o.push("")}),this.$header.html(o.join("")),this.$header.find("th[data-field]").each(function(e){t(this).data(n[t(this).data("field")])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(e){var n=t(this);if(i.options.detailView&&n.closest(".bootstrap-table")[0]!==i.$container[0])return!1;i.options.sortable&&n.parent().data().sortable&&i.onSort(e)}),this.$header.children().children().off("keypress").on("keypress",function(e){i.options.sortable&&t(this).data().sortable&&13==(e.keyCode||e.which)&&i.onSort(e)}),t(window).off("resize.bootstrap-table"),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$tableHeader.hide(),this.$tableLoading.css("top",0)):(this.$header.show(),this.$tableHeader.show(),this.$tableLoading.css("top",this.$header.outerHeight()+1),this.getCaret(),t(window).on("resize.bootstrap-table",t.proxy(this.resetWidth,this))),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$selectAll.off("click").on("click",function(){var e=t(this).prop("checked");i[e?"checkAll":"uncheckAll"](),i.updateSelected()})},d.prototype.initFooter=function(){!this.options.showFooter||this.options.cardView?this.$tableFooter.hide():this.$tableFooter.show()},d.prototype.initData=function(t,e){this.data="append"===e?this.data.concat(t):"prepend"===e?[].concat(t).concat(this.data):t||this.options.data,this.options.data="append"===e?this.options.data.concat(t):"prepend"===e?[].concat(t).concat(this.options.data):this.data,"server"!==this.options.sidePagination&&this.initSort()},d.prototype.initSort=function(){var i=this,n=this.options.sortName,a="desc"===this.options.sortOrder?-1:1,r=t.inArray(this.options.sortName,this.header.fields);this.options.customSort!==t.noop?this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]):-1!==r&&(this.options.sortStable&&t.each(this.data,function(t,e){e.hasOwnProperty("_position")||(e._position=t)}),this.data.sort(function(e,s){i.header.sortNames[r]&&(n=i.header.sortNames[r]);var c=l(e,n,i.options.escape),d=l(s,n,i.options.escape),u=o(i.header,i.header.sorters[r],[c,d]);return void 0!==u?a*u:(null==c&&(c=""),null==d&&(d=""),i.options.sortStable&&c===d&&(c=e._position,d=s._position),t.isNumeric(c)&&t.isNumeric(d)?(c=parseFloat(c))<(d=parseFloat(d))?-1*a:a:c===d?0:-1===(c="string"!=typeof c?c.toString():c).localeCompare(d)?-1*a:a)}),void 0!==this.options.sortClass)&&(clearTimeout(0),setTimeout(function(){i.$el.removeClass(i.options.sortClass);var t=i.$header.find(e('[data-field="%s"]',i.options.sortName).index()+1);i.$el.find(e("tr td:nth-child(%s)",t)).addClass(i.options.sortClass)},250))},d.prototype.onSort=function(e){var e="keypress"===e.type?t(e.currentTarget):t(e.currentTarget).parent(),i=this.$header.find("th").eq(e.index());this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===e.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=e.data("field"),this.options.sortOrder="asc"===e.data("order")?"desc":"asc"),this.trigger("sort",this.options.sortName,this.options.sortOrder),e.add(i).data("order",this.options.sortOrder),this.getCaret(),"server"===this.options.sidePagination?this.initServer(this.options.silentSort):(this.initSort(),this.initBody())},d.prototype.initToolbar=function(){var i,n=this,a=[],r=0,s=0;this.$toolbar.find(".bs-bars").children().length&&t("body").append(t(this.options.toolbar)),this.$toolbar.html(""),"string"!=typeof this.options.toolbar&&"object"!=typeof this.options.toolbar||t(e('
',this.options.toolbarAlign)).appendTo(this.$toolbar).append(t(this.options.toolbar)),a=[e('',this.options.buttonsAlign,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=o(null,this.options.icons)),this.options.showPaginationSwitch&&a.push(e('
',this.options.formatPaginationSwitch()),e(' ',this.options.iconsPrefix,this.options.icons.paginationSwitchDown)," "),this.options.showRefresh&&a.push(e('
',this.options.formatRefresh()),e(' ',this.options.iconsPrefix,this.options.icons.refresh)," "),this.options.showToggle&&a.push(e('
',this.options.formatToggle()),e(' ',this.options.iconsPrefix,this.options.icons.toggle)," "),this.options.showColumns&&(a.push(e('
',this.options.formatColumns()),'',e(' ',this.options.iconsPrefix,this.options.icons.columns),' '," ",'","
")),a.push("
"),(this.showToolbar||2',e(' ',this.options.formatSearch())," "),this.$toolbar.append(a.join("")),(i=this.$toolbar.find(".search input")).off("keyup drop blur").on("keyup drop blur",function(e){n.options.searchOnEnterKey&&13!==e.keyCode||-1
this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),d.push('",'")}this.$pagination.html(d.join("")),this.options.onlyInfoPagination||(p=this.$pagination.find(".page-list a"),o=this.$pagination.find(".page-first"),a=this.$pagination.find(".page-pre"),r=this.$pagination.find(".page-next"),s=this.$pagination.find(".page-last"),l=this.$pagination.find(".page-number"),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(h.length<2||this.options.totalRows<=h[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),this.options.paginationLoop||(1===this.options.pageNumber&&a.addClass("disabled"),this.options.pageNumber===this.totalPages&&r.addClass("disabled")),u&&(this.options.pageSize=this.options.formatAllRows()),p.off("click").on("click",t.proxy(this.onPageListChange,this)),o.off("click").on("click",t.proxy(this.onPageFirst,this)),a.off("click").on("click",t.proxy(this.onPagePre,this)),r.off("click").on("click",t.proxy(this.onPageNext,this)),s.off("click").on("click",t.proxy(this.onPageLast,this)),l.off("click").on("click",t.proxy(this.onPageNumber,this)))}else this.$pagination.hide()},d.prototype.updatePagination=function(e){e&&t(e.currentTarget).hasClass("disabled")||(this.options.maintainSelected||this.resetRows(),this.initPagination(),"server"===this.options.sidePagination?this.initServer():this.initBody(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize))},d.prototype.onPageListChange=function(e){var i=t(e.currentTarget);return i.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=i.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+i.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(e),!1},d.prototype.onPageFirst=function(t){return this.options.pageNumber=1,this.updatePagination(t),!1},d.prototype.onPagePre=function(t){return this.options.pageNumber-1==0?this.options.pageNumber=this.options.totalPages:this.options.pageNumber--,this.updatePagination(t),!1},d.prototype.onPageNext=function(t){return this.options.pageNumber+1>this.options.totalPages?this.options.pageNumber=1:this.options.pageNumber++,this.updatePagination(t),!1},d.prototype.onPageLast=function(t){return this.options.pageNumber=this.totalPages,this.updatePagination(t),!1},d.prototype.onPageNumber=function(e){if(this.options.pageNumber!==+t(e.currentTarget).text())return this.options.pageNumber=+t(e.currentTarget).text(),this.updatePagination(e),!1},d.prototype.initRow=function(i,n,a,s){var c,d=this,u=[],p={},h=[],f="",m={},g=[];if(!(-1"),this.options.cardView&&u.push(e('',this.header.fields.length)),!this.options.cardView&&this.options.detailView&&u.push("
",'',e(' ',this.options.iconsPrefix,this.options.icons.detailOpen)," "," "),t.each(this.header.fields,function(a,s){var c="",f=l(i,s,d.options.escape),m="",g={},v="",y=d.header.classes[a],b="",x="",w="",_="",k=d.columns[a];if((!d.fromHtml||void 0!==f)&&k.visible&&(!d.options.cardView||k.cardVisible)){if(k.escape&&(f=r(f)),p=e('style="%s"',h.concat(d.header.styles[a]).join("; ")),i["_"+s+"_id"]&&(v=e(' id="%s"',i["_"+s+"_id"])),i["_"+s+"_class"]&&(y=e(' class="%s"',i["_"+s+"_class"])),i["_"+s+"_rowspan"]&&(x=e(' rowspan="%s"',i["_"+s+"_rowspan"])),i["_"+s+"_colspan"]&&(w=e(' colspan="%s"',i["_"+s+"_colspan"])),i["_"+s+"_title"]&&(_=e(' title="%s"',i["_"+s+"_title"])),(g=o(d.header,d.header.cellStyles[a],[f,i,n,s],g)).classes&&(y=e(' class="%s"',g.classes)),g.css){var C,S=[];for(C in g.css)S.push(C+": "+g.css[C]);p=e('style="%s"',S.concat(d.header.styles[a]).join("; "))}var T,D,$,E,F,m=o(k,d.header.formatters[a],[f,i,n],f);i["_"+s+"_data"]&&!t.isEmptyObject(i["_"+s+"_data"])&&t.each(i["_"+s+"_data"],function(t,i){"index"!==t&&(b+=e(' data-%s="%s"',t,i))}),k.checkbox||k.radio?(T=k.checkbox?"checkbox":"",T=k.radio?"radio":T,c=[e(d.options.cardView?'
':'
',k.class||"")," ",d.header.formatters[a]&&"string"==typeof m?m:"",d.options.cardView?"":" "].join(""),i[d.header.stateField]=!0===m||m&&m.checked):(m=null==m?d.options.undefinedText:m,c=(d.options.cardView?['
',d.options.showHeader?e('%s ',p,(T=d.columns,D="field",$="title",E=s,F="",t.each(T,function(t,e){return e[D]!==E||(F=e[$],!1)}),F)):"",e('%s ',m),"
"]:[e("
",v,y,p,b,x,w,_),m," "]).join(""),d.options.cardView&&d.options.smartDisplay&&""===m&&(c='
')),u.push(c)}}),this.options.cardView&&u.push("
"),u.push(""),u.join(" ")}},d.prototype.initBody=function(n){for(var a=this,r=this.getData(),s=(this.trigger("pre-body",r),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=t(" ").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=r.length),t(document.createDocumentFragment())),c=this.pageFrom-1;c'+e('%s ',this.$header.find("th").length,this.options.formatNoMatches())+""),this.$body.html(s),n||this.scrollTo(0),this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(n){var o=t(this),r=o.parent(),s=a.data[r.data("index")],c=o[0].cellIndex,c=a.getVisibleFields()[a.options.detailView&&!a.options.cardView?c-1:c],d=a.columns[i(a.columns,c)],u=l(s,c,a.options.escape);o.find(".detail-icon").length||(a.trigger("click"===n.type?"click-cell":"dbl-click-cell",c,u,s,o),a.trigger("click"===n.type?"click-row":"dbl-click-row",s,r,c),"click"===n.type&&a.options.clickToSelect&&d.clickToSelect&&(u=r.find(e('[name="%s"]',a.options.selectItemName))).length&&u[0].click())}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var i=t(this),n=i.parent().parent(),s=n.data("index"),l=r[s];return n.next().is("tr.detail-view")?(i.find("i").attr("class",e("%s %s",a.options.iconsPrefix,a.options.icons.detailOpen)),a.trigger("collapse-row",s,l),n.next().remove()):(i.find("i").attr("class",e("%s %s",a.options.iconsPrefix,a.options.icons.detailClose)),n.after(e(' ',n.find("td").length)),i=n.next().find("td"),n=o(a.options,a.options.detailFormatter,[s,l,i],""),1===i.length&&i.append(n),a.trigger("expand-row",s,l,i)),a.resetView(),!1}),this.$selectItem=this.$body.find(e('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(e){e.stopImmediatePropagation();var e=t(this),i=e.prop("checked"),n=a.data[e.data("index")];a.options.maintainSelected&&t(this).is(":radio")&&t.each(a.options.data,function(t,e){e[a.header.stateField]=!1}),n[a.header.stateField]=i,a.options.singleSelect&&(a.$selectItem.not(this).each(function(){a.data[t(this).data("index")][a.header.stateField]=!1}),a.$selectItem.filter(":checked").not(this).prop("checked",!1)),a.updateSelected(),a.trigger(i?"check":"uncheck",n,e)}),t.each(this.header.events,function(e,i){if(i){"string"==typeof i&&(i=o(null,i));var n,r=a.header.fields[e],s=t.inArray(r,a.getVisibleFields());for(n in a.options.detailView&&!a.options.cardView&&(s+=1),i)a.$body.find(">tr:not(.no-records-found)").each(function(){var e=t(this),o=e.find(a.options.cardView?".card-view":">td").eq(s),l=n.indexOf(" "),c=n.substring(0,l),l=n.substring(l+1),d=i[n];o.find(l).off(c).on(c,function(t){var i=e.data("index"),n=a.data[i],o=n[r],s=r.split(".");if(1o.clientWidth&&o.scrollHeight>o.clientHeight+this.$header.outerHeight()?n():0,this.$el.css("margin-top",-this.$header.outerHeight()),0<(i=t(":focus")).length&&0<(i=i.parents("th")).length&&void 0!==(i=i.attr("data-field"))&&0<(i=this.$header.find("[data-field='"+i+"']")).length&&i.find(":input").addClass("focus-temp"),this.$header_=this.$header.clone(!0,!0),this.$selectAll_=this.$header_.find('[name="btSelectAll"]'),this.$tableHeader.css({"margin-right":o}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_),0<(i=t(".focus-temp:visible:eq(0)")).length&&(i.focus(),this.$header.find(".focus-temp").removeClass("focus-temp")),this.$header.find("th[data-field]").each(function(i){s.$header_.find(e('th[data-field="%s"]',t(this).data("field"))).data(t(this).data())}),a=this.getVisibleFields(),r=this.$header_.find("th"),this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(i){var n=t(this),o=i,i=(s.options.detailView&&!s.options.cardView&&(0===i&&s.$header_.find("th.detail").find(".fht-cell").width(n.innerWidth()),o=i-1),s.$header_.find(e('th[data-field="%s"]',a[o])));(i=1
'),t.each(this.columns,function(t,r){var s,l,c,d,u=[],p=e(' class="%s"',r.class);if(r.visible&&(!i.options.cardView||r.cardVisible)){if(l=e("text-align: %s; ",r.falign||r.align),c=e("vertical-align: %s; ",r.valign),(d=o(null,i.options.footerStyle))&&d.css)for(s in d.css)u.push(s+": "+d.css[s]);a.push(""),a.push(''),a.push(o(r,r.footerFormatter,[n]," ")||" "),a.push("
"),a.push('
'),a.push(""),a.push(" ")}}),this.$tableFooter.find("tr").html(a.join("")),this.$tableFooter.show(),clearTimeout(this.timeoutFooter_),this.timeoutFooter_=setTimeout(t.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0))},d.prototype.fitFooter=function(){var e,i,o;clearTimeout(this.timeoutFooter_),this.$el.is(":hidden")?this.timeoutFooter_=setTimeout(t.proxy(this.fitFooter,this),100):(o=(i=this.$el.css("width"))>this.$tableBody.width()?n():0,this.$tableFooter.css({"margin-right":o}).find("table").css("width",i).attr("class",this.$el.attr("class")),e=this.$tableFooter.find("td"),this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(i){var n=t(this);e.eq(i).find(".fht-cell").width(n.innerWidth())}))},d.prototype.toggleColumn=function(t,i,n){var o;-1!==t&&(this.columns[t].visible=i,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)&&(o=this.$toolbar.find(".keep-open input").prop("disabled",!1),n&&o.filter(e('[value="%s"]',t)).prop("checked",i),o.filter(":checked").length<=this.options.minimumCountColumns)&&o.filter(":checked").prop("disabled",!0)},d.prototype.getVisibleFields=function(){var e=this,n=[];return t.each(this.header.fields,function(t,o){e.columns[i(e.columns,o)].visible&&n.push(o)}),n},d.prototype.resetView=function(t){var e,i=0;t&&t.height&&(this.options.height=t.height),this.$selectAll.prop("checked",0tr");if(this.options.detailView&&!this.options.cardView&&(a+=1),e=l.eq(o).find(">td").eq(a),!(o<0||a<0||o>=this.data.length)){for(i=o;itd").eq(n).hide();e.attr("rowspan",r).attr("colspan",s).show()}},d.prototype.updateCell=function(t){t.hasOwnProperty("index")&&t.hasOwnProperty("field")&&t.hasOwnProperty("value")&&(this.data[t.index][t.field]=t.value,!1!==t.reinit)&&(this.initSort(),this.initBody(!0))},d.prototype.getOptions=function(){return this.options},d.prototype.getSelections=function(){var e=this;return t.grep(this.options.data,function(t){return!0===t[e.header.stateField]})},d.prototype.getAllSelections=function(){var e=this;return t.grep(this.options.data,function(t){return t[e.header.stateField]})},d.prototype.checkAll=function(){this.checkAll_(!0)},d.prototype.uncheckAll=function(){this.checkAll_(!1)},d.prototype.checkInvert=function(){var e=this,i=e.$selectItem.filter(":enabled"),n=i.filter(":checked");i.each(function(){t(this).prop("checked",!t(this).prop("checked"))}),e.updateRows(),e.updateSelected(),e.trigger("uncheck-some",n),n=e.getSelections(),e.trigger("check-some",n)},d.prototype.checkAll_=function(t){var e;t||(e=this.getSelections()),this.$selectAll.add(this.$selectAll_).prop("checked",t),this.$selectItem.filter(":enabled").prop("checked",t),this.updateRows(),t&&(e=this.getSelections()),this.trigger(t?"check-all":"uncheck-all",e)},d.prototype.check=function(t){this.check_(!0,t)},d.prototype.uncheck=function(t){this.check_(!1,t)},d.prototype.check_=function(t,i){var n=this.$selectItem.filter(e('[data-index="%s"]',i)).prop("checked",t);this.data[i][this.header.stateField]=t,this.updateSelected(),this.trigger(t?"check":"uncheck",this.data[i],n)},d.prototype.checkBy=function(t){this.checkBy_(!0,t)},d.prototype.uncheckBy=function(t){this.checkBy_(!1,t)},d.prototype.checkBy_=function(i,n){var o,a;n.hasOwnProperty("field")&&n.hasOwnProperty("values")&&(a=[],t.each((o=this).options.data,function(r,s){if(!s.hasOwnProperty(n.field))return!1;-1!==t.inArray(s[n.field],n.values)&&(r=o.$selectItem.filter(":enabled").filter(e('[data-index="%s"]',r)).prop("checked",i),s[o.header.stateField]=i,a.push(s),o.trigger(i?"check":"uncheck",s,r))}),this.updateSelected(),this.trigger(i?"check-some":"uncheck-some",a))},d.prototype.destroy=function(){this.$el.insertBefore(this.$container),t(this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")},d.prototype.showLoading=function(){this.$tableLoading.show()},d.prototype.hideLoading=function(){this.$tableLoading.hide()},d.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var t=this.$toolbar.find('button[name="paginationSwitch"] i');this.options.pagination?t.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown):t.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp),this.updatePagination()},d.prototype.refresh=function(t){t&&t.url&&(this.options.url=t.url),t&&t.pageNumber&&(this.options.pageNumber=t.pageNumber),t&&t.pageSize&&(this.options.pageSize=t.pageSize),this.initServer(t&&t.silent,t&&t.query,t&&t.url),this.trigger("refresh",t)},d.prototype.resetWidth=function(){this.options.showHeader&&this.options.height&&this.fitHeader(),this.options.showFooter&&this.fitFooter()},d.prototype.showColumn=function(t){this.toggleColumn(i(this.columns,t),!0,!0)},d.prototype.hideColumn=function(t){this.toggleColumn(i(this.columns,t),!1,!0)},d.prototype.getHiddenColumns=function(){return t.grep(this.columns,function(t){return!t.visible})},d.prototype.getVisibleColumns=function(){return t.grep(this.columns,function(t){return t.visible})},d.prototype.toggleAllColumns=function(e){var i;t.each(this.columns,function(t,i){this.columns[t].visible=e}),this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns&&(i=this.$toolbar.find(".keep-open input").prop("disabled",!1)).filter(":checked").length<=this.options.minimumCountColumns&&i.filter(":checked").prop("disabled",!0)},d.prototype.showAllColumns=function(){this.toggleAllColumns(!0)},d.prototype.hideAllColumns=function(){this.toggleAllColumns(!1)},d.prototype.filterBy=function(e){this.filterColumns=t.isEmptyObject(e)?{}:e,this.options.pageNumber=1,this.initSearch(),this.updatePagination()},d.prototype.scrollTo=function(t){if("number"==typeof(t="string"==typeof t?"bottom"===t?this.$tableBody[0].scrollHeight:0:t)&&this.$tableBody.scrollTop(t),void 0===t)return this.$tableBody.scrollTop()},d.prototype.getScrollPosition=function(){return this.scrollTo()},d.prototype.selectPage=function(t){0 tr[data-index="%s"]',i)),i.next().is("tr.detail-view")===!t&&i.find("> td > .detail-icon").click()},d.prototype.expandRow=function(t){this.expandRow_(!0,t)},d.prototype.collapseRow=function(t){this.expandRow_(!1,t)
+},d.prototype.expandAllRows=function(i){if(i){var i=this.$body.find(e('> tr[data-index="%s"]',0)),n=this,o=null,a=!1,r=-1;if(i.next().is("tr.detail-view")?i.next().next().is("tr.detail-view")||(i.next().find(".detail-icon").click(),a=!0):(i.find("> td > .detail-icon").click(),a=!0),a)try{r=setInterval(function(){0<(o=n.$body.find("tr.detail-view").last().find(".detail-icon")).length?o.click():clearInterval(r)},1)}catch(i){clearInterval(r)}}else for(var s=this.$body.children(),l=0;l.btn-group")).find("div.export").length&&(a=t(['','',e(' ',this.options.iconsPrefix,this.options.icons.export),' '," ",'","
"].join("")).appendTo(r).find(".dropdown-menu"),s=this.options.exportTypes,"string"==typeof this.options.exportTypes&&(r=this.options.exportTypes.slice(1,-1).replace(/ /g,"").split(","),s=[],t.each(r,function(t,e){s.push(e.slice(1,-1))})),t.each(s,function(t,e){i.hasOwnProperty(e)&&a.append(['','',i[e]," "," "].join(""))}),a.find("li").click(function(){var e=this;if("function"!=typeof require)throw new Error("RequireJS not found");require(["tableexport"],function(){function i(){n.$el.tableExport(t.extend({},n.options.exportOptions,{type:s,escape:!1}))}var o,a,r,s=t(e).data("type");"all"===n.options.exportDataType&&n.options.pagination?(n.$el.one("server"===n.options.sidePagination?"post-body.bs.table":"page-change.bs.table",function(){i(),n.togglePagination()}),n.togglePagination()):"selected"===n.options.exportDataType?(o=n.getData(),r=n.getAllSelections(),"server"===n.options.sidePagination&&((o={total:n.options.totalRows})[n.options.dataField]=n.getData(),a="function"==typeof require?require("table"):null,(r={total:n.options.totalRows})[n.options.dataField]=a&&n.options.maintainSelected?a.api.selecteddata(n.$el):n.getAllSelections()),n.load(r),i(),n.load(o)):i()})}))}}(jQuery),define("bootstrap-table-export",["bootstrap-table"],function(t){return function(){return t.$.fn.bootstrapTable.defaults}}(this)),function(t){"function"==typeof define&&define.amd?define("dropzone",["jquery"],t):t(jQuery)}(function(t){function e(t){"@babel/helpers - typeof";return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,i){return!i||"object"!==e(i)&&"function"!=typeof i?o(t):i}function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var i=0;i1?i-1:0),o=1;o '),this.element.appendChild(t));var l=t.getElementsByTagName("span")[0];return l&&(null!=l.textContent?l.textContent=this.options.dictFallbackMessage:null!=l.innerText&&(l.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t,e,i,n){var o={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},a=t.width/t.height;null==e&&null==i?(e=o.srcWidth,i=o.srcHeight):null==e?e=i*a:null==i&&(i=e/a),e=Math.min(e,o.srcWidth),i=Math.min(i,o.srcHeight);var r=e/i;if(o.srcWidth>e||o.srcHeight>i)if("crop"===n)a>r?(o.srcHeight=t.height,o.srcWidth=o.srcHeight*r):(o.srcWidth=t.width,o.srcHeight=o.srcWidth/r);else{if("contain"!==n)throw new Error("Unknown resizeMethod '".concat(n,"'"));a>r?i=e/a:e=i*a}return o.srcX=(t.width-o.srcWidth)/2,o.srcY=(t.height-o.srcHeight)/2,o.trgWidth=e,o.trgHeight=i,o},transformFile:function(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:'
\n
\n
\n
\n
\n
\n
\n Check \n \n \n \n \n
\n
\n
\n Error \n \n \n \n \n \n \n
\n
',drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:function(t){},dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:function(t){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var i=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){t.previewElement=e.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement);var n=!0,o=!1,a=void 0;try{for(var r,s=t.previewElement.querySelectorAll("[data-dz-name]")[Symbol.iterator]();!(n=(r=s.next()).done);n=!0){var l=r.value;l.textContent=t.name}}catch(t){o=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}var c=!0,d=!1,u=void 0;try{for(var p,h=t.previewElement.querySelectorAll("[data-dz-size]")[Symbol.iterator]();!(c=(p=h.next()).done);c=!0)l=p.value,l.innerHTML=this.filesize(t.size)}catch(t){d=!0,u=t}finally{try{c||null==h.return||h.return()}finally{if(d)throw u}}this.options.addRemoveLinks&&(t._removeLink=e.createElement('
'.concat(this.options.dictRemoveFile," ")),t.previewElement.appendChild(t._removeLink));var f=function(n){return n.preventDefault(),n.stopPropagation(),t.status===e.UPLOADING?e.confirm(i.options.dictCancelUploadConfirmation,function(){return i.removeFile(t)}):i.options.dictRemoveFileConfirmation?e.confirm(i.options.dictRemoveFileConfirmation,function(){return i.removeFile(t)}):i.removeFile(t)},m=!0,g=!1,v=void 0;try{for(var y,b=t.previewElement.querySelectorAll("[data-dz-remove]")[Symbol.iterator]();!(m=(y=b.next()).done);m=!0){y.value.addEventListener("click",f)}}catch(t){g=!0,v=t}finally{try{m||null==b.return||b.return()}finally{if(g)throw v}}}},removedfile:function(t){return null!=t.previewElement&&null!=t.previewElement.parentNode&&t.previewElement.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){if(t.previewElement){t.previewElement.classList.remove("dz-file-preview");var i=!0,n=!1,o=void 0;try{for(var a,r=t.previewElement.querySelectorAll("[data-dz-thumbnail]")[Symbol.iterator]();!(i=(a=r.next()).done);i=!0){var s=a.value;s.alt=t.name,s.src=e}}catch(t){n=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(n)throw o}}return setTimeout(function(){return t.previewElement.classList.add("dz-image-preview")},1)}},error:function(t,e){if(t.previewElement){t.previewElement.classList.add("dz-error"),"String"!=typeof e&&e.error&&(e=e.error);var i=!0,n=!1,o=void 0;try{for(var a,r=t.previewElement.querySelectorAll("[data-dz-errormessage]")[Symbol.iterator]();!(i=(a=r.next()).done);i=!0){a.value.textContent=e}}catch(t){n=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(n)throw o}}}},errormultiple:function(){},processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(t,e,i){if(t.previewElement){var n=!0,o=!1,a=void 0;try{for(var r,s=t.previewElement.querySelectorAll("[data-dz-uploadprogress]")[Symbol.iterator]();!(n=(r=s.next()).done);n=!0){var l=r.value;"PROGRESS"===l.nodeName?l.value=e:l.style.width="".concat(e,"%")}}catch(t){o=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(t){return this.emit("error",t,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(t){if(t._removeLink&&(t._removeLink.innerHTML=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n
'.concat(this.options.dictDefaultMessage," "))),this.clickableElements.length){!function i(){return t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null===t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!==t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!==t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",e.getElement(t.options.hiddenInputContainer,"hiddenInputContainer").appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",function(){var e=t.hiddenFileInput.files;if(e.length){var n=!0,o=!1,a=void 0;try{for(var r,s=e[Symbol.iterator]();!(n=(r=s.next()).done);n=!0){var l=r.value;t.addFile(l)}}catch(t){o=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}}return t.emit("addedfiles",e),i()})}()}this.URL=null!==window.URL?window.URL:window.webkitURL;var i=!0,n=!1,o=void 0;try{for(var a,r=this.events[Symbol.iterator]();!(i=(a=r.next()).done);i=!0){var s=a.value;this.on(s,this.options[s])}}catch(t){n=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(n)throw o}}this.on("uploadprogress",function(){return t.updateTotalUploadProgress()}),this.on("removedfile",function(){return t.updateTotalUploadProgress()}),this.on("canceled",function(e){return t.emit("complete",e)}),this.on("complete",function(e){if(0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length)return setTimeout(function(){return t.emit("queuecomplete")},0)});var l=function(t){return t.dataTransfer.types&&t.dataTransfer.types.some(function(t){return"Files"==t})},c=function(t){if(l(t))return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(e){return t.emit("dragstart",e)},dragenter:function(e){return c(e),t.emit("dragenter",e)},dragover:function(e){var i;try{i=e.dataTransfer.effectAllowed}catch(t){}return e.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy",c(e),t.emit("dragover",e)},dragleave:function(e){return t.emit("dragleave",e)},drop:function(e){return c(e),t.drop(e)},dragend:function(e){return t.emit("dragend",e)}}}],this.clickableElements.forEach(function(i){return t.listeners.push({element:i,events:{click:function(n){return(i!==t.element||n.target===t.element||e.elementInside(n.target,t.element.querySelector(".dz-message")))&&t.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,e.instances.splice(e.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var t,e=0,i=0;if(this.getActiveFiles().length){var n=!0,o=!1,a=void 0;try{for(var r,s=this.getActiveFiles()[Symbol.iterator]();!(n=(r=s.next()).done);n=!0){var l=r.value;e+=l.upload.bytesSent,i+=l.upload.total}}catch(t){o=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}t=100*e/i}else t=100;return this.emit("totaluploadprogress",t,i,e)}},{key:"_getParamName",value:function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(t,"]"):"")}},{key:"_renameFile",value:function(t){return"function"!=typeof this.options.renameFile?t.name:this.options.renameFile(t)}},{key:"getFallbackForm",value:function(){var t,i;if(t=this.getExistingFallback())return t;var n='');var o=e.createElement(n);return"FORM"!==this.element.tagName?(i=e.createElement('')),i.appendChild(o)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=i?i:o}},{key:"getExistingFallback",value:function(){for(var t=0,e=["div","form"];t0){for(var n=["tb","gb","mb","kb","b"],o=0;o=Math.pow(this.options.filesizeBase,4-o)/10){e=t/Math.pow(this.options.filesizeBase,4-o),i=a;break}}e=Math.round(10*e)/10}return"".concat(e," ").concat(this.options.dictFileSizeUnits[i])}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(t){if(t.dataTransfer){this.emit("drop",t);for(var e=[],i=0;i0){var o=!0,a=!1,r=void 0;try{for(var s,l=n[Symbol.iterator]();!(o=(s=l.next()).done);o=!0){var c=s.value;c.isFile?c.file(function(t){if(!i.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath="".concat(e,"/").concat(t.name),i.addFile(t)}):c.isDirectory&&i._addFilesFromDirectory(c,"".concat(e,"/").concat(c.name))}}catch(t){a=!0,r=t}finally{try{
+o||null==l.return||l.return()}finally{if(a)throw r}}t()}return null},o)}()}},{key:"accept",value:function(t,i){this.options.maxFilesize&&t.size>1024*this.options.maxFilesize*1024?i(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):e.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(i(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,i):i(this.options.dictInvalidFileType)}},{key:"addFile",value:function(t){var i=this;t.upload={uuid:e.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t)},this.files.push(t),t.status=e.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,function(e){e?(t.accepted=!1,i._errorProcessing([t],e)):(t.accepted=!0,i.options.autoQueue&&i.enqueueFile(t)),i._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(t){var e=!0,i=!1,n=void 0;try{for(var o,a=t[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var r=o.value;this.enqueueFile(r)}}catch(t){i=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(i)throw n}}return null}},{key:"enqueueFile",value:function(t){var i=this;if(t.status!==e.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=e.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return i.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(t){var e=this;if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout(function(){return e._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var t=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(i){return t.emit("thumbnail",e,i),t._processingThumbnail=!1,t._processThumbnailQueue()})}}},{key:"removeFile",value:function(t){if(t.status===e.UPLOADING&&this.cancelUpload(t),this.files=m(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(t){null==t&&(t=!1);var i=!0,n=!1,o=void 0;try{for(var a,r=this.files.slice()[Symbol.iterator]();!(i=(a=r.next()).done);i=!0){var s=a.value;(s.status!==e.UPLOADING||t)&&this.removeFile(s)}}catch(t){n=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(n)throw o}}return null}},{key:"resizeImage",value:function(t,i,n,o,a){var r=this;return this.createThumbnail(t,i,n,o,!0,function(i,n){if(null==n)return a(t);var o=r.options.resizeMimeType;null==o&&(o=t.type);var s=n.toDataURL(o,r.options.resizeQuality);return"image/jpeg"!==o&&"image/jpg"!==o||(s=b.restore(t.dataURL,s)),a(e.dataURItoBlob(s))})}},{key:"createThumbnail",value:function(t,e,i,n,o,a){var r=this,s=new FileReader;s.onload=function(){if(t.dataURL=s.result,"image/svg+xml"===t.type)return void(null!=a&&a(s.result));r.createThumbnailFromUrl(t,e,i,n,o,a)},s.readAsDataURL(t)}},{key:"displayExistingFile",value:function(t,e,i,n){var o=this,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this.emit("addedfile",t),this.emit("complete",t),a){var r=function(e){o.emit("thumbnail",t,e),i&&i()};t.dataURL=e,this.createThumbnailFromUrl(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.resizeMethod,this.options.fixOrientation,r,n)}else this.emit("thumbnail",t,e),i&&i()}},{key:"createThumbnailFromUrl",value:function(t,e,i,n,o,a,r){var s=this,l=document.createElement("img");return r&&(l.crossOrigin=r),l.onload=function(){var r=function(t){return t(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&o&&(r=function(t){return EXIF.getData(l,function(){return t(EXIF.getTag(this,"Orientation"))})}),r(function(o){t.width=l.width,t.height=l.height;var r=s.options.resize.call(s,t,e,i,n),c=document.createElement("canvas"),d=c.getContext("2d");switch(c.width=r.trgWidth,c.height=r.trgHeight,o>4&&(c.width=r.trgHeight,c.height=r.trgWidth),o){case 2:d.translate(c.width,0),d.scale(-1,1);break;case 3:d.translate(c.width,c.height),d.rotate(Math.PI);break;case 4:d.translate(0,c.height),d.scale(1,-1);break;case 5:d.rotate(.5*Math.PI),d.scale(1,-1);break;case 6:d.rotate(.5*Math.PI),d.translate(0,-c.width);break;case 7:d.rotate(.5*Math.PI),d.translate(c.height,-c.width),d.scale(-1,1);break;case 8:d.rotate(-.5*Math.PI),d.translate(-c.height,0)}y(d,l,null!=r.srcX?r.srcX:0,null!=r.srcY?r.srcY:0,r.srcWidth,r.srcHeight,null!=r.trgX?r.trgX:0,null!=r.trgY?r.trgY:0,r.trgWidth,r.trgHeight);var u=c.toDataURL("image/png");if(null!=a)return a(u,c)})},null!=a&&(l.onerror=a),l.src=t.dataURL}},{key:"processQueue",value:function(){var t=this.options.parallelUploads,e=this.getUploadingFiles().length,i=e;if(!(e>=t)){var n=this.getQueuedFiles();if(n.length>0){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,t-e));for(;i1?e-1:0),n=1;ni.options.chunkSize),t[0].upload.totalChunkCount=Math.ceil(o.size/i.options.chunkSize)}if(t[0].upload.chunked){var a=t[0],r=n[0],s=0;a.upload.chunks=[];var l=function(){for(var n=0;void 0!==a.upload.chunks[n];)n++;if(!(n>=a.upload.totalChunkCount)){s++;var o=n*i.options.chunkSize,l=Math.min(o+i.options.chunkSize,a.size),c={name:i._getParamName(0),data:r.webkitSlice?r.webkitSlice(o,l):r.slice(o,l),filename:a.upload.filename,chunkIndex:n};a.upload.chunks[n]={file:a,index:n,dataBlock:c,status:e.UPLOADING,progress:0,retries:0},i._uploadData(t,[c])}};if(a.upload.finishedChunkUpload=function(n,o){var r=!0;n.status=e.SUCCESS,i.options.chunkSuccess.call(i,n,a,o),n.dataBlock=null,n.xhr=null;for(var s=0;s=r;s?a++:a--)o[a]=e.charCodeAt(a);return new Blob([n],{type:i})};var m=function(t,e){return t.filter(function(t){return t!==e}).map(function(t){return t})},g=function(t){return t.replace(/[\-_](\w)/g,function(t){return t.charAt(1).toUpperCase()})};f.createElement=function(t){var e=document.createElement("div");return e.innerHTML=t,e.childNodes[0]},f.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},f.getElement=function(t,e){var i;if("string"==typeof t?i=document.querySelector(t):null!=t.nodeType&&(i=t),null==i)throw new Error("Invalid `".concat(e,"` option provided. Please provide a CSS selector or a plain HTML element."));return i},f.getElements=function(t,e){var i,n;if(t instanceof Array){n=[];try{var o=!0,a=!1,r=void 0;try{for(var s,l=t[Symbol.iterator]();!(o=(s=l.next()).done);o=!0)i=s.value,n.push(this.getElement(i,e))}catch(t){a=!0,r=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw r}}}catch(t){n=null}}else if("string"==typeof t){n=[];var c=!0,d=!1,u=void 0;try{for(var p,h=document.querySelectorAll(t)[Symbol.iterator]();!(c=(p=h.next()).done);c=!0)i=p.value,n.push(i)}catch(t){d=!0,u=t}finally{try{c||null==h.return||h.return()}finally{if(d)throw u}}}else null!=t.nodeType&&(n=[t]);if(null==n||!n.length)throw new Error("Invalid `".concat(e,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return n},f.confirm=function(t,e,i){return window.confirm(t)?e():null!=i?i():void 0},f.isValidFile=function(t,e){if(!e)return!0;e=e.split(",");var i=t.type,n=i.replace(/\/.*$/,""),o=!0,a=!1,r=void 0;try{for(var s,l=e[Symbol.iterator]();!(o=(s=l.next()).done);o=!0){var c=s.value;if(c=c.trim(),"."===c.charAt(0)){if(-1!==t.name.toLowerCase().indexOf(c.toLowerCase(),t.name.length-c.length))return!0}else if(/\/\*$/.test(c)){if(n===c.replace(/\/.*$/,""))return!0}else if(i===c)return!0}}catch(t){a=!0,r=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw r}}return!1},void 0!==t&&null!==t&&(t.fn.dropzone=function(t){return this.each(function(){return new f(this,t)})}),void 0!==p&&null!==p?p.exports=f:window.Dropzone=f,f.ADDED="added",f.QUEUED="queued",f.ACCEPTED=f.QUEUED,f.UPLOADING="uploading",f.PROCESSING=f.UPLOADING,f.CANCELED="canceled",f.ERROR="error",f.SUCCESS="success";var v=function(t){var e=(t.naturalWidth,t.naturalHeight),i=document.createElement("canvas");i.width=1,i.height=e;var n=i.getContext("2d");n.drawImage(t,0,0);for(var o=n.getImageData(1,0,1,e),a=o.data,r=0,s=e,l=e;l>r;){0===a[4*(l-1)+3]?s=l:r=l,l=s+r>>1}var c=l/e;return 0===c?1:c},y=function(t,e,i,n,o,a,r,s,l,c){var d=v(e);return t.drawImage(e,i,n,o,a,r,s,l,c/d)},b=function(){function t(){s(this,t)}return c(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(t){for(var e="",i=void 0,n=void 0,o="",a=void 0,r=void 0,s=void 0,l="",c=0;;)if(i=t[c++],n=t[c++],o=t[c++],a=i>>2,r=(3&i)<<4|n>>4,s=(15&n)<<2|o>>6,l=63&o,isNaN(n)?s=l=64:isNaN(o)&&(l=64),e=e+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(l),i=n=o="",a=r=s=l="",!(ct.length)break}return i}},{key:"decode64",value:function(t){var e=void 0,i=void 0,n="",o=void 0,a=void 0,r=void 0,s="",l=0,c=[],d=/[^A-Za-z0-9\+\/\=]/g;for(d.exec(t)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");;)if(o=this.KEY_STR.indexOf(t.charAt(l++)),a=this.KEY_STR.indexOf(t.charAt(l++)),r=this.KEY_STR.indexOf(t.charAt(l++)),s=this.KEY_STR.indexOf(t.charAt(l++)),e=o<<2|a>>4,i=(15&a)<<4|r>>2,n=(3&r)<<6|s,c.push(e),64!==r&&c.push(i),64!==s&&c.push(n),e=i=n="",o=a=r=s="",!(l \';this.onerror=null;" class="img-responsive"> '},events:{onInit:function(){},onUploadSuccess:function(e,i,n){var a=e.element,r=e.options.onUploadSuccess,s=void 0!==i.data?i.data:null;if(a){var l=t(a).data("input-id")?t(a).data("input-id"):"";if(l){var c=[],d=t("#"+l);t(a).data("multiple")&&""!==d.val()&&c.push(d.val());var u=Config.upload.fullmode?s.fullurl?s.fullurl:Fast.api.cdnurl(s.url):s.url;c.push(u),d.val(c.join(",")).trigger("change").trigger("validate")}var p=t(a).data("upload-success");if(p&&("function"!=typeof p&&"function"==typeof o.api.custom[p]&&(p=o.api.custom[p]),"function"==typeof p)){var h=p.call(a,s,i,e,n);if(!1===h)return}}if("function"==typeof r){var h=r.call(a,s,i,e,n);if(!1===h)return}},onUploadError:function(e,i,n){var a=e.element,r=e.options.onUploadError,s=void 0!==i.data?i.data:null;if(a){var l=t(a).data("upload-error");if(l&&("function"!=typeof l&&"function"==typeof o.api.custom[l]&&(l=o.api.custom[l]),"function"==typeof l)){var c=l.call(a,s,i,e,n);if(!1===c)return}}if("function"==typeof r){var c=r.call(a,s,i,e,n);if(!1===c)return}Toastr.error(i.msg.toString().replace(/(<([^>]+)>)/gi,"")+"(code:"+i.code+")")},onUploadResponse:function(e,i,n){try{var o="object"==typeof e?e:JSON.parse(e);o.hasOwnProperty("code")||t.extend(o,{code:-2,msg:e,data:null})}catch(t){var o={code:-1,msg:t.message,data:null}}return o},onUploadComplete:function(e,i){var n=e.element,a=e.options.onUploadComplete;if(n){var r=t(n).data("upload-complete");if(r&&("function"!=typeof r&&"function"==typeof o.api.custom[r]&&(r=o.api.custom[r]),"function"==typeof r)){var s=r.call(n,i);if(!1===s)return}}if("function"==typeof a){var s=a.call(n,i);if(!1===s)return}}},api:{upload:function(e,a,r,s){e=void 0===e?o.config.classname:e,t(e,o.config.container).each(function(){if(t(this).attr("initialized"))return!0;t(this).attr("initialized",!0);var e=this,l=t(this).prop("id")||t(this).prop("name")||i.uuidv4(),c=t(this).data("url"),d=t(this).data("maxsize"),u=t(this).data("maxcount"),p=t(this).data("mimetype"),h=t(this).data("multipart"),f=t(this).data("multiple"),m=t(e).data("input-id")?t(e).data("input-id"):"",g=t(e).data("preview-id")?t(e).data("preview-id"):"";c=c||Config.upload.uploadurl,c=Fast.api.fixurl(c);var v=Config.upload.chunksize||2097152,y=Config.upload.timeout||6e5;d=void 0!==d?d:Config.upload.maxsize,p=void 0!==p?p:Config.upload.mimetype,h=void 0!==h?h:Config.upload.multipart,f=void 0!==f?f:Config.upload.multiple,p=p.split(",").map(function(t){return t.indexOf("/")>-1?t:t&&"*"!==t&&"."!==t.charAt(0)?"."+t:t}).join(","),p="*"===p?null:p;var b=function(t){var e=t.toString().match(/^([0-9\.]+)(\w+)$/),i=e?parseFloat(e[1]):parseFloat(t),n=e?e[2].toLowerCase():"b",o={b:0,k:1,kb:1,m:2,mb:2,gb:3,g:3,tb:4,t:4},a=void 0!==o[n]?o[n]:0;return i*Math.pow(1024,a)/Math.pow(1024,2)}(d),x=t(this).data()||{};x=t.extend(!0,{},x,t(this).data("upload-options")||{}),delete x.success,delete x.url,h=t.isArray(h)?{}:h;var w=t(this).data("params")||{};void 0!==w.category||t(this).data("category");o.list[l]=new i(this,t.extend({url:c,params:function(e,i,n){var o=h;return n?t.extend({},o,{filesize:n.file.size,filename:n.file.name,chunkid:n.file.upload.uuid,chunkindex:n.index,chunkcount:n.file.upload.totalChunkCount,chunksize:this.options.chunkSize,chunkfilesize:n.dataBlock.data.size,width:n.file.width||0,height:n.file.height||0,type:n.file.type}):o},chunking:!1,chunkSize:v,maxFilesize:b,acceptedFiles:p,maxFiles:u&&parseInt(u)>1?u:f?null:1,timeout:y,parallelUploads:1,previewsContainer:!1,dictDefaultMessage:__("Drop files here to upload"),dictFallbackMessage:__("Your browser does not support drag'n'drop file uploads"),dictFallbackText:__("Please use the fallback form below to upload your files like in the olden days"),dictFileTooBig:__("File is too big (%sMiB), Max filesize: %sMiB","{{filesize}}","{{maxFilesize}}"),dictInvalidFileType:__("You can't upload files of this type"),dictResponseError:__("Server responded with %s code.","{{statusCode}}"),dictCancelUpload:__("Cancel upload"),dictUploadCanceled:__("Upload canceled"),dictCancelUploadConfirmation:__("Are you sure you want to cancel this upload?"),dictRemoveFile:__("Remove file"),dictMaxFilesExceeded:__("You can only upload a maximum of %s files","{{maxFiles}}"),init:function(){o.events.onInit.call(this),t(">i",this.element).addClass("dz-message"),this.options.elementHtml=t(this.element).html()},sending:function(t,e,i){void 0!==t.category&&i.append("category",t.category)},addedfile:function(e){var i=t(this.element).data("params")||{},n=void 0!==i.category?i.category:t(this.element).data("category")||"";e.category="function"==typeof n?n.call(this,e):n},addedfiles:function(e){if(this.options.maxFiles&&(!this.options.maxFiles||this.options.maxFiles>1)&&this.options.inputId){var i=t("#"+this.options.inputId);if(i.length>0){var n=t.trim(i.val()),o=""===n?0:n.split(/\,/).length,a=this.options.maxFiles-o;if(0===a||e.length>a){e=Array.prototype.slice.call(e,a);for(var r=0;r"+(n&&void 0!==n.responseText?n.responseText:i)+"");a.find("style, title, script").remove();var r=a.text()||__("Network error"),s={code:0,data:null,msg:r};o.events.onUploadError(this,s,e)},uploadprogress:function(e,i,n){e.upload.chunked&&t(this.element).prop("disabled",!0).html(" "+__("Upload")+Math.floor(e.upload.bytesSent/e.size*100)+"%")},totaluploadprogress:function(e,i){this.getActiveFiles().length>0&&!this.options.chunking&&t(this.element).prop("disabled",!0).html(" "+__("Upload")+Math.floor(e)+"%")},queuecomplete:function(){o.events.onUploadComplete(this,this.files),this.removeAllFiles(!0),t(this.element).prop("disabled",!1).html(this.options.elementHtml)},chunkSuccess:function(t,e,i){},chunksUploaded:function(e,i){var n=this;Fast.api.ajax({url:this.options.url,data:t.extend({},h,{action:"merge",filesize:e.size,filename:e.name,chunkid:e.upload.uuid,chunkcount:e.upload.totalChunkCount})},function(t,e){return i(JSON.stringify(e)),!1},function(t,i){e.accepted=!1,n._errorProcessing([e],i.msg)})},onUploadSuccess:a,onUploadError:r,onUploadComplete:s},o.options,x)),g&&f&&require(["dragsort"],function(){t("#"+g).dragsort({dragSelector:"li a:not(.btn-trash)",dragEnd:function(){t("#"+g).trigger("fa.preview.change")},placeHolderTemplate:' '})});var _=function(e){var i={},n=t("textarea[name='"+e+"']"),o=n.prev("ul");t.each(t("input,select,textarea",o).serializeArray(),function(t,e){var n=/\[?(\w+)\]?\[(\w+)\]$/g,o=n.exec(e.name);if(!o)return!0;isNaN(o[2])?(o[1]="x"+parseInt(o[1]),void 0===i[o[1]]&&(i[o[1]]={}),i[o[1]][o[2]]=e.value):i[t]=e.value});var a=[];t.each(i,function(t,e){a.push(e)}),n.val(JSON.stringify(a))};g&&m&&(t(document.body).on("keyup change","#"+m,function(i){var a=t("#"+m).val(),r=a.split(/\,/),s=t("#"+g);s.empty();var l=s.data("template")?s.data("template"):"",c=s.next().is("textarea")?s.next("textarea").val():"{}",d={};try{d=JSON.parse(c)}catch(i){}t.each(r,function(i,a){if(!a)return!0;var r=/[\.]?([a-zA-Z0-9]+)$/.exec(a);r=r?r[1]:"file";var c=t(e).data(),u=void 0!==c.cdnurl?Fast.api.cdnurl(a,c.cdnurl):Fast.api.cdnurl(a);a=Config.upload.fullmode?u:a;var p=d&&void 0!==d[i]?d[i]:null,h={url:a,fullurl:u,data:c,key:i,index:i,value:p,row:p,suffix:r},f=l?n(l,h):n.render(o.config.previewtpl,h);s.append(f)}),_(s.data("name"))}),t("#"+m).trigger("change")),g&&(t("#"+g).on("change keyup","input,textarea,select",function(){_(t(this).closest("ul").data("name"))}),t(document.body).on("fa.preview.change","#"+g,function(){var e=[];t("#"+g+" [data-url]").each(function(i,n){e.push(t(this).data("url"))}),m&&t("#"+m).val(e.join(",")),_(t("#"+g).data("name"))}),t(document.body).on("click","#"+g+" .btn-trash",function(){t(this).closest("li").remove(),t("#"+g).trigger("fa.preview.change")})),m&&(t("#"+m).closest("form").on("reset",function(){setTimeout(t.proxy(function(){t("#"+m,this).trigger("change")},this),0)}),t("body").on("paste drop","#"+m,function(e){var i=e.originalEvent,n=t(".plupload[data-input-id='"+t(this).attr("id")+"'],.faupload[data-input-id='"+t(this).attr("id")+"']");if("paste"===e.type&&i.clipboardData&&i.clipboardData.items){var a=i.clipboardData.items;if(!(1===a.length&&a[0].type.indexOf("text")>-1||2===a.length&&a[1].type.indexOf("text")>-1))return o.list[n.attr("id")].paste(i),!1}if("drop"===e.type&&i.dataTransfer&&i.dataTransfer.files)return o.list[n.attr("id")].drop(i),!1}))})},plupload:function(t,e,i,n){return o.api.upload(t,e,i,n)},faupload:function(t,e,i,n){return o.api.upload(t,e,i,n)},send:function(e,n,a,r){var s=Layer.msg(__("Uploading"),{offset:"t",time:0}),l="dropzone-"+i.uuidv4();t(' ').appendTo("body"),t("#"+l).data("upload-complete",function(t){Layer.close(s),o.list[l].removeAllFiles(!0)}),
+o.api.upload("#"+l,n,a,r),setTimeout(function(){o.list[l].addFile(e)},1)},custom:{afteruploadcallback:function(t){console.log(this,t),alert("Custom Callback,Response URL:"+t.url)}}}};return o}),function(t){"object"==typeof module&&module.exports?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define("validator",["jquery"],t):t(jQuery)}(function(t,e){"use strict";function i(e,n){function o(){a.$el=t(e),a.$el.length?a._init(a.$el[0],n):O(e)&&(R[e]=n)}var a=this;if(!(a instanceof i))return new i(e,n);i.pending?t(window).on("validatorready",o):o()}function n(e){function i(){var e=this.options;for(var i in e)i in I&&(this[i]=e[i]);t.extend(this,{_valHook:function(){return"true"===this.element.contentEditable?"text":"val"},getValue:function(){var e=this.element;return"number"===e.type&&e.validity&&e.validity.badInput?"NaN":t(e)[this._valHook()]()},setValue:function(e){t(this.element)[this._valHook()](this.value=e)},getRangeMsg:function(t,e,i){function n(t,e){return l?t>e:t>=e}if(e){var o,a=this,r=a.messages[a._r]||"",s=e[0].split("~"),l="false"===e[1],c=s[0],d=s[1],u="rg",p=[""],h=F(t)&&+t==+t;return 2===s.length?c&&d?(h&&n(t,+c)&&n(+d,t)&&(o=!0),p=p.concat(s),u=l?"gtlt":"rg"):c&&!d?(h&&n(t,+c)&&(o=!0),p.push(c),u=l?"gt":"gte"):!c&&d&&(h&&n(+d,t)&&(o=!0),p.push(d),u=l?"lt":"lte"):(t===+c&&(o=!0),p.push(c),u="eq"),r&&(i&&r[u+i]&&(u+=i),p[0]=r[u]),o||a._rules&&(a._rules[a._i].msg=a.renderMsg.apply(null,p))}},renderMsg:function(){var t=arguments,e=t[0],i=t.length;if(e){for(;--i;)e=e.replace("{"+i+"}",t[i]);return e}}})}function n(i,n,o){this.key=i,this.validator=e,t.extend(this,o,n)}return i.prototype=e,n.prototype=new i,n}function o(t,e){if(M(t)){var i,n=e?!0===e?this:e:o.prototype;for(i in t)h(i)&&(n[i]=r(t[i]))}}function a(t,e){if(M(t)){var i,n=e?!0===e?this:e:a.prototype;for(i in t)n[i]=t[i]}}function r(e){switch(t.type(e)){case"function":return e;case"array":var i=function(){return e[0].test(this.value)||e[1]||!1};return i.msg=e[1],i;case"regexp":return function(){return e.test(this.value)}}}function s(e){var i,n,o;if(e&&e.tagName){switch(e.tagName){case"INPUT":case"SELECT":case"TEXTAREA":case"BUTTON":case"FIELDSET":i=e.form||t(e).closest("."+y);break;case"FORM":i=e;break;default:i=t(e).closest("."+y)}for(n in R)if(t(i).is(n)){o=R[n];break}return t(i).data(g)||t(i)[g](o).data(g)}}function l(t,e){var i=F(N(t,b+"-"+e));if(i&&(i=new Function("return "+i)()))return r(i)}function c(t,e,i){var n=e.msg,o=e._r;return M(n)&&(n=n[o]),O(n)||(n=N(t,x+"-"+o)||N(t,x)||(i?O(i)?i:i[o]:"")),n}function d(t){var e;return t&&(e=S.exec(t)),e&&e[0]}function u(t){return"INPUT"===t.tagName&&"checkbox"===t.type||"radio"===t.type}function p(t){return Date.parse(t.replace(/\.|\-/g,"/"))}function h(t){return/^\w+$/.test(t)}function f(t){var e="#"===t.charAt(0);return t=t.replace(/([:.{(|)}/\[\]])/g,"\\$1"),e?t:'[name="'+t+'"]:first'}var m,g="validator",v="."+g,y="nice-"+g,b="data-rule",x="data-msg",w=/(&)?(!)?\b(\w+)(?:\[\s*(.*?\]?)\s*\]|\(\s*(.*?\)?)\s*\))?\s*(;|\|)?/g,_=/(\w+)(?:\[\s*(.*?\]?)\s*\]|\(\s*(.*?\)?)\s*\))?/,k=/(?:([^:;\(\[]*):)?(.*)/,C=/[^\x00-\xff]/g,S=/top|right|bottom|left/,T=/(?:(cors|jsonp):)?(?:(post|get):)?(.+)/i,D=/[<>'"`\\]|?\d+[A-F]?;?|%3[A-F]/gim,$=t.noop,E=t.proxy,F=t.trim,A=t.isFunction,O=function(t){return"string"==typeof t},M=function(t){return t&&"[object Object]"===Object.prototype.toString.call(t)},L=document.documentMode||+(navigator.userAgent.match(/MSIE (\d+)/)&&RegExp.$1),N=function(t,i,n){return t&&t.tagName?n===e?t.getAttribute(i):void(null===n?t.removeAttribute(i):t.setAttribute(i,""+n)):null},R={},P={debug:0,theme:"default",ignore:"",focusInvalid:!0,focusCleanup:!1,stopOnError:!1,beforeSubmit:null,valid:null,invalid:null,validation:null,formClass:"n-default",validClass:"n-valid",invalidClass:"n-invalid",bindClassTo:null,remoteDataType:"cors"},I={timely:1,display:null,target:null,ignoreBlank:!1,showOk:!0,dataFilter:function(t){if(O(t)||M(t)&&("error"in t||"ok"in t))return t},msgMaker:function(e){var i;return i=''+e.arrow,e.result?t.each(e.result,function(t,n){i+=''+e.icon+''+n.msg+" "}):i+=e.icon+''+e.msg+" ",i+=" "},msgWrapper:"span",msgArrow:"",msgIcon:' ',msgClass:"n-right",msgStyle:"",msgShow:null,msgHide:null},j={};return t.fn.validator=function(e){var n=this,o=arguments;return n.is(":verifiable")?n:(n.is("form")||(n=this.find("form")),n.length||(n=this),n.each(function(){var n=t(this).data(g);if(n)if(O(e)){if("_"===e.charAt(0))return;n[e].apply(n,[].slice.call(o,1))}else e&&(n._reset(!0),n._init(this,e));else new i(this,e)}),this)},t.fn.isValid=function(t,i){var n,o,a=s(this[0]),r=A(t);return!a||(r||i!==e||(i=t),a.checkOnly=!!i,o=a.options,n=a._multiValidate(this.is(":verifiable")?this:this.find(":verifiable"),function(e){e||!o.focusInvalid||a.checkOnly||a.$el.find("[aria-invalid]:first").focus(),r&&(t.length?t(e):e&&t()),a.checkOnly=!1}),r?this:n)},t.extend(t.expr.pseudos||t.expr[":"],{verifiable:function(t){var e=t.nodeName.toLowerCase();return("input"===e&&!{submit:1,button:1,reset:1,image:1}[t.type]||"select"===e||"textarea"===e||"true"===t.contentEditable)&&!t.disabled},filled:function(e){return!!F(t(e).val())}}),i.prototype={_init:function(e,i){var r,s,l,c=this;A(i)&&(i={valid:i}),i=c._opt=i||{},l=N(e,"data-"+g+"-option"),l=c._dataOpt=l&&"{"===l.charAt(0)?new Function("return "+l)():{},s=c._themeOpt=j[i.theme||l.theme||P.theme],r=c.options=t.extend({},P,I,s,c.options,i,l),c.rules=new o(r.rules,!0),c.messages=new a(r.messages,!0),c.Field=n(c),c.elements=c.elements||{},c.deferred={},c.errors={},c.fields={},c._initFields(r.fields),c.$el.data(g)||(c.$el.data(g,c).addClass(y+" "+r.formClass).on("form-submit-validate",function(t,e,i,n,o){c.vetoed=o.veto=!c.isValid,c.ajaxFormOptions=n}).on("submit"+v+" validate"+v,E(c,"_submit")).on("reset"+v,E(c,"_reset")).on("showmsg"+v,E(c,"_showmsg")).on("hidemsg"+v,E(c,"_hidemsg")).on("focusin"+v+" click"+v,":verifiable",E(c,"_focusin")).on("focusout"+v+" validate"+v,":verifiable",E(c,"_focusout")).on("keyup"+v+" input"+v+" compositionstart compositionend",":verifiable",E(c,"_focusout")).on("click"+v,":radio,:checkbox","click",E(c,"_focusout")).on("change"+v,'select,input[type="file"]',"change",E(c,"_focusout")),c._NOVALIDATE=N(e,"novalidate"),N(e,"novalidate","novalidate")),O(r.target)&&c.$el.find(r.target).addClass("msg-container")},_guessAjax:function(e){function i(e,i,n){return!!(e&&e[i]&&t.map(e[i],function(t){return~t.namespace.indexOf(n)?1:null}).length)}var n=this;if(!(n.isAjaxSubmit=!!n.options.valid)){var o=(t._data||t.data)(e,"events");n.isAjaxSubmit=i(o,"valid","form")||i(o,"submit","form-plugin")}},_initFields:function(t){function e(t,e){if(null===e||r){var i=a.elements[t];i&&a._resetElement(i,!0),delete a.fields[t]}else a.fields[t]=new a.Field(t,O(e)?{rule:e}:e,a.fields[t])}var i,n,o,a=this,r=null===t;if(r&&(t=a.fields),M(t))for(i in t)if(~i.indexOf(","))for(n=i.split(","),o=n.length;o--;)e(F(n[o]),t[i]);else e(i,t[i]);a.$el.find(":verifiable").each(function(){a._parse(this)})},_parse:function(t){var e,i,n,o=this,a=t.name,r=N(t,b);return r&&N(t,b,null),t.id&&("#"+t.id in o.fields||!a||null!==r&&(e=o.fields[a])&&r!==e.rule&&t.id!==e.key)&&(a="#"+t.id),a||(a="#"+(t.id="N"+String(Math.random()).slice(-12))),e=o.getField(a,!0),e.rule=r||e.rule,(i=N(t,"data-display"))&&(e.display=i),e.rule&&((null!==N(t,"data-must")||/\b(?:match|checked)\b/.test(e.rule))&&(e.must=!0),/\brequired\b/.test(e.rule)&&(e.required=!0),(n=N(t,"data-timely"))?e.timely=+n:e.timely>3&&N(t,"data-timely",e.timely),o._parseRule(e),e.old={}),O(e.target)&&N(t,"data-target",e.target),O(e.tip)&&N(t,"data-tip",e.tip),o.fields[a]=e},_parseRule:function(i){var n=k.exec(i.rule);n&&(i._i=0,n[1]&&(i.display=n[1]),n[2]&&(i._rules=[],n[2].replace(w,function(){var n=arguments;n[4]=n[4]||n[5],i._rules.push({and:"&"===n[1],not:"!"===n[2],or:"|"===n[6],method:n[3],params:n[4]?t.map(n[4].split(", "),F):e})})))},_multiValidate:function(i,n){var o=this,a=o.options;return o.hasError=!1,a.ignore&&(i=i.not(a.ignore)),i.each(function(){if(o._validate(this),o.hasError&&a.stopOnError)return!1}),n&&(o.validating=!0,t.when.apply(null,t.map(o.deferred,function(t){return t})).done(function(){n.call(o,!o.hasError),o.validating=!1})),t.isEmptyObject(o.deferred)?!o.hasError:e},_submit:function(i){var n=this,o=n.options,a=i.target,r="submit"===i.type&&"FORM"===a.tagName&&!i.isDefaultPrevented();i.preventDefault(),m&&~(m=!1)||n.submiting||"validate"===i.type&&n.$el[0]!==a||A(o.beforeSubmit)&&!1===o.beforeSubmit.call(n,a)||(n.isAjaxSubmit===e&&n._guessAjax(a),n._debug("log","\n<<< event: "+i.type),n._reset(),n.submiting=!0,n._multiValidate(n.$el.find(":verifiable"),function(e){var i,s=e||2===o.debug?"valid":"invalid";e||(o.focusInvalid&&n.$el.find("[aria-invalid]:first").focus(),i=t.map(n.errors,function(t){return t})),n.submiting=!1,n.isValid=e,A(o[s])&&o[s].call(n,a,i),n.$el.trigger(s+".form",[a,i]),n._debug("log",">>> "+s),e&&(n.vetoed?t(a).ajaxSubmit(n.ajaxFormOptions):r&&!n.isAjaxSubmit&&document.createElement("form").submit.call(a))}))},_reset:function(t){var e=this;e.errors={},t&&(e.reseting=!0,e.$el.find(":verifiable").each(function(){e._resetElement(this)}),delete e.reseting)},_resetElement:function(t,e){this._setClass(t,null),this.hideMsg(t)},_focusin:function(t){var e,i,n=this,o=n.options,a=t.target;n.validating||"click"===t.type&&document.activeElement===a||(o.focusCleanup&&"true"===N(a,"aria-invalid")&&(n._setClass(a,null),n.hideMsg(a)),i=N(a,"data-tip"),i?n.showMsg(a,{type:"tip",msg:i}):(N(a,b)&&n._parse(a),(e=N(a,"data-timely"))&&(8!==e&&9!==e||n._focusout(t))))},_focusout:function(e){var i,n,o,a,r,s,l,c,d,p=this,h=p.options,f=e.target,m=e.type,g="focusin"===m,v="validate"===m,y=0;if("compositionstart"===m&&(p.pauseValidate=!0),"compositionend"===m&&(p.pauseValidate=!1),!p.pauseValidate&&(n=f.name&&u(f)?p.$el.find('input[name="'+f.name+'"]').get(0):f,(o=p.getField(n))&&o.rule)){if(i=o._e,o._e=m,d=o.timely,!v){if(!d||u(f)&&"click"!==m)return;if(r=o.getValue(),o.ignoreBlank&&!r&&!g)return void p.hideMsg(f);if("focusout"===m){if("change"===i)return;if(2===d||8===d){if(a=o.old,!r||!a)return;o.isValid&&!a.showOk?p.hideMsg(f):p._makeMsg(f,o,a)}}else{if(d<2&&!e.data)return;if((s=+new Date)-(f._ts||0)<100)return;if(f._ts=s,"keyup"===m){if("input"===i)return;if(l=e.keyCode,c={8:1,9:1,16:1,32:1,46:1},9===l&&!r)return;if(l<48&&!c[l])return}g||(y=d<100?"click"===m||"SELECT"===f.tagName?0:400:d)}}h.ignore&&t(f).is(h.ignore)||(clearTimeout(o._t),y?o._t=setTimeout(function(){p._validate(f,o)},y):(v&&(o.old={}),p._validate(f,o)))}},_setClass:function(e,i){var n=t(e),o=this.options;o.bindClassTo&&(n=n.closest(o.bindClassTo)),n.removeClass(o.invalidClass+" "+o.validClass),null!==i&&n.addClass(i?o.validClass:o.invalidClass)},_showmsg:function(t,e,i){var n=this,o=t.target;n.$el.is(o)?M(e)?n.showMsg(e):"tip"===e&&n.$el.find(":verifiable[data-tip]",o).each(function(){n.showMsg(this,{type:e,msg:i})}):n.showMsg(o,{type:e,msg:i})},_hidemsg:function(e){var i=t(e.target);i.is(":verifiable")&&this.hideMsg(i)},_validatedField:function(e,i,n){var o=this,a=o.options,r=i.isValid=n.isValid=!!n.isValid,s=r?"valid":"invalid";n.key=i.key,n.ruleName=i._r,n.id=e.id,n.value=i.value,o.elements[i.key]=n.element=e,o.isValid=o.$el[0].isValid=r?o.isFormValid():r,r?n.type="ok":(o.submiting&&(o.errors[i.key]=n.msg),o.hasError=!0),i.old=n,A(i[s])&&i[s].call(o,e,n),A(a.validation)&&a.validation.call(o,e,n),t(e).attr("aria-invalid",!r||null).trigger(s+".field",[n,o]),o.$el.triggerHandler("validation",[n,o]),o.checkOnly||(o._setClass(e,n.skip||"tip"===n.type?null:r),o._makeMsg.apply(o,arguments))},_makeMsg:function(e,i,n){i.msgMaker&&(n=t.extend({},n),"focusin"===i._e&&(n.type="tip"),this[n.showOk||n.msg||"tip"===n.type?"showMsg":"hideMsg"](e,n,i))},_validatedRule:function(i,n,o,a){n=n||u.getField(i),a=a||{};var r,s,l,d,u=this,p=n._r,h=n.timely,f=9===h||8===h,m=!1;if(null===o)return u._validatedField(i,n,{isValid:!0,skip:!0}),void(n._i=0);if(o===e?l=!0:!0===o||""===o?m=!0:O(o)?r=o:M(o)?o.error?r=o.error:(r=o.ok,m=!0):m=!!o,s=n._rules[n._i],s.not&&(r=e,m="required"===p||!m),s.or)if(m)for(;n._i "+(m||r)),(m||f)&&n._i").attr({class:"msg-box"+(n.cls?" "+n.cls:""),style:n.style||e,for:a}),s)o.appendTo(s);else if(u(i)){var c=l.parent();o.appendTo(c.is("label")?c.parent():c)}else o[n.pos&&"right"!==n.pos?"insertBefore":"insertAfter"](l);return o},showMsg:function(e,i,n){if(e){var o,a,r,s,l=this,c=l.options;if(M(e)&&!e.jquery&&!i)return void t.each(e,function(t,e){var i=l.elements[t]||l.$el.find(f(t))[0];l.showMsg(i,e)});t(e).is(":verifiable")&&(n=n||l.getField(e)),(a=(n||c).msgMaker)&&(i=l._getMsgOpt(i,n),e=(e.name&&u(e)?l.$el.find('input[name="'+e.name+'"]'):t(e)).get(0),i.msg||"error"===i.type||null!==(r=N(e,"data-"+i.type))&&(i.msg=r),O(i.msg)&&(s=l._getMsgDOM(e,i),!S.test(s[0].className)&&s.addClass(i.cls),6===L&&"bottom"===i.pos&&(s[0].style.marginTop=t(e).outerHeight()+"px"),s.html(a.call(l,i))[0].style.display="",A(o=n&&n.msgShow||c.msgShow)&&o.call(l,s,i.type)))}},hideMsg:function(e,i,n){var o,a,r=this,s=r.options;e=t(e).get(0),t(e).is(":verifiable")&&(n=n||r.getField(e))&&(n.isValid||r.reseting)&&N(e,"aria-invalid",null),i=r._getMsgOpt(i,n),i.hide=!0,a=r._getMsgDOM(e,i),a.length&&(A(o=n&&n.msgHide||s.msgHide)?o.call(r,a,i.type):(a[0].style.display="none",a[0].innerHTML=""))},getField:function(t,i){var n,o,a=this;if(O(t))n=t,t=e;else{if(N(t,b))return a._parse(t);n=t.id&&"#"+t.id in a.fields||!t.name?"#"+t.id:t.name}return((o=a.fields[n])||i&&(o=new a.Field(n)))&&(o.element=t),o},setField:function(t,e){var i={};t&&(O(t)?i[t]=e:i=t,this._initFields(i))},isFormValid:function(){var t,e,i=this.fields;for(t in i)if(e=i[t],e._rules&&(e.required||e.must||e.value)&&!e.isValid)return!1;return!0},holdSubmit:function(t){this.submiting=t===e||t},cleanUp:function(){this._reset(1)},destroy:function(){this._reset(1),this.$el.off(v).removeData(g),N(this.$el[0],"novalidate",this._NOVALIDATE)}},t(window).on("beforeunload",function(){this.focus()}),t(document).on("click",":submit",function(){var t,e=this;e.form&&((t=e.getAttributeNode("formnovalidate"))&&null!==t.nodeValue||null!==N(e,"novalidate"))&&(m=!0)}).on("focusin submit validate","form,."+y,function(e){if(null===N(this,"novalidate")){var i,n=t(this);!n.data(g)&&(i=s(this))&&(t.isEmptyObject(i.fields)?(N(this,"novalidate","novalidate"),n.off(v).removeData(g)):"focusin"===e.type?i._focusin(e):i._submit(e))}}),new a({fallback:"This field is not valid.",loading:"Validating..."}),new o({required:function(e,i){var n=this,o=F(n.value),a=!0;if(i)if(1===i.length){if(h(i[0])){if(n.rules[i[0]]){if(!o&&!n.test(e,i[0]))return null;n._r="required"}}else if(!o&&!t(i[0],n.$el).length)return null}else if("not"===i[0])t.each(i.slice(1),function(){return a=o!==F(this)});else if("from"===i[0]){var r,s=n.$el.find(i[1]);return a=s.filter(function(){var t=n.getField(this);return t&&!!F(t.getValue())}).length>=(i[2]||1),a?o||(r=null):r=c(s[0],n)||!1,t(e).data("_validated_")||s.data("_validated_",1).each(function(){e!==this&&n._validate(this)}).removeData("_validated_"),r}return a&&!!o},integer:function(t,e){var i,n="0|",o="[1-9]\\d*",a=e?e[0]:"*";switch(a){case"+":i=o;break;case"-":i="-"+o;break;case"+0":i=n+o;break;case"-0":i="0|-"+o;break;default:i="0|-?"+o}return i="^(?:"+i+")$",new RegExp(i).test(this.value)||this.messages.integer&&this.messages.integer[a]},match:function(e,i){if(i){var n,o,a,r,s,l,c,d=this,u=!0,h="eq";if(1===i.length?a=i[0]:(h=i[0],a=i[1]),s=f(a),l=d.$el.find(s)[0]){if(c=d.getField(l),n=d.value,o=c.getValue(),d._match||(d.$el.on("valid.field"+v,s,function(){t(e).trigger("validate")}),d._match=c._match=1),!d.required&&""===n&&""===o)return null;if(r=i[2],r&&(/^date(time)?$/i.test(r)?(n=p(n),o=p(o)):"time"===r&&(n=+n.replace(/:/g,""),o=+o.replace(/:/g,""))),"eq"!==h&&!isNaN(+n)&&isNaN(+o))return!0;switch(h){case"lt":u=+n<+o;break;case"lte":u=+n<=+o;break;case"gte":u=+n>=+o;break;case"gt":u=+n>+o;break;case"neq":u=n!==o;break;default:u=n===o}return u||M(d.messages.match)&&d.messages.match[h].replace("{1}",d._getDisplay(l,c.display||a))}}},range:function(t,e){return this.getRangeMsg(this.value,e)},checked:function(t,e){if(u(t)){var i,n,o=this;return t.name?n=o.$el.find('input[name="'+t.name+'"]').filter(function(){var t=this;return!i&&u(t)&&(i=t),!t.disabled&&t.checked}).length:(i=t,n=i.checked),e?o.getRangeMsg(n,e):!!n||c(i,o,"")||o.messages.required||!1}},length:function(t,e){var i=this.value,n=("true"===e[1]?i.replace(C,"xx"):i).length;return this.getRangeMsg(n,e,e[1]?"_2":"")},remote:function(e,i){if(i){var n,o=this,a=T.exec(i[0]),r=o._rules[o._i],s={},l="",c=a[3],d=a[2]||"POST",u=(a[1]||this.validator.options.remoteDataType||"").toLowerCase();return r.must=!0,(s[e.name]=o.value,i[1]&&t.map(i.slice(1),function(t){var e,i;~t.indexOf("=")?l+="&"+t:(e=t.split(":"),t=F(e[0]),i=F(e[1])||t,s[t]=o.$el.find(f(i)).val())}),s=t.param(s)+l,!o.must&&r.data&&r.data===s)?r.result:("cors"!==u&&/^https?:/.test(c)&&!~c.indexOf(location.host)&&(n="jsonp"),t.ajax({url:c,type:d,data:s,dataType:n}))}},filter:function(t,e){var i=this.value,n=i.replace(e?new RegExp("["+e[0]+"]","gm"):D,"");n!==i&&this.setValue(n)}}),i.config=function(e,i){function n(t,e){"rules"===t?new o(e):"messages"===t?new a(e):t in I?I[t]=e:P[t]=e}M(e)?t.each(e,n):O(e)&&n(e,i)},i.setTheme=function(e,i){M(e)?t.extend(!0,j,e):O(e)&&M(i)&&(j[e]=t.extend(j[e],i))},i.load=function(e){if(e){var n,o,a,r=document,s={},l=r.scripts[0];e.replace(/([^?=&]+)=([^]*)/g,function(t,e,i){s[e]=i}),n=s.dir||i.dir,i.css||""===s.css||(o=r.createElement("link"),o.rel="stylesheet",o.href=i.css=n+"jquery.validator.css",l.parentNode.insertBefore(o,l)),!i.local&&~e.indexOf("local")&&""!==s.local&&(i.local=(s.local||r.documentElement.lang||"en").replace("_","-"),i.pending=1,o=r.createElement("script"),o.src=n+"local/"+i.local+".js",a="onload"in o?"onload":"onreadystatechange",o[a]=function(){o.readyState&&!/loaded|complete/.test(o.readyState)||(o=o[a]=null,delete i.pending,t(window).triggerHandler("validatorready"))},l.parentNode.insertBefore(o,l))}},function(){for(var t,e,n=document.scripts,o=n.length,a=/(.*validator(?:\.min)?.js)(\?.*(?:local|css|dir)(?:=[\w\-]*)?)?/;o--&&!e;)t=n[o],e=(t.hasAttribute?t.src:t.getAttribute("src",4)||"").match(a);e&&(i.dir=e[1].split("/").slice(0,-1).join("/")+"/",i.load(e[2]))}(),t[g]=i}),function(t){"object"==typeof module&&module.exports?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define("validator-lang",["jquery"],t):t(jQuery)}(function(t){t.validator.config({rules:{digits:[/^\d+$/,"请填写数字"],letters:[/^[a-z]+$/i,"请填写字母"],date:[/^\d{4}-\d{2}-\d{2}$/,"请填写有效的日期,格式:yyyy-mm-dd"],time:[/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/,"请填写有效的时间,00:00到23:59之间"],email:[/^[\w\+\-]+(\.[\w\+\-]+)*@[a-z\d\-]+(\.[a-z\d\-]+)*\.([a-z]{2,4})$/i,"请填写有效的邮箱"],url:[/^(https?|s?ftp):\/\/\S+$/i,"请填写有效的网址"],qq:[/^[1-9]\d{4,}$/,"请填写有效的QQ号"],IDcard:[/^\d{6}(19|2\d)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)?$/,"请填写正确的身份证号码"],tel:[/^(?:(?:0\d{2,3}[\- ]?[1-9]\d{6,7})|(?:[48]00[\- ]?[1-9]\d{6}))$/,"请填写有效的电话号码"],mobile:[/^1[3-9]\d{9}$/,"请填写有效的手机号"],zipcode:[/^\d{6}$/,"请检查邮政编码格式"],chinese:[/^[\u0391-\uFFE5]+$/,"请填写中文字符"],username:[/^\w{3,12}$/,"请填写3-12位数字、字母、下划线"],password:[/^[\S]{6,16}$/,"请填写6-16位字符,不能包含空格"],accept:function(e,i){if(!i)return!0;var n=i[0],o=t(e).val();return"*"===n||new RegExp(".(?:"+n+")$","i").test(o)||this.renderMsg("只接受{1}后缀的文件",n.replace(/\|/g,","))}},messages:{0:"此处",fallback:"{0}格式不正确",loading:"正在验证...",error:"网络异常",timeout:"请求超时",required:"{0}不能为空",remote:"{0}已被使用",integer:{"*":"请填写整数","+":"请填写正整数","+0":"请填写正整数或0","-":"请填写负整数","-0":"请填写负整数或0"},match:{eq:"{0}与{1}不一致",neq:"{0}与{1}不能相同",lt:"{0}必须小于{1}",gt:"{0}必须大于{1}",lte:"{0}不能大于{1}",gte:"{0}不能小于{1}"},range:{rg:"请填写{1}到{2}的数",gte:"请填写不小于{1}的数",lte:"请填写最大{1}的数",gtlt:"请填写{1}到{2}之间的数",gt:"请填写大于{1}的数",lt:"请填写小于{1}的数"},checked:{eq:"请选择{1}项",rg:"请选择{1}到{2}项",gte:"请至少选择{1}项",lte:"请最多选择{1}项"},length:{eq:"请填写{1}个字符",rg:"请填写{1}到{2}个字符",gte:"请至少填写{1}个字符",lte:"请最多填写{1}个字符",eq_2:"",rg_2:"",gte_2:"",lte_2:""}}});var e='◆ ◆ ';t.validator.setTheme({simple_right:{formClass:"n-simple",msgClass:"n-right"},simple_bottom:{formClass:"n-simple",msgClass:"n-bottom"},yellow_top:{formClass:"n-yellow",msgClass:"n-top",msgArrow:e},yellow_right:{formClass:"n-yellow",msgClass:"n-right",msgArrow:e},yellow_right_effect:{formClass:"n-yellow",msgClass:"n-right",msgArrow:e,msgShow:function(t,e){var i=t.children();i.is(":animated")||("error"===e?i.css({left:"20px",opacity:0}).delay(100).show().stop().animate({left:"-4px",opacity:1},150).animate({left:"3px"},80).animate({left:0},80):i.css({left:0,opacity:1}).fadeIn(200))},msgHide:function(t,e){t.children().stop().delay(100).show().animate({left:"20px",opacity:0},300,function(){t.hide()})}}})}),define("form",["jquery","bootstrap","upload","validator","validator-lang"],function(t,e,i,n,e){var o={config:{fieldlisttpl:' '},events:{validator:function(e,i,n,a){e.is("form")&&(e.validator(t.extend({rules:{username:[/^\w{3,30}$/,__("Username must be 3 to 30 characters")],password:[/^[\S]{6,30}$/,__("Password must be 6 to 30 characters")]},validClass:"has-success",invalidClass:"has-error",bindClassTo:".form-group",formClass:"n-default n-bootstrap",msgClass:"n-right",stopOnError:!0,display:function(e){return t(e).closest(".form-group").find(".control-label").text().replace(/\:/,"")},dataFilter:function(t){return 1===t.code?t.msg?{ok:t.msg}:"":t.msg},target:function(e){var i=t(e).data("target");if(i&&t(i).length>0)return t(i);var n=t(e).closest(".form-group"),o=n.find("span.msg-box");return o.length?o:[]},valid:function(r){var s=this,l=t(".layer-footer [type=submit]",e);return s.holdSubmit(!0),l.addClass("disabled"),o.api.submit(t(r),function(e,n){if(s.holdSubmit(!1),l.removeClass("disabled"),!1===t(this).triggerHandler("success.form",[e,n]))return!1;if("function"==typeof i&&!1===i.call(t(this),e,n))return!1;var o=n.hasOwnProperty("msg")&&""!==n.msg?n.msg:__("Operation completed");if(parent.Toastr.success(o),parent.$(".btn-refresh").trigger("click"),window.name){var a=parent.Layer.getFrameIndex(window.name);parent.Layer.close(a)}return!1},function(e,i){return s.holdSubmit(!1),!1!==t(this).triggerHandler("error.form",[e,i])&&(l.removeClass("disabled"),("function"!=typeof n||!1!==n.call(t(this),e,i))&&void 0)},a)||(s.holdSubmit(!1),l.removeClass("disabled")),!1}},e.data("validator-options")||{})),t(".layer-footer [type=submit],.fixed-footer [type=submit],.normal-footer [type=submit]",e).removeClass("disabled"),e.on("click",".layer-close",function(){if(window.name){var t=parent.Layer.getFrameIndex(window.name);parent.Layer.close(t)}return!1}))},selectpicker:function(e){t(".selectpicker",e).length>0&&require(["bootstrap-select","bootstrap-select-lang"],function(){t.fn.selectpicker.Constructor.BootstrapVersion="3",t(".selectpicker",e).selectpicker(),t(e).on("reset",function(){setTimeout(function(){t(".selectpicker").selectpicker("refresh").trigger("change")},1)})})},selectpage:function(e){t(".selectpage",e).length>0&&(require(["selectpage"],function(){t(".selectpage",e).selectPage({eAjaxSuccess:function(t){return t.list=void 0!==t.rows?t.rows:void 0!==t.list?t.list:[],t.totalRow=void 0!==t.total?t.total:void 0!==t.totalRow?t.totalRow:t.list.length,t}})}),t(document).on("change",".sp_hidden",function(){t(this).trigger("validate")}),t(document).on("change",".sp_input",function(){t(this).closest(".sp_container").find(".sp_hidden").trigger("change")}),t(e).on("reset",function(){setTimeout(function(){t(".selectpage",e).each(function(){t(this).data("selectPageObject").elem.hidden.val(t(this).val()),t(this).selectPageRefresh()})},1)}))},cxselect:function(e){t("[data-toggle='cxselect']",e).length>0&&require(["cxselect"],function(){t.cxSelect.defaults.jsonName="name",t.cxSelect.defaults.jsonValue="value",t.cxSelect.defaults.jsonSpace="data",t("[data-toggle='cxselect']",e).cxSelect()})},citypicker:function(e){t("[data-toggle='city-picker']",e).length>0&&require(["citypicker"],function(){t(e).on("reset",function(){setTimeout(function(){t("[data-toggle='city-picker']").citypicker("refresh")},1)})})},datetimepicker:function(e){t(".datetimepicker",e).length>0&&require(["bootstrap-datetimepicker"],function(){var i={format:"YYYY-MM-DD HH:mm:ss",icons:{time:"fa fa-clock-o",date:"fa fa-calendar",up:"fa fa-chevron-up",down:"fa fa-chevron-down",previous:"fa fa-chevron-left",next:"fa fa-chevron-right",today:"fa fa-history",clear:"fa fa-trash",close:"fa fa-remove"},showTodayButton:!0,showClose:!0};t(".datetimepicker",e).parent().css("position","relative"),t(".datetimepicker",e).datetimepicker(i).on("dp.change",function(e){t(this,document).trigger("changed")})})},daterangepicker:function(e){t(".datetimerange",e).length>0&&require(["bootstrap-daterangepicker"],function(){var i={};i[__("Today")]=[Moment().startOf("day"),Moment().endOf("day")],i[__("Yesterday")]=[Moment().subtract(1,"days").startOf("day"),Moment().subtract(1,"days").endOf("day")],i[__("Last 7 Days")]=[Moment().subtract(6,"days").startOf("day"),Moment().endOf("day")],i[__("Last 30 Days")]=[Moment().subtract(29,"days").startOf("day"),Moment().endOf("day")],i[__("This Month")]=[Moment().startOf("month"),Moment().endOf("month")],i[__("Last Month")]=[Moment().subtract(1,"month").startOf("month"),Moment().subtract(1,"month").endOf("month")];var n={timePicker:!1,autoUpdateInput:!1,timePickerSeconds:!0,timePicker24Hour:!0,autoApply:!0,locale:{format:"YYYY-MM-DD HH:mm:ss",customRangeLabel:__("Custom Range"),applyLabel:__("Apply"),cancelLabel:__("Clear")},ranges:i},o=function(e,i){t(this.element).val(e.format(this.locale.format)+" - "+i.format(this.locale.format)),t(this.element).trigger("change").trigger("validate")};t(".datetimerange",e).each(function(){var e="function"==typeof t(this).data("callback")?t(this).data("callback"):o;t(this).on("apply.daterangepicker",function(t,i){e.call(i,i.startDate,i.endDate)}),t(this).on("cancel.daterangepicker",function(e,i){t(this).val("").trigger("change").trigger("validate")}),t(this).daterangepicker(t.extend(!0,{},n,t(this).data()||{},t(this).data("daterangepicker-options")||{}))})})},plupload:function(t){o.events.faupload(t)},faupload:function(e){t(".plupload,.faupload",e).length>0&&i.api.upload(t(".plupload,.faupload",e))},faselect:function(e){t(".faselect,.fachoose",e).length>0&&t(".faselect,.fachoose",e).off("click").on("click",function(){var e=this,i=!!t(this).data("multiple")&&t(this).data("multiple"),n=t(this).data("mimetype")?t(this).data("mimetype"):"",o=t(this).data("admin-id")?t(this).data("admin-id"):"",a=t(this).data("user-id")?t(this).data("user-id"):"";n=n.replace(/\/\*/gi,"/");var r=t(this).data("url")?t(this).data("url"):"undefined"!=typeof Backend?"general/attachment/select":"user/attachment";return parent.Fast.api.open(r+"?element_id="+t(this).attr("id")+"&multiple="+i+"&mimetype="+n+"&admin_id="+o+"&user_id="+a,__("Choose"),{callback:function(i){var n=t(e),o=t(n).data("maxcount"),a=t(n).data("input-id")?t(n).data("input-id"):"";if(o=void 0!==o?o:0,a&&i.multiple){var r=[],s=t("#"+a),l=t.trim(s.val());""!==l&&r.push(s.val());var c=""===l?0:l.split(/\,/).length,d=""!==i.url?i.url.split(/\,/):[];if(t.each(d,function(t,e){var i=Config.upload.fullmode?Fast.api.cdnurl(e):e;r.push(i)}),o>0){var u=o-c;if(d.length>u)return Toastr.error(__("You can choose up to %d file%s",u)),!1}var p=r.join(",");s.val(p).trigger("change").trigger("validate")}else if(a){var h=Config.upload.fullmode?Fast.api.cdnurl(i.url):i.url;t("#"+a).val(h).trigger("change").trigger("validate")}n.trigger("fa.event.selectedfile",i)}}),!1})},fieldlist:function(e){t(".fieldlist",e).length>0&&require(["dragsort","template"],function(i,n){var a=function(i){var n={},o=i.data("name"),a=t("textarea[name='"+o+"']",e),r=i.data("template");t.each(t("input,select,textarea",i).serializeArray(),function(t,e){var i=/\[(\w+)\]\[(\w+)\]$/g,o=i.exec(e.name);if(!o)return!0;o[1]="x"+parseInt(o[1]),void 0===n[o[1]]&&(n[o[1]]={}),n[o[1]][o[2]]=e.value});var s=i.data("usearray")||!1,l=i.data("keepempty")||!1,c=r||s?[]:{},d=Object.keys(Object.values(n)[0]||{}),u=!s&&d.indexOf("value")>-1&&(1===d.length||2===d.length&&d.indexOf("key")>-1);u&&2===d.length&&(c={}),t.each(n,function(t,e){e&&(u?2===d.length?(""!=e.key||l)&&(c["__PLACEHOLDKEY__"+e.key]=e.value):c.push(e.value):c.push(e))}),a.val(JSON.stringify(c).replace(/__PLACEHOLDKEY__/g,""))},r=function(e,i,a){
+var r=e.data("tag")||(e.is("table")?"tr":"dd"),s=e.data("index"),l=e.data("name"),c=e.data("template"),d=e.data();s=s?parseInt(s):0,e.data("index",s+1),i=i||{},i=void 0===i.key||void 0===i.value?{key:"",value:i}:i;var u=e.data("fieldlist-options")||{},p={index:s,name:l,data:d,options:u,key:i.key,value:i.value,row:i.value},h=c?n(c,p):n.render(o.config.fieldlisttpl,p),f=t(h);return!1!==u.deleteBtn&&!1!==u.removeBtn||!a||f.find(".btn-remove").remove(),!1===u.dragsortBtn&&a&&f.find(".btn-dragsort").remove(),!0!==u.readonlyKey&&!0!==u.disableKey||!a||f.find("input[name$='[key]']").prop("readonly",!0),f.attr("fieldlist-item",!0),f.insertAfter(t(r+"[fieldlist-item]",e).length>0?t(r+"[fieldlist-item]:last",e):t(r+":first",e)),t(".btn-append,.append",e).length>0?t(".btn-append,.append",e).trigger("fa.event.appendfieldlist",f):e.trigger("fa.event.appendfieldlist",f),f},s=t(".fieldlist",e);e.on("reset",function(){setTimeout(function(){s.trigger("fa.event.refreshfieldlist")})}),t(document).on("change keyup changed",".fieldlist input,.fieldlist textarea,.fieldlist select",function(){var e=t(this).closest(".fieldlist");a(e)}),s.on("click",".btn-append,.append",function(e,i){var n=t(this).closest(".fieldlist");r(n,i),a(n)}),s.on("click",".btn-remove",function(){var e=t(this).closest(".fieldlist"),i=e.data("tag")||(e.is("table")?"tr":"dd");t(this).closest(i).remove(),a(e)}),s.on("fa.event.appendtofieldlist",function(e,i){var n=t(this);r(n,i),a(n)}),s.on("fa.event.refreshfieldlist",function(){var i=t(this),n=t("textarea[name='"+i.data("name")+"']",e);t("[fieldlist-item]",i).remove();var o={};try{var a=n.val().replace(/"(\d+)"\:/g,'"__PLACEHOLDERKEY__$1":');o=JSON.parse(a)}catch(t){}t.each(o,function(t,e){r(i,{key:t.toString().replace("__PLACEHOLDERKEY__",""),value:e},!0)})}),s.each(function(){var i=t(this),n=i.data("tag")||(i.is("table")?"tr":"dd");i.dragsort({itemSelector:n,dragSelector:".btn-dragsort",dragEnd:function(){a(i)},placeHolderTemplate:t("<"+n+"/>")}),"object"==typeof i.data("options")&&!1===i.data("options").appendBtn&&t(".btn-append,.append",i).hide(),t("textarea[name='"+i.data("name")+"']",e).on("fa.event.refreshfieldlist",function(){t(this).closest(".fieldlist").trigger("fa.event.refreshfieldlist")})}),s.trigger("fa.event.refreshfieldlist")})},switcher:function(e){e.on("click","[data-toggle='switcher']",function(){if(t(this).hasClass("disabled"))return!1;var e=t.proxy(function(){var e=t(this).prev("input");if(e=t(this).data("input-id")?t("#"+t(this).data("input-id")):e,e.length>0){var i=t(this).data("yes"),n=t(this).data("no");e.val()==i?(e.val(n),t("i",this).addClass("fa-flip-horizontal text-gray")):(e.val(i),t("i",this).removeClass("fa-flip-horizontal text-gray")),e.trigger("change")}},this);return void 0!==t(this).data("confirm")?Layer.confirm(t(this).data("confirm"),function(t){e(),Layer.close(t)}):e(),!1})},bindevent:function(t){},slider:function(e){t("[data-role='slider'],input.slider",e).length>0&&require(["bootstrap-slider"],function(){t("[data-role='slider'],input.slider").removeClass("hidden").css("width",function(e,i){return t(this).parents(".form-control").width()}).slider().on("slide",function(e){var i=t(this).data();void 0!==i.unit&&t(this).parents(".form-control").siblings(".value").text(e.value+i.unit)})})},tagsinput:function(e){t("[data-role='tagsinput']",e).length>0&&require(["tagsinput","autocomplete"],function(){t("[data-role='tagsinput']").tagsinput(),e.on("reset",function(){setTimeout(function(){t("[data-role='tagsinput']").tagsinput("reset")},0)})})},autocomplete:function(e){t("[data-role='autocomplete']",e).length>0&&require(["autocomplete"],function(){t("[data-role='autocomplete']").autocomplete({onSelect:function(){t(this).trigger("change").trigger("validate")}})})},favisible:function(e){if(0!=t("[data-favisible]",e).length){var i=function(i){var n,o,a=i.split(/&&/),r=0,s=/^([a-z0-9\_]+)([>|<|=|\!]=?)(.*)$/i,l=/^('|")(.*)('|")$/,c=/^regex:(.*)$/,d={">":function(t,e){return t>e},">=":function(t,e){return t>=e},"<":function(t,e){return t-1},regex:function(t,e){var i=e.match(/^\/(.*?)\/([gim]*)$/);return(i?new RegExp(i[1],i[2]):new RegExp(e)).test(t)}},u=e.find(":disabled").removeAttr("disabled"),p=e.serializeArray(),h={};return u.attr("disabled","disabled"),t(p).each(function(t,e){n=e.name,o=e.value,n="[]"===n.substr(-2)?n.substr(0,n.length-2):n,h[n]=void 0!==h[n]?[h[n],o].join(","):o}),t.each(a,function(e,i){var n=s.exec(i);if(n){var o=n[1],a=n[2],u=n[3].toString();if("="===a){var p=l.exec(u);a=p?"==":"in",u=p?p[2]:u}var f=c.exec(u);f&&(a="regex",u=f[1]);var m="row["+o+"]";if(void 0===h[m])return!1;var g=h[m];t.isArray(g)&&(g=h[m].join(",")),[">",">=","<","<="].indexOf(a)>-1&&(g=parseFloat(g),u=parseFloat(u));var v=d[a](g,u);r+=v?1:0}}),r===a.length};e.on("keyup change click configchange","input,textarea,select",function(){t("[data-favisible][data-favisible!='']",e).each(function(){var e=t(this).data("favisible"),n=e?e.toString().split(/\|\|/):[],o=0;t.each(n,function(t,e){i(e)&&o++}),o>0?t(this).removeClass("hidden"):t(this).addClass("hidden")})}),setTimeout(function(){var t=e.data("validator");t&&(t.options.ignore+=(t.options.ignore?",":"")+".hidden[data-favisible] :hidden,.hidden[data-favisible]:hidden")},0),t("input,textarea,select",e).trigger("configchange")}}},api:{submit:function(e,i,n,o){if(0===e.length)return Toastr.error("表单未初始化完成,无法提交"),!1;if("function"==typeof o&&!1===o.call(e,i,n))return!1;var a=e.attr("method")?e.attr("method").toUpperCase():"GET";a=!a||"GET"!==a&&"POST"!==a?"GET":a,url=e.attr("action"),url=url||location.href;var r={},s=t("[name$='[]']",e);if(s.length>0){var l=e.serializeArray().map(function(e){return t(e).prop("name")});t.each(s,function(e,i){l.indexOf(t(this).prop("name"))<0&&(r[t(this).prop("name")]="")})}return Fast.api.ajax({type:a,url:url,data:e.serialize()+(Object.keys(r).length>0?"&"+t.param(r):""),dataType:"json",complete:function(e){var i=e.getResponseHeader("__token__");i&&t("input[name='__token__']").val(i)}},function(n,o){if(t(".form-group",e).removeClass("has-feedback has-success has-error"),n&&"object"==typeof n&&(void 0!==n.token&&t("input[name='__token__']").val(n.token),void 0!==n.callback&&"function"==typeof n.callback&&n.callback.call(e,n)),"function"==typeof i&&!1===i.call(e,n,o))return!1},function(i,o){if(i&&"object"==typeof i&&void 0!==i.token&&t("input[name='__token__']").val(i.token),"function"==typeof n&&!1===n.call(e,i,o))return!1}),!0},bindevent:function(e,i,n,a){e="object"==typeof e?e:t(e);var r=o.events;r.bindevent(e),r.validator(e,i,n,a),r.selectpicker(e),r.daterangepicker(e),r.selectpage(e),r.cxselect(e),r.citypicker(e),r.datetimepicker(e),r.faupload(e),r.faselect(e),r.fieldlist(e),r.slider(e),r.switcher(e),r.tagsinput(e),r.autocomplete(e),r.favisible(e)},custom:{}}};return o}),function(t){"use strict";var e=[],i=t.fn.bootstrapTable.utils.sprintf,n=function(e,n){var a=o(e,n),r=i('',n.options.searchFormVisible?"":"hidden");r+=a,r+="
",n.$container.prepend(t(r)),n.$commonsearch=t(".commonsearch-table",n.$container);var s=t("form.form-commonsearch",n.$commonsearch);require(["form"],function(t){t.api.bindevent(s),s.validator("destroy")}),s.on("submit",function(t){return t.preventDefault(),n.onCommonSearch(),!1}),s.on("click","button[type=reset]",function(t){s[0].reset(),setTimeout(function(){n.onCommonSearch()},1)})},o=function(n,o){if(o.options.searchFormTemplate)return Template(o.options.searchFormTemplate,{columns:n,table:o});var s=[];s.push(i('"),s.join("")},a=function(t){var e=[],n=t.options.formatCommonSubmitButton(),o=t.options.formatCommonResetButton();return e.push(''),e.push(i('%s ',n)),e.push(i('%s ',o)),e.push("
"),e},r=function(e,n,o){var a=e.constructor===Array,r=[];return r.push(i('%s ',o.options.formatCommonChoose())),t.each(e,function(t,e){e.constructor===Object?(t=e.id,e=e.name):t=a?e:t,r.push(i(""+Fast.api.escape(e)+" ",t==n.defaultValue?"selected":""))}),r},s=function(t){return!(!t.options.commonSearch||"server"!=t.options.sidePagination||!t.options.url)},l=function(i,n){var o={},a={},r="";return t("form.form-commonsearch .operate",i.$commonsearch).each(function(s){var l=t(this).data("name"),c=t(this).is("select")?t("option:selected",this).val():t(this).val().toUpperCase(),d=t("[name='"+l+"']",i.$commonsearch);if(0==d.length)return!0;var u=e[s],p=!i.options.searchFormTemplate&&u&&"function"==typeof u.process?u.process:null;if(d.length>1)if(/BETWEEN$/.test(c)){var h=t.trim(t("[name='"+l+"']:first",i.$commonsearch).val()),f=t.trim(t("[name='"+l+"']:last",i.$commonsearch).val());h.length||f.length?(p&&(h=p(h,"begin"),f=p(f,"end")),r=h+","+f):r="",t("[name='"+l+"']:first",i.$commonsearch).hasClass("datetimepicker")&&(c="RANGE")}else r=t("[name='"+l+"']:checked",i.$commonsearch).val(),r=p?p(r):r;else r=p?p(d.val()):d.val();if(n&&(""===r||null==r||t.isArray(r)&&0===r.length)&&!c.match(/null/i))return!0;o[l]=c,a[l]=r}),{op:o,filter:a}},c=function(e,i,n){return e.filter="Object"==typeof e.filter?e.filter:e.filter?JSON.parse(e.filter):{},e.op="Object"==typeof e.op?e.op:e.op?JSON.parse(e.op):{},e.filter=t.extend({},e.filter,i.filter),e.op=t.extend({},e.op,i.op),n&&t.each(e.filter,function(i,n){(""==n||null==n||t.isArray(n)&&0==n.length)&&!e.op[i].match(/null/i)&&(delete e.filter[i],delete e.op[i])}),e.filter=JSON.stringify(e.filter),e.op=JSON.stringify(e.op),e};t.extend(t.fn.bootstrapTable.defaults,{commonSearch:!1,titleForm:"Common search",actionForm:"",searchFormTemplate:"",searchFormVisible:!0,searchClass:"searchit",showSearch:!0,renderDefault:!0,onCommonSearch:function(t,e){return!1},onPostCommonSearch:function(t){return!1}}),t.extend(t.fn.bootstrapTable.defaults.icons,{commonSearchIcon:"glyphicon-search"}),t.extend(t.fn.bootstrapTable.Constructor.EVENTS,{"common-search.bs.table":"onCommonSearch","post-common-search.bs.table":"onPostCommonSearch"}),t.extend(t.fn.bootstrapTable.locales[t.fn.bootstrapTable.defaults.locale],{formatCommonSearch:function(){return"Common search"},formatCommonSubmitButton:function(){return"Search"},formatCommonResetButton:function(){return"Reset"},formatCommonCloseButton:function(){return"Close"},formatCommonChoose:function(){return"Choose"}}),t.extend(t.fn.bootstrapTable.defaults,t.fn.bootstrapTable.locales);var d=t.fn.bootstrapTable.Constructor,u=d.prototype.initHeader,p=d.prototype.initToolbar,h=d.prototype.load,f=d.prototype.initSearch;d.prototype.initHeader=function(){u.apply(this,Array.prototype.slice.apply(arguments)),this.$header.find("th[data-field]").each(function(e){var i=t(this).data();void 0!==i.width&&-1===i.width.toString().indexOf("%")&&(t(".th-inner",this).outerWidth(i.width),t(this).css("max-width",i.width))}),this.options.stateField=this.header.stateField},d.prototype.initToolbar=function(){if(p.apply(this,Array.prototype.slice.apply(arguments)),s(this)){var e=this,o=[];e.options.showSearch&&(o.push(i('',this.options.buttonsAlign,this.options.buttonsAlign)),o.push(i('',void 0===e.options.iconSize?"":" btn-"+e.options.iconSize,e.options.formatCommonSearch())),o.push(i(' ',e.options.iconsPrefix,e.options.icons.commonSearchIcon)),o.push("
")),e.$toolbar.find(".pull-right").length>0?t(o.join("")).insertBefore(e.$toolbar.find(".pull-right:first")):e.$toolbar.append(o.join("")),n(e.columns,e),e.$toolbar.find('button[name="commonSearch"]').off("click").on("click",function(){e.$commonsearch.toggleClass("hidden")}),e.$container.on("click","."+e.options.searchClass,function(){var i=t(this).data("value"),n=t(this).data("field"),o=e.$container.closest(".panel-intro").find("ul[data-field='"+n+"']");if(o.length>0)return void t('li a[data-value="'+i+'"][data-toggle="tab"]',o).trigger("click");var a=t("form [name='"+n+"']",e.$commonsearch);a.length>0&&(a.is("select")?t("option[value='"+i+"']",a).prop("selected",!0):a.length>1?t("form [name='"+n+"'][value='"+i+"']",e.$commonsearch).prop("checked",!0):a.val(i+""),a.trigger("change"),t("form",e.$commonsearch).trigger("submit"))});var a=e.options.queryParams;this.options.queryParams=function(t){return a(c(t,l(e,!0)))},this.trigger("post-common-search",e)}},d.prototype.onCommonSearch=function(){var t=l(this);this.trigger("common-search",this,t),this.options.pageNumber=1,this.refresh({})},d.prototype.load=function(t){h.apply(this,Array.prototype.slice.apply(arguments)),s(this)},d.prototype.initSearch=function(){if(f.apply(this,Array.prototype.slice.apply(arguments)),s(this)){var e=this,i=t.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=i?t.grep(this.data,function(n,o){for(var a in i){var r=i[a].toLowerCase(),s=n[a];if(s=t.fn.bootstrapTable.utils.calculateObjectValue(e.header,e.header.formatters[t.inArray(a,e.header.fields)],[s,n,o],s),-1===t.inArray(a,e.header.fields)||"string"!=typeof s&&"number"!=typeof s||-1===(s+"").toLowerCase().indexOf(r))return!1}return!0}):this.data}}}(jQuery),define("bootstrap-table-commonsearch",["bootstrap-table"],function(t){return function(){return t.$.fn.bootstrapTable.defaults}}(this)),function(t){"use strict";t.extend(t.fn.bootstrapTable.defaults,{templateView:!1,templateFormatter:"itemtpl",templateParentClass:"row row-flex",templateTableClass:"table-template"});var e=t.fn.bootstrapTable.Constructor,i=e.prototype.initContainer,n=e.prototype.initBody,o=e.prototype.initRow;e.prototype.initContainer=function(){i.apply(this,Array.prototype.slice.apply(arguments));var t=this;t.options.templateView&&(t.options.cardView=!0)},e.prototype.initBody=function(){var e=this;t.extend(e.options,{showHeader:!e.options.templateView&&t.fn.bootstrapTable.defaults.showHeader,showFooter:!e.options.templateView&&t.fn.bootstrapTable.defaults.showFooter}),t(e.$el).toggleClass(e.options.templateTableClass,e.options.templateView),n.apply(this,Array.prototype.slice.apply(arguments)),e.options.templateView&&t("> *:not(.no-records-found)",e.$body).wrapAll(t("
").addClass(e.options.templateParentClass))},e.prototype.initRow=function(t,e,i,n){var a=this;if(!a.options.templateView)return o.apply(a,Array.prototype.slice.apply(arguments));var r="";if("function"==typeof a.options.templateFormatter)r=a.options.templateFormatter.call(a,t,e,i);else{r=require("template")(a.options.templateFormatter,{item:t,i:e,data:i})}return r}}(jQuery),define("bootstrap-table-template",["bootstrap-table","template"],function(t){return function(){return t.$.fn.bootstrapTable.defaults}}(this)),function(t){"use strict";var e=t.fn.bootstrapTable.utils.sprintf;t.extend(t.fn.bootstrapTable.defaults,{showJumpto:!1,exportOptions:{}}),t.extend(t.fn.bootstrapTable.locales,{formatJumpto:function(){return"GO"}}),t.extend(t.fn.bootstrapTable.defaults,t.fn.bootstrapTable.locales);var i=t.fn.bootstrapTable.Constructor,n=i.prototype.initPagination;i.prototype.initPagination=function(){if(this.showToolbar=this.options.showExport,n.apply(this,Array.prototype.slice.apply(arguments)),this.options.showJumpto){var i=this,o=this.$pagination.find("ul.pagination"),a=o.find("li.jumpto");a.length||(a=t(['',' ',''+this.options.formatJumpto()," "," "].join("")).appendTo(o),a.find("button").click(function(){i.selectPage(parseInt(a.find("input").val()))}))}}}(jQuery),define("bootstrap-table-jumpto",["bootstrap-table"],function(t){return function(){return t.$.fn.bootstrapTable.defaults}}(this)),function(t){"use strict";function e(t){var e=0,a=0,r=0,s=0;return"detail"in t&&(a=t.detail),"wheelDelta"in t&&(a=-t.wheelDelta/120),"wheelDeltaY"in t&&(a=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=a,a=0),r=e*i,s=a*i,"deltaY"in t&&(s=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||s)&&t.deltaMode&&(1===t.deltaMode?(r*=n,s*=n):(r*=o,s*=o)),r&&!e&&(e=r<1?-1:1),s&&!a&&(a=s<1?-1:1),{spinX:e,spinY:a,pixelX:r,pixelY:s}}var i=10,n=40,o=800,a=null,r=function(){if(null===a){var e=t("
").addClass("fixed-table-scroll-inner"),i=t("
").addClass("fixed-table-scroll-outer"),n=void 0,o=void 0;i.append(e),t("body").append(i),n=e[0].offsetWidth,i.css("overflow","scroll"),o=e[0].offsetWidth,n===o&&(o=i[0].clientWidth),i.remove(),a=n-o}return a},s=function(t){return t[0].scrollHeight>t[0].clientHeight?15:0};t.extend(t.fn.bootstrapTable.defaults,{fixedColumns:!1,fixedNumber:0,fixedRightNumber:0});var l=t.fn.bootstrapTable.Constructor,c=l.prototype.initBody,d=l.prototype.initContainer,u=l.prototype.trigger,p=l.prototype.hideLoading,h=l.prototype.updateSelected;l.prototype.fixedColumnsSupported=function(){var t=this;return t.options.fixedColumns&&!t.options.detailView&&!t.options.cardView},l.prototype.initFixedContainer=function(){this.options.fixedNumber&&(0==this.$tableContainer.find(".fixed-columns").length&&this.$tableContainer.append('
'),this.$fixedColumns=this.$tableContainer.find(".fixed-columns")),this.options.fixedRightNumber&&(0==this.$tableContainer.find(".fixed-columns-right").length&&this.$tableContainer.append('
'),this.$fixedColumnsRight=this.$tableContainer.find(".fixed-columns-right"))},l.prototype.initContainer=function(){d.apply(this,Array.prototype.slice.apply(arguments)),this.initFixedContainer()},l.prototype.initBody=function(){c.apply(this,Array.prototype.slice.apply(arguments)),this.fixedColumnsSupported()&&(this.options.showHeader&&this.options.height||(this.initFixedColumnsBody(),this.initFixedColumnsEvents()))},l.prototype.trigger=function(){var t=this;u.apply(this,Array.prototype.slice.apply(arguments)),"pre-body"===arguments[0]&&this.options.cardView&&this.$tableBody.css("height","auto"),"toggle"===arguments[0]&&(arguments[1]?(this.$tableBody.css("height","auto"),this.$fixedColumns&&this.$fixedColumns.hide(),this.$fixedColumnsRight&&this.$fixedColumnsRight.hide()):(this.$tableBody.css("height","100%"),this.$fixedColumns&&this.$fixedColumns.show(),this.$fixedColumnsRight&&this.$fixedColumnsRight.show(),this.$fixedHeaderRight&&this.$fixedHeaderRight.scrollLeft(this.$tableBody.find("table").width()),this.$fixedBodyRight&&this.$fixedBodyRight.scrollLeft(this.$tableBody.find("table").width()))),t.fixedColumnsSupported()&&("post-header"===arguments[0]?this.initFixedColumnsHeader():"scroll-body"===arguments[0]?(this.needFixedColumns&&this.options.fixedNumber&&this.$fixedBody&&this.$fixedBody.scrollTop(this.$tableBody.scrollTop()),this.needFixedColumns&&this.options.fixedRightNumber&&this.$fixedBodyRight&&this.$fixedBodyRight.scrollTop(this.$tableBody.scrollTop())):"load-success"===arguments[0]&&this.hideLoading())},l.prototype.updateSelected=function(){var e=this;h.apply(this,Array.prototype.slice.apply(arguments)),this.fixedColumnsSupported()&&this.$tableBody.find("tr").each(function(i,n){var o=t(n),a=o.data("index"),r=o.attr("class"),s='[name="'+e.options.selectItemName+'"]',l=o.find(s);if(void 0!==a){var c=function(t,i){var n=i.find('tr[data-index="'+a+'"]');n.attr("class",r),l.length&&n.find(s).prop("checked",l.prop("checked")),e.$selectAll.length&&t.add(i).find('[name="btSelectAll"]').prop("checked",e.$selectAll.prop("checked"))};e.$fixedBody&&e.options.fixedNumber&&c(e.$fixedHeader,e.$fixedBody),e.$fixedBodyRight&&e.options.fixedRightNumber&&c(e.$fixedHeaderRight,e.$fixedBodyRight)}})},l.prototype.hideLoading=function(){p.apply(this,Array.prototype.slice.apply(arguments)),this.needFixedColumns&&this.options.fixedNumber&&this.$fixedColumns.find(".fixed-table-loading").hide(),this.needFixedColumns&&this.options.fixedRightNumber&&this.$fixedColumnsRight.find(".fixed-table-loading").hide()},l.prototype.initFixedColumnsHeader=function(){var t=this;this.options.height?this.needFixedColumns=this.$tableHeader.outerWidth(!0)a.clientWidth?r():0,l=t(".fixed-table-pagination",e.$tableContainer).height();void 0!==e.options.height&&(l=0),i.css({height:"calc(100% - "+(l+s)+"px)"}),o.css({height:"calc(100% - "+n.height()+"px)",overflow:"hidden"})};return t(window).on("resize",s),s(),o};this.needFixedColumns&&this.options.fixedNumber&&(this.$fixedBody=i(this.$fixedColumns,this.$fixedHeader)),this.needFixedColumns&&this.options.fixedRightNumber&&(this.$fixedBodyRight=i(this.$fixedColumnsRight,this.$fixedHeaderRight),this.$fixedBodyRight.scrollLeft(this.$fixedBodyRight.find("table").width()),this.$fixedBodyRight.css("overflow-y","hidden"))},l.prototype.getFixedColumnsWidth=function(t){var e=this.getVisibleFields(),i=0,n=this.options.fixedNumber;t&&(e=e.reverse(),n=this.options.fixedRightNumber,this.$fixedColumnsRight.css("right",s(this.$tableBody)));for(var o=0;o-1,a=o?"DOMMouseScroll":"mousewheel",r=function(t,n){var o=e(t),a=Math.ceil(o.pixelY),r=i.$tableBody.scrollTop()+a;(a<0&&r>0||a>0&&r table > tbody > tr[data-index] > td").off("click dblclick").on("click dblclick",function(e){var n=t(this).closest("tr[data-index]").data("index");t(i.$selectItem[n]).closest("tr[data-index]").find(">td:eq("+t(this).index()+")").trigger("click")})),t("div.fixed-table-body").off("scroll"),this.$tableBody.off("scroll").on("scroll",function(t){i.$tableHeader.scrollLeft(0),i.$tableBody.scrollLeft()>0&&(i.$tableHeader.scrollLeft(i.$tableBody.scrollLeft()),i.options.showFooter&&!i.options.cardView&&i.$tableFooter.scrollLeft(i.$tableBody.scrollLeft()));var e=i.$tableBody.scrollTop();i.$fixedBody&&i.$fixedBody.scrollTop(e),i.$fixedBodyRight&&i.$fixedBodyRight.scrollTop(e)}),this.needFixedColumns&&this.options.fixedRightNumber&&(this.$fixedBodyRight.find("tr").hover(function(t){n(t,!0)},function(t){n(t,!1)}),this.$fixedBodyRight[0].addEventListener(a,function(t){r(t,i.$fixedBodyRight[0])}),this.$fixedBodyRight.find('input[name="'+this.options.selectItemName+'"]').off("click").on("click",function(e){e.stopImmediatePropagation();var n=t(e.target).data("index");t(i.$selectItem[n]).trigger("click")}),this.$fixedBodyRight.find("> table > tbody > tr[data-index] > td").off("click dblclick").on("click dblclick",function(e){var n=t(this).closest("tr[data-index]").data("index");t(i.$selectItem[n]).closest("tr[data-index]").find(">td:eq("+t(this).index()+")").trigger("click")})),this.options.filterControl&&t(this.$fixedColumns).off("keyup change").on("keyup change",function(e){var n=t(e.target),o=n.val(),a=n.parents("th").data("field"),r=i.$header.find('th[data-field="'+a+'"]');if(n.is("input"))r.find("input").val(o);else if(n.is("select")){var s=r.find("select");s.find("option[selected]").removeAttr("selected"),s.find('option[value="'+o+'"]').attr("selected",!0)}i.triggerSearch()})}}(jQuery),define("bootstrap-table-fixed-columns",["bootstrap-table"],function(t){return function(){return t.$.fn.bootstrapTable.defaults}}(this)),define("table",["jquery","bootstrap","moment","moment/locale/zh-cn","bootstrap-table","bootstrap-table-lang","bootstrap-table-export","bootstrap-table-commonsearch","bootstrap-table-template","bootstrap-table-jumpto","bootstrap-table-fixed-columns"],function(t,e,i){var n={list:{},defaults:{url:"",sidePagination:"server",method:"get",toolbar:".toolbar",search:!0,cache:!1,commonSearch:!0,searchFormVisible:!1,titleForm:"",idTable:"commonTable",showExport:!0,exportDataType:"auto",exportTypes:["json","xml","csv","txt","doc","excel"],exportOptions:{fileName:"export_"+i().format("YYYY-MM-DD"),preventInjection:!1,mso:{onMsoNumberFormat:function(e,i,n){return isNaN(t(e).text())?"":"\\@"}},ignoreColumn:[0,"operate"]},pageSize:Config.pagesize||localStorage.getItem("pagesize")||10,pageList:[10,15,20,25,50,"All"],pagination:!0,clickToSelect:!0,dblClickToEdit:!0,singleSelect:!1,showRefresh:!1,showJumpto:!0,locale:"zh-cn"===Config.language?"zh-CN":"en-US",showToggle:!0,showColumns:!0,pk:"id",sortName:"id",sortOrder:"desc",paginationFirstText:__("First"),paginationPreText:__("Previous"),paginationNextText:__("Next"),paginationLastText:__("Last"),cardView:!1,iosCardView:!0,checkOnInit:!0,escape:!0,fixDropdownPosition:!0,dragCheckboxMultiselect:!0,selectedIds:[],selectedData:[],extend:{index_url:"",add_url:"",edit_url:"",del_url:"",import_url:"",multi_url:"",dragsort_url:"ajax/weigh"}},columnDefaults:{align:"center",valign:"middle"},config:{checkboxtd:"tbody>tr>td.bs-checkbox",toolbar:".toolbar",refreshbtn:".btn-refresh",addbtn:".btn-add",editbtn:".btn-edit",delbtn:".btn-del",importbtn:".btn-import",multibtn:".btn-multi",disabledbtn:".btn-disabled",editonebtn:".btn-editone",restoreonebtn:".btn-restoreone",destroyonebtn:".btn-destroyone",restoreallbtn:".btn-restoreall",destroyallbtn:".btn-destroyall",dragsortfield:"weigh"},button:{edit:{name:"edit",icon:"fa fa-pencil",title:__("Edit"),extend:'data-toggle="tooltip" data-container="body"',classname:"btn btn-xs btn-success btn-editone"},del:{name:"del",icon:"fa fa-trash",title:__("Del"),extend:'data-toggle="tooltip" data-container="body"',classname:"btn btn-xs btn-danger btn-delone"},dragsort:{name:"dragsort",icon:"fa fa-arrows",title:__("Drag to sort"),extend:'data-toggle="tooltip"',classname:"btn btn-xs btn-primary btn-dragsort"}},api:{init:function(e,i,o){e=e||{},i=i||{},o=o||{},t.fn.bootstrapTable.Constructor.prototype.getSelectItem=function(){return this.$selectItem};var a=t.fn.bootstrapTable.Constructor.prototype.onPageListChange;t.fn.bootstrapTable.Constructor.prototype.onPageListChange=function(){return a.apply(this,Array.prototype.slice.apply(arguments)),localStorage.setItem("pagesize",this.options.pageSize),!1},t.extend(!0,t.fn.bootstrapTable.defaults,n.defaults,e),t.extend(t.fn.bootstrapTable.columnDefaults,n.columnDefaults,i),t.extend(t.fn.bootstrapTable.locales[n.defaults.locale],{formatCommonSearch:function(){return __("Common search")},formatCommonSubmitButton:function(){return __("Search")},formatCommonResetButton:function(){return __("Reset")},formatCommonCloseButton:function(){return __("Close")},formatCommonChoose:function(){return __("Choose")},formatJumpto:function(){return __("Go")}},o),t.fn.bootstrapTable.defaults.iosCardView&&navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(n.defaults.cardView=!0,
+t.fn.bootstrapTable.defaults.cardView=!0),void 0!==e.exportTypes&&(t.fn.bootstrapTable.defaults.exportTypes=e.exportTypes)},bindevent:function(e){var i=e.closest(".bootstrap-table"),o=e.bootstrapTable("getOptions"),a=t(o.toolbar,i),r=t(".btn-selected-tips",i);0===r.length&&(r=t(' '+__("Multiple selection mode: %s checked","0 ")+" ").appendTo(a)),r.off("click").on("click",function(t){e.trigger("uncheckbox"),e.bootstrapTable("refresh")}),e.on("uncheckbox",function(t,e,i){o.selectedIds=[],o.selectedData=[],r.tooltip("hide"),r.addClass("hide")}),e.on("load-error.bs.table",function(t,e,i){0!==i.status&&Toastr.error(__("Unknown data format"))}),e.on("load-success.bs.table",function(t,e){void 0===e.rows&&void 0!==e.code&&Toastr.error(e.msg)}),e.on("refresh.bs.table",function(e,i,o){t(n.config.refreshbtn,a).find(".fa").addClass("fa-spin"),t(".layui-layer-autocontent").remove()}),e.on("search.bs.table common-search.bs.table",function(t,i,n){e.trigger("uncheckbox")}),o.dblClickToEdit&&e.on("dbl-click-row.bs.table",function(e,i,o,a){t(n.config.editonebtn,o).trigger("click")}),e.on("pre-body.bs.table",function(e,i){o.maintainSelected&&t.each(i,function(e,i){i[o.stateField]=t.inArray(i[o.pk],o.selectedIds)>-1})}),e.on("post-body.bs.table",function(i,r){if(t(n.config.refreshbtn,a).find(".fa").removeClass("fa-spin"),t(n.config.checkboxtd+":first",e).find("input[type='checkbox'][data-index]").length>0){var s,l,c,d=!1,u=!1,p=function(i){if(d){var o=Math.min(i.pageX,s),a=Math.min(i.pageY,l),r=Math.abs(s-i.pageX),u=Math.abs(l-i.pageY);c.css({left:o+"px",top:a+"px",width:r+"px",height:u+"px"});var p={x:o,y:a,width:r,height:u};t(n.config.checkboxtd,e).each(function(){var e=t("input:checkbox",this),i=this.getBoundingClientRect();i.x+=document.documentElement.scrollLeft,i.y+=document.documentElement.scrollTop;var n=i.x,o=i.y,a=i.x+i.width,r=i.y+i.height,s=p.x,l=p.y,c=p.x+p.width,d=p.y+p.height;n<=c&&a>=s&&o<=d&&r>=l?t(this).hasClass("overlaped")||(t(this).addClass("overlaped"),e.trigger("click")):t(this).hasClass("overlaped")&&(t(this).removeClass("overlaped"),e.trigger("click"))})}},h=function(){return!1},f=function(){d&&(t(document).off("mousemove",p),t(document).off("selectstart",h),c.remove()),d=!1,u=!1,t(document.body).css({MozUserSelect:"",webkitUserSelect:""}).attr("unselectable","off")};t(n.config.checkboxtd,e).on("mousedown",function(e){if(2===e.button||t(e.target).is("input"))return!1;s=e.pageX,l=e.pageY,u=!0}).on("mousemove",function(i){u&&!d&&(d=!0,c=t("
"),c.css({position:"absolute",width:0,height:0,border:"1px dashed blue",background:"#0029ff",left:i.pageX+"px",top:i.pageY+"px",opacity:.1}),c.appendTo(document.body),t(document.body).css({MozUserSelect:"none",webkitUserSelect:"none"}).attr("unselectable","on"),t(document).on("mousemove",p).on("mouseup",f).on("selectstart",h),o.dragCheckboxMultiselect&&t(n.config.checkboxtd,e).removeClass("overlaped"))})}});var s=o.exportDataType;if(e.on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table post-body.bs.table",function(i){var l=[];t.each(e.bootstrapTable("getData"),function(t,e){l.push(void 0!==e[o.pk]?e[o.pk]:"")});var c=n.api.selectedids(e,!0),d=n.api.selecteddata(e,!0);o.maintainSelected?(o.selectedIds=o.selectedIds.filter(function(e,i,n){return-1===t.inArray(e,l)}).concat(c),o.selectedData=o.selectedData.filter(function(e,i,n){return-1===t.inArray(e[o.pk],l)}).concat(d),o.selectedIds.length>c.length?(t("b",r).text(o.selectedIds.length),r.removeClass("hide")):r.addClass("hide")):(o.selectedIds=c,o.selectedData=d),"auto"===s&&(o.exportDataType=c.length>0?"selected":"all",0===t(".export .exporttips").length&&t(".export .dropdown-menu").prepend(" "),t(".export .exporttips").html("导出记录:"+(c.length>0?"选中":"全部"))),t(n.config.disabledbtn,a).toggleClass("disabled",!o.selectedIds.length)}),e.on("common-search.bs.table",function(i,n,o){var a=t(".panel-heading [data-field]",e.closest(".panel-intro")),r=a.data("field"),s=t("li.active > a",a).data("value");o.filter&&void 0!==o.filter[r]&&o.filter[r]!=s&&(t("li",a).removeClass("active"),t("li > a[data-value='"+o.filter[r]+"']",a).parent().addClass("active"))}),t('.panel-heading [data-field] a[data-toggle="tab"]',e.closest(".panel-intro")).on("shown.bs.tab",function(i){var n=t(this).closest("[data-field]").data("field"),o=t(this).data("value"),a=t("[name='"+n+"']",e.closest(".bootstrap-table").find(".commonsearch-table"));return"SELECT"===a.prop("tagName")?t("option[value='"+o+"']",a).prop("selected",!0):a.val(o),e.trigger("uncheckbox"),e.bootstrapTable("getOptions").totalRows=0,e.bootstrapTable("refresh",{pageNumber:1}),!1}),t("form",e.closest(".bootstrap-table").find(".commonsearch-table")).on("reset",function(){setTimeout(function(){},0),t(".panel-heading [data-field] li",e.closest(".panel-intro")).removeClass("active"),t(".panel-heading [data-field] li:first",e.closest(".panel-intro")).addClass("active")}),a.on("click",n.config.refreshbtn,function(){e.bootstrapTable("refresh")}),a.on("click",n.config.addbtn,function(){var i=n.api.selectedids(e),a=o.extend.add_url;-1!==a.indexOf("{ids}")&&(a=n.api.replaceurl(a,{ids:i.length>0?i.join(","):0},e)),Fast.api.open(a,t(this).data("original-title")||t(this).attr("title")||__("Add"),t(this).data()||{})}),t(n.config.importbtn,a).length>0&&require(["upload"],function(i){i.api.upload(t(n.config.importbtn,a),function(t,i){Fast.api.ajax({url:o.extend.import_url,data:{file:t.url}},function(t,i){e.trigger("uncheckbox"),e.bootstrapTable("refresh")})})}),a.on("click",n.config.editbtn,function(){var i=this;if(!(n.api.selectedids(e).length>10)){var a=t(i).data("title")||t(i).attr("title")||__("Edit"),r=t(i).data()||{};delete r.title,t.each(n.api.selecteddata(e),function(i,s){var l=o.extend.edit_url;s=t.extend({},s||{},{ids:s[o.pk]}),l=n.api.replaceurl(l,s,e),Fast.api.open(l,"function"==typeof a?a.call(e,s):a,r)})}}),t(document).on("click",n.config.destroyallbtn,function(){var i=this;return Layer.confirm(__("Are you sure you want to truncate?"),function(){var n=t(i).data("url")?t(i).data("url"):t(i).attr("href");Fast.api.ajax(n,function(){Layer.closeAll(),e.trigger("uncheckbox"),e.bootstrapTable("refresh")},function(){Layer.closeAll()})}),!1}),t(document).on("click",n.config.restoreallbtn,function(){var i=this,n=t(i).data("url")?t(i).data("url"):t(i).attr("href");return Fast.api.ajax(n,function(){Layer.closeAll(),e.trigger("uncheckbox"),e.bootstrapTable("refresh")},function(){Layer.closeAll()}),!1}),t(document).on("click",n.config.restoreonebtn+","+n.config.destroyonebtn,function(){var i=this,a=t(i).data("url")?t(i).data("url"):t(i).attr("href"),r=n.api.getrowbyindex(e,t(i).data("row-index"));return Fast.api.ajax({url:a,data:{ids:r[o.pk]}},function(){e.trigger("uncheckbox"),e.bootstrapTable("refresh")}),!1}),a.on("click",n.config.multibtn,function(){var i=n.api.selectedids(e);n.api.multi(t(this).data("action"),i,e,this)}),a.on("click",n.config.delbtn,function(){var t=this,i=n.api.selectedids(e);Layer.confirm(__("Are you sure you want to delete the %s selected item?",i.length),{icon:3,title:__("Warning"),offset:0,shadeClose:!0,btn:[__("OK"),__("Cancel")]},function(o){n.api.multi("del",i,e,t),Layer.close(o)})}),require(["dragsort"],function(){t("tbody",e).dragsort({itemSelector:"tr:visible",dragSelector:"a.btn-dragsort",dragEnd:function(i,o){var a=t("a.btn-dragsort",this),r=e.bootstrapTable("getData"),s=r[parseInt(t(this).data("index"))],l=e.bootstrapTable("getOptions"),c=t.map(t("tbody tr:visible",e),function(e){return r[parseInt(t(e).data("index"))][l.pk]}),d=s[l.pk],u=void 0!==s.pid?s.pid:"",p={url:e.bootstrapTable("getOptions").extend.dragsort_url,data:{ids:c.join(","),changeid:d,pid:u,field:n.config.dragsortfield,orderway:l.sortOrder,table:l.extend.table,pk:l.pk}};Fast.api.ajax(p,function(i,n){var o=t(a).data("success")||t.noop;if("function"==typeof o&&!1===o.call(a,i,n))return!1;e.bootstrapTable("refresh")},function(i,n){var o=t(a).data("error")||t.noop;if("function"==typeof o&&!1===o.call(a,i,n))return!1;e.bootstrapTable("refresh")})},placeHolderTemplate:""})}),e.on("click","input[data-id][name='checkbox']",function(i){var n=t(this).data("id");e.bootstrapTable(t(this).prop("checked")?"checkBy":"uncheckBy",{field:o.pk,values:[n]})}),e.on("click","[data-id].btn-change",function(i){i.preventDefault();var o=t.proxy(function(){n.api.multi(t(this).data("action")?t(this).data("action"):"",[t(this).data("id")],e,this)},this);void 0!==t(this).data("confirm")?Layer.confirm(t(this).data("confirm"),function(t){o(),Layer.close(t)}):o()}),e.on("click","[data-id].btn-edit",function(i){i.preventDefault();var a=t(this).data("id"),r=n.api.getrowbyid(e,a);r.ids=a;var s=n.api.replaceurl(o.extend.edit_url,r,e);Fast.api.open(s,t(this).data("original-title")||t(this).attr("title")||__("Edit"),t(this).data()||{})}),e.on("click","[data-id].btn-del",function(i){i.preventDefault();var o=t(this).data("id"),a=this;Layer.confirm(__("Are you sure you want to delete this item?"),{icon:3,title:__("Warning"),shadeClose:!0,btn:[__("OK"),__("Cancel")]},function(t){n.api.multi("del",o,e,a),Layer.close(t)})}),e.on("mouseenter mouseleave",".autocontent",function(e){var i=t(".autocontent-item",this).get(0);i&&("mouseenter"===e.type?i.scrollWidth>i.offsetWidth&&0===t(".autocontent-caret",this).length&&t(this).append("
"):t(".autocontent-caret",this).remove())}),e.on("click mouseenter",".autocontent-caret",function(e){var i=t(this).prev().hasClass("autocontent-hover");if(i||"mouseenter"!==e.type){var n=t(this).prev().text(),o=t(this).parent().get(0).getBoundingClientRect(),a=Layer.open({id:"autocontent",skin:"layui-layer-fast layui-layer-autocontent",title:!1,content:n,btn:!1,anim:!1,shade:0,isOutAnim:!1,area:"auto",maxWidth:450,maxHeight:350,offset:[o.y,o.x]});i&&t(document).one("mouseleave","#layui-layer"+a,function(){Layer.close(a)});var r=function(e){0===t(e.target).closest(".layui-layer").length&&(Layer.close(a),t(document).off("mousedown",r))};t(document).off("mousedown",r).on("mousedown",r)}}),o.fixDropdownPosition){var l=e.closest(".fixed-table-body");e.on("show.bs.dropdown fa.event.refreshdropdown",".btn-group",function(e){var i,n,o,a=t(".dropdown-menu",this),r=t(this),s=a.hasClass("pull-right")||a.hasClass("dropdown-menu-right");o="fixed",n=r.offset().top-t(window).scrollTop()+r.outerHeight(),n+a.outerHeight()>t(window).height()&&(n=r.offset().top-a.outerHeight()-5),i=s?r.offset().left+r.outerWidth()-a.outerWidth():r.offset().left,(i||n)&&a.css({position:o,left:i,top:n,right:"inherit"})});var c=function(){t(".btn-group.open",e).length>0&&"fixed"==t(".btn-group.open .dropdown-menu",e).css("position")&&t(".btn-group.open",e).trigger("fa.event.refreshdropdown")};t(window).on("scroll",function(){c()}),l.on("scroll",function(){c()})}var d=e.attr("id");return n.list[d]=e,e},multi:function(e,i,n,o){var a=n.bootstrapTable("getOptions"),r=o?t(o).data():{};i=t.isArray(i)?i.join(","):i,a={url:void 0!==r.url?r.url:"del"==e?a.extend.del_url:a.extend.multi_url,data:{action:e,ids:i,params:void 0!==r.params?"object"==typeof r.params?t.param(r.params):r.params:""}},Fast.api.ajax(a,function(e,i){n.trigger("uncheckbox");var a=t(o).data("success")||t.noop;if("function"==typeof a&&!1===a.call(o,e,i))return!1;n.bootstrapTable("refresh")},function(e,i){var n=t(o).data("error")||t.noop;if("function"==typeof n&&!1===n.call(o,e,i))return!1})},events:{operate:{"click .btn-editone":function(e,i,o,a){e.stopPropagation(),e.preventDefault();var r=t(this).closest("table"),s=r.bootstrapTable("getOptions"),l=o[s.pk];o=t.extend({},o||{},{ids:l});var c=s.extend.edit_url;Fast.api.open(n.api.replaceurl(c,o,r),t(this).data("original-title")||t(this).attr("title")||__("Edit"),t(this).data()||{})},"click .btn-delone":function(i,o,a,r){i.stopPropagation(),i.preventDefault();var s=this,l=t(s).offset().top-t(window).scrollTop(),c=t(s).offset().left-t(window).scrollLeft()-260;l+154>t(window).height()&&(l-=154),t(window).width()<480&&(l=c=e),Layer.confirm(__("Are you sure you want to delete this item?"),{icon:3,title:__("Warning"),offset:[l,c],shadeClose:!0,btn:[__("OK"),__("Cancel")]},function(e){var i=t(s).closest("table"),o=i.bootstrapTable("getOptions");n.api.multi("del",a[o.pk],i,s),Layer.close(e)})}},image:{"click .img-center":function(e,i,n,o){var a=[];i=null===i?"":i.toString();var r,s=""!=i?i.split(","):[];t.each(s,function(t,e){r=Fast.api.cdnurl(e),a.push({src:r,thumb:r.match(/^(\/|data:image\\)/)?r:r+Config.upload.thumbstyle})}),Layer.photos({photos:{start:t(this).parent().index(),data:a},anim:5})}}},formatter:{icon:function(t,e,i){return t=null===t?"":t.toString(),'-1?t:"fa fa-"+t)+'"> '+t},image:function(t,e,i){return n.api.formatter.images.call(this,t,e,i)},images:function(e,i,n){e=null==e||0===e.length?"":e.toString();var o,a=void 0!==this.classname?this.classname:"img-sm img-center",r=""!==e?-1===e.indexOf("data:image/")?e.split(","):[e]:[],s=[];return t.each(r,function(t,e){e=e||"/assets/img/blank.gif",o=Fast.api.cdnurl(e,!0),o=!Config.upload.thumbstyle||o.match(/^(\/|data:image\/)/)||o.indexOf(Config.upload.thumbstyle.substring(0,1))>-1?o:o+Config.upload.thumbstyle,s.push(' ')}),s.join(" ")},file:function(t,e,i){return n.api.formatter.files.call(this,t,e,i)},files:function(e,i,n){e=null==e||0===e.length?"":e.toString();var o,a,r=void 0!==this.classname?this.classname:"img-sm img-center",s=""!==e?-1===e.indexOf("data:image/")?e.split(","):[e]:[],l=[];return t.each(s,function(t,e){e=Fast.api.cdnurl(e,!0),o=/[\.]?([a-zA-Z0-9]+)$/.exec(e),o=o?o[1]:"file",a=Fast.api.fixurl("ajax/icon?suffix="+o),l.push(' ')}),l.join(" ")},content:function(t,i,n){var o=this.width!=e?this.width.toString().match(/^\d+$/)?this.width+"px":this.width:"250px";return""+t+"
"},status:function(e,i,o){var a={normal:"success",hidden:"gray",deleted:"danger",locked:"info"};return void 0!==this.custom&&(a=t.extend(a,this.custom)),this.custom=a,this.icon="fa fa-circle",n.api.formatter.normal.call(this,e,i,o)},normal:function(e,i,n){var o=["primary","success","danger","warning","info","gray","red","yellow","aqua","blue","navy","teal","olive","lime","fuchsia","purple","maroon"],a={};void 0!==this.custom&&(a=t.extend(a,this.custom)),e=i[this.field]||e,e=null==e||0===e.length?"":e.toString();var r="object"==typeof this.searchList?Object.keys(this.searchList):[],n=r.indexOf(e),s=e&&void 0!==a[e]?a[e]:null,l=n>-1?this.searchList[e]:null,c=void 0!==this.icon?this.icon:null;s||(s=n>-1&&void 0!==o[n]?o[n]:"primary"),l||(l=__(e.charAt(0).toUpperCase()+e.slice(1))),e=Fast.api.escape(e),l=Fast.api.escape(l);var d=''+(c?' ':"")+l+" ";return 0!=this.operate&&(d=''+d+" "),d},toggle:function(t,e,i){var n=this.table,o=n?n.bootstrapTable("getOptions"):{},a=o.pk||"id",r=void 0!==this.color?this.color:"success",s=void 0!==this.yes?this.yes:1,l=void 0!==this.no?this.no:0,c=void 0!==this.url?this.url:"",d="",u=!1;return void 0!==this.confirm&&(d="function"==typeof this.confirm?this.confirm.call(this,t,e,i):this.confirm),void 0!==this.disable&&(u="function"==typeof this.disable?this.disable.call(this,t,e,i):this.disable)," "},url:function(t,e,i){return''},search:function(t,i,n){var o=this.field;if(void 0!==this.customField){var a=this.customField.split(".").reduce(function(t,i){return null===t||t===e?"":t[i]},i);t=Fast.api.escape(a),o=this.customField}return''+t+" "},addtabs:function(t,e,i){var o=n.api.replaceurl(this.url||"",e,this.table),a=this.atitle?this.atitle:__("Search %s",t);return''+t+" "},dialog:function(t,e,i){var o=n.api.replaceurl(this.url||"",e,this.table),a=this.atitle?this.atitle:__("View %s",t);return''+t+" "},flag:function(i,n,o){var a=this;i=null==i||0===i.length?"":i.toString();var r={index:"success",hot:"warning",recommend:"danger",new:"info"};void 0!==this.custom&&(r=t.extend(r,this.custom));var s=this.field;if(void 0!==this.customField){var l=this.customField.split(".").reduce(function(t,i){return null===t||t===e?"":t[i]},n);i=Fast.api.escape(l),s=this.customField}if("object"==typeof a.searchList&&"function"==typeof a.searchList.then&&t.when(a.searchList).done(function(e){e.data&&e.data.searchlist&&t.isArray(e.data.searchlist)?a.searchList=e.data.searchlist:e.constructor!==Array&&e.constructor!==Object||(a.searchList=e)}),"object"==typeof a.searchList&&void 0===a.custom){var c=0,d=Object.values(r);t.each(a.searchList,function(t,e){void 0===r[t]&&(r[t]=d[c],c=void 0===d[c+1]?0:c+1)})}var u,p,h,f=[],m=t.isArray(i)?i:""!=i?i.split(","):[];return t.each(m,function(t,e){if(""===(e=null==e||0===e.length?"":e.toString()))return!0;u=e&&void 0!==r[e]?r[e]:"primary",p=void 0!==a.searchList&&void 0!==a.searchList[e]?a.searchList[e]:__(e.charAt(0).toUpperCase()+e.slice(1)),e=Fast.api.escape(e),p=Fast.api.escape(p),h=''+p+" ",a.operate?f.push(''+h+" "):f.push(h)}),f.join(" ")},label:function(t,e,i){return n.api.formatter.flag.call(this,t,e,i)},datetime:function(t,e,n){var o=void 0===this.datetimeFormat?"YYYY-MM-DD HH:mm:ss":this.datetimeFormat;return isNaN(t)?t?i(t).format(o):__("None"):t?i(1e3*parseInt(t)).format(o):__("None")},operate:function(e,i,o){var a=this.table,r=a?a.bootstrapTable("getOptions"):{},s=t.extend([],this.buttons||[]),l=[];return s.forEach(function(t){l.push(t.name)}),""!==r.extend.dragsort_url&&-1===l.indexOf("dragsort")&&s.push(n.button.dragsort),""!==r.extend.edit_url&&-1===l.indexOf("edit")&&(n.button.edit.url=r.extend.edit_url,s.push(n.button.edit)),""!==r.extend.del_url&&-1===l.indexOf("del")&&s.push(n.button.del),n.api.buttonlink(this,s,e,i,o,"operate")},buttons:function(e,i,o){var a=t.extend([],this.buttons||[]);return n.api.buttonlink(this,a,e,i,o,"buttons")}},buttonlink:function(e,i,o,a,r,s){var l=e.table;e.clickToSelect=!1,s=void 0===s?"buttons":s;var c,d,u,p,h,f,m,g,v,y,b,x,w,_=l?l.bootstrapTable("getOptions"):{},k=[],C=e.fieldIndex,S={};if(t.each(i,function(t,e){if("operate"===s){if("dragsort"===e.name&&void 0===a[n.config.dragsortfield])return!0;if(["add","edit","del","multi","dragsort"].indexOf(e.name)>-1&&!_.extend[e.name+"_url"])return!0}var i=l.data(s+"-"+e.name);if(void 0===i||i){if(c="function"==typeof e.hidden?e.hidden.call(l,a,e):void 0!==e.hidden&&e.hidden)return!0;if(!(d="function"==typeof e.visible?e.visible.call(l,a,e):void 0===e.visible||e.visible))return!0;x=e.dropdown?e.dropdown:"",p=e.url?e.url:"",p="function"==typeof p?p.call(l,a,e):p?Fast.api.fixurl(n.api.replaceurl(p,a,l)):"javascript:;",h=e.classname?e.classname:x?"btn-"+name+"one":"btn-primary btn-"+name+"one",f=e.icon?e.icon:"",m="function"==typeof e.text?e.text.call(l,a,e):e.text?e.text:"",g="function"==typeof e.title?e.title.call(l,a,e):e.title?e.title:m,v=e.refresh?'data-refresh="'+e.refresh+'"':"",y="function"==typeof e.confirm?e.confirm.call(l,a,e):void 0!==e.confirm&&e.confirm,y=y?'data-confirm="'+y+'"':"",b="function"==typeof e.extend?e.extend.call(l,a,e):void 0!==e.extend?e.extend:"",u="function"==typeof e.disable?e.disable.call(l,a,e):void 0!==e.disable&&e.disable,u&&(h+=" disabled"),w=' '+(m?" "+m:"")+" ",x?(void 0===S[x]&&(S[x]=[]),S[x].push(w)):k.push(w)}}),!t.isEmptyObject(S)){var T=[];t.each(S,function(t,e){T.push(''+t+'
")}),k.unshift(T.join(" "))}return k.join(" ")},replaceurl:function(t,i,n){var o=n?n.bootstrapTable("getOptions"):null,a=o?i[o.pk]:0;return i.ids=a||(void 0!==i.ids?i.ids:0),t=null==t||0===t.length?"":t.toString(),t=t.match(/(?=([?&]ids=)|(\/ids\/)|(\{ids}))/i)?t:t+(t.match(/(\?|&)+/)?"&ids=":"/ids/")+"{ids}",t=t.replace(/\{(.*?)\}/gi,function(t){t=t.substring(1,t.length-1);var n=t.split(".").reduce(function(t,i){return null===t||t===e?"":t[i]},i);return n=Fast.api.escape(n)})},selectedids:function(e,i){var n=e.bootstrapTable("getOptions");return!i&&n.maintainSelected?n.selectedIds:t.map(e.bootstrapTable("getSelections"),function(t){return t[n.pk]})},selecteddata:function(t,e){var i=t.bootstrapTable("getOptions");return!e&&i.maintainSelected?i.selectedData:t.bootstrapTable("getSelections")},toggleattr:function(e){t("input[type='checkbox']",e).trigger("click")},getrowdata:function(t,e){e=parseInt(e);var i=t.bootstrapTable("getData");return void 0!==i[e]?i[e]:null},getrowbyindex:function(t,e){return n.api.getrowdata(t,e)},getrowbyid:function(e,i){var o={},a=e.bootstrapTable("getOptions");return t.each(n.api.selecteddata(e),function(t,e){if(e[a.pk]==i)return o=e,!1}),o}}};return n}),function(t){t.fn.dragsort=function(e){if("destroy"==e)return void t(this.selector).trigger("dragsort-uninit");var i=t.extend({},t.fn.dragsort.defaults,e),n=[],o=null,a=null;return this.each(function(e,r){t(r).is("table")&&1==t(r).children().length&&t(r).children().is("tbody")&&(r=t(r).children().get(0));var s={draggedItem:null,placeHolderItem:null,pos:null,offset:null,offsetLimit:null,scroll:null,container:r,init:function(){i.tagName=""==i.tagName?0==t(this.container).children().length?"li":t(this.container).children().get(0).tagName.toLowerCase():i.tagName,""==i.itemSelector&&(i.itemSelector=i.tagName),""==i.dragSelector&&(i.dragSelector=i.tagName),""==i.placeHolderTemplate&&(i.placeHolderTemplate="<"+i.tagName+"> "+i.tagName+">"),t(this.container).attr("data-listidx",e).mousedown(this.grabItem).bind("dragsort-uninit",this.uninit),this.styleDragHandlers(!0)},uninit:function(){var e=n[t(this).attr("data-listidx")];t(e.container).unbind("mousedown",e.grabItem).unbind("dragsort-uninit"),e.styleDragHandlers(!1)},getItems:function(){return t(this.container).children(i.itemSelector)},styleDragHandlers:function(e){this.getItems().map(function(){return t(this).is(i.dragSelector)?this:t(this).find(i.dragSelector).get()}).css("cursor",e?"pointer":"")},grabItem:function(e){var o=n[t(this).attr("data-listidx")],a=t(e.target).closest("[data-listidx] > "+i.tagName).get(0),r=o.getItems().filter(function(){return this==a}).length>0;if(!(1!=e.which||t(e.target).is(i.dragSelectorExclude)||t(e.target).closest(i.dragSelectorExclude).length>0)&&r&&(t(e.target).is(i.dragSelector)||t(e.target).closest(i.dragSelector).length)){e.preventDefault();for(var s=e.target;!t(s).is(i.dragSelector);){if(s==this)return;s=s.parentNode}t(s).attr("data-cursor",t(s).css("cursor")),t(s).css("cursor","move");var l=this,c=function(){o.dragStart.call(l,e),t(o.container).unbind("mousemove",c)};t(o.container).mousemove(c).mouseup(function(){t(o.container).unbind("mousemove",c),t(s).css("cursor",t(s).attr("data-cursor"))})}},dragStart:function(e){null!=o&&null!=o.draggedItem&&o.dropItem(),o=n[t(this).attr("data-listidx")],o.draggedItem=t(e.target).closest("[data-listidx] > "+i.tagName),o.draggedItem.attr("data-origpos",t(this).attr("data-listidx")+"-"+t(o.container).children().index(o.draggedItem));var a=parseInt(o.draggedItem.css("marginTop")),r=parseInt(o.draggedItem.css("marginLeft"));if(o.offset=o.draggedItem.offset(),o.offset.top=e.pageY-o.offset.top+(isNaN(a)?0:a)-1,o.offset.left=e.pageX-o.offset.left+(isNaN(r)?0:r)-1,!i.dragBetween){var s=0==t(o.container).outerHeight()?Math.max(1,Math.round(.5+o.getItems().length*o.draggedItem.outerWidth()/t(o.container).outerWidth()))*o.draggedItem.outerHeight():t(o.container).outerHeight();o.offsetLimit=t(o.container).offset(),o.offsetLimit.right=o.offsetLimit.left+t(o.container).outerWidth()-o.draggedItem.outerWidth(),o.offsetLimit.bottom=o.offsetLimit.top+s-o.draggedItem.outerHeight()}var l=o.draggedItem.height(),c=o.draggedItem.width();if("tr"==i.tagName?(o.draggedItem.children().each(function(){t(this).width(t(this).width())}),o.placeHolderItem=o.draggedItem.clone().attr("data-placeholder",!0),o.draggedItem.after(o.placeHolderItem),o.placeHolderItem.children().each(function(){t(this).html(" ")})):(o.draggedItem.after(i.placeHolderTemplate),o.placeHolderItem=o.draggedItem.next().css({height:l,width:c}).attr("data-placeholder",!0)),"td"==i.tagName){var d=o.draggedItem.closest("table").get(0);t("").appendTo("body").children().append(o.draggedItem)}var u=o.draggedItem.attr("style");o.draggedItem.attr("data-origstyle",u||""),o.draggedItem.css({position:"absolute",opacity:.8,"z-index":999,height:l,width:c}),o.scroll={moveX:0,moveY:0,maxX:t(document).width()-t(window).width(),maxY:t(document).height()-t(window).height()},o.scroll.scrollY=window.setInterval(function(){if(i.scrollContainer!=window)return void t(i.scrollContainer).scrollTop(t(i.scrollContainer).scrollTop()+o.scroll.moveY);var e=t(i.scrollContainer).scrollTop();(o.scroll.moveY>0&&e0)&&(t(i.scrollContainer).scrollTop(e+o.scroll.moveY),o.draggedItem.css("top",o.draggedItem.offset().top+o.scroll.moveY+1))},10),o.scroll.scrollX=window.setInterval(function(){if(i.scrollContainer!=window)return void t(i.scrollContainer).scrollLeft(t(i.scrollContainer).scrollLeft()+o.scroll.moveX);var e=t(i.scrollContainer).scrollLeft();(o.scroll.moveX>0&&e0)&&(t(i.scrollContainer).scrollLeft(e+o.scroll.moveX),o.draggedItem.css("left",o.draggedItem.offset().left+o.scroll.moveX+1))},10),t(n).each(function(t,e){e.createDropTargets(),e.buildPositionTable()}),o.setPos(e.pageX,e.pageY),t(document).bind("mousemove",o.swapItems),t(document).bind("mouseup",o.dropItem),i.scrollContainer!=window&&t(window).bind("wheel",o.wheel)},setPos:function(e,n){var a=n-this.offset.top,r=e-this.offset.left;i.dragBetween||(a=Math.min(this.offsetLimit.bottom,Math.max(a,this.offsetLimit.top)),r=Math.min(this.offsetLimit.right,Math.max(r,this.offsetLimit.left)));var s=this.draggedItem.offsetParent().not("body").offset();if(null!=s&&(a-=s.top,r-=s.left),i.scrollContainer==window)n-=t(window).scrollTop(),e-=t(window).scrollLeft(),n=Math.max(0,n-t(window).height()+5)+Math.min(0,n-5),e=Math.max(0,e-t(window).width()+5)+Math.min(0,e-5);else{var l=t(i.scrollContainer),c=l.offset();n=Math.max(0,n-l.height()-c.top)+Math.min(0,n-c.top),e=Math.max(0,e-l.width()-c.left)+Math.min(0,e-c.left)}o.scroll.moveX=0==e?0:e*i.scrollSpeed/Math.abs(e),o.scroll.moveY=0==n?0:n*i.scrollSpeed/Math.abs(n),this.draggedItem.css({top:a,left:r})},wheel:function(e){if(o&&i.scrollContainer!=window){var n=t(i.scrollContainer),a=n.offset();if(e=e.originalEvent,e.clientX>a.left&&e.clientXa.top&&e.clientY0?r.before(o.draggedItem):0==a[1]?t(n[a[0]].container).prepend(o.draggedItem):t(n[a[0]].container).append(o.draggedItem)}return o.draggedItem.removeAttr("data-origpos"),o.draggedItem=null,t(document).unbind("mousemove",o.swapItems),t(document).unbind("mouseup",o.dropItem),i.scrollContainer!=window&&t(window).unbind("wheel",o.wheel),!1}},swapItems:function(e){if(null==o.draggedItem)return!1;o.setPos(e.pageX,e.pageY);for(var r=o.findPos(e.pageX,e.pageY),s=o,l=0;-1==r&&i.dragBetween&&lo.draggedItem.offset().top||a.left>o.draggedItem.offset().left?t(s.pos[r].elm).before(o.placeHolderItem):t(s.pos[r].elm).after(o.placeHolderItem),d.each(function(){var e=c().eq(this.idx).get(0);this!=e&&c().index(this)t&&this.pos[i].tope)return i;return-1},createDropTargets:function(){i.dragBetween&&t(n).each(function(){var e=t(this.container).find("[data-placeholder]"),n=t(this.container).find("[data-droptarget]");e.length>0&&n.length>0?n.remove():0==e.length&&0==n.length&&("td"==i.tagName?t(i.placeHolderTemplate).attr("data-droptarget",!0).appendTo(this.container):t(this.container).append(o.placeHolderItem.removeAttr("data-placeholder").clone().attr("data-droptarget",!0)),o.placeHolderItem.attr("data-placeholder",!0))})}};s.init(),n.push(s)}),this},t.fn.dragsort.defaults={tagName:"",itemSelector:"",dragSelector:"",dragSelectorExclude:"input, textarea",dragEnd:function(){},dragBetween:!1,placeHolderTemplate:"",scrollContainer:window,scrollSpeed:5}}(jQuery),define("dragsort",function(){}),function(t){"use strict";function e(e){return this.each(function(){
+var i=t(this),n=i.data(d.dataKey),o=t.extend({},c,i.data(),n&&n.option,"object"==typeof e&&e);n||i.data(d.dataKey,n=new d(this,o))})}function i(e){return t(e).closest("div.sp_container").find("input.sp_input")}function n(){return this.each(function(){var t=i(this),e=t.data(d.dataKey);e&&(e.prop.init_set=!0,e.clearAll(e),e.prop.init_set=!1)})}function o(){return this.each(function(){var t=i(this),e=t.data(d.dataKey);e&&e.elem.hidden.val()&&e.setInitRecord(!0)})}function a(e){return this.each(function(){if(e&&t.isArray(e)){var n=i(this),o=n.data(d.dataKey);o&&(o.clearAll(o),o.option.data=e)}})}function r(e){var n=!1;return this.each(function(){var o=i(this),a=o.data(d.dataKey);a&&("undefined"!==t.type(e)?a.disabled(a,e):n=a.disabled(a))}),n}function s(){var e="";return this.each(function(){var n=i(this),o=n.data(d.dataKey);if(o)if(o.option.multiple){var a=[];o.elem.element_box.find("li.selected_tag").each(function(e,i){a.push(t(i).text())}),e+=a.toString()}else e+=o.elem.combo_input.val()}),e}function l(){var e=[];return this.each(function(){var n=i(this),o=n.data(d.dataKey);if(o)if(o.option.multiple)o.elem.element_box.find("li.selected_tag").each(function(i,n){e.push(t(n).data("dataObj"))});else{var a=o.elem.combo_input.data("dataObj");a&&e.push(a)}}),e}var c={data:void 0,lang:"cn",multiple:!1,pagination:!0,dropButton:!0,listSize:10,multipleControlbar:!0,maxSelectLimit:0,selectToCloseList:!1,initRecord:void 0,dbTable:"tbl",keyField:"id",showField:"name",searchField:void 0,escape:!0,andOr:"OR",separator:",",orderBy:void 0,pageSize:10,params:void 0,formatItem:void 0,autoFillResult:!1,autoSelectFirst:!1,noResultClean:!0,selectOnly:!1,inputDelay:.5,eSelect:void 0,eOpen:void 0,eAjaxSuccess:void 0,eTagRemove:void 0,eClear:void 0},d=function(e,i){t.each({data:"source",keyField:"primaryKey",showField:"field",pageSize:"perPage"},function(t,e){void 0!==i[e]&&(i[t]=i[e],delete i[e])}),this.setOption(i),this.setLanguage(),this.setCssClass(),this.setProp(),this.setElem(e),this.setButtonAttrDefault(),this.setInitRecord(),this.eDropdownButton(),this.eInput(),this.eWhole()};d.version="2.19",d.dataKey="selectPageObject",d.prototype.setOption=function(e){e.searchField=e.searchField||e.showField,e.andOr=e.andOr.toUpperCase(),"AND"!==e.andOr&&"OR"!==e.andOr&&(e.andOr="AND");for(var i=["searchField"],n=0;n /g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):t},d.prototype.strToArray=function(t){return t?t.replace(/[\s ]+/g,"").split(","):""},d.prototype.setOrderbyOption=function(e,i){var n=[],o=[];if("object"==typeof e)for(var a=0;a#item_text# ',textKey:"#item_text#",valueKey:"#item_value#"},page:{current:"page_num",total:"page_count"},msg:{maxSelectLimit:"max_selected_limit"}}},d.prototype.elementRealSize=function(e,i){var n,o,a,r={absolute:!1,clone:!1,includeMargin:!1,display:"block"},s=r,l=e.eq(0),c=[],d="";n=function(){a=l.parents().addBack().filter(":hidden"),d+="visibility: hidden !important; display: "+s.display+" !important; ",!0===s.absolute&&(d+="position: absolute !important;"),a.each(function(){var e=t(this),i=e.attr("style");c.push(i),e.attr("style",i?i+";"+d:d)})},o=function(){a.each(function(e){var i=t(this),n=c[e];void 0===n?i.removeAttr("style"):i.attr("style",n)})},n();var u=/(outer)/.test(i)?l[i](s.includeMargin):l[i]();return o(),u},d.prototype.setElem=function(e){var i={},n=this.option,o=this.css_class,a=this.message,r=t(e),s=r.css("width"),l=r.outerWidth();s.indexOf("%")>-1||r.parent().length>0&&r.parent().width()==l?l="100%":(l<=0&&(l=this.elementRealSize(r,"outerWidth")),l<150&&(l=150)),i.combo_input=r.attr({autocomplete:"off"}).addClass(o.input).wrap(""),n.selectOnly&&i.combo_input.prop("readonly",!0),i.container=i.combo_input.parent().addClass(o.container),i.combo_input.prop("disabled")&&(n.multiple?i.container.addClass(o.disabled):i.combo_input.addClass(o.input_off)),i.container.width(l),i.button=t("
").addClass(o.button),i.dropdown=t('
'),i.clear_btn=t("
").html(t("
").addClass("spfont sp-close")).addClass(o.clear_btn).attr("title",a.clear),n.dropButton||i.clear_btn.addClass(o.align_right),i.element_box=t("