/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(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&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.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(e,n){k.fn[n]=function(e,t){return 0+o[i])return 1;if(+n[i]<+o[i])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.1.0",n.console&&n.console.log&&(s&&e("3.0.0")||n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var r={};function u(e){var t=n.console;r[e]||(r[e]=!0,s.migrateWarnings.push(e),t&&t.warn&&!s.migrateMute&&(t.warn("JQMIGRATE: "+e),s.migrateTrace&&t.trace&&t.trace()))}function t(e,t,r,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n),r},set:function(e){u(n),r=e}})}function o(e,t,r,n){e[t]=function(){return u(n),r.apply(this,arguments)}}s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){r={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("jQuery is not compatible with Quirks Mode");var i,a=s.fn.init,c=s.isNumeric,d=s.find,l=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,p=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;for(i in s.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(u("jQuery( '#' ) is not a valid selector"),t[0]=[]),a.apply(this,t)},s.fn.init.prototype=s.fn,s.find=function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&l.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(p,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("Attribute selector with '#' was not fixed: "+r[0])}}return d.apply(this,r)},d)Object.prototype.hasOwnProperty.call(d,i)&&(s.find[i]=d[i]);s.fn.size=function(){return u("jQuery.fn.size() is deprecated and removed; use the .length property"),this.length},s.parseJSON=function(){return u("jQuery.parseJSON is deprecated; use JSON.parse"),JSON.parse.apply(null,arguments)},s.isNumeric=function(e){var t,r,n=c(e),o=(r=(t=e)&&t.toString(),!s.isArray(t)&&0<=r-parseFloat(r)+1);return n!==o&&u("jQuery.isNumeric() should not be called on constructed objects"),o},e("3.3.0")&&o(s,"isWindow",function(e){return null!=e&&e===e.window},"jQuery.isWindow() is deprecated"),o(s,"holdReady",s.holdReady,"jQuery.holdReady is deprecated"),o(s,"unique",s.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),t(s.expr,"filters",s.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),t(s.expr,":",s.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.2.0")&&o(s,"nodeName",s.nodeName,"jQuery.nodeName is deprecated");var f=s.ajax;s.ajax=function(){var e=f.apply(this,arguments);return e.promise&&(o(e,"success",e.done,"jQXHR.success is deprecated and removed"),o(e,"error",e.fail,"jQXHR.error is deprecated and removed"),o(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e};var y=s.fn.removeAttr,m=s.fn.toggleClass,h=/\S+/g;s.fn.removeAttr=function(e){var r=this;return s.each(e.match(h),function(e,t){s.expr.match.bool.test(t)&&(u("jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),y.apply(this,arguments)};var g=!(s.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?m.apply(this,arguments):(u("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":s.data(this,"__className__")||"")}))});s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return g=!0,e=r.apply(this,arguments),g=!1,e})}),s.swap=function(e,t,r,n){var o,i,a={};for(i in g||u("jQuery.swap() is undocumented and deprecated"),t)a[i]=e.style[i],e.style[i]=t[i];for(i in o=r.apply(e,n||[]),t)e.style[i]=a[i];return o};var v=s.data;s.data=function(e,t,r){var n;if(t&&"object"==typeof t&&2===arguments.length){n=s.hasData(e)&&v.call(this,e);var o={};for(var i in t)i!==s.camelCase(i)?(u("jQuery.data() always sets/gets camelCased names: "+i),n[i]=t[i]):o[i]=t[i];return v.call(this,e,o),t}return t&&"string"==typeof t&&t!==s.camelCase(t)&&(n=s.hasData(e)&&v.call(this,e))&&t in n?(u("jQuery.data() always sets/gets camelCased names: "+t),2>",ellipse_text:"...",prev_show_always:true,next_show_always:true,dis_pageEnd:false,start_text:"<<",end_text:">>",callback:function(){return false;}},opts||{});return this.each(function(){function numPages(){return Math.ceil(maxentries/opts.items_per_page);} function getInterval(){var ne_half=Math.ceil(opts.num_display_entries/2);var np=numPages();var upper_limit=np-opts.num_display_entries;var start=current_page>ne_half?Math.max(Math.min(current_page-ne_half,upper_limit),0):0;var end=current_page>ne_half?Math.min(current_page+ne_half,np):Math.min(opts.num_display_entries,np);return[start,end];} function pageSelected(page_id,evt){current_page=page_id;drawLinks();var continuePropagation=opts.callback(page_id,panel);if(!continuePropagation){if(evt.stopPropagation){evt.stopPropagation();} else{evt.cancelBubble=true;}} return continuePropagation;} function drawLinks(){panel.empty();var interval=getInterval();var np=numPages();var getClickHandler=function(page_id){return function(evt){return pageSelected(page_id,evt);}} var appendItem=function(page_id,appendopts){page_id=page_id<0?0:(page_id"+(appendopts.text)+"");} else {var lnk=$(""+(appendopts.text)+"").bind("click",getClickHandler(page_id)).attr('href',opts.link_to.replace(/__id__/,page_id));} if(appendopts.classes){lnk.addClass(appendopts.classes);} panel.append(lnk);} if(current_page>=0){appendItem(0,{text:opts.start_text?opts.start_text:" ",classes:"first"});} if(opts.prev_text&&(current_page>0||opts.prev_show_always)){if(opts.dis_pageEnd){appendItem(0,{text:opts.start_text,classes:"prev"});} appendItem(current_page-1,{text:opts.prev_text,classes:"prev"});} if(interval[0]>0&&opts.num_edge_entries>0) {var end=Math.min(opts.num_edge_entries,interval[0]);for(var i=0;i"+opts.ellipse_text+"").appendTo(panel);}} for(var i=interval[0];i0) {if(np-opts.num_edge_entries>interval[1]&&opts.ellipse_text) {jQuery(""+opts.ellipse_text+"").appendTo(panel);} var begin=Math.max(np-opts.num_edge_entries,interval[1]);for(var i=begin;i=1){appendItem(end,{text:opts.end_text?opts.end_text:" ",classes:"last"});}} var current_page=opts.current_page;maxentries=(!maxentries||maxentries<0)?1:maxentries;opts.items_per_page=(!opts.items_per_page||opts.items_per_page<0)?1:opts.items_per_page;var panel=jQuery(this);this.selectPage=function(page_id){pageSelected(page_id);} this.prevPage=function(){if(current_page>0){pageSelected(current_page-1);return true;} else{return false;}} this.nextPage=function(){if(current_page/g,'>').replace(/\//g,'/');} return value;},numberDecode:function(value) {if(VHV.defaultNumberFormat=='US') {return parseFloat(value.replace(',',''));} return parseFloat(value.replace('.','').replace(',','.'));},currency:function() {if(VHV.defaultCurrency) {return VHV.defaultCurrency;} return'VND';},setAllLinks:function(fileName,value){if(fileName.indexOf('/')==0) {fileName=location.protocol+'//'+location.hostname+fileName;} VHV.allLinks[fileName]=value;},read:function(fileName,options,func) {if(!fileName)return;if(typeof(options)=='function') {func=options;options={};} if(VHV.allLinks[fileName]==2) {if(func)func.call(this,VHV.cache[fileName]?VHV.cache[fileName]:'');else return VHV.cache[fileName]?VHV.cache[fileName]:'';return;} else if(parseInt(VHV.allLinks[fileName])==1&&(!options||typeof(options.async)=='undefined'||options.async)) {VHV.ExecQueue.add(func,function(){return VHV.allLinks[fileName]==2},null,{fileName:fileName});return;} VHV.setAllLinks(fileName,1);if((fileName.indexOf('.js')!=-1)&&(fileName.indexOf('3rdparty/')!=-1)) {var fn=fileName;fileName=fileName.replace(VHV.rootURL,VHV.staticURL);if((fileName.indexOf('http://')==-1)&&(fileName.indexOf('https://')==-1)) {fileName=((fileName.substr(0,1)=='/')?'':(VHV.staticURL?VHV.staticURL:'/'))+fileName;} var that=this;$.ajax($.extend({url:fileName+'?'+(VHV.clientVersion?VHV.clientVersion:1),dataType:"script",cache:true,success:function(data){VHV.setAllLinks(fn,2);VHV.allOrderedLinks.push(fn);if(func) {func.call(that,data);}}},options?options:{}));return;} if(!options) {options={};} if(!options.dataType) {options.dataType='html';} if(typeof(options.async)=='undefined') {options.async=VHV.async;} if(fileName.indexOf('.css')!=-1) {var fn=fileName;if((fn.indexOf('http://')==-1)&&(fn.indexOf('https://')==-1)) {if(fn.indexOf(staticURL)!=0) {if(fn.charAt(0)=='/') {fn=VHV.staticURL+fn;} else if((fn.indexOf('http://')==-1)&&(fn.indexOf('https://')==-1)) {fn=VHV.staticURL+fn;}} if(fn.indexOf('3rdparty/')!=-1) {fn=fn.replace(VHV.rootURL,VHV.staticURL);fn=((fn.substr(0,1)=='/')?'':VHV.staticURL)+fn;}} if(fileName.substr(1).indexOf('/')!=-1) {var fileref=document.createElement("link");fileref.setAttribute("rel","stylesheet");fileref.setAttribute("type","text/css");fileref.setAttribute("href",fn+'?'+(VHV.clientVersion?VHV.clientVersion:1));document.getElementsByTagName("head")[0].appendChild(fileref);} VHV.setAllLinks(fileName,2);VHV.allOrderedLinks.push(fileName);return;} if(fileName.indexOf('.js')!=-1) {$.ajax({url:((((fileName.indexOf('http://')==-1)&&(fileName.indexOf('https://')==-1))||(fileName.indexOf(rootURL)==0))?staticURL:'')+fileName.replace(rootURL,'')+'?'+(VHV.clientVersion?VHV.clientVersion:1),dataType:"script",cache:true,success:function(){VHV.setAllLinks(fileName,2);VHV.allOrderedLinks.push(fileName);}});} else {var realFileName=(staticURL+fileName.replace(rootURL,''));if(fileName.indexOf('.js')!=-1&&navigator.userAgent.toLowerCase().indexOf('chrome')==-1) {var node=document.createElement('SCRIPT');node.src=realFileName;if($.msie) {node.onreadystatechange=function(){if((this.readyState=='complete'||this.readyState=='loaded')&&(VHV.allLinks[realFileName]!=2)){setTimeout(function(){VHV.setAllLinks(fileName,2);VHV.allOrderedLinks.push(fileName);},10);}}} else {node.onload=function(){setTimeout(function(){VHV.setAllLinks(fileName,2);VHV.allOrderedLinks.push(fileName);},10);};} document.body.appendChild(node);return;} var returnValue='';var success=function(data) {if(fileName.indexOf('.js')==-1&&fileName.indexOf('.css')==-1) {if(data) VHV.cache[fileName]=data;} if(options.dataType=='html') {if(fileName.indexOf('.css')!=-1) {var parts=fileName.split('/');parts.splice(parts.length-1,1);parts=parts.join('/')+'/';data=data.replace(/url\s*\(\s*(["']?)/gi,'url($1'+parts);$('body').append('');} else if(fileName.indexOf('.js')!=-1) {eval(data);}} else {returnValue=data;} VHV.setAllLinks(fileName,2);VHV.allOrderedLinks.push(fileName);if(func) {func.call(this,data);}};$.ajax($.extend({url:realFileName+(/\?/.test(fileName)?'&':'?')+'v='+VHV.version+(VHV.clientVersion?VHV.clientVersion:1),cache:true,success:success},options));return returnValue;}},getComponentURL:function(url) {var values={name:url,path:'',type:''};if((url.indexOf('http://')!=-1)||(url.indexOf('https://')!=-1)) {values.path=url;} else if(url.indexOf('3rdparty')!=-1||url.indexOf('languages')!=-1||url.indexOf('.js')!=-1||url.indexOf('.css')!=-1) {values.path=((url.indexOf(staticURL)!=0)?rootURL:'')+url;values.type='3rdparty';} else if(url.indexOf('.')!=-1) {var parts=url.split('.'),module=parts.splice(parts.length-1,1);values.package=parts.join('.');if(module&&module!='') {values.path=rootURL+'publish/js/modules/'+((VHV.language!='vi')?VHV.language+'_':'')+parts.join('.')+'.'+module+'.js';values.type='module';}} return values;},load:function() {var args=[];if(arguments.length>0) {if(typeof(arguments[0])=='function') {arguments[0].call(this);} else {var length=arguments.length;if(typeof(arguments[arguments.length-1])=='function') {length--;} if(typeof(arguments[0])=='object'&&arguments[0].length&&typeof(arguments[0][0])=='object'&&arguments[0][0].length) {var newArgs=args[0].splice(0,1)[0];if(args[0].length>0) {newArgs.push(function(){VHV.load(args[0],args[1]);});} else {newArgs.push(args[1]);} VHV.load.apply(this,newArgs);return;} for(var i=0;iloading...').css({position:"fixed",top:"1em",left:"1em",'z-index':10000}).appendTo("body").hide(),loaderTimeout=false;$(document).ajaxStart(function(){if(loaderTimeout) {clearTimeout(loaderTimeout);loaderTimeout=false;} loader.show();loaderTimeout=setTimeout(function(){loader.hide();},10000);}).ajaxStop(function(){if(loaderTimeout) {clearTimeout(loaderTimeout);loaderTimeout=false;} loader.hide();}).ajaxError(function(a,b,e){if(loaderTimeout) {clearTimeout(loaderTimeout);loaderTimeout=false;} loader.hide();});},10);$('.hover-module-block').each(function(){var that=$(this),moduleDiv=that.parents('.ModuleWrapper:first');moduleDiv.hover(function(){that.stop().fadeIn();},function(){that.stop().fadeOut();});});var updateImageRatio=function(){var that=$(this),ratio=that.attr('data-size-ratio'),src=that.attr('src');if(src&&src.indexOf('images/lazyload_')==-1) {if(!ratio||typeof(ratio)!='string'||ratio.indexOf(':')==-1)ratio='1:1';ratio=ratio.split(':');var tmpImg=new Image();tmpImg.lastWidth=that.data('lastElementWidth');tmpImg.that=that;tmpImg.ratio=ratio;tmpImg.onload=imageLoaded;tmpImg.src=that.attr('src');}},imageLoaded=function(){var width=parseInt(this.that.attr('width'));if(!width)width=this.that.width();if((width>10)&&(parseInt(this.ratio[0])>0)&&(this.lastWidth!=width)) {this.that.data('lastElementWidth',width);this.that.height(Math.round(Math.min((width*parseInt(this.ratio[1]))/parseInt(this.ratio[0]),1200)));}};$(window).resize(function(){if(VHV.ratioResizeTimeout) {clearTimeout(VHV.ratioResizeTimeout);} VHV.ratioResizeTimeout=setTimeout(function(){VHV.ratioResizeTimeout=false;$('.relative-height').each(updateImageRatio);},300);});setTimeout(function(){$(window).resize();},3000);$(document).on('focus','[data-x-suggest]',function(){VHV.initSuggest(this,true);});$(document).on('change','input,textarea,select',function(){var groupId=$(this).data('xGroup');if(groupId) {$('input:checkbox[data-x-group="'+groupId+'"]:not([value])').each(function(){this.value=$(this).parents('[data-id]:first').data('id');});if($(this).hasClass('x-check-all')) {$('input[data-x-group="'+groupId+'"][value!=""],input.x-check-all[data-x-group="'+groupId+'"]').prop('checked',$(this).prop('checked'));} else {$('input.x-check-all[data-x-group="'+groupId+'"]').prop('checked',$('input[data-x-group="'+groupId+'"]:not(.x-check-all):not(:checked)').length?'':'checked');}} VHV.updateDisplay();if(this.name) {var that=this,$m=$(this).parents('.ModuleWrapper:first'),cascade=$m.find(((this.name.indexOf('[')==-1)?'[data-x-cascade*="fields['+this.name+']"],':'')+'[data-x-cascade*="'+this.name+'"]');if(cascade.length) {var cascadeTos=[];cascade.each(function(){cascadeTos.push(this.name);});VHV.load('Content.Form',function(){cascade.each(function(){var that2=this,cascadeParams=$(this).data('xCascade').split(','),data=$(this).data('serviceData'),lastTime=$(this).data('lastCascadeTime'),time=(new Date()).getTime();if(!lastTime||(lastTime+500';if(!title)title=$(this).attr('title');$(this).data('xModalObject',modal=$(''));modal.find('.modal-body').loadModule('Content.Form',params);modal.modal({backdrop:$(this).data('backdrop')});} else {modal.find('.modal-body').loadModule('Content.Form',params);modal.modal('toggle');} return false;} else if($(this).data('xConfirm')) {var that=this;VHV.confirm($(this).attr('title'),$(this).data('xConfirm'),function(){VHV.doAction(that);});return false;} else {VHV.doAction(this);return false;}});VHV.updateDisplay();},initSuggest:function(that,autoFocus){if(!$(that).data('select2')) {var hidden,value=$(that).data('value')?$(that).data('value'):that.value;if(that.name) {hidden=$('');if(value) {hidden.val(value);hidden.data('value',value);} $(that).before(hidden);that.name='';} else {if(that.previousSibling&&that.previousSibling.type=='hidden') {hidden=$(that.previousSibling);value=$(hidden).data('value')?$(hidden).data('value'):hidden.val();}} var service=$(that).attr('data-x-suggest'),params=VHV.getActionParams(that);if($(that).attr('allowNewValue')) {params.createSearchChoice=function(term,data){if($(data).filter(function(){return this.text.localeCompare(term)===0;}).length===0){return{id:term,text:term};}};params.selectOnClose=true;params.tags=true;params.allowClear=true;} if(value&&typeof(value)=='string'&&(that.multiple||$(that).data('multiple')))value=value.split(',');if(that.tagName=='INPUT') {var select=$('');if(value) {if(typeof(value)=='object') {var labels=that.value?that.value:value;if(typeof(labels)!='object')labels=labels.split(',');for(var k in value) {var option=$('');option.attr('value',value[k]).text(labels[k]);select.append(option);} select.find('option').attr('selected','selected');} else {var option=$('');option.attr('value',value).text(that.value);select.append(option);}} $(that).replaceWith(select);that=select;} VHV.load('3rdparty/jQuery/select2-4.0.3/dist/css/select2.min.css');VHV.load('3rdparty/jQuery/select2-4.0.3/dist/js/select2.full.min.js',function(){$(that).select2($.extend({templateResult:function(state){return $(state.html?state.html:(''+(state.image?'':'')+(VHV.notag?VHV.notag(state.text):'')+''));},placeholder:$(that).attr('placeholder')?$(that).attr('placeholder'):(params.placeholder?params.placeholder:''),ajax:{url:VHV.Model(service).url(params),dataType:'json',quietMillis:100,data:function(params){params.pageNo=params.page||1;var extraParams=$(this).data('extraParams');if(extraParams&&(typeof(extraParams)=='object')) {params=$.extend(params,extraParams);} return params;},processResults:function(data){var tmpResults=[];$.each(data,function(index,item){tmpResults.push({id:item.id,text:item.label?item.label:item.title,html:(item.html?item.html:''),image:item.image?((((item.image.indexOf('http')==0)||(item.image.indexOf('/')==0)||(item.image.indexOf('data:image')==0))?'':('/'+((item.image.indexOf('upload/')==0)?'publish/thumbnail/'+VHV.site+'/30x30xdefault/':'')))+(VHV.notag?VHV.notag(item.image):item.image)):''});});return{results:tmpResults,pagination:{"more":tmpResults.length==20}};}},dropdownAutoWidth:true},params)).change(function(){if(hidden&&hidden.length) {var value=$(this).val();if(typeof(value)=='object') {value=value.join(',');} hidden[0].value=value;hidden.change();}});if(autoFocus) {setTimeout(function(){$(that).select2('open');},100);}});}},data:function(obj) {var data=$(obj).data(),newData=new Object();if(data) {for(var i in data) {i=i+'';if(i[0]=='x'&&i[1]==(i[1]+'').toUpperCase()) {} else if(i.length>7&&['filters','options'].indexOf(i.substr(0,7))!=-1) {var key=i.substr(0,7);if(!newData[key])newData[key]=new Object();newData[key][i[7].toLowerCase()+i.substr(8)]=data[i];} else {newData[i]=data[i];}}} return newData;},getActionParams:function(that){var thatData=$(that).data(),params=new Object();for(var i in thatData) {if(typeof(thatData[i])!='object') {var j=i;for(var k in{'options':1,'filters':1}) {if((i.indexOf(k)==0)&&(i!=k)) {j=i.substr(k.length);j=k+'['+j[0].toLowerCase()+j.substr(1)+']';}} params[j]=thatData[i];}} if(thatData.getFilters||(thatData.xService&&(thatData.xService.indexOf('.export')!=-1||thatData.xExport))){var m=$(that).parents('.ModuleWrapper:first');if(m.length){var mid=m.attr('id').replace('module','');m=VHV.App.modules[mid];if(m){if(m.filters&&VHV.sizeof(m.filters)) {var filters=$.extend({},m.filters);for(var i in{groupId:1,accountId:1}){if(typeof(filters[i])!="undefined"){delete(filters[i]);}} params.filters=$.extend(params.filters?params.filters:{},filters);} if(m.orderBy&&typeof(m.orderBy)=='string'&&!params.orderBy) {params.orderBy=m.orderBy;}}}} if(that.value&&that.name) {var value=$(that).val();if(typeof(value)=='object') {value=value.join(',');} params[that.name]=value;} if(that.tagName=='SELECT') {var currentOption=$('option[value="'+that.value+'"]',that);if(currentOption.length){var optionData=$(currentOption).data();for(var i in optionData) {if(typeof(optionData[i])=='object') {delete optionData[i];}} if(optionData) {$.extend(params,optionData);}}} return params;},doAction:function(that,extra){var action=$(that).data('xService'),params=VHV.getActionParams(that),moduleId=$(that).parents('.ModuleWrapper:first').attr('id'),module,isMulti=params.xMultiActions;if(extra) {params=$.extend(extra,params);} if(moduleId&&moduleId.match(/^module(\d+)$/)) {moduleId=parseInt(RegExp.$1);module=VHV.App.modules[moduleId];} if(!module||!action)return;if(module.targetForm)module=module.targetForm;var reloadDelay=(module&&module.reloadDelay)?module.reloadDelay:((module&&module.parent&&module.parent.reloadDelay)?module.parent.reloadDelay:2000);if(isMulti) {if(!params.ids) {params.ids=[];$('input[data-x-group="'+moduleId+'"]:checkbox:checked:not(.x-select-all)').each(function(){params.ids.push(this.value);});} if(!params.ids.length) {VHV.alert(params.message?params.message:''+"Bạn chưa chọn"+'',{type:"error"});return;} if(action.indexOf('.')!=-1&&!action.match(/[^\w\.]/)) {if(typeof(params.ids)!='string') {params.ids=params.ids.join(',');} params.doMultiActions=1;if(action.indexOf('.export')!=-1||$(that).data('xExport')) {location=VHV.Model(action).url(params);} else {VHV.Model(action)(params,function(response){if(response) {response=JSON.parse(response);var success=true,totalSuccess=0,totalFail=0,messages={},messageText='',title='';if(response.items) {for(var i in response.items) {var item=response.items[i];if(item.status!='SUCCESS') {success=false;totalFail++;} else {totalSuccess++;} if(item.message) {if(!messages[item.message]) {messages[item.message]=[];} messages[item.message].push(item.title?item.title:'');}}} if(!totalSuccess&&!totalFail&&response.message) {messageText=response.message;success=(response.status=='SUCCESS');title=(success?''+"Thành công"+'':''+"Thất bại"+'');} else {messageText='
';title=totalSuccess+' '+"thành công"+', '+totalFail+' '+"thất bại"+'';if(VHV.sizeof(messages)) {for(var i in messages) {messageText+=i+': '+(messages[i][0]?messages[i].join(', '):messages[i].length)+'
';}} else {messageText+=title;} messageText+='
';} if(!response.notAlert){VHV.alert(messageText,{messageType:'alert',title:title,type:success?'success':'error'});} if(totalSuccess){setTimeout(function(){module.reload('current');if($(that).data('xSuccess'))(function(){eval($(that).data('xSuccess'));}).call(that);},reloadDelay);}}});}} else if(!action.match(/[^\w]/)) {if(typeof(module[action])=='function') {for(var i in params.ids) {params.id=params.ids[i];module[action](params,$(that));} if($(that).data('xSuccess'))(function(){eval($(that).data('xSuccess'));}).call(that);}} else {try{eval(action);} catch(e) {}} return;} if(typeof(params.id)=='undefined') {params.itemId='';var item=$(that).parents('[data-id]:first');if(module.$().has(item)) {var itemData=item.data();if(itemData) {for(var i in itemData) {if(typeof(itemData[i])!='object') {params[i]=itemData[i];}}}}} else if(!params.itemId) {params.itemId=params.id;} if(params.xPopup) {params.xPopupTitle=params.title;if(!params.xPopupTitle) {params.xPopupTitle=$(that).attr('title');if(!params.xPopupTitle&&$(that).is('a')) {params.xPopupTitle=$.trim($(that).text());}}} if(action.indexOf('.')!=-1&&!action.match(/[^\w\.]/)) {if(action.indexOf('.export')!=-1||$(that).data('xExport')) {location=VHV.Model(action).url(params);} else {VHV.Model(action)(params,function(response){if(response) {response=JSON.parse(response);var alertOptions=response.alert?response.alert:{};if(response.status=='SUCCESS') {alertOptions.type='success';if(!response.notAlert){VHV.alert(response.message,alertOptions);} setTimeout(function(){if((params['xServiceReload']!=='0')&&(params['xServiceReload']!==0)) {module.reload('current');} if(params['xSuccess'])(function(){eval(params['xSuccess']);}).call(that);},((params['xServiceReload']!=='0')&&(params['xServiceReload']!==0))?reloadDelay:100);} else {alertOptions.type='error';VHV.alert(response.message,alertOptions);}}});}} else if(!action.match(/[^\w]/)) {if(typeof(module[action])=='function') {module[action](params,$(that));if($(that).data('xSuccess'))(function(){eval($(that).data('xSuccess'));}).call(that);}} else {try{eval(action);} catch(e) {}}},isInherited:function(childName,parentName) {var childInstance,parentInstance;try{eval('childInstance = VHV.'+childName+';');} catch(e) {return false;} try{eval('parentInstance = VHV.'+parentName+';');} catch(e) {return false;} if(childInstance&&parentInstance) {while(childInstance.parentClass) {if(childInstance.parentClass===parentInstance) {return true;} childInstance=childInstance.parentClass;} return false;}}});window.elem=VHV.elem;window.$L=window.Lang=VHV.Lang;window.$VHV=function(name,context) {var modules=VHV.App.modules,parentId=-1,path=name.split(' ');if(path.length>1) {var obj=$VHV(path.splice(0,1),context);if(obj)return $VHV(path.join(' '),obj);return null;} if(typeof(context)=='object') {if(context.length&&context.find) {modules=[];context.find('.ModuleWrapper').each(function(){if(this.id) {var id=this.id.replace('module','');if(VHV.App.modules[id]) {modules.push(VHV.App.modules[id]);}}});} else {parentId=context.id;}} else if(typeof(context)=='number') {parentId=context;} for(var i in modules) {if(modules[i]&&((modules[i].module==name)||VHV.isInherited(modules[i].module,name))) {if(parentId==-1||VHV.App.isChild(modules[i].id,parentId)) {if(typeof(context)=='function') {if(context.call(modules[i])) {return modules[i];}} else {return modules[i];}}}} return null;};$.extend(VHV.Module.prototype,{layout:'',children:[],me:function(){return'VHV.App.modules['+this.id+']';},addChildren:function(m) {m.parent=this;m.moduleParentId=this.id;for(var i in this.children) {if((this.children[i].id==m.id)||(this.children[i].index==m.id)) {return;}} this.children.push(m);},applyFunction:function(func){var oldModule=VHV.App.currentModule;module=VHV.App.currentModule=this;if(typeof(func)=='function') {var returnValue=func.call(this);} else {var returnValue=this[func]();} module=VHV.App.currentModule=oldModule;return returnValue;},object:function() {return'VHV.App.modules['+this.id+']';},$id:function(id,index){return $('#'+id+((typeof(index)!='undefined')?'-'+index:'')+'-'+this.id);},each:function(f) {for(var i in VHV.App.modules) {var module=VHV.App.modules[i];if(module&&module.parent&&module.parent.id==this.id) {if(f.call(module)===false) {return;}}}},params:function() {var options={};for(var i in this) {if(i!='pagingSelector'&&i!='beginTitle'&&i!='class'&&i!='endText'&&i!='endTitle'&&i!='hasController'&&i!='hasPagination'&&i!='index'&&i!='linkTo'&&i!='nextText'&&i!='numDisplayEntries'&&i!='path'&&i!='prevText'&&i!='startText'&&i!='submitFormId'&&i!='totalItems'&&i!='url_mode'&&i!='module'&&i!='id'&&(typeof(this[i])=='number'||typeof(this[i])=='string')) {options[i]=this[i];} else if((i=='filters'||i=='options')&&(typeof(this[i])=='object')) {for(var j in this[i]) {if((typeof(this[i][j])!='function')&&this[i][j]) {if(typeof(this[i][j])=='object') {for(var k in this[i][j]) {if((typeof(this[i][j][k])!='function')&&(typeof(this[i][j][k])!='object')&&this[i][j][k]) {options[i+'['+j+']'+'['+k+']']=this[i][j][k];}}} else if(i!='options'||['sortOrder','itemsPerPage','pageNo','orderBy','type','childType'].indexOf(j)==-1) {options[i+'['+j+']']=this[i][j];}}}}} return options;},reload:function(options,success) {if(options!='current') {this.pageNo=1;if(options) {var id=this.id;if(options&&options.id) {this.itemId=options.id;} $.extend(this,options);this.id=id;}} var module=$('#module'+this.id),that=this;if(module.length>0) {var params=this.params(),submitURL=this.submitURL({cmd:'redraw'});if(typeof(params.__proto__)!='undefined') {delete params.__proto__;} if(submitURL.accountId){if(!params.accountId){params.accountId=submitURL.accountId;} delete submitURL.accountId;} params._t=new Date().getTime();$.post(submitURL,params,function(response){module.html(response);$(window).resize();$(document).trigger('VHV.Module.show',{module:that,options:options});VHV.updateDisplay();if(success&&(typeof(success)=='function')) {success.call(that);}});}},loadModule:function(name,options,success){var that=this;if(this[name]&&this[name].$().length) {this[name].$().show();$('#form'+this[name].id+' input[name^=fields],#form'+this[name].id+' select[name^=fields],#form'+this[name].id+' textarea[name^=fields]').each(function(){var fieldname=this.name.replace('fields[','').replace(']','');if(['moduleId','id','itemId','module','moduleName','isReady','parent','children','clearForm','phpModuleName','submitService','type','name'].indexOf(fieldname)==-1&&that[name][fieldname]) {delete(that[name][fieldname]);}});this[name].$().html('
');this[name].reload(options,function(){if(options.xPopup) {that[name].$('form input:submit').hide();}});var modal=this[name].$().parents('.modal:first');if(modal.length) {modal.modal('show');if(options.xPopupTitle) {modal.find('.modal-title:first').html(' '+options.xPopupTitle?VHV.notag(options.xPopupTitle):'');}} if(success&&(typeof(success)=='function')) {success.call(this);}} else {var obj=$('#'+name+this.id);if(!obj.length) {obj=$('
');this.$().append(obj);} if(options.xPopup) {var xPopup={};if((typeof(options.xPopup)=='string')&&options.xPopup.indexOf(':')) {try{eval("xPopup = {"+options.xPopup+'};');}catch(e){}} xPopup.title=(options.xPopupTitle?options.xPopupTitle:''+"Hộp thoại"+'');xPopup.success=function(){that.addChildren(this);that[name]=this;if(success&&(typeof(success)=='function')) {success.call(that);}};VHV.dialog(options.module?options.module:'Content.Listing',options,xPopup);} else {obj.loadModule(options.module?options.module:'Content.Listing',options,function(){that.addChildren(this);that[name]=this;if(success&&(typeof(success)=='function')) {success.call(that);} $(document).trigger('VHV.Module.show',{module:this,options:options});VHV.updateDisplay();});}}},initEvents:function(){},$:function(selector) {return $('#module'+this.id+(selector?' '+selector:''));},html:function(code) {return this.$().html(code);},append:function(code) {return this.$().append(code);},buildURL:function(options){if(!options) {options={};} options.url_mode=VHV.urlMode;var url=(VHV.domainRoot?VHV.domainRoot:VHV.rootURL)+'?'+((options&&options['module'])?'':'module='+(this.phpModuleName?this.phpModuleName:this.module))+'&moduleId='+this.id;if(options) {for(var i in options) {if(['module','phpModuleName'].indexOf(i)==-1) {url+='&'+i+'='+encodeURIComponent(options[i]);}}} return url;},submitURL:function(options){options=VHV.Model.engine.initOptions(options,VHV.app?this.$().parents('.swap-screen:first'):false,true);return this.buildURL(options)+'&submitFormId='+this.id+'&moduleId='+this.id+'&page='+this.page+'&site='+VHV.site;},formSignature:function() {return'';},jm:function() {return'VHV.App.modules['+this.id+']';},closeTab:function(obj) {currentWorkspace.closeTab(obj);}},ReadyObject,{init:function(success) {this.isReady=true;this.initEvents();if(success&&typeof(success)=='function') {success.call(this);}},ready:function(callback) {VHV.ExecQueue.add(function(){this.applyFunction(callback);},function(){return this.isReady&&this.$().length;},this,{caller:'ready'});}});VHV.Model=function(method) {return VHV.Model.register(method);} $.extend(VHV.Model,{engine:{register:function(serviceModule,methods){var model={};for(var i in methods) {model[i]=this.registerMethod(serviceModule,i);model[i].url=this.registerURLMethod(serviceModule,i);} return model;},registerMethod:function(serviceModule,method) {var engine=this;return function(options,success){return engine.call(serviceModule,method,options,success);};;},registerURLMethod:function(serviceModule,method) {var engine=this;return function(options,noSecurityToken){return engine.url(serviceModule,method,options,noSecurityToken);};;},initOptions:function(options,swapScreen,noSecurityToken){if(!options){options=new Object();} if(!options.site){options.site=VHV.App.site;} if(VHV.app) {var pageUrl=(swapScreen?swapScreen:$('.swap-screen:visible')).data('url');if(pageUrl&&typeof(options.accountId)=='undefined'&&(/\&accountId=(\w+)/.test(pageUrl)||/^\/u\/(\w+)/.test(pageUrl))){options.accountId=RegExp.$1;} if(pageUrl&&typeof(options.groupId)=='undefined'&&(/\&groupId=(\w+)/.test(pageUrl)||/^\/g\/(\w+)/.test(pageUrl))){options.groupId=RegExp.$1;}} if(VHV.groupId&&typeof(options.groupId)=='undefined') {options.groupId=VHV.groupId;} else if(VHV.accountId&&typeof(options.accountId)=='undefined') {options.accountId=VHV.accountId;} if(!noSecurityToken&&!options.securityToken&&VHV.securityToken){options.securityToken=VHV.securityToken;} return options;},call:function(serviceModule,serviceMethod,options,success) {options=VHV.Model.engine.initOptions(options);if(serviceModule=='Member.Device'&&serviceMethod=='log') {var saveLoginToken=localStorage.getItem('saveLoginToken');if(saveLoginToken) {options.saveLoginToken=saveLoginToken;}} var data;$.ajax({url:'/api/'+serviceModule.replace(/\./g,'/')+'/'+serviceMethod,data:options,async:options.async,type:'POST',success:function(response){if(serviceModule=='Member.Device'&&serviceMethod=='log') {var res=JSON.parse(response);if(res.saveLoginToken) {localStorage.setItem('saveLoginToken',res.saveLoginToken);} if(res.autoLoggedIn) {var href=VHV.request('href');if(href) {location=href;} else {location.reload();}}} if(success){success.call(this,response);} data=response;},error:function(){success.call(this,'ERROR');}});return data;},url:function(serviceModule,serviceMethod,options,noSecurityToken) {options=VHV.Model.engine.initOptions(options,false,noSecurityToken);return'/api/'+serviceModule.replace(/\./g,'/')+'/'+serviceMethod+'?'+$.param(options);}},register:function(serviceModule,methods,engine){if(!engine)engine=VHV.Model.engine;var names=serviceModule.split('.'),methodName='';names[names.length-1]=names[names.length-1];if(!methods){methods={};methodName=names.pop();methods[methodName]=[];} var obj=VHV.Model;for(var i=0;i/g,"\n"),duration:options.delay?options.delay:"short",position:options.position?options.position:"top",styling:{opacity:0.8,backgroundColor:'#333333',textColor:'#FFFFFF',textSize:13,cornerRadius:20,horizontalPadding:20,verticalPadding:16}};if(options.type){switch(options.type) {case'success':opts.styling.backgroundColor='#68a581';break;case'warning':opts.styling.backgroundColor='#ffc439';break;case'error':opts.styling.backgroundColor='#e13a36';break;default:break;}} window.plugins.toast.showWithOptions(opts);return;} if(navigator.notification&&window.Notification){new Notification((options&&options.title)?options.title:'Notification',{body:message?message:(options.content?options.content:options.title)});return;} if($.fn.button) {VHV.load('3rdparty/jQuery/lobibox/css/lobibox.min.css');VHV.load('3rdparty/jQuery/lobibox/js/lobibox.min.js',function(){VHV.load('3rdparty/jQuery/lobibox/js/'+((options&&options.messageType&&((options.messageType=='prompt')||(options.messageType=='confirm')||(options.messageType=='alert')))?'messageboxes':'notifications')+'.min.js',function(){if(!options)options={closeOnClick:true,closable:true,};if(!options.title) {switch(options.type) {case'success':options.title=''+"Thành công"+'';break;case'warning':options.title=''+"Cảnh báo"+'';break;case'error':options.title=''+"Có lỗi"+'';break;default:options.title=''+"Thông báo"+'';break;}} if(!options.msg) {options.msg=message?message:(options.content?options.content:options.title);} if(!options.showClass) {options.showClass='fadeInDown';} if(!options.hideClass) {options.hideClass='fadeUpDown';} if(!options.delay) {if(!options.type||(options.type=='success')) {options.delay=1500;}} if(!options.position) {options.position='top right';} if(typeof(options.sound)=='undefined') {options.sound=false;} Lobibox[(options&&options.messageType)?options.messageType:'notify'](options.type?options.type:'info',options);});});} else {VHV.load('3rdparty/jQuery/jGrowl/jquery.jgrowl.css');VHV.load('3rdparty/jQuery/jGrowl/jquery.jgrowl_minimized.js',function(){if(!options)options={};if(VHV.language=='vi') {options.closerTemplate='
[ '+"Đóng lại"+' ]
';} $.jGrowl(message,options);});}},dialog:function(moduleName,data,options,onClose,onOpen){var _default={title:'',onClose:'',onOpen:'',height:200,width:960,zIndex:2000};if(moduleName.indexOf('<')!=-1){options=data?data:{};} if(typeof(options)=='function') {options={success:options}} if(typeof(options)!='undefined'){options=$.extend(_default,options);} else{options=_default;} if(typeof(onClose)=='function'){options.onClose=onClose;} if(typeof(onOpen)=='function'){options.onOpen=onOpen;} var div;var inc=0;while(VHV.App.modules[parseInt(VHV.App.maxModuleId)+10+inc]) {inc++;} var moduleId=parseInt(VHV.App.maxModuleId)+10+inc,bodyDiv=null;if(options.isPopup) {div=$('
'+(options.title?VHV.notag(options.title):'')+'
'+
');$('body').append(div);VHV.load('3rdparty/jQuery/animatedModal/animate.min.css');VHV.load('3rdparty/jQuery/animatedModal/animatedModal.min.js',function(){$('div.modal').css('visibility','hidden');$('#animatedModalButton'+moduleId).animatedModal({modalTarget:'animatedModal'+moduleId,color:'#FFF',animatedIn:'slideInUp',animatedOut:'slideOutDown',afterClose:function(){$('#animatedModalButton'+moduleId).parent().remove();if(typeof(options.onClose)=='function'){options.onClose.call(div);} if(moduleId){VHV.App.removeModule(moduleId);}},beforeClose:function(){$('div.modal').css('visibility','inherit');}});$('#animatedModalButton'+moduleId).click();div=$('#animatedModal'+moduleId+' .animatedModal-content');if(moduleName.indexOf('<')!=-1){div.html(moduleName);} else{var mId=div.loadModule(moduleName,data,function(){if(!options.title) {$('.ui-dialog-title',div.parent().parent()).html($('.frontEndForm h2:first').html());$('.frontEndForm h2:first').remove();} if(options.mId) {options.success.call(VHV.App.modules[mId]);} var submitButton=$('#animatedModal'+moduleId+' input[type=submit]');if(submitButton.length) {$('#animatedModal'+moduleId+' div.close-animatedModal').after('
Lưu lại
');}});} if(typeof(options.onOpen)=='function') {setTimeout(function(){options.onOpen.call(div);},1);}});} else if($.fn.modal) {div=$('