Version Description
Give version 1.8 is a major update. Please make sure you make a backup of your database before updating.
Download this release
Release Info
Developer | dlocc |
Plugin | Give – Donation Plugin and Fundraising Platform |
Version | 2.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.1.2
assets/dist/js/admin-shortcode-button.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///js/admin-shortcode-button.js","webpack:///webpack/bootstrap
|
1 |
+
{"version":3,"sources":["webpack:///js/admin-shortcode-button.js","webpack:///webpack/bootstrap 1b0de59fe7a82a520d9a"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","35","36"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,MDMMC,GACA,SAAUvB,EAAQD,EAASH,GAEjCI,EAAOD,QAAUH,EAAoB,KAK/B4B,GACA,SAAUxB,EAAQD","file":"js/admin-shortcode-button.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 35);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 35:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(36);\n\n\n/***/ }),\n\n/***/ 36:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// js/admin-shortcode-button.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 35);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 1b0de59fe7a82a520d9a"],"sourceRoot":""}
|
assets/dist/js/admin.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///js/admin.js","webpack:///webpack/bootstrap 4199db3f1e6f7c0f9e58","webpack:///(webpack)/buildin/global.js","webpack:///external \"jQuery\"","webpack:///./node_modules/accounting/accounting.js-exposed","webpack:///./node_modules/accounting/accounting.js","webpack:///./assets/src/js/plugins/give-hint.css.js","webpack:///./assets/src/js/plugins/modal.js","webpack:///./node_modules/magnific-popup/dist/jquery.magnific-popup.js","webpack:///./assets/src/js/admin/admin.js","webpack:///./node_modules/chosen-js/chosen.jquery.js","webpack:///./node_modules/flot/jquery.flot.js","webpack:///./node_modules/flot-orderbars/js/jquery.flot.orderBars.js","webpack:///./node_modules/flot/jquery.flot.time.js","webpack:///./assets/src/js/plugins/give-ajaxify-fields.js","webpack:///./assets/src/js/plugins/selector-cache.js","webpack:///./assets/src/js/plugins/repeatable-fields.js","webpack:///./assets/src/js/admin/admin-forms.js","webpack:///./assets/src/js/admin/admin-settings.js","webpack:///./assets/src/js/plugins/dynamicListener.js","webpack:///./assets/src/js/admin/admin-export.js","webpack:///./assets/src/js/admin/admin-widgets.js","webpack:///./assets/src/js/admin/admin-scripts.js","webpack:///./assets/src/js/admin/admin-importer.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","g","this","Function","eval","e","window","jQuery","global","root","undefined","isString","obj","charCodeAt","substr","isArray","nativeIsArray","toString","isObject","defaults","defs","key","map","iterator","context","j","results","nativeMap","length","checkPrecision","val","base","Math","round","abs","isNaN","checkCurrencyFormat","format","lib","settings","currency","match","pos","neg","replace","zero","version","symbol","decimal","thousand","precision","grouping","number","Array","unformat","parse","value","regex","RegExp","unformatted","parseFloat","toFixed","power","pow","formatNumber","opts","usePrecision","negative","parseInt","mod","split","formatMoney","formats","formatColumn","list","padAfterSymbol","indexOf","maxLength","useFormat","fVal","join","accounting","fn","giveHintCss","action","each","$this","extend","label","$tooltip","next","data","after","css","top","outerHeight","left","outerWidth","addClass","removeClass","document","ready","$","reset_qtip","tooltip","is","classes","attr","icon_classes","label_length","grep","item","append","qtip_tooltips","index","on","__webpack_exports__","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","TypeError","create","constructor","writable","setPrototypeOf","__proto__","_classCallCheck","instance","Constructor","GiveErrorAlert","GiveWarningAlert","GiveSuccessAlert","GiveConfirmModal","__WEBPACK_IMPORTED_MODULE_0_magnific_popup__","__WEBPACK_IMPORTED_MODULE_1__dynamicListener_js__","_createClass","defineProperties","target","props","descriptor","protoProps","staticProps","GiveModal","Error","config","assign","type","triggerSelector","externalPlugin","modalWrapper","modalContent","mainClass","trim","setupTemplate","popupConfig","__setupClickEvent","template","title","desc","cancelBtnTitle","give_vars","cancel","close","confirmBtnTitle","confirm","get_template","magnificPopup","items","src","removalDelay","fixedContentPos","fixedBgPos","alignTop","showCloseBtn","closeOnBgClick","enableEscapeKey","focus","open","event","preventDefault","_GiveModal","_this","getPrototypeOf","init","_GiveModal2","_this2","_GiveModal3","GiveNoticeAlert","_this3","_GiveModal4","_this4","_GiveModal5","_this5","st","successConfirm","el","addDynamicEventListener","__closePopup","__confirmPopup","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","factory","apply","mfp","_prevStatus","_document","_prevContentType","_wrapClasses","_currPopupType","MagnificPopup","_isJQ","_window","_mfpOn","f","ev","_getEl","className","appendTo","html","raw","createElement","innerHTML","appendChild","_mfpTrigger","triggerHandler","callbacks","charAt","toLowerCase","slice","_getCloseBtn","currTemplate","closeBtn","closeMarkup","tClose","_checkInstance","supportsTransitions","style","v","pop","appVersion","navigator","isLowIE","isIE8","all","addEventListener","isAndroid","test","isIOS","supportsTransition","probablyMobile","userAgent","popupsCache","isObj","toArray","parsed","isOpen","updateItemHTML","types","mainEl","eq","modal","closeOnContentClick","bgOverlay","wrap","_checkIfClose","container","contentContainer","preloader","tLoading","toUpperCase","closeBtnInside","values","close_replaceWith","overflow","overflowY","overflowX","scrollTop","position","height","keyCode","updateSize","windowHeight","wH","windowStyles","_hasScrollBar","_getScrollbarSize","marginRight","isIE7","classesToadd","_addClassToMFP","add","prependTo","body","_lastFocusedEl","activeElement","setTimeout","content","_setFocus","_onFocusIn","_close","classesToRemove","REMOVING_CLASS","detach","empty","_removeClassFromMFP","off","removeAttr","currItem","autoFocusLast","prevHeight","winHeight","zoomLevel","documentElement","clientWidth","innerWidth","innerHeight","parseEl","markup","newContent","appendContent","preloaded","prepend","find","tagName","hasClass","addGroup","options","eHandler","mfpEl","_openClick","eName","delegate","midClick","which","ctrlKey","metaKey","altKey","shiftKey","disableOn","isFunction","width","stopPropagation","updateStatus","status","text","stopImmediatePropagation","closeOnContent","closeOnBg","contains","cName","scrollHeight","_parseMarkup","arr","EVENT_NS","replaceWith","scrollbarSize","scrollDiv","cssText","offsetWidth","removeChild","proto","registerModule","push","jqEl","itemOpts","arguments","_hiddenClass","_inlinePlaceholder","_lastInlineElement","_putInlineElementsBack","hiddenClass","tNotFound","initInline","CLOSE_EVENT","getInline","inlineSt","inline","parent","parentNode","inlineElement","_ajaxCur","_removeAjaxCursor","_destroyAjaxRequest","req","abort","cursor","tError","initAjax","ajax","getAjax","url","success","textStatus","jqXHR","temp","xhr","finished","error","loadError","_imgInterval","_getTitle","image","titleSrc","verticalFit","initImage","imgSt","ns","resizeImage","img","decr","_onImageHasSize","hasSize","clearInterval","isCheckingImgSize","imgHidden","findImageSize","counter","mfpSetInterval","delay","setInterval","naturalWidth","getImage","guard","onLoadComplete","complete","loaded","onLoadError","alt","clone","img_replaceWith","loading","hasMozTransform","getHasMozTransform","MozTransform","enabled","easing","duration","opener","element","initZoom","zoomSt","zoom","openTimeout","animatedImg","getElToAnimate","newImg","transition","cssObj","zIndex","-webkit-backface-visibility","t","showMainContent","_allowZoom","clearTimeout","_getItemToZoom","_getOffset","remove","isLarge","offset","paddingTop","paddingBottom","offsetHeight","_fixIframeBugs","isShowing","srcAction","patterns","youtube","id","vimeo","gmaps","initIframe","prevType","newType","getIframe","embedSrc","iframeSt","iframe","lastIndexOf","dataObj","_getLoopedId","numSlides","_replaceCurrTotal","curr","total","arrowMarkup","preload","navigateByImgClick","arrows","tPrev","tNext","tCounter","initGallery","gSt","gallery","direction","prev","arrowLeft","arrowRight","click","_preloadTimeout","preloadNearbyImages","goTo","newIndex","preloadBefore","min","preloadAfter","_preloadItem","replaceSrc","ratio","initRetina","devicePixelRatio","retina","max-width","__WEBPACK_IMPORTED_MODULE_0_chosen_js__","__WEBPACK_IMPORTED_MODULE_1_accounting__","__WEBPACK_IMPORTED_MODULE_2_flot__","__WEBPACK_IMPORTED_MODULE_3_flot_orderbars_js_jquery_flot_orderBars__","__WEBPACK_IMPORTED_MODULE_4_flot_jquery_flot_time__","__WEBPACK_IMPORTED_MODULE_5__plugins_give_ajaxify_fields__","__WEBPACK_IMPORTED_MODULE_6__plugins_selector_cache__","__WEBPACK_IMPORTED_MODULE_7__plugins_repeatable_fields__","__WEBPACK_IMPORTED_MODULE_8__plugins_give_hint_css__","__WEBPACK_IMPORTED_MODULE_9__admin_forms__","__WEBPACK_IMPORTED_MODULE_11__admin_export__","__WEBPACK_IMPORTED_MODULE_12__admin_widgets__","AbstractChosen","Chosen","SelectParser","bind","me","child","ctor","hasProp","__super__","options_index","add_node","nodeName","add_group","add_option","group","group_position","len","option","ref","results1","array_index","children","disabled","childNodes","group_disabled","selected","group_array_index","group_label","select_to_array","select","parser","form_field","options1","label_click_handler","browser_is_supported","is_multiple","multiple","set_default_text","set_default_values","setup","set_up_html","register_observers","on_ready","click_test_action","evt","test_active_click","activate_action","activate_field","active_field","mouse_on_container","results_showing","result_highlighted","is_rtl","rtl","allow_single_deselect","disable_search_threshold","disable_search","enable_split_word_search","group_search","search_contains","single_backstroke_delete","max_selected_options","Infinity","inherit_select_classes","display_selected_options","display_disabled_options","include_group_label_in_selected","max_shown_results","Number","POSITIVE_INFINITY","case_sensitive_search","hide_results_on_select","getAttribute","default_text","placeholder_text_multiple","placeholder_text","default_multiple_text","placeholder_text_single","default_single_text","escape_html","results_none_found","no_results_text","default_no_result_text","choice_label","mouse_enter","mouse_leave","input_focus","container_mousedown","input_blur","blur_test","results_option_build","data_content","shown_results","results_data","result_add_group","result_add_option","first","choice_build","single_set_selected_text","option_el","search_match","include_option_in_results","setAttribute","highlighted_html","outerHTML","group_el","group_match","active_options","results_update_field","results_reset_cleanup","result_clear_highlight","results_build","winnow_results","reset_single_select_options","result","results_toggle","results_hide","results_show","results_search","escapedQuery","fix","prefix","query","results_group","startpos","suffix","no_results_clear","get_search_text","get_search_regex","search_string_match","update_results_content","no_results","skip_highlight","winnow_results_set_highlight","escaped_search_string","regex_flag","regex_string","search_string","exec","choices_count","selected_option_count","choices_click","is_disabled","keydown_checker","stroke","search_field_scale","pending_backstroke","clear_backstroke","backstroke_length","get_search_field_value","result_select","keyup_arrow","keydown_arrow","keyup_checker","keydown_backstroke","clipboard_event_checker","container_width","search_results_touchstart","touch_started","search_results_mouseover","search_results_touchmove","search_results_mouseout","search_results_touchend","search_results_mouseup","tmp","get_single_html","get_multi_html","get_no_results_html","terms","appName","documentMode","chosen","input_field","destroy","form_field_jq","current_selectedIndex","selectedIndex","container_classes","container_props","class","hide","dropdown","search_field","focus_field","search_results","search_no_results","search_choices","search_container","selected_item","set_tab_index","set_label_behavior","trigger","transfer_value","container_mouseup","search_results_mousewheel","close_field","ownerDocument","form_field_label","tabIndex","removeData","show","search_field_disabled","parents","toggleClass","results_reset","delta","originalEvent","deltaY","wheelDelta","detail","show_search_field_default","blur","active_container","closest","parsing","readOnly","result_do_highlight","high_bottom","high_top","maxHeight","visible_bottom","visible_top","result_highlight","ti","choice","close_link","data-option-array-index","choice_destroy_link_click","before","choice_destroy","link","result_deselect","trigger_form_field_change","high","single_deselect_control_build","result_data","deselected","do_high","selected_results","no_results_html","next_sib","nextAll","prev_sibs","prevAll","next_available_destroy","siblings","last","div","style_block","styles","display","whiteSpace","extra","B","color","make","F","E","C","D","G","r","b","a","J","I","H","normalize","scale","K","extract","A","aqua","azure","beige","black","blue","brown","cyan","darkblue","darkcyan","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkviolet","fuchsia","gold","green","indigo","khaki","lightblue","lightcyan","lightgreen","lightgrey","lightpink","lightyellow","lime","magenta","maroon","navy","olive","orange","pink","purple","violet","red","silver","white","yellow","Plot","placeholder","data_","options_","plugins","executeHooks","hook","args","plot","concat","setData","series","parseData","fillInSeriesOptions","processData","res","axisNumber","coord","allAxes","xaxes","yaxes","canvasToAxisCoords","axis","used","c2p","x1","x","y1","y","axisToCanvasCoords","p2c","getOrCreateAxis","axes","xaxis","yaxis","neededColors","maxIndex","sc","colors","colorPool","colorPoolSize","variation","colori","lines","fill","updateAxis","max","datamin","fakeInfinity","datamax","k","points","ps","topSentry","bottomSentry","NEGATIVE_INFINITY","MAX_VALUE","_","datapoints","hooks","processRawData","required","bars","autoscale","defaultValue","horizontal","pointsize","insertSteps","steps","nullify","processDatapoints","xmin","ymin","xmax","ymax","align","barWidth","getPixelRatio","cctx","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","makeCanvas","cls","getContext","G_vmlCanvasManager","initElement","pixelRatio","canvasWidth","canvasHeight","save","getCanvasDimensions","resizeCanvas","restore","shutdown","redrawTimeout","eventHolder","unbind","onMouseMove","onMouseLeave","onClick","setTransformationHelpers","identity","transform","it","inverseTransform","plotWidth","plotHeight","measureTickLabels","ticks","axisw","labelWidth","axish","labelHeight","font","ctx","variant","weight","size","family","line","measureText","ceil","allocateAxisBoxFirstPhase","innermost","lw","lh","tickLength","axisMargin","grid","padding","labelMargin","samePosition","reserveSpace","inArray","sameDirection","plotOffset","bottom","box","right","allocateAxisBoxSecondPhase","adjustLayoutForThingsStickingOut","minMargin","minBorderMargin","margins","radius","lineWidth","dir","setupGrid","showGrid","margin","processOffset","borderWidth","setRange","fontDefaults","allocatedAxes","setupTickGeneration","setTicks","snapRangeToTicks","insertLegend","widen","autoscaleMargin","noTicks","sqrt","mode","tickGenerator","maxDec","tickDecimals","dec","floor","log","LN10","start","magn","norm","NaN","minTickSize","tickSize","floorInBase","tickFormatter","factor","formatted","alignTicksWithAxis","otherAxis","niceTicks","extraDec","ts","oticks","draw","clearRect","drawBackground","backgroundColor","aboveData","drawGrid","drawAxisLabels","drawSeries","extractRange","ranges","from","to","translate","fillStyle","getColorOrGradient","fillRect","bw","bc","markings","getAxes","xrange","yrange","beginPath","strokeStyle","markingsColor","markingsLineWidth","moveTo","lineTo","xoff","yoff","tickColor","borderColor","strokeRect","textAlign","textBaseline","tick","opera","fillText","drawSeriesLines","drawSeriesBars","drawSeriesPoints","plotLine","xoffset","yoffset","axisx","axisy","prevx","prevy","x2","y2","lineJoin","sw","shadowSize","angle","PI","sin","cos","getFillStyle","areaOpen","ypos","segmentStart","segmentEnd","x1old","x2old","plotPoints","shadow","arc","closePath","w","drawBar","barLeft","barRight","fillStyleCallback","drawLeft","drawRight","drawTop","drawBottom","filloptions","seriesColor","fillColor","legend","fragments","entries","rowStarted","lf","labelFormatter","sorted","sort","reverse","ascending","entry","noColumns","labelBoxBorderColor","table","backgroundOpacity","findNearbyItem","mouseX","mouseY","seriesFilter","maxDistance","mouseActiveRadius","smallestDistance","mx","my","maxx","maxy","dx","dy","dist","datapoint","dataIndex","seriesIndex","hoverable","triggerClickHoverEvent","eventname","canvasX","pageX","canvasY","pageY","autoHighlight","highlights","h","auto","point","unhighlight","highlight","triggerRedrawOverlay","interaction","redrawOverlayInterval","drawOverlay","octx","hi","drawBarHighlight","drawPointHighlight","indexOfHighlight","splice","highlightColor","pointRadius","spec","defaultColor","gradient","createLinearGradient","co","brightness","opacity","addColorStop","timezone","monthNames","timeformat","twelveHourClock","clickable","canvas","overlay","processOptions","bindEvents","getPlaceholder","getCanvas","getPlotOffset","getData","getXAxes","getYAxes","getOptions","pointOffset","resize","x2axis","y2axis","coloredAreas","coloredAreasColor","reused","existingCanvas","existingOverlay","not","mousemove","reOrderBars","serie","shiftedPoints","serieNeedToBeReordered","checkIfGraphIsHorizontal","calculPixel2XWidthConvert","retrieveBarSeries","calculBorderAndBarWidth","nbOfBarsToOrder","findPosition","decallage","centerBarShift","calculCenterBarShift","decallageByOrder","order","isBarAtLeftOfCenter","sumWidth","orderedBarSeries","borderWidthInXabsWidth","shiftPoints","gridDimSize","isHorizontal","minMaxValues","getAxeMinMaxValues","AxeSize","pixelInXWidthEquivalent","AxeIdx","findOthersBarsToReOrders","retSeries","orderValuesSeen","sortByOrder","serie1","serie2","end","totalWidth","formatDate","fmt","dayNames","strftime","leftPad","pad","escape","hours","getHours","isAM","hours12","getDay","getMonth","getDate","getMinutes","getSeconds","getFullYear","makeUtcWrapper","addProxyMethod","sourceObj","sourceMethod","targetObj","targetMethod","utc","date","dateGenerator","Date","timezoneJS","setTimezone","setTime","axisName","minSize","specQuarters","specMonths","timeUnitSize","unit","year","step","setSeconds","setMinutes","setHours","setMonth","setFullYear","setMilliseconds","minute","hour","day","setDate","month","quarter","carry","getTime","useQuarters","span","hourCode","second","baseSpec","_typeof","Symbol","giveAjaxifyFields","customSettings","$countryField","$parentWrapper","defaultSettings","parentWrapper","countryFieldName","stateFieldName","stateFieldWrapper","chosenState","change","$stateField","$stateFieldWrapper","$stateFieldLabel","country","field_name","post","ajaxurl","response","show_field","states_label","states_found","default_state","Give_Selector_Cache","collection","selector","refresh_cache","repeatable_fields","custom_settings","initialize","wrapper","prop","row_count","row","filter","row_template","before_add","new_row","after_add","confirm_before_remove_row","confirm_before_remove_row_text","before_remove","after_remove","is_sortable","ui","sortable","sortable_options","handle","move","attributes","row_count_placeholder","default_settings","noConflict","misc_cleanup","handle_default_radio","toggle_conditional_form_fields","goal_option","goal_format","goal_format_val","goal_option_val","handle_repeatable_row_ID","set_row_ids","count_repeatable_rows","row_counter","row_largest_number","row_number","row_id","__WEBPACK_IMPORTED_MODULE_0__plugins_modal__","$payment_gateways","currency_text","give_settings_currency","currency_sign","shift","before_text","give_settings_position","after_text","$parent","$first_setting_field_group","$new_setting_field_group","setting_field_count","fieldID","$prev_field","$icon_container","$loader","set_notification_status","notification_id","animate","method","beforeSend","done","flush_success","message","ok","render","flush_error","globalSope","getConditionalCallback","callback","matches","Element","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","querySelectorAll","rootElement","eventType","give_export_update_donation_form","$form","$container","fields","serialize","form_ids","output_give_donations_fields","standard_fields","standard_field_list","hidden_fields","hidden_field_list","give_form_id","form_id","alert","error_message","continue_button_setting_js","$continue_button_title","ajaxSuccess","give_render_responsive_tabs","$setting_page_form","$main_tab_nav","setting_page_form_width","$sub_tab_nav_wrapper","$sub_tab_nav","$setting_tab_links","$show_tabs","$hide_tabs","tab_width","Promise","resolve","reject","$tab_link","then","is_refactor_tabs","location","search","$current_tab_nav","query_params","get_url_params","is_current_nav_item","unshift","is_show_tabs","hash","vars","hashes","href","give_setting_edit","give_unformat_currency","price","dp","decimal_separator","currency_decimals","giveAjaxLoader","$loaderParent","give_dismiss_notice","give_remove_give_message","urlparts","urlBase","queryString","encodeURIComponent","pars","history","pushState","enable_admin_datepicker","datepicker","dateFormat","setup_chosen_give_selects","$give_chosen_containers","$no_results_li","error_string","ajax_search_msg","no_results_msg","one_option","one_or_more_option","typingTimer","$search_field","lastKey","search_type","dataType","fail","console","search_placeholder","GiveListDonation","deleteSingleDonation","resendSingleDonationReceipt","confirm_delete_donation","delete_payment","confirm_resend","resend_receipt","Give_Edit_Donation","edit_address","add_note","remove_note","new_donor","variable_price_list","state_wrap","postData","payment_id","note","border_color","that","confirm_deletion","delete_payment_note","note_id","toggle","variable_prices_html_container","prices","$total_amount","Give_Settings","setting_change_country","toggle_options","main_setting_update_notice","verify_settings","saveButtonTriggered","changeAlert","detectSettingsChange","sequentialDonationIDPreview","fieldValueEmail","fieldValueRecaptcha","field_value","$setting_message","slideUp","success_setting","failure_setting","notice_html","matched_success_failure_page","dismiss_notice_text","$notice_container","confirmationMessage","setting_not_save_message","returnValue","settingsPage","on_load_value","on_change_value","$previewField","startingNumber","numberPadding","$donationID","padStart","Give_Reports","date_options","donors_export","recount_stats","customer_export_option","price_options_select","all_prices","export_form","selected_type","submit_button","forms","notice_wrap","reset_stats_warn","delete_test_donor","delete_import_donor","current_forms","min-width","submit","selection","has_errors","batch_export_no_class","batch_export_no_reqs","Give_Export","dismiss_message","submitButton","parent_notices","process_step","form","reset_form","success_message","percentage","reset","responseText","Give_Updates","$self","main_container","update_link","run_upload_container","progress_main_container","heading","progress_container","update_progress_counter","get_db_updates_info","db_update_confirmation_msg_button","db_update_confirmation_msg","fadeOut","run_db_update","keys","total_percentage","updates","ajax_error","update","always","Give_Upgrades","restartUpgrade","stopUpgrade","restartUpdater","confirm_action","restart_upgrade","stop_upgrade","restart_update","handle_status_change","GiveDonor","unlockDonorFields","editDonor","add_email","removeUser","cancelEdit","delete_checked","addressesAction","bulkDeleteDonor","handleBulkActions","unlock_donor_fields_title","unlock_donor_fields_message","fadeIn","disconnect_user","donorID","give_action","customer_id","_wpnonce","redirect","donor_note","add_donor_note_nonce","records_input","button","email","primary","nonce","$obj","$addressWrapper","$allAddress","$noAddressMessageWrapper","$allAddressParent","$addressForm","$addressFormCancelBtn","$addressFormCountryField","$addNewAddressBtn","__set_address_form_val","__set_address_form_action","address_html","margin-left","$prevParent","$nextParent","is_address_added","success_msg","error_msg","addressAction","addressID","$addressActionField","$addressIDField","state","$body","selectAll","donorId","donorName","donorHtml","remove_from_bulk_delete","donorSelector","bulkDeleteList","slideDown","currentAction","donors","selectBulkActionNotice","donors_bulk_action","no_action_selected","confirmActionNotice","no_donor_selected","API_Screen","revoke_api_key","regenerate_api_key","Edit_Form_Screen","default_tab_id","handle_metabox_tab_click","setup_colorpicker_fields","setup_media_fields","setup_repeatable_fields","handle_repeater_group_events","handle_multi_levels_repeater_group_events","activate_tab","update_query","tab_id","$li_parent","$sub_field","has_sub_field","$tab_links","$all_tab_links_li","$all_sub_fields","in_sub_fields","$active_subtab_li","new_query","set","replaceState","$colorpicker_fields","$item","wpColorPicker","give_media_uploader","$give_upload_button","$media_modal_config","metabox_fields","media","button_title","library","file","wp","controller","Library","contentUserSetting","$library","attachment","toJSON","$input_field","fvalue","attachment_id_field_name","$image_container","$image_input_field","handle_metabox_repeater_field_row_count","handle_metabox_repeater_field_row_remove","stop","$rows","$fields","$currentElement","old_class_name_prefix","old_class_name","new_class_name","new_class_name_prefix","$repeater_fields","handle_repeater_group_add_number_suffix","$textarea","tinyMCE","execCommand","textarea_id","switchEditors","go","wysiwyg_editor_container","wysiwyg_editor","textarea","random","wysiwyg_editor_label","wp_editor","wp_editor_id","textarea_name","tinyMCEPreInit","qtInit","mceInit","body_class","tinymce","quicktags","QTags","_buttonsInit","wpActiveEditor","$header_title_container","donation_level_header_text_prefix","$repeatable_rows","$default_radio","max_level_id","current_level","header_text_prefix","GivePaymentHistory","currentActionLabel","$payments","isStatusTypeAction","donations_bulk_action","titles","single","confirm_bulk_action","debug","user_search","exclude","user_name","search_response","login","$poststuff","thousand_separator","thousands_separator","thousand_separator_count","alphabet_count","price_string","thousand_separator_limit","tootltip_setting","price_format_guide","default_amount","is_enabled","$setting_fields","give_on_core_settings_import_start","progress","core_settings_import","import_failed","give_import_core_settings_json_is_valid","import_step","give_start_importing_donations","give_on_donation_import_ajax","give_import_donation_csv_not_valid","give_import_donation_valid_csv","total_ajax","current","per_page","give_donation_import","give_import_donation_onload","onload","give_import_donation_required_fields_check","give_import_donation_on_drop_down_change","querySelector","required_fields","first_name","amount","forEach","classList","select_fields","field","includes","getElementById"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,MDMM,SAAUtB,EAAQD,GEnExB,GAAAwB,EAGAA,GAAA,WACA,MAAAC,QAGA,KAEAD,KAAAE,SAAA,qBAAAC,MAAA,QACC,MAAAC,GAED,gBAAAC,UACAL,EAAAK,QAOA5B,EAAAD,QAAAwB,GF0EM,SAAUvB,EAAQD,GG9FxBC,EAAAD,QAAA8B,QHmGO,CAED,SAAU7B,EAAQD,EAASH,IIrGjC,SAAAkC,G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AAS,GAGVz7C,SAASsrD,eAAgB,wBAAyBnvC,SAAWs/B,GAjS/D,GAAArM,GAAAl3C,EAAA,GAiBIy8C,GAAoB,CAExBx6C,QAAOk0C,aACP,SACYnuC,GAGVA,EAAG,WACFuqD,OAGAtwD,SvBqwXG,SAAU7B,EAAQD","file":"js/admin.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 18);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nvar g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 2 */,\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"accounting\"] = __webpack_require__(4);\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*!\n * accounting.js v0.4.1\n * Copyright 2014 Open Exchange Rates\n *\n * Freely distributable under the MIT license.\n * Portions of accounting.js are inspired or borrowed from underscore.js\n *\n * Full details and documentation:\n * http://openexchangerates.github.io/accounting.js/\n */\n\n(function(root, undefined) {\n\n\t/* --- Setup --- */\n\n\t// Create the local library object, to be exported or referenced globally later\n\tvar lib = {};\n\n\t// Current version\n\tlib.version = '0.4.1';\n\n\n\t/* --- Exposed settings --- */\n\n\t// The library's settings configuration object. Contains default parameters for\n\t// currency and number formatting\n\tlib.settings = {\n\t\tcurrency: {\n\t\t\tsymbol : \"$\",\t\t// default currency symbol is '$'\n\t\t\tformat : \"%s%v\",\t// controls output: %s = symbol, %v = value (can be object, see docs)\n\t\t\tdecimal : \".\",\t\t// decimal point separator\n\t\t\tthousand : \",\",\t\t// thousands separator\n\t\t\tprecision : 2,\t\t// decimal places\n\t\t\tgrouping : 3\t\t// digit grouping (not implemented yet)\n\t\t},\n\t\tnumber: {\n\t\t\tprecision : 0,\t\t// default precision on numbers is 0\n\t\t\tgrouping : 3,\t\t// digit grouping (not implemented yet)\n\t\t\tthousand : \",\",\n\t\t\tdecimal : \".\"\n\t\t}\n\t};\n\n\n\t/* --- Internal Helper Methods --- */\n\n\t// Store reference to possibly-available ECMAScript 5 methods for later\n\tvar nativeMap = Array.prototype.map,\n\t\tnativeIsArray = Array.isArray,\n\t\ttoString = Object.prototype.toString;\n\n\t/**\n\t * Tests whether supplied parameter is a string\n\t * from underscore.js\n\t */\n\tfunction isString(obj) {\n\t\treturn !!(obj === '' || (obj && obj.charCodeAt && obj.substr));\n\t}\n\n\t/**\n\t * Tests whether supplied parameter is a string\n\t * from underscore.js, delegates to ECMA5's native Array.isArray\n\t */\n\tfunction isArray(obj) {\n\t\treturn nativeIsArray ? nativeIsArray(obj) : toString.call(obj) === '[object Array]';\n\t}\n\n\t/**\n\t * Tests whether supplied parameter is a true object\n\t */\n\tfunction isObject(obj) {\n\t\treturn obj && toString.call(obj) === '[object Object]';\n\t}\n\n\t/**\n\t * Extends an object with a defaults object, similar to underscore's _.defaults\n\t *\n\t * Used for abstracting parameter handling from API methods\n\t */\n\tfunction defaults(object, defs) {\n\t\tvar key;\n\t\tobject = object || {};\n\t\tdefs = defs || {};\n\t\t// Iterate over object non-prototype properties:\n\t\tfor (key in defs) {\n\t\t\tif (defs.hasOwnProperty(key)) {\n\t\t\t\t// Replace values with defaults only if undefined (allow empty/zero values):\n\t\t\t\tif (object[key] == null) object[key] = defs[key];\n\t\t\t}\n\t\t}\n\t\treturn object;\n\t}\n\n\t/**\n\t * Implementation of `Array.map()` for iteration loops\n\t *\n\t * Returns a new Array as a result of calling `iterator` on each array value.\n\t * Defers to native Array.map if available\n\t */\n\tfunction map(obj, iterator, context) {\n\t\tvar results = [], i, j;\n\n\t\tif (!obj) return results;\n\n\t\t// Use native .map method if it exists:\n\t\tif (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);\n\n\t\t// Fallback for native .map:\n\t\tfor (i = 0, j = obj.length; i < j; i++ ) {\n\t\t\tresults[i] = iterator.call(context, obj[i], i, obj);\n\t\t}\n\t\treturn results;\n\t}\n\n\t/**\n\t * Check and normalise the value of precision (must be positive integer)\n\t */\n\tfunction checkPrecision(val, base) {\n\t\tval = Math.round(Math.abs(val));\n\t\treturn isNaN(val)? base : val;\n\t}\n\n\n\t/**\n\t * Parses a format string or object and returns format obj for use in rendering\n\t *\n\t * `format` is either a string with the default (positive) format, or object\n\t * containing `pos` (required), `neg` and `zero` values (or a function returning\n\t * either a string or object)\n\t *\n\t * Either string or format.pos must contain \"%v\" (value) to be valid\n\t */\n\tfunction checkCurrencyFormat(format) {\n\t\tvar defaults = lib.settings.currency.format;\n\n\t\t// Allow function as format parameter (should return string or object):\n\t\tif ( typeof format === \"function\" ) format = format();\n\n\t\t// Format can be a string, in which case `value` (\"%v\") must be present:\n\t\tif ( isString( format ) && format.match(\"%v\") ) {\n\n\t\t\t// Create and return positive, negative and zero formats:\n\t\t\treturn {\n\t\t\t\tpos : format,\n\t\t\t\tneg : format.replace(\"-\", \"\").replace(\"%v\", \"-%v\"),\n\t\t\t\tzero : format\n\t\t\t};\n\n\t\t// If no format, or object is missing valid positive value, use defaults:\n\t\t} else if ( !format || !format.pos || !format.pos.match(\"%v\") ) {\n\n\t\t\t// If defaults is a string, casts it to an object for faster checking next time:\n\t\t\treturn ( !isString( defaults ) ) ? defaults : lib.settings.currency.format = {\n\t\t\t\tpos : defaults,\n\t\t\t\tneg : defaults.replace(\"%v\", \"-%v\"),\n\t\t\t\tzero : defaults\n\t\t\t};\n\n\t\t}\n\t\t// Otherwise, assume format was fine:\n\t\treturn format;\n\t}\n\n\n\t/* --- API Methods --- */\n\n\t/**\n\t * Takes a string/array of strings, removes all formatting/cruft and returns the raw float value\n\t * Alias: `accounting.parse(string)`\n\t *\n\t * Decimal must be included in the regular expression to match floats (defaults to\n\t * accounting.settings.number.decimal), so if the number uses a non-standard decimal \n\t * separator, provide it as the second argument.\n\t *\n\t * Also matches bracketed negatives (eg. \"$ (1.99)\" => -1.99)\n\t *\n\t * Doesn't throw any errors (`NaN`s become 0) but this may change in future\n\t */\n\tvar unformat = lib.unformat = lib.parse = function(value, decimal) {\n\t\t// Recursively unformat arrays:\n\t\tif (isArray(value)) {\n\t\t\treturn map(value, function(val) {\n\t\t\t\treturn unformat(val, decimal);\n\t\t\t});\n\t\t}\n\n\t\t// Fails silently (need decent errors):\n\t\tvalue = value || 0;\n\n\t\t// Return the value as-is if it's already a number:\n\t\tif (typeof value === \"number\") return value;\n\n\t\t// Default decimal point comes from settings, but could be set to eg. \",\" in opts:\n\t\tdecimal = decimal || lib.settings.number.decimal;\n\n\t\t // Build regex to strip out everything except digits, decimal point and minus sign:\n\t\tvar regex = new RegExp(\"[^0-9-\" + decimal + \"]\", [\"g\"]),\n\t\t\tunformatted = parseFloat(\n\t\t\t\t(\"\" + value)\n\t\t\t\t.replace(/\\((.*)\\)/, \"-$1\") // replace bracketed values with negatives\n\t\t\t\t.replace(regex, '') // strip out any cruft\n\t\t\t\t.replace(decimal, '.') // make sure decimal point is standard\n\t\t\t);\n\n\t\t// This will fail silently which may cause trouble, let's wait and see:\n\t\treturn !isNaN(unformatted) ? unformatted : 0;\n\t};\n\n\n\t/**\n\t * Implementation of toFixed() that treats floats more like decimals\n\t *\n\t * Fixes binary rounding issues (eg. (0.615).toFixed(2) === \"0.61\") that present\n\t * problems for accounting- and finance-related software.\n\t */\n\tvar toFixed = lib.toFixed = function(value, precision) {\n\t\tprecision = checkPrecision(precision, lib.settings.number.precision);\n\t\tvar power = Math.pow(10, precision);\n\n\t\t// Multiply up by precision, round accurately, then divide and use native toFixed():\n\t\treturn (Math.round(lib.unformat(value) * power) / power).toFixed(precision);\n\t};\n\n\n\t/**\n\t * Format a number, with comma-separated thousands and custom precision/decimal places\n\t * Alias: `accounting.format()`\n\t *\n\t * Localise by overriding the precision and thousand / decimal separators\n\t * 2nd parameter `precision` can be an object matching `settings.number`\n\t */\n\tvar formatNumber = lib.formatNumber = lib.format = function(number, precision, thousand, decimal) {\n\t\t// Resursively format arrays:\n\t\tif (isArray(number)) {\n\t\t\treturn map(number, function(val) {\n\t\t\t\treturn formatNumber(val, precision, thousand, decimal);\n\t\t\t});\n\t\t}\n\n\t\t// Clean up number:\n\t\tnumber = unformat(number);\n\n\t\t// Build options object from second param (if object) or all params, extending defaults:\n\t\tvar opts = defaults(\n\t\t\t\t(isObject(precision) ? precision : {\n\t\t\t\t\tprecision : precision,\n\t\t\t\t\tthousand : thousand,\n\t\t\t\t\tdecimal : decimal\n\t\t\t\t}),\n\t\t\t\tlib.settings.number\n\t\t\t),\n\n\t\t\t// Clean up precision\n\t\t\tusePrecision = checkPrecision(opts.precision),\n\n\t\t\t// Do some calc:\n\t\t\tnegative = number < 0 ? \"-\" : \"\",\n\t\t\tbase = parseInt(toFixed(Math.abs(number || 0), usePrecision), 10) + \"\",\n\t\t\tmod = base.length > 3 ? base.length % 3 : 0;\n\n\t\t// Format the number:\n\t\treturn negative + (mod ? base.substr(0, mod) + opts.thousand : \"\") + base.substr(mod).replace(/(\\d{3})(?=\\d)/g, \"$1\" + opts.thousand) + (usePrecision ? opts.decimal + toFixed(Math.abs(number), usePrecision).split('.')[1] : \"\");\n\t};\n\n\n\t/**\n\t * Format a number into currency\n\t *\n\t * Usage: accounting.formatMoney(number, symbol, precision, thousandsSep, decimalSep, format)\n\t * defaults: (0, \"$\", 2, \",\", \".\", \"%s%v\")\n\t *\n\t * Localise by overriding the symbol, precision, thousand / decimal separators and format\n\t * Second param can be an object matching `settings.currency` which is the easiest way.\n\t *\n\t * To do: tidy up the parameters\n\t */\n\tvar formatMoney = lib.formatMoney = function(number, symbol, precision, thousand, decimal, format) {\n\t\t// Resursively format arrays:\n\t\tif (isArray(number)) {\n\t\t\treturn map(number, function(val){\n\t\t\t\treturn formatMoney(val, symbol, precision, thousand, decimal, format);\n\t\t\t});\n\t\t}\n\n\t\t// Clean up number:\n\t\tnumber = unformat(number);\n\n\t\t// Build options object from second param (if object) or all params, extending defaults:\n\t\tvar opts = defaults(\n\t\t\t\t(isObject(symbol) ? symbol : {\n\t\t\t\t\tsymbol : symbol,\n\t\t\t\t\tprecision : precision,\n\t\t\t\t\tthousand : thousand,\n\t\t\t\t\tdecimal : decimal,\n\t\t\t\t\tformat : format\n\t\t\t\t}),\n\t\t\t\tlib.settings.currency\n\t\t\t),\n\n\t\t\t// Check format (returns object with pos, neg and zero):\n\t\t\tformats = checkCurrencyFormat(opts.format),\n\n\t\t\t// Choose which format to use for this value:\n\t\t\tuseFormat = number > 0 ? formats.pos : number < 0 ? formats.neg : formats.zero;\n\n\t\t// Return with currency symbol added:\n\t\treturn useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(number), checkPrecision(opts.precision), opts.thousand, opts.decimal));\n\t};\n\n\n\t/**\n\t * Format a list of numbers into an accounting column, padding with whitespace\n\t * to line up currency symbols, thousand separators and decimals places\n\t *\n\t * List should be an array of numbers\n\t * Second parameter can be an object containing keys that match the params\n\t *\n\t * Returns array of accouting-formatted number strings of same length\n\t *\n\t * NB: `white-space:pre` CSS rule is required on the list container to prevent\n\t * browsers from collapsing the whitespace in the output strings.\n\t */\n\tlib.formatColumn = function(list, symbol, precision, thousand, decimal, format) {\n\t\tif (!list) return [];\n\n\t\t// Build options object from second param (if object) or all params, extending defaults:\n\t\tvar opts = defaults(\n\t\t\t\t(isObject(symbol) ? symbol : {\n\t\t\t\t\tsymbol : symbol,\n\t\t\t\t\tprecision : precision,\n\t\t\t\t\tthousand : thousand,\n\t\t\t\t\tdecimal : decimal,\n\t\t\t\t\tformat : format\n\t\t\t\t}),\n\t\t\t\tlib.settings.currency\n\t\t\t),\n\n\t\t\t// Check format (returns object with pos, neg and zero), only need pos for now:\n\t\t\tformats = checkCurrencyFormat(opts.format),\n\n\t\t\t// Whether to pad at start of string or after currency symbol:\n\t\t\tpadAfterSymbol = formats.pos.indexOf(\"%s\") < formats.pos.indexOf(\"%v\") ? true : false,\n\n\t\t\t// Store value for the length of the longest string in the column:\n\t\t\tmaxLength = 0,\n\n\t\t\t// Format the list according to options, store the length of the longest string:\n\t\t\tformatted = map(list, function(val, i) {\n\t\t\t\tif (isArray(val)) {\n\t\t\t\t\t// Recursively format columns if list is a multi-dimensional array:\n\t\t\t\t\treturn lib.formatColumn(val, opts);\n\t\t\t\t} else {\n\t\t\t\t\t// Clean up the value\n\t\t\t\t\tval = unformat(val);\n\n\t\t\t\t\t// Choose which format to use for this value (pos, neg or zero):\n\t\t\t\t\tvar useFormat = val > 0 ? formats.pos : val < 0 ? formats.neg : formats.zero,\n\n\t\t\t\t\t\t// Format this value, push into formatted list and save the length:\n\t\t\t\t\t\tfVal = useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(val), checkPrecision(opts.precision), opts.thousand, opts.decimal));\n\n\t\t\t\t\tif (fVal.length > maxLength) maxLength = fVal.length;\n\t\t\t\t\treturn fVal;\n\t\t\t\t}\n\t\t\t});\n\n\t\t// Pad each number in the list and send back the column of numbers:\n\t\treturn map(formatted, function(val, i) {\n\t\t\t// Only if this is a string (not a nested array, which would have already been padded):\n\t\t\tif (isString(val) && val.length < maxLength) {\n\t\t\t\t// Depending on symbol position, pad after symbol or at index 0:\n\t\t\t\treturn padAfterSymbol ? val.replace(opts.symbol, opts.symbol+(new Array(maxLength - val.length + 1).join(\" \"))) : (new Array(maxLength - val.length + 1).join(\" \")) + val;\n\t\t\t}\n\t\t\treturn val;\n\t\t});\n\t};\n\n\n\t/* --- Module Definition --- */\n\n\t// Export accounting for CommonJS. If being loaded as an AMD module, define it as such.\n\t// Otherwise, just add `accounting` to the global object\n\tif (true) {\n\t\tif (typeof module !== 'undefined' && module.exports) {\n\t\t\texports = module.exports = lib;\n\t\t}\n\t\texports.accounting = lib;\n\t} else if (typeof define === 'function' && define.amd) {\n\t\t// Return the library as an AMD module:\n\t\tdefine([], function() {\n\t\t\treturn lib;\n\t\t});\n\t} else {\n\t\t// Use accounting.noConflict to restore `accounting` back to its original value.\n\t\t// Returns a reference to the library's `accounting` object;\n\t\t// e.g. `var numbers = accounting.noConflict();`\n\t\tlib.noConflict = (function(oldAccounting) {\n\t\t\treturn function() {\n\t\t\t\t// Reset the value of the root's `accounting` variable:\n\t\t\t\troot.accounting = oldAccounting;\n\t\t\t\t// Delete the noConflict method:\n\t\t\t\tlib.noConflict = undefined;\n\t\t\t\t// Return reference to the library to re-assign it:\n\t\t\t\treturn lib;\n\t\t\t};\n\t\t})(root.accounting);\n\n\t\t// Declare `fx` on the root (global/window) object:\n\t\troot['accounting'] = lib;\n\t}\n\n\t// Root will be `window` in browser or `global` on the server:\n}(this));\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\njQuery.fn.giveHintCss = function (action, settings) {\n\treturn this.each(function () {\n\t\tvar $this = jQuery(this);\n\t\tsettings = jQuery.extend({\n\t\t\tlabel: ''\n\t\t}, settings);\n\n\t\tvar $tooltip = $this.next('span.give-hint-tooltip-js');\n\t\tif (!$tooltip.length) {\n\t\t\tvar label = !settings.label.length ? $this.data('hint-aria-label') : settings.label;\n\n\t\t\t// bailout.\n\t\t\tif (!label.length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this.after('<span class=\"give-hint-tooltip-js hint--top hint--medium\" aria-label=\"' + label + '\"></span>');\n\t\t\t$tooltip = $this.next();\n\n\t\t\t$tooltip.css({\n\t\t\t\ttop: -$this.outerHeight(),\n\t\t\t\tleft: -($this.outerWidth() / 2)\n\t\t\t});\n\t\t}\n\n\t\tif (action === 'show') {\n\t\t\t$tooltip.addClass('hint--always');\n\t\t} else if (action === 'hide') {\n\t\t\t$tooltip.removeClass('hint--always');\n\t\t}\n\t});\n};\n\n// Qtip2 backward compatibility.\njQuery(document).ready(function ($) {\n\tvar qtip_tooltips = $('[data-tooltip]');\n\n\t// Add hintcss tooltip to existing qtip.\n\tif (qtip_tooltips.length) {\n\t\tqtip_tooltips.each(function (index, tooltip) {\n\t\t\ttooltip = tooltip instanceof jQuery ? tooltip : $(tooltip);\n\t\t\treset_qtip(tooltip);\n\t\t});\n\t}\n\n\t// Add hintcss tooltip to dynamically created qtip.\n\t$('body').on('hover', '[data-tooltip]', function () {\n\t\treset_qtip($(this));\n\t});\n\n\t/**\n * Reset qtip to hintcss\n * @param tooltip\n */\n\tfunction reset_qtip(tooltip) {\n\t\tif (!tooltip.is('[class*=\"hint\"]')) {\n\t\t\tvar classes = tooltip.attr('class'),\n\t\t\t icon_classes = [],\n\t\t\t label_length = tooltip.data('tooltip').split(' ').length;\n\n\t\t\tif (classes) {\n\t\t\t\tclasses = classes.split(' ');\n\t\t\t\ticon_classes = $.grep(classes, function (item) {\n\t\t\t\t\treturn -1 !== item.indexOf('give-icon');\n\t\t\t\t});\n\n\t\t\t\tif (icon_classes.length) {\n\t\t\t\t\t// Set icon classes string.\n\t\t\t\t\ticon_classes = icon_classes.join(' ');\n\n\t\t\t\t\t// Remove icon class.\n\t\t\t\t\ttooltip.removeClass(icon_classes);\n\n\t\t\t\t\t// Add icon.\n\t\t\t\t\ttooltip.append('<i class=\"' + icon_classes + '\"></i>');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add hint.css related classes.\n\t\t\ttooltip.addClass('hint--top');\n\n\t\t\tif (15 < label_length) {\n\t\t\t\ttooltip.addClass('hint--large');\n\t\t\t} else if (7 < label_length) {\n\t\t\t\ttooltip.addClass('hint--medium');\n\t\t\t}\n\n\t\t\ttooltip.attr('aria-label', tooltip.data('tooltip'));\n\t\t}\n\t}\n});\n\n/***/ }),\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export GiveModal */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return GiveErrorAlert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return GiveWarningAlert; });\n/* unused harmony export GiveNoticeAlert */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return GiveSuccessAlert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GiveConfirmModal; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_magnific_popup__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_magnific_popup___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_magnific_popup__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__dynamicListener_js__ = __webpack_require__(29);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__dynamicListener_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__dynamicListener_js__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * This API is under development, so do not use this in production.\n * We will open this API for use after some testing (coming releases).\n */\n\n\n\n/**\n * This abstract class is base for modal\n *\n * @since 2.1.0\n */\n\nvar GiveModal = function () {\n\tfunction GiveModal(obj) {\n\t\t_classCallCheck(this, GiveModal);\n\n\t\tif (GiveModal === this.constructor) {\n\t\t\tthrow new Error('Abstract classes can\\'t be instantiated.');\n\t\t}\n\n\t\tthis.config = Object.assign({\n\t\t\ttype: '',\n\t\t\ttriggerSelector: '',\n\t\t\texternalPlugin: 'magnificPopup',\n\t\t\tclasses: { modalWrapper: '' },\n\t\t\tmodalContent: {}\n\t\t}, obj);\n\n\t\t// Set main class.\n\t\tthis.config.mainClass = ((this.config.mainClass ? this.config.mainClass : '') + ' modal-fade-slide').trim();\n\t}\n\n\t/**\n * Bootstrap\n */\n\n\n\t_createClass(GiveModal, [{\n\t\tkey: 'init',\n\t\tvalue: function init() {\n\t\t\tthis.setupTemplate();\n\t\t\tthis.popupConfig();\n\t\t\tthis.__setupClickEvent();\n\t\t}\n\n\t\t/**\n * Get template\n *\n * @since 2.1.0\n */\n\n\t}, {\n\t\tkey: 'get_template',\n\t\tvalue: function get_template() {\n\t\t\tvar template = '<div class=\"give-hidden\"></div>';\n\n\t\t\tif (this.config.type.length) {\n\t\t\t\ttemplate = '<div class=\"give-modal give-modal--zoom ' + (this.config.classes.modalWrapper ? ('' + this.config.classes.modalWrapper).trim() : '') + '\">\\n\\n\\t\\t\\t\\t<div class=\"give-modal__body\">\\n\\t\\t\\t\\t\\t' + (this.config.modalContent.title ? '<h2 class=\"give-modal__title\">' + this.config.modalContent.title + '</h2>' : '') + '\\n\\t\\t\\t\\t\\t' + (this.config.modalContent.desc ? '<p class=\"give-modal__description\">' + this.config.modalContent.desc + '</p>' : '') + '\\n\\t\\t\\t\\t</div>\\n\\t\\n\\t\\t\\t\\t<div class=\"give-modal__controls\">\\n\\t\\t\\t\\t\\t<button class=\"give-button give-button--secondary give-popup-close-button\">\\n\\t\\t\\t\\t\\t\\t' + (this.config.modalContent.cancelBtnTitle ? this.config.modalContent.cancelBtnTitle : 'confirm' === this.config.type ? give_vars.cancel : give_vars.close) + '\\n\\t\\t\\t\\t\\t</button>\\n\\t\\t\\t\\t\\t' + ('confirm' !== this.config.type ? '' : '<button class=\"give-button give-button--primary give-popup-confirm-button\">\\n\\t\\t\\t\\t\\t\\t' + (this.config.modalContent.confirmBtnTitle ? this.config.modalContent.confirmBtnTitle : give_vars.confirm) + '\\n\\t\\t\\t\\t\\t</button>') + '\\n\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t\\n\\t\\t\\t</div>';\n\t\t\t}\n\n\t\t\treturn template;\n\t\t}\n\n\t\t/**\n * Setup template\n *\n * @since 2.1.0\n */\n\n\t}, {\n\t\tkey: 'setupTemplate',\n\t\tvalue: function setupTemplate() {\n\t\t\tthis.config.template = this.get_template();\n\t\t}\n\n\t\t/**\n * Handle click event if triggerSelector is set.\n *\n * @since 2.1.0\n * @private\n */\n\n\t}, {\n\t\tkey: '__setupClickEvent',\n\t\tvalue: function __setupClickEvent() {\n\t\t\t// Bailout.\n\t\t\tif (!this.config.triggerSelector.length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tjQuery(this.config.triggerSelector).magnificPopup(this.config);\n\t\t}\n\n\t\t/**\n * Setup popup params\n *\n * Note: only for internal purpose\n *\n * @since 2.1.0\n * @private\n */\n\n\t}, {\n\t\tkey: 'popupConfig',\n\t\tvalue: function popupConfig() {\n\t\t\tif ('magnificPopup' === this.config.externalPlugin) {\n\t\t\t\tthis.config.items = this.config.items || {\n\t\t\t\t\tsrc: this.config.template,\n\t\t\t\t\ttype: 'inline'\n\t\t\t\t};\n\n\t\t\t\tthis.config.removalDelay = 300;\n\t\t\t\tthis.config.fixedContentPos = true;\n\t\t\t\tthis.config.fixedBgPos = true;\n\t\t\t\tthis.config.alignTop = true;\n\t\t\t\tthis.config.showCloseBtn = false;\n\t\t\t\tthis.config.closeOnBgClick = false;\n\t\t\t\tthis.config.enableEscapeKey = true;\n\t\t\t\tthis.config.focus = '.give-popup-close-button';\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Click close button event handler\n *\n * @since 2.1.0\n * @private\n */\n\n\t}, {\n\t\tkey: 'render',\n\n\n\t\t/**\n * Give's Notice Popup\n *\n * @since 2.1.0\n */\n\t\tvalue: function render() {\n\t\t\tswitch (this.config.externalPlugin) {\n\n\t\t\t\tcase 'magnificPopup':\n\t\t\t\t\tif (!this.config.triggerSelector) {\n\t\t\t\t\t\tjQuery.magnificPopup.open(this.config);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t}], [{\n\t\tkey: '__closePopup',\n\t\tvalue: function __closePopup(event) {\n\t\t\tevent.preventDefault();\n\t\t\tjQuery.magnificPopup.instance.close();\n\t\t}\n\t}]);\n\n\treturn GiveModal;\n}();\n\n/**\n * This class will handle error alert modal\n *\n * @since 2.1.0\n */\n\n\nvar GiveErrorAlert = function (_GiveModal) {\n\t_inherits(GiveErrorAlert, _GiveModal);\n\n\tfunction GiveErrorAlert(obj) {\n\t\t_classCallCheck(this, GiveErrorAlert);\n\n\t\tobj.type = 'alert';\n\n\t\tvar _this = _possibleConstructorReturn(this, (GiveErrorAlert.__proto__ || Object.getPrototypeOf(GiveErrorAlert)).call(this, obj));\n\n\t\t_this.config.classes.modalWrapper = 'give-modal--error';\n\n\t\t_this.init();\n\t\treturn _this;\n\t}\n\n\treturn GiveErrorAlert;\n}(GiveModal);\n\n/**\n * This class will handle warning alert modal\n *\n * @since 2.1.0\n */\n\n\nvar GiveWarningAlert = function (_GiveModal2) {\n\t_inherits(GiveWarningAlert, _GiveModal2);\n\n\tfunction GiveWarningAlert(obj) {\n\t\t_classCallCheck(this, GiveWarningAlert);\n\n\t\tobj.type = 'alert';\n\n\t\tvar _this2 = _possibleConstructorReturn(this, (GiveWarningAlert.__proto__ || Object.getPrototypeOf(GiveWarningAlert)).call(this, obj));\n\n\t\t_this2.config.classes.modalWrapper = 'give-modal--warning';\n\n\t\t_this2.init();\n\n\t\treturn _this2;\n\t}\n\n\treturn GiveWarningAlert;\n}(GiveModal);\n\n/**\n * This class will handle notice alert modal\n *\n * @since 2.1.0\n */\n\n\nvar GiveNoticeAlert = function (_GiveModal3) {\n\t_inherits(GiveNoticeAlert, _GiveModal3);\n\n\tfunction GiveNoticeAlert(obj) {\n\t\t_classCallCheck(this, GiveNoticeAlert);\n\n\t\tobj.type = 'alert';\n\n\t\tvar _this3 = _possibleConstructorReturn(this, (GiveNoticeAlert.__proto__ || Object.getPrototypeOf(GiveNoticeAlert)).call(this, obj));\n\n\t\t_this3.config.classes.modalWrapper = 'give-modal--notice';\n\n\t\t_this3.init();\n\t\treturn _this3;\n\t}\n\n\treturn GiveNoticeAlert;\n}(GiveModal);\n\n/**\n * This class will handle success alert modal\n *\n * @since 2.1.0\n */\n\n\nvar GiveSuccessAlert = function (_GiveModal4) {\n\t_inherits(GiveSuccessAlert, _GiveModal4);\n\n\tfunction GiveSuccessAlert(obj) {\n\t\t_classCallCheck(this, GiveSuccessAlert);\n\n\t\tobj.type = 'alert';\n\n\t\tvar _this4 = _possibleConstructorReturn(this, (GiveSuccessAlert.__proto__ || Object.getPrototypeOf(GiveSuccessAlert)).call(this, obj));\n\n\t\t_this4.config.classes.modalWrapper = 'give-modal--success';\n\n\t\t_this4.init();\n\t\treturn _this4;\n\t}\n\n\treturn GiveSuccessAlert;\n}(GiveModal);\n\n/**\n * This class will handle confirm modal\n *\n * @since 2.1.0\n */\n\n\nvar GiveConfirmModal = function (_GiveModal5) {\n\t_inherits(GiveConfirmModal, _GiveModal5);\n\n\tfunction GiveConfirmModal(obj) {\n\t\t_classCallCheck(this, GiveConfirmModal);\n\n\t\tobj.type = 'confirm';\n\n\t\tvar _this5 = _possibleConstructorReturn(this, (GiveConfirmModal.__proto__ || Object.getPrototypeOf(GiveConfirmModal)).call(this, obj));\n\n\t\tif ('undefined' !== typeof obj.modalWrapper && '' !== obj.modalWrapper) {\n\t\t\t_this5.config.classes.modalWrapper = obj.modalWrapper;\n\t\t}\n\n\t\t_this5.init();\n\t\treturn _this5;\n\t}\n\n\t/**\n * Confirm button click event handler\n *\n * Note: only for internal purpose\n *\n * @since 2.1.0\n * @private\n */\n\n\n\t_createClass(GiveConfirmModal, null, [{\n\t\tkey: '__confirmPopup',\n\t\tvalue: function __confirmPopup() {\n\t\t\tif ('function' === typeof jQuery.magnificPopup.instance.st.successConfirm) {\n\t\t\t\tjQuery.magnificPopup.instance.st.successConfirm({\n\t\t\t\t\tel: jQuery.magnificPopup.instance.st.el\n\t\t\t\t});\n\t\t\t\tjQuery.magnificPopup.close();\n\t\t\t}\n\t\t}\n\t}]);\n\n\treturn GiveConfirmModal;\n}(GiveModal);\n\n/**\n * Add events\n */\n\n\nwindow.addDynamicEventListener(document, 'click', '.give-popup-close-button', GiveModal.__closePopup);\nwindow.addDynamicEventListener(document, 'click', '.give-popup-confirm-button', GiveConfirmModal.__confirmPopup);\n\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Magnific Popup - v1.1.0 - 2016-02-20\n* http://dimsemenov.com/plugins/magnific-popup/\n* Copyright (c) 2016 Dmitry Semenov; */\n;(function (factory) { \nif (true) { \n // AMD. Register as an anonymous module. \n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); \n } else if (typeof exports === 'object') { \n // Node/CommonJS \n factory(require('jquery')); \n } else { \n // Browser globals \n factory(window.jQuery || window.Zepto); \n } \n }(function($) { \n\n/*>>core*/\n/**\n * \n * Magnific Popup Core JS file\n * \n */\n\n\n/**\n * Private static constants\n */\nvar CLOSE_EVENT = 'Close',\n\tBEFORE_CLOSE_EVENT = 'BeforeClose',\n\tAFTER_CLOSE_EVENT = 'AfterClose',\n\tBEFORE_APPEND_EVENT = 'BeforeAppend',\n\tMARKUP_PARSE_EVENT = 'MarkupParse',\n\tOPEN_EVENT = 'Open',\n\tCHANGE_EVENT = 'Change',\n\tNS = 'mfp',\n\tEVENT_NS = '.' + NS,\n\tREADY_CLASS = 'mfp-ready',\n\tREMOVING_CLASS = 'mfp-removing',\n\tPREVENT_CLOSE_CLASS = 'mfp-prevent-close';\n\n\n/**\n * Private vars \n */\n/*jshint -W079 */\nvar mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'\n\tMagnificPopup = function(){},\n\t_isJQ = !!(window.jQuery),\n\t_prevStatus,\n\t_window = $(window),\n\t_document,\n\t_prevContentType,\n\t_wrapClasses,\n\t_currPopupType;\n\n\n/**\n * Private functions\n */\nvar _mfpOn = function(name, f) {\n\t\tmfp.ev.on(NS + name + EVENT_NS, f);\n\t},\n\t_getEl = function(className, appendTo, html, raw) {\n\t\tvar el = document.createElement('div');\n\t\tel.className = 'mfp-'+className;\n\t\tif(html) {\n\t\t\tel.innerHTML = html;\n\t\t}\n\t\tif(!raw) {\n\t\t\tel = $(el);\n\t\t\tif(appendTo) {\n\t\t\t\tel.appendTo(appendTo);\n\t\t\t}\n\t\t} else if(appendTo) {\n\t\t\tappendTo.appendChild(el);\n\t\t}\n\t\treturn el;\n\t},\n\t_mfpTrigger = function(e, data) {\n\t\tmfp.ev.triggerHandler(NS + e, data);\n\n\t\tif(mfp.st.callbacks) {\n\t\t\t// converts \"mfpEventName\" to \"eventName\" callback and triggers it if it's present\n\t\t\te = e.charAt(0).toLowerCase() + e.slice(1);\n\t\t\tif(mfp.st.callbacks[e]) {\n\t\t\t\tmfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);\n\t\t\t}\n\t\t}\n\t},\n\t_getCloseBtn = function(type) {\n\t\tif(type !== _currPopupType || !mfp.currTemplate.closeBtn) {\n\t\t\tmfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );\n\t\t\t_currPopupType = type;\n\t\t}\n\t\treturn mfp.currTemplate.closeBtn;\n\t},\n\t// Initialize Magnific Popup only when called at least once\n\t_checkInstance = function() {\n\t\tif(!$.magnificPopup.instance) {\n\t\t\t/*jshint -W020 */\n\t\t\tmfp = new MagnificPopup();\n\t\t\tmfp.init();\n\t\t\t$.magnificPopup.instance = mfp;\n\t\t}\n\t},\n\t// CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr\n\tsupportsTransitions = function() {\n\t\tvar s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist\n\t\t\tv = ['ms','O','Moz','Webkit']; // 'v' for vendor\n\n\t\tif( s['transition'] !== undefined ) {\n\t\t\treturn true; \n\t\t}\n\t\t\t\n\t\twhile( v.length ) {\n\t\t\tif( v.pop() + 'Transition' in s ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn false;\n\t};\n\n\n\n/**\n * Public functions\n */\nMagnificPopup.prototype = {\n\n\tconstructor: MagnificPopup,\n\n\t/**\n\t * Initializes Magnific Popup plugin. \n\t * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed\n\t */\n\tinit: function() {\n\t\tvar appVersion = navigator.appVersion;\n\t\tmfp.isLowIE = mfp.isIE8 = document.all && !document.addEventListener;\n\t\tmfp.isAndroid = (/android/gi).test(appVersion);\n\t\tmfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);\n\t\tmfp.supportsTransition = supportsTransitions();\n\n\t\t// We disable fixed positioned lightbox on devices that don't handle it nicely.\n\t\t// If you know a better way of detecting this - let me know.\n\t\tmfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );\n\t\t_document = $(document);\n\n\t\tmfp.popupsCache = {};\n\t},\n\n\t/**\n\t * Opens popup\n\t * @param data [description]\n\t */\n\topen: function(data) {\n\n\t\tvar i;\n\n\t\tif(data.isObj === false) { \n\t\t\t// convert jQuery collection to array to avoid conflicts later\n\t\t\tmfp.items = data.items.toArray();\n\n\t\t\tmfp.index = 0;\n\t\t\tvar items = data.items,\n\t\t\t\titem;\n\t\t\tfor(i = 0; i < items.length; i++) {\n\t\t\t\titem = items[i];\n\t\t\t\tif(item.parsed) {\n\t\t\t\t\titem = item.el[0];\n\t\t\t\t}\n\t\t\t\tif(item === data.el[0]) {\n\t\t\t\t\tmfp.index = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tmfp.items = $.isArray(data.items) ? data.items : [data.items];\n\t\t\tmfp.index = data.index || 0;\n\t\t}\n\n\t\t// if popup is already opened - we just update the content\n\t\tif(mfp.isOpen) {\n\t\t\tmfp.updateItemHTML();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmfp.types = []; \n\t\t_wrapClasses = '';\n\t\tif(data.mainEl && data.mainEl.length) {\n\t\t\tmfp.ev = data.mainEl.eq(0);\n\t\t} else {\n\t\t\tmfp.ev = _document;\n\t\t}\n\n\t\tif(data.key) {\n\t\t\tif(!mfp.popupsCache[data.key]) {\n\t\t\t\tmfp.popupsCache[data.key] = {};\n\t\t\t}\n\t\t\tmfp.currTemplate = mfp.popupsCache[data.key];\n\t\t} else {\n\t\t\tmfp.currTemplate = {};\n\t\t}\n\n\n\n\t\tmfp.st = $.extend(true, {}, $.magnificPopup.defaults, data ); \n\t\tmfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;\n\n\t\tif(mfp.st.modal) {\n\t\t\tmfp.st.closeOnContentClick = false;\n\t\t\tmfp.st.closeOnBgClick = false;\n\t\t\tmfp.st.showCloseBtn = false;\n\t\t\tmfp.st.enableEscapeKey = false;\n\t\t}\n\t\t\n\n\t\t// Building markup\n\t\t// main containers are created only once\n\t\tif(!mfp.bgOverlay) {\n\n\t\t\t// Dark overlay\n\t\t\tmfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() {\n\t\t\t\tmfp.close();\n\t\t\t});\n\n\t\t\tmfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {\n\t\t\t\tif(mfp._checkIfClose(e.target)) {\n\t\t\t\t\tmfp.close();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmfp.container = _getEl('container', mfp.wrap);\n\t\t}\n\n\t\tmfp.contentContainer = _getEl('content');\n\t\tif(mfp.st.preloader) {\n\t\t\tmfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading);\n\t\t}\n\n\n\t\t// Initializing modules\n\t\tvar modules = $.magnificPopup.modules;\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar n = modules[i];\n\t\t\tn = n.charAt(0).toUpperCase() + n.slice(1);\n\t\t\tmfp['init'+n].call(mfp);\n\t\t}\n\t\t_mfpTrigger('BeforeOpen');\n\n\n\t\tif(mfp.st.showCloseBtn) {\n\t\t\t// Close button\n\t\t\tif(!mfp.st.closeBtnInside) {\n\t\t\t\tmfp.wrap.append( _getCloseBtn() );\n\t\t\t} else {\n\t\t\t\t_mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {\n\t\t\t\t\tvalues.close_replaceWith = _getCloseBtn(item.type);\n\t\t\t\t});\n\t\t\t\t_wrapClasses += ' mfp-close-btn-in';\n\t\t\t}\n\t\t}\n\n\t\tif(mfp.st.alignTop) {\n\t\t\t_wrapClasses += ' mfp-align-top';\n\t\t}\n\n\t\n\n\t\tif(mfp.fixedContentPos) {\n\t\t\tmfp.wrap.css({\n\t\t\t\toverflow: mfp.st.overflowY,\n\t\t\t\toverflowX: 'hidden',\n\t\t\t\toverflowY: mfp.st.overflowY\n\t\t\t});\n\t\t} else {\n\t\t\tmfp.wrap.css({ \n\t\t\t\ttop: _window.scrollTop(),\n\t\t\t\tposition: 'absolute'\n\t\t\t});\n\t\t}\n\t\tif( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) {\n\t\t\tmfp.bgOverlay.css({\n\t\t\t\theight: _document.height(),\n\t\t\t\tposition: 'absolute'\n\t\t\t});\n\t\t}\n\n\t\t\n\n\t\tif(mfp.st.enableEscapeKey) {\n\t\t\t// Close on ESC key\n\t\t\t_document.on('keyup' + EVENT_NS, function(e) {\n\t\t\t\tif(e.keyCode === 27) {\n\t\t\t\t\tmfp.close();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t_window.on('resize' + EVENT_NS, function() {\n\t\t\tmfp.updateSize();\n\t\t});\n\n\n\t\tif(!mfp.st.closeOnContentClick) {\n\t\t\t_wrapClasses += ' mfp-auto-cursor';\n\t\t}\n\t\t\n\t\tif(_wrapClasses)\n\t\t\tmfp.wrap.addClass(_wrapClasses);\n\n\n\t\t// this triggers recalculation of layout, so we get it once to not to trigger twice\n\t\tvar windowHeight = mfp.wH = _window.height();\n\n\t\t\n\t\tvar windowStyles = {};\n\n\t\tif( mfp.fixedContentPos ) {\n if(mfp._hasScrollBar(windowHeight)){\n var s = mfp._getScrollbarSize();\n if(s) {\n windowStyles.marginRight = s;\n }\n }\n }\n\n\t\tif(mfp.fixedContentPos) {\n\t\t\tif(!mfp.isIE7) {\n\t\t\t\twindowStyles.overflow = 'hidden';\n\t\t\t} else {\n\t\t\t\t// ie7 double-scroll bug\n\t\t\t\t$('body, html').css('overflow', 'hidden');\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t\n\t\tvar classesToadd = mfp.st.mainClass;\n\t\tif(mfp.isIE7) {\n\t\t\tclassesToadd += ' mfp-ie7';\n\t\t}\n\t\tif(classesToadd) {\n\t\t\tmfp._addClassToMFP( classesToadd );\n\t\t}\n\n\t\t// add content\n\t\tmfp.updateItemHTML();\n\n\t\t_mfpTrigger('BuildControls');\n\n\t\t// remove scrollbar, add margin e.t.c\n\t\t$('html').css(windowStyles);\n\t\t\n\t\t// add everything to DOM\n\t\tmfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || $(document.body) );\n\n\t\t// Save last focused element\n\t\tmfp._lastFocusedEl = document.activeElement;\n\t\t\n\t\t// Wait for next cycle to allow CSS transition\n\t\tsetTimeout(function() {\n\t\t\t\n\t\t\tif(mfp.content) {\n\t\t\t\tmfp._addClassToMFP(READY_CLASS);\n\t\t\t\tmfp._setFocus();\n\t\t\t} else {\n\t\t\t\t// if content is not defined (not loaded e.t.c) we add class only for BG\n\t\t\t\tmfp.bgOverlay.addClass(READY_CLASS);\n\t\t\t}\n\t\t\t\n\t\t\t// Trap the focus in popup\n\t\t\t_document.on('focusin' + EVENT_NS, mfp._onFocusIn);\n\n\t\t}, 16);\n\n\t\tmfp.isOpen = true;\n\t\tmfp.updateSize(windowHeight);\n\t\t_mfpTrigger(OPEN_EVENT);\n\n\t\treturn data;\n\t},\n\n\t/**\n\t * Closes the popup\n\t */\n\tclose: function() {\n\t\tif(!mfp.isOpen) return;\n\t\t_mfpTrigger(BEFORE_CLOSE_EVENT);\n\n\t\tmfp.isOpen = false;\n\t\t// for CSS3 animation\n\t\tif(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) {\n\t\t\tmfp._addClassToMFP(REMOVING_CLASS);\n\t\t\tsetTimeout(function() {\n\t\t\t\tmfp._close();\n\t\t\t}, mfp.st.removalDelay);\n\t\t} else {\n\t\t\tmfp._close();\n\t\t}\n\t},\n\n\t/**\n\t * Helper for close() function\n\t */\n\t_close: function() {\n\t\t_mfpTrigger(CLOSE_EVENT);\n\n\t\tvar classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';\n\n\t\tmfp.bgOverlay.detach();\n\t\tmfp.wrap.detach();\n\t\tmfp.container.empty();\n\n\t\tif(mfp.st.mainClass) {\n\t\t\tclassesToRemove += mfp.st.mainClass + ' ';\n\t\t}\n\n\t\tmfp._removeClassFromMFP(classesToRemove);\n\n\t\tif(mfp.fixedContentPos) {\n\t\t\tvar windowStyles = {marginRight: ''};\n\t\t\tif(mfp.isIE7) {\n\t\t\t\t$('body, html').css('overflow', '');\n\t\t\t} else {\n\t\t\t\twindowStyles.overflow = '';\n\t\t\t}\n\t\t\t$('html').css(windowStyles);\n\t\t}\n\t\t\n\t\t_document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);\n\t\tmfp.ev.off(EVENT_NS);\n\n\t\t// clean up DOM elements that aren't removed\n\t\tmfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');\n\t\tmfp.bgOverlay.attr('class', 'mfp-bg');\n\t\tmfp.container.attr('class', 'mfp-container');\n\n\t\t// remove close button from target element\n\t\tif(mfp.st.showCloseBtn &&\n\t\t(!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {\n\t\t\tif(mfp.currTemplate.closeBtn)\n\t\t\t\tmfp.currTemplate.closeBtn.detach();\n\t\t}\n\n\n\t\tif(mfp.st.autoFocusLast && mfp._lastFocusedEl) {\n\t\t\t$(mfp._lastFocusedEl).focus(); // put tab focus back\n\t\t}\n\t\tmfp.currItem = null;\t\n\t\tmfp.content = null;\n\t\tmfp.currTemplate = null;\n\t\tmfp.prevHeight = 0;\n\n\t\t_mfpTrigger(AFTER_CLOSE_EVENT);\n\t},\n\t\n\tupdateSize: function(winHeight) {\n\n\t\tif(mfp.isIOS) {\n\t\t\t// fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2\n\t\t\tvar zoomLevel = document.documentElement.clientWidth / window.innerWidth;\n\t\t\tvar height = window.innerHeight * zoomLevel;\n\t\t\tmfp.wrap.css('height', height);\n\t\t\tmfp.wH = height;\n\t\t} else {\n\t\t\tmfp.wH = winHeight || _window.height();\n\t\t}\n\t\t// Fixes #84: popup incorrectly positioned with position:relative on body\n\t\tif(!mfp.fixedContentPos) {\n\t\t\tmfp.wrap.css('height', mfp.wH);\n\t\t}\n\n\t\t_mfpTrigger('Resize');\n\n\t},\n\n\t/**\n\t * Set content of popup based on current index\n\t */\n\tupdateItemHTML: function() {\n\t\tvar item = mfp.items[mfp.index];\n\n\t\t// Detach and perform modifications\n\t\tmfp.contentContainer.detach();\n\n\t\tif(mfp.content)\n\t\t\tmfp.content.detach();\n\n\t\tif(!item.parsed) {\n\t\t\titem = mfp.parseEl( mfp.index );\n\t\t}\n\n\t\tvar type = item.type;\n\n\t\t_mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]);\n\t\t// BeforeChange event works like so:\n\t\t// _mfpOn('BeforeChange', function(e, prevType, newType) { });\n\n\t\tmfp.currItem = item;\n\n\t\tif(!mfp.currTemplate[type]) {\n\t\t\tvar markup = mfp.st[type] ? mfp.st[type].markup : false;\n\n\t\t\t// allows to modify markup\n\t\t\t_mfpTrigger('FirstMarkupParse', markup);\n\n\t\t\tif(markup) {\n\t\t\t\tmfp.currTemplate[type] = $(markup);\n\t\t\t} else {\n\t\t\t\t// if there is no markup found we just define that template is parsed\n\t\t\t\tmfp.currTemplate[type] = true;\n\t\t\t}\n\t\t}\n\n\t\tif(_prevContentType && _prevContentType !== item.type) {\n\t\t\tmfp.container.removeClass('mfp-'+_prevContentType+'-holder');\n\t\t}\n\n\t\tvar newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);\n\t\tmfp.appendContent(newContent, type);\n\n\t\titem.preloaded = true;\n\n\t\t_mfpTrigger(CHANGE_EVENT, item);\n\t\t_prevContentType = item.type;\n\n\t\t// Append container back after its content changed\n\t\tmfp.container.prepend(mfp.contentContainer);\n\n\t\t_mfpTrigger('AfterChange');\n\t},\n\n\n\t/**\n\t * Set HTML content of popup\n\t */\n\tappendContent: function(newContent, type) {\n\t\tmfp.content = newContent;\n\n\t\tif(newContent) {\n\t\t\tif(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&\n\t\t\t\tmfp.currTemplate[type] === true) {\n\t\t\t\t// if there is no markup, we just append close button element inside\n\t\t\t\tif(!mfp.content.find('.mfp-close').length) {\n\t\t\t\t\tmfp.content.append(_getCloseBtn());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmfp.content = newContent;\n\t\t\t}\n\t\t} else {\n\t\t\tmfp.content = '';\n\t\t}\n\n\t\t_mfpTrigger(BEFORE_APPEND_EVENT);\n\t\tmfp.container.addClass('mfp-'+type+'-holder');\n\n\t\tmfp.contentContainer.append(mfp.content);\n\t},\n\n\n\t/**\n\t * Creates Magnific Popup data object based on given data\n\t * @param {int} index Index of item to parse\n\t */\n\tparseEl: function(index) {\n\t\tvar item = mfp.items[index],\n\t\t\ttype;\n\n\t\tif(item.tagName) {\n\t\t\titem = { el: $(item) };\n\t\t} else {\n\t\t\ttype = item.type;\n\t\t\titem = { data: item, src: item.src };\n\t\t}\n\n\t\tif(item.el) {\n\t\t\tvar types = mfp.types;\n\n\t\t\t// check for 'mfp-TYPE' class\n\t\t\tfor(var i = 0; i < types.length; i++) {\n\t\t\t\tif( item.el.hasClass('mfp-'+types[i]) ) {\n\t\t\t\t\ttype = types[i];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\titem.src = item.el.attr('data-mfp-src');\n\t\t\tif(!item.src) {\n\t\t\t\titem.src = item.el.attr('href');\n\t\t\t}\n\t\t}\n\n\t\titem.type = type || mfp.st.type || 'inline';\n\t\titem.index = index;\n\t\titem.parsed = true;\n\t\tmfp.items[index] = item;\n\t\t_mfpTrigger('ElementParse', item);\n\n\t\treturn mfp.items[index];\n\t},\n\n\n\t/**\n\t * Initializes single popup or a group of popups\n\t */\n\taddGroup: function(el, options) {\n\t\tvar eHandler = function(e) {\n\t\t\te.mfpEl = this;\n\t\t\tmfp._openClick(e, el, options);\n\t\t};\n\n\t\tif(!options) {\n\t\t\toptions = {};\n\t\t}\n\n\t\tvar eName = 'click.magnificPopup';\n\t\toptions.mainEl = el;\n\n\t\tif(options.items) {\n\t\t\toptions.isObj = true;\n\t\t\tel.off(eName).on(eName, eHandler);\n\t\t} else {\n\t\t\toptions.isObj = false;\n\t\t\tif(options.delegate) {\n\t\t\t\tel.off(eName).on(eName, options.delegate , eHandler);\n\t\t\t} else {\n\t\t\t\toptions.items = el;\n\t\t\t\tel.off(eName).on(eName, eHandler);\n\t\t\t}\n\t\t}\n\t},\n\t_openClick: function(e, el, options) {\n\t\tvar midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;\n\n\n\t\tif(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;\n\n\t\tif(disableOn) {\n\t\t\tif($.isFunction(disableOn)) {\n\t\t\t\tif( !disableOn.call(mfp) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else { // else it's number\n\t\t\t\tif( _window.width() < disableOn ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(e.type) {\n\t\t\te.preventDefault();\n\n\t\t\t// This will prevent popup from closing if element is inside and popup is already opened\n\t\t\tif(mfp.isOpen) {\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t}\n\n\t\toptions.el = $(e.mfpEl);\n\t\tif(options.delegate) {\n\t\t\toptions.items = el.find(options.delegate);\n\t\t}\n\t\tmfp.open(options);\n\t},\n\n\n\t/**\n\t * Updates text on preloader\n\t */\n\tupdateStatus: function(status, text) {\n\n\t\tif(mfp.preloader) {\n\t\t\tif(_prevStatus !== status) {\n\t\t\t\tmfp.container.removeClass('mfp-s-'+_prevStatus);\n\t\t\t}\n\n\t\t\tif(!text && status === 'loading') {\n\t\t\t\ttext = mfp.st.tLoading;\n\t\t\t}\n\n\t\t\tvar data = {\n\t\t\t\tstatus: status,\n\t\t\t\ttext: text\n\t\t\t};\n\t\t\t// allows to modify status\n\t\t\t_mfpTrigger('UpdateStatus', data);\n\n\t\t\tstatus = data.status;\n\t\t\ttext = data.text;\n\n\t\t\tmfp.preloader.html(text);\n\n\t\t\tmfp.preloader.find('a').on('click', function(e) {\n\t\t\t\te.stopImmediatePropagation();\n\t\t\t});\n\n\t\t\tmfp.container.addClass('mfp-s-'+status);\n\t\t\t_prevStatus = status;\n\t\t}\n\t},\n\n\n\t/*\n\t\t\"Private\" helpers that aren't private at all\n\t */\n\t// Check to close popup or not\n\t// \"target\" is an element that was clicked\n\t_checkIfClose: function(target) {\n\n\t\tif($(target).hasClass(PREVENT_CLOSE_CLASS)) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar closeOnContent = mfp.st.closeOnContentClick;\n\t\tvar closeOnBg = mfp.st.closeOnBgClick;\n\n\t\tif(closeOnContent && closeOnBg) {\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\t// We close the popup if click is on close button or on preloader. Or if there is no content.\n\t\t\tif(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// if click is outside the content\n\t\t\tif( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) {\n\t\t\t\tif(closeOnBg) {\n\t\t\t\t\t// last check, if the clicked element is in DOM, (in case it's removed onclick)\n\t\t\t\t\tif( $.contains(document, target) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if(closeOnContent) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\t},\n\t_addClassToMFP: function(cName) {\n\t\tmfp.bgOverlay.addClass(cName);\n\t\tmfp.wrap.addClass(cName);\n\t},\n\t_removeClassFromMFP: function(cName) {\n\t\tthis.bgOverlay.removeClass(cName);\n\t\tmfp.wrap.removeClass(cName);\n\t},\n\t_hasScrollBar: function(winHeight) {\n\t\treturn ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );\n\t},\n\t_setFocus: function() {\n\t\t(mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();\n\t},\n\t_onFocusIn: function(e) {\n\t\tif( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {\n\t\t\tmfp._setFocus();\n\t\t\treturn false;\n\t\t}\n\t},\n\t_parseMarkup: function(template, values, item) {\n\t\tvar arr;\n\t\tif(item.data) {\n\t\t\tvalues = $.extend(item.data, values);\n\t\t}\n\t\t_mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] );\n\n\t\t$.each(values, function(key, value) {\n\t\t\tif(value === undefined || value === false) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tarr = key.split('_');\n\t\t\tif(arr.length > 1) {\n\t\t\t\tvar el = template.find(EVENT_NS + '-'+arr[0]);\n\n\t\t\t\tif(el.length > 0) {\n\t\t\t\t\tvar attr = arr[1];\n\t\t\t\t\tif(attr === 'replaceWith') {\n\t\t\t\t\t\tif(el[0] !== value[0]) {\n\t\t\t\t\t\t\tel.replaceWith(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(attr === 'img') {\n\t\t\t\t\t\tif(el.is('img')) {\n\t\t\t\t\t\t\tel.attr('src', value);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tel.replaceWith( $('<img>').attr('src', value).attr('class', el.attr('class')) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tel.attr(arr[1], value);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\ttemplate.find(EVENT_NS + '-'+key).html(value);\n\t\t\t}\n\t\t});\n\t},\n\n\t_getScrollbarSize: function() {\n\t\t// thx David\n\t\tif(mfp.scrollbarSize === undefined) {\n\t\t\tvar scrollDiv = document.createElement(\"div\");\n\t\t\tscrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';\n\t\t\tdocument.body.appendChild(scrollDiv);\n\t\t\tmfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n\t\t\tdocument.body.removeChild(scrollDiv);\n\t\t}\n\t\treturn mfp.scrollbarSize;\n\t}\n\n}; /* MagnificPopup core prototype end */\n\n\n\n\n/**\n * Public static functions\n */\n$.magnificPopup = {\n\tinstance: null,\n\tproto: MagnificPopup.prototype,\n\tmodules: [],\n\n\topen: function(options, index) {\n\t\t_checkInstance();\n\n\t\tif(!options) {\n\t\t\toptions = {};\n\t\t} else {\n\t\t\toptions = $.extend(true, {}, options);\n\t\t}\n\n\t\toptions.isObj = true;\n\t\toptions.index = index || 0;\n\t\treturn this.instance.open(options);\n\t},\n\n\tclose: function() {\n\t\treturn $.magnificPopup.instance && $.magnificPopup.instance.close();\n\t},\n\n\tregisterModule: function(name, module) {\n\t\tif(module.options) {\n\t\t\t$.magnificPopup.defaults[name] = module.options;\n\t\t}\n\t\t$.extend(this.proto, module.proto);\n\t\tthis.modules.push(name);\n\t},\n\n\tdefaults: {\n\n\t\t// Info about options is in docs:\n\t\t// http://dimsemenov.com/plugins/magnific-popup/documentation.html#options\n\n\t\tdisableOn: 0,\n\n\t\tkey: null,\n\n\t\tmidClick: false,\n\n\t\tmainClass: '',\n\n\t\tpreloader: true,\n\n\t\tfocus: '', // CSS selector of input to focus after popup is opened\n\n\t\tcloseOnContentClick: false,\n\n\t\tcloseOnBgClick: true,\n\n\t\tcloseBtnInside: true,\n\n\t\tshowCloseBtn: true,\n\n\t\tenableEscapeKey: true,\n\n\t\tmodal: false,\n\n\t\talignTop: false,\n\n\t\tremovalDelay: 0,\n\n\t\tprependTo: null,\n\n\t\tfixedContentPos: 'auto',\n\n\t\tfixedBgPos: 'auto',\n\n\t\toverflowY: 'auto',\n\n\t\tcloseMarkup: '<button title=\"%title%\" type=\"button\" class=\"mfp-close\">×</button>',\n\n\t\ttClose: 'Close (Esc)',\n\n\t\ttLoading: 'Loading...',\n\n\t\tautoFocusLast: true\n\n\t}\n};\n\n\n\n$.fn.magnificPopup = function(options) {\n\t_checkInstance();\n\n\tvar jqEl = $(this);\n\n\t// We call some API method of first param is a string\n\tif (typeof options === \"string\" ) {\n\n\t\tif(options === 'open') {\n\t\t\tvar items,\n\t\t\t\titemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,\n\t\t\t\tindex = parseInt(arguments[1], 10) || 0;\n\n\t\t\tif(itemOpts.items) {\n\t\t\t\titems = itemOpts.items[index];\n\t\t\t} else {\n\t\t\t\titems = jqEl;\n\t\t\t\tif(itemOpts.delegate) {\n\t\t\t\t\titems = items.find(itemOpts.delegate);\n\t\t\t\t}\n\t\t\t\titems = items.eq( index );\n\t\t\t}\n\t\t\tmfp._openClick({mfpEl:items}, jqEl, itemOpts);\n\t\t} else {\n\t\t\tif(mfp.isOpen)\n\t\t\t\tmfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));\n\t\t}\n\n\t} else {\n\t\t// clone options obj\n\t\toptions = $.extend(true, {}, options);\n\n\t\t/*\n\t\t * As Zepto doesn't support .data() method for objects\n\t\t * and it works only in normal browsers\n\t\t * we assign \"options\" object directly to the DOM element. FTW!\n\t\t */\n\t\tif(_isJQ) {\n\t\t\tjqEl.data('magnificPopup', options);\n\t\t} else {\n\t\t\tjqEl[0].magnificPopup = options;\n\t\t}\n\n\t\tmfp.addGroup(jqEl, options);\n\n\t}\n\treturn jqEl;\n};\n\n/*>>core*/\n\n/*>>inline*/\n\nvar INLINE_NS = 'inline',\n\t_hiddenClass,\n\t_inlinePlaceholder,\n\t_lastInlineElement,\n\t_putInlineElementsBack = function() {\n\t\tif(_lastInlineElement) {\n\t\t\t_inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach();\n\t\t\t_lastInlineElement = null;\n\t\t}\n\t};\n\n$.magnificPopup.registerModule(INLINE_NS, {\n\toptions: {\n\t\thiddenClass: 'hide', // will be appended with `mfp-` prefix\n\t\tmarkup: '',\n\t\ttNotFound: 'Content not found'\n\t},\n\tproto: {\n\n\t\tinitInline: function() {\n\t\t\tmfp.types.push(INLINE_NS);\n\n\t\t\t_mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() {\n\t\t\t\t_putInlineElementsBack();\n\t\t\t});\n\t\t},\n\n\t\tgetInline: function(item, template) {\n\n\t\t\t_putInlineElementsBack();\n\n\t\t\tif(item.src) {\n\t\t\t\tvar inlineSt = mfp.st.inline,\n\t\t\t\t\tel = $(item.src);\n\n\t\t\t\tif(el.length) {\n\n\t\t\t\t\t// If target element has parent - we replace it with placeholder and put it back after popup is closed\n\t\t\t\t\tvar parent = el[0].parentNode;\n\t\t\t\t\tif(parent && parent.tagName) {\n\t\t\t\t\t\tif(!_inlinePlaceholder) {\n\t\t\t\t\t\t\t_hiddenClass = inlineSt.hiddenClass;\n\t\t\t\t\t\t\t_inlinePlaceholder = _getEl(_hiddenClass);\n\t\t\t\t\t\t\t_hiddenClass = 'mfp-'+_hiddenClass;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// replace target inline element with placeholder\n\t\t\t\t\t\t_lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);\n\t\t\t\t\t}\n\n\t\t\t\t\tmfp.updateStatus('ready');\n\t\t\t\t} else {\n\t\t\t\t\tmfp.updateStatus('error', inlineSt.tNotFound);\n\t\t\t\t\tel = $('<div>');\n\t\t\t\t}\n\n\t\t\t\titem.inlineElement = el;\n\t\t\t\treturn el;\n\t\t\t}\n\n\t\t\tmfp.updateStatus('ready');\n\t\t\tmfp._parseMarkup(template, {}, item);\n\t\t\treturn template;\n\t\t}\n\t}\n});\n\n/*>>inline*/\n\n/*>>ajax*/\nvar AJAX_NS = 'ajax',\n\t_ajaxCur,\n\t_removeAjaxCursor = function() {\n\t\tif(_ajaxCur) {\n\t\t\t$(document.body).removeClass(_ajaxCur);\n\t\t}\n\t},\n\t_destroyAjaxRequest = function() {\n\t\t_removeAjaxCursor();\n\t\tif(mfp.req) {\n\t\t\tmfp.req.abort();\n\t\t}\n\t};\n\n$.magnificPopup.registerModule(AJAX_NS, {\n\n\toptions: {\n\t\tsettings: null,\n\t\tcursor: 'mfp-ajax-cur',\n\t\ttError: '<a href=\"%url%\">The content</a> could not be loaded.'\n\t},\n\n\tproto: {\n\t\tinitAjax: function() {\n\t\t\tmfp.types.push(AJAX_NS);\n\t\t\t_ajaxCur = mfp.st.ajax.cursor;\n\n\t\t\t_mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);\n\t\t\t_mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);\n\t\t},\n\t\tgetAjax: function(item) {\n\n\t\t\tif(_ajaxCur) {\n\t\t\t\t$(document.body).addClass(_ajaxCur);\n\t\t\t}\n\n\t\t\tmfp.updateStatus('loading');\n\n\t\t\tvar opts = $.extend({\n\t\t\t\turl: item.src,\n\t\t\t\tsuccess: function(data, textStatus, jqXHR) {\n\t\t\t\t\tvar temp = {\n\t\t\t\t\t\tdata:data,\n\t\t\t\t\t\txhr:jqXHR\n\t\t\t\t\t};\n\n\t\t\t\t\t_mfpTrigger('ParseAjax', temp);\n\n\t\t\t\t\tmfp.appendContent( $(temp.data), AJAX_NS );\n\n\t\t\t\t\titem.finished = true;\n\n\t\t\t\t\t_removeAjaxCursor();\n\n\t\t\t\t\tmfp._setFocus();\n\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tmfp.wrap.addClass(READY_CLASS);\n\t\t\t\t\t}, 16);\n\n\t\t\t\t\tmfp.updateStatus('ready');\n\n\t\t\t\t\t_mfpTrigger('AjaxContentAdded');\n\t\t\t\t},\n\t\t\t\terror: function() {\n\t\t\t\t\t_removeAjaxCursor();\n\t\t\t\t\titem.finished = item.loadError = true;\n\t\t\t\t\tmfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));\n\t\t\t\t}\n\t\t\t}, mfp.st.ajax.settings);\n\n\t\t\tmfp.req = $.ajax(opts);\n\n\t\t\treturn '';\n\t\t}\n\t}\n});\n\n/*>>ajax*/\n\n/*>>image*/\nvar _imgInterval,\n\t_getTitle = function(item) {\n\t\tif(item.data && item.data.title !== undefined)\n\t\t\treturn item.data.title;\n\n\t\tvar src = mfp.st.image.titleSrc;\n\n\t\tif(src) {\n\t\t\tif($.isFunction(src)) {\n\t\t\t\treturn src.call(mfp, item);\n\t\t\t} else if(item.el) {\n\t\t\t\treturn item.el.attr(src) || '';\n\t\t\t}\n\t\t}\n\t\treturn '';\n\t};\n\n$.magnificPopup.registerModule('image', {\n\n\toptions: {\n\t\tmarkup: '<div class=\"mfp-figure\">'+\n\t\t\t\t\t'<div class=\"mfp-close\"></div>'+\n\t\t\t\t\t'<figure>'+\n\t\t\t\t\t\t'<div class=\"mfp-img\"></div>'+\n\t\t\t\t\t\t'<figcaption>'+\n\t\t\t\t\t\t\t'<div class=\"mfp-bottom-bar\">'+\n\t\t\t\t\t\t\t\t'<div class=\"mfp-title\"></div>'+\n\t\t\t\t\t\t\t\t'<div class=\"mfp-counter\"></div>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t'</figcaption>'+\n\t\t\t\t\t'</figure>'+\n\t\t\t\t'</div>',\n\t\tcursor: 'mfp-zoom-out-cur',\n\t\ttitleSrc: 'title',\n\t\tverticalFit: true,\n\t\ttError: '<a href=\"%url%\">The image</a> could not be loaded.'\n\t},\n\n\tproto: {\n\t\tinitImage: function() {\n\t\t\tvar imgSt = mfp.st.image,\n\t\t\t\tns = '.image';\n\n\t\t\tmfp.types.push('image');\n\n\t\t\t_mfpOn(OPEN_EVENT+ns, function() {\n\t\t\t\tif(mfp.currItem.type === 'image' && imgSt.cursor) {\n\t\t\t\t\t$(document.body).addClass(imgSt.cursor);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_mfpOn(CLOSE_EVENT+ns, function() {\n\t\t\t\tif(imgSt.cursor) {\n\t\t\t\t\t$(document.body).removeClass(imgSt.cursor);\n\t\t\t\t}\n\t\t\t\t_window.off('resize' + EVENT_NS);\n\t\t\t});\n\n\t\t\t_mfpOn('Resize'+ns, mfp.resizeImage);\n\t\t\tif(mfp.isLowIE) {\n\t\t\t\t_mfpOn('AfterChange', mfp.resizeImage);\n\t\t\t}\n\t\t},\n\t\tresizeImage: function() {\n\t\t\tvar item = mfp.currItem;\n\t\t\tif(!item || !item.img) return;\n\n\t\t\tif(mfp.st.image.verticalFit) {\n\t\t\t\tvar decr = 0;\n\t\t\t\t// fix box-sizing in ie7/8\n\t\t\t\tif(mfp.isLowIE) {\n\t\t\t\t\tdecr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);\n\t\t\t\t}\n\t\t\t\titem.img.css('max-height', mfp.wH-decr);\n\t\t\t}\n\t\t},\n\t\t_onImageHasSize: function(item) {\n\t\t\tif(item.img) {\n\n\t\t\t\titem.hasSize = true;\n\n\t\t\t\tif(_imgInterval) {\n\t\t\t\t\tclearInterval(_imgInterval);\n\t\t\t\t}\n\n\t\t\t\titem.isCheckingImgSize = false;\n\n\t\t\t\t_mfpTrigger('ImageHasSize', item);\n\n\t\t\t\tif(item.imgHidden) {\n\t\t\t\t\tif(mfp.content)\n\t\t\t\t\t\tmfp.content.removeClass('mfp-loading');\n\n\t\t\t\t\titem.imgHidden = false;\n\t\t\t\t}\n\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Function that loops until the image has size to display elements that rely on it asap\n\t\t */\n\t\tfindImageSize: function(item) {\n\n\t\t\tvar counter = 0,\n\t\t\t\timg = item.img[0],\n\t\t\t\tmfpSetInterval = function(delay) {\n\n\t\t\t\t\tif(_imgInterval) {\n\t\t\t\t\t\tclearInterval(_imgInterval);\n\t\t\t\t\t}\n\t\t\t\t\t// decelerating interval that checks for size of an image\n\t\t\t\t\t_imgInterval = setInterval(function() {\n\t\t\t\t\t\tif(img.naturalWidth > 0) {\n\t\t\t\t\t\t\tmfp._onImageHasSize(item);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(counter > 200) {\n\t\t\t\t\t\t\tclearInterval(_imgInterval);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\tif(counter === 3) {\n\t\t\t\t\t\t\tmfpSetInterval(10);\n\t\t\t\t\t\t} else if(counter === 40) {\n\t\t\t\t\t\t\tmfpSetInterval(50);\n\t\t\t\t\t\t} else if(counter === 100) {\n\t\t\t\t\t\t\tmfpSetInterval(500);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, delay);\n\t\t\t\t};\n\n\t\t\tmfpSetInterval(1);\n\t\t},\n\n\t\tgetImage: function(item, template) {\n\n\t\t\tvar guard = 0,\n\n\t\t\t\t// image load complete handler\n\t\t\t\tonLoadComplete = function() {\n\t\t\t\t\tif(item) {\n\t\t\t\t\t\tif (item.img[0].complete) {\n\t\t\t\t\t\t\titem.img.off('.mfploader');\n\n\t\t\t\t\t\t\tif(item === mfp.currItem){\n\t\t\t\t\t\t\t\tmfp._onImageHasSize(item);\n\n\t\t\t\t\t\t\t\tmfp.updateStatus('ready');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\titem.hasSize = true;\n\t\t\t\t\t\t\titem.loaded = true;\n\n\t\t\t\t\t\t\t_mfpTrigger('ImageLoadComplete');\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// if image complete check fails 200 times (20 sec), we assume that there was an error.\n\t\t\t\t\t\t\tguard++;\n\t\t\t\t\t\t\tif(guard < 200) {\n\t\t\t\t\t\t\t\tsetTimeout(onLoadComplete,100);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tonLoadError();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t// image error handler\n\t\t\t\tonLoadError = function() {\n\t\t\t\t\tif(item) {\n\t\t\t\t\t\titem.img.off('.mfploader');\n\t\t\t\t\t\tif(item === mfp.currItem){\n\t\t\t\t\t\t\tmfp._onImageHasSize(item);\n\t\t\t\t\t\t\tmfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\titem.hasSize = true;\n\t\t\t\t\t\titem.loaded = true;\n\t\t\t\t\t\titem.loadError = true;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\timgSt = mfp.st.image;\n\n\n\t\t\tvar el = template.find('.mfp-img');\n\t\t\tif(el.length) {\n\t\t\t\tvar img = document.createElement('img');\n\t\t\t\timg.className = 'mfp-img';\n\t\t\t\tif(item.el && item.el.find('img').length) {\n\t\t\t\t\timg.alt = item.el.find('img').attr('alt');\n\t\t\t\t}\n\t\t\t\titem.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);\n\t\t\t\timg.src = item.src;\n\n\t\t\t\t// without clone() \"error\" event is not firing when IMG is replaced by new IMG\n\t\t\t\t// TODO: find a way to avoid such cloning\n\t\t\t\tif(el.is('img')) {\n\t\t\t\t\titem.img = item.img.clone();\n\t\t\t\t}\n\n\t\t\t\timg = item.img[0];\n\t\t\t\tif(img.naturalWidth > 0) {\n\t\t\t\t\titem.hasSize = true;\n\t\t\t\t} else if(!img.width) {\n\t\t\t\t\titem.hasSize = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmfp._parseMarkup(template, {\n\t\t\t\ttitle: _getTitle(item),\n\t\t\t\timg_replaceWith: item.img\n\t\t\t}, item);\n\n\t\t\tmfp.resizeImage();\n\n\t\t\tif(item.hasSize) {\n\t\t\t\tif(_imgInterval) clearInterval(_imgInterval);\n\n\t\t\t\tif(item.loadError) {\n\t\t\t\t\ttemplate.addClass('mfp-loading');\n\t\t\t\t\tmfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );\n\t\t\t\t} else {\n\t\t\t\t\ttemplate.removeClass('mfp-loading');\n\t\t\t\t\tmfp.updateStatus('ready');\n\t\t\t\t}\n\t\t\t\treturn template;\n\t\t\t}\n\n\t\t\tmfp.updateStatus('loading');\n\t\t\titem.loading = true;\n\n\t\t\tif(!item.hasSize) {\n\t\t\t\titem.imgHidden = true;\n\t\t\t\ttemplate.addClass('mfp-loading');\n\t\t\t\tmfp.findImageSize(item);\n\t\t\t}\n\n\t\t\treturn template;\n\t\t}\n\t}\n});\n\n/*>>image*/\n\n/*>>zoom*/\nvar hasMozTransform,\n\tgetHasMozTransform = function() {\n\t\tif(hasMozTransform === undefined) {\n\t\t\thasMozTransform = document.createElement('p').style.MozTransform !== undefined;\n\t\t}\n\t\treturn hasMozTransform;\n\t};\n\n$.magnificPopup.registerModule('zoom', {\n\n\toptions: {\n\t\tenabled: false,\n\t\teasing: 'ease-in-out',\n\t\tduration: 300,\n\t\topener: function(element) {\n\t\t\treturn element.is('img') ? element : element.find('img');\n\t\t}\n\t},\n\n\tproto: {\n\n\t\tinitZoom: function() {\n\t\t\tvar zoomSt = mfp.st.zoom,\n\t\t\t\tns = '.zoom',\n\t\t\t\timage;\n\n\t\t\tif(!zoomSt.enabled || !mfp.supportsTransition) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar duration = zoomSt.duration,\n\t\t\t\tgetElToAnimate = function(image) {\n\t\t\t\t\tvar newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),\n\t\t\t\t\t\ttransition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,\n\t\t\t\t\t\tcssObj = {\n\t\t\t\t\t\t\tposition: 'fixed',\n\t\t\t\t\t\t\tzIndex: 9999,\n\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t'-webkit-backface-visibility': 'hidden'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tt = 'transition';\n\n\t\t\t\t\tcssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;\n\n\t\t\t\t\tnewImg.css(cssObj);\n\t\t\t\t\treturn newImg;\n\t\t\t\t},\n\t\t\t\tshowMainContent = function() {\n\t\t\t\t\tmfp.content.css('visibility', 'visible');\n\t\t\t\t},\n\t\t\t\topenTimeout,\n\t\t\t\tanimatedImg;\n\n\t\t\t_mfpOn('BuildControls'+ns, function() {\n\t\t\t\tif(mfp._allowZoom()) {\n\n\t\t\t\t\tclearTimeout(openTimeout);\n\t\t\t\t\tmfp.content.css('visibility', 'hidden');\n\n\t\t\t\t\t// Basically, all code below does is clones existing image, puts in on top of the current one and animated it\n\n\t\t\t\t\timage = mfp._getItemToZoom();\n\n\t\t\t\t\tif(!image) {\n\t\t\t\t\t\tshowMainContent();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tanimatedImg = getElToAnimate(image);\n\n\t\t\t\t\tanimatedImg.css( mfp._getOffset() );\n\n\t\t\t\t\tmfp.wrap.append(animatedImg);\n\n\t\t\t\t\topenTimeout = setTimeout(function() {\n\t\t\t\t\t\tanimatedImg.css( mfp._getOffset( true ) );\n\t\t\t\t\t\topenTimeout = setTimeout(function() {\n\n\t\t\t\t\t\t\tshowMainContent();\n\n\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\tanimatedImg.remove();\n\t\t\t\t\t\t\t\timage = animatedImg = null;\n\t\t\t\t\t\t\t\t_mfpTrigger('ZoomAnimationEnded');\n\t\t\t\t\t\t\t}, 16); // avoid blink when switching images\n\n\t\t\t\t\t\t}, duration); // this timeout equals animation duration\n\n\t\t\t\t\t}, 16); // by adding this timeout we avoid short glitch at the beginning of animation\n\n\n\t\t\t\t\t// Lots of timeouts...\n\t\t\t\t}\n\t\t\t});\n\t\t\t_mfpOn(BEFORE_CLOSE_EVENT+ns, function() {\n\t\t\t\tif(mfp._allowZoom()) {\n\n\t\t\t\t\tclearTimeout(openTimeout);\n\n\t\t\t\t\tmfp.st.removalDelay = duration;\n\n\t\t\t\t\tif(!image) {\n\t\t\t\t\t\timage = mfp._getItemToZoom();\n\t\t\t\t\t\tif(!image) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimatedImg = getElToAnimate(image);\n\t\t\t\t\t}\n\n\t\t\t\t\tanimatedImg.css( mfp._getOffset(true) );\n\t\t\t\t\tmfp.wrap.append(animatedImg);\n\t\t\t\t\tmfp.content.css('visibility', 'hidden');\n\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tanimatedImg.css( mfp._getOffset() );\n\t\t\t\t\t}, 16);\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\t_mfpOn(CLOSE_EVENT+ns, function() {\n\t\t\t\tif(mfp._allowZoom()) {\n\t\t\t\t\tshowMainContent();\n\t\t\t\t\tif(animatedImg) {\n\t\t\t\t\t\tanimatedImg.remove();\n\t\t\t\t\t}\n\t\t\t\t\timage = null;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t_allowZoom: function() {\n\t\t\treturn mfp.currItem.type === 'image';\n\t\t},\n\n\t\t_getItemToZoom: function() {\n\t\t\tif(mfp.currItem.hasSize) {\n\t\t\t\treturn mfp.currItem.img;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Get element postion relative to viewport\n\t\t_getOffset: function(isLarge) {\n\t\t\tvar el;\n\t\t\tif(isLarge) {\n\t\t\t\tel = mfp.currItem.img;\n\t\t\t} else {\n\t\t\t\tel = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);\n\t\t\t}\n\n\t\t\tvar offset = el.offset();\n\t\t\tvar paddingTop = parseInt(el.css('padding-top'),10);\n\t\t\tvar paddingBottom = parseInt(el.css('padding-bottom'),10);\n\t\t\toffset.top -= ( $(window).scrollTop() - paddingTop );\n\n\n\t\t\t/*\n\n\t\t\tAnimating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.\n\n\t\t\t */\n\t\t\tvar obj = {\n\t\t\t\twidth: el.width(),\n\t\t\t\t// fix Zepto height+padding issue\n\t\t\t\theight: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop\n\t\t\t};\n\n\t\t\t// I hate to do this, but there is no another option\n\t\t\tif( getHasMozTransform() ) {\n\t\t\t\tobj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';\n\t\t\t} else {\n\t\t\t\tobj.left = offset.left;\n\t\t\t\tobj.top = offset.top;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}\n\n\t}\n});\n\n\n\n/*>>zoom*/\n\n/*>>iframe*/\n\nvar IFRAME_NS = 'iframe',\n\t_emptyPage = '//about:blank',\n\n\t_fixIframeBugs = function(isShowing) {\n\t\tif(mfp.currTemplate[IFRAME_NS]) {\n\t\t\tvar el = mfp.currTemplate[IFRAME_NS].find('iframe');\n\t\t\tif(el.length) {\n\t\t\t\t// reset src after the popup is closed to avoid \"video keeps playing after popup is closed\" bug\n\t\t\t\tif(!isShowing) {\n\t\t\t\t\tel[0].src = _emptyPage;\n\t\t\t\t}\n\n\t\t\t\t// IE8 black screen bug fix\n\t\t\t\tif(mfp.isIE8) {\n\t\t\t\t\tel.css('display', isShowing ? 'block' : 'none');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n$.magnificPopup.registerModule(IFRAME_NS, {\n\n\toptions: {\n\t\tmarkup: '<div class=\"mfp-iframe-scaler\">'+\n\t\t\t\t\t'<div class=\"mfp-close\"></div>'+\n\t\t\t\t\t'<iframe class=\"mfp-iframe\" src=\"//about:blank\" frameborder=\"0\" allowfullscreen></iframe>'+\n\t\t\t\t'</div>',\n\n\t\tsrcAction: 'iframe_src',\n\n\t\t// we don't care and support only one default type of URL by default\n\t\tpatterns: {\n\t\t\tyoutube: {\n\t\t\t\tindex: 'youtube.com',\n\t\t\t\tid: 'v=',\n\t\t\t\tsrc: '//www.youtube.com/embed/%id%?autoplay=1'\n\t\t\t},\n\t\t\tvimeo: {\n\t\t\t\tindex: 'vimeo.com/',\n\t\t\t\tid: '/',\n\t\t\t\tsrc: '//player.vimeo.com/video/%id%?autoplay=1'\n\t\t\t},\n\t\t\tgmaps: {\n\t\t\t\tindex: '//maps.google.',\n\t\t\t\tsrc: '%id%&output=embed'\n\t\t\t}\n\t\t}\n\t},\n\n\tproto: {\n\t\tinitIframe: function() {\n\t\t\tmfp.types.push(IFRAME_NS);\n\n\t\t\t_mfpOn('BeforeChange', function(e, prevType, newType) {\n\t\t\t\tif(prevType !== newType) {\n\t\t\t\t\tif(prevType === IFRAME_NS) {\n\t\t\t\t\t\t_fixIframeBugs(); // iframe if removed\n\t\t\t\t\t} else if(newType === IFRAME_NS) {\n\t\t\t\t\t\t_fixIframeBugs(true); // iframe is showing\n\t\t\t\t\t}\n\t\t\t\t}// else {\n\t\t\t\t\t// iframe source is switched, don't do anything\n\t\t\t\t//}\n\t\t\t});\n\n\t\t\t_mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {\n\t\t\t\t_fixIframeBugs();\n\t\t\t});\n\t\t},\n\n\t\tgetIframe: function(item, template) {\n\t\t\tvar embedSrc = item.src;\n\t\t\tvar iframeSt = mfp.st.iframe;\n\n\t\t\t$.each(iframeSt.patterns, function() {\n\t\t\t\tif(embedSrc.indexOf( this.index ) > -1) {\n\t\t\t\t\tif(this.id) {\n\t\t\t\t\t\tif(typeof this.id === 'string') {\n\t\t\t\t\t\t\tembedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tembedSrc = this.id.call( this, embedSrc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tembedSrc = this.src.replace('%id%', embedSrc );\n\t\t\t\t\treturn false; // break;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar dataObj = {};\n\t\t\tif(iframeSt.srcAction) {\n\t\t\t\tdataObj[iframeSt.srcAction] = embedSrc;\n\t\t\t}\n\t\t\tmfp._parseMarkup(template, dataObj, item);\n\n\t\t\tmfp.updateStatus('ready');\n\n\t\t\treturn template;\n\t\t}\n\t}\n});\n\n\n\n/*>>iframe*/\n\n/*>>gallery*/\n/**\n * Get looped index depending on number of slides\n */\nvar _getLoopedId = function(index) {\n\t\tvar numSlides = mfp.items.length;\n\t\tif(index > numSlides - 1) {\n\t\t\treturn index - numSlides;\n\t\t} else if(index < 0) {\n\t\t\treturn numSlides + index;\n\t\t}\n\t\treturn index;\n\t},\n\t_replaceCurrTotal = function(text, curr, total) {\n\t\treturn text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);\n\t};\n\n$.magnificPopup.registerModule('gallery', {\n\n\toptions: {\n\t\tenabled: false,\n\t\tarrowMarkup: '<button title=\"%title%\" type=\"button\" class=\"mfp-arrow mfp-arrow-%dir%\"></button>',\n\t\tpreload: [0,2],\n\t\tnavigateByImgClick: true,\n\t\tarrows: true,\n\n\t\ttPrev: 'Previous (Left arrow key)',\n\t\ttNext: 'Next (Right arrow key)',\n\t\ttCounter: '%curr% of %total%'\n\t},\n\n\tproto: {\n\t\tinitGallery: function() {\n\n\t\t\tvar gSt = mfp.st.gallery,\n\t\t\t\tns = '.mfp-gallery';\n\n\t\t\tmfp.direction = true; // true - next, false - prev\n\n\t\t\tif(!gSt || !gSt.enabled ) return false;\n\n\t\t\t_wrapClasses += ' mfp-gallery';\n\n\t\t\t_mfpOn(OPEN_EVENT+ns, function() {\n\n\t\t\t\tif(gSt.navigateByImgClick) {\n\t\t\t\t\tmfp.wrap.on('click'+ns, '.mfp-img', function() {\n\t\t\t\t\t\tif(mfp.items.length > 1) {\n\t\t\t\t\t\t\tmfp.next();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t_document.on('keydown'+ns, function(e) {\n\t\t\t\t\tif (e.keyCode === 37) {\n\t\t\t\t\t\tmfp.prev();\n\t\t\t\t\t} else if (e.keyCode === 39) {\n\t\t\t\t\t\tmfp.next();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t_mfpOn('UpdateStatus'+ns, function(e, data) {\n\t\t\t\tif(data.text) {\n\t\t\t\t\tdata.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {\n\t\t\t\tvar l = mfp.items.length;\n\t\t\t\tvalues.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';\n\t\t\t});\n\n\t\t\t_mfpOn('BuildControls' + ns, function() {\n\t\t\t\tif(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {\n\t\t\t\t\tvar markup = gSt.arrowMarkup,\n\t\t\t\t\t\tarrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS),\n\t\t\t\t\t\tarrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS);\n\n\t\t\t\t\tarrowLeft.click(function() {\n\t\t\t\t\t\tmfp.prev();\n\t\t\t\t\t});\n\t\t\t\t\tarrowRight.click(function() {\n\t\t\t\t\t\tmfp.next();\n\t\t\t\t\t});\n\n\t\t\t\t\tmfp.container.append(arrowLeft.add(arrowRight));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_mfpOn(CHANGE_EVENT+ns, function() {\n\t\t\t\tif(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);\n\n\t\t\t\tmfp._preloadTimeout = setTimeout(function() {\n\t\t\t\t\tmfp.preloadNearbyImages();\n\t\t\t\t\tmfp._preloadTimeout = null;\n\t\t\t\t}, 16);\n\t\t\t});\n\n\n\t\t\t_mfpOn(CLOSE_EVENT+ns, function() {\n\t\t\t\t_document.off(ns);\n\t\t\t\tmfp.wrap.off('click'+ns);\n\t\t\t\tmfp.arrowRight = mfp.arrowLeft = null;\n\t\t\t});\n\n\t\t},\n\t\tnext: function() {\n\t\t\tmfp.direction = true;\n\t\t\tmfp.index = _getLoopedId(mfp.index + 1);\n\t\t\tmfp.updateItemHTML();\n\t\t},\n\t\tprev: function() {\n\t\t\tmfp.direction = false;\n\t\t\tmfp.index = _getLoopedId(mfp.index - 1);\n\t\t\tmfp.updateItemHTML();\n\t\t},\n\t\tgoTo: function(newIndex) {\n\t\t\tmfp.direction = (newIndex >= mfp.index);\n\t\t\tmfp.index = newIndex;\n\t\t\tmfp.updateItemHTML();\n\t\t},\n\t\tpreloadNearbyImages: function() {\n\t\t\tvar p = mfp.st.gallery.preload,\n\t\t\t\tpreloadBefore = Math.min(p[0], mfp.items.length),\n\t\t\t\tpreloadAfter = Math.min(p[1], mfp.items.length),\n\t\t\t\ti;\n\n\t\t\tfor(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {\n\t\t\t\tmfp._preloadItem(mfp.index+i);\n\t\t\t}\n\t\t\tfor(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {\n\t\t\t\tmfp._preloadItem(mfp.index-i);\n\t\t\t}\n\t\t},\n\t\t_preloadItem: function(index) {\n\t\t\tindex = _getLoopedId(index);\n\n\t\t\tif(mfp.items[index].preloaded) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar item = mfp.items[index];\n\t\t\tif(!item.parsed) {\n\t\t\t\titem = mfp.parseEl( index );\n\t\t\t}\n\n\t\t\t_mfpTrigger('LazyLoad', item);\n\n\t\t\tif(item.type === 'image') {\n\t\t\t\titem.img = $('<img class=\"mfp-img\" />').on('load.mfploader', function() {\n\t\t\t\t\titem.hasSize = true;\n\t\t\t\t}).on('error.mfploader', function() {\n\t\t\t\t\titem.hasSize = true;\n\t\t\t\t\titem.loadError = true;\n\t\t\t\t\t_mfpTrigger('LazyLoadError', item);\n\t\t\t\t}).attr('src', item.src);\n\t\t\t}\n\n\n\t\t\titem.preloaded = true;\n\t\t}\n\t}\n});\n\n/*>>gallery*/\n\n/*>>retina*/\n\nvar RETINA_NS = 'retina';\n\n$.magnificPopup.registerModule(RETINA_NS, {\n\toptions: {\n\t\treplaceSrc: function(item) {\n\t\t\treturn item.src.replace(/\\.\\w+$/, function(m) { return '@2x' + m; });\n\t\t},\n\t\tratio: 1 // Function or number. Set to 1 to disable.\n\t},\n\tproto: {\n\t\tinitRetina: function() {\n\t\t\tif(window.devicePixelRatio > 1) {\n\n\t\t\t\tvar st = mfp.st.retina,\n\t\t\t\t\tratio = st.ratio;\n\n\t\t\t\tratio = !isNaN(ratio) ? ratio : ratio();\n\n\t\t\t\tif(ratio > 1) {\n\t\t\t\t\t_mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {\n\t\t\t\t\t\titem.img.css({\n\t\t\t\t\t\t\t'max-width': item.img[0].naturalWidth / ratio,\n\t\t\t\t\t\t\t'width': '100%'\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\t_mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {\n\t\t\t\t\t\titem.src = st.replaceSrc(item, ratio);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n});\n\n/*>>retina*/\n _checkInstance(); }));\n\n/***/ }),\n/* 8 */,\n/* 9 */,\n/* 10 */,\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */,\n/* 15 */,\n/* 16 */,\n/* 17 */,\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(19);\nmodule.exports = __webpack_require__(34);\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_chosen_js__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_chosen_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_chosen_js__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_accounting__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_accounting___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_accounting__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_flot__ = __webpack_require__(21);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_flot___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_flot__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_flot_orderbars_js_jquery_flot_orderBars__ = __webpack_require__(22);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_flot_orderbars_js_jquery_flot_orderBars___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_flot_orderbars_js_jquery_flot_orderBars__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_flot_jquery_flot_time__ = __webpack_require__(23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_flot_jquery_flot_time___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_flot_jquery_flot_time__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__plugins_give_ajaxify_fields__ = __webpack_require__(24);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__plugins_give_ajaxify_fields___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__plugins_give_ajaxify_fields__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__plugins_selector_cache__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__plugins_selector_cache___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__plugins_selector_cache__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__plugins_repeatable_fields__ = __webpack_require__(26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__plugins_repeatable_fields___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__plugins_repeatable_fields__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__plugins_give_hint_css__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__plugins_give_hint_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__plugins_give_hint_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__admin_forms__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__admin_forms___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__admin_forms__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__admin_settings__ = __webpack_require__(28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__admin_export__ = __webpack_require__(30);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__admin_export___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11__admin_export__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__admin_widgets__ = __webpack_require__(31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__admin_widgets___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12__admin_widgets__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__admin_scripts__ = __webpack_require__(32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__admin_importer__ = __webpack_require__(33);\n// Plugins\n\n\n\n\n\n\n// Give plugins.\n\n\n\n\n\n// Give core.\n\n\n\n\n\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports) {\n\n(function() {\n var $, AbstractChosen, Chosen, SelectParser,\n bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n SelectParser = (function() {\n function SelectParser() {\n this.options_index = 0;\n this.parsed = [];\n }\n\n SelectParser.prototype.add_node = function(child) {\n if (child.nodeName.toUpperCase() === \"OPTGROUP\") {\n return this.add_group(child);\n } else {\n return this.add_option(child);\n }\n };\n\n SelectParser.prototype.add_group = function(group) {\n var group_position, i, len, option, ref, results1;\n group_position = this.parsed.length;\n this.parsed.push({\n array_index: group_position,\n group: true,\n label: group.label,\n title: group.title ? group.title : void 0,\n children: 0,\n disabled: group.disabled,\n classes: group.className\n });\n ref = group.childNodes;\n results1 = [];\n for (i = 0, len = ref.length; i < len; i++) {\n option = ref[i];\n results1.push(this.add_option(option, group_position, group.disabled));\n }\n return results1;\n };\n\n SelectParser.prototype.add_option = function(option, group_position, group_disabled) {\n if (option.nodeName.toUpperCase() === \"OPTION\") {\n if (option.text !== \"\") {\n if (group_position != null) {\n this.parsed[group_position].children += 1;\n }\n this.parsed.push({\n array_index: this.parsed.length,\n options_index: this.options_index,\n value: option.value,\n text: option.text,\n html: option.innerHTML,\n title: option.title ? option.title : void 0,\n selected: option.selected,\n disabled: group_disabled === true ? group_disabled : option.disabled,\n group_array_index: group_position,\n group_label: group_position != null ? this.parsed[group_position].label : null,\n classes: option.className,\n style: option.style.cssText\n });\n } else {\n this.parsed.push({\n array_index: this.parsed.length,\n options_index: this.options_index,\n empty: true\n });\n }\n return this.options_index += 1;\n }\n };\n\n return SelectParser;\n\n })();\n\n SelectParser.select_to_array = function(select) {\n var child, i, len, parser, ref;\n parser = new SelectParser();\n ref = select.childNodes;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n parser.add_node(child);\n }\n return parser.parsed;\n };\n\n AbstractChosen = (function() {\n function AbstractChosen(form_field, options1) {\n this.form_field = form_field;\n this.options = options1 != null ? options1 : {};\n this.label_click_handler = bind(this.label_click_handler, this);\n if (!AbstractChosen.browser_is_supported()) {\n return;\n }\n this.is_multiple = this.form_field.multiple;\n this.set_default_text();\n this.set_default_values();\n this.setup();\n this.set_up_html();\n this.register_observers();\n this.on_ready();\n }\n\n AbstractChosen.prototype.set_default_values = function() {\n this.click_test_action = (function(_this) {\n return function(evt) {\n return _this.test_active_click(evt);\n };\n })(this);\n this.activate_action = (function(_this) {\n return function(evt) {\n return _this.activate_field(evt);\n };\n })(this);\n this.active_field = false;\n this.mouse_on_container = false;\n this.results_showing = false;\n this.result_highlighted = null;\n this.is_rtl = this.options.rtl || /\\bchosen-rtl\\b/.test(this.form_field.className);\n this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === \"\" ? this.options.allow_single_deselect : false;\n this.disable_search_threshold = this.options.disable_search_threshold || 0;\n this.disable_search = this.options.disable_search || false;\n this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;\n this.group_search = this.options.group_search != null ? this.options.group_search : true;\n this.search_contains = this.options.search_contains || false;\n this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;\n this.max_selected_options = this.options.max_selected_options || Infinity;\n this.inherit_select_classes = this.options.inherit_select_classes || false;\n this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;\n this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;\n this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;\n this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;\n this.case_sensitive_search = this.options.case_sensitive_search || false;\n return this.hide_results_on_select = this.options.hide_results_on_select != null ? this.options.hide_results_on_select : true;\n };\n\n AbstractChosen.prototype.set_default_text = function() {\n if (this.form_field.getAttribute(\"data-placeholder\")) {\n this.default_text = this.form_field.getAttribute(\"data-placeholder\");\n } else if (this.is_multiple) {\n this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;\n } else {\n this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;\n }\n this.default_text = this.escape_html(this.default_text);\n return this.results_none_found = this.form_field.getAttribute(\"data-no_results_text\") || this.options.no_results_text || AbstractChosen.default_no_result_text;\n };\n\n AbstractChosen.prototype.choice_label = function(item) {\n if (this.include_group_label_in_selected && (item.group_label != null)) {\n return \"<b class='group-name'>\" + item.group_label + \"</b>\" + item.html;\n } else {\n return item.html;\n }\n };\n\n AbstractChosen.prototype.mouse_enter = function() {\n return this.mouse_on_container = true;\n };\n\n AbstractChosen.prototype.mouse_leave = function() {\n return this.mouse_on_container = false;\n };\n\n AbstractChosen.prototype.input_focus = function(evt) {\n if (this.is_multiple) {\n if (!this.active_field) {\n return setTimeout(((function(_this) {\n return function() {\n return _this.container_mousedown();\n };\n })(this)), 50);\n }\n } else {\n if (!this.active_field) {\n return this.activate_field();\n }\n }\n };\n\n AbstractChosen.prototype.input_blur = function(evt) {\n if (!this.mouse_on_container) {\n this.active_field = false;\n return setTimeout(((function(_this) {\n return function() {\n return _this.blur_test();\n };\n })(this)), 100);\n }\n };\n\n AbstractChosen.prototype.label_click_handler = function(evt) {\n if (this.is_multiple) {\n return this.container_mousedown(evt);\n } else {\n return this.activate_field();\n }\n };\n\n AbstractChosen.prototype.results_option_build = function(options) {\n var content, data, data_content, i, len, ref, shown_results;\n content = '';\n shown_results = 0;\n ref = this.results_data;\n for (i = 0, len = ref.length; i < len; i++) {\n data = ref[i];\n data_content = '';\n if (data.group) {\n data_content = this.result_add_group(data);\n } else {\n data_content = this.result_add_option(data);\n }\n if (data_content !== '') {\n shown_results++;\n content += data_content;\n }\n if (options != null ? options.first : void 0) {\n if (data.selected && this.is_multiple) {\n this.choice_build(data);\n } else if (data.selected && !this.is_multiple) {\n this.single_set_selected_text(this.choice_label(data));\n }\n }\n if (shown_results >= this.max_shown_results) {\n break;\n }\n }\n return content;\n };\n\n AbstractChosen.prototype.result_add_option = function(option) {\n var classes, option_el;\n if (!option.search_match) {\n return '';\n }\n if (!this.include_option_in_results(option)) {\n return '';\n }\n classes = [];\n if (!option.disabled && !(option.selected && this.is_multiple)) {\n classes.push(\"active-result\");\n }\n if (option.disabled && !(option.selected && this.is_multiple)) {\n classes.push(\"disabled-result\");\n }\n if (option.selected) {\n classes.push(\"result-selected\");\n }\n if (option.group_array_index != null) {\n classes.push(\"group-option\");\n }\n if (option.classes !== \"\") {\n classes.push(option.classes);\n }\n option_el = document.createElement(\"li\");\n option_el.className = classes.join(\" \");\n if (option.style) {\n option_el.style.cssText = option.style;\n }\n option_el.setAttribute(\"data-option-array-index\", option.array_index);\n option_el.innerHTML = option.highlighted_html || option.html;\n if (option.title) {\n option_el.title = option.title;\n }\n return this.outerHTML(option_el);\n };\n\n AbstractChosen.prototype.result_add_group = function(group) {\n var classes, group_el;\n if (!(group.search_match || group.group_match)) {\n return '';\n }\n if (!(group.active_options > 0)) {\n return '';\n }\n classes = [];\n classes.push(\"group-result\");\n if (group.classes) {\n classes.push(group.classes);\n }\n group_el = document.createElement(\"li\");\n group_el.className = classes.join(\" \");\n group_el.innerHTML = group.highlighted_html || this.escape_html(group.label);\n if (group.title) {\n group_el.title = group.title;\n }\n return this.outerHTML(group_el);\n };\n\n AbstractChosen.prototype.results_update_field = function() {\n this.set_default_text();\n if (!this.is_multiple) {\n this.results_reset_cleanup();\n }\n this.result_clear_highlight();\n this.results_build();\n if (this.results_showing) {\n return this.winnow_results();\n }\n };\n\n AbstractChosen.prototype.reset_single_select_options = function() {\n var i, len, ref, result, results1;\n ref = this.results_data;\n results1 = [];\n for (i = 0, len = ref.length; i < len; i++) {\n result = ref[i];\n if (result.selected) {\n results1.push(result.selected = false);\n } else {\n results1.push(void 0);\n }\n }\n return results1;\n };\n\n AbstractChosen.prototype.results_toggle = function() {\n if (this.results_showing) {\n return this.results_hide();\n } else {\n return this.results_show();\n }\n };\n\n AbstractChosen.prototype.results_search = function(evt) {\n if (this.results_showing) {\n return this.winnow_results();\n } else {\n return this.results_show();\n }\n };\n\n AbstractChosen.prototype.winnow_results = function(options) {\n var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;\n this.no_results_clear();\n results = 0;\n query = this.get_search_text();\n escapedQuery = query.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, \"\\\\$&\");\n regex = this.get_search_regex(escapedQuery);\n ref = this.results_data;\n for (i = 0, len = ref.length; i < len; i++) {\n option = ref[i];\n option.search_match = false;\n results_group = null;\n search_match = null;\n option.highlighted_html = '';\n if (this.include_option_in_results(option)) {\n if (option.group) {\n option.group_match = false;\n option.active_options = 0;\n }\n if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {\n results_group = this.results_data[option.group_array_index];\n if (results_group.active_options === 0 && results_group.search_match) {\n results += 1;\n }\n results_group.active_options += 1;\n }\n text = option.group ? option.label : option.text;\n if (!(option.group && !this.group_search)) {\n search_match = this.search_string_match(text, regex);\n option.search_match = search_match != null;\n if (option.search_match && !option.group) {\n results += 1;\n }\n if (option.search_match) {\n if (query.length) {\n startpos = search_match.index;\n prefix = text.slice(0, startpos);\n fix = text.slice(startpos, startpos + query.length);\n suffix = text.slice(startpos + query.length);\n option.highlighted_html = (this.escape_html(prefix)) + \"<em>\" + (this.escape_html(fix)) + \"</em>\" + (this.escape_html(suffix));\n }\n if (results_group != null) {\n results_group.group_match = true;\n }\n } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {\n option.search_match = true;\n }\n }\n }\n }\n this.result_clear_highlight();\n if (results < 1 && query.length) {\n this.update_results_content(\"\");\n return this.no_results(query);\n } else {\n this.update_results_content(this.results_option_build());\n if (!(options != null ? options.skip_highlight : void 0)) {\n return this.winnow_results_set_highlight();\n }\n }\n };\n\n AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {\n var regex_flag, regex_string;\n regex_string = this.search_contains ? escaped_search_string : \"(^|\\\\s|\\\\b)\" + escaped_search_string + \"[^\\\\s]*\";\n if (!(this.enable_split_word_search || this.search_contains)) {\n regex_string = \"^\" + regex_string;\n }\n regex_flag = this.case_sensitive_search ? \"\" : \"i\";\n return new RegExp(regex_string, regex_flag);\n };\n\n AbstractChosen.prototype.search_string_match = function(search_string, regex) {\n var match;\n match = regex.exec(search_string);\n if (!this.search_contains && (match != null ? match[1] : void 0)) {\n match.index += 1;\n }\n return match;\n };\n\n AbstractChosen.prototype.choices_count = function() {\n var i, len, option, ref;\n if (this.selected_option_count != null) {\n return this.selected_option_count;\n }\n this.selected_option_count = 0;\n ref = this.form_field.options;\n for (i = 0, len = ref.length; i < len; i++) {\n option = ref[i];\n if (option.selected) {\n this.selected_option_count += 1;\n }\n }\n return this.selected_option_count;\n };\n\n AbstractChosen.prototype.choices_click = function(evt) {\n evt.preventDefault();\n this.activate_field();\n if (!(this.results_showing || this.is_disabled)) {\n return this.results_show();\n }\n };\n\n AbstractChosen.prototype.keydown_checker = function(evt) {\n var ref, stroke;\n stroke = (ref = evt.which) != null ? ref : evt.keyCode;\n this.search_field_scale();\n if (stroke !== 8 && this.pending_backstroke) {\n this.clear_backstroke();\n }\n switch (stroke) {\n case 8:\n this.backstroke_length = this.get_search_field_value().length;\n break;\n case 9:\n if (this.results_showing && !this.is_multiple) {\n this.result_select(evt);\n }\n this.mouse_on_container = false;\n break;\n case 13:\n if (this.results_showing) {\n evt.preventDefault();\n }\n break;\n case 27:\n if (this.results_showing) {\n evt.preventDefault();\n }\n break;\n case 32:\n if (this.disable_search) {\n evt.preventDefault();\n }\n break;\n case 38:\n evt.preventDefault();\n this.keyup_arrow();\n break;\n case 40:\n evt.preventDefault();\n this.keydown_arrow();\n break;\n }\n };\n\n AbstractChosen.prototype.keyup_checker = function(evt) {\n var ref, stroke;\n stroke = (ref = evt.which) != null ? ref : evt.keyCode;\n this.search_field_scale();\n switch (stroke) {\n case 8:\n if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {\n this.keydown_backstroke();\n } else if (!this.pending_backstroke) {\n this.result_clear_highlight();\n this.results_search();\n }\n break;\n case 13:\n evt.preventDefault();\n if (this.results_showing) {\n this.result_select(evt);\n }\n break;\n case 27:\n if (this.results_showing) {\n this.results_hide();\n }\n break;\n case 9:\n case 16:\n case 17:\n case 18:\n case 38:\n case 40:\n case 91:\n break;\n default:\n this.results_search();\n break;\n }\n };\n\n AbstractChosen.prototype.clipboard_event_checker = function(evt) {\n if (this.is_disabled) {\n return;\n }\n return setTimeout(((function(_this) {\n return function() {\n return _this.results_search();\n };\n })(this)), 50);\n };\n\n AbstractChosen.prototype.container_width = function() {\n if (this.options.width != null) {\n return this.options.width;\n } else {\n return this.form_field.offsetWidth + \"px\";\n }\n };\n\n AbstractChosen.prototype.include_option_in_results = function(option) {\n if (this.is_multiple && (!this.display_selected_options && option.selected)) {\n return false;\n }\n if (!this.display_disabled_options && option.disabled) {\n return false;\n }\n if (option.empty) {\n return false;\n }\n return true;\n };\n\n AbstractChosen.prototype.search_results_touchstart = function(evt) {\n this.touch_started = true;\n return this.search_results_mouseover(evt);\n };\n\n AbstractChosen.prototype.search_results_touchmove = function(evt) {\n this.touch_started = false;\n return this.search_results_mouseout(evt);\n };\n\n AbstractChosen.prototype.search_results_touchend = function(evt) {\n if (this.touch_started) {\n return this.search_results_mouseup(evt);\n }\n };\n\n AbstractChosen.prototype.outerHTML = function(element) {\n var tmp;\n if (element.outerHTML) {\n return element.outerHTML;\n }\n tmp = document.createElement(\"div\");\n tmp.appendChild(element);\n return tmp.innerHTML;\n };\n\n AbstractChosen.prototype.get_single_html = function() {\n return \"<a class=\\\"chosen-single chosen-default\\\">\\n <input class=\\\"chosen-focus-input\\\" type=\\\"text\\\" autocomplete=\\\"off\\\" />\\n <span>\" + this.default_text + \"</span>\\n <div><b></b></div>\\n</a>\\n<div class=\\\"chosen-drop\\\">\\n <div class=\\\"chosen-search\\\">\\n <input class=\\\"chosen-search-input\\\" type=\\\"text\\\" autocomplete=\\\"off\\\" />\\n </div>\\n <ul class=\\\"chosen-results\\\"></ul>\\n</div>\";\n };\n\n AbstractChosen.prototype.get_multi_html = function() {\n return \"<ul class=\\\"chosen-choices\\\">\\n <li class=\\\"search-field\\\">\\n <input class=\\\"chosen-search-input\\\" type=\\\"text\\\" autocomplete=\\\"off\\\" value=\\\"\" + this.default_text + \"\\\" />\\n </li>\\n</ul>\\n<div class=\\\"chosen-drop\\\">\\n <ul class=\\\"chosen-results\\\"></ul>\\n</div>\";\n };\n\n AbstractChosen.prototype.get_no_results_html = function(terms) {\n return \"<li class=\\\"no-results\\\">\\n \" + this.results_none_found + \" <span>\" + (this.escape_html(terms)) + \"</span>\\n</li>\";\n };\n\n AbstractChosen.browser_is_supported = function() {\n if (\"Microsoft Internet Explorer\" === window.navigator.appName) {\n return document.documentMode >= 8;\n }\n if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {\n return false;\n }\n return true;\n };\n\n AbstractChosen.default_multiple_text = \"Select Some Options\";\n\n AbstractChosen.default_single_text = \"Select an Option\";\n\n AbstractChosen.default_no_result_text = \"No results match\";\n\n return AbstractChosen;\n\n })();\n\n $ = jQuery;\n\n $.fn.extend({\n chosen: function(options) {\n if (!AbstractChosen.browser_is_supported()) {\n return this;\n }\n return this.each(function(input_field) {\n var $this, chosen;\n $this = $(this);\n chosen = $this.data('chosen');\n if (options === 'destroy') {\n if (chosen instanceof Chosen) {\n chosen.destroy();\n }\n return;\n }\n if (!(chosen instanceof Chosen)) {\n $this.data('chosen', new Chosen(this, options));\n }\n });\n }\n });\n\n Chosen = (function(superClass) {\n extend(Chosen, superClass);\n\n function Chosen() {\n return Chosen.__super__.constructor.apply(this, arguments);\n }\n\n Chosen.prototype.setup = function() {\n this.form_field_jq = $(this.form_field);\n return this.current_selectedIndex = this.form_field.selectedIndex;\n };\n\n Chosen.prototype.set_up_html = function() {\n var container_classes, container_props;\n container_classes = [\"chosen-container\"];\n container_classes.push(\"chosen-container-\" + (this.is_multiple ? \"multi\" : \"single\"));\n if (this.inherit_select_classes && this.form_field.className) {\n container_classes.push(this.form_field.className);\n }\n if (this.is_rtl) {\n container_classes.push(\"chosen-rtl\");\n }\n container_props = {\n 'class': container_classes.join(' '),\n 'title': this.form_field.title\n };\n if (this.form_field.id.length) {\n container_props.id = this.form_field.id.replace(/[^\\w]/g, '_') + \"_chosen\";\n }\n this.container = $(\"<div />\", container_props);\n this.container.width(this.container_width());\n if (this.is_multiple) {\n this.container.html(this.get_multi_html());\n } else {\n this.container.html(this.get_single_html());\n }\n this.form_field_jq.hide().after(this.container);\n this.dropdown = this.container.find('div.chosen-drop').first();\n this.search_field = this.container.find('input.chosen-search-input');\n this.focus_field = this.container.find('input.chosen-focus-input');\n this.search_results = this.container.find('ul.chosen-results').first();\n this.search_field_scale();\n this.search_no_results = this.container.find('li.no-results').first();\n if (this.is_multiple) {\n this.search_choices = this.container.find('ul.chosen-choices').first();\n this.search_container = this.container.find('li.search-field').first();\n } else {\n this.search_container = this.container.find('div.chosen-search').first();\n this.selected_item = this.container.find('.chosen-single').first();\n }\n this.results_build();\n this.set_tab_index();\n return this.set_label_behavior();\n };\n\n Chosen.prototype.on_ready = function() {\n return this.form_field_jq.trigger(\"chosen:ready\", {\n chosen: this\n });\n };\n\n Chosen.prototype.register_observers = function() {\n var transfer_value;\n this.container.on('touchstart.chosen', (function(_this) {\n return function(evt) {\n _this.container_mousedown(evt);\n };\n })(this));\n this.container.on('touchend.chosen', (function(_this) {\n return function(evt) {\n _this.container_mouseup(evt);\n };\n })(this));\n this.container.on('mousedown.chosen', (function(_this) {\n return function(evt) {\n _this.container_mousedown(evt);\n };\n })(this));\n this.container.on('mouseup.chosen', (function(_this) {\n return function(evt) {\n _this.container_mouseup(evt);\n };\n })(this));\n this.container.on('mouseenter.chosen', (function(_this) {\n return function(evt) {\n _this.mouse_enter(evt);\n };\n })(this));\n this.container.on('mouseleave.chosen', (function(_this) {\n return function(evt) {\n _this.mouse_leave(evt);\n };\n })(this));\n this.search_results.on('mouseup.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_mouseup(evt);\n };\n })(this));\n this.search_results.on('mouseover.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_mouseover(evt);\n };\n })(this));\n this.search_results.on('mouseout.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_mouseout(evt);\n };\n })(this));\n this.search_results.on('mousewheel.chosen DOMMouseScroll.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_mousewheel(evt);\n };\n })(this));\n this.search_results.on('touchstart.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_touchstart(evt);\n };\n })(this));\n this.search_results.on('touchmove.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_touchmove(evt);\n };\n })(this));\n this.search_results.on('touchend.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_touchend(evt);\n };\n })(this));\n this.form_field_jq.on(\"chosen:updated.chosen\", (function(_this) {\n return function(evt) {\n _this.results_update_field(evt);\n };\n })(this));\n this.form_field_jq.on(\"chosen:activate.chosen\", (function(_this) {\n return function(evt) {\n _this.activate_field(evt);\n };\n })(this));\n this.form_field_jq.on(\"chosen:open.chosen\", (function(_this) {\n return function(evt) {\n _this.container_mousedown(evt);\n };\n })(this));\n this.form_field_jq.on(\"chosen:close.chosen\", (function(_this) {\n return function(evt) {\n _this.close_field(evt);\n };\n })(this));\n this.search_field.on('blur.chosen', (function(_this) {\n return function(evt) {\n _this.input_blur(evt);\n };\n })(this));\n this.search_field.on('keyup.chosen', (function(_this) {\n return function(evt) {\n _this.keyup_checker(evt);\n };\n })(this));\n this.search_field.on('keydown.chosen', (function(_this) {\n return function(evt) {\n _this.keydown_checker(evt);\n };\n })(this));\n this.search_field.on('focus.chosen', (function(_this) {\n return function(evt) {\n _this.input_focus(evt);\n };\n })(this));\n this.search_field.on('cut.chosen', (function(_this) {\n return function(evt) {\n _this.clipboard_event_checker(evt);\n };\n })(this));\n this.search_field.on('paste.chosen', (function(_this) {\n return function(evt) {\n _this.clipboard_event_checker(evt);\n };\n })(this));\n if (this.is_multiple) {\n return this.search_choices.on('click.chosen', (function(_this) {\n return function(evt) {\n _this.choices_click(evt);\n };\n })(this));\n } else {\n this.container.on('click.chosen', function(evt) {\n evt.preventDefault();\n });\n this.focus_field.on('blur.chosen', (function(_this) {\n return function(evt) {\n _this.input_blur(evt);\n };\n })(this));\n this.focus_field.on('focus.chosen', (function(_this) {\n return function(evt) {\n _this.input_focus(evt);\n };\n })(this));\n transfer_value = (function(_this) {\n return function() {\n _this.search_field.val(_this.focus_field.val());\n return _this.focus_field.val('');\n };\n })(this);\n this.focus_field.on('keyup.chosen', (function(_this) {\n return function(evt) {\n transfer_value();\n _this.keyup_checker(evt);\n };\n })(this));\n this.focus_field.on('keydown.chosen', (function(_this) {\n return function(evt) {\n transfer_value();\n _this.keydown_checker(evt);\n };\n })(this));\n this.focus_field.on('cut.chosen', (function(_this) {\n return function(evt) {\n setTimeout(transfer_value, 0);\n _this.clipboard_event_checker(evt);\n };\n })(this));\n return this.focus_field.on('paste.chosen', (function(_this) {\n return function(evt) {\n setTimeout(transfer_value, 0);\n _this.clipboard_event_checker(evt);\n };\n })(this));\n }\n };\n\n Chosen.prototype.destroy = function() {\n $(this.container[0].ownerDocument).off('click.chosen', this.click_test_action);\n if (this.form_field_label.length > 0) {\n this.form_field_label.off('click.chosen');\n }\n if (this.search_field[0].tabIndex) {\n this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;\n }\n this.container.remove();\n this.form_field_jq.removeData('chosen');\n return this.form_field_jq.show();\n };\n\n Chosen.prototype.search_field_disabled = function() {\n this.is_disabled = this.form_field.disabled || this.form_field_jq.parents('fieldset').is(':disabled');\n this.container.toggleClass('chosen-disabled', this.is_disabled);\n this.search_field[0].disabled = this.is_disabled;\n if (!this.is_multiple) {\n this.selected_item.off('focus.chosen', this.activate_field);\n }\n if (this.is_disabled) {\n return this.close_field();\n } else if (!this.is_multiple) {\n return this.selected_item.on('focus.chosen', this.activate_field);\n }\n };\n\n Chosen.prototype.container_mousedown = function(evt) {\n var ref;\n if (this.is_disabled) {\n return;\n }\n if (evt && ((ref = evt.type) === 'mousedown' || ref === 'touchstart') && !this.results_showing) {\n evt.preventDefault();\n }\n if (!((evt != null) && ($(evt.target)).hasClass(\"search-choice-close\"))) {\n if (!this.active_field) {\n if (this.is_multiple) {\n this.search_field.val(\"\");\n }\n $(this.container[0].ownerDocument).on('click.chosen', this.click_test_action);\n this.results_show();\n } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents(\"a.chosen-single\").length)) {\n evt.preventDefault();\n this.results_toggle();\n }\n return this.activate_field();\n }\n };\n\n Chosen.prototype.container_mouseup = function(evt) {\n if (evt.target.nodeName === \"ABBR\" && !this.is_disabled) {\n return this.results_reset(evt);\n }\n };\n\n Chosen.prototype.search_results_mousewheel = function(evt) {\n var delta;\n if (evt.originalEvent) {\n delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;\n }\n if (delta != null) {\n evt.preventDefault();\n if (evt.type === 'DOMMouseScroll') {\n delta = delta * 40;\n }\n return this.search_results.scrollTop(delta + this.search_results.scrollTop());\n }\n };\n\n Chosen.prototype.blur_test = function(evt) {\n if (!this.active_field && this.container.hasClass(\"chosen-container-active\")) {\n return this.close_field();\n }\n };\n\n Chosen.prototype.close_field = function() {\n $(this.container[0].ownerDocument).off(\"click.chosen\", this.click_test_action);\n this.active_field = false;\n this.results_hide();\n this.container.removeClass(\"chosen-container-active\");\n this.clear_backstroke();\n this.show_search_field_default();\n this.search_field_scale();\n return this.search_field.blur();\n };\n\n Chosen.prototype.activate_field = function() {\n if (this.is_disabled) {\n return;\n }\n this.container.addClass(\"chosen-container-active\");\n this.active_field = true;\n return this.search_field.focus();\n };\n\n Chosen.prototype.test_active_click = function(evt) {\n var active_container;\n active_container = $(evt.target).closest('.chosen-container');\n if (active_container.length && this.container[0] === active_container[0]) {\n return this.active_field = true;\n } else {\n return this.close_field();\n }\n };\n\n Chosen.prototype.results_build = function() {\n this.parsing = true;\n this.selected_option_count = null;\n this.results_data = SelectParser.select_to_array(this.form_field);\n if (this.is_multiple) {\n this.search_choices.find(\"li.search-choice\").remove();\n } else {\n this.single_set_selected_text();\n if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {\n this.search_field[0].readOnly = true;\n this.focus_field[0].readOnly = true;\n this.container.addClass(\"chosen-container-single-nosearch\");\n } else {\n this.search_field[0].readOnly = false;\n this.focus_field[0].readOnly = false;\n this.container.removeClass(\"chosen-container-single-nosearch\");\n }\n }\n this.update_results_content(this.results_option_build({\n first: true\n }));\n this.search_field_disabled();\n this.show_search_field_default();\n this.search_field_scale();\n return this.parsing = false;\n };\n\n Chosen.prototype.result_do_highlight = function(el) {\n var high_bottom, high_top, maxHeight, visible_bottom, visible_top;\n if (el.length) {\n this.result_clear_highlight();\n this.result_highlight = el;\n this.result_highlight.addClass(\"highlighted\");\n maxHeight = parseInt(this.search_results.css(\"maxHeight\"), 10);\n visible_top = this.search_results.scrollTop();\n visible_bottom = maxHeight + visible_top;\n high_top = this.result_highlight.position().top + this.search_results.scrollTop();\n high_bottom = high_top + this.result_highlight.outerHeight();\n if (high_bottom >= visible_bottom) {\n return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);\n } else if (high_top < visible_top) {\n return this.search_results.scrollTop(high_top);\n }\n }\n };\n\n Chosen.prototype.result_clear_highlight = function() {\n if (this.result_highlight) {\n this.result_highlight.removeClass(\"highlighted\");\n }\n return this.result_highlight = null;\n };\n\n Chosen.prototype.results_show = function() {\n if (this.is_multiple && this.max_selected_options <= this.choices_count()) {\n this.form_field_jq.trigger(\"chosen:maxselected\", {\n chosen: this\n });\n return false;\n }\n this.container.addClass(\"chosen-with-drop\");\n this.results_showing = true;\n this.search_field.focus();\n this.search_field.val(this.get_search_field_value());\n this.winnow_results();\n return this.form_field_jq.trigger(\"chosen:showing_dropdown\", {\n chosen: this\n });\n };\n\n Chosen.prototype.update_results_content = function(content) {\n return this.search_results.html(content);\n };\n\n Chosen.prototype.results_hide = function() {\n if (this.results_showing) {\n this.result_clear_highlight();\n setTimeout(((function(_this) {\n return function() {\n return _this.focus_field.focus();\n };\n })(this)), 0);\n this.container.removeClass(\"chosen-with-drop\");\n this.form_field_jq.trigger(\"chosen:hiding_dropdown\", {\n chosen: this\n });\n }\n return this.results_showing = false;\n };\n\n Chosen.prototype.set_tab_index = function(el) {\n var ref, ti;\n if (this.form_field.tabIndex) {\n ti = this.form_field.tabIndex;\n this.form_field.tabIndex = -1;\n this.search_field[0].tabIndex = ti;\n return (ref = this.focus_field[0]) != null ? ref.tabIndex = ti : void 0;\n }\n };\n\n Chosen.prototype.set_label_behavior = function() {\n this.form_field_label = this.form_field_jq.parents(\"label\");\n if (!this.form_field_label.length && this.form_field.id.length) {\n this.form_field_label = $(\"label[for='\" + this.form_field.id + \"']\");\n }\n if (this.form_field_label.length > 0) {\n return this.form_field_label.on('click.chosen', this.label_click_handler);\n }\n };\n\n Chosen.prototype.show_search_field_default = function() {\n if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {\n this.search_field.val(this.default_text);\n return this.search_field.addClass(\"default\");\n } else {\n this.search_field.val(\"\");\n return this.search_field.removeClass(\"default\");\n }\n };\n\n Chosen.prototype.search_results_mouseup = function(evt) {\n var target;\n target = $(evt.target).hasClass(\"active-result\") ? $(evt.target) : $(evt.target).parents(\".active-result\").first();\n if (target.length) {\n this.result_highlight = target;\n this.result_select(evt);\n return this.search_field.focus();\n }\n };\n\n Chosen.prototype.search_results_mouseover = function(evt) {\n var target;\n target = $(evt.target).hasClass(\"active-result\") ? $(evt.target) : $(evt.target).parents(\".active-result\").first();\n if (target) {\n return this.result_do_highlight(target);\n }\n };\n\n Chosen.prototype.search_results_mouseout = function(evt) {\n if ($(evt.target).hasClass(\"active-result\") || $(evt.target).parents('.active-result').first()) {\n return this.result_clear_highlight();\n }\n };\n\n Chosen.prototype.choice_build = function(item) {\n var choice, close_link;\n choice = $('<li />', {\n \"class\": \"search-choice\"\n }).html(\"<span>\" + (this.choice_label(item)) + \"</span>\");\n if (item.disabled) {\n choice.addClass('search-choice-disabled');\n } else {\n close_link = $('<a />', {\n \"class\": 'search-choice-close',\n 'data-option-array-index': item.array_index\n });\n close_link.on('click.chosen', (function(_this) {\n return function(evt) {\n return _this.choice_destroy_link_click(evt);\n };\n })(this));\n choice.append(close_link);\n }\n return this.search_container.before(choice);\n };\n\n Chosen.prototype.choice_destroy_link_click = function(evt) {\n evt.preventDefault();\n evt.stopPropagation();\n if (!this.is_disabled) {\n return this.choice_destroy($(evt.target));\n }\n };\n\n Chosen.prototype.choice_destroy = function(link) {\n if (this.result_deselect(link[0].getAttribute(\"data-option-array-index\"))) {\n if (this.active_field) {\n this.search_field.focus();\n } else {\n this.show_search_field_default();\n }\n if (this.is_multiple && this.choices_count() > 0 && this.get_search_field_value().length < 1) {\n this.results_hide();\n }\n link.parents('li').first().remove();\n return this.search_field_scale();\n }\n };\n\n Chosen.prototype.results_reset = function() {\n this.reset_single_select_options();\n this.form_field.options[0].selected = true;\n this.single_set_selected_text();\n this.show_search_field_default();\n this.results_reset_cleanup();\n this.trigger_form_field_change();\n if (this.active_field) {\n return this.results_hide();\n }\n };\n\n Chosen.prototype.results_reset_cleanup = function() {\n this.current_selectedIndex = this.form_field.selectedIndex;\n return this.selected_item.find(\"abbr\").remove();\n };\n\n Chosen.prototype.result_select = function(evt) {\n var high, item;\n if (this.result_highlight) {\n high = this.result_highlight;\n this.result_clear_highlight();\n if (this.is_multiple && this.max_selected_options <= this.choices_count()) {\n this.form_field_jq.trigger(\"chosen:maxselected\", {\n chosen: this\n });\n return false;\n }\n if (this.is_multiple) {\n high.removeClass(\"active-result\");\n } else {\n this.reset_single_select_options();\n }\n high.addClass(\"result-selected\");\n item = this.results_data[high[0].getAttribute(\"data-option-array-index\")];\n item.selected = true;\n this.form_field.options[item.options_index].selected = true;\n this.selected_option_count = null;\n if (this.is_multiple) {\n this.choice_build(item);\n } else {\n this.single_set_selected_text(this.choice_label(item));\n }\n if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {\n if (evt.metaKey || evt.ctrlKey) {\n this.winnow_results({\n skip_highlight: true\n });\n } else {\n this.search_field.val(\"\");\n this.winnow_results();\n }\n } else {\n this.results_hide();\n this.show_search_field_default();\n }\n if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {\n this.trigger_form_field_change({\n selected: this.form_field.options[item.options_index].value\n });\n }\n this.current_selectedIndex = this.form_field.selectedIndex;\n evt.preventDefault();\n return this.search_field_scale();\n }\n };\n\n Chosen.prototype.single_set_selected_text = function(text) {\n if (text == null) {\n text = this.default_text;\n }\n if (text === this.default_text) {\n this.selected_item.addClass(\"chosen-default\");\n } else {\n this.single_deselect_control_build();\n this.selected_item.removeClass(\"chosen-default\");\n }\n return this.selected_item.find(\"span\").html(text);\n };\n\n Chosen.prototype.result_deselect = function(pos) {\n var result_data;\n result_data = this.results_data[pos];\n if (!this.form_field.options[result_data.options_index].disabled) {\n result_data.selected = false;\n this.form_field.options[result_data.options_index].selected = false;\n this.selected_option_count = null;\n this.result_clear_highlight();\n if (this.results_showing) {\n this.winnow_results();\n }\n this.trigger_form_field_change({\n deselected: this.form_field.options[result_data.options_index].value\n });\n this.search_field_scale();\n return true;\n } else {\n return false;\n }\n };\n\n Chosen.prototype.single_deselect_control_build = function() {\n if (!this.allow_single_deselect) {\n return;\n }\n if (!this.selected_item.find(\"abbr\").length) {\n this.selected_item.find(\"span\").first().after(\"<abbr class=\\\"search-choice-close\\\"></abbr>\");\n }\n return this.selected_item.addClass(\"chosen-single-with-deselect\");\n };\n\n Chosen.prototype.get_search_field_value = function() {\n return this.search_field.val();\n };\n\n Chosen.prototype.get_search_text = function() {\n return $.trim(this.get_search_field_value());\n };\n\n Chosen.prototype.escape_html = function(text) {\n return $('<div/>').text(text).html();\n };\n\n Chosen.prototype.winnow_results_set_highlight = function() {\n var do_high, selected_results;\n selected_results = !this.is_multiple ? this.search_results.find(\".result-selected.active-result\") : [];\n do_high = selected_results.length ? selected_results.first() : this.search_results.find(\".active-result\").first();\n if (do_high != null) {\n return this.result_do_highlight(do_high);\n }\n };\n\n Chosen.prototype.no_results = function(terms) {\n var no_results_html;\n no_results_html = this.get_no_results_html(terms);\n this.search_results.append(no_results_html);\n return this.form_field_jq.trigger(\"chosen:no_results\", {\n chosen: this\n });\n };\n\n Chosen.prototype.no_results_clear = function() {\n return this.search_results.find(\".no-results\").remove();\n };\n\n Chosen.prototype.keydown_arrow = function() {\n var next_sib;\n if (this.results_showing && this.result_highlight) {\n next_sib = this.result_highlight.nextAll(\"li.active-result\").first();\n if (next_sib) {\n return this.result_do_highlight(next_sib);\n }\n } else {\n return this.results_show();\n }\n };\n\n Chosen.prototype.keyup_arrow = function() {\n var prev_sibs;\n if (!this.results_showing && !this.is_multiple) {\n return this.results_show();\n } else if (this.result_highlight) {\n prev_sibs = this.result_highlight.prevAll(\"li.active-result\");\n if (prev_sibs.length) {\n return this.result_do_highlight(prev_sibs.first());\n } else {\n if (this.choices_count() > 0) {\n this.results_hide();\n }\n return this.result_clear_highlight();\n }\n }\n };\n\n Chosen.prototype.keydown_backstroke = function() {\n var next_available_destroy;\n if (this.pending_backstroke) {\n this.choice_destroy(this.pending_backstroke.find(\"a\").first());\n return this.clear_backstroke();\n } else {\n next_available_destroy = this.search_container.siblings(\"li.search-choice\").last();\n if (next_available_destroy.length && !next_available_destroy.hasClass(\"search-choice-disabled\")) {\n this.pending_backstroke = next_available_destroy;\n if (this.single_backstroke_delete) {\n return this.keydown_backstroke();\n } else {\n return this.pending_backstroke.addClass(\"search-choice-focus\");\n }\n }\n }\n };\n\n Chosen.prototype.clear_backstroke = function() {\n if (this.pending_backstroke) {\n this.pending_backstroke.removeClass(\"search-choice-focus\");\n }\n return this.pending_backstroke = null;\n };\n\n Chosen.prototype.search_field_scale = function() {\n var div, i, len, style, style_block, styles, width;\n if (!this.is_multiple) {\n return;\n }\n style_block = {\n position: 'absolute',\n left: '-1000px',\n top: '-1000px',\n display: 'none',\n whiteSpace: 'pre'\n };\n styles = ['fontSize', 'fontStyle', 'fontWeight', 'fontFamily', 'lineHeight', 'textTransform', 'letterSpacing'];\n for (i = 0, len = styles.length; i < len; i++) {\n style = styles[i];\n style_block[style] = this.search_field.css(style);\n }\n div = $('<div />').css(style_block);\n div.text(this.get_search_field_value());\n $('body').append(div);\n width = div.width() + 25;\n div.remove();\n if (this.container.is(':visible')) {\n width = Math.min(this.container.outerWidth() - 10, width);\n }\n return this.search_field.width(width);\n };\n\n Chosen.prototype.trigger_form_field_change = function(extra) {\n this.form_field_jq.trigger(\"input\", extra);\n return this.form_field_jq.trigger(\"change\", extra);\n };\n\n return Chosen;\n\n })(AbstractChosen);\n\n}).call(this);\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports) {\n\n/* Javascript plotting library for jQuery, version 0.8 alpha.\n\nCopyright (c) 2007-2012 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\n*/\n\n// first an inline dependency, jquery.colorhelpers.js, we inline it here\n// for convenience\n\n/* Plugin for jQuery for working with colors.\n *\n * Version 1.1.\n *\n * Inspiration from jQuery color animation plugin by John Resig.\n *\n * Released under the MIT license by Ole Laursen, October 2009.\n *\n * Examples:\n *\n * $.color.parse(\"#fff\").scale('rgb', 0.25).add('a', -0.5).toString()\n * var c = $.color.extract($(\"#mydiv\"), 'background-color');\n * console.log(c.r, c.g, c.b, c.a);\n * $.color.make(100, 50, 25, 0.4).toString() // returns \"rgba(100,50,25,0.4)\"\n *\n * Note that .scale() and .add() return the same modified object\n * instead of making a new one.\n *\n * V. 1.1: Fix error handling so e.g. parsing an empty string does\n * produce a color rather than just crashing.\n */\n(function(B){B.color={};B.color.make=function(F,E,C,D){var G={};G.r=F||0;G.g=E||0;G.b=C||0;G.a=D!=null?D:1;G.add=function(J,I){for(var H=0;H<J.length;++H){G[J.charAt(H)]+=I}return G.normalize()};G.scale=function(J,I){for(var H=0;H<J.length;++H){G[J.charAt(H)]*=I}return G.normalize()};G.toString=function(){if(G.a>=1){return\"rgb(\"+[G.r,G.g,G.b].join(\",\")+\")\"}else{return\"rgba(\"+[G.r,G.g,G.b,G.a].join(\",\")+\")\"}};G.normalize=function(){function H(J,K,I){return K<J?J:(K>I?I:K)}G.r=H(0,parseInt(G.r),255);G.g=H(0,parseInt(G.g),255);G.b=H(0,parseInt(G.b),255);G.a=H(0,G.a,1);return G};G.clone=function(){return B.color.make(G.r,G.b,G.g,G.a)};return G.normalize()};B.color.extract=function(D,C){var E;do{E=D.css(C).toLowerCase();if(E!=\"\"&&E!=\"transparent\"){break}D=D.parent()}while(!B.nodeName(D.get(0),\"body\"));if(E==\"rgba(0, 0, 0, 0)\"){E=\"transparent\"}return B.color.parse(E)};B.color.parse=function(F){var E,C=B.color.make;if(E=/rgb\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.exec(F)){return C(parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10))}if(E=/rgba\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(F)){return C(parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10),parseFloat(E[4]))}if(E=/rgb\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.exec(F)){return C(parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55)}if(E=/rgba\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(F)){return C(parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55,parseFloat(E[4]))}if(E=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(F)){return C(parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16))}if(E=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(F)){return C(parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16))}var D=B.trim(F).toLowerCase();if(D==\"transparent\"){return C(255,255,255,0)}else{E=A[D]||[0,0,0];return C(E[0],E[1],E[2])}};var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);\n\n// the actual Flot code\n(function($) {\n function Plot(placeholder, data_, options_, plugins) {\n // data is on the form:\n // [ series1, series2 ... ]\n // where series is either just the data as [ [x1, y1], [x2, y2], ... ]\n // or { data: [ [x1, y1], [x2, y2], ... ], label: \"some label\", ... }\n\n var series = [],\n options = {\n // the color theme used for graphs\n colors: [\"#edc240\", \"#afd8f8\", \"#cb4b4b\", \"#4da74d\", \"#9440ed\"],\n legend: {\n show: true,\n noColumns: 1, // number of colums in legend table\n labelFormatter: null, // fn: string -> string\n labelBoxBorderColor: \"#ccc\", // border color for the little label boxes\n container: null, // container (as jQuery object) to put legend in, null means default on top of graph\n position: \"ne\", // position of default legend container within plot\n margin: 5, // distance from grid edge to default legend container within plot\n backgroundColor: null, // null means auto-detect\n backgroundOpacity: 0.85, // set to 0 to avoid background\n sorted: null // default to no legend sorting\n },\n xaxis: {\n show: null, // null = auto-detect, true = always, false = never\n position: \"bottom\", // or \"top\"\n mode: null, // null or \"time\"\n timezone: null, // \"browser\" for local to the client or timezone for timezone-js\n font: null, // null (derived from CSS in placeholder) or object like { size: 11, style: \"italic\", weight: \"bold\", family: \"sans-serif\", variant: \"small-caps\" }\n color: null, // base color, labels, ticks\n tickColor: null, // possibly different color of ticks, e.g. \"rgba(0,0,0,0.15)\"\n transform: null, // null or f: number -> number to transform axis\n inverseTransform: null, // if transform is set, this should be the inverse function\n min: null, // min. value to show, null means set automatically\n max: null, // max. value to show, null means set automatically\n autoscaleMargin: null, // margin in % to add if auto-setting min/max\n ticks: null, // either [1, 3] or [[1, \"a\"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks\n tickFormatter: null, // fn: number -> string\n labelWidth: null, // size of tick labels in pixels\n labelHeight: null,\n reserveSpace: null, // whether to reserve space even if axis isn't shown\n tickLength: null, // size in pixels of ticks, or \"full\" for whole line\n alignTicksWithAxis: null, // axis number or null for no sync\n\n // mode specific options\n tickDecimals: null, // no. of decimals, null means auto\n tickSize: null, // number or [number, \"unit\"]\n minTickSize: null, // number or [number, \"unit\"]\n monthNames: null, // list of names of months\n timeformat: null, // format string to use\n twelveHourClock: false // 12 or 24 time in time mode\n },\n yaxis: {\n autoscaleMargin: 0.02,\n position: \"left\" // or \"right\"\n },\n xaxes: [],\n yaxes: [],\n series: {\n points: {\n show: false,\n radius: 3,\n lineWidth: 2, // in pixels\n fill: true,\n fillColor: \"#ffffff\",\n symbol: \"circle\" // or callback\n },\n lines: {\n // we don't put in show: false so we can see\n // whether lines were actively disabled\n lineWidth: 2, // in pixels\n fill: false,\n fillColor: null,\n steps: false\n // Omit 'zero', so we can later default its value to\n // match that of the 'fill' option.\n },\n bars: {\n show: false,\n lineWidth: 2, // in pixels\n barWidth: 1, // in units of the x axis\n fill: true,\n fillColor: null,\n align: \"left\", // \"left\", \"right\", or \"center\"\n horizontal: false,\n zero: true\n },\n shadowSize: 3,\n highlightColor: null\n },\n grid: {\n show: true,\n aboveData: false,\n color: \"#545454\", // primary color used for outline and labels\n backgroundColor: null, // null for transparent, else color\n borderColor: null, // set if different from the grid color\n tickColor: null, // color for the ticks, e.g. \"rgba(0,0,0,0.15)\"\n margin: 0, // distance from the canvas edge to the grid\n labelMargin: 5, // in pixels\n axisMargin: 8, // in pixels\n borderWidth: 2, // in pixels\n minBorderMargin: null, // in pixels, null means taken from points radius\n markings: null, // array of ranges or fn: axes -> array of ranges\n markingsColor: \"#f4f4f4\",\n markingsLineWidth: 2,\n // interactive stuff\n clickable: false,\n hoverable: false,\n autoHighlight: true, // highlight in case mouse is near\n mouseActiveRadius: 10 // how far the mouse can be away to activate an item\n },\n interaction: {\n redrawOverlayInterval: 1000/60 // time between updates, -1 means in same flow\n },\n hooks: {}\n },\n canvas = null, // the canvas for the plot itself\n overlay = null, // canvas for interactive stuff on top of plot\n eventHolder = null, // jQuery object that events should be bound to\n ctx = null, octx = null,\n xaxes = [], yaxes = [],\n plotOffset = { left: 0, right: 0, top: 0, bottom: 0},\n canvasWidth = 0, canvasHeight = 0,\n plotWidth = 0, plotHeight = 0,\n hooks = {\n processOptions: [],\n processRawData: [],\n processDatapoints: [],\n processOffset: [],\n drawBackground: [],\n drawSeries: [],\n draw: [],\n bindEvents: [],\n drawOverlay: [],\n shutdown: []\n },\n plot = this;\n\n // public functions\n plot.setData = setData;\n plot.setupGrid = setupGrid;\n plot.draw = draw;\n plot.getPlaceholder = function() { return placeholder; };\n plot.getCanvas = function() { return canvas; };\n plot.getPlotOffset = function() { return plotOffset; };\n plot.width = function () { return plotWidth; };\n plot.height = function () { return plotHeight; };\n plot.offset = function () {\n var o = eventHolder.offset();\n o.left += plotOffset.left;\n o.top += plotOffset.top;\n return o;\n };\n plot.getData = function () { return series; };\n plot.getAxes = function () {\n var res = {}, i;\n $.each(xaxes.concat(yaxes), function (_, axis) {\n if (axis)\n res[axis.direction + (axis.n != 1 ? axis.n : \"\") + \"axis\"] = axis;\n });\n return res;\n };\n plot.getXAxes = function () { return xaxes; };\n plot.getYAxes = function () { return yaxes; };\n plot.c2p = canvasToAxisCoords;\n plot.p2c = axisToCanvasCoords;\n plot.getOptions = function () { return options; };\n plot.highlight = highlight;\n plot.unhighlight = unhighlight;\n plot.triggerRedrawOverlay = triggerRedrawOverlay;\n plot.pointOffset = function(point) {\n return {\n left: parseInt(xaxes[axisNumber(point, \"x\") - 1].p2c(+point.x) + plotOffset.left, 10),\n top: parseInt(yaxes[axisNumber(point, \"y\") - 1].p2c(+point.y) + plotOffset.top, 10)\n };\n };\n plot.shutdown = shutdown;\n plot.resize = function () {\n getCanvasDimensions();\n resizeCanvas(canvas);\n resizeCanvas(overlay);\n };\n\n // public attributes\n plot.hooks = hooks;\n\n // initialize\n initPlugins(plot);\n parseOptions(options_);\n setupCanvases();\n setData(data_);\n setupGrid();\n draw();\n bindEvents();\n\n\n function executeHooks(hook, args) {\n args = [plot].concat(args);\n for (var i = 0; i < hook.length; ++i)\n hook[i].apply(this, args);\n }\n\n function initPlugins() {\n for (var i = 0; i < plugins.length; ++i) {\n var p = plugins[i];\n p.init(plot);\n if (p.options)\n $.extend(true, options, p.options);\n }\n }\n\n function parseOptions(opts) {\n var i;\n\n $.extend(true, options, opts);\n\n if (options.xaxis.color == null)\n options.xaxis.color = options.grid.color;\n if (options.yaxis.color == null)\n options.yaxis.color = options.grid.color;\n\n if (options.xaxis.tickColor == null) // backwards-compatibility\n options.xaxis.tickColor = options.grid.tickColor;\n if (options.yaxis.tickColor == null) // backwards-compatibility\n options.yaxis.tickColor = options.grid.tickColor;\n\n if (options.grid.borderColor == null)\n options.grid.borderColor = options.grid.color;\n if (options.grid.tickColor == null)\n options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString();\n\n // fill in defaults in axes, copy at least always the\n // first as the rest of the code assumes it'll be there\n for (i = 0; i < Math.max(1, options.xaxes.length); ++i)\n options.xaxes[i] = $.extend(true, {}, options.xaxis, options.xaxes[i]);\n for (i = 0; i < Math.max(1, options.yaxes.length); ++i)\n options.yaxes[i] = $.extend(true, {}, options.yaxis, options.yaxes[i]);\n\n // backwards compatibility, to be removed in future\n if (options.xaxis.noTicks && options.xaxis.ticks == null)\n options.xaxis.ticks = options.xaxis.noTicks;\n if (options.yaxis.noTicks && options.yaxis.ticks == null)\n options.yaxis.ticks = options.yaxis.noTicks;\n if (options.x2axis) {\n options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis);\n options.xaxes[1].position = \"top\";\n }\n if (options.y2axis) {\n options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis);\n options.yaxes[1].position = \"right\";\n }\n if (options.grid.coloredAreas)\n options.grid.markings = options.grid.coloredAreas;\n if (options.grid.coloredAreasColor)\n options.grid.markingsColor = options.grid.coloredAreasColor;\n if (options.lines)\n $.extend(true, options.series.lines, options.lines);\n if (options.points)\n $.extend(true, options.series.points, options.points);\n if (options.bars)\n $.extend(true, options.series.bars, options.bars);\n if (options.shadowSize != null)\n options.series.shadowSize = options.shadowSize;\n if (options.highlightColor != null)\n options.series.highlightColor = options.highlightColor;\n\n // save options on axes for future reference\n for (i = 0; i < options.xaxes.length; ++i)\n getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i];\n for (i = 0; i < options.yaxes.length; ++i)\n getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i];\n\n // add hooks from options\n for (var n in hooks)\n if (options.hooks[n] && options.hooks[n].length)\n hooks[n] = hooks[n].concat(options.hooks[n]);\n\n executeHooks(hooks.processOptions, [options]);\n }\n\n function setData(d) {\n series = parseData(d);\n fillInSeriesOptions();\n processData();\n }\n\n function parseData(d) {\n var res = [];\n for (var i = 0; i < d.length; ++i) {\n var s = $.extend(true, {}, options.series);\n\n if (d[i].data != null) {\n s.data = d[i].data; // move the data instead of deep-copy\n delete d[i].data;\n\n $.extend(true, s, d[i]);\n\n d[i].data = s.data;\n }\n else\n s.data = d[i];\n res.push(s);\n }\n\n return res;\n }\n\n function axisNumber(obj, coord) {\n var a = obj[coord + \"axis\"];\n if (typeof a == \"object\") // if we got a real axis, extract number\n a = a.n;\n if (typeof a != \"number\")\n a = 1; // default to first axis\n return a;\n }\n\n function allAxes() {\n // return flat array without annoying null entries\n return $.grep(xaxes.concat(yaxes), function (a) { return a; });\n }\n\n function canvasToAxisCoords(pos) {\n // return an object with x/y corresponding to all used axes\n var res = {}, i, axis;\n for (i = 0; i < xaxes.length; ++i) {\n axis = xaxes[i];\n if (axis && axis.used)\n res[\"x\" + axis.n] = axis.c2p(pos.left);\n }\n\n for (i = 0; i < yaxes.length; ++i) {\n axis = yaxes[i];\n if (axis && axis.used)\n res[\"y\" + axis.n] = axis.c2p(pos.top);\n }\n\n if (res.x1 !== undefined)\n res.x = res.x1;\n if (res.y1 !== undefined)\n res.y = res.y1;\n\n return res;\n }\n\n function axisToCanvasCoords(pos) {\n // get canvas coords from the first pair of x/y found in pos\n var res = {}, i, axis, key;\n\n for (i = 0; i < xaxes.length; ++i) {\n axis = xaxes[i];\n if (axis && axis.used) {\n key = \"x\" + axis.n;\n if (pos[key] == null && axis.n == 1)\n key = \"x\";\n\n if (pos[key] != null) {\n res.left = axis.p2c(pos[key]);\n break;\n }\n }\n }\n\n for (i = 0; i < yaxes.length; ++i) {\n axis = yaxes[i];\n if (axis && axis.used) {\n key = \"y\" + axis.n;\n if (pos[key] == null && axis.n == 1)\n key = \"y\";\n\n if (pos[key] != null) {\n res.top = axis.p2c(pos[key]);\n break;\n }\n }\n }\n\n return res;\n }\n\n function getOrCreateAxis(axes, number) {\n if (!axes[number - 1])\n axes[number - 1] = {\n n: number, // save the number for future reference\n direction: axes == xaxes ? \"x\" : \"y\",\n options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis)\n };\n\n return axes[number - 1];\n }\n\n function fillInSeriesOptions() {\n\n var neededColors = series.length, maxIndex = -1, i;\n\n // Subtract the number of series that already have fixed colors or\n // color indexes from the number that we still need to generate.\n\n for (i = 0; i < series.length; ++i) {\n var sc = series[i].color;\n if (sc != null) {\n neededColors--;\n if (typeof sc == \"number\" && sc > maxIndex) {\n maxIndex = sc;\n }\n }\n }\n\n // If any of the series have fixed color indexes, then we need to\n // generate at least as many colors as the highest index.\n\n if (neededColors <= maxIndex) {\n neededColors = maxIndex + 1;\n }\n\n // Generate all the colors, using first the option colors and then\n // variations on those colors once they're exhausted.\n\n var c, colors = [], colorPool = options.colors,\n colorPoolSize = colorPool.length, variation = 0;\n\n for (i = 0; i < neededColors; i++) {\n\n c = $.color.parse(colorPool[i % colorPoolSize] || \"#666\");\n\n // Each time we exhaust the colors in the pool we adjust\n // a scaling factor used to produce more variations on\n // those colors. The factor alternates negative/positive\n // to produce lighter/darker colors.\n\n // Reset the variation after every few cycles, or else\n // it will end up producing only white or black colors.\n\n if (i % colorPoolSize == 0 && i) {\n if (variation >= 0) {\n if (variation < 0.5) {\n variation = -variation - 0.2;\n } else variation = 0;\n } else variation = -variation;\n }\n\n colors[i] = c.scale('rgb', 1 + variation);\n }\n\n // Finalize the series options, filling in their colors\n\n var colori = 0, s;\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n // assign colors\n if (s.color == null) {\n s.color = colors[colori].toString();\n ++colori;\n }\n else if (typeof s.color == \"number\")\n s.color = colors[s.color].toString();\n\n // turn on lines automatically in case nothing is set\n if (s.lines.show == null) {\n var v, show = true;\n for (v in s)\n if (s[v] && s[v].show) {\n show = false;\n break;\n }\n if (show)\n s.lines.show = true;\n }\n\n // If nothing was provided for lines.zero, default it to match\n // lines.fill, since areas by default should extend to zero.\n\n if (s.lines.zero == null) {\n s.lines.zero = !!s.lines.fill;\n }\n\n // setup axes\n s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, \"x\"));\n s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, \"y\"));\n }\n }\n\n function processData() {\n var topSentry = Number.POSITIVE_INFINITY,\n bottomSentry = Number.NEGATIVE_INFINITY,\n fakeInfinity = Number.MAX_VALUE,\n i, j, k, m, length,\n s, points, ps, x, y, axis, val, f, p,\n data, format;\n\n function updateAxis(axis, min, max) {\n if (min < axis.datamin && min != -fakeInfinity)\n axis.datamin = min;\n if (max > axis.datamax && max != fakeInfinity)\n axis.datamax = max;\n }\n\n $.each(allAxes(), function (_, axis) {\n // init axis\n axis.datamin = topSentry;\n axis.datamax = bottomSentry;\n axis.used = false;\n });\n\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n s.datapoints = { points: [] };\n\n executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]);\n }\n\n // first pass: clean and copy data\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n data = s.data;\n format = s.datapoints.format;\n\n if (!format) {\n format = [];\n // find out how to copy\n format.push({ x: true, number: true, required: true });\n format.push({ y: true, number: true, required: true });\n\n if (s.bars.show || (s.lines.show && s.lines.fill)) {\n var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));\n format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });\n if (s.bars.horizontal) {\n delete format[format.length - 1].y;\n format[format.length - 1].x = true;\n }\n }\n\n s.datapoints.format = format;\n }\n\n if (s.datapoints.pointsize != null)\n continue; // already filled in\n\n s.datapoints.pointsize = format.length;\n\n ps = s.datapoints.pointsize;\n points = s.datapoints.points;\n\n var insertSteps = s.lines.show && s.lines.steps;\n s.xaxis.used = s.yaxis.used = true;\n\n for (j = k = 0; j < data.length; ++j, k += ps) {\n p = data[j];\n\n var nullify = p == null;\n if (!nullify) {\n for (m = 0; m < ps; ++m) {\n val = p[m];\n f = format[m];\n\n if (f) {\n if (f.number && val != null) {\n val = +val; // convert to number\n if (isNaN(val))\n val = null;\n else if (val == Infinity)\n val = fakeInfinity;\n else if (val == -Infinity)\n val = -fakeInfinity;\n }\n\n if (val == null) {\n if (f.required)\n nullify = true;\n\n if (f.defaultValue != null)\n val = f.defaultValue;\n }\n }\n\n points[k + m] = val;\n }\n }\n\n if (nullify) {\n for (m = 0; m < ps; ++m) {\n val = points[k + m];\n if (val != null) {\n f = format[m];\n // extract min/max info\n if (f.x)\n updateAxis(s.xaxis, val, val);\n if (f.y)\n updateAxis(s.yaxis, val, val);\n }\n points[k + m] = null;\n }\n }\n else {\n // a little bit of line specific stuff that\n // perhaps shouldn't be here, but lacking\n // better means...\n if (insertSteps && k > 0\n && points[k - ps] != null\n && points[k - ps] != points[k]\n && points[k - ps + 1] != points[k + 1]) {\n // copy the point to make room for a middle point\n for (m = 0; m < ps; ++m)\n points[k + ps + m] = points[k + m];\n\n // middle point has same y\n points[k + 1] = points[k - ps + 1];\n\n // we've added a point, better reflect that\n k += ps;\n }\n }\n }\n }\n\n // give the hooks a chance to run\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n executeHooks(hooks.processDatapoints, [ s, s.datapoints]);\n }\n\n // second pass: find datamax/datamin for auto-scaling\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n points = s.datapoints.points,\n ps = s.datapoints.pointsize;\n format = s.datapoints.format;\n\n var xmin = topSentry, ymin = topSentry,\n xmax = bottomSentry, ymax = bottomSentry;\n\n for (j = 0; j < points.length; j += ps) {\n if (points[j] == null)\n continue;\n\n for (m = 0; m < ps; ++m) {\n val = points[j + m];\n f = format[m];\n if (!f || f.autoscale === false || val == fakeInfinity || val == -fakeInfinity)\n continue;\n\n if (f.x) {\n if (val < xmin)\n xmin = val;\n if (val > xmax)\n xmax = val;\n }\n if (f.y) {\n if (val < ymin)\n ymin = val;\n if (val > ymax)\n ymax = val;\n }\n }\n }\n\n if (s.bars.show) {\n // make sure we got room for the bar on the dancing floor\n var delta;\n\n switch (s.bars.align) {\n case \"left\":\n delta = 0;\n break;\n case \"right\":\n delta = -s.bars.barWidth;\n break;\n case \"center\":\n delta = -s.bars.barWidth / 2;\n break;\n default:\n throw new Error(\"Invalid bar alignment: \" + s.bars.align);\n }\n\n if (s.bars.horizontal) {\n ymin += delta;\n ymax += delta + s.bars.barWidth;\n }\n else {\n xmin += delta;\n xmax += delta + s.bars.barWidth;\n }\n }\n\n updateAxis(s.xaxis, xmin, xmax);\n updateAxis(s.yaxis, ymin, ymax);\n }\n\n $.each(allAxes(), function (_, axis) {\n if (axis.datamin == topSentry)\n axis.datamin = null;\n if (axis.datamax == bottomSentry)\n axis.datamax = null;\n });\n }\n\n //////////////////////////////////////////////////////////////////////////////////\n // Returns the display's ratio between physical and device-independent pixels.\n //\n // This is the ratio between the width that the browser advertises and the number\n // of pixels actually available in that space. The iPhone 4, for example, has a\n // device-independent width of 320px, but its screen is actually 640px wide. It\n // therefore has a pixel ratio of 2, while most normal devices have a ratio of 1.\n\n function getPixelRatio(cctx) {\n var devicePixelRatio = window.devicePixelRatio || 1;\n var backingStoreRatio =\n cctx.webkitBackingStorePixelRatio ||\n cctx.mozBackingStorePixelRatio ||\n cctx.msBackingStorePixelRatio ||\n cctx.oBackingStorePixelRatio ||\n cctx.backingStorePixelRatio || 1;\n\n return devicePixelRatio / backingStoreRatio;\n }\n\n function makeCanvas(cls) {\n\n var c = document.createElement('canvas');\n c.className = cls;\n\n\t\t\t$(c).css({ direction: \"ltr\", position: \"absolute\", left: 0, top: 0 })\n\t\t\t\t.appendTo(placeholder);\n\n\t\t\t// If HTML5 Canvas isn't available, fall back to Excanvas\n\n\t\t\tif (!c.getContext) {\n\t\t\t\tif (window.G_vmlCanvasManager) {\n\t\t\t\t\tc = window.G_vmlCanvasManager.initElement(c);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.\");\n\t\t\t\t}\n\t\t\t}\n\n var cctx = c.getContext(\"2d\");\n\n // Increase the canvas density based on the display's pixel ratio; basically\n // giving the canvas more pixels without increasing the size of its element,\n // to take advantage of the fact that retina displays have that many more\n // pixels than they actually use for page & element widths.\n\n var pixelRatio = getPixelRatio(cctx);\n\n c.width = canvasWidth * pixelRatio;\n c.height = canvasHeight * pixelRatio;\n c.style.width = canvasWidth + \"px\";\n c.style.height = canvasHeight + \"px\";\n\n // Save the context so we can reset in case we get replotted\n\n cctx.save();\n\n // Scale the coordinate space to match the display density; so even though we\n // may have twice as many pixels, we still want lines and other drawing to\n // appear at the same size; the extra pixels will just make them crisper.\n\n cctx.scale(pixelRatio, pixelRatio);\n\n return c;\n }\n\n function getCanvasDimensions() {\n canvasWidth = placeholder.width();\n canvasHeight = placeholder.height();\n\n if (canvasWidth <= 0 || canvasHeight <= 0)\n throw new Error(\"Invalid dimensions for plot, width = \" + canvasWidth + \", height = \" + canvasHeight);\n }\n\n function resizeCanvas(c) {\n\n var cctx = c.getContext(\"2d\");\n\n // Handle pixel ratios > 1 for retina displays, as explained in makeCanvas\n\n var pixelRatio = getPixelRatio(cctx);\n\n // Resizing should reset the state (excanvas seems to be buggy though)\n\n if (c.style.width != canvasWidth) {\n c.width = canvasWidth * pixelRatio;\n c.style.width = canvasWidth + \"px\";\n }\n\n if (c.style.height != canvasHeight) {\n c.height = canvasHeight * pixelRatio;\n c.style.height = canvasHeight + \"px\";\n }\n\n // so try to get back to the initial state (even if it's\n // gone now, this should be safe according to the spec)\n cctx.restore();\n\n // and save again\n cctx.save();\n\n // Apply scaling for retina displays, as explained in makeCanvas\n\n cctx.scale(pixelRatio, pixelRatio);\n }\n\n function setupCanvases() {\n var reused,\n existingCanvas = placeholder.children(\"canvas.flot-base\"),\n existingOverlay = placeholder.children(\"canvas.flot-overlay\");\n\n if (existingCanvas.length == 0 || existingOverlay == 0) {\n // init everything\n\n placeholder.html(\"\"); // make sure placeholder is clear\n\n placeholder.css({ padding: 0 }); // padding messes up the positioning\n\n if (placeholder.css(\"position\") == 'static')\n placeholder.css(\"position\", \"relative\"); // for positioning labels and overlay\n\n getCanvasDimensions();\n\n canvas = makeCanvas(\"flot-base\");\n overlay = makeCanvas(\"flot-overlay\"); // overlay canvas for interactive features\n\n reused = false;\n }\n else {\n // reuse existing elements\n\n canvas = existingCanvas.get(0);\n overlay = existingOverlay.get(0);\n\n reused = true;\n }\n\n ctx = canvas.getContext(\"2d\");\n octx = overlay.getContext(\"2d\");\n\n // define which element we're listening for events on\n eventHolder = $(overlay);\n\n if (reused) {\n // run shutdown in the old plot object\n placeholder.data(\"plot\").shutdown();\n\n // reset reused canvases\n plot.resize();\n\n // make sure overlay pixels are cleared (canvas is cleared when we redraw)\n octx.clearRect(0, 0, canvasWidth, canvasHeight);\n\n // then whack any remaining obvious garbage left\n eventHolder.unbind();\n placeholder.children().not([canvas, overlay]).remove();\n }\n\n // save in case we get replotted\n placeholder.data(\"plot\", plot);\n }\n\n function bindEvents() {\n // bind events\n if (options.grid.hoverable) {\n eventHolder.mousemove(onMouseMove);\n\n // Use bind, rather than .mouseleave, because we officially\n // still support jQuery 1.2.6, which doesn't define a shortcut\n // for mouseenter or mouseleave. This was a bug/oversight that\n // was fixed somewhere around 1.3.x. We can return to using\n // .mouseleave when we drop support for 1.2.6.\n\n eventHolder.bind(\"mouseleave\", onMouseLeave);\n }\n\n if (options.grid.clickable)\n eventHolder.click(onClick);\n\n executeHooks(hooks.bindEvents, [eventHolder]);\n }\n\n function shutdown() {\n if (redrawTimeout)\n clearTimeout(redrawTimeout);\n\n eventHolder.unbind(\"mousemove\", onMouseMove);\n eventHolder.unbind(\"mouseleave\", onMouseLeave);\n eventHolder.unbind(\"click\", onClick);\n\n executeHooks(hooks.shutdown, [eventHolder]);\n }\n\n function setTransformationHelpers(axis) {\n // set helper functions on the axis, assumes plot area\n // has been computed already\n\n function identity(x) { return x; }\n\n var s, m, t = axis.options.transform || identity,\n it = axis.options.inverseTransform;\n\n // precompute how much the axis is scaling a point\n // in canvas space\n if (axis.direction == \"x\") {\n s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min));\n m = Math.min(t(axis.max), t(axis.min));\n }\n else {\n s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min));\n s = -s;\n m = Math.max(t(axis.max), t(axis.min));\n }\n\n // data point to canvas coordinate\n if (t == identity) // slight optimization\n axis.p2c = function (p) { return (p - m) * s; };\n else\n axis.p2c = function (p) { return (t(p) - m) * s; };\n // canvas coordinate to data point\n if (!it)\n axis.c2p = function (c) { return m + c / s; };\n else\n axis.c2p = function (c) { return it(m + c / s); };\n }\n\n function measureTickLabels(axis) {\n var opts = axis.options, ticks = axis.ticks || [],\n axisw = opts.labelWidth || 0, axish = opts.labelHeight || 0,\n f = axis.font;\n\n ctx.save();\n ctx.font = f.style + \" \" + f.variant + \" \" + f.weight + \" \" + f.size + \"px '\" + f.family + \"'\";\n\n for (var i = 0; i < ticks.length; ++i) {\n var t = ticks[i];\n\n t.lines = [];\n t.width = t.height = 0;\n\n if (!t.label)\n continue;\n\n // accept various kinds of newlines, including HTML ones\n // (you can actually split directly on regexps in Javascript,\n // but IE < 9 is unfortunately broken)\n var lines = (t.label + \"\").replace(/<br ?\\/?>|\\r\\n|\\r/g, \"\\n\").split(\"\\n\");\n for (var j = 0; j < lines.length; ++j) {\n var line = { text: lines[j] },\n m = ctx.measureText(line.text);\n\n line.width = m.width;\n // m.height might not be defined, not in the\n // standard yet\n line.height = m.height != null ? m.height : f.size;\n\n // add a bit of margin since font rendering is\n // not pixel perfect and cut off letters look\n // bad, this also doubles as spacing between\n // lines\n line.height += Math.round(f.size * 0.15);\n\n t.width = Math.max(line.width, t.width);\n t.height += line.height;\n\n t.lines.push(line);\n }\n\n if (opts.labelWidth == null)\n axisw = Math.max(axisw, t.width);\n if (opts.labelHeight == null)\n axish = Math.max(axish, t.height);\n }\n ctx.restore();\n\n axis.labelWidth = Math.ceil(axisw);\n axis.labelHeight = Math.ceil(axish);\n }\n\n function allocateAxisBoxFirstPhase(axis) {\n // find the bounding box of the axis by looking at label\n // widths/heights and ticks, make room by diminishing the\n // plotOffset; this first phase only looks at one\n // dimension per axis, the other dimension depends on the\n // other axes so will have to wait\n\n var lw = axis.labelWidth,\n lh = axis.labelHeight,\n pos = axis.options.position,\n tickLength = axis.options.tickLength,\n axisMargin = options.grid.axisMargin,\n padding = options.grid.labelMargin,\n all = axis.direction == \"x\" ? xaxes : yaxes,\n index, innermost;\n\n // determine axis margin\n var samePosition = $.grep(all, function (a) {\n return a && a.options.position == pos && a.reserveSpace;\n });\n if ($.inArray(axis, samePosition) == samePosition.length - 1)\n axisMargin = 0; // outermost\n\n // determine tick length - if we're innermost, we can use \"full\"\n if (tickLength == null) {\n var sameDirection = $.grep(all, function (a) {\n return a && a.reserveSpace;\n });\n\n innermost = $.inArray(axis, sameDirection) == 0;\n if (innermost)\n tickLength = \"full\";\n else\n tickLength = 5;\n }\n\n if (!isNaN(+tickLength))\n padding += +tickLength;\n\n // compute box\n if (axis.direction == \"x\") {\n lh += padding;\n\n if (pos == \"bottom\") {\n plotOffset.bottom += lh + axisMargin;\n axis.box = { top: canvasHeight - plotOffset.bottom, height: lh };\n }\n else {\n axis.box = { top: plotOffset.top + axisMargin, height: lh };\n plotOffset.top += lh + axisMargin;\n }\n }\n else {\n lw += padding;\n\n if (pos == \"left\") {\n axis.box = { left: plotOffset.left + axisMargin, width: lw };\n plotOffset.left += lw + axisMargin;\n }\n else {\n plotOffset.right += lw + axisMargin;\n axis.box = { left: canvasWidth - plotOffset.right, width: lw };\n }\n }\n\n // save for future reference\n axis.position = pos;\n axis.tickLength = tickLength;\n axis.box.padding = padding;\n axis.innermost = innermost;\n }\n\n function allocateAxisBoxSecondPhase(axis) {\n // now that all axis boxes have been placed in one\n // dimension, we can set the remaining dimension coordinates\n if (axis.direction == \"x\") {\n axis.box.left = plotOffset.left - axis.labelWidth / 2;\n axis.box.width = canvasWidth - plotOffset.left - plotOffset.right + axis.labelWidth;\n }\n else {\n axis.box.top = plotOffset.top - axis.labelHeight / 2;\n axis.box.height = canvasHeight - plotOffset.bottom - plotOffset.top + axis.labelHeight;\n }\n }\n\n function adjustLayoutForThingsStickingOut() {\n // possibly adjust plot offset to ensure everything stays\n // inside the canvas and isn't clipped off\n\n var minMargin = options.grid.minBorderMargin,\n margins = { x: 0, y: 0 }, i, axis;\n\n // check stuff from the plot (FIXME: this should just read\n // a value from the series, otherwise it's impossible to\n // customize)\n if (minMargin == null) {\n minMargin = 0;\n for (i = 0; i < series.length; ++i)\n minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2));\n }\n\n margins.x = margins.y = Math.ceil(minMargin);\n\n // check axis labels, note we don't check the actual\n // labels but instead use the overall width/height to not\n // jump as much around with replots\n $.each(allAxes(), function (_, axis) {\n var dir = axis.direction;\n if (axis.reserveSpace)\n margins[dir] = Math.ceil(Math.max(margins[dir], (dir == \"x\" ? axis.labelWidth : axis.labelHeight) / 2));\n });\n\n plotOffset.left = Math.max(margins.x, plotOffset.left);\n plotOffset.right = Math.max(margins.x, plotOffset.right);\n plotOffset.top = Math.max(margins.y, plotOffset.top);\n plotOffset.bottom = Math.max(margins.y, plotOffset.bottom);\n }\n\n function setupGrid() {\n var i, axes = allAxes(), showGrid = options.grid.show;\n\n // Initialize the plot's offset from the edge of the canvas\n\n for (var a in plotOffset) {\n var margin = options.grid.margin || 0;\n plotOffset[a] = typeof margin == \"number\" ? margin : margin[a] || 0;\n }\n\n executeHooks(hooks.processOffset, [plotOffset]);\n\n // If the grid is visible, add its border width to the offset\n\n for (var a in plotOffset) {\n if(typeof(options.grid.borderWidth) == \"object\") {\n plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0;\n }\n else {\n plotOffset[a] += showGrid ? options.grid.borderWidth : 0;\n }\n }\n\n // init axes\n $.each(axes, function (_, axis) {\n axis.show = axis.options.show;\n if (axis.show == null)\n axis.show = axis.used; // by default an axis is visible if it's got data\n\n axis.reserveSpace = axis.show || axis.options.reserveSpace;\n\n setRange(axis);\n });\n\n if (showGrid) {\n // determine from the placeholder the font size ~ height of font ~ 1 em\n var fontDefaults = {\n style: placeholder.css(\"font-style\"),\n size: Math.round(0.8 * (+placeholder.css(\"font-size\").replace(\"px\", \"\") || 13)),\n variant: placeholder.css(\"font-variant\"),\n weight: placeholder.css(\"font-weight\"),\n family: placeholder.css(\"font-family\")\n };\n\n var allocatedAxes = $.grep(axes, function (axis) { return axis.reserveSpace; });\n\n $.each(allocatedAxes, function (_, axis) {\n // make the ticks\n setupTickGeneration(axis);\n setTicks(axis);\n snapRangeToTicks(axis, axis.ticks);\n\n // find labelWidth/Height for axis\n axis.font = $.extend({}, fontDefaults, axis.options.font);\n measureTickLabels(axis);\n });\n\n // with all dimensions calculated, we can compute the\n // axis bounding boxes, start from the outside\n // (reverse order)\n for (i = allocatedAxes.length - 1; i >= 0; --i)\n allocateAxisBoxFirstPhase(allocatedAxes[i]);\n\n // make sure we've got enough space for things that\n // might stick out\n adjustLayoutForThingsStickingOut();\n\n $.each(allocatedAxes, function (_, axis) {\n allocateAxisBoxSecondPhase(axis);\n });\n }\n\n plotWidth = canvasWidth - plotOffset.left - plotOffset.right;\n plotHeight = canvasHeight - plotOffset.bottom - plotOffset.top;\n\n // now we got the proper plot dimensions, we can compute the scaling\n $.each(axes, function (_, axis) {\n setTransformationHelpers(axis);\n });\n\n insertLegend();\n }\n\n function setRange(axis) {\n var opts = axis.options,\n min = +(opts.min != null ? opts.min : axis.datamin),\n max = +(opts.max != null ? opts.max : axis.datamax),\n delta = max - min;\n\n if (delta == 0.0) {\n // degenerate case\n var widen = max == 0 ? 1 : 0.01;\n\n if (opts.min == null)\n min -= widen;\n // always widen max if we couldn't widen min to ensure we\n // don't fall into min == max which doesn't work\n if (opts.max == null || opts.min != null)\n max += widen;\n }\n else {\n // consider autoscaling\n var margin = opts.autoscaleMargin;\n if (margin != null) {\n if (opts.min == null) {\n min -= delta * margin;\n // make sure we don't go below zero if all values\n // are positive\n if (min < 0 && axis.datamin != null && axis.datamin >= 0)\n min = 0;\n }\n if (opts.max == null) {\n max += delta * margin;\n if (max > 0 && axis.datamax != null && axis.datamax <= 0)\n max = 0;\n }\n }\n }\n axis.min = min;\n axis.max = max;\n }\n\n function setupTickGeneration(axis) {\n var opts = axis.options;\n\n // estimate number of ticks\n var noTicks;\n if (typeof opts.ticks == \"number\" && opts.ticks > 0)\n noTicks = opts.ticks;\n else\n // heuristic based on the model a*sqrt(x) fitted to\n // some data points that seemed reasonable\n noTicks = 0.3 * Math.sqrt(axis.direction == \"x\" ? canvasWidth : canvasHeight);\n\n axis.delta = (axis.max - axis.min) / noTicks;\n\n // Time mode was moved to a plug-in in 0.8, but since so many people use this\n // we'll add an especially friendly make sure they remembered to include it.\n\n if (opts.mode == \"time\" && !axis.tickGenerator) {\n throw new Error(\"Time mode requires the flot.time plugin.\");\n }\n\n // Flot supports base-10 axes; any other mode else is handled by a plug-in,\n // like flot.time.js.\n\n if (!axis.tickGenerator) {\n\n axis.tickGenerator = function (axis) {\n var maxDec = opts.tickDecimals,\n dec = -Math.floor(Math.log(axis.delta) / Math.LN10);\n\n if (maxDec != null && dec > maxDec)\n dec = maxDec;\n\n var magn = Math.pow(10, -dec),\n norm = axis.delta / magn, // norm is between 1.0 and 10.0\n size,\n\n ticks = [],\n start,\n i = 0,\n v = Number.NaN,\n prev;\n\n if (norm < 1.5)\n size = 1;\n else if (norm < 3) {\n size = 2;\n // special case for 2.5, requires an extra decimal\n if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) {\n size = 2.5;\n ++dec;\n }\n }\n else if (norm < 7.5)\n size = 5;\n else size = 10;\n\n size *= magn;\n\n if (opts.minTickSize != null && size < opts.minTickSize)\n size = opts.minTickSize;\n\n axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec);\n axis.tickSize = opts.tickSize || size;\n\n start = floorInBase(axis.min, axis.tickSize)\n\n do {\n prev = v;\n v = start + i * axis.tickSize;\n ticks.push(v);\n ++i;\n } while (v < axis.max && v != prev);\n return ticks;\n };\n\n\t\t\t\taxis.tickFormatter = function (value, axis) {\n\n\t\t\t\t\tvar factor = axis.tickDecimals ? Math.pow(10, axis.tickDecimals) : 1;\n\t\t\t\t\tvar formatted = \"\" + Math.round(value * factor) / factor;\n\n\t\t\t\t\t// If tickDecimals was specified, ensure that we have exactly that\n\t\t\t\t\t// much precision; otherwise default to the value's own precision.\n\n\t\t\t\t\tif (axis.tickDecimals != null) {\n\t\t\t\t\t\tvar decimal = formatted.indexOf(\".\");\n\t\t\t\t\t\tvar precision = decimal == -1 ? 0 : formatted.length - decimal - 1;\n\t\t\t\t\t\tif (precision < axis.tickDecimals) {\n\t\t\t\t\t\t\treturn (precision ? formatted : formatted + \".\") + (\"\" + factor).substr(1, axis.tickDecimals - precision);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n return formatted;\n };\n }\n\n if ($.isFunction(opts.tickFormatter))\n axis.tickFormatter = function (v, axis) { return \"\" + opts.tickFormatter(v, axis); };\n\n if (opts.alignTicksWithAxis != null) {\n var otherAxis = (axis.direction == \"x\" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1];\n if (otherAxis && otherAxis.used && otherAxis != axis) {\n // consider snapping min/max to outermost nice ticks\n var niceTicks = axis.tickGenerator(axis);\n if (niceTicks.length > 0) {\n if (opts.min == null)\n axis.min = Math.min(axis.min, niceTicks[0]);\n if (opts.max == null && niceTicks.length > 1)\n axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]);\n }\n\n axis.tickGenerator = function (axis) {\n // copy ticks, scaled to this axis\n var ticks = [], v, i;\n for (i = 0; i < otherAxis.ticks.length; ++i) {\n v = (otherAxis.ticks[i].v - otherAxis.min) / (otherAxis.max - otherAxis.min);\n v = axis.min + v * (axis.max - axis.min);\n ticks.push(v);\n }\n return ticks;\n };\n\n // we might need an extra decimal since forced\n // ticks don't necessarily fit naturally\n if (!axis.mode && opts.tickDecimals == null) {\n var extraDec = Math.max(0, -Math.floor(Math.log(axis.delta) / Math.LN10) + 1),\n ts = axis.tickGenerator(axis);\n\n // only proceed if the tick interval rounded\n // with an extra decimal doesn't give us a\n // zero at end\n if (!(ts.length > 1 && /\\..*0$/.test((ts[1] - ts[0]).toFixed(extraDec))))\n axis.tickDecimals = extraDec;\n }\n }\n }\n }\n\n function setTicks(axis) {\n var oticks = axis.options.ticks, ticks = [];\n if (oticks == null || (typeof oticks == \"number\" && oticks > 0))\n ticks = axis.tickGenerator(axis);\n else if (oticks) {\n if ($.isFunction(oticks))\n // generate the ticks\n ticks = oticks(axis);\n else\n ticks = oticks;\n }\n\n // clean up/labelify the supplied ticks, copy them over\n var i, v;\n axis.ticks = [];\n for (i = 0; i < ticks.length; ++i) {\n var label = null;\n var t = ticks[i];\n if (typeof t == \"object\") {\n v = +t[0];\n if (t.length > 1)\n label = t[1];\n }\n else\n v = +t;\n if (label == null)\n label = axis.tickFormatter(v, axis);\n if (!isNaN(v))\n axis.ticks.push({ v: v, label: label });\n }\n }\n\n function snapRangeToTicks(axis, ticks) {\n if (axis.options.autoscaleMargin && ticks.length > 0) {\n // snap to ticks\n if (axis.options.min == null)\n axis.min = Math.min(axis.min, ticks[0].v);\n if (axis.options.max == null && ticks.length > 1)\n axis.max = Math.max(axis.max, ticks[ticks.length - 1].v);\n }\n }\n\n function draw() {\n ctx.clearRect(0, 0, canvasWidth, canvasHeight);\n\n executeHooks(hooks.drawBackground, [ctx]);\n\n var grid = options.grid;\n\n // draw background, if any\n if (grid.show && grid.backgroundColor)\n drawBackground();\n\n if (grid.show && !grid.aboveData) {\n drawGrid();\n drawAxisLabels();\n }\n\n for (var i = 0; i < series.length; ++i) {\n executeHooks(hooks.drawSeries, [ctx, series[i]]);\n drawSeries(series[i]);\n }\n\n executeHooks(hooks.draw, [ctx]);\n\n if (grid.show && grid.aboveData) {\n drawGrid();\n drawAxisLabels();\n }\n }\n\n function extractRange(ranges, coord) {\n var axis, from, to, key, axes = allAxes();\n\n for (var i = 0; i < axes.length; ++i) {\n axis = axes[i];\n if (axis.direction == coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n == 1)\n key = coord + \"axis\"; // support x1axis as xaxis\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord == \"x\" ? xaxes[0] : yaxes[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n\n return { from: from, to: to, axis: axis };\n }\n\n function drawBackground() {\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, \"rgba(255, 255, 255, 0)\");\n ctx.fillRect(0, 0, plotWidth, plotHeight);\n ctx.restore();\n }\n\n function drawGrid() {\n var i, axes, bw, bc;\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n // draw markings\n var markings = options.grid.markings;\n if (markings) {\n if ($.isFunction(markings)) {\n axes = plot.getAxes();\n // xmin etc. is backwards compatibility, to be\n // removed in the future\n axes.xmin = axes.xaxis.min;\n axes.xmax = axes.xaxis.max;\n axes.ymin = axes.yaxis.min;\n axes.ymax = axes.yaxis.max;\n\n markings = markings(axes);\n }\n\n for (i = 0; i < markings.length; ++i) {\n var m = markings[i],\n xrange = extractRange(m, \"x\"),\n yrange = extractRange(m, \"y\");\n\n // fill in missing\n if (xrange.from == null)\n xrange.from = xrange.axis.min;\n if (xrange.to == null)\n xrange.to = xrange.axis.max;\n if (yrange.from == null)\n yrange.from = yrange.axis.min;\n if (yrange.to == null)\n yrange.to = yrange.axis.max;\n\n // clip\n if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max ||\n yrange.to < yrange.axis.min || yrange.from > yrange.axis.max)\n continue;\n\n xrange.from = Math.max(xrange.from, xrange.axis.min);\n xrange.to = Math.min(xrange.to, xrange.axis.max);\n yrange.from = Math.max(yrange.from, yrange.axis.min);\n yrange.to = Math.min(yrange.to, yrange.axis.max);\n\n if (xrange.from == xrange.to && yrange.from == yrange.to)\n continue;\n\n // then draw\n xrange.from = xrange.axis.p2c(xrange.from);\n xrange.to = xrange.axis.p2c(xrange.to);\n yrange.from = yrange.axis.p2c(yrange.from);\n yrange.to = yrange.axis.p2c(yrange.to);\n\n if (xrange.from == xrange.to || yrange.from == yrange.to) {\n // draw line\n ctx.beginPath();\n ctx.strokeStyle = m.color || options.grid.markingsColor;\n ctx.lineWidth = m.lineWidth || options.grid.markingsLineWidth;\n ctx.moveTo(xrange.from, yrange.from);\n ctx.lineTo(xrange.to, yrange.to);\n ctx.stroke();\n }\n else {\n // fill area\n ctx.fillStyle = m.color || options.grid.markingsColor;\n ctx.fillRect(xrange.from, yrange.to,\n xrange.to - xrange.from,\n yrange.from - yrange.to);\n }\n }\n }\n\n // draw the ticks\n axes = allAxes();\n bw = options.grid.borderWidth;\n\n for (var j = 0; j < axes.length; ++j) {\n var axis = axes[j], box = axis.box,\n t = axis.tickLength, x, y, xoff, yoff;\n if (!axis.show || axis.ticks.length == 0)\n continue;\n\n ctx.strokeStyle = axis.options.tickColor || $.color.parse(axis.options.color).scale('a', 0.22).toString();\n ctx.lineWidth = 1;\n\n // find the edges\n if (axis.direction == \"x\") {\n x = 0;\n if (t == \"full\")\n y = (axis.position == \"top\" ? 0 : plotHeight);\n else\n y = box.top - plotOffset.top + (axis.position == \"top\" ? box.height : 0);\n }\n else {\n y = 0;\n if (t == \"full\")\n x = (axis.position == \"left\" ? 0 : plotWidth);\n else\n x = box.left - plotOffset.left + (axis.position == \"left\" ? box.width : 0);\n }\n\n // draw tick bar\n if (!axis.innermost) {\n ctx.beginPath();\n xoff = yoff = 0;\n if (axis.direction == \"x\")\n xoff = plotWidth;\n else\n yoff = plotHeight;\n\n if (ctx.lineWidth == 1) {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n\n ctx.moveTo(x, y);\n ctx.lineTo(x + xoff, y + yoff);\n ctx.stroke();\n }\n\n // draw ticks\n ctx.beginPath();\n for (i = 0; i < axis.ticks.length; ++i) {\n var v = axis.ticks[i].v;\n\n xoff = yoff = 0;\n\n if (isNaN(v) || v < axis.min || v > axis.max\n // skip those lying on the axes if we got a border\n || (t == \"full\"\n && ((typeof bw == \"object\" && bw[axis.position] > 0) || bw > 0)\n && (v == axis.min || v == axis.max)))\n continue;\n\n if (axis.direction == \"x\") {\n x = axis.p2c(v);\n yoff = t == \"full\" ? -plotHeight : t;\n\n if (axis.position == \"top\")\n yoff = -yoff;\n }\n else {\n y = axis.p2c(v);\n xoff = t == \"full\" ? -plotWidth : t;\n\n if (axis.position == \"left\")\n xoff = -xoff;\n }\n\n if (ctx.lineWidth == 1) {\n if (axis.direction == \"x\")\n x = Math.floor(x) + 0.5;\n else\n y = Math.floor(y) + 0.5;\n }\n\n ctx.moveTo(x, y);\n ctx.lineTo(x + xoff, y + yoff);\n }\n\n ctx.stroke();\n }\n\n\n // draw border\n if (bw) {\n // If either borderWidth or borderColor is an object, then draw the border\n // line by line instead of as one rectangle\n bc = options.grid.borderColor;\n if(typeof bw == \"object\" || typeof bc == \"object\") {\n if (typeof bw !== \"object\") {\n bw = {top: bw, right: bw, bottom: bw, left: bw};\n }\n if (typeof bc !== \"object\") {\n bc = {top: bc, right: bc, bottom: bc, left: bc};\n }\n\n if (bw.top > 0) {\n ctx.strokeStyle = bc.top;\n ctx.lineWidth = bw.top;\n ctx.beginPath();\n ctx.moveTo(0 - bw.left, 0 - bw.top/2);\n ctx.lineTo(plotWidth, 0 - bw.top/2);\n ctx.stroke();\n }\n\n if (bw.right > 0) {\n ctx.strokeStyle = bc.right;\n ctx.lineWidth = bw.right;\n ctx.beginPath();\n ctx.moveTo(plotWidth + bw.right / 2, 0 - bw.top);\n ctx.lineTo(plotWidth + bw.right / 2, plotHeight);\n ctx.stroke();\n }\n\n if (bw.bottom > 0) {\n ctx.strokeStyle = bc.bottom;\n ctx.lineWidth = bw.bottom;\n ctx.beginPath();\n ctx.moveTo(plotWidth + bw.right, plotHeight + bw.bottom / 2);\n ctx.lineTo(0, plotHeight + bw.bottom / 2);\n ctx.stroke();\n }\n\n if (bw.left > 0) {\n ctx.strokeStyle = bc.left;\n ctx.lineWidth = bw.left;\n ctx.beginPath();\n ctx.moveTo(0 - bw.left/2, plotHeight + bw.bottom);\n ctx.lineTo(0- bw.left/2, 0);\n ctx.stroke();\n }\n }\n else {\n ctx.lineWidth = bw;\n ctx.strokeStyle = options.grid.borderColor;\n ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw);\n }\n }\n\n ctx.restore();\n }\n\n function drawAxisLabels() {\n ctx.save();\n\n $.each(allAxes(), function (_, axis) {\n if (!axis.show || axis.ticks.length == 0)\n return;\n\n var box = axis.box, f = axis.font;\n // placeholder.append('<div style=\"position:absolute;opacity:0.10;background-color:red;left:' + box.left + 'px;top:' + box.top + 'px;width:' + box.width + 'px;height:' + box.height + 'px\"></div>') // debug\n\n ctx.fillStyle = axis.options.color;\n // Important: Don't use quotes around axis.font.family! Just around single\n // font names like 'Times New Roman' that have a space or special character in it.\n ctx.font = f.style + \" \" + f.variant + \" \" + f.weight + \" \" + f.size + \"px \" + f.family;\n ctx.textAlign = \"start\";\n // middle align the labels - top would be more\n // natural, but browsers can differ a pixel or two in\n // where they consider the top to be, so instead we\n // middle align to minimize variation between browsers\n // and compensate when calculating the coordinates\n ctx.textBaseline = \"middle\";\n\n for (var i = 0; i < axis.ticks.length; ++i) {\n var tick = axis.ticks[i];\n if (!tick.label || tick.v < axis.min || tick.v > axis.max)\n continue;\n\n var x, y, offset = 0, line;\n for (var k = 0; k < tick.lines.length; ++k) {\n line = tick.lines[k];\n\n if (axis.direction == \"x\") {\n x = plotOffset.left + axis.p2c(tick.v) - line.width/2;\n if (axis.position == \"bottom\")\n y = box.top + box.padding;\n else\n y = box.top + box.height - box.padding - tick.height;\n }\n else {\n y = plotOffset.top + axis.p2c(tick.v) - tick.height/2;\n if (axis.position == \"left\")\n x = box.left + box.width - box.padding - line.width;\n else\n x = box.left + box.padding;\n }\n\n // account for middle aligning and line number\n y += line.height/2 + offset;\n offset += line.height;\n\n if (!!(window.opera && window.opera.version().split('.')[0] < 12)) {\n // FIXME: LEGACY BROWSER FIX\n // AFFECTS: Opera < 12.00\n\n // round the coordinates since Opera\n // otherwise switches to more ugly\n // rendering (probably non-hinted) and\n // offset the y coordinates since it seems\n // to be off pretty consistently compared\n // to the other browsers\n x = Math.floor(x);\n y = Math.ceil(y - 2);\n }\n ctx.fillText(line.text, x, y);\n }\n }\n });\n\n ctx.restore();\n }\n\n function drawSeries(series) {\n if (series.lines.show)\n drawSeriesLines(series);\n if (series.bars.show)\n drawSeriesBars(series);\n if (series.points.show)\n drawSeriesPoints(series);\n }\n\n function drawSeriesLines(series) {\n function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {\n var points = datapoints.points,\n ps = datapoints.pointsize,\n prevx = null, prevy = null;\n\n ctx.beginPath();\n for (var i = ps; i < points.length; i += ps) {\n var x1 = points[i - ps], y1 = points[i - ps + 1],\n x2 = points[i], y2 = points[i + 1];\n\n if (x1 == null || x2 == null)\n continue;\n\n // clip with ymin\n if (y1 <= y2 && y1 < axisy.min) {\n if (y2 < axisy.min)\n continue; // line segment is outside\n // compute new intersection point\n x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.min;\n }\n else if (y2 <= y1 && y2 < axisy.min) {\n if (y1 < axisy.min)\n continue;\n x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.min;\n }\n\n // clip with ymax\n if (y1 >= y2 && y1 > axisy.max) {\n if (y2 > axisy.max)\n continue;\n x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.max;\n }\n else if (y2 >= y1 && y2 > axisy.max) {\n if (y1 > axisy.max)\n continue;\n x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.max;\n }\n\n // clip with xmin\n if (x1 <= x2 && x1 < axisx.min) {\n if (x2 < axisx.min)\n continue;\n y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.min;\n }\n else if (x2 <= x1 && x2 < axisx.min) {\n if (x1 < axisx.min)\n continue;\n y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.min;\n }\n\n // clip with xmax\n if (x1 >= x2 && x1 > axisx.max) {\n if (x2 > axisx.max)\n continue;\n y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.max;\n }\n else if (x2 >= x1 && x2 > axisx.max) {\n if (x1 > axisx.max)\n continue;\n y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.max;\n }\n\n if (x1 != prevx || y1 != prevy)\n ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);\n\n prevx = x2;\n prevy = y2;\n ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset);\n }\n ctx.stroke();\n }\n\n function plotLineArea(datapoints, axisx, axisy) {\n var points = datapoints.points,\n ps = datapoints.pointsize,\n bottom = Math.min(Math.max(0, axisy.min), axisy.max),\n i = 0, top, areaOpen = false,\n ypos = 1, segmentStart = 0, segmentEnd = 0;\n\n // we process each segment in two turns, first forward\n // direction to sketch out top, then once we hit the\n // end we go backwards to sketch the bottom\n while (true) {\n if (ps > 0 && i > points.length + ps)\n break;\n\n i += ps; // ps is negative if going backwards\n\n var x1 = points[i - ps],\n y1 = points[i - ps + ypos],\n x2 = points[i], y2 = points[i + ypos];\n\n if (areaOpen) {\n if (ps > 0 && x1 != null && x2 == null) {\n // at turning point\n segmentEnd = i;\n ps = -ps;\n ypos = 2;\n continue;\n }\n\n if (ps < 0 && i == segmentStart + ps) {\n // done with the reverse sweep\n ctx.fill();\n areaOpen = false;\n ps = -ps;\n ypos = 1;\n i = segmentStart = segmentEnd + ps;\n continue;\n }\n }\n\n if (x1 == null || x2 == null)\n continue;\n\n // clip x values\n\n // clip with xmin\n if (x1 <= x2 && x1 < axisx.min) {\n if (x2 < axisx.min)\n continue;\n y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.min;\n }\n else if (x2 <= x1 && x2 < axisx.min) {\n if (x1 < axisx.min)\n continue;\n y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.min;\n }\n\n // clip with xmax\n if (x1 >= x2 && x1 > axisx.max) {\n if (x2 > axisx.max)\n continue;\n y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.max;\n }\n else if (x2 >= x1 && x2 > axisx.max) {\n if (x1 > axisx.max)\n continue;\n y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.max;\n }\n\n if (!areaOpen) {\n // open area\n ctx.beginPath();\n ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom));\n areaOpen = true;\n }\n\n // now first check the case where both is outside\n if (y1 >= axisy.max && y2 >= axisy.max) {\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max));\n continue;\n }\n else if (y1 <= axisy.min && y2 <= axisy.min) {\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));\n continue;\n }\n\n // else it's a bit more complicated, there might\n // be a flat maxed out rectangle first, then a\n // triangular cutout or reverse; to find these\n // keep track of the current x values\n var x1old = x1, x2old = x2;\n\n // clip the y values, without shortcutting, we\n // go through all cases in turn\n\n // clip with ymin\n if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {\n x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.min;\n }\n else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) {\n x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.min;\n }\n\n // clip with ymax\n if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) {\n x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.max;\n }\n else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) {\n x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.max;\n }\n\n // if the x value was changed we got a rectangle\n // to fill\n if (x1 != x1old) {\n ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1));\n // it goes to (x1, y1), but we fill that below\n }\n\n // fill triangular section, this sometimes result\n // in redundant points if (x1, y1) hasn't changed\n // from previous line to, but we just ignore that\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));\n\n // fill the other rectangle if it's there\n if (x2 != x2old) {\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));\n ctx.lineTo(axisx.p2c(x2old), axisy.p2c(y2));\n }\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n ctx.lineJoin = \"round\";\n\n var lw = series.lines.lineWidth,\n sw = series.shadowSize;\n // FIXME: consider another form of shadow when filling is turned on\n if (lw > 0 && sw > 0) {\n // draw shadow as a thick and thin line with transparency\n ctx.lineWidth = sw;\n ctx.strokeStyle = \"rgba(0,0,0,0.1)\";\n // position shadow at angle from the mid of line\n var angle = Math.PI/18;\n plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis);\n ctx.lineWidth = sw/2;\n plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis);\n }\n\n ctx.lineWidth = lw;\n ctx.strokeStyle = series.color;\n var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight);\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n plotLineArea(series.datapoints, series.xaxis, series.yaxis);\n }\n\n if (lw > 0)\n plotLine(series.datapoints, 0, 0, series.xaxis, series.yaxis);\n ctx.restore();\n }\n\n function drawSeriesPoints(series) {\n function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) {\n var points = datapoints.points, ps = datapoints.pointsize;\n\n for (var i = 0; i < points.length; i += ps) {\n var x = points[i], y = points[i + 1];\n if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)\n continue;\n\n ctx.beginPath();\n x = axisx.p2c(x);\n y = axisy.p2c(y) + offset;\n if (symbol == \"circle\")\n ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);\n else\n symbol(ctx, x, y, radius, shadow);\n ctx.closePath();\n\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n ctx.fill();\n }\n ctx.stroke();\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n var lw = series.points.lineWidth,\n sw = series.shadowSize,\n radius = series.points.radius,\n symbol = series.points.symbol;\n\n // If the user sets the line width to 0, we change it to a very \n // small value. A line width of 0 seems to force the default of 1.\n // Doing the conditional here allows the shadow setting to still be \n // optional even with a lineWidth of 0.\n\n if( lw == 0 )\n lw = 0.0001;\n\n if (lw > 0 && sw > 0) {\n // draw shadow in two steps\n var w = sw / 2;\n ctx.lineWidth = w;\n ctx.strokeStyle = \"rgba(0,0,0,0.1)\";\n plotPoints(series.datapoints, radius, null, w + w/2, true,\n series.xaxis, series.yaxis, symbol);\n\n ctx.strokeStyle = \"rgba(0,0,0,0.2)\";\n plotPoints(series.datapoints, radius, null, w/2, true,\n series.xaxis, series.yaxis, symbol);\n }\n\n ctx.lineWidth = lw;\n ctx.strokeStyle = series.color;\n plotPoints(series.datapoints, radius,\n getFillStyle(series.points, series.color), 0, false,\n series.xaxis, series.yaxis, symbol);\n ctx.restore();\n }\n\n function drawBar(x, y, b, barLeft, barRight, offset, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {\n var left, right, bottom, top,\n drawLeft, drawRight, drawTop, drawBottom,\n tmp;\n\n // in horizontal mode, we start the bar from the left\n // instead of from the bottom so it appears to be\n // horizontal rather than vertical\n if (horizontal) {\n drawBottom = drawRight = drawTop = true;\n drawLeft = false;\n left = b;\n right = x;\n top = y + barLeft;\n bottom = y + barRight;\n\n // account for negative bars\n if (right < left) {\n tmp = right;\n right = left;\n left = tmp;\n drawLeft = true;\n drawRight = false;\n }\n }\n else {\n drawLeft = drawRight = drawTop = true;\n drawBottom = false;\n left = x + barLeft;\n right = x + barRight;\n bottom = b;\n top = y;\n\n // account for negative bars\n if (top < bottom) {\n tmp = top;\n top = bottom;\n bottom = tmp;\n drawBottom = true;\n drawTop = false;\n }\n }\n\n // clip\n if (right < axisx.min || left > axisx.max ||\n top < axisy.min || bottom > axisy.max)\n return;\n\n if (left < axisx.min) {\n left = axisx.min;\n drawLeft = false;\n }\n\n if (right > axisx.max) {\n right = axisx.max;\n drawRight = false;\n }\n\n if (bottom < axisy.min) {\n bottom = axisy.min;\n drawBottom = false;\n }\n\n if (top > axisy.max) {\n top = axisy.max;\n drawTop = false;\n }\n\n left = axisx.p2c(left);\n bottom = axisy.p2c(bottom);\n right = axisx.p2c(right);\n top = axisy.p2c(top);\n\n // fill the bar\n if (fillStyleCallback) {\n c.beginPath();\n c.moveTo(left, bottom);\n c.lineTo(left, top);\n c.lineTo(right, top);\n c.lineTo(right, bottom);\n c.fillStyle = fillStyleCallback(bottom, top);\n c.fill();\n }\n\n // draw outline\n if (lineWidth > 0 && (drawLeft || drawRight || drawTop || drawBottom)) {\n c.beginPath();\n\n // FIXME: inline moveTo is buggy with excanvas\n c.moveTo(left, bottom + offset);\n if (drawLeft)\n c.lineTo(left, top + offset);\n else\n c.moveTo(left, top + offset);\n if (drawTop)\n c.lineTo(right, top + offset);\n else\n c.moveTo(right, top + offset);\n if (drawRight)\n c.lineTo(right, bottom + offset);\n else\n c.moveTo(right, bottom + offset);\n if (drawBottom)\n c.lineTo(left, bottom + offset);\n else\n c.moveTo(left, bottom + offset);\n c.stroke();\n }\n }\n\n function drawSeriesBars(series) {\n function plotBars(datapoints, barLeft, barRight, offset, fillStyleCallback, axisx, axisy) {\n var points = datapoints.points, ps = datapoints.pointsize;\n\n for (var i = 0; i < points.length; i += ps) {\n if (points[i] == null)\n continue;\n drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, offset, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n // FIXME: figure out a way to add shadows (for instance along the right edge)\n ctx.lineWidth = series.bars.lineWidth;\n ctx.strokeStyle = series.color;\n\n var barLeft;\n\n switch (series.bars.align) {\n case \"left\":\n barLeft = 0;\n break;\n case \"right\":\n barLeft = -series.bars.barWidth;\n break;\n case \"center\":\n barLeft = -series.bars.barWidth / 2;\n break;\n default:\n throw new Error(\"Invalid bar alignment: \" + series.bars.align);\n }\n\n var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null;\n plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, 0, fillStyleCallback, series.xaxis, series.yaxis);\n ctx.restore();\n }\n\n function getFillStyle(filloptions, seriesColor, bottom, top) {\n var fill = filloptions.fill;\n if (!fill)\n return null;\n\n if (filloptions.fillColor)\n return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor);\n\n var c = $.color.parse(seriesColor);\n c.a = typeof fill == \"number\" ? fill : 0.4;\n c.normalize();\n return c.toString();\n }\n\n function insertLegend() {\n\n placeholder.find(\".legend\").remove();\n\n if (!options.legend.show)\n return;\n\n var fragments = [], entries = [], rowStarted = false,\n lf = options.legend.labelFormatter, s, label;\n\n // Build a list of legend entries, with each having a label and a color\n\n for (var i = 0; i < series.length; ++i) {\n s = series[i];\n if (s.label) {\n label = lf ? lf(s.label, s) : s.label;\n if (label) {\n entries.push({\n label: label,\n color: s.color\n });\n }\n }\n }\n\n // Sort the legend using either the default or a custom comparator\n\n if (options.legend.sorted) {\n if ($.isFunction(options.legend.sorted)) {\n entries.sort(options.legend.sorted);\n } else if (options.legend.sorted == \"reverse\") {\n \tentries.reverse();\n } else {\n var ascending = options.legend.sorted != \"descending\";\n entries.sort(function(a, b) {\n return a.label == b.label ? 0 : (\n (a.label < b.label) != ascending ? 1 : -1 // Logical XOR\n );\n });\n }\n }\n\n // Generate markup for the list of entries, in their final order\n\n for (var i = 0; i < entries.length; ++i) {\n\n var entry = entries[i];\n\n if (i % options.legend.noColumns == 0) {\n if (rowStarted)\n fragments.push('</tr>');\n fragments.push('<tr>');\n rowStarted = true;\n }\n\n fragments.push(\n '<td class=\"legendColorBox\"><div style=\"border:1px solid ' + options.legend.labelBoxBorderColor + ';padding:1px\"><div style=\"width:4px;height:0;border:5px solid ' + entry.color + ';overflow:hidden\"></div></div></td>' +\n '<td class=\"legendLabel\">' + entry.label + '</td>'\n );\n }\n\n if (rowStarted)\n fragments.push('</tr>');\n\n if (fragments.length == 0)\n return;\n\n var table = '<table style=\"font-size:smaller;color:' + options.grid.color + '\">' + fragments.join(\"\") + '</table>';\n if (options.legend.container != null)\n $(options.legend.container).html(table);\n else {\n var pos = \"\",\n p = options.legend.position,\n m = options.legend.margin;\n if (m[0] == null)\n m = [m, m];\n if (p.charAt(0) == \"n\")\n pos += 'top:' + (m[1] + plotOffset.top) + 'px;';\n else if (p.charAt(0) == \"s\")\n pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;';\n if (p.charAt(1) == \"e\")\n pos += 'right:' + (m[0] + plotOffset.right) + 'px;';\n else if (p.charAt(1) == \"w\")\n pos += 'left:' + (m[0] + plotOffset.left) + 'px;';\n var legend = $('<div class=\"legend\">' + table.replace('style=\"', 'style=\"position:absolute;' + pos +';') + '</div>').appendTo(placeholder);\n if (options.legend.backgroundOpacity != 0.0) {\n // put in the transparent background\n // separately to avoid blended labels and\n // label boxes\n var c = options.legend.backgroundColor;\n if (c == null) {\n c = options.grid.backgroundColor;\n if (c && typeof c == \"string\")\n c = $.color.parse(c);\n else\n c = $.color.extract(legend, 'background-color');\n c.a = 1;\n c = c.toString();\n }\n var div = legend.children();\n $('<div style=\"position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos +'background-color:' + c + ';\"> </div>').prependTo(legend).css('opacity', options.legend.backgroundOpacity);\n }\n }\n }\n\n\n // interactive features\n\n var highlights = [],\n redrawTimeout = null;\n\n // returns the data item the mouse is over, or null if none is found\n function findNearbyItem(mouseX, mouseY, seriesFilter) {\n var maxDistance = options.grid.mouseActiveRadius,\n smallestDistance = maxDistance * maxDistance + 1,\n item = null, foundPoint = false, i, j, ps;\n\n for (i = series.length - 1; i >= 0; --i) {\n if (!seriesFilter(series[i]))\n continue;\n\n var s = series[i],\n axisx = s.xaxis,\n axisy = s.yaxis,\n points = s.datapoints.points,\n mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster\n my = axisy.c2p(mouseY),\n maxx = maxDistance / axisx.scale,\n maxy = maxDistance / axisy.scale;\n\n ps = s.datapoints.pointsize;\n // with inverse transforms, we can't use the maxx/maxy\n // optimization, sadly\n if (axisx.options.inverseTransform)\n maxx = Number.MAX_VALUE;\n if (axisy.options.inverseTransform)\n maxy = Number.MAX_VALUE;\n\n if (s.lines.show || s.points.show) {\n for (j = 0; j < points.length; j += ps) {\n var x = points[j], y = points[j + 1];\n if (x == null)\n continue;\n\n // For points and lines, the cursor must be within a\n // certain distance to the data point\n if (x - mx > maxx || x - mx < -maxx ||\n y - my > maxy || y - my < -maxy)\n continue;\n\n // We have to calculate distances in pixels, not in\n // data units, because the scales of the axes may be different\n var dx = Math.abs(axisx.p2c(x) - mouseX),\n dy = Math.abs(axisy.p2c(y) - mouseY),\n dist = dx * dx + dy * dy; // we save the sqrt\n\n // use <= to ensure last point takes precedence\n // (last generally means on top of)\n if (dist < smallestDistance) {\n smallestDistance = dist;\n item = [i, j / ps];\n }\n }\n }\n\n if (s.bars.show && !item) { // no other point can be nearby\n var barLeft = s.bars.align == \"left\" ? 0 : -s.bars.barWidth/2,\n barRight = barLeft + s.bars.barWidth;\n\n for (j = 0; j < points.length; j += ps) {\n var x = points[j], y = points[j + 1], b = points[j + 2];\n if (x == null)\n continue;\n\n // for a bar graph, the cursor must be inside the bar\n if (series[i].bars.horizontal ?\n (mx <= Math.max(b, x) && mx >= Math.min(b, x) &&\n my >= y + barLeft && my <= y + barRight) :\n (mx >= x + barLeft && mx <= x + barRight &&\n my >= Math.min(b, y) && my <= Math.max(b, y)))\n item = [i, j / ps];\n }\n }\n }\n\n if (item) {\n i = item[0];\n j = item[1];\n ps = series[i].datapoints.pointsize;\n\n return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),\n dataIndex: j,\n series: series[i],\n seriesIndex: i };\n }\n\n return null;\n }\n\n function onMouseMove(e) {\n if (options.grid.hoverable)\n triggerClickHoverEvent(\"plothover\", e,\n function (s) { return s[\"hoverable\"] != false; });\n }\n\n function onMouseLeave(e) {\n if (options.grid.hoverable)\n triggerClickHoverEvent(\"plothover\", e,\n function (s) { return false; });\n }\n\n function onClick(e) {\n triggerClickHoverEvent(\"plotclick\", e,\n function (s) { return s[\"clickable\"] != false; });\n }\n\n // trigger click or hover event (they send the same parameters\n // so we share their code)\n function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }\n\n function triggerRedrawOverlay() {\n var t = options.interaction.redrawOverlayInterval;\n if (t == -1) { // skip event queue\n drawOverlay();\n return;\n }\n\n if (!redrawTimeout)\n redrawTimeout = setTimeout(drawOverlay, t);\n }\n\n function drawOverlay() {\n redrawTimeout = null;\n\n // draw highlights\n octx.save();\n octx.clearRect(0, 0, canvasWidth, canvasHeight);\n octx.translate(plotOffset.left, plotOffset.top);\n\n var i, hi;\n for (i = 0; i < highlights.length; ++i) {\n hi = highlights[i];\n\n if (hi.series.bars.show)\n drawBarHighlight(hi.series, hi.point);\n else\n drawPointHighlight(hi.series, hi.point);\n }\n octx.restore();\n\n executeHooks(hooks.drawOverlay, [octx]);\n }\n\n function highlight(s, point, auto) {\n if (typeof s == \"number\")\n s = series[s];\n\n if (typeof point == \"number\") {\n var ps = s.datapoints.pointsize;\n point = s.datapoints.points.slice(ps * point, ps * (point + 1));\n }\n\n var i = indexOfHighlight(s, point);\n if (i == -1) {\n highlights.push({ series: s, point: point, auto: auto });\n\n triggerRedrawOverlay();\n }\n else if (!auto)\n highlights[i].auto = false;\n }\n\n function unhighlight(s, point) {\n if (s == null && point == null) {\n highlights = [];\n triggerRedrawOverlay();\n }\n\n if (typeof s == \"number\")\n s = series[s];\n\n if (typeof point == \"number\")\n point = s.data[point];\n\n var i = indexOfHighlight(s, point);\n if (i != -1) {\n highlights.splice(i, 1);\n\n triggerRedrawOverlay();\n }\n }\n\n function indexOfHighlight(s, p) {\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.series == s && h.point[0] == p[0]\n && h.point[1] == p[1])\n return i;\n }\n return -1;\n }\n\n function drawPointHighlight(series, point) {\n var x = point[0], y = point[1],\n axisx = series.xaxis, axisy = series.yaxis,\n highlightColor = (typeof series.highlightColor === \"string\") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString();\n\n if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)\n return;\n\n var pointRadius = series.points.radius + series.points.lineWidth / 2;\n octx.lineWidth = pointRadius;\n octx.strokeStyle = highlightColor;\n var radius = 1.5 * pointRadius;\n x = axisx.p2c(x);\n y = axisy.p2c(y);\n\n octx.beginPath();\n if (series.points.symbol == \"circle\")\n octx.arc(x, y, radius, 0, 2 * Math.PI, false);\n else\n series.points.symbol(octx, x, y, radius, false);\n octx.closePath();\n octx.stroke();\n }\n\n function drawBarHighlight(series, point) {\n var highlightColor = (typeof series.highlightColor === \"string\") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString(),\n fillStyle = highlightColor,\n barLeft = series.bars.align == \"left\" ? 0 : -series.bars.barWidth/2;\n\n octx.lineWidth = series.bars.lineWidth;\n octx.strokeStyle = highlightColor;\n\n drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth,\n 0, function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth);\n }\n\n function getColorOrGradient(spec, bottom, top, defaultColor) {\n if (typeof spec == \"string\")\n return spec;\n else {\n // assume this is a gradient spec; IE currently only\n // supports a simple vertical gradient properly, so that's\n // what we support too\n var gradient = ctx.createLinearGradient(0, top, 0, bottom);\n\n for (var i = 0, l = spec.colors.length; i < l; ++i) {\n var c = spec.colors[i];\n if (typeof c != \"string\") {\n var co = $.color.parse(defaultColor);\n if (c.brightness != null)\n co = co.scale('rgb', c.brightness);\n if (c.opacity != null)\n co.a *= c.opacity;\n c = co.toString();\n }\n gradient.addColorStop(i / (l - 1), c);\n }\n\n return gradient;\n }\n }\n }\n\n // Add the plot function to the top level of the jQuery object\n\n $.plot = function(placeholder, data, options) {\n //var t0 = new Date();\n var plot = new Plot($(placeholder), data, options, $.plot.plugins);\n //(window.console ? console.log : alert)(\"time used (msecs): \" + ((new Date()).getTime() - t0.getTime()));\n return plot;\n };\n\n $.plot.version = \"0.8-alpha\";\n\n $.plot.plugins = [];\n\n // Also add the plot function as a chainable property\n\n $.fn.plot = function(data, options) {\n return this.each(function() {\n $.plot(this, data, options);\n });\n }\n\n // round to nearby lower multiple of base\n function floorInBase(n, base) {\n return base * Math.floor(n / base);\n }\n\n})(jQuery);\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports) {\n\n/*\r\n * Flot plugin to order bars side by side.\r\n *\r\n * Released under the MIT license by Benjamin BUFFET, 20-Sep-2010.\r\n * Modifications made by Steven Hall <github.com/emmerich>, 01-May-2013.\r\n *\r\n * This plugin is an alpha version.\r\n *\r\n * To activate the plugin you must specify the parameter \"order\" for the specific serie :\r\n *\r\n * $.plot($(\"#placeholder\"), [{ data: [ ... ], bars :{ order = null or integer }])\r\n *\r\n * If 2 series have the same order param, they are ordered by the position in the array;\r\n *\r\n * The plugin adjust the point by adding a value depanding of the barwidth\r\n * Exemple for 3 series (barwidth : 0.1) :\r\n *\r\n * first bar décalage : -0.15\r\n * second bar décalage : -0.05\r\n * third bar décalage : 0.05\r\n *\r\n */\r\n\r\n// INFO: decalage/decallage is French for gap. It's used to denote the spacing applied to each\r\n// bar.\r\n(function($){\r\n function init(plot){\r\n var orderedBarSeries;\r\n var nbOfBarsToOrder;\r\n var borderWidth;\r\n var borderWidthInXabsWidth;\r\n var pixelInXWidthEquivalent = 1;\r\n var isHorizontal = false;\r\n\r\n // A mapping of order integers to decallage.\r\n var decallageByOrder = {};\r\n\r\n /*\r\n * This method add shift to x values\r\n */\r\n function reOrderBars(plot, serie, datapoints){\r\n var shiftedPoints = null;\r\n\r\n if(serieNeedToBeReordered(serie)){\r\n checkIfGraphIsHorizontal(serie);\r\n calculPixel2XWidthConvert(plot);\r\n retrieveBarSeries(plot);\r\n calculBorderAndBarWidth(serie);\r\n\r\n if(nbOfBarsToOrder >= 2){\r\n var position = findPosition(serie);\r\n var decallage = 0;\r\n\r\n var centerBarShift = calculCenterBarShift();\r\n\r\n // If we haven't already calculated the decallage for this order value, do it.\r\n if(typeof decallageByOrder[serie.bars.order] === 'undefined') {\r\n if (isBarAtLeftOfCenter(position)){\r\n decallageByOrder[serie.bars.order] = -1*(sumWidth(orderedBarSeries,position-1,Math.floor(nbOfBarsToOrder / 2)-1)) - centerBarShift;\r\n }else{\r\n decallageByOrder[serie.bars.order] = sumWidth(orderedBarSeries,Math.ceil(nbOfBarsToOrder / 2),position-2) + centerBarShift + borderWidthInXabsWidth*2;\r\n }\r\n }\r\n\r\n // Lookup the decallage based on the series' order value.\r\n decallage = decallageByOrder[serie.bars.order];\r\n\r\n shiftedPoints = shiftPoints(datapoints,serie,decallage);\r\n datapoints.points = shiftedPoints;\r\n }\r\n }\r\n return shiftedPoints;\r\n }\r\n\r\n function serieNeedToBeReordered(serie){\r\n return serie.bars != null\r\n && serie.bars.show\r\n && serie.bars.order != null;\r\n }\r\n\r\n function calculPixel2XWidthConvert(plot){\r\n var gridDimSize = isHorizontal ? plot.getPlaceholder().innerHeight() : plot.getPlaceholder().innerWidth();\r\n var minMaxValues = isHorizontal ? getAxeMinMaxValues(plot.getData(),1) : getAxeMinMaxValues(plot.getData(),0);\r\n var AxeSize = minMaxValues[1] - minMaxValues[0];\r\n pixelInXWidthEquivalent = AxeSize / gridDimSize;\r\n }\r\n\r\n function getAxeMinMaxValues(series,AxeIdx){\r\n var minMaxValues = new Array();\r\n for(var i = 0; i < series.length; i++){\r\n minMaxValues[0] = (series[i].data[0]) ? series[i].data[0][AxeIdx]: null;\r\n minMaxValues[1] = (series[i].data[series[i].data.length - 1]) ? series[i].data[series[i].data.length - 1][AxeIdx]: null;\r\n }\r\n return minMaxValues;\r\n }\r\n\r\n function retrieveBarSeries(plot){\r\n orderedBarSeries = findOthersBarsToReOrders(plot.getData());\r\n nbOfBarsToOrder = orderedBarSeries.length;\r\n }\r\n\r\n function findOthersBarsToReOrders(series){\r\n var retSeries = new Array();\r\n var orderValuesSeen = [];\r\n\r\n for(var i = 0; i < series.length; i++){\r\n if(series[i].bars.order != null && series[i].bars.show &&\r\n orderValuesSeen.indexOf(series[i].bars.order) < 0){\r\n\r\n orderValuesSeen.push(series[i].bars.order);\r\n retSeries.push(series[i]);\r\n }\r\n }\r\n return retSeries.sort(sortByOrder);\r\n }\r\n\r\n function sortByOrder(serie1,serie2){\r\n var x = serie1.bars.order;\r\n var y = serie2.bars.order;\r\n return ((x < y) ? -1 : ((x > y) ? 1 : 0));\r\n }\r\n\r\n function calculBorderAndBarWidth(serie){\r\n borderWidth = typeof serie.bars.lineWidth !== 'undefined' ? serie.bars.lineWidth : 2;\r\n borderWidthInXabsWidth = borderWidth * pixelInXWidthEquivalent;\r\n }\r\n\r\n function checkIfGraphIsHorizontal(serie){\r\n if(serie.bars.horizontal){\r\n isHorizontal = true;\r\n }\r\n }\r\n\r\n function findPosition(serie){\r\n var pos = 0\r\n for (var i = 0; i < orderedBarSeries.length; ++i) {\r\n if (serie == orderedBarSeries[i]){\r\n pos = i;\r\n break;\r\n }\r\n }\r\n\r\n return pos+1;\r\n }\r\n\r\n function calculCenterBarShift(){\r\n var width = 0;\r\n\r\n if(nbOfBarsToOrder%2 != 0)\r\n width = (orderedBarSeries[Math.ceil(nbOfBarsToOrder / 2)].bars.barWidth)/2;\r\n\r\n return width;\r\n }\r\n\r\n function isBarAtLeftOfCenter(position){\r\n return position <= Math.ceil(nbOfBarsToOrder / 2);\r\n }\r\n\r\n function sumWidth(series,start,end){\r\n var totalWidth = 0;\r\n\r\n for(var i = start; i <= end; i++){\r\n totalWidth += series[i].bars.barWidth+borderWidthInXabsWidth*2;\r\n }\r\n\r\n return totalWidth;\r\n }\r\n\r\n function shiftPoints(datapoints,serie,dx){\r\n var ps = datapoints.pointsize;\r\n var points = datapoints.points;\r\n var j = 0;\r\n for(var i = isHorizontal ? 1 : 0;i < points.length; i += ps){\r\n points[i] += dx;\r\n //Adding the new x value in the serie to be abble to display the right tooltip value,\r\n //using the index 3 to not overide the third index.\r\n serie.data[j][3] = points[i];\r\n j++;\r\n }\r\n\r\n return points;\r\n }\r\n\r\n plot.hooks.processDatapoints.push(reOrderBars);\r\n\r\n }\r\n\r\n var options = {\r\n series : {\r\n bars: {order: null} // or number/string\r\n }\r\n };\r\n\r\n $.plot.plugins.push({\r\n init: init,\r\n options: options,\r\n name: \"orderBars\",\r\n version: \"0.2\"\r\n });\r\n\r\n})(jQuery);\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n/* Pretty handling of time axes.\n\nCopyright (c) 2007-2012 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\nSet axis.mode to \"time\" to enable. See the section \"Time series data\" in\nAPI.txt for details.\n\n*/\n\n(function($) {\n\n\tvar options = {};\n\n\t// round to nearby lower multiple of base\n\n\tfunction floorInBase(n, base) {\n\t\treturn base * Math.floor(n / base);\n\t}\n\n\t// Returns a string with the date d formatted according to fmt.\n\t// A subset of the Open Group's strftime format is supported.\n\n\tfunction formatDate(d, fmt, monthNames, dayNames) {\n\n\t\tif (typeof d.strftime == \"function\") {\n\t\t\treturn d.strftime(fmt);\n\t\t}\n\n\t\tvar leftPad = function(n, pad) {\n\t\t\tn = \"\" + n;\n\t\t\tpad = \"\" + (pad == null ? \"0\" : pad);\n\t\t\treturn n.length == 1 ? pad + n : n;\n\t\t};\n\n\t\tvar r = [];\n\t\tvar escape = false;\n\t\tvar hours = d.getHours();\n\t\tvar isAM = hours < 12;\n\n\t\tif (monthNames == null) {\n\t\t\tmonthNames = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\t\t}\n\n\t\tif (dayNames == null) {\n\t\t\tdayNames = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\t\t}\n\n\t\tvar hours12;\n\n\t\tif (hours > 12) {\n\t\t\thours12 = hours - 12;\n\t\t} else if (hours == 0) {\n\t\t\thours12 = 12;\n\t\t} else {\n\t\t\thours12 = hours;\n\t\t}\n\n\t\tfor (var i = 0; i < fmt.length; ++i) {\n\n\t\t\tvar c = fmt.charAt(i);\n\n\t\t\tif (escape) {\n\t\t\t\tswitch (c) {\n\t\t\t\t\tcase 'a': c = \"\" + dayNames[d.getDay()]; break;\n\t\t\t\t\tcase 'b': c = \"\" + monthNames[d.getMonth()]; break;\n\t\t\t\t\tcase 'd': c = leftPad(d.getDate()); break;\n\t\t\t\t\tcase 'e': c = leftPad(d.getDate(), \" \"); break;\n\t\t\t\t\tcase 'H': c = leftPad(hours); break;\n\t\t\t\t\tcase 'I': c = leftPad(hours12); break;\n\t\t\t\t\tcase 'l': c = leftPad(hours12, \" \"); break;\n\t\t\t\t\tcase 'm': c = leftPad(d.getMonth() + 1); break;\n\t\t\t\t\tcase 'M': c = leftPad(d.getMinutes()); break;\n\t\t\t\t\t// quarters not in Open Group's strftime specification\n\t\t\t\t\tcase 'q':\n\t\t\t\t\t\tc = \"\" + (Math.floor(d.getMonth() / 3) + 1); break;\n\t\t\t\t\tcase 'S': c = leftPad(d.getSeconds()); break;\n\t\t\t\t\tcase 'y': c = leftPad(d.getFullYear() % 100); break;\n\t\t\t\t\tcase 'Y': c = \"\" + d.getFullYear(); break;\n\t\t\t\t\tcase 'p': c = (isAM) ? (\"\" + \"am\") : (\"\" + \"pm\"); break;\n\t\t\t\t\tcase 'P': c = (isAM) ? (\"\" + \"AM\") : (\"\" + \"PM\"); break;\n\t\t\t\t\tcase 'w': c = \"\" + d.getDay(); break;\n\t\t\t\t}\n\t\t\t\tr.push(c);\n\t\t\t\tescape = false;\n\t\t\t} else {\n\t\t\t\tif (c == \"%\") {\n\t\t\t\t\tescape = true;\n\t\t\t\t} else {\n\t\t\t\t\tr.push(c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn r.join(\"\");\n\t}\n\n\t// To have a consistent view of time-based data independent of which time\n\t// zone the client happens to be in we need a date-like object independent\n\t// of time zones. This is done through a wrapper that only calls the UTC\n\t// versions of the accessor methods.\n\n\tfunction makeUtcWrapper(d) {\n\n\t\tfunction addProxyMethod(sourceObj, sourceMethod, targetObj, targetMethod) {\n\t\t\tsourceObj[sourceMethod] = function() {\n\t\t\t\treturn targetObj[targetMethod].apply(targetObj, arguments);\n\t\t\t};\n\t\t};\n\n\t\tvar utc = {\n\t\t\tdate: d\n\t\t};\n\n\t\t// support strftime, if found\n\n\t\tif (d.strftime != undefined) {\n\t\t\taddProxyMethod(utc, \"strftime\", d, \"strftime\");\n\t\t}\n\n\t\taddProxyMethod(utc, \"getTime\", d, \"getTime\");\n\t\taddProxyMethod(utc, \"setTime\", d, \"setTime\");\n\n\t\tvar props = [\"Date\", \"Day\", \"FullYear\", \"Hours\", \"Milliseconds\", \"Minutes\", \"Month\", \"Seconds\"];\n\n\t\tfor (var p = 0; p < props.length; p++) {\n\t\t\taddProxyMethod(utc, \"get\" + props[p], d, \"getUTC\" + props[p]);\n\t\t\taddProxyMethod(utc, \"set\" + props[p], d, \"setUTC\" + props[p]);\n\t\t}\n\n\t\treturn utc;\n\t};\n\n\t// select time zone strategy. This returns a date-like object tied to the\n\t// desired timezone\n\n\tfunction dateGenerator(ts, opts) {\n\t\tif (opts.timezone == \"browser\") {\n\t\t\treturn new Date(ts);\n\t\t} else if (!opts.timezone || opts.timezone == \"utc\") {\n\t\t\treturn makeUtcWrapper(new Date(ts));\n\t\t} else if (typeof timezoneJS != \"undefined\" && typeof timezoneJS.Date != \"undefined\") {\n\t\t\tvar d = new timezoneJS.Date();\n\t\t\t// timezone-js is fickle, so be sure to set the time zone before\n\t\t\t// setting the time.\n\t\t\td.setTimezone(opts.timezone);\n\t\t\td.setTime(ts);\n\t\t\treturn d;\n\t\t} else {\n\t\t\treturn makeUtcWrapper(new Date(ts));\n\t\t}\n\t}\n\t\n\t// map of app. size of time units in milliseconds\n\n\tvar timeUnitSize = {\n\t\t\"second\": 1000,\n\t\t\"minute\": 60 * 1000,\n\t\t\"hour\": 60 * 60 * 1000,\n\t\t\"day\": 24 * 60 * 60 * 1000,\n\t\t\"month\": 30 * 24 * 60 * 60 * 1000,\n\t\t\"quarter\": 3 * 30 * 24 * 60 * 60 * 1000,\n\t\t\"year\": 365.2425 * 24 * 60 * 60 * 1000\n\t};\n\n\t// the allowed tick sizes, after 1 year we use\n\t// an integer algorithm\n\n\tvar baseSpec = [\n\t\t[1, \"second\"], [2, \"second\"], [5, \"second\"], [10, \"second\"],\n\t\t[30, \"second\"], \n\t\t[1, \"minute\"], [2, \"minute\"], [5, \"minute\"], [10, \"minute\"],\n\t\t[30, \"minute\"], \n\t\t[1, \"hour\"], [2, \"hour\"], [4, \"hour\"],\n\t\t[8, \"hour\"], [12, \"hour\"],\n\t\t[1, \"day\"], [2, \"day\"], [3, \"day\"],\n\t\t[0.25, \"month\"], [0.5, \"month\"], [1, \"month\"],\n\t\t[2, \"month\"]\n\t];\n\n\t// we don't know which variant(s) we'll need yet, but generating both is\n\t// cheap\n\n\tvar specMonths = baseSpec.concat([[3, \"month\"], [6, \"month\"],\n\t\t[1, \"year\"]]);\n\tvar specQuarters = baseSpec.concat([[1, \"quarter\"], [2, \"quarter\"],\n\t\t[1, \"year\"]]);\n\n\tfunction init(plot) {\n\t\tplot.hooks.processDatapoints.push(function (plot, series, datapoints) {\n\t\t\t$.each(plot.getAxes(), function(axisName, axis) {\n\n\t\t\t\tvar opts = axis.options;\n\n\t\t\t\tif (opts.mode == \"time\") {\n\t\t\t\t\taxis.tickGenerator = function(axis) {\n\n\t\t\t\t\t\tvar ticks = [];\n\t\t\t\t\t\tvar d = dateGenerator(axis.min, opts);\n\t\t\t\t\t\tvar minSize = 0;\n\n\t\t\t\t\t\t// make quarter use a possibility if quarters are\n\t\t\t\t\t\t// mentioned in either of these options\n\n\t\t\t\t\t\tvar spec = (opts.tickSize && opts.tickSize[1] ===\n\t\t\t\t\t\t\t\"quarter\") ||\n\t\t\t\t\t\t\t(opts.minTickSize && opts.minTickSize[1] ===\n\t\t\t\t\t\t\t\"quarter\") ? specQuarters : specMonths;\n\n\t\t\t\t\t\tif (opts.minTickSize != null) {\n\t\t\t\t\t\t\tif (typeof opts.tickSize == \"number\") {\n\t\t\t\t\t\t\t\tminSize = opts.tickSize;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tminSize = opts.minTickSize[0] * timeUnitSize[opts.minTickSize[1]];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (var i = 0; i < spec.length - 1; ++i) {\n\t\t\t\t\t\t\tif (axis.delta < (spec[i][0] * timeUnitSize[spec[i][1]]\n\t\t\t\t\t\t\t\t\t\t\t + spec[i + 1][0] * timeUnitSize[spec[i + 1][1]]) / 2\n\t\t\t\t\t\t\t\t&& spec[i][0] * timeUnitSize[spec[i][1]] >= minSize) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar size = spec[i][0];\n\t\t\t\t\t\tvar unit = spec[i][1];\n\n\t\t\t\t\t\t// special-case the possibility of several years\n\n\t\t\t\t\t\tif (unit == \"year\") {\n\n\t\t\t\t\t\t\t// if given a minTickSize in years, just use it,\n\t\t\t\t\t\t\t// ensuring that it's an integer\n\n\t\t\t\t\t\t\tif (opts.minTickSize != null && opts.minTickSize[1] == \"year\") {\n\t\t\t\t\t\t\t\tsize = Math.floor(opts.minTickSize[0]);\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tvar magn = Math.pow(10, Math.floor(Math.log(axis.delta / timeUnitSize.year) / Math.LN10));\n\t\t\t\t\t\t\t\tvar norm = (axis.delta / timeUnitSize.year) / magn;\n\n\t\t\t\t\t\t\t\tif (norm < 1.5) {\n\t\t\t\t\t\t\t\t\tsize = 1;\n\t\t\t\t\t\t\t\t} else if (norm < 3) {\n\t\t\t\t\t\t\t\t\tsize = 2;\n\t\t\t\t\t\t\t\t} else if (norm < 7.5) {\n\t\t\t\t\t\t\t\t\tsize = 5;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsize = 10;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tsize *= magn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// minimum size for years is 1\n\n\t\t\t\t\t\t\tif (size < 1) {\n\t\t\t\t\t\t\t\tsize = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\taxis.tickSize = opts.tickSize || [size, unit];\n\t\t\t\t\t\tvar tickSize = axis.tickSize[0];\n\t\t\t\t\t\tunit = axis.tickSize[1];\n\n\t\t\t\t\t\tvar step = tickSize * timeUnitSize[unit];\n\n\t\t\t\t\t\tif (unit == \"second\") {\n\t\t\t\t\t\t\td.setSeconds(floorInBase(d.getSeconds(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"minute\") {\n\t\t\t\t\t\t\td.setMinutes(floorInBase(d.getMinutes(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"hour\") {\n\t\t\t\t\t\t\td.setHours(floorInBase(d.getHours(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"month\") {\n\t\t\t\t\t\t\td.setMonth(floorInBase(d.getMonth(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"quarter\") {\n\t\t\t\t\t\t\td.setMonth(3 * floorInBase(d.getMonth() / 3,\n\t\t\t\t\t\t\t\ttickSize));\n\t\t\t\t\t\t} else if (unit == \"year\") {\n\t\t\t\t\t\t\td.setFullYear(floorInBase(d.getFullYear(), tickSize));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// reset smaller components\n\n\t\t\t\t\t\td.setMilliseconds(0);\n\n\t\t\t\t\t\tif (step >= timeUnitSize.minute) {\n\t\t\t\t\t\t\td.setSeconds(0);\n\t\t\t\t\t\t} else if (step >= timeUnitSize.hour) {\n\t\t\t\t\t\t\td.setMinutes(0);\n\t\t\t\t\t\t} else if (step >= timeUnitSize.day) {\n\t\t\t\t\t\t\td.setHours(0);\n\t\t\t\t\t\t} else if (step >= timeUnitSize.day * 4) {\n\t\t\t\t\t\t\td.setDate(1);\n\t\t\t\t\t\t} else if (step >= timeUnitSize.month * 2) {\n\t\t\t\t\t\t\td.setMonth(floorInBase(d.getMonth(), 3));\n\t\t\t\t\t\t} else if (step >= timeUnitSize.quarter * 2) {\n\t\t\t\t\t\t\td.setMonth(floorInBase(d.getMonth(), 6));\n\t\t\t\t\t\t} else if (step >= timeUnitSize.year) {\n\t\t\t\t\t\t\td.setMonth(0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar carry = 0;\n\t\t\t\t\t\tvar v = Number.NaN;\n\t\t\t\t\t\tvar prev;\n\n\t\t\t\t\t\tdo {\n\n\t\t\t\t\t\t\tprev = v;\n\t\t\t\t\t\t\tv = d.getTime();\n\t\t\t\t\t\t\tticks.push(v);\n\n\t\t\t\t\t\t\tif (unit == \"month\" || unit == \"quarter\") {\n\t\t\t\t\t\t\t\tif (tickSize < 1) {\n\n\t\t\t\t\t\t\t\t\t// a bit complicated - we'll divide the\n\t\t\t\t\t\t\t\t\t// month/quarter up but we need to take\n\t\t\t\t\t\t\t\t\t// care of fractions so we don't end up in\n\t\t\t\t\t\t\t\t\t// the middle of a day\n\n\t\t\t\t\t\t\t\t\td.setDate(1);\n\t\t\t\t\t\t\t\t\tvar start = d.getTime();\n\t\t\t\t\t\t\t\t\td.setMonth(d.getMonth() +\n\t\t\t\t\t\t\t\t\t\t(unit == \"quarter\" ? 3 : 1));\n\t\t\t\t\t\t\t\t\tvar end = d.getTime();\n\t\t\t\t\t\t\t\t\td.setTime(v + carry * timeUnitSize.hour + (end - start) * tickSize);\n\t\t\t\t\t\t\t\t\tcarry = d.getHours();\n\t\t\t\t\t\t\t\t\td.setHours(0);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\td.setMonth(d.getMonth() +\n\t\t\t\t\t\t\t\t\t\ttickSize * (unit == \"quarter\" ? 3 : 1));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (unit == \"year\") {\n\t\t\t\t\t\t\t\td.setFullYear(d.getFullYear() + tickSize);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\td.setTime(v + step);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (v < axis.max && v != prev);\n\n\t\t\t\t\t\treturn ticks;\n\t\t\t\t\t};\n\n\t\t\t\t\taxis.tickFormatter = function (v, axis) {\n\n\t\t\t\t\t\tvar d = dateGenerator(v, axis.options);\n\n\t\t\t\t\t\t// first check global format\n\n\t\t\t\t\t\tif (opts.timeformat != null) {\n\t\t\t\t\t\t\treturn formatDate(d, opts.timeformat, opts.monthNames, opts.dayNames);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// possibly use quarters if quarters are mentioned in\n\t\t\t\t\t\t// any of these places\n\n\t\t\t\t\t\tvar useQuarters = (axis.options.tickSize &&\n\t\t\t\t\t\t\t\taxis.options.tickSize[1] == \"quarter\") ||\n\t\t\t\t\t\t\t(axis.options.minTickSize &&\n\t\t\t\t\t\t\t\taxis.options.minTickSize[1] == \"quarter\");\n\n\t\t\t\t\t\tvar t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]];\n\t\t\t\t\t\tvar span = axis.max - axis.min;\n\t\t\t\t\t\tvar suffix = (opts.twelveHourClock) ? \" %p\" : \"\";\n\t\t\t\t\t\tvar hourCode = (opts.twelveHourClock) ? \"%I\" : \"%H\";\n\t\t\t\t\t\tvar fmt;\n\n\t\t\t\t\t\tif (t < timeUnitSize.minute) {\n\t\t\t\t\t\t\tfmt = hourCode + \":%M:%S\" + suffix;\n\t\t\t\t\t\t} else if (t < timeUnitSize.day) {\n\t\t\t\t\t\t\tif (span < 2 * timeUnitSize.day) {\n\t\t\t\t\t\t\t\tfmt = hourCode + \":%M\" + suffix;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfmt = \"%b %d \" + hourCode + \":%M\" + suffix;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (t < timeUnitSize.month) {\n\t\t\t\t\t\t\tfmt = \"%b %d\";\n\t\t\t\t\t\t} else if ((useQuarters && t < timeUnitSize.quarter) ||\n\t\t\t\t\t\t\t(!useQuarters && t < timeUnitSize.year)) {\n\t\t\t\t\t\t\tif (span < timeUnitSize.year) {\n\t\t\t\t\t\t\t\tfmt = \"%b\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfmt = \"%b %Y\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (useQuarters && t < timeUnitSize.year) {\n\t\t\t\t\t\t\tif (span < timeUnitSize.year) {\n\t\t\t\t\t\t\t\tfmt = \"Q%q\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfmt = \"Q%q %Y\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfmt = \"%Y\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar rt = formatDate(d, fmt, opts.monthNames, opts.dayNames);\n\n\t\t\t\t\t\treturn rt;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t$.plot.plugins.push({\n\t\tinit: init,\n\t\toptions: options,\n\t\tname: 'time',\n\t\tversion: '1.0'\n\t});\n\n\t// Time-axis support used to be in Flot core, which exposed the\n\t// formatDate function on the plot object. Various plugins depend\n\t// on the function, so we need to re-expose it here.\n\n\t$.plot.formatDate = formatDate;\n\n})(jQuery);\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports) {\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n * Note: This script is under development. We are using this inside core only and can be update in future.\n */\n(function ($) {\n\t'use strict';\n\n\t$.extend({\n\t\tgiveAjaxifyFields: function giveAjaxifyFields(customSettings) {\n\t\t\tvar $countryField,\n\t\t\t $parentWrapper,\n\t\t\t defaultSettings = {\n\n\t\t\t\t// Supported types: country_state.\n\t\t\t\ttype: '',\n\n\t\t\t\t// Define these setting only if type set to country_state.\n\t\t\t\tparentWrapper: 'form',\n\t\t\t\tcountryFieldName: 'country',\n\t\t\t\tstateFieldName: 'state',\n\t\t\t\tstateFieldWrapper: '.give-field-wrap',\n\t\t\t\tchosenState: true\n\t\t\t};\n\n\t\t\tvar settings = $.extend({}, defaultSettings, customSettings || {});\n\n\t\t\tswitch (settings.type) {\n\t\t\t\tcase 'country_state':\n\t\t\t\t\t$countryField = $('select[name=\"' + settings.countryFieldName + '\"]');\n\t\t\t\t\t$parentWrapper = $countryField.closest(settings.parentWrapper);\n\n\t\t\t\t\t// Bailout.\n\t\t\t\t\tif (!$countryField.length || 'Country_state' === $countryField.data('give-ajaxify-field')) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set data attribute.\n\t\t\t\t\t$countryField.data('give-ajaxify-field', 'country_state');\n\n\t\t\t\t\t// Update base state field based on selected base country\n\t\t\t\t\t$countryField.change(function () {\n\t\t\t\t\t\tvar $this = $(this),\n\t\t\t\t\t\t $stateField = $this.closest(settings.parentWrapper).find('[name=\"' + settings.stateFieldName + '\"]'),\n\t\t\t\t\t\t $stateFieldWrapper = $stateField.closest(settings.stateFieldWrapper),\n\t\t\t\t\t\t $stateFieldLabel = $('label', $stateFieldWrapper);\n\n\t\t\t\t\t\t// If state does not has wrapper then find it's label\n\t\t\t\t\t\tif (!settings.stateFieldWrapper) {\n\t\t\t\t\t\t\t$stateFieldLabel = $('label[for=\"' + settings.stateFieldName + '\"]', $parentWrapper);\n\t\t\t\t\t\t\t$stateFieldWrapper = $stateField.parent();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\taction: 'give_get_states',\n\t\t\t\t\t\t\tcountry: $this.val(),\n\t\t\t\t\t\t\tfield_name: settings.stateFieldName\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t$.post(ajaxurl, data, function (response) {\n\n\t\t\t\t\t\t\t// Bailout.\n\t\t\t\t\t\t\tif (!response.show_field) {\n\t\t\t\t\t\t\t\tif (settings.stateFieldWrapper) {\n\t\t\t\t\t\t\t\t\t$stateFieldWrapper.addClass('give-hidden');\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$stateField.addClass('give-hidden');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ($stateFieldLabel.length) {\n\t\t\t\t\t\t\t\t$stateFieldLabel.text(response.states_label);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (settings.chosenState) {\n\t\t\t\t\t\t\t\t$stateField.chosen('destroy');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Show field.\n\t\t\t\t\t\t\tif (settings.stateFieldWrapper) {\n\t\t\t\t\t\t\t\t$stateFieldWrapper.removeClass('give-hidden');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$stateField.removeClass('give-hidden');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (_typeof(response.states_found) !== undefined && true === response.states_found) {\n\t\t\t\t\t\t\t\t// Update html.\n\t\t\t\t\t\t\t\t$stateField.replaceWith(response.data);\n\n\t\t\t\t\t\t\t\t// Update selector.\n\t\t\t\t\t\t\t\t$stateField = $('[name=\"' + settings.stateFieldName + '\"]', $stateFieldWrapper);\n\n\t\t\t\t\t\t\t\t// Reset chosenState\n\t\t\t\t\t\t\t\tif (settings.chosenState) {\n\t\t\t\t\t\t\t\t\t$stateField.chosen();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$stateField.replaceWith('<input type=\"text\" name=\"' + settings.stateFieldName + '\" value=\"' + response.default_state + '\" class=\"medium-text\"/>');\n\n\t\t\t\t\t\t\t\t// Update selector.\n\t\t\t\t\t\t\t\t$stateField = $('[name=\"' + settings.stateFieldName + '\"]', $stateFieldWrapper);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n})(jQuery);\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\nvar Give_Selector_Cache = {\n\tcollection: {},\n\n\tget: function get(selector, parent, refresh_cache) {\n\t\t// Bailout.\n\t\tif (!jQuery) {\n\t\t\treturn -1;\n\t\t}\n\n\t\t// Set default parent.\n\t\tparent = undefined !== parent ? parent : undefined;\n\t\trefresh_cache = refresh_cache === true;\n\n\t\tif (undefined === this.collection[selector] || refresh_cache) {\n\t\t\tif (undefined !== parent) {\n\t\t\t\tthis.collection[selector] = jQuery(selector, parent);\n\t\t\t} else {\n\t\t\t\tthis.collection[selector] = jQuery(selector);\n\t\t\t}\n\t\t}\n\n\t\treturn this.collection[selector];\n\t}\n};\n\nwindow.Give_Selector_Cache = Give_Selector_Cache;\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\n/*\n * jQuery Repeatable Fields v1.4.8\n * http://www.rhyzz.com/repeatable-fields.html\n *\n * Copyright (c) 2014-2015 Rhyzz\n * License MIT\n */\n\n(function ($) {\n\t$.fn.repeatable_fields = function (custom_settings) {\n\t\tvar default_settings = {\n\t\t\twrapper: '.wrapper',\n\t\t\tcontainer: '.container',\n\t\t\trow: '.row',\n\t\t\tadd: '.add',\n\t\t\tremove: '.remove',\n\t\t\tconfirm_before_remove_row: false,\n\t\t\tconfirm_before_remove_row_text: '',\n\t\t\tmove: '.move',\n\t\t\ttemplate: '.template',\n\t\t\tis_sortable: true,\n\t\t\tbefore_add: null,\n\t\t\tafter_add: after_add,\n\t\t\tbefore_remove: null,\n\t\t\tafter_remove: null,\n\t\t\tsortable_options: null,\n\t\t\trow_count_placeholder: '{{row-count-placeholder}}'\n\t\t};\n\n\t\tvar settings = $.extend({}, default_settings, custom_settings);\n\n\t\t// Initialize all repeatable field wrappers\n\t\tinitialize(this);\n\n\t\tfunction initialize(parent) {\n\t\t\t$(settings.wrapper, parent).each(function (index, element) {\n\t\t\t\tvar wrapper = this;\n\n\t\t\t\tvar container = $(wrapper).children(settings.container);\n\n\t\t\t\t// Disable all form elements inside the row template\n\t\t\t\t$(container).children(settings.template).hide().find(':input').each(function () {\n\t\t\t\t\t$(this).prop('disabled', true);\n\t\t\t\t});\n\n\t\t\t\tvar row_count = $(container).children(settings.row).filter(function () {\n\t\t\t\t\treturn !$(this).hasClass(settings.template.replace('.', ''));\n\t\t\t\t}).length;\n\n\t\t\t\t$(container).attr('data-rf-row-count', row_count);\n\n\t\t\t\t$(wrapper).on('click', settings.add, function (event) {\n\t\t\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t\t\tvar row_template = $($(container).children(settings.template).clone().removeClass(settings.template.replace('.', ''))[0].outerHTML);\n\n\t\t\t\t\t// Enable all form elements inside the row template\n\t\t\t\t\t$(row_template).find(':input').each(function () {\n\t\t\t\t\t\t$(this).prop('disabled', false);\n\t\t\t\t\t});\n\n\t\t\t\t\tif (typeof settings.before_add === 'function') {\n\t\t\t\t\t\tsettings.before_add(container);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar new_row = $(row_template).show().appendTo(container);\n\n\t\t\t\t\tif (typeof settings.after_add === 'function') {\n\t\t\t\t\t\tsettings.after_add(container, new_row, after_add);\n\t\t\t\t\t}\n\n\t\t\t\t\t// The new row might have it's own repeatable field wrappers so initialize them too\n\t\t\t\t\tinitialize(new_row);\n\t\t\t\t});\n\n\t\t\t\t$(wrapper).on('click', settings.remove, function (event) {\n\t\t\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t\t\tif (settings.confirm_before_remove_row && settings.confirm_before_remove_row_text) {\n\t\t\t\t\t\tif (!confirm(settings.confirm_before_remove_row_text)) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tvar row = $(this).parents(settings.row).first();\n\n\t\t\t\t\tif (typeof settings.before_remove === 'function') {\n\t\t\t\t\t\tsettings.before_remove(container, row);\n\t\t\t\t\t}\n\n\t\t\t\t\trow.remove();\n\n\t\t\t\t\tif (typeof settings.after_remove === 'function') {\n\t\t\t\t\t\tsettings.after_remove(container);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (settings.is_sortable === true && typeof $.ui !== 'undefined' && typeof $.ui.sortable !== 'undefined') {\n\t\t\t\t\tvar sortable_options = settings.sortable_options !== null ? settings.sortable_options : {};\n\n\t\t\t\t\tsortable_options.handle = settings.move;\n\n\t\t\t\t\t$(wrapper).find(settings.container).sortable(sortable_options);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tfunction after_add(container, new_row) {\n\t\t\tvar row_count = $(container).attr('data-rf-row-count');\n\n\t\t\trow_count++;\n\n\t\t\t$('*', new_row).each(function () {\n\t\t\t\t$.each(this.attributes, function (index, element) {\n\t\t\t\t\tthis.value = this.value.replace(settings.row_count_placeholder, row_count - 1);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t$(container).attr('data-rf-row-count', row_count);\n\t\t}\n\t};\n})(jQuery);\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports) {\n\n/*!\n * Give Admin Forms JS\n *\n * @description: The Give Admin Forms scripts. Only enqueued on the give_forms CPT; used to validate fields, show/hide, and other functions\n * @package: Give\n * @subpackage: Assets/JS\n * @copyright: Copyright (c) 2016, WordImpress\n * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\n\njQuery.noConflict();\n(function ($) {\n\t/**\n * Default Radio Button\n *\n * @description: Allow only one radio button to be checked at a time\n * @since: 1.0\n */\n\tvar handle_default_radio = function handle_default_radio() {\n\t\t$('body').on('change', '.give-give_default_radio_inline', function () {\n\t\t\t// Unset pre selected default level.\n\t\t\t$('.give-give_default_radio_inline').prop('checked', false);\n\n\t\t\t// Set level as default.\n\t\t\t$(this).prop('checked', true);\n\t\t});\n\n\t\t// Note: some cases is covered in admin-scripts.js.\n\t\t// For ref: handle_metabox_repeater_field_row_count, handle_metabox_repeater_field_row_remove\n\t};\n\n\t/**\n * Toggle Conditional Form Fields\n *\n * @since: 1.0\n */\n\tvar toggle_conditional_form_fields = function toggle_conditional_form_fields() {\n\n\t\t//Price Option\n\t\tvar price_option = $('._give_price_option_field input:radio');\n\n\t\tprice_option.on('change', function () {\n\n\t\t\tvar price_option_val = $('._give_price_option_field input:radio:checked').val();\n\t\t\tif (price_option_val === 'set') {\n\t\t\t\t//set price shows\n\t\t\t\t$('._give_set_price_field').show();\n\t\t\t\t$('#_give_donation_levels_field').hide(); // Hide multi-val stuffs.\n\t\t\t\t$('._give_display_style_field').hide(); // Hide display style setting.\n\t\t\t} else {\n\t\t\t\t//multi-value shows\n\t\t\t\t$('._give_set_price_field').hide();\n\t\t\t\t$('#_give_donation_levels_field').show(); // Show set stuffs.\n\t\t\t\t$('._give_display_style_field').show(); // Show display style setting.\n\t\t\t}\n\t\t}).change();\n\n\t\t//Content Option\n\t\tvar display_content = $('._give_display_content_field input:radio');\n\t\tdisplay_content.on('change', function () {\n\t\t\t// Get checked radio button value.\n\t\t\tvar display_content_val = $('._give_display_content_field input:radio:checked').val();\n\n\t\t\tif (display_content_val === 'enabled') {\n\t\t\t\t$('._give_content_placement_field').show();\n\t\t\t\t$('._give_form_content_field').show();\n\t\t\t} else {\n\t\t\t\t$('._give_content_placement_field').hide();\n\t\t\t\t$('._give_form_content_field').hide();\n\t\t\t}\n\t\t}).change();\n\n\t\t//Terms Option\n\t\tvar terms_option = $('._give_terms_option_field input:radio');\n\t\tterms_option.on('change', function () {\n\t\t\t// Get checked radio button value.\n\t\t\tvar terms_option_val = $('._give_terms_option_field input:radio:checked').val();\n\n\t\t\tif (terms_option_val === 'enabled') {\n\t\t\t\t$('._give_agree_label_field').show();\n\t\t\t\t$('._give_agree_text_field').show();\n\t\t\t} else {\n\t\t\t\t$('._give_agree_label_field').hide();\n\t\t\t\t$('._give_agree_text_field').hide();\n\t\t\t}\n\t\t}).change();\n\n\t\t//Payment Display\n\t\tvar payment_display_option = $('._give_payment_display_field input:radio');\n\t\tpayment_display_option.on('change', function () {\n\t\t\tvar payment_display_option_val = $('._give_payment_display_field input:radio:checked').val();\n\n\t\t\tif (payment_display_option_val === 'onpage') {\n\t\t\t\t$('._give_reveal_label_field').hide();\n\t\t\t} else {\n\t\t\t\t$('._give_reveal_label_field').show();\n\t\t\t}\n\t\t}).change();\n\n\t\t//Custom Amount\n\t\tvar custom_amount_option = $('._give_custom_amount_field input:radio');\n\t\tcustom_amount_option.on('change', function () {\n\t\t\tvar custom_amount_option_val = $('._give_custom_amount_field input:radio:checked').val();\n\t\t\tif (custom_amount_option_val === 'disabled') {\n\t\t\t\t$('._give_custom_amount_range_field ').hide();\n\t\t\t\t$('._give_custom_amount_text_field').hide();\n\t\t\t} else {\n\t\t\t\t$('._give_custom_amount_range_field ').show();\n\t\t\t\t$('._give_custom_amount_text_field').show();\n\t\t\t}\n\t\t}).change();\n\n\t\t//Goals\n\t\tvar goal_option = $('._give_goal_option_field');\n\t\tvar goal_format = $('._give_goal_format_field input:radio');\n\t\t//Close Form when Goal Achieved\n\t\tvar close_form_when_goal_achieved_option = $('._give_close_form_when_goal_achieved_field input:radio');\n\n\t\tclose_form_when_goal_achieved_option.on('change', function () {\n\t\t\tvar close_form_when_goal_achieved_option_val = $('._give_close_form_when_goal_achieved_field input:radio:checked').val();\n\t\t\tif (close_form_when_goal_achieved_option_val === 'disabled') {\n\t\t\t\t$('._give_form_goal_achieved_message_field').hide();\n\t\t\t} else {\n\t\t\t\t$('._give_form_goal_achieved_message_field').show();\n\t\t\t}\n\t\t}).change();\n\n\t\tgoal_option.on('change', function () {\n\t\t\tvar goal_option = $('._give_goal_option_field input:radio:checked').val();\n\t\t\tif (goal_option === 'disabled') {\n\n\t\t\t\t$('._give_set_goal_field').hide();\n\t\t\t\t$('._give_goal_format_field').hide();\n\t\t\t\t$('._give_goal_color_field').hide();\n\t\t\t\t$('._give_close_form_when_goal_achieved_field').hide();\n\t\t\t\t$('._give_form_goal_achieved_message_field').hide();\n\t\t\t\t$('._give_number_of_donation_goal_field').hide();\n\t\t\t\t$('._give_number_of_donor_goal_field').hide();\n\t\t\t} else {\n\t\t\t\t$('._give_set_goal_field').show();\n\t\t\t\t$('._give_goal_format_field').show();\n\t\t\t\t$('._give_goal_color_field').show();\n\t\t\t\t$('._give_close_form_when_goal_achieved_field').show();\n\n\t\t\t\tvar close_form_when_goal_achieved_option_val = $('._give_close_form_when_goal_achieved_field input:radio:checked').val();\n\n\t\t\t\tif (close_form_when_goal_achieved_option_val === 'enabled') {\n\t\t\t\t\t$('._give_form_goal_achieved_message_field').show();\n\t\t\t\t}\n\n\t\t\t\t// Trigger goal format option.\n\t\t\t\tgoal_format.change();\n\t\t\t}\n\t\t}).change();\n\n\t\tgoal_format.on('change', function () {\n\t\t\tvar goal_format_val = $('._give_goal_format_field input:radio:checked').val();\n\t\t\tvar goal_option_val = $('._give_goal_option_field input:radio:checked').val();\n\n\t\t\tif ('donation' === goal_format_val) {\n\t\t\t\t$('._give_set_goal_field, ._give_number_of_donor_goal_field,._give_number_of_donation_goal_field').hide();\n\t\t\t\tif ('disabled' !== goal_option_val) {\n\t\t\t\t\t$('._give_number_of_donation_goal_field').show();\n\t\t\t\t}\n\t\t\t} else if ('donors' === goal_format_val) {\n\t\t\t\t$('._give_set_goal_field, ._give_number_of_donation_goal_field, ._give_number_of_donor_goal_field').hide();\n\t\t\t\tif ('disabled' !== goal_option_val) {\n\t\t\t\t\t$('._give_number_of_donor_goal_field').show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t'disabled' === goal_option_val ? $('._give_set_goal_field').hide() : $('._give_set_goal_field').show();\n\t\t\t\t$('._give_number_of_donation_goal_field, ._give_number_of_donor_goal_field').hide();\n\t\t\t}\n\t\t}).change();\n\n\t\t// Offline Donations.\n\t\tvar offline_customization_option = $('._give_customize_offline_donations_field input:radio');\n\t\toffline_customization_option.on('change', function () {\n\t\t\tvar offline_customization_option_val = $('._give_customize_offline_donations_field input:radio:checked').val();\n\t\t\tif ('enabled' === offline_customization_option_val) {\n\t\t\t\t$('._give_offline_checkout_notes_field').show();\n\t\t\t\t$('._give_offline_donation_enable_billing_fields_single_field').show();\n\t\t\t\t$('._give_offline_donation_subject_field').show();\n\t\t\t\t$('._give_offline_donation_email_field').show();\n\t\t\t} else {\n\t\t\t\t$('._give_offline_checkout_notes_field').hide();\n\t\t\t\t$('._give_offline_donation_enable_billing_fields_single_field').hide();\n\t\t\t\t$('._give_offline_donation_subject_field').hide();\n\t\t\t\t$('._give_offline_donation_email_field').hide();\n\t\t\t}\n\t\t}).change();\n\n\t\t//Email options.\n\t\tvar email_options = $('._give_email_options_field input:radio');\n\t\temail_options.on('change', function () {\n\t\t\t// Get checked radio button value.\n\t\t\tvar email_options_val = $('._give_email_options_field input:radio:checked').val();\n\n\t\t\tif (email_options_val === 'enabled') {\n\t\t\t\t$('#email_notification_options .give-field-wrap:not(._give_email_options_field)').show();\n\t\t\t} else {\n\t\t\t\t$('#email_notification_options .give-field-wrap:not(._give_email_options_field)').hide();\n\t\t\t}\n\t\t}).change();\n\t};\n\n\t//Handle Repeatable Row ID\n\tvar handle_repeatable_row_ID = function handle_repeatable_row_ID() {\n\n\t\t//Ensure for new posts that the repeater is filled\n\t\tif ($('.give-level-id').text() === '') {\n\t\t\tvar row_group = $('.cmb-repeatable-grouping');\n\t\t\t//loop through all repeatable rows and set vals\n\t\t\trow_group.each(function (index, object) {\n\n\t\t\t\tvar row_id = $(object).data('iterator') + 1;\n\n\t\t\t\t$(object).find('.give-level-id').text(row_id);\n\t\t\t\t$(object).find('.give-level-id-input').val(row_id);\n\t\t\t});\n\t\t}\n\n\t\t$('body').on('cmb2_add_row', function (event, row) {\n\t\t\tset_row_ids(row);\n\t\t});\n\t\t$('body').on('cmb2_shift_rows_complete', function (event, self) {\n\n\t\t\tvar row_group = $('.cmb-repeatable-grouping');\n\t\t\t//loop through all repeatable rows and set vals\n\t\t\trow_group.each(function (index, object) {\n\n\t\t\t\tvar row_id = $(object).find('input.give-level-id-input').val();\n\n\t\t\t\t$(object).find('.give-level-id').text(row_id);\n\t\t\t});\n\t\t});\n\n\t\t/**\n * Set Row IDs\n *\n * @description: Sets values in the Multi-level donation repeatable field\n * @param row\n */\n\t\tfunction set_row_ids(row) {\n\n\t\t\tvar row_count = count_repeatable_rows();\n\n\t\t\t//Add row ID value to hidden field\n\t\t\t$(row).find('input.give-level-id-input').val(row_count);\n\t\t\t//Add row ID to displayed ID\n\t\t\t$(row).find('.give-level-id').text(row_count);\n\t\t}\n\n\t\t/**\n * Loops through Multi-level repeater rows\n *\n * @description: First counts the rows then it compares the row count with the largest iterator count.\n *\n * @returns {number}\n */\n\t\tfunction count_repeatable_rows() {\n\t\t\tvar row_counter = 0;\n\t\t\tvar row_largest_number = 0;\n\t\t\tvar row_number = 0;\n\n\t\t\t//Loop through repeatable rows to see what highest ID is currently\n\t\t\t$('#_give_donation_levels_repeat > .cmb-repeatable-grouping').each(function (index, value) {\n\n\t\t\t\trow_number = $(this).find('input.give-level-id-input').val();\n\n\t\t\t\tif (row_number > row_largest_number) {\n\t\t\t\t\trow_largest_number = row_number;\n\t\t\t\t}\n\n\t\t\t\trow_counter++;\n\t\t\t});\n\n\t\t\tif (typeof row_largest_number !== 'undefined' && row_largest_number >= row_counter) {\n\t\t\t\treturn parseInt(row_largest_number) + 1; //ensure no duplicate rows returned\n\t\t\t} else {\n\t\t\t\treturn row_counter;\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n * Misc Cleanup\n *\n * @description: Clean up and tweaks\n * @since: 1.0\n */\n\tfunction misc_cleanup() {\n\n\t\t//No Value = Placeholders: determine if value is 0.00 and remove if so in favor of placeholders\n\t\t$('.cmb2-text-money').each(function (index, object) {\n\t\t\tvar this_val = parseInt($(object).val());\n\t\t\tif (!this_val) {\n\t\t\t\t$(object).removeAttr('value');\n\t\t\t}\n\t\t});\n\t}\n\n\t//On DOM Ready\n\t$(function () {\n\n\t\thandle_default_radio();\n\t\ttoggle_conditional_form_fields();\n\t\thandle_repeatable_row_ID();\n\t\tmisc_cleanup();\n\t});\n})(jQuery);\n\n/***/ }),\n/* 28 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__plugins_modal__ = __webpack_require__(6);\n/*!\n * Give Admin Forms JS\n *\n * @description: The Give Admin Settings scripts. Only enqueued on the give-settings page; used for tabs and other show/hide functionality\n * @package: Give\n * @since: 1.5\n * @subpackage: Assets/JS\n * @copyright: Copyright (c) 2016, WordImpress\n * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\n\n\njQuery.noConflict();\njQuery(document).ready(function ($) {\n\n\t/**\n * Sortable payment gateways.\n */\n\tvar $payment_gateways = jQuery('ul.give-payment-gatways-list');\n\tif ($payment_gateways.length) {\n\t\t$payment_gateways.sortable();\n\t}\n\n\t/**\n * Change currency position symbol on changing the currency\n */\n\tvar give_settings_currency = '#give-mainform #currency';\n\tvar give_settings_position = '#give-mainform #currency_position';\n\t$('body').on('change', give_settings_currency, function () {\n\t\tvar currency_text = $(give_settings_currency + ' option:selected').text(),\n\t\t currency_sign = currency_text.split('(').pop().split(')').shift();\n\n\t\tif ('' === currency_sign) {\n\t\t\tcurrency_sign = give_vars.currency_sign;\n\t\t}\n\n\t\tvar before_text = $(give_settings_position).data('before-template');\n\t\tbefore_text = before_text.replace('{currency_pos}', currency_sign);\n\t\t$(give_settings_position + ' option[value=\"before\"]').text(before_text);\n\n\t\tvar after_text = $(give_settings_position).data('after-template');\n\t\tafter_text = after_text.replace('{currency_pos}', currency_sign);\n\t\t$(give_settings_position + ' option[value=\"after\"]').text(after_text);\n\t});\n\n\t/**\n * Repeater setting field event.\n */\n\t$('a.give-repeat-setting-field').on('click', function (e) {\n\t\te.preventDefault();\n\t\tvar $parent = $(this).parents('td'),\n\t\t $first_setting_field_group = $('p:first-child', $parent),\n\t\t $new_setting_field_group = $first_setting_field_group.clone(),\n\t\t setting_field_count = $('p', $parent).not('.give-field-description').length,\n\t\t fieldID = $(this).data('id') + '_' + ++setting_field_count,\n\t\t $prev_field = $(this).prev();\n\n\t\t// Create new field only if previous is non empty.\n\t\tif ($('input', $prev_field).val()) {\n\t\t\t// Add setting field html to dom.\n\t\t\t$(this).before($new_setting_field_group);\n\t\t\t$prev_field = $(this).prev();\n\n\t\t\t// Set id and value for setting field.\n\t\t\t$('input', $prev_field).attr('id', fieldID);\n\t\t\t$('input', $prev_field).val('');\n\t\t}\n\n\t\treturn false;\n\t});\n\n\t$('.give-settings-page').on('click', 'span.give-remove-setting-field', function (e) {\n\t\t$(this).parents('p').remove();\n\t});\n\n\t/**\n * Enabled & disable email notification event.\n */\n\t$('.give-email-notification-status', 'table.giveemailnotifications').on('click', function () {\n\t\tvar $this = $(this),\n\t\t $icon_container = $('i', $this),\n\t\t $loader = $(this).next(),\n\t\t set_notification_status = $(this).hasClass('give-email-notification-enabled') ? 'disabled' : 'enabled',\n\t\t notification_id = $(this).data('id');\n\n\t\t// Bailout if admin can not edit notification status setting.\n\t\tif (!parseInt($this.data('edit'))) {\n\t\t\t// Remove all notice.\n\t\t\t$('div.give-email-notification-status-notice').remove();\n\n\t\t\t// Add notice.\n\t\t\t$('hr.wp-header-end').after('<div class=\"updated error give-email-notification-status-notice\"><p>' + $(this).closest('.give-email-notification-status').data('notice') + '</p></div>');\n\n\t\t\t// Scroll to notice.\n\t\t\t$('html, body').animate({ scrollTop: $('div.give-email-notification-status-notice').position().top }, 'slow');\n\n\t\t\treturn false;\n\t\t}\n\n\t\t$.ajax({\n\t\t\turl: ajaxurl,\n\t\t\tmethod: 'POST',\n\t\t\tdata: {\n\t\t\t\taction: 'give_set_notification_status',\n\t\t\t\tstatus: set_notification_status,\n\t\t\t\tnotification_id: notification_id\n\t\t\t},\n\t\t\tbeforeSend: function beforeSend() {\n\t\t\t\t$this.hide();\n\t\t\t\t$loader.addClass('is-active');\n\t\t\t},\n\t\t\tsuccess: function success(res) {\n\t\t\t\tif (res.success) {\n\t\t\t\t\t$this.removeClass('give-email-notification-' + $this.data('status'));\n\t\t\t\t\t$this.addClass('give-email-notification-' + set_notification_status);\n\t\t\t\t\t$this.data('status', set_notification_status);\n\n\t\t\t\t\tif ('enabled' === set_notification_status) {\n\t\t\t\t\t\t$icon_container.removeClass('dashicons-no-alt');\n\t\t\t\t\t\t$icon_container.addClass('dashicons-yes');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$icon_container.removeClass('dashicons-yes');\n\t\t\t\t\t\t$icon_container.addClass('dashicons-no-alt');\n\t\t\t\t\t}\n\n\t\t\t\t\t$loader.removeClass('is-active');\n\t\t\t\t\t$this.show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n\n\t/**\n * Ajax call to clear Give's cache.\n */\n\t$('#give-clear-cache').on('click', function () {\n\t\t$.ajax({\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'GET',\n\t\t\tdata: {\n\t\t\t\taction: 'give_cache_flush'\n\t\t\t}\n\t\t}).done(function (response) {\n\t\t\tif (response.success) {\n\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"c\" /* GiveSuccessAlert */]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: give_vars.flush_success,\n\t\t\t\t\t\tdesc: response.data.message,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t} else {\n\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"b\" /* GiveErrorAlert */]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: give_vars.flush_error,\n\t\t\t\t\t\tdesc: response.data.message,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t}\n\t\t});\n\t});\n});\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports) {\n\n(function (globalSope) {\n 'use strict';\n\n /**\n * Including this file adds the `addDynamicListener` to the ELement prototype.\n * \n * The dynamic listener gets an extra `selector` parameter that only calls the callback\n * if the target element matches the selector.\n * \n * The listener has to be added to the container/root element and the selector should match\n * the elements that should trigger the event.\n * \n * Browser support: IE9+\n */\n\n // Polyfil Element.matches\n // https://developer.mozilla.org/en/docs/Web/API/Element/matches#Polyfill\n\n if (!Element.prototype.matches) {\n Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) {\n var matches = (this.document || this.ownerDocument).querySelectorAll(s),\n i = matches.length;\n while (--i >= 0 && matches.item(i) !== this) {}\n return i > -1;\n };\n }\n\n /**\n * Returns a modified callback function that calls the\n * initial callback function only if the target element matches the given selector\n * \n * @param {string} selector \n * @param {function} callback \n */\n function getConditionalCallback(selector, callback) {\n return function (e) {\n if (!e.target) return;\n if (!e.target.matches(selector)) return;\n callback.apply(this, arguments);\n };\n }\n\n /**\n * \n * \n * @param {Element} rootElement The root element to add the linster too.\n * @param {string} eventType The event type to listen for.\n * @param {string} selector The selector that should match the dynamic elements.\n * @param {function} callback The function to call when an event occurs on the given selector.\n * @param {boolean|object} options Passed as the regular `options` parameter to the addEventListener function\n * Set to `true` to use capture.\n * Usually used as an object to add the listener as `passive`\n */\n globalSope.addDynamicEventListener = function (rootElement, eventType, selector, callback, options) {\n rootElement.addEventListener(eventType, getConditionalCallback(selector, callback), options);\n };\n})(window);\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports) {\n\n/*!\n * Give Admin Export JS\n *\n * @description: The Give Admin Settings scripts. Only enqueued on the give-settings and give-tools page; used for exporting CSV\n * @package: Give\n * @since: 2.1\n * @subpackage: Assets/JS\n * @copyright: Copyright (c) 2016, WordImpress\n * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\n\njQuery.noConflict();\njQuery(document).ready(function ($) {\n\n\t/**\n * Update Export Donation Form\n *\n * @since 2.1\n */\n\tfunction give_export_update_donation_form() {\n\n\t\tvar $form = $('form#give-export_donations-form'),\n\t\t $container = $($form).find('tr.give-export-donation-form .give-select-chosen'),\n\t\t select = $container.prev(),\n\t\t $search_field = $container.find('input[type=\"text\"]'),\n\t\t variations = $container.hasClass('variations'),\n\t\t response = '';\n\n\t\t$('.give-export-donations-hide').addClass('give-hidden');\n\t\t$('li.give-export-donation-checkbox-remove').remove();\n\n\t\t$.ajax({\n\t\t\ttype: 'POST',\n\t\t\turl: ajaxurl,\n\t\t\tdata: {\n\t\t\t\taction: 'give_form_search',\n\t\t\t\ts: '',\n\t\t\t\tfields: $($form).serialize()\n\t\t\t},\n\t\t\tbeforeSend: function beforeSend() {\n\t\t\t\tselect.closest('ul.chosen-results').empty();\n\t\t\t},\n\t\t\tsuccess: function success(data) {\n\n\t\t\t\t// Remove all options but those that are selected.\n\t\t\t\t$('option', select).remove();\n\t\t\t\tvar form_ids = [];\n\n\t\t\t\tif (data.length) {\n\n\t\t\t\t\t$form.find('.give-export-donation-button').prop('disabled', false);\n\t\t\t\t\t$.each(data, function (key, item) {\n\t\t\t\t\t\tselect.prepend('<option value=\"' + item.id + '\">' + item.name + '</option>');\n\t\t\t\t\t\tform_ids.push(item.id);\n\t\t\t\t\t});\n\n\t\t\t\t\tselect.prepend('<option value=\"0\" selected>' + select.data('placeholder') + '</option>');\n\t\t\t\t} else {\n\t\t\t\t\t// Trigger no result message event.\n\t\t\t\t\tselect.prepend('<option value=\"0\">' + select.data('no-form') + '</option>');\n\n\t\t\t\t\t$form.find('.give-export-donation-button').prop('disabled', true);\n\t\t\t\t}\n\n\t\t\t\t$form.find('.form_ids').val(form_ids.join());\n\n\t\t\t\t// Trigger update event.\n\t\t\t\t$container.prev('select.give-select-chosen').trigger('chosen:updated');\n\n\t\t\t\toutput_give_donations_fields(response);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n * Update export Donation Form when cat or tag are change\n *\n * @since 2.1\n */\n\t$('.give-export_donations #give-export_donations-form .give_forms_categories , .give-export_donations #give-export_donations-form .give_forms_tags').change(function () {\n\t\tgive_export_update_donation_form();\n\t});\n\n\t/**\n * Ajax call to get donation fields.\n */\n\t$('.give-export_donations #give-export_donations-form #give_payment_form_select').change(function () {\n\n\t\t$('.give-export-donations-hide').addClass('give-hidden');\n\n\t\t$('li.give-export-donation-checkbox-remove').remove();\n\n\t\tjQuery(document).trigger('give_export_donations_form_change');\n\n\t\tvar give_form_id;\n\n\t\t// Check for form ID.\n\t\tif (!(give_form_id = $(this).val())) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Ajax.\n\t\t$.ajax({\n\t\t\ttype: 'POST',\n\t\t\turl: ajaxurl,\n\t\t\tdata: {\n\t\t\t\tform_id: give_form_id,\n\t\t\t\taction: 'give_export_donations_get_custom_fields'\n\t\t\t},\n\t\t\tsuccess: function success(response) {\n\t\t\t\tif (response) {\n\t\t\t\t\toutput_give_donations_fields(response);\n\t\t\t\t} else {\n\t\t\t\t\talert(give_vars.error_message);\n\t\t\t\t}\n\n\t\t\t\tjQuery(document).trigger('give_export_donations_form_response', response);\n\t\t\t}\n\t\t});\n\t});\n\n\t/**\n * Outputs the custom field checkboxes.\n *\n * @param response\n */\n\tfunction output_give_donations_fields(response) {\n\n\t\t/**\n * Standard Fields\n */\n\t\tvar standard_fields = 'undefined' !== typeof response.standard_fields && null !== response.standard_fields ? response.standard_fields : '';\n\t\tvar standard_field_list = $('.give-export-donations-standard-fields ul');\n\t\tif (standard_fields.length > 0) {\n\t\t\tstandard_field_list.closest('tr').removeClass('give-hidden');\n\t\t\t// Loop through STANDARD fields & output\n\t\t\t$(standard_fields).each(function (index, value) {\n\t\t\t\tstandard_field_list.append('<li class=\"give-export-donation-checkbox-remove\"><label for=\"give-give-donations-standard-field-' + value + '\"><input type=\"checkbox\" name=\"give_give_donations_export_option[' + value + ']\" id=\"give-give-donations-standard-field-' + value + '\">' + value + '</label> </li>');\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Hidden Fields\n */\n\t\tvar hidden_fields = 'undefined' !== typeof response.hidden_fields && null !== response.hidden_fields ? response.hidden_fields : '';\n\t\tvar hidden_field_list = $('.give-export-donations-hidden-fields ul');\n\n\t\tif (hidden_fields) {\n\t\t\thidden_field_list.closest('tr').removeClass('give-hidden');\n\n\t\t\t// Loop through HIDDEN fields & output.\n\t\t\t$(hidden_fields).each(function (index, value) {\n\t\t\t\thidden_field_list.append('<li class=\"give-export-donation-checkbox-remove\"><label for=\"give-give-donations-hidden-field-' + value + '\"><input type=\"checkbox\" name=\"give_give_donations_export_option[' + value + ']\" id=\"give-give-donations-hidden-field-' + value + '\">' + value + '</label> </li>');\n\t\t\t});\n\t\t}\n\t}\n});\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports) {\n\n/*!\n * Give Admin Widgets JS\n *\n * @description: The Give Admin Widget scripts. Only enqueued on the admin widgets screen; used to validate fields, show/hide, and other functions\n * @package: Give\n * @subpackage: Assets/JS\n * @copyright: Copyright (c) 2016, WordImpress\n * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\n\njQuery.noConflict();\n(function ($) {\n\n\t/**\n * Show/Hide continue button tile setting on basis of display setting for Give Form widget.\n */\n\tvar continue_button_setting_js = function continue_button_setting_js() {\n\t\t$('.widget-liquid-right').on('change', '.give_forms_display_style_setting_row input', function () {\n\t\t\tvar $parent = $(this).parents('p'),\n\t\t\t $continue_button_title = $parent.next();\n\n\t\t\tif ('onpage' === $('input:checked', $parent).val()) {\n\t\t\t\t$continue_button_title.hide();\n\t\t\t} else {\n\t\t\t\t$continue_button_title.show();\n\t\t\t}\n\t\t});\n\t};\n\n\t//On DOM Ready\n\t$(function () {\n\t\tcontinue_button_setting_js();\n\t\t$('.give_forms_display_style_setting_row input', '.widget-liquid-right').trigger('change');\n\t});\n\n\t//Function to Refresh jQuery toggles for Yelp Widget Pro upon saving specific widget\n\t$(document).ajaxSuccess(function (e, xhr, settings) {\n\t\tcontinue_button_setting_js();\n\t\t$('.give_forms_display_style_setting_row input', '.widget-liquid-right').trigger('change');\n\t});\n})(jQuery);\n\n/***/ }),\n/* 32 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__plugins_modal__ = __webpack_require__(6);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n * Give Admin JS\n *\n * @package: Give\n * @subpackage: Assets/JS\n * @copyright: Copyright (c) 2016, WordImpress\n * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\n\n\njQuery.noConflict();\n\n// Provided access to global level.\nvar give_setting_edit = false;\n\n(function ($) {\n\t/**\n * Show/Hide ajax loader.\n *\n * @since 2.0\n *\n * @param $parent\n * @param args\n */\n\tvar giveAjaxLoader = function giveAjaxLoader($parent, args) {\n\t\targs = jQuery.extend({\n\t\t\twrapper: true,\n\t\t\tshow: false\n\t\t}, args);\n\n\t\tvar $loaderParent = args.wrapper ? $('.give-spinner-wrapper', $parent) : {},\n\t\t $loader = $('.give-spinner', $parent);\n\n\t\t// Show loader.\n\t\tif (args.show) {\n\t\t\tif ($loaderParent.length) {\n\t\t\t\t$loaderParent.addClass('is-active');\n\t\t\t}\n\n\t\t\t$loader.addClass('is-active');\n\t\t\treturn;\n\t\t}\n\n\t\t// Hide loader.\n\t\tif ($loaderParent.length) {\n\t\t\t$loaderParent.removeClass('is-active');\n\t\t}\n\n\t\t$loader.removeClass('is-active');\n\t};\n\n\t/**\n * Onclick remove give-message parameter from url\n *\n * @since 1.8.14\n */\n\tvar give_dismiss_notice = function give_dismiss_notice() {\n\t\t$('body').on('click', 'button.notice-dismiss', function () {\n\t\t\tif ('give-invalid-license' !== jQuery(this).closest('div.give-notice').data('notice-id')) {\n\t\t\t\tgive_remove_give_message();\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n * Remove give-message parameter from URL.\n *\n * @since 1.8.14\n */\n\tvar give_remove_give_message = function give_remove_give_message() {\n\t\tvar parameter = 'give-message',\n\t\t url = document.location.href,\n\t\t urlparts = url.split('?');\n\n\t\tif (urlparts.length >= 2) {\n\t\t\tvar urlBase = urlparts.shift();\n\t\t\tvar queryString = urlparts.join('?');\n\n\t\t\tvar prefix = encodeURIComponent(parameter) + '=';\n\t\t\tvar pars = queryString.split(/[&;]/g);\n\t\t\tfor (var i = pars.length; i-- > 0;) {\n\t\t\t\tif (pars[i].lastIndexOf(prefix, 0) !== -1) {\n\t\t\t\t\tpars.splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\turl = urlBase + '?' + pars.join('&');\n\t\t\twindow.history.pushState('', document.title, url); // added this line to push the new url directly to url bar .\n\t\t}\n\t\treturn url;\n\t};\n\n\t/**\n * Setup Admin Datepicker\n * @since: 1.0\n */\n\tvar enable_admin_datepicker = function enable_admin_datepicker() {\n\n\t\t// Date picker.\n\t\tif ($('.give_datepicker').length > 0) {\n\t\t\tvar dateFormat = 'mm/dd/yy';\n\t\t\t$('.give_datepicker').datepicker({\n\t\t\t\tdateFormat: dateFormat\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n * Setup Pretty Chosen Select Fields\n */\n\tvar setup_chosen_give_selects = function setup_chosen_give_selects() {\n\n\t\t// Setup Chosen Selects.\n\t\tvar $give_chosen_containers = $('.give-select-chosen');\n\n\t\t// Add loader with each input field.\n\t\t$give_chosen_containers.on('chosen:ready', function () {\n\t\t\t$(this).next('.chosen-container').find('input.chosen-search-input').after('<span class=\"spinner\"></span>');\n\t\t});\n\n\t\t// No results returned from search trigger.\n\t\t$give_chosen_containers.on('chosen:no_results', function () {\n\t\t\tvar $container = $(this).next('.chosen-container'),\n\t\t\t $no_results_li = $container.find('li.no-results'),\n\t\t\t error_string = '';\n\n\t\t\tif ($container.hasClass('give-select-chosen-ajax') && $no_results_li.length) {\n\t\t\t\terror_string = give_vars.chosen.ajax_search_msg.replace('{search_term}', '\"' + $('input', $container).val() + '\"');\n\t\t\t} else {\n\t\t\t\terror_string = give_vars.chosen.no_results_msg.replace('{search_term}', '\"' + $('input', $container).val() + '\"');\n\t\t\t}\n\n\t\t\t$no_results_li.html(error_string);\n\t\t});\n\n\t\t// Initiate chosen.\n\t\t$give_chosen_containers.chosen({\n\t\t\tinherit_select_classes: true,\n\t\t\tplaceholder_text_single: give_vars.one_option,\n\t\t\tplaceholder_text_multiple: give_vars.one_or_more_option\n\t\t});\n\n\t\t// Fix: Chosen JS - Zero Width Issue.\n\t\t// @see https://github.com/harvesthq/chosen/issues/472#issuecomment-344414059\n\t\t$('.chosen-container').each(function () {\n\t\t\tif (0 === $(this).width()) {\n\t\t\t\t$(this).css('width', '100%');\n\t\t\t}\n\t\t});\n\n\t\t// This fixes the Chosen box being 0px wide when the thickbox is opened.\n\t\t$('#post').on('click', '.give-thickbox', function () {\n\t\t\t$('.give-select-chosen', '#choose-give-form').css('width', '100%');\n\t\t});\n\n\t\t// Variables for setting up the typing timer.\n\t\tvar typingTimer; // Timer identifier.\n\t\tvar doneTypingInterval = 342; // Time in ms, Slow - 521ms, Moderate - 342ms, Fast - 300ms.\n\n\t\t// Replace options with search results.\n\t\t$(document.body).on('keyup', '.give-select.chosen-container .chosen-search input, .give-select.chosen-container .search-field input', function (e) {\n\n\t\t\tvar val = $(this).val(),\n\t\t\t $container = $(this).closest('.give-select-chosen'),\n\t\t\t select = $container.prev(),\n\t\t\t $search_field = $container.find('input[type=\"text\"]'),\n\t\t\t variations = $container.hasClass('variations'),\n\t\t\t lastKey = e.which,\n\t\t\t search_type = 'give_form_search',\n\t\t\t $this = this;\n\n\t\t\t// Detect if we have a defined search type, otherwise default to donation forms.\n\t\t\tif ($container.prev().data('search-type')) {\n\n\t\t\t\t// Don't trigger AJAX if this select has all options loaded.\n\t\t\t\tif ('no_ajax' === select.data('search-type')) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsearch_type = 'give_' + select.data('search-type') + '_search';\n\t\t\t}\n\n\t\t\t// Don't fire if short or is a modifier key (shift, ctrl, apple command key, or arrow keys).\n\t\t\tif (val.length <= 3 || !search_type.length || 9 === lastKey || // Tab.\n\t\t\t13 === lastKey || // Enter.\n\t\t\t16 === lastKey || // Shift.\n\t\t\t17 === lastKey || // Ctrl.\n\t\t\t18 === lastKey || // Alt.\n\t\t\t19 === lastKey || // Pause, Break.\n\t\t\t20 === lastKey || // CapsLock.\n\t\t\t27 === lastKey || // Esc.\n\t\t\t33 === lastKey || // Page Up.\n\t\t\t34 === lastKey || // Page Down.\n\t\t\t35 === lastKey || // End.\n\t\t\t36 === lastKey || // Home.\n\t\t\t37 === lastKey || // Left arrow.\n\t\t\t38 === lastKey || // Up arrow.\n\t\t\t39 === lastKey || // Right arrow.\n\t\t\t40 === lastKey || // Down arrow.\n\t\t\t44 === lastKey || // PrntScrn.\n\t\t\t45 === lastKey || // Insert.\n\t\t\t144 === lastKey || // NumLock.\n\t\t\t145 === lastKey || // ScrollLock.\n\t\t\t91 === lastKey || // WIN Key (Start).\n\t\t\t93 === lastKey || // WIN Menu.\n\t\t\t224 === lastKey || // Command key.\n\t\t\t112 <= lastKey && 123 >= lastKey // F1 to F12 lastKey.\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(typingTimer);\n\t\t\t$container.addClass('give-select-chosen-ajax');\n\n\t\t\ttypingTimer = setTimeout(function () {\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\taction: search_type,\n\t\t\t\t\t\ts: val,\n\t\t\t\t\t\tfields: $($this).closest('form').serialize()\n\t\t\t\t\t},\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tbeforeSend: function beforeSend() {\n\t\t\t\t\t\tselect.closest('ul.chosen-results').empty();\n\t\t\t\t\t\t$search_field.prop('disabled', true);\n\t\t\t\t\t},\n\t\t\t\t\tsuccess: function success(data) {\n\n\t\t\t\t\t\t$container.removeClass('give-select-chosen-ajax');\n\n\t\t\t\t\t\t// Remove all options but those that are selected.\n\t\t\t\t\t\t$('option:not(:selected)', select).remove();\n\n\t\t\t\t\t\tif (data.length) {\n\t\t\t\t\t\t\t$.each(data, function (key, item) {\n\n\t\t\t\t\t\t\t\t// Add any option that doesn't already exist.\n\t\t\t\t\t\t\t\tif (!$('option[value=\"' + item.id + '\"]', select).length) {\n\t\t\t\t\t\t\t\t\tselect.prepend('<option value=\"' + item.id + '\">' + item.name + '</option>');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// Trigger update event.\n\t\t\t\t\t\t\t$container.prev('select.give-select-chosen').trigger('chosen:updated');\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Trigger no result message event.\n\t\t\t\t\t\t\t$container.prev('select.give-select-chosen').trigger('chosen:no_results');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Ensure the original query is retained within the search input.\n\t\t\t\t\t\t$search_field.prop('disabled', false);\n\t\t\t\t\t\t$search_field.val(val).focus();\n\t\t\t\t\t}\n\t\t\t\t}).fail(function (response) {\n\t\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\t\tconsole.log(response);\n\t\t\t\t\t}\n\t\t\t\t}).done(function (response) {\n\t\t\t\t\t$search_field.prop('disabled', false);\n\t\t\t\t});\n\t\t\t}, doneTypingInterval);\n\t\t});\n\n\t\t$('.give-select-chosen .chosen-search input').each(function () {\n\t\t\tvar type = $(this).parent().parent().parent().prev('select.give-select-chosen').data('search-type');\n\t\t\tvar placeholder = '';\n\n\t\t\tif ('form' === type) {\n\t\t\t\tplaceholder = give_vars.search_placeholder;\n\t\t\t} else {\n\t\t\t\ttype = 'search_placeholder_' + type;\n\t\t\t\tif (give_vars[type]) {\n\t\t\t\t\tplaceholder = give_vars[type];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$(this).attr('placeholder', placeholder);\n\t\t});\n\t};\n\n\t/**\n * Unformat Currency\n *\n * @use string give_vars.currency_decimals Number of decimals\n *\n * @param {string} price Price\n * @param {number|bool} dp Number of decimals\n *\n * @returns {string}\n */\n\tfunction give_unformat_currency(price, dp) {\n\t\tprice = accounting.unformat(price, give_vars.decimal_separator).toString();\n\t\tdp = 'undefined' === dp ? false : dp;\n\n\t\t// Set default value for number of decimals.\n\t\tif (false !== dp) {\n\t\t\tprice = parseFloat(price).toFixed(dp);\n\t\t} else {\n\n\t\t\t// If price do not have decimal value then set default number of decimals.\n\t\t\tprice = parseFloat(price).toFixed(give_vars.currency_decimals);\n\t\t}\n\n\t\treturn price;\n\t}\n\n\t/**\n * List donation screen JS\n */\n\n\tvar GiveListDonation = {\n\n\t\tinit: function init() {\n\t\t\tthis.deleteSingleDonation();\n\t\t\tthis.resendSingleDonationReceipt();\n\t\t},\n\n\t\tdeleteSingleDonation: function deleteSingleDonation() {\n\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"a\" /* GiveConfirmModal */]({\n\t\t\t\ttriggerSelector: '.delete-single-donation',\n\t\t\t\tmodalWrapper: 'give-modal--warning',\n\t\t\t\tmodalContent: {\n\t\t\t\t\ttitle: give_vars.confirm_delete_donation,\n\t\t\t\t\tdesc: give_vars.delete_payment\n\t\t\t\t},\n\t\t\t\tsuccessConfirm: function successConfirm(args) {\n\t\t\t\t\twindow.location.assign(args.el.attr('href'));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tresendSingleDonationReceipt: function resendSingleDonationReceipt() {\n\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"a\" /* GiveConfirmModal */]({\n\t\t\t\ttriggerSelector: '.resend-single-donation-receipt',\n\t\t\t\tmodalContent: {\n\t\t\t\t\ttitle: give_vars.confirm_resend,\n\t\t\t\t\tdesc: give_vars.resend_receipt\n\t\t\t\t},\n\t\t\t\tsuccessConfirm: function successConfirm(args) {\n\t\t\t\t\twindow.location.assign(args.el.attr('href'));\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n * Edit donation screen JS\n */\n\tvar Give_Edit_Donation = {\n\n\t\tinit: function init() {\n\t\t\tthis.edit_address();\n\t\t\tthis.add_note();\n\t\t\tthis.remove_note();\n\t\t\tthis.new_donor();\n\t\t\tthis.resend_receipt();\n\t\t\tthis.variable_price_list();\n\t\t},\n\n\t\tedit_address: function edit_address() {\n\n\t\t\t// Update base state field based on selected base country.\n\t\t\t$('select[name=\"give-payment-address[0][country]\"]').change(function () {\n\t\t\t\tvar $this = $(this);\n\n\t\t\t\tdata = {\n\t\t\t\t\taction: 'give_get_states',\n\t\t\t\t\tcountry: $this.val(),\n\t\t\t\t\tfield_name: 'give-payment-address[0][state]'\n\t\t\t\t};\n\t\t\t\t$.post(ajaxurl, data, function (response) {\n\n\t\t\t\t\t// Show the states dropdown menu.\n\t\t\t\t\t$this.closest('.column-container').find('#give-order-address-state-wrap').removeClass('give-hidden');\n\n\t\t\t\t\t// Add support to zip fields.\n\t\t\t\t\t$this.closest('.column-container').find('.give-column').removeClass('column-full');\n\t\t\t\t\t$this.closest('.column-container').find('.give-column').addClass('column');\n\n\t\t\t\t\tvar state_wrap = $('#give-order-address-state-wrap');\n\t\t\t\t\tstate_wrap.find('*').not('.order-data-address-line').remove();\n\t\t\t\t\tif (_typeof(response.states_found) !== undefined && true === response.states_found) {\n\t\t\t\t\t\tstate_wrap.append(response.data);\n\t\t\t\t\t\tstate_wrap.find('select').chosen();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate_wrap.append('<input type=\"text\" name=\"give-payment-address[0][state]\" value=\"' + response.default_state + '\" class=\"give-edit-toggles medium-text\"/>');\n\n\t\t\t\t\t\tif (_typeof(response.show_field) !== undefined && false === response.show_field) {\n\t\t\t\t\t\t\t// Hide the states dropdown menu.\n\t\t\t\t\t\t\t$this.closest('.column-container').find('#give-order-address-state-wrap').addClass('give-hidden');\n\n\t\t\t\t\t\t\t// Add support to zip fields.\n\t\t\t\t\t\t\t$this.closest('.column-container').find('.give-column').addClass('column-full');\n\t\t\t\t\t\t\t$this.closest('.column-container').find('.give-column').removeClass('column');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t},\n\n\t\tadd_note: function add_note() {\n\n\t\t\t$('#give-add-payment-note').on('click', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar postData = {\n\t\t\t\t\taction: 'give_insert_payment_note',\n\t\t\t\t\tpayment_id: $(this).data('payment-id'),\n\t\t\t\t\tnote: $('#give-payment-note').val()\n\t\t\t\t};\n\n\t\t\t\tif (postData.note) {\n\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\tdata: postData,\n\t\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\t\tsuccess: function success(response) {\n\t\t\t\t\t\t\t$('#give-payment-notes-inner').append(response);\n\t\t\t\t\t\t\t$('.give-no-payment-notes').hide();\n\t\t\t\t\t\t\t$('#give-payment-note').val('');\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fail(function (data) {\n\t\t\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\t\t\tconsole.log(data);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tvar border_color = $('#give-payment-note').css('border-color');\n\t\t\t\t\t$('#give-payment-note').css('border-color', 'red');\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t$('#give-payment-note').css('border-color', border_color);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tremove_note: function remove_note() {\n\n\t\t\t$('body').on('click', '.give-delete-payment-note', function (e) {\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvar that = this;\n\n\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"a\" /* GiveConfirmModal */]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: give_vars.confirm_deletion,\n\t\t\t\t\t\tdesc: give_vars.delete_payment_note\n\t\t\t\t\t},\n\t\t\t\t\tsuccessConfirm: function successConfirm(args) {\n\t\t\t\t\t\tvar postData = {\n\t\t\t\t\t\t\taction: 'give_delete_payment_note',\n\t\t\t\t\t\t\tpayment_id: $(that).data('payment-id'),\n\t\t\t\t\t\t\tnote_id: $(that).data('note-id')\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\t\tdata: postData,\n\t\t\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\t\t\tsuccess: function success(response) {\n\t\t\t\t\t\t\t\t$('#give-payment-note-' + postData.note_id).remove();\n\t\t\t\t\t\t\t\tif (!$('.give-payment-note').length) {\n\t\t\t\t\t\t\t\t\t$('.give-no-payment-notes').show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).fail(function (data) {\n\t\t\t\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\t\t\t\tconsole.log(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t});\n\t\t},\n\n\t\tnew_donor: function new_donor() {\n\n\t\t\t$('#give-donor-details').on('click', '.give-payment-new-donor, .give-payment-new-donor-cancel', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$('.donor-info').toggle();\n\t\t\t\t$('.new-donor').toggle();\n\n\t\t\t\tif ($('.new-donor').is(':visible')) {\n\t\t\t\t\t$('#give-new-donor').val(1);\n\t\t\t\t} else {\n\t\t\t\t\t$('#give-new-donor').val(0);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tresend_receipt: function resend_receipt() {\n\t\t\t$('body').on('click', '#give-resend-receipt', function (e) {\n\t\t\t\treturn confirm(give_vars.resend_receipt);\n\t\t\t});\n\t\t},\n\n\t\tvariable_price_list: function variable_price_list() {\n\t\t\t// Update variable price list when form changes.\n\t\t\t$('#give_payment_form_select').chosen().change(function () {\n\t\t\t\tvar give_form_id,\n\t\t\t\t variable_prices_html_container = $('.give-donation-level');\n\n\t\t\t\t// Check for form ID.\n\t\t\t\tif (!(give_form_id = $(this).val())) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Bailout.\n\t\t\t\tif (!variable_prices_html_container.length) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Ajax.\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tform_id: give_form_id,\n\t\t\t\t\t\tpayment_id: $('input[name=\"give_payment_id\"]').val(),\n\t\t\t\t\t\taction: 'give_check_for_form_price_variations_html'\n\t\t\t\t\t},\n\t\t\t\t\tsuccess: function success(response) {\n\t\t\t\t\t\tresponse = response.trim();\n\t\t\t\t\t\tif (response) {\n\n\t\t\t\t\t\t\t// Update Variable price html.\n\t\t\t\t\t\t\tvariable_prices_html_container.html(response);\n\n\t\t\t\t\t\t\t// Add chosen feature to select tag.\n\t\t\t\t\t\t\t$('select[name=\"give-variable-price\"]').chosen().change();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Update Variable price html.\n\t\t\t\t\t\t\tvariable_prices_html_container.html('');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// Add total donation amount if level changes.\n\t\t\t$('#give-donation-overview').on('change', 'select[name=\"give-variable-price\"]', function () {\n\t\t\t\tvar prices = jQuery(this).data('prices'),\n\t\t\t\t $total_amount = $('#give-payment-total');\n\n\t\t\t\tif ('' !== prices && $(this).val() in prices) {\n\n\t\t\t\t\t$total_amount.val(prices[$(this).val()]).css('background-color', 'yellow');\n\n\t\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t\t$total_amount.css('background-color', 'white');\n\t\t\t\t\t}, 1000);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t};\n\n\t/**\n * Settings screen JS\n */\n\tvar Give_Settings = {\n\n\t\tinit: function init() {\n\t\t\tthis.setting_change_country();\n\t\t\tthis.toggle_options();\n\t\t\tthis.main_setting_update_notice();\n\t\t\tthis.verify_settings();\n\t\t\tthis.saveButtonTriggered();\n\t\t\tthis.changeAlert();\n\t\t\tthis.detectSettingsChange();\n\t\t\tthis.sequentialDonationIDPreview();\n\t\t},\n\n\t\t/**\n * Fire when user change the country from the dropdown\n *\n * @since 1.8.14\n */\n\t\tsetting_change_country: function setting_change_country() {\n\t\t\t$('select[name=\"base_country\"]').change(function () {\n\t\t\t\tvar $this = $(this);\n\t\t\t\tvar data = {\n\t\t\t\t\taction: 'give_get_states',\n\t\t\t\t\tcountry: $this.val(),\n\t\t\t\t\tfield_name: 'base_state'\n\t\t\t\t};\n\n\t\t\t\t$.post(ajaxurl, data, function (response) {\n\t\t\t\t\t// Show the states dropdown menu.\n\t\t\t\t\t$this.closest('tr').next().show();\n\t\t\t\t\tif (_typeof(response.states_found) != undefined && true == response.states_found) {\n\t\t\t\t\t\t$(':input[name=\"base_state\"]').replaceWith(response.data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (_typeof(response.show_field) != undefined && false == response.show_field) {\n\t\t\t\t\t\t\t// Hide the states dropdown menu.\n\t\t\t\t\t\t\t$this.closest('tr').next().hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$(':input[name=\"base_state\"]').replaceWith('<input type=\"text\" name=\"' + data.field_name + '\" value=\"' + response.default_state + '\" class=\"give-edit-toggles medium-text\"/>');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn false;\n\t\t\t});\n\t\t},\n\n\t\ttoggle_options: function toggle_options() {\n\n\t\t\t/**\n * Email access\n */\n\t\t\tvar emailAccess = $('input[name=\"email_access\"]', '.give-setting-tab-body-general');\n\t\t\temailAccess.on('change', function () {\n\t\t\t\tvar fieldValueEmail = $('input[name=\"email_access\"]:checked', '.give-setting-tab-body-general').val();\n\t\t\t\tvar fieldValueRecaptcha = $('input[name=\"enable_recaptcha\"]:checked', '.give-setting-tab-body-general').val();\n\t\t\t\tif ('enabled' === fieldValueEmail) {\n\t\t\t\t\t$('input[name=\"enable_recaptcha\"]').parents('tr').show();\n\n\t\t\t\t\tif ('enabled' === fieldValueRecaptcha) {\n\t\t\t\t\t\t$('#recaptcha_key').parents('tr').show();\n\t\t\t\t\t\t$('#recaptcha_secret').parents('tr').show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$('#recaptcha_key').parents('tr').hide();\n\t\t\t\t\t\t$('#recaptcha_secret').parents('tr').hide();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$('#recaptcha_key').parents('tr').hide();\n\t\t\t\t\t$('#recaptcha_secret').parents('tr').hide();\n\t\t\t\t\t$('input[name=\"enable_recaptcha\"]').parents('tr').hide();\n\t\t\t\t}\n\t\t\t}).change();\n\n\t\t\t/**\n * Email reCAPTCHA\n */\n\t\t\tvar recaptcha = $('input[name=\"enable_recaptcha\"]', '.give-setting-tab-body-general');\n\t\t\trecaptcha.on('change', function () {\n\t\t\t\tvar fieldValueEmail = $('input[name=\"email_access\"]:checked', '.give-setting-tab-body-general').val();\n\t\t\t\tvar fieldValueRecaptcha = $('input[name=\"enable_recaptcha\"]:checked', '.give-setting-tab-body-general').val();\n\n\t\t\t\tif ('enabled' === fieldValueEmail && 'enabled' === fieldValueRecaptcha) {\n\t\t\t\t\t$('#recaptcha_key').parents('tr').show();\n\t\t\t\t\t$('#recaptcha_secret').parents('tr').show();\n\t\t\t\t} else {\n\t\t\t\t\t$('#recaptcha_key').parents('tr').hide();\n\t\t\t\t\t$('#recaptcha_secret').parents('tr').hide();\n\t\t\t\t}\n\t\t\t}).change();\n\n\t\t\t/**\n * Form featured image\n */\n\t\t\tvar form_featured_image = $('input[name=\"form_featured_img\"]', '.give-setting-tab-body-display');\n\t\t\tform_featured_image.on('change', function () {\n\t\t\t\tvar field_value = $('input[name=\"form_featured_img\"]:checked', '.give-setting-tab-body-display').val();\n\t\t\t\tif ('enabled' === field_value) {\n\t\t\t\t\t$('#featured_image_size').parents('tr').show();\n\t\t\t\t} else {\n\t\t\t\t\t$('#featured_image_size').parents('tr').hide();\n\t\t\t\t}\n\t\t\t}).change();\n\n\t\t\t/**\n * Terms and Conditions\n */\n\t\t\tvar terms_and_conditions = $('input[name=\"terms\"]', '.give-setting-tab-body-display');\n\t\t\tterms_and_conditions.on('change', function () {\n\t\t\t\tvar field_value = $('input[name=\"terms\"]:checked', '.give-setting-tab-body-display').val();\n\t\t\t\tif ('enabled' === field_value) {\n\t\t\t\t\t$('#agree_to_terms_label').parents('tr').show();\n\t\t\t\t\t$('#wp-agreement_text-wrap').parents('tr').show();\n\t\t\t\t} else {\n\t\t\t\t\t$('#agree_to_terms_label').parents('tr').hide();\n\t\t\t\t\t$('#wp-agreement_text-wrap').parents('tr').hide();\n\t\t\t\t}\n\t\t\t}).change();\n\n\t\t\t/**\n * Disable admin notification\n */\n\t\t\tvar admin_notification = $('input[name=\"admin_notices\"]', '.give-setting-tab-body-emails');\n\t\t\tadmin_notification.on('change', function () {\n\t\t\t\tvar field_value = $('input[name=\"admin_notices\"]:checked', '.give-setting-tab-body-emails').val();\n\t\t\t\tif ('enabled' === field_value) {\n\t\t\t\t\t$('#donation_notification_subject').parents('tr').show();\n\t\t\t\t\t$('#wp-donation_notification-wrap').parents('tr').show();\n\t\t\t\t\t$('#admin_notice_emails').parents('tr').show();\n\t\t\t\t} else {\n\t\t\t\t\t$('#donation_notification_subject').parents('tr').hide();\n\t\t\t\t\t$('#wp-donation_notification-wrap').parents('tr').hide();\n\t\t\t\t\t$('#admin_notice_emails').parents('tr').hide();\n\t\t\t\t}\n\t\t\t}).change();\n\n\t\t\t/**\n * Toggle sequential ordering settings\n */\n\t\t\tvar sequential_ordering = $('input[name=\"sequential-ordering_status\"]', '.give-setting-tab-body-general');\n\t\t\tsequential_ordering.on('change', function () {\n\t\t\t\tvar field_value = $('input[name=\"sequential-ordering_status\"]:checked', '.give-setting-tab-body-general').val(),\n\t\t\t\t $parent = $(this).closest('table');\n\t\t\t\tif ('enabled' === field_value) {\n\t\t\t\t\t$('input', $parent).not('input[name=\"sequential-ordering_status\"]').parents('tr').show();\n\t\t\t\t} else {\n\t\t\t\t\t$('input', $parent).not('input[name=\"sequential-ordering_status\"]').parents('tr').hide();\n\t\t\t\t}\n\t\t\t}).change();\n\t\t},\n\n\t\tmain_setting_update_notice: function main_setting_update_notice() {\n\t\t\tvar $setting_message = $('#setting-error-give-setting-updated');\n\t\t\tif ($setting_message.length) {\n\n\t\t\t\t// auto hide setting message in 5 seconds.\n\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t$setting_message.slideUp();\n\t\t\t\t}, 5000);\n\t\t\t}\n\t\t},\n\n\t\tverify_settings: function verify_settings() {\n\t\t\tvar success_setting = $('#success_page');\n\t\t\tvar failure_setting = $('#failure_page');\n\n\t\t\t/**\n * Verify success and failure page.\n */\n\t\t\tsuccess_setting.add(failure_setting).change(function () {\n\t\t\t\tif (success_setting.val() === failure_setting.val()) {\n\t\t\t\t\tvar notice_html = '<div id=\"setting-error-give-matched-success-failure-page\" class=\"updated settings-error notice is-dismissible\"> <p><strong>' + give_vars.matched_success_failure_page + '</strong></p> <button type=\"button\" class=\"notice-dismiss\"><span class=\"screen-reader-text\">' + give_vars.dismiss_notice_text + '</span></button> </div>',\n\t\t\t\t\t $notice_container = $('#setting-error-give-matched-success-failure-page');\n\n\t\t\t\t\t// Unset setting field.\n\t\t\t\t\t$(this).val('');\n\n\t\t\t\t\t// Bailout.\n\t\t\t\t\tif ($notice_container.length) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add html.\n\t\t\t\t\t$('h1', '#give-mainform').after(notice_html);\n\t\t\t\t\t$notice_container = $('#setting-error-give-matched-success-failure-page');\n\n\t\t\t\t\t// Add event to dismiss button.\n\t\t\t\t\t$('.notice-dismiss', $notice_container).click(function () {\n\t\t\t\t\t\t$notice_container.remove();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}).change();\n\t\t},\n\n\t\tsaveButtonTriggered: function saveButtonTriggered() {\n\t\t\t$('.give-settings-setting-page').on('click', '.give-save-button', function () {\n\t\t\t\t$(window).unbind('beforeunload');\n\t\t\t});\n\t\t},\n\n\t\t/**\n * Show alert when admin try to reload the page with saving the changes.\n *\n * @since 1.8.14\n */\n\t\tchangeAlert: function changeAlert() {\n\n\t\t\t$(window).bind('beforeunload', function (e) {\n\n\t\t\t\tvar confirmationMessage = give_vars.setting_not_save_message;\n\n\t\t\t\tif (give_setting_edit) {\n\t\t\t\t\t(e || window.event).returnValue = confirmationMessage; //Gecko + IE.\n\t\t\t\t\treturn confirmationMessage; //Webkit, Safari, Chrome.\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n * Display alert in setting page of give if user try to reload the page with saving the changes.\n *\n * @since 1.8.14\n */\n\t\tdetectSettingsChange: function detectSettingsChange() {\n\n\t\t\tvar settingsPage = $('.give-settings-setting-page');\n\n\t\t\t// Check if it give setting page or not.\n\t\t\tif (settingsPage.length > 0) {\n\n\t\t\t\t// Get the default value.\n\t\t\t\tvar on_load_value = $('#give-mainform').serialize();\n\n\t\t\t\t/**\n * Keyup event add to support to text box and textarea.\n * blur event add to support to dropdown.\n * Change event add to support to rest all element.\n */\n\t\t\t\tsettingsPage.on('change keyup blur', 'form', function () {\n\t\t\t\t\t// Get the form value after change.\n\t\t\t\t\tvar on_change_value = $('#give-mainform').serialize();\n\n\t\t\t\t\t// If both the value are same then no change has being made else change has being made.\n\t\t\t\t\tgive_setting_edit = on_load_value !== on_change_value ? true : false;\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\t/**\n * Render donation id for sequential ordering.\n *\n * @since 2.1.0\n */\n\t\tsequentialDonationIDPreview: function sequentialDonationIDPreview() {\n\t\t\tvar $previewField = jQuery('#sequential-ordering_preview');\n\n\t\t\t// Bailout.\n\t\t\tif (!$previewField.length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tjQuery('#sequential-ordering_number_prefix, #sequential-ordering_number, #sequential-ordering_number_padding, #sequential-ordering_number_suffix').on('keyup change', function () {\n\t\t\t\tvar prefix = jQuery('#sequential-ordering_number_prefix').val(),\n\t\t\t\t startingNumber = jQuery('#sequential-ordering_number').val().trim() || '1',\n\t\t\t\t numberPadding = jQuery('#sequential-ordering_number_padding').val().trim(),\n\t\t\t\t suffix = jQuery('#sequential-ordering_number_suffix').val(),\n\t\t\t\t $donationID = '' + prefix + startingNumber.padStart(numberPadding, '0') + suffix;\n\n\t\t\t\t$previewField.val($donationID);\n\t\t\t});\n\n\t\t\tjQuery('#sequential-ordering_number_prefix').trigger('keyup');\n\n\t\t\tjQuery('#sequential-ordering_number_prefix, #sequential-ordering_number_suffix').on('blur', function () {\n\t\t\t\t$(this).val($(this).val().replace(new RegExp(' ', 'g'), '-'));\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n * Reports / Exports / Tools screen JS\n */\n\tvar Give_Reports = {\n\n\t\tinit: function init() {\n\t\t\tthis.date_options();\n\t\t\tthis.donors_export();\n\t\t\tthis.recount_stats();\n\t\t},\n\n\t\tdate_options: function date_options() {\n\n\t\t\t// Show hide extended date options.\n\t\t\t$('#give-graphs-date-options').change(function () {\n\t\t\t\tvar $this = $(this);\n\t\t\t\tif ('other' === $this.val()) {\n\t\t\t\t\t$('#give-date-range-options').show();\n\t\t\t\t} else {\n\t\t\t\t\t$('#give-date-range-options').hide();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tdonors_export: function donors_export() {\n\n\t\t\t// Show / hide Donation Form option when exporting donors.\n\t\t\t$('#give_donor_export_form').change(function () {\n\n\t\t\t\tvar $this = $(this),\n\t\t\t\t form_id = $('option:selected', $this).val(),\n\t\t\t\t customer_export_option = $('#give_customer_export_option');\n\n\t\t\t\tif ('0' === $this.val()) {\n\t\t\t\t\tcustomer_export_option.show();\n\t\t\t\t} else {\n\t\t\t\t\tcustomer_export_option.hide();\n\t\t\t\t}\n\n\t\t\t\tvar price_options_select = $('.give_price_options_select');\n\n\t\t\t\t// On Form Select, Check if Variable Prices Exist.\n\t\t\t\tif (parseInt(form_id) != 0) {\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\taction: 'give_check_for_form_price_variations',\n\t\t\t\t\t\tform_id: form_id,\n\t\t\t\t\t\tall_prices: true\n\t\t\t\t\t};\n\n\t\t\t\t\t$.post(ajaxurl, data, function (response) {\n\t\t\t\t\t\tprice_options_select.remove();\n\t\t\t\t\t\t$('#give_donor_export_form_chosen').after(response);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tprice_options_select.remove();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\trecount_stats: function recount_stats() {\n\n\t\t\t$('body').on('change', '#recount-stats-type', function () {\n\n\t\t\t\tvar export_form = $('#give-tools-recount-form');\n\t\t\t\tvar selected_type = $('option:selected', this).data('type');\n\t\t\t\tvar submit_button = $('#recount-stats-submit');\n\t\t\t\tvar forms = $('.tools-form-dropdown');\n\n\t\t\t\t// Reset the form\n\t\t\t\texport_form.find('.notice-wrap').remove();\n\t\t\t\tsubmit_button.removeClass('button-disabled').attr('disabled', false);\n\t\t\t\tforms.hide();\n\t\t\t\t$('.give-recount-stats-descriptions span').hide();\n\n\t\t\t\tif ('reset-stats' === selected_type) {\n\t\t\t\t\texport_form.append('<div class=\"notice-wrap\"></div>');\n\t\t\t\t\tvar notice_wrap = export_form.find('.notice-wrap');\n\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-warning\"><p><input type=\"checkbox\" id=\"confirm-reset\" name=\"confirm_reset_store\" value=\"1\" /> <label for=\"confirm-reset\">' + give_vars.reset_stats_warn + '</label></p></div>');\n\t\t\t\t\tsubmit_button.addClass('button-disabled').attr('disabled', 'disabled');\n\n\t\t\t\t\t// Add check when admin try to delete all the test donors.\n\t\t\t\t} else if ('delete-test-donors' === selected_type) {\n\t\t\t\t\texport_form.append('<div class=\"notice-wrap\"></div>');\n\t\t\t\t\tvar notice_wrap = export_form.find('.notice-wrap');\n\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-warning\"><p><input type=\"checkbox\" id=\"confirm-reset\" name=\"confirm_reset_store\" value=\"1\" /> <label for=\"confirm-reset\">' + give_vars.delete_test_donor + '</label></p></div>');\n\t\t\t\t\tsubmit_button.addClass('button-disabled').attr('disabled', 'disabled');\n\t\t\t\t\t// Add check when admin try to delete all the imported donations.\n\t\t\t\t} else if ('delete-import-donors' === selected_type) {\n\n\t\t\t\t\texport_form.append('<div class=\"notice-wrap\"></div>');\n\t\t\t\t\tvar notice_wrap = export_form.find('.notice-wrap');\n\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-warning\"><p><input type=\"checkbox\" id=\"confirm-reset\" name=\"confirm_reset_store\" value=\"1\" /> <label for=\"confirm-reset\">' + give_vars.delete_import_donor + '</label></p></div>');\n\t\t\t\t\tsubmit_button.addClass('button-disabled').attr('disabled', 'disabled');\n\t\t\t\t} else {\n\t\t\t\t\tforms.hide();\n\t\t\t\t\tforms.val(0);\n\t\t\t\t}\n\n\t\t\t\tvar current_forms = $('.tools-form-dropdown-' + selected_type);\n\t\t\t\tcurrent_forms.show();\n\t\t\t\tcurrent_forms.find('.give-select-chosen').css({\n\t\t\t\t\t'width': 'auto',\n\t\t\t\t\t'min-width': '250px'\n\t\t\t\t});\n\t\t\t\t$('#' + selected_type).show();\n\t\t\t});\n\n\t\t\t$('body').on('change', '#confirm-reset', function () {\n\t\t\t\tvar checked = $(this).is(':checked');\n\t\t\t\tif (checked) {\n\t\t\t\t\t$('#recount-stats-submit').removeClass('button-disabled').removeAttr('disabled');\n\t\t\t\t} else {\n\t\t\t\t\t$('#recount-stats-submit').addClass('button-disabled').attr('disabled', 'disabled');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$('#give-tools-recount-form').submit(function (e) {\n\t\t\t\tvar selection = $('#recount-stats-type').val();\n\t\t\t\tvar export_form = $(this);\n\t\t\t\tvar selected_type = $('option:selected', this).data('type');\n\n\t\t\t\tif ('reset-stats' === selected_type) {\n\t\t\t\t\tvar is_confirmed = $('#confirm-reset').is(':checked');\n\t\t\t\t\tif (is_confirmed) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\thas_errors = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\texport_form.find('.notice-wrap').remove();\n\n\t\t\t\texport_form.append('<div class=\"notice-wrap\"></div>');\n\t\t\t\tvar notice_wrap = export_form.find('.notice-wrap');\n\t\t\t\tvar has_errors = false;\n\n\t\t\t\tif (null === selection || 0 === selection) {\n\t\t\t\t\t// Needs to pick a method give_vars.batch_export_no_class.\n\t\t\t\t\tnotice_wrap.html('<div class=\"updated error\"><p>' + give_vars.batch_export_no_class + '</p></div>');\n\t\t\t\t\thas_errors = true;\n\t\t\t\t}\n\n\t\t\t\tif ('recount-form' === selected_type) {\n\n\t\t\t\t\tvar selected_form = $('select[name=\"form_id\"]').val();\n\t\t\t\t\tif (selected_form == 0) {\n\t\t\t\t\t\t// Needs to pick give_vars.batch_export_no_reqs.\n\t\t\t\t\t\tnotice_wrap.html('<div class=\"updated error\"><p>' + give_vars.batch_export_no_reqs + '</p></div>');\n\t\t\t\t\t\thas_errors = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (has_errors) {\n\t\t\t\t\texport_form.find('.button-disabled').removeClass('button-disabled');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t};\n\n\t/**\n * Export screen JS\n */\n\tvar Give_Export = {\n\n\t\tinit: function init() {\n\t\t\tthis.submit();\n\t\t\tthis.dismiss_message();\n\t\t},\n\n\t\tsubmit: function submit() {\n\n\t\t\tvar self = this;\n\n\t\t\t$(document.body).on('submit', '.give-export-form', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvar submitButton = $(this).find('input[type=\"submit\"]');\n\n\t\t\t\tif (!submitButton.hasClass('button-disabled')) {\n\n\t\t\t\t\tvar data = $(this).serialize();\n\n\t\t\t\t\tsubmitButton.addClass('button-disabled');\n\t\t\t\t\t$('form.give-export-form select').attr('disabled', true).trigger('chosen:updated');\n\n\t\t\t\t\tvar parent_notices = $(this);\n\n\t\t\t\t\t// show notices inside add-notices class\n\t\t\t\t\tif ($(this).find('.add-notices').length > 0) {\n\t\t\t\t\t\tparent_notices = $(this).find('.add-notices');\n\t\t\t\t\t}\n\n\t\t\t\t\tparent_notices.find('.notice-wrap').remove();\n\t\t\t\t\tparent_notices.append('<div class=\"notice-wrap give-clearfix\"><span class=\"spinner is-active\"></span><div class=\"give-progress\"><div></div></div></div>');\n\n\t\t\t\t\t// start the process\n\t\t\t\t\tself.process_step(1, data, self, this);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tprocess_step: function process_step(step, data, self, form) {\n\t\t\t/**\n * Do not allow user to reload the page\n *\n * @since 1.8.14\n */\n\t\t\tgive_setting_edit = true;\n\n\t\t\tvar reset_form = false;\n\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: ajaxurl,\n\t\t\t\tdata: {\n\t\t\t\t\tform: data,\n\t\t\t\t\taction: 'give_do_ajax_export',\n\t\t\t\t\tstep: step\n\t\t\t\t},\n\t\t\t\tdataType: 'json',\n\t\t\t\tsuccess: function success(response) {\n\n\t\t\t\t\tif ('done' == response.step || response.error || response.success) {\n\n\t\t\t\t\t\t/**\n * Now allow user to reload the page\n *\n * @since 1.8.14\n */\n\t\t\t\t\t\tgive_setting_edit = false;\n\n\t\t\t\t\t\treset_form = true;\n\n\t\t\t\t\t\t// We need to get the actual in progress form, not all forms on the page\n\t\t\t\t\t\tvar notice_wrap = $(form).parent().find('.notice-wrap');\n\t\t\t\t\t\tvar export_form = notice_wrap.find('.give-progress');\n\n\t\t\t\t\t\t$(form).find('.button-disabled').removeClass('button-disabled');\n\t\t\t\t\t\t$(form).find('select').attr('disabled', false).trigger('chosen:updated');\n\n\t\t\t\t\t\tif (response.error) {\n\t\t\t\t\t\t\tvar error_message = response.message;\n\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"updated error\"><p>' + error_message + '</p></div>');\n\t\t\t\t\t\t} else if (response.success) {\n\t\t\t\t\t\t\tvar success_message = response.message;\n\t\t\t\t\t\t\tnotice_wrap.html('<div id=\"give-batch-success\" class=\"updated notice is-dismissible\"><p>' + success_message + '<span class=\"notice-dismiss\"></span></p></div>');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnotice_wrap.remove();\n\t\t\t\t\t\t\twindow.location = response.url;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$('.give-progress div').animate({\n\t\t\t\t\t\t\twidth: response.percentage + '%'\n\t\t\t\t\t\t}, 50, function () {\n\t\t\t\t\t\t\t// Animation complete.\n\t\t\t\t\t\t});\n\t\t\t\t\t\tself.process_step(parseInt(response.step), data, self, form);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (true === reset_form && $('#give-tools-recount-form').length > 0) {\n\t\t\t\t\t\t// Reset the form for preventing multiple ajax request.\n\t\t\t\t\t\t$('#give-tools-recount-form')[0].reset();\n\t\t\t\t\t\t$('#give-tools-recount-form .tools-form-dropdown').hide();\n\t\t\t\t\t\t$('#give-tools-recount-form .tools-form-dropdown-recount-form-select').val('0').trigger('chosen:updated');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).fail(function (response) {\n\t\t\t\t/**\n * Now allow user to reload the page\n *\n * @since 1.8.14\n */\n\t\t\t\tgive_setting_edit = false;\n\n\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\tconsole.log(response);\n\t\t\t\t}\n\t\t\t\t$('.notice-wrap').append(response.responseText);\n\t\t\t});\n\t\t},\n\n\t\tdismiss_message: function dismiss_message() {\n\t\t\t$('body').on('click', '#give-batch-success .notice-dismiss', function () {\n\t\t\t\t$('#give-batch-success').parent().slideUp('fast');\n\t\t\t});\n\t\t}\n\n\t};\n\n\t/**\n * Updates screen JS\n */\n\tvar Give_Updates = {\n\t\tel: {},\n\n\t\tinit: function init() {\n\t\t\tthis.submit();\n\t\t\tthis.dismiss_message();\n\t\t},\n\n\t\tsubmit: function submit() {\n\t\t\tvar $self = this,\n\t\t\t step = 1,\n\t\t\t resume_update_step = 0;\n\n\t\t\t$self.el.main_container = Give_Selector_Cache.get('#give-db-updates');\n\t\t\t$self.el.update_link = Give_Selector_Cache.get('.give-update-now', $self.el.main_container);\n\t\t\t$self.el.run_upload_container = Give_Selector_Cache.get('.give-run-database-update', $self.el.progress_main_container);\n\t\t\t$self.el.progress_main_container = Give_Selector_Cache.get('.progress-container', $self.el.main_container);\n\t\t\t$self.el.heading = Give_Selector_Cache.get('.update-message', $self.el.progress_main_container);\n\t\t\t$self.el.progress_container = Give_Selector_Cache.get('.progress-content', $self.el.progress_main_container);\n\t\t\t$self.el.update_progress_counter = Give_Selector_Cache.get($('.give-update-progress-count'));\n\n\t\t\tif ($self.el.main_container.data('resume-update')) {\n\t\t\t\t$self.el.update_link.addClass('active').hide().removeClass('give-hidden');\n\n\t\t\t\tif (!$('#give-restart-upgrades').length) {\n\t\t\t\t\twindow.setTimeout(Give_Updates.get_db_updates_info, 1000, $self);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Bailout.\n\t\t\tif ($self.el.update_link.hasClass('active')) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$self.el.update_link.on('click', '', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t$self.el.run_upload_container.find('.notice').remove();\n\t\t\t\t$self.el.run_upload_container.append('<div class=\"notice notice-error non-dismissible give-run-update-containt\"><p> <a href=\"#\" class=\"give-run-update-button button\">' + give_vars.db_update_confirmation_msg_button + '</a> ' + give_vars.db_update_confirmation_msg + '</p></div>');\n\t\t\t});\n\n\t\t\t$('#give-db-updates').on('click', 'a.give-run-update-button', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tif ($(this).hasClass('active')) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$(this).addClass('active').fadeOut();\n\t\t\t\t$self.el.update_link.addClass('active').fadeOut();\n\t\t\t\t$('#give-db-updates .give-run-update-containt').slideUp();\n\n\t\t\t\t$self.el.progress_container.find('.notice-wrap').remove();\n\t\t\t\t$self.el.progress_container.append('<div class=\"notice-wrap give-clearfix\"><span class=\"spinner is-active\"></span><div class=\"give-progress\"><div></div></div></div>');\n\t\t\t\t$self.el.progress_main_container.removeClass('give-hidden');\n\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\taction: 'give_run_db_updates',\n\t\t\t\t\t\trun_db_update: 1\n\t\t\t\t\t},\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: function success(response) {}\n\t\t\t\t});\n\n\t\t\t\twindow.setTimeout(Give_Updates.get_db_updates_info, 500, $self);\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t},\n\n\t\tget_db_updates_info: function get_db_updates_info($self) {\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: ajaxurl,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'give_db_updates_info'\n\t\t\t\t},\n\t\t\t\tdataType: 'json',\n\t\t\t\tsuccess: function success(response) {\n\t\t\t\t\t// We need to get the actual in progress form, not all forms on the page.\n\t\t\t\t\tvar notice_wrap = Give_Selector_Cache.get('.notice-wrap', $self.el.progress_container, true);\n\n\t\t\t\t\tif (-1 !== $.inArray('success', Object.keys(response))) {\n\t\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t\tif ($self.el.update_progress_counter.length) {\n\t\t\t\t\t\t\t\t$self.el.update_progress_counter.text('100%');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Update steps info.\n\t\t\t\t\t\t\tif (-1 !== $.inArray('heading', Object.keys(response.data))) {\n\t\t\t\t\t\t\t\t$self.el.heading.html('<strong>' + response.data.heading + '</strong>');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$self.el.update_link.closest('p').remove();\n\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-success is-dismissible\"><p>' + response.data.message + '</p><button type=\"button\" class=\"notice-dismiss\"></button></div>');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Update steps info.\n\t\t\t\t\t\t\tif (-1 !== $.inArray('heading', Object.keys(response.data))) {\n\t\t\t\t\t\t\t\t$self.el.heading.html('<strong>' + response.data.heading + '</strong>');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (response.data.message) {\n\t\t\t\t\t\t\t\t$self.el.update_link.closest('p').remove();\n\t\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-error is-dismissible\"><p>' + response.data.message + '</p><button type=\"button\" class=\"notice-dismiss\"></button></div>');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t\t$self.el.update_link.removeClass('active').show();\n\t\t\t\t\t\t\t\t\t$self.el.progress_main_container.addClass('give-hidden');\n\t\t\t\t\t\t\t\t}, 1000);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (response && -1 !== $.inArray('percentage', Object.keys(response.data))) {\n\t\t\t\t\t\t\tif ($self.el.update_progress_counter.length) {\n\t\t\t\t\t\t\t\t$self.el.update_progress_counter.text(response.data.total_percentage + '%');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Update steps info.\n\t\t\t\t\t\t\tif (-1 !== $.inArray('heading', Object.keys(response.data))) {\n\t\t\t\t\t\t\t\t$self.el.heading.html('<strong>' + response.data.heading + '</strong>');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Update progress.\n\t\t\t\t\t\t\t$('.give-progress div', '#give-db-updates').animate({\n\t\t\t\t\t\t\t\twidth: response.data.percentage + '%'\n\t\t\t\t\t\t\t}, 50, function () {\n\t\t\t\t\t\t\t\t// Animation complete.\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\twindow.setTimeout(Give_Updates.get_db_updates_info, 1000, $self);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-error\"><p>' + give_vars.updates.ajax_error + '</p></div>');\n\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t$self.el.update_link.removeClass('active').show();\n\t\t\t\t\t\t\t\t$self.el.progress_main_container.addClass('give-hidden');\n\t\t\t\t\t\t\t}, 1000);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tprocess_step: function process_step(step, update, $self) {\n\n\t\t\tgive_setting_edit = true;\n\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: ajaxurl,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'give_do_ajax_updates',\n\t\t\t\t\tstep: parseInt(step),\n\t\t\t\t\tupdate: parseInt(update)\n\t\t\t\t},\n\t\t\t\tdataType: 'json',\n\t\t\t\tsuccess: function success(response) {\n\t\t\t\t\tgive_setting_edit = false;\n\n\t\t\t\t\t// We need to get the actual in progress form, not all forms on the page.\n\t\t\t\t\tvar notice_wrap = Give_Selector_Cache.get('.notice-wrap', $self.el.progress_container, true);\n\n\t\t\t\t\tif (-1 !== $.inArray('success', Object.keys(response))) {\n\t\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t\t// Update steps info.\n\t\t\t\t\t\t\tif (-1 !== $.inArray('heading', Object.keys(response.data))) {\n\t\t\t\t\t\t\t\t$self.el.heading.html('<strong>' + response.data.heading + '</strong>');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$self.el.update_link.closest('p').remove();\n\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-success is-dismissible\"><p>' + response.data.message + '</p><button type=\"button\" class=\"notice-dismiss\"></button></div>');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Update steps info.\n\t\t\t\t\t\t\tif (-1 !== $.inArray('heading', Object.keys(response.data))) {\n\t\t\t\t\t\t\t\t$self.el.heading.html('<strong>' + response.data.heading + '</strong>');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-error\"><p>' + response.data.message + '</p></div>');\n\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t$self.el.update_link.removeClass('active').show();\n\t\t\t\t\t\t\t\t$self.el.progress_main_container.addClass('give-hidden');\n\t\t\t\t\t\t\t}, 5000);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (response && -1 !== $.inArray('percentage', Object.keys(response.data))) {\n\t\t\t\t\t\t\t// Update progress.\n\t\t\t\t\t\t\t$('.give-progress div', '#give-db-updates').animate({\n\t\t\t\t\t\t\t\twidth: response.data.percentage + '%'\n\t\t\t\t\t\t\t}, 50, function () {\n\t\t\t\t\t\t\t\t// Animation complete.\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// Update steps info.\n\t\t\t\t\t\t\tif (-1 !== $.inArray('heading', Object.keys(response.data))) {\n\t\t\t\t\t\t\t\t$self.el.heading.html('<strong>' + response.data.heading.replace('{update_count}', $self.el.heading.data('update-count')) + '</strong>');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$self.process_step(parseInt(response.data.step), response.data.update, $self);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-error\"><p>' + give_vars.updates.ajax_error + '</p></div>');\n\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t$self.el.update_link.removeClass('active').show();\n\t\t\t\t\t\t\t\t$self.el.progress_main_container.addClass('give-hidden');\n\t\t\t\t\t\t\t}, 5000);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).fail(function (response) {\n\n\t\t\t\tgive_setting_edit = false;\n\n\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\tconsole.log(response);\n\t\t\t\t}\n\n\t\t\t\tGive_Selector_Cache.get('.notice-wrap', self.el.progress_container).append(response.responseText);\n\t\t\t}).always(function () {});\n\t\t},\n\n\t\tdismiss_message: function dismiss_message() {\n\t\t\t$('body').on('click', '#poststuff .notice-dismiss', function () {\n\t\t\t\t$(this).parent().slideUp('fast');\n\t\t\t});\n\t\t}\n\n\t};\n\n\t/**\n * Give Upgrader\n */\n\tvar Give_Upgrades = {\n\t\tinit: function init() {\n\t\t\tthis.restartUpgrade();\n\t\t\tthis.stopUpgrade();\n\t\t\tthis.restartUpdater();\n\t\t},\n\n\t\t/**\n * Function to restart the upgrade process.\n */\n\t\trestartUpgrade: function restartUpgrade() {\n\t\t\tjQuery('#give-restart-upgrades').click('click', function (e) {\n\n\t\t\t\tvar that = this;\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\tjQuery('.give-doing-update-text-p').show();\n\t\t\t\tjQuery('.give-update-paused-text-p').hide();\n\n\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"a\" /* GiveConfirmModal */]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: give_vars.confirm_action,\n\t\t\t\t\t\tdesc: give_vars.restart_upgrade\n\t\t\t\t\t},\n\t\t\t\t\tsuccessConfirm: function successConfirm() {\n\t\t\t\t\t\twindow.location.assign(jQuery(that).data('redirect-url'));\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t});\n\t\t},\n\n\t\t/**\n * Function to pause the upgrade process.\n */\n\t\tstopUpgrade: function stopUpgrade() {\n\t\t\tjQuery('#give-pause-upgrades').click('click', function (e) {\n\t\t\t\tvar that = this;\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\tjQuery('.give-doing-update-text-p').hide();\n\t\t\t\tjQuery('.give-update-paused-text-p').show();\n\n\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"a\" /* GiveConfirmModal */]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: give_vars.confirm_action,\n\t\t\t\t\t\tdesc: give_vars.stop_upgrade\n\t\t\t\t\t},\n\t\t\t\t\tsuccessConfirm: function successConfirm() {\n\t\t\t\t\t\twindow.location.assign(jQuery(that).data('redirect-url'));\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t});\n\t\t},\n\n\t\t/**\n * Function to restart the update process.\n */\n\t\trestartUpdater: function restartUpdater() {\n\t\t\tjQuery('.give-restart-updater-btn,.give-run-update-now').click('click', function (e) {\n\n\t\t\t\tvar that = this;\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"a\" /* GiveConfirmModal */]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: give_vars.confirm_action,\n\t\t\t\t\t\tdesc: give_vars.restart_update\n\t\t\t\t\t},\n\t\t\t\t\tsuccessConfirm: function successConfirm() {\n\t\t\t\t\t\twindow.location.assign(jQuery(that).attr('href'));\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Admin Status Select Field Change\n *\n * @description: Handle status switching\n * @since: 1.0\n */\n\t};var handle_status_change = function handle_status_change() {\n\n\t\t$('select[name=\"give-payment-status\"]').on('change', function () {\n\n\t\t\tvar status = $(this).val();\n\n\t\t\t$('.give-donation-status').removeClass(function (index, css) {\n\t\t\t\treturn (css.match(/\\bstatus-\\S+/g) || []).join(' ');\n\t\t\t}).addClass('status-' + status);\n\t\t});\n\t};\n\n\t/**\n * Donor management screen JS\n */\n\tvar GiveDonor = {\n\n\t\tinit: function init() {\n\t\t\tthis.unlockDonorFields();\n\t\t\tthis.editDonor();\n\t\t\tthis.add_email();\n\t\t\tthis.removeUser();\n\t\t\tthis.cancelEdit();\n\t\t\tthis.add_note();\n\t\t\tthis.delete_checked();\n\t\t\tthis.addressesAction();\n\t\t\tthis.bulkDeleteDonor();\n\t\t\t$('body').on('click', '#give-donors-filter .bulkactions input[type=\"submit\"]', this.handleBulkActions);\n\t\t},\n\n\t\tunlockDonorFields: function unlockDonorFields(e) {\n\t\t\t$('body').on('click', '.give-lock-block', function (e) {\n\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"b\" /* GiveErrorAlert */]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: give_vars.unlock_donor_fields_title,\n\t\t\t\t\t\tdesc: give_vars.unlock_donor_fields_message,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t\te.preventDefault();\n\t\t\t});\n\t\t},\n\n\t\teditDonor: function editDonor() {\n\t\t\t$('body').on('click', '#edit-donor', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$('#give-donor-card-wrapper .editable').hide();\n\t\t\t\t$('#give-donor-card-wrapper .edit-item').fadeIn().css('display', 'block');\n\t\t\t});\n\t\t},\n\n\t\tremoveUser: function removeUser() {\n\t\t\t$('body').on('click', '#disconnect-donor', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tif (!confirm(give_vars.disconnect_user)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvar donorID = $('input[name=\"customerinfo[id]\"]').val();\n\n\t\t\t\tvar postData = {\n\t\t\t\t\tgive_action: 'disconnect-userid',\n\t\t\t\t\tcustomer_id: donorID,\n\t\t\t\t\t_wpnonce: $('#edit-donor-info #_wpnonce').val()\n\t\t\t\t};\n\n\t\t\t\t$.post(ajaxurl, postData, function (response) {\n\t\t\t\t\twindow.location.href = response.redirect;\n\t\t\t\t}, 'json');\n\t\t\t});\n\t\t},\n\n\t\tcancelEdit: function cancelEdit() {\n\t\t\t$('body').on('click', '#give-edit-donor-cancel', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$('#give-donor-card-wrapper .edit-item').hide();\n\t\t\t\t$('#give-donor-card-wrapper .editable').show();\n\t\t\t\t$('.give_user_search_results').html('');\n\t\t\t});\n\t\t},\n\n\t\tadd_note: function add_note() {\n\t\t\t$('body').on('click', '#add-donor-note', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar postData = {\n\t\t\t\t\tgive_action: 'add-donor-note',\n\t\t\t\t\tcustomer_id: $('#donor-id').val(),\n\t\t\t\t\tdonor_note: $('#donor-note').val(),\n\t\t\t\t\tadd_donor_note_nonce: $('#add_donor_note_nonce').val()\n\t\t\t\t};\n\n\t\t\t\tif (postData.donor_note) {\n\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\tdata: postData,\n\t\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\t\tsuccess: function success(response) {\n\t\t\t\t\t\t\t$('#give-donor-notes').prepend(response);\n\t\t\t\t\t\t\t$('.give-no-donor-notes').hide();\n\t\t\t\t\t\t\t$('#donor-note').val('');\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fail(function (data) {\n\t\t\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\t\t\tconsole.log(data);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tvar border_color = $('#donor-note').css('border-color');\n\t\t\t\t\t$('#donor-note').css('border-color', 'red');\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t$('#donor-note').css('border-color', border_color);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tdelete_checked: function delete_checked() {\n\t\t\t$('#give-donor-delete-confirm').change(function () {\n\t\t\t\tvar records_input = $('#give-donor-delete-records');\n\t\t\t\tvar submit_button = $('#give-delete-donor');\n\n\t\t\t\tif ($(this).prop('checked')) {\n\t\t\t\t\trecords_input.attr('disabled', false);\n\t\t\t\t\tsubmit_button.attr('disabled', false);\n\t\t\t\t} else {\n\t\t\t\t\trecords_input.attr('disabled', true);\n\t\t\t\t\trecords_input.prop('checked', false);\n\t\t\t\t\tsubmit_button.attr('disabled', true);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tadd_email: function add_email() {\n\t\t\tif (!$('#add-donor-email').length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$(document.body).on('click', '#add-donor-email', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar button = $(this);\n\t\t\t\tvar wrapper = button.parent();\n\n\t\t\t\twrapper.parent().find('.notice-wrap').remove();\n\t\t\t\twrapper.find('.spinner').css('visibility', 'visible');\n\t\t\t\tbutton.attr('disabled', true);\n\n\t\t\t\tvar customer_id = wrapper.find('input[name=\"donor-id\"]').val();\n\t\t\t\tvar email = wrapper.find('input[name=\"additional-email\"]').val();\n\t\t\t\tvar primary = wrapper.find('input[name=\"make-additional-primary\"]').is(':checked');\n\t\t\t\tvar nonce = wrapper.find('input[name=\"add_email_nonce\"]').val();\n\n\t\t\t\tvar postData = {\n\t\t\t\t\tgive_action: 'add_donor_email',\n\t\t\t\t\tcustomer_id: customer_id,\n\t\t\t\t\temail: email,\n\t\t\t\t\tprimary: primary,\n\t\t\t\t\t_wpnonce: nonce\n\t\t\t\t};\n\n\t\t\t\t$.post(ajaxurl, postData, function (response) {\n\n\t\t\t\t\tif (true === response.success) {\n\t\t\t\t\t\twindow.location.href = response.redirect;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbutton.attr('disabled', false);\n\t\t\t\t\t\twrapper.after('<div class=\"notice-wrap\"><div class=\"notice notice-error inline\"><p>' + response.message + '</p></div></div>');\n\t\t\t\t\t\twrapper.find('.spinner').css('visibility', 'hidden');\n\t\t\t\t\t}\n\t\t\t\t}, 'json');\n\t\t\t});\n\t\t},\n\n\t\taddressesAction: function addressesAction() {\n\t\t\tvar $obj = this,\n\t\t\t $addressWrapper = $('#donor-address-wrapper'),\n\t\t\t $allAddress = $('.all-address', $addressWrapper),\n\t\t\t $noAddressMessageWrapper = $('.give-no-address-message', $addressWrapper),\n\t\t\t $allAddressParent = $($allAddress).parent(),\n\t\t\t $addressForm = $('.address-form', $addressWrapper),\n\t\t\t $addressFormCancelBtn = $('.js-cancel', $addressForm),\n\t\t\t $addressFormCountryField = $('select[name=\"country\"]', $addressForm),\n\t\t\t $addNewAddressBtn = $('.add-new-address', $addressWrapper),\n\t\t\t donorID = parseInt($('input[name=\"donor-id\"]').val());\n\n\t\t\t$addressFormCountryField.on('change', function () {\n\t\t\t\t$(this).trigger('chosen:updated');\n\t\t\t});\n\n\t\t\t// Edit current address button event.\n\t\t\t$allAddress.on('click', '.js-edit', function (e) {\n\t\t\t\tvar $parent = $(this).closest('.address');\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\t// Remove notice.\n\t\t\t\t$('.notice', $allAddressParent).remove();\n\n\t\t\t\t$obj.__set_address_form_val($parent);\n\t\t\t\t$obj.__set_address_form_action('update', $parent.data('address-id'));\n\n\t\t\t\t$addNewAddressBtn.hide();\n\t\t\t\t$allAddress.addClass('give-hidden');\n\t\t\t\t$addressForm.removeClass('add-new-address-form-hidden');\n\t\t\t\t$addressForm.data('process', 'update');\n\t\t\t});\n\n\t\t\t// Remove address button event.\n\t\t\t$allAddress.on('click', '.js-remove', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvar $parent = $(this).closest('.address');\n\n\t\t\t\t// Remove notice.\n\t\t\t\t$('.notice', $allAddressParent).remove();\n\n\t\t\t\t$addressForm.data('changed', true);\n\t\t\t\t$obj.__set_address_form_val($parent);\n\t\t\t\t$obj.__set_address_form_action('remove', $parent.data('address-id'));\n\n\t\t\t\t$addressForm.trigger('submit');\n\t\t\t});\n\n\t\t\t// Add new address button event.\n\t\t\t$addNewAddressBtn.on('click', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t// Remove notice.\n\t\t\t\t$('.notice', $allAddressParent).remove();\n\n\t\t\t\t$(this).hide();\n\t\t\t\t$allAddress.addClass('give-hidden');\n\t\t\t\t$addressForm.removeClass('add-new-address-form-hidden');\n\t\t\t\t$obj.__set_address_form_action('add');\n\n\t\t\t\t$obj.__set_address_form_action();\n\t\t\t});\n\n\t\t\t// Cancel add new address form button event.\n\t\t\t$addressFormCancelBtn.on('click', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t// Reset form.\n\t\t\t\t$addressForm.find('input[type=\"text\"]').val('');\n\n\t\t\t\t$addNewAddressBtn.show();\n\t\t\t\t$allAddress.removeClass('give-hidden');\n\t\t\t\t$addressForm.addClass('add-new-address-form-hidden');\n\t\t\t});\n\n\t\t\t// Save address.\n\t\t\t$addressForm.on('change', function () {\n\t\t\t\t$(this).data('changed', true);\n\t\t\t}).on('submit', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvar $this = $(this);\n\n\t\t\t\t// Remove notice.\n\t\t\t\t$('.notice', $allAddressParent).remove();\n\n\t\t\t\t// Do not send ajax if form does not change.\n\t\t\t\tif (!$(this).data('changed')) {\n\t\t\t\t\t$addNewAddressBtn.show();\n\t\t\t\t\t$allAddress.removeClass('give-hidden');\n\t\t\t\t\t$addressForm.addClass('add-new-address-form-hidden');\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\taction: 'donor_manage_addresses',\n\t\t\t\t\t\tdonorID: donorID,\n\t\t\t\t\t\tform: $('form', $addressForm).serialize()\n\t\t\t\t\t},\n\t\t\t\t\tbeforeSend: function beforeSend() {\n\t\t\t\t\t\tgiveAjaxLoader($addressWrapper, { show: true });\n\t\t\t\t\t},\n\t\t\t\t\tsuccess: function success(response) {\n\t\t\t\t\t\tgiveAjaxLoader($addressWrapper);\n\n\t\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t\tvar parent;\n\n\t\t\t\t\t\t\tswitch (response.data.action) {\n\t\t\t\t\t\t\t\tcase 'add':\n\t\t\t\t\t\t\t\t\t$('.give-grid-row', $allAddress).append(response.data.address_html);\n\n\t\t\t\t\t\t\t\t\tif (!$noAddressMessageWrapper.hasClass('give-hidden') && $('div.give-grid-col-4', $allAddress).length) {\n\t\t\t\t\t\t\t\t\t\t$noAddressMessageWrapper.addClass('give-hidden');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'remove':\n\t\t\t\t\t\t\t\t\tparent = $allAddress.find('div[data-address-id*=\"' + response.data.id + '\"]').parent();\n\n\t\t\t\t\t\t\t\t\tif (parent.length) {\n\t\t\t\t\t\t\t\t\t\tparent.animate({ 'margin-left': '-999' }, 1000, function () {\n\t\t\t\t\t\t\t\t\t\t\tparent.remove();\n\n\t\t\t\t\t\t\t\t\t\t\tif ($noAddressMessageWrapper.hasClass('give-hidden') && !$('div.give-grid-col-4', $allAddress).length) {\n\t\t\t\t\t\t\t\t\t\t\t\t$noAddressMessageWrapper.removeClass('give-hidden');\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'update':\n\t\t\t\t\t\t\t\t\tparent = $allAddress.find('div[data-address-id*=\"' + response.data.id + '\"]').parent();\n\t\t\t\t\t\t\t\t\tvar $prevParent = parent.prev(),\n\t\t\t\t\t\t\t\t\t $nextParent = {},\n\t\t\t\t\t\t\t\t\t is_address_added = false;\n\n\t\t\t\t\t\t\t\t\tif (parseInt($('.give-grid-row>div', $allAddress).length) < 2) {\n\t\t\t\t\t\t\t\t\t\t$('.give-grid-row', $allAddress).append(response.data.address_html);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tif ($prevParent.length) {\n\t\t\t\t\t\t\t\t\t\t\t$prevParent.after(response.data.address_html);\n\t\t\t\t\t\t\t\t\t\t\tis_address_added = true;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif (!is_address_added) {\n\t\t\t\t\t\t\t\t\t\t\t$nextParent = parent.next();\n\n\t\t\t\t\t\t\t\t\t\t\tif ($nextParent.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t$nextParent.before(response.data.address_html);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tparent.remove();\n\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$allAddressParent.prepend(response.data.success_msg);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$allAddressParent.prepend(response.data.error_msg);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tdataType: 'json'\n\t\t\t\t}).always(function () {\n\t\t\t\t\t$this.data('changed', false);\n\n\t\t\t\t\t// Reset form.\n\t\t\t\t\t$addressForm.find('input[type=\"text\"]').val('');\n\n\t\t\t\t\t$addNewAddressBtn.show();\n\t\t\t\t\t$allAddress.removeClass('give-hidden');\n\t\t\t\t\t$addressForm.addClass('add-new-address-form-hidden');\n\t\t\t\t});\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t},\n\n\t\t__set_address_form_action: function __set_address_form_action(addressAction, addressID) {\n\t\t\tvar $addressWrapper = $('#donor-address-wrapper'),\n\t\t\t $addressForm = $('.address-form', $addressWrapper),\n\t\t\t $addressActionField = $('input[name=\"address-action\"]', $addressForm),\n\t\t\t $addressIDField = $('input[name=\"address-id\"]', $addressForm);\n\n\t\t\taddressAction = addressAction || 'add';\n\t\t\taddressID = addressID || 'billing';\n\n\t\t\t$addressActionField.val(addressAction);\n\t\t\t$addressIDField.val(addressID);\n\t\t},\n\n\t\t__set_address_form_val: function __set_address_form_val($form) {\n\t\t\tvar $addressWrapper = $('#donor-address-wrapper'),\n\t\t\t $addressForm = $('.address-form', $addressWrapper),\n\t\t\t state = $('[data-address-type=\"state\"]', $form).text().substr(2).trim(); // State will be like \", HR\".\n\n\t\t\tif ($('select[name=\"country\"]', $addressForm).val().trim() !== $('[data-address-type=\"country\"]', $form).text().trim()) {\n\t\t\t\t$('select[name=\"country\"]', $addressForm).val($('[data-address-type=\"country\"]', $form).text().trim()).trigger('chosen:updated').change();\n\n\t\t\t\t// Update state after some time because state load by ajax for each country.\n\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t$('[name=\"state\"]', $addressForm).val(state).trigger('chosen:updated');\n\t\t\t\t}, 500);\n\t\t\t} else {\n\t\t\t\t$('[name=\"state\"]', $addressForm).val(state).trigger('chosen:updated');\n\t\t\t}\n\n\t\t\t$('input[name=\"line1\"]', $addressForm).val($('[data-address-type=\"line1\"]', $form).text().trim());\n\t\t\t$('input[name=\"line2\"]', $addressForm).val($('[data-address-type=\"line2\"]', $form).text().trim());\n\t\t\t$('input[name=\"city\"]', $addressForm).val($('[data-address-type=\"city\"]', $form).text().trim());\n\t\t\t$('input[name=\"zip\"]', $addressForm).val($('[data-address-type=\"zip\"]', $form).text().trim());\n\t\t},\n\n\t\tbulkDeleteDonor: function bulkDeleteDonor() {\n\t\t\tvar $body = $('body');\n\n\t\t\t// Cancel button click event for donor.\n\t\t\t$body.on('click', '#give-bulk-delete-cancel', function (e) {\n\t\t\t\t$(this).closest('tr').hide();\n\t\t\t\t$('.give-skip-donor').trigger('click');\n\t\t\t\te.preventDefault();\n\t\t\t});\n\n\t\t\t// Select All checkbox.\n\t\t\t$body.on('click', '#cb-select-all-1, #cb-select-all-2', function () {\n\n\t\t\t\tvar selectAll = $(this);\n\n\t\t\t\t// Loop through donor selector checkbox.\n\t\t\t\t$.each($('.donor-selector'), function () {\n\n\t\t\t\t\tvar donorId = $(this).val(),\n\t\t\t\t\t donorName = $(this).data('name'),\n\t\t\t\t\t donorHtml = '<div id=\"give-donor-' + donorId + '\" data-id=\"' + donorId + '\">' + '<a class=\"give-skip-donor\" title=\"' + give_vars.remove_from_bulk_delete + '\">X</a>' + donorName + '</div>';\n\n\t\t\t\t\tif (selectAll.is(':checked') && !$(this).is(':checked')) {\n\t\t\t\t\t\t$('#give-bulk-donors').append(donorHtml);\n\t\t\t\t\t} else if (!selectAll.is(':checked')) {\n\t\t\t\t\t\t$('#give-bulk-donors').find('#give-donor-' + donorId).remove();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// On checking checkbox, add to bulk delete donor.\n\t\t\t$body.on('click', '.donor-selector', function () {\n\t\t\t\tvar donorId = $(this).val(),\n\t\t\t\t donorName = $(this).data('name'),\n\t\t\t\t donorHtml = '<div id=\"give-donor-' + donorId + '\" data-id=\"' + donorId + '\">' + '<a class=\"give-skip-donor\" title=\"' + give_vars.remove_from_bulk_delete + '\">X</a>' + donorName + '</div>';\n\n\t\t\t\tif ($(this).is(':checked')) {\n\t\t\t\t\t$('#give-bulk-donors').prepend(donorHtml);\n\t\t\t\t} else {\n\t\t\t\t\t$('#give-bulk-donors').find('#give-donor-' + donorId).remove();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// CheckBox click event to confirm deletion of donor.\n\t\t\t$body.on('click', '#give-delete-donor-confirm', function () {\n\t\t\t\tif ($(this).is(':checked')) {\n\t\t\t\t\t$('#give-bulk-delete-button').removeAttr('disabled');\n\t\t\t\t} else {\n\t\t\t\t\t$('#give-bulk-delete-button').attr('disabled', true);\n\t\t\t\t\t$('#give-delete-donor-records').removeAttr('checked');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// CheckBox click event to delete records with donor.\n\t\t\t$body.on('click', '#give-delete-donor-records', function () {\n\t\t\t\tif ($(this).is(':checked')) {\n\t\t\t\t\t$('#give-delete-donor-confirm').attr('checked', 'checked');\n\t\t\t\t\t$('#give-bulk-delete-button').removeAttr('disabled');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Skip Donor from Bulk Delete List.\n\t\t\t$body.on('click', '.give-skip-donor', function () {\n\t\t\t\tvar donorId = $(this).closest('div').data('id');\n\t\t\t\t$('#give-donor-' + donorId).remove();\n\t\t\t\t$('#donor-' + donorId).find('input[type=\"checkbox\"]').removeAttr('checked');\n\t\t\t});\n\n\t\t\t// Clicking Event to Delete Single Donor.\n\t\t\t$body.on('click', '.give-single-donor-delete', function (e) {\n\t\t\t\tvar donorId = $(this).data('id'),\n\t\t\t\t donorSelector = $('tr#donor-' + donorId).find('.donor-selector'),\n\t\t\t\t selectAll = $('[id^=\"cb-select-all-\"]'),\n\t\t\t\t bulkDeleteList = $('#give-bulk-donors'),\n\t\t\t\t donorName = donorSelector.data('name'),\n\t\t\t\t donorHtml = '<div id=\"give-donor-' + donorId + '\" data-id=\"' + donorId + '\">' + '<a class=\"give-skip-donor\" title=\"' + give_vars.remove_from_bulk_delete + '\">X</a>' + donorName + '</div>';\n\n\t\t\t\t// Reset Donors List.\n\t\t\t\tbulkDeleteList.html('');\n\n\t\t\t\t// Check whether the select all donor checkbox is already set, then unset it.\n\t\t\t\tif (selectAll.is(':checked')) {\n\t\t\t\t\tselectAll.removeAttr('checked');\n\t\t\t\t}\n\n\t\t\t\t// Select the donor checkbox for which delete is clicked and others should be de-selected.\n\t\t\t\t$('.donor-selector').removeAttr('checked');\n\t\t\t\tdonorSelector.attr('checked', 'checked');\n\n\t\t\t\t// Add Donor to the Bulk Delete List, if donor doesn't exists in the list.\n\t\t\t\tif ($('#give-donor-' + donorId).length === 0) {\n\t\t\t\t\tbulkDeleteList.prepend(donorHtml);\n\t\t\t\t\t$('#give-bulk-delete').slideDown();\n\t\t\t\t}\n\n\t\t\t\te.preventDefault();\n\t\t\t});\n\t\t},\n\n\t\thandleBulkActions: function handleBulkActions(e) {\n\t\t\tvar currentAction = $(this).closest('.tablenav').find('select').val(),\n\t\t\t donors = [],\n\t\t\t selectBulkActionNotice = give_vars.donors_bulk_action.no_action_selected,\n\t\t\t confirmActionNotice = give_vars.donors_bulk_action.no_donor_selected;\n\n\t\t\t$.each($('.donor-selector:checked'), function () {\n\t\t\t\tdonors.push($(this).val());\n\t\t\t});\n\n\t\t\t// If there is no bulk action selected then show an alert message.\n\t\t\tif ('-1' === currentAction) {\n\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"d\" /* GiveWarningAlert */]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: selectBulkActionNotice.title,\n\t\t\t\t\t\tdesc: selectBulkActionNotice.desc,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// If there is no donor selected then show an alert.\n\t\t\tif (!parseInt(donors)) {\n\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"d\" /* GiveWarningAlert */]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: confirmActionNotice.title,\n\t\t\t\t\t\tdesc: confirmActionNotice.desc,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ('delete' === currentAction) {\n\t\t\t\t$('#give-bulk-delete').slideDown();\n\t\t\t}\n\n\t\t\te.preventDefault();\n\t\t}\n\t};\n\n\t/**\n * API screen JS\n */\n\tvar API_Screen = {\n\n\t\tinit: function init() {\n\t\t\tthis.revoke_api_key();\n\t\t\tthis.regenerate_api_key();\n\t\t},\n\n\t\trevoke_api_key: function revoke_api_key() {\n\t\t\t$('body').on('click', '.give-revoke-api-key', function (e) {\n\t\t\t\treturn confirm(give_vars.revoke_api_key);\n\t\t\t});\n\t\t},\n\t\tregenerate_api_key: function regenerate_api_key() {\n\t\t\t$('body').on('click', '.give-regenerate-api-key', function (e) {\n\t\t\t\treturn confirm(give_vars.regenerate_api_key);\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n * Edit Donation form screen Js\n */\n\tvar Edit_Form_Screen = {\n\t\tinit: function init() {\n\t\t\tvar default_tab_id = $.query.get('give_tab').length ? $.query.get('give_tab') : 'form_field_options';\n\n\t\t\tthis.handle_metabox_tab_click();\n\t\t\tthis.setup_colorpicker_fields();\n\t\t\tthis.setup_media_fields();\n\t\t\tthis.setup_repeatable_fields();\n\t\t\tthis.handle_repeater_group_events();\n\n\t\t\t// Multi level repeater field js.\n\t\t\tthis.handle_multi_levels_repeater_group_events();\n\n\t\t\t// Set active tab on page load.\n\t\t\tthis.activate_tab($('a[href=\"#' + default_tab_id + '\"]'));\n\t\t},\n\n\t\t/**\n * Attach click event handler to tabs.\n */\n\t\thandle_metabox_tab_click: function handle_metabox_tab_click() {\n\t\t\tvar self = this;\n\t\t\tvar $tab_links = $('.give-metabox-tabs a');\n\n\t\t\t$tab_links.on('click', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar $this = $(this);\n\t\t\t\tself.activate_tab($this);\n\t\t\t\tself.update_query($this);\n\t\t\t});\n\t\t},\n\n\t\t/**\n * Set the active tab.\n */\n\t\tactivate_tab: function activate_tab($tab_link) {\n\t\t\tvar tab_id = $tab_link.data('tab-id'),\n\t\t\t $li_parent = $tab_link.parent(),\n\t\t\t $sub_field = $('ul.give-metabox-sub-tabs', $li_parent),\n\t\t\t has_sub_field = $sub_field.length,\n\t\t\t $tab_links = $('.give-metabox-tabs a'),\n\t\t\t $all_tab_links_li = $tab_links.parents('li'),\n\t\t\t $all_sub_fields = $('ul.give-metabox-sub-tabs'),\n\t\t\t in_sub_fields = $tab_link.parents('ul.give-metabox-sub-tabs').length;\n\n\t\t\t// Update active tab hidden field to maintain tab after save.\n\t\t\t$('#give_form_active_tab').val(tab_id);\n\n\t\t\tif (has_sub_field) {\n\t\t\t\t$li_parent.toggleClass('active');\n\t\t\t\t$sub_field.removeClass('give-hidden');\n\n\t\t\t\tvar $active_subtab_li = $('li.active', 'ul.give-metabox-sub-tabs');\n\n\t\t\t\t// Show hide sub fields if any and exit.\n\t\t\t\t$all_sub_fields.not($sub_field).addClass('give-hidden');\n\t\t\t\t$all_tab_links_li.not($li_parent).removeClass('active');\n\n\t\t\t\t$active_subtab_li.addClass('active');\n\t\t\t} else if (!in_sub_fields) {\n\t\t\t\t// Hide all tab and sub tabs.\n\t\t\t\t$all_tab_links_li.each(function (index, item) {\n\t\t\t\t\titem = $(item);\n\t\t\t\t\titem.removeClass('active');\n\n\t\t\t\t\tif (item.hasClass('has-sub-fields')) {\n\t\t\t\t\t\t$('ul.give-metabox-sub-tabs', item).addClass('give-hidden');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else if (in_sub_fields) {\n\t\t\t\t// Hide all sub tabs.\n\t\t\t\t$('ul.give-metabox-sub-tabs').addClass('give-hidden');\n\t\t\t\t$all_tab_links_li.removeClass('active');\n\n\t\t\t\t// Hide all tab inside sub tabs.\n\t\t\t\t$tab_link.parents('ul.give-metabox-sub-tabs').removeClass('give-hidden').children('li').removeClass('active');\n\n\t\t\t\t// Add active class to parent li.\n\t\t\t\t$tab_link.parents('li.has-sub-fields').addClass('active');\n\t\t\t}\n\n\t\t\t// Add active class to current tab link.\n\t\t\t$tab_link.parent().addClass('active');\n\n\t\t\t// Hide all tab contents.\n\t\t\t$('.give_options_panel').removeClass('active');\n\n\t\t\t// Show tab content.\n\t\t\t$($tab_link.attr('href')).addClass('active');\n\t\t},\n\n\t\t/**\n * Update query string with active tab ID.\n */\n\t\tupdate_query: function update_query($tab_link) {\n\t\t\tvar tab_id = $tab_link.data('tab-id');\n\t\t\tvar new_query = $.query.set('give_tab', tab_id).remove('message').toString();\n\n\t\t\tif (history.replaceState) {\n\t\t\t\thistory.replaceState(null, null, new_query);\n\t\t\t}\n\t\t},\n\n\t\t/**\n * Initialize colorpicker.\n */\n\t\tsetup_colorpicker_fields: function setup_colorpicker_fields() {\n\t\t\t$(document).ready(function () {\n\t\t\t\tvar $colorpicker_fields = $('.give-colorpicker');\n\n\t\t\t\tif ($colorpicker_fields.length) {\n\t\t\t\t\t$colorpicker_fields.each(function (index, item) {\n\t\t\t\t\t\tvar $item = $(item);\n\n\t\t\t\t\t\t// Bailout: do not automatically initialize color picker for repeater field group template.\n\t\t\t\t\t\tif ($item.parents('.give-template').length) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$item.wpColorPicker();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tsetup_media_fields: function setup_media_fields() {\n\t\t\tvar give_media_uploader,\n\t\t\t $give_upload_button,\n\t\t\t $body = $('body');\n\n\t\t\t/**\n * Set media modal.\n */\n\t\t\t$body.on('click', '.give-upload-button', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar $media_modal_config = {};\n\n\t\t\t\t// Cache input field.\n\t\t\t\t$give_upload_button = $(this);\n\n\t\t\t\t// Set modal config.\n\t\t\t\tswitch ($(this).data('field-type')) {\n\t\t\t\t\tcase 'media':\n\t\t\t\t\t\t$media_modal_config = {\n\t\t\t\t\t\t\ttitle: give_vars.metabox_fields.media.button_title,\n\t\t\t\t\t\t\tbutton: { text: give_vars.metabox_fields.media.button_title },\n\t\t\t\t\t\t\tmultiple: false, // Set to true to allow multiple files to be selected.\n\t\t\t\t\t\t\tlibrary: { type: 'image' }\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$media_modal_config = {\n\t\t\t\t\t\t\ttitle: give_vars.metabox_fields.file.button_title,\n\t\t\t\t\t\t\tbutton: { text: give_vars.metabox_fields.file.button_title },\n\t\t\t\t\t\t\tmultiple: false\n\t\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tvar editing = jQuery(this).closest('.give-field-wrap').find('.give-input-field').attr('editing');\n\t\t\t\tif ('undefined' !== typeof editing) {\n\t\t\t\t\twp.media.controller.Library.prototype.defaults.contentUserSetting = false;\n\t\t\t\t}\n\n\t\t\t\tvar $library = jQuery(this).closest('.give-field-wrap').find('.give-input-field').attr('library');\n\t\t\t\tif ('undefined' !== typeof $library && '' !== $library) {\n\t\t\t\t\t$media_modal_config.library = { type: $library };\n\t\t\t\t}\n\n\t\t\t\t// Extend the wp.media object.\n\t\t\t\tgive_media_uploader = wp.media($media_modal_config);\n\n\t\t\t\t// When a file is selected, grab the URL and set it as the text field's value.\n\t\t\t\tgive_media_uploader.on('select', function () {\n\t\t\t\t\tvar attachment = give_media_uploader.state().get('selection').first().toJSON(),\n\t\t\t\t\t $input_field = $give_upload_button.prev(),\n\t\t\t\t\t fvalue = 'id' === $give_upload_button.data('fvalue') ? attachment.id : attachment.url;\n\n\t\t\t\t\t$body.trigger('give_media_inserted', [attachment, $input_field]);\n\n\t\t\t\t\t// Set input field value.\n\t\t\t\t\t$input_field.val(fvalue);\n\n\t\t\t\t\t// Update attachment id field value if fvalue is not set to id.\n\t\t\t\t\tif ('id' !== $give_upload_button.data('fvalue')) {\n\t\t\t\t\t\tvar attachment_id_field_name = 'input[name=\"' + $input_field.attr('name') + '_id\"]',\n\t\t\t\t\t\t id_field = $input_field.closest('tr').next('tr').find(attachment_id_field_name);\n\n\t\t\t\t\t\tif (id_field.length) {\n\t\t\t\t\t\t\t$input_field.closest('tr').next('tr').find(attachment_id_field_name).val(attachment.id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Open the uploader dialog.\n\t\t\t\tgive_media_uploader.open();\n\t\t\t});\n\n\t\t\t/**\n * Show image preview.\n */\n\t\t\t$body.on('give_media_inserted', function (e, attachment) {\n\t\t\t\tvar $parent = $give_upload_button.parents('.give-field-wrap'),\n\t\t\t\t $image_container = $('.give-image-thumb', $parent);\n\n\t\t\t\t// Bailout.\n\t\t\t\tif (!$image_container.length) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Bailout and hide preview.\n\t\t\t\tif ('image' !== attachment.type) {\n\t\t\t\t\t$image_container.addClass('give-hidden');\n\t\t\t\t\t$('img', $image_container).attr('src', '');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Set the attachment URL to our custom image input field.\n\t\t\t\t$image_container.find('img').attr('src', attachment.url);\n\n\t\t\t\t// Hide the add image link.\n\t\t\t\t$image_container.removeClass('give-hidden');\n\t\t\t});\n\n\t\t\t/**\n * Delete Image Link.\n */\n\t\t\t$('span.give-delete-image-thumb', '.give-image-thumb').on('click', function (event) {\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tvar $parent = $(this).parents('.give-field-wrap'),\n\t\t\t\t $image_container = $(this).parent(),\n\t\t\t\t $image_input_field = $('input[type=\"text\"]', $parent);\n\n\t\t\t\t// Clear out the preview image.\n\t\t\t\t$image_container.addClass('give-hidden');\n\n\t\t\t\t// Remove image link from input field.\n\t\t\t\t$image_input_field.val('');\n\n\t\t\t\t// Hide the add image link.\n\t\t\t\t$('img', $image_container).attr('src', '');\n\t\t\t});\n\t\t},\n\n\t\t/**\n * Setup repeater field.\n */\n\t\tsetup_repeatable_fields: function setup_repeatable_fields() {\n\t\t\tjQuery(function () {\n\t\t\t\tjQuery('.give-repeatable-field-section').each(function () {\n\t\t\t\t\tvar $this = $(this);\n\n\t\t\t\t\t// Note: Do not change option params, it can break repeatable fields functionality.\n\t\t\t\t\tvar options = {\n\t\t\t\t\t\twrapper: '.give-repeatable-fields-section-wrapper',\n\t\t\t\t\t\tcontainer: '.container',\n\t\t\t\t\t\trow: '.give-row',\n\t\t\t\t\t\tadd: '.give-add-repeater-field-section-row',\n\t\t\t\t\t\tremove: '.give-remove',\n\t\t\t\t\t\tmove: '.give-move',\n\t\t\t\t\t\ttemplate: '.give-template',\n\t\t\t\t\t\tconfirm_before_remove_row: true,\n\t\t\t\t\t\tconfirm_before_remove_row_text: give_vars.confirm_before_remove_row_text,\n\t\t\t\t\t\tis_sortable: true,\n\t\t\t\t\t\tbefore_add: null,\n\t\t\t\t\t\tafter_add: handle_metabox_repeater_field_row_count,\n\t\t\t\t\t\t//after_add: after_add, Note: after_add is internal function in repeatable-fields.js. Uncomment this can cause of js error.\n\t\t\t\t\t\tbefore_remove: null,\n\t\t\t\t\t\tafter_remove: handle_metabox_repeater_field_row_remove,\n\t\t\t\t\t\tsortable_options: {\n\t\t\t\t\t\t\tplaceholder: 'give-ui-placeholder-state-highlight',\n\t\t\t\t\t\t\tstart: function start(event, ui) {\n\t\t\t\t\t\t\t\t$('body').trigger('repeater_field_sorting_start', [ui.item]);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tstop: function stop(event, ui) {\n\t\t\t\t\t\t\t\t$('body').trigger('repeater_field_sorting_stop', [ui.item]);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tupdate: function update(event, ui) {\n\t\t\t\t\t\t\t\t// Do not allow any row at position 0.\n\t\t\t\t\t\t\t\tif (ui.item.next().hasClass('give-template')) {\n\t\t\t\t\t\t\t\t\tui.item.next().after(ui.item);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tvar $rows = $('.give-row', $this).not('.give-template');\n\n\t\t\t\t\t\t\t\tif ($rows.length) {\n\t\t\t\t\t\t\t\t\tvar row_count = 1;\n\t\t\t\t\t\t\t\t\t$rows.each(function (index, item) {\n\t\t\t\t\t\t\t\t\t\t// Set name for fields.\n\t\t\t\t\t\t\t\t\t\tvar $fields = $('.give-field, label', $(item));\n\n\t\t\t\t\t\t\t\t\t\tif ($fields.length) {\n\t\t\t\t\t\t\t\t\t\t\t$fields.each(function () {\n\t\t\t\t\t\t\t\t\t\t\t\tvar $parent = $(this).parents('.give-field-wrap'),\n\t\t\t\t\t\t\t\t\t\t\t\t $currentElement = $(this);\n\n\t\t\t\t\t\t\t\t\t\t\t\t$.each(this.attributes, function (index, element) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar old_class_name_prefix = this.value.replace(/\\[/g, '_').replace(/]/g, ''),\n\t\t\t\t\t\t\t\t\t\t\t\t\t old_class_name = old_class_name_prefix + '_field',\n\t\t\t\t\t\t\t\t\t\t\t\t\t new_class_name = '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t new_class_name_prefix = '';\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Bailout.\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!this.value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Reorder index.\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.value = this.value.replace(/\\[\\d+\\]/g, '[' + (row_count - 1) + ']');\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew_class_name_prefix = this.value.replace(/\\[/g, '_').replace(/]/g, '');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Update class name.\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($parent.hasClass(old_class_name)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew_class_name = new_class_name_prefix + '_field';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$parent.removeClass(old_class_name).addClass(new_class_name);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Update field id.\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (old_class_name_prefix == $currentElement.attr('id')) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$currentElement.attr('id', new_class_name_prefix);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\trow_count++;\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t// Fire event.\n\t\t\t\t\t\t\t\t\t$this.trigger('repeater_field_row_reordered', [ui.item]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//row_count_placeholder: '{{row-count-placeholder}}' Note: do not modify this param otherwise it will break repeatable field functionality.\n\t\t\t\t\t\t} };\n\n\t\t\t\t\tjQuery(this).repeatable_fields(options);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\n\t\t/**\n * Handle repeater field events.\n */\n\t\thandle_repeater_group_events: function handle_repeater_group_events() {\n\t\t\tvar $repeater_fields = $('.give-repeatable-field-section'),\n\t\t\t $body = $('body');\n\n\t\t\t// Auto toggle repeater group\n\t\t\t$body.on('click', '.give-row-head button', function () {\n\t\t\t\tvar $parent = $(this).closest('tr');\n\t\t\t\t$parent.toggleClass('closed');\n\t\t\t\t$('.give-row-body', $parent).toggle();\n\t\t\t});\n\n\t\t\t// Reset header title when new row added.\n\t\t\t$repeater_fields.on('repeater_field_new_row_added repeater_field_row_deleted repeater_field_row_reordered', function () {\n\t\t\t\thandle_repeater_group_add_number_suffix($(this));\n\t\t\t});\n\n\t\t\t// Disable editor when sorting start.\n\t\t\t$body.on('repeater_field_sorting_start', function (e, row) {\n\t\t\t\tvar $textarea = $('.wp-editor-area', row);\n\n\t\t\t\tif ($textarea.length) {\n\t\t\t\t\t$textarea.each(function (index, item) {\n\t\t\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t\t\ttinyMCE.execCommand('mceRemoveEditor', true, $(item).attr('id'));\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Enable editor when sorting stop.\n\t\t\t$body.on('repeater_field_sorting_stop', function (e, row) {\n\t\t\t\tvar $textarea = $('.wp-editor-area', row);\n\n\t\t\t\tif ($textarea.length) {\n\t\t\t\t\t$textarea.each(function (index, item) {\n\t\t\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t\t\tvar textarea_id = $(item).attr('id');\n\t\t\t\t\t\t\ttinyMCE.execCommand('mceAddEditor', true, textarea_id);\n\n\t\t\t\t\t\t\t// Switch editor to tmce mode to fix some glitch which appear when you reorder rows.\n\t\t\t\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t\t\t\t// Hack to show tmce mode.\n\t\t\t\t\t\t\t\tswitchEditors.go(textarea_id, 'html');\n\t\t\t\t\t\t\t\t$('#' + textarea_id + '-tmce').trigger('click');\n\t\t\t\t\t\t\t}, 100);\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Process jobs on document load for repeater fields.\n\t\t\t$repeater_fields.each(function (index, item) {\n\t\t\t\t// Reset title on document load for already exist groups.\n\t\t\t\tvar $item = $(item);\n\t\t\t\thandle_repeater_group_add_number_suffix($item);\n\n\t\t\t\t// Close all tabs when page load.\n\t\t\t\tif (parseInt($item.data('close-tabs'))) {\n\t\t\t\t\t$('.give-row-head button', $item).trigger('click');\n\t\t\t\t\t$('.give-template', $item).removeClass('closed');\n\t\t\t\t\t$('.give-template .give-row-body', $item).show();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Setup colorpicker field when row added.\n\t\t\t$repeater_fields.on('repeater_field_new_row_added', function (e, container, new_row) {\n\t\t\t\t$('.give-colorpicker', $(this)).each(function (index, item) {\n\t\t\t\t\tvar $item = $(item);\n\n\t\t\t\t\t// Bailout: skip already init colorpocker fields.\n\t\t\t\t\tif ($item.parents('.wp-picker-container').length || $item.parents('.give-template').length) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t$item.wpColorPicker();\n\t\t\t\t});\n\n\t\t\t\t// Load WordPress editor by ajax.\n\t\t\t\tvar wysiwyg_editor_container = $('div[data-wp-editor]', new_row);\n\n\t\t\t\tif (wysiwyg_editor_container.length) {\n\t\t\t\t\twysiwyg_editor_container.each(function (index, item) {\n\t\t\t\t\t\tvar $item = $(item),\n\t\t\t\t\t\t wysiwyg_editor = $('.wp-editor-wrap', $item),\n\t\t\t\t\t\t textarea = $('textarea', $item),\n\t\t\t\t\t\t textarea_id = 'give_wysiwyg_unique_' + Math.random().toString().replace('.', '_'),\n\t\t\t\t\t\t wysiwyg_editor_label = wysiwyg_editor.prev();\n\n\t\t\t\t\t\ttextarea.attr('id', textarea_id);\n\n\t\t\t\t\t\t$.post(ajaxurl, {\n\t\t\t\t\t\t\taction: 'give_load_wp_editor',\n\t\t\t\t\t\t\twp_editor: $item.data('wp-editor'),\n\t\t\t\t\t\t\twp_editor_id: textarea_id,\n\t\t\t\t\t\t\ttextarea_name: $('textarea', $item).attr('name')\n\t\t\t\t\t\t}, function (res) {\n\t\t\t\t\t\t\twysiwyg_editor.remove();\n\t\t\t\t\t\t\twysiwyg_editor_label.after(res);\n\n\t\t\t\t\t\t\t// Setup qt data for editor.\n\t\t\t\t\t\t\ttinyMCEPreInit.qtInit[textarea.attr('id')] = $.extend(true, tinyMCEPreInit.qtInit['_give_agree_text'], { id: textarea_id });\n\n\t\t\t\t\t\t\t// Setup mce data for editor.\n\t\t\t\t\t\t\ttinyMCEPreInit.mceInit[textarea_id] = $.extend(true, tinyMCEPreInit.mceInit['_give_agree_text'], {\n\t\t\t\t\t\t\t\tbody_class: textarea_id + ' post-type-give_forms post-status-publish locale-' + tinyMCEPreInit.mceInit['_give_agree_text']['wp_lang_attr'].toLowerCase(),\n\t\t\t\t\t\t\t\tselector: '#' + textarea_id\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// Setup editor.\n\t\t\t\t\t\t\ttinymce.init(tinyMCEPreInit.mceInit[textarea_id]);\n\t\t\t\t\t\t\tquicktags(tinyMCEPreInit.qtInit[textarea_id]);\n\t\t\t\t\t\t\tQTags._buttonsInit();\n\n\t\t\t\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t\t\t\t// Hack to show tmce mode.\n\t\t\t\t\t\t\t\tswitchEditors.go(textarea_id, 'html');\n\t\t\t\t\t\t\t\t$('#' + textarea_id + '-tmce').trigger('click');\n\t\t\t\t\t\t\t}, 100);\n\n\t\t\t\t\t\t\tif (!window.wpActiveEditor) {\n\t\t\t\t\t\t\t\twindow.wpActiveEditor = textarea_id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n * Handle events for multi level repeater group.\n */\n\t\thandle_multi_levels_repeater_group_events: function handle_multi_levels_repeater_group_events() {\n\t\t\tvar $repeater_fields = $('#_give_donation_levels_field');\n\n\t\t\t// Add level title as suffix to header title when admin add level title.\n\t\t\t$('body').on('keyup', '.give-multilevel-text-field', function () {\n\t\t\t\tvar $parent = $(this).closest('tr'),\n\t\t\t\t $header_title_container = $('.give-row-head h2 span', $parent),\n\t\t\t\t donation_level_header_text_prefix = $header_title_container.data('header-title');\n\n\t\t\t\t// Donation level header already set.\n\t\t\t\tif ($(this).val() && $(this).val() === $header_title_container.html()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ($(this).val()) {\n\t\t\t\t\t// Change donaiton level header text.\n\t\t\t\t\t$header_title_container.html(donation_level_header_text_prefix + ': ' + $(this).val());\n\t\t\t\t} else {\n\t\t\t\t\t// Reset donation level header heading text.\n\t\t\t\t\t$header_title_container.html(donation_level_header_text_prefix);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Add level title as suffix to header title on document load.\n\t\t\t$('.give-multilevel-text-field').each(function (index, item) {\n\n\t\t\t\t// Skip first element.\n\t\t\t\tif (!index) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Check if item is jquery object or not.\n\t\t\t\tvar $item = $(item);\n\n\t\t\t\tvar $parent = $item.closest('tr'),\n\t\t\t\t $header_title_container = $('.give-row-head h2 span', $parent),\n\t\t\t\t donation_level_header_text_prefix = $header_title_container.data('header-title');\n\n\t\t\t\t// Donation level header already set.\n\t\t\t\tif ($item.val() && $item.val() === $header_title_container.html()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ($item.val()) {\n\t\t\t\t\t// Change donaiton level header text.\n\t\t\t\t\t$header_title_container.html(donation_level_header_text_prefix + ': ' + $item.val());\n\t\t\t\t} else {\n\t\t\t\t\t// Reset donation level header heading text.\n\t\t\t\t\t$header_title_container.html(donation_level_header_text_prefix);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Handle row deleted event for levels repeater field.\n\t\t\t$repeater_fields.on('repeater_field_row_deleted', function () {\n\t\t\t\tvar $this = $(this);\n\n\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\tvar $parent = $this,\n\t\t\t\t\t $repeatable_rows = $('.give-row', $parent).not('.give-template'),\n\t\t\t\t\t $default_radio = $('.give-give_default_radio_inline', $repeatable_rows),\n\t\t\t\t\t number_of_level = $repeatable_rows.length;\n\n\t\t\t\t\tif (number_of_level === 1) {\n\t\t\t\t\t\t$default_radio.prop('checked', true);\n\t\t\t\t\t}\n\t\t\t\t}, 200);\n\t\t\t});\n\n\t\t\t// Handle row added event for levels repeater field.\n\t\t\t$repeater_fields.on('repeater_field_new_row_added', function (e, container, new_row) {\n\t\t\t\tvar $this = $(this),\n\t\t\t\t max_level_id = 0;\n\n\t\t\t\t// Auto set default level if no level set as default.\n\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t// Set first row as default if selected default row deleted.\n\t\t\t\t\t// When a row is removed containing the default selection then revert default to first repeatable row.\n\t\t\t\t\tif ($('.give-give_default_radio_inline', $this).is(':checked') === false) {\n\t\t\t\t\t\t$('.give-row', $this).not('.give-template').first().find('.give-give_default_radio_inline').prop('checked', true);\n\t\t\t\t\t}\n\t\t\t\t}, 200);\n\n\t\t\t\t// Get max level id.\n\t\t\t\t$('input[type=\"hidden\"].give-levels_id', $this).each(function (index, item) {\n\t\t\t\t\tvar $item = $(item),\n\t\t\t\t\t current_level = parseInt($item.val());\n\t\t\t\t\tif (max_level_id < current_level) {\n\t\t\t\t\t\tmax_level_id = current_level;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Auto set level id for new setting level setting group.\n\t\t\t\t$('input[type=\"hidden\"].give-levels_id', new_row).val(++max_level_id);\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n * Handle row count and field count for repeatable field.\n */\n\tvar handle_metabox_repeater_field_row_count = function handle_metabox_repeater_field_row_count(container, new_row) {\n\t\tvar row_count = $(container).attr('data-rf-row-count'),\n\t\t $container = $(container),\n\t\t $parent = $container.parents('.give-repeatable-field-section');\n\n\t\trow_count++;\n\n\t\t// Set name for fields.\n\t\t$('*', new_row).each(function () {\n\t\t\t$.each(this.attributes, function (index, element) {\n\t\t\t\tthis.value = this.value.replace('{{row-count-placeholder}}', row_count - 1);\n\t\t\t});\n\t\t});\n\n\t\t// Set row counter.\n\t\t$(container).attr('data-rf-row-count', row_count);\n\n\t\t// Fire event: Row added.\n\t\t$parent.trigger('repeater_field_new_row_added', [container, new_row]);\n\t};\n\n\t/**\n * Handle row remove for repeatable field.\n */\n\tvar handle_metabox_repeater_field_row_remove = function handle_metabox_repeater_field_row_remove(container) {\n\t\tvar $container = $(container),\n\t\t $parent = $container.parents('.give-repeatable-field-section'),\n\t\t row_count = $(container).attr('data-rf-row-count');\n\n\t\t// Reduce row count.\n\t\t$container.attr('data-rf-row-count', --row_count);\n\n\t\t// Fire event: Row deleted.\n\t\t$parent.trigger('repeater_field_row_deleted');\n\t};\n\n\t/**\n * Add number suffix to repeater group.\n */\n\tvar handle_repeater_group_add_number_suffix = function handle_repeater_group_add_number_suffix($parent) {\n\n\t\t// Bailout: check if auto group numbering is on or not.\n\t\tif (!parseInt($parent.data('group-numbering'))) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar $header_title_container = $('.give-row-head h2 span', $parent),\n\t\t header_text_prefix = $header_title_container.data('header-title');\n\n\t\t$header_title_container.each(function (index, item) {\n\t\t\tvar $item = $(item);\n\n\t\t\t// Bailout: do not rename header title in fields template.\n\t\t\tif ($item.parents('.give-template').length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$item.html(header_text_prefix + ': ' + index);\n\t\t});\n\t};\n\n\t/**\n * Payment history listing page js\n */\n\tvar GivePaymentHistory = {\n\t\tinit: function init() {\n\t\t\t$('body').on('click', '#give-payments-filter input[type=\"submit\"]', this.handleBulkActions);\n\t\t},\n\n\t\thandleBulkActions: function handleBulkActions(e) {\n\t\t\tvar currentAction = $(this).closest('.tablenav').find('select').val(),\n\t\t\t currentActionLabel = $(this).closest('.tablenav').find('option[value=\"' + currentAction + '\"]').text(),\n\t\t\t $payments = $('input[name=\"payment[]\"]:checked').length,\n\t\t\t isStatusTypeAction = -1 !== currentAction.indexOf('set-status-'),\n\t\t\t confirmActionNotice = '',\n\t\t\t status = '';\n\n\t\t\t// Set common action, if action type is status.\n\t\t\tcurrentAction = isStatusTypeAction ? 'set-to-status' : currentAction;\n\n\t\t\tif ('-1' === currentAction) {\n\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"d\" /* GiveWarningAlert */]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: give_vars.donors_bulk_action.no_action_selected.title,\n\t\t\t\t\t\tdesc: give_vars.donors_bulk_action.no_action_selected.desc,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (Object.keys(give_vars.donations_bulk_action).length) {\n\t\t\t\tfor (status in give_vars.donations_bulk_action) {\n\t\t\t\t\tif (status === currentAction) {\n\n\t\t\t\t\t\t// Get status text if current action types is status.\n\t\t\t\t\t\tconfirmActionNotice = isStatusTypeAction ? give_vars.donations_bulk_action[currentAction].zero.replace('{status}', currentActionLabel.replace('Set To ', '')) : give_vars.donations_bulk_action[currentAction].zero;\n\n\t\t\t\t\t\t// Check if admin selected any donations or not.\n\t\t\t\t\t\tif (!parseInt($payments)) {\n\t\t\t\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"d\" /* GiveWarningAlert */]({\n\t\t\t\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\t\t\t\ttitle: give_vars.donations_bulk_action.titles.zero,\n\t\t\t\t\t\t\t\t\tdesc: confirmActionNotice,\n\t\t\t\t\t\t\t\t\tcancelBtnTitle: give_vars.ok\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).render();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Get message on basis of payment count.\n\t\t\t\t\t\tconfirmActionNotice = 1 < $payments ? give_vars.donations_bulk_action[currentAction].multiple : give_vars.donations_bulk_action[currentAction].single;\n\n\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"a\" /* GiveConfirmModal */]({\n\t\t\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\t\t\ttitle: give_vars.confirm_bulk_action,\n\t\t\t\t\t\t\t\tdesc: confirmActionNotice.replace('{payment_count}', $payments).replace('{status}', currentActionLabel.replace('Set To ', ''))\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tsuccessConfirm: function successConfirm(args) {\n\t\t\t\t\t\t\t\t$('#give-payments-filter').submit();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).render();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t};\n\n\t// On DOM Ready.\n\t$(function () {\n\n\t\tgive_dismiss_notice();\n\t\tenable_admin_datepicker();\n\t\thandle_status_change();\n\t\tsetup_chosen_give_selects();\n\t\t$.giveAjaxifyFields({ type: 'country_state', debug: true });\n\t\tGiveListDonation.init();\n\t\tGive_Edit_Donation.init();\n\t\tGive_Settings.init();\n\t\tGive_Reports.init();\n\t\tGiveDonor.init();\n\t\tAPI_Screen.init();\n\t\tGive_Export.init();\n\t\tGive_Updates.init();\n\t\tGive_Upgrades.init();\n\t\tEdit_Form_Screen.init();\n\t\tGivePaymentHistory.init();\n\n\t\t// Footer.\n\t\t$('a.give-rating-link').click(function () {\n\t\t\tjQuery(this).parent().text(jQuery(this).data('rated'));\n\t\t});\n\n\t\t// Ajax user search.\n\t\t$('.give-ajax-user-search').on('keyup', function () {\n\t\t\tvar user_search = $(this).val();\n\t\t\tvar exclude = '';\n\n\t\t\tif ($(this).data('exclude')) {\n\t\t\t\texclude = $(this).data('exclude');\n\t\t\t}\n\n\t\t\t$('.give-ajax').show();\n\t\t\tdata = {\n\t\t\t\taction: 'give_search_users',\n\t\t\t\tuser_name: user_search,\n\t\t\t\texclude: exclude\n\t\t\t};\n\n\t\t\tdocument.body.style.cursor = 'wait';\n\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\tdata: data,\n\t\t\t\tdataType: 'json',\n\t\t\t\turl: ajaxurl,\n\t\t\t\tsuccess: function success(search_response) {\n\t\t\t\t\t$('.give-ajax').hide();\n\t\t\t\t\t$('.give_user_search_results').removeClass('hidden');\n\t\t\t\t\t$('.give_user_search_results span').html('');\n\t\t\t\t\t$(search_response.results).appendTo('.give_user_search_results span');\n\t\t\t\t\tdocument.body.style.cursor = 'default';\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\t$('body').on('click.giveSelectUser', '.give_user_search_results span a', function (e) {\n\t\t\te.preventDefault();\n\t\t\tvar login = $(this).data('login');\n\t\t\t$('.give-ajax-user-search').val(login);\n\t\t\t$('.give_user_search_results').addClass('hidden');\n\t\t\t$('.give_user_search_results span').html('');\n\t\t});\n\n\t\t$('body').on('click.giveCancelUserSearch', '.give_user_search_results a.give-ajax-user-cancel', function (e) {\n\t\t\te.preventDefault();\n\t\t\t$('.give-ajax-user-search').val('');\n\t\t\t$('.give_user_search_results').addClass('hidden');\n\t\t\t$('.give_user_search_results span').html('');\n\t\t});\n\n\t\tvar $poststuff = $('#poststuff'),\n\t\t thousand_separator = give_vars.thousands_separator,\n\t\t decimal_separator = give_vars.decimal_separator,\n\t\t thousand_separator_count = '',\n\t\t alphabet_count = '',\n\t\t price_string = '',\n\n\n\t\t// Thousand separation limit in price depends upon decimal separator symbol.\n\t\t// If thousand separator is equal to decimal separator then price does not have more then 1 thousand separator otherwise limit is zero.\n\t\tthousand_separator_limit = decimal_separator === thousand_separator ? 1 : 0;\n\n\t\t// Check & show message on keyup event.\n\t\t$poststuff.on('keyup', 'input.give-money-field, input.give-price-field', function () {\n\t\t\tvar tootltip_setting = {\n\t\t\t\tlabel: give_vars.price_format_guide.trim()\n\t\t\t};\n\n\t\t\t// Count thousand separator in price string.\n\t\t\tthousand_separator_count = ($(this).val().match(new RegExp(thousand_separator, 'g')) || []).length;\n\t\t\talphabet_count = ($(this).val().match(new RegExp('[a-z]', 'g')) || []).length;\n\n\t\t\t// Show qtip conditionally if thousand separator detected on price string.\n\t\t\tif (-1 !== $(this).val().indexOf(thousand_separator) && thousand_separator_limit < thousand_separator_count) {\n\t\t\t\t$(this).giveHintCss('show', tootltip_setting);\n\t\t\t} else if (alphabet_count) {\n\t\t\t\t$(this).giveHintCss('show', tootltip_setting);\n\t\t\t} else {\n\t\t\t\t$(this).giveHintCss('hide', tootltip_setting);\n\t\t\t}\n\n\t\t\t// Reset thousand separator count.\n\t\t\tthousand_separator_count = alphabet_count = '';\n\t\t});\n\n\t\t// Format price sting of input field on focusout.\n\t\t$poststuff.on('focusout', 'input.give-money-field, input.give-price-field', function () {\n\t\t\tprice_string = give_unformat_currency($(this).val(), false);\n\n\t\t\t$(this).giveHintCss('hide', {});\n\n\t\t\t// Back out.\n\t\t\tif (give_unformat_currency('0', false) === give_unformat_currency($(this).val(), false)) {\n\t\t\t\tvar default_amount = $(this).attr('placeholder');\n\t\t\t\tdefault_amount = !default_amount ? '0' : default_amount;\n\n\t\t\t\t$(this).val(default_amount);\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Replace dot decimal separator with user defined decimal separator.\n\t\t\tprice_string = price_string.replace('.', decimal_separator);\n\n\t\t\t// Check if current number is negative or not.\n\t\t\tif (-1 !== price_string.indexOf('-')) {\n\t\t\t\tprice_string = price_string.replace('-', '');\n\t\t\t}\n\n\t\t\t// Update format price string in input field.\n\t\t\t$(this).val(price_string);\n\t\t});\n\n\t\t// Set default value to 1 even if user inputs empty or negative number of donations.\n\t\t$poststuff.on('focusout', '#_give_number_of_donation_goal', function () {\n\t\t\tif (1 > $(this).val()) {\n\t\t\t\t$(this).val(1);\n\t\t\t}\n\t\t});\n\n\t\t/**\n * Responsive setting tab features.\n */\n\n\t\t// Show/Hide sub tab nav.\n\t\t$('.give-settings-page').on('click', '#give-show-sub-nav', function (e) {\n\t\t\te.preventDefault();\n\n\t\t\tvar $sub_tab_nav = $(this).next();\n\n\t\t\tif (!$sub_tab_nav.is(':hover')) {\n\t\t\t\t$sub_tab_nav.toggleClass('give-hidden');\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}).on('blur', '#give-show-sub-nav', function () {\n\t\t\tvar $sub_tab_nav = $(this).next();\n\n\t\t\tif (!$sub_tab_nav.is(':hover')) {\n\t\t\t\t$sub_tab_nav.addClass('give-hidden');\n\t\t\t}\n\t\t});\n\n\t\t/**\n * Automatically show/hide email setting fields.\n */\n\t\t$('.give_email_api_notification_status_setting input').change(function () {\n\t\t\t// Bailout.\n\t\t\tvar value = $(this).val(),\n\t\t\t is_enabled = 'enabled' === value,\n\t\t\t $setting_fields = {};\n\n\t\t\t// Get setting fields.\n\t\t\tif ($(this).closest('.give_options_panel').length) {\n\t\t\t\t$setting_fields = $(this).closest('.give_options_panel').children('.give-field-wrap:not(.give_email_api_notification_status_setting), .give-repeatable-field-section');\n\t\t\t} else if ($(this).closest('table').length) {\n\t\t\t\t$setting_fields = $(this).closest('table').find('tr:not(.give_email_api_notification_status_setting)');\n\t\t\t}\n\n\t\t\tif (-1 === jQuery.inArray(value, ['enabled', 'disabled', 'global'])) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Bailout.\n\t\t\tif (!$setting_fields.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Show hide setting fields.\n\t\t\tis_enabled ? $setting_fields.show() : $setting_fields.hide();\n\t\t});\n\n\t\t$('.give_email_api_notification_status_setting input:checked').change();\n\n\t\t// Render setting tab.\n\t\tgive_render_responsive_tabs();\n\t});\n})(jQuery);\n\n/**\n * Responsive js.\n */\njQuery(window).resize(function () {\n\tgive_render_responsive_tabs();\n});\n\n/**\n * Render responsive tabs\n */\nfunction give_render_responsive_tabs() {\n\tvar $setting_page_form = jQuery('.give-settings-page'),\n\t $main_tab_nav = jQuery('h2.give-nav-tab-wrapper'),\n\t setting_page_form_width = $setting_page_form.width(),\n\t $sub_tab_nav_wrapper = jQuery('.give-sub-nav-tab-wrapper'),\n\t $sub_tab_nav = jQuery('nav', $sub_tab_nav_wrapper),\n\t $setting_tab_links = jQuery('div.give-nav-tab-wrapper > a:not(give-not-tab)'),\n\t $show_tabs = [],\n\t $hide_tabs = [],\n\t tab_width = 0;\n\n\tif (600 < jQuery(window).outerWidth()) {\n\t\ttab_width = 200;\n\t}\n\n\t// Bailout.\n\tif (!$setting_page_form.length) {\n\t\treturn false;\n\t}\n\n\t// Update tab wrapper css.\n\t$main_tab_nav.css({\n\t\theight: 'auto',\n\t\toverflow: 'visible'\n\t});\n\n\t// Show all tab if anyone hidden to calculate correct tab width.\n\t$setting_tab_links.removeClass('give-hidden');\n\n\tvar refactor_tabs = new Promise(function (resolve, reject) {\n\n\t\t// Collect tabs to show or hide.\n\t\tjQuery.each($setting_tab_links, function (index, $tab_link) {\n\t\t\t$tab_link = jQuery($tab_link);\n\t\t\ttab_width = tab_width + parseInt($tab_link.outerWidth());\n\n\t\t\tif (tab_width < setting_page_form_width) {\n\t\t\t\t$show_tabs.push($tab_link);\n\t\t\t} else {\n\t\t\t\t$hide_tabs.push($tab_link);\n\t\t\t}\n\t\t});\n\n\t\tresolve(true);\n\t});\n\n\trefactor_tabs.then(function (is_refactor_tabs) {\n\n\t\t// Remove current tab from sub menu and add this to main menu if exist and get last tab from main menu and add this to sub menu.\n\t\tif ($hide_tabs.length && -1 !== window.location.search.indexOf('&tab=')) {\n\t\t\tvar $current_tab_nav = {},\n\t\t\t query_params = get_url_params();\n\n\t\t\t$hide_tabs = $hide_tabs.filter(function ($tab_link) {\n\t\t\t\tvar is_current_nav_item = -1 !== parseInt($tab_link.attr('href').indexOf('&tab=' + query_params['tab']));\n\n\t\t\t\tif (is_current_nav_item) {\n\t\t\t\t\t$current_tab_nav = $tab_link;\n\t\t\t\t}\n\n\t\t\t\treturn !is_current_nav_item;\n\t\t\t});\n\n\t\t\tif ($current_tab_nav.length) {\n\t\t\t\t$hide_tabs.unshift($show_tabs.pop());\n\t\t\t\t$show_tabs.push($current_tab_nav);\n\t\t\t}\n\t\t}\n\n\t\tvar show_tabs = new Promise(function (resolve, reject) {\n\n\t\t\t// Show main menu tabs.\n\t\t\tif ($show_tabs.length) {\n\t\t\t\tjQuery.each($show_tabs, function (index, $tab_link) {\n\t\t\t\t\t$tab_link = jQuery($tab_link);\n\n\t\t\t\t\tif ($tab_link.hasClass('give-hidden')) {\n\t\t\t\t\t\t$tab_link.removeClass('give-hidden');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tresolve(true);\n\t\t});\n\n\t\tshow_tabs.then(function (is_show_tabs) {\n\n\t\t\t// Hide sub menu tabs.\n\t\t\tif ($hide_tabs.length) {\n\t\t\t\t$sub_tab_nav.html('');\n\n\t\t\t\tjQuery.each($hide_tabs, function (index, $tab_link) {\n\t\t\t\t\t$tab_link = jQuery($tab_link);\n\t\t\t\t\tif (!$tab_link.hasClass('nav-tab-active')) {\n\t\t\t\t\t\t$tab_link.addClass('give-hidden');\n\t\t\t\t\t}\n\t\t\t\t\t$tab_link.clone().removeClass().appendTo($sub_tab_nav);\n\t\t\t\t});\n\n\t\t\t\tif (!jQuery('.give-sub-nav-tab-wrapper', $main_tab_nav).length) {\n\t\t\t\t\t$main_tab_nav.append($sub_tab_nav_wrapper);\n\t\t\t\t}\n\n\t\t\t\t$sub_tab_nav_wrapper.show();\n\t\t\t} else {\n\t\t\t\t$sub_tab_nav_wrapper.hide();\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Get url query params.\n *\n * @returns {Array}\n */\nfunction get_url_params() {\n\tvar vars = [],\n\t hash;\n\tvar hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');\n\tfor (var i = 0; i < hashes.length; i++) {\n\t\thash = hashes[i].split('=');\n\t\tvars[hash[0]] = hash[1];\n\t}\n\treturn vars;\n}\n\n/***/ }),\n/* 33 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__plugins_modal__ = __webpack_require__(6);\n/**\n * Give Admin JS\n *\n * @package: Give\n * @subpackage: Assets/JS\n * @copyright: Copyright (c) 2016, WordImpress\n * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\n\n/**\n * Do not allow user to reload the page\n *\n * @since 1.8.14\n */\n\n\n\nvar give_setting_edit = true;\n\njQuery.noConflict();\n(function ($) {\n\n\t// On DOM Ready.\n\t$(function () {\n\t\tgive_import_donation_onload();\n\t});\n})(jQuery);\n\n/**\n * Run when user click on submit button.\n *\n * @since 1.8.17\n */\nfunction give_on_core_settings_import_start() {\n\tvar import_step = 'body.give_forms_page_give-tools .give-tools-import-tab #give-import-core-settings-form table.step-2';\n\tif (jQuery(import_step).length > 0) {\n\n\t\tvar $form = jQuery('form.tools-setting-page-import');\n\t\tvar progress = $form.find('.give-progress');\n\n\t\tgive_setting_edit = true;\n\n\t\tjQuery.ajax({\n\t\t\ttype: 'POST',\n\t\t\turl: ajaxurl,\n\t\t\tdata: {\n\t\t\t\taction: give_vars.core_settings_import,\n\t\t\t\tfields: $form.serialize()\n\t\t\t},\n\t\t\tdataType: 'json',\n\t\t\tsuccess: function success(response) {\n\t\t\t\tgive_setting_edit = false;\n\t\t\t\tif (true === response.success) {\n\t\t\t\t\tjQuery(progress).find('div').width(response.percentage + '%');\n\t\t\t\t} else {\n\t\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"b\" /* GiveErrorAlert */]({\n\t\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\t\ttitle: give_vars.import_failed,\n\t\t\t\t\t\t\tdesc: give_vars.error_message,\n\t\t\t\t\t\t\tcancelBtnTitle: give_vars.ok\n\t\t\t\t\t\t}\n\t\t\t\t\t}).render();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\twindow.location = response.url;\n\t\t\t},\n\t\t\terror: function error() {\n\t\t\t\tgive_setting_edit = false;\n\n\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"b\" /* GiveErrorAlert */]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: give_vars.import_failed,\n\t\t\t\t\t\tdesc: give_vars.error_message,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Check if admin is on step 1 and file is invalid\n *\n * @since 2.1\n */\nfunction give_import_core_settings_json_is_valid() {\n\tvar import_step = 'body.give_forms_page_give-tools .give-tools-import-tab #give-import-core-settings-form table.step-1 .is_json_valid';\n\tif (jQuery(import_step).length > 0) {\n\t\twindow.location = jQuery(import_step).val();\n\t}\n}\n\n/**\n * Check if admin is on step 3 where we start imporing Donation from CSV via AJAX\n *\n * @since 2.1\n */\nfunction give_start_importing_donations() {\n\tvar import_step = 'body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-3';\n\tif (jQuery(import_step).length > 0) {\n\t\tgive_on_donation_import_ajax();\n\t}\n}\n\n/**\n * Check if admin is on step 2 and CSV is invalid\n *\n * @since 2.1\n */\nfunction give_import_donation_csv_not_valid() {\n\tvar import_step = 'body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-2 .csv_not_valid';\n\tif (jQuery(import_step).length > 0) {\n\t\twindow.location = jQuery(import_step).val();\n\t}\n}\n\n/**\n * Check if admin is on step 1 and csv is valid\n *\n * @since 2.1\n */\nfunction give_import_donation_valid_csv() {\n\tvar import_step = 'body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-1 .is_csv_valid';\n\tif (jQuery(import_step).length > 0) {\n\t\twindow.location = jQuery(import_step).val();\n\t}\n}\n\n/**\n * Upload CSV ajax\n *\n * @since 1.8.13\n */\nfunction give_on_donation_import_ajax() {\n\tvar $form = jQuery('form.tools-setting-page-import');\n\n\t/**\n * Do not allow user to reload the page\n *\n * @since 1.8.14\n */\n\tgive_setting_edit = true;\n\n\tvar progress = $form.find('.give-progress');\n\n\tvar total_ajax = jQuery(progress).data('total_ajax'),\n\t current = jQuery(progress).data('current'),\n\t start = jQuery(progress).data('start'),\n\t end = jQuery(progress).data('end'),\n\t next = jQuery(progress).data('next'),\n\t total = jQuery(progress).data('total'),\n\t per_page = jQuery(progress).data('per_page');\n\n\tjQuery.ajax({\n\t\ttype: 'POST',\n\t\turl: ajaxurl,\n\t\tdata: {\n\t\t\taction: give_vars.give_donation_import,\n\t\t\ttotal_ajax: total_ajax,\n\t\t\tcurrent: current,\n\t\t\tstart: start,\n\t\t\tend: end,\n\t\t\tnext: next,\n\t\t\ttotal: total,\n\t\t\tper_page: per_page,\n\t\t\tfields: $form.serialize()\n\t\t},\n\t\tdataType: 'json',\n\t\tsuccess: function success(response) {\n\t\t\tjQuery(progress).data('current', response.current);\n\t\t\tjQuery(progress).find('div').width(response.percentage + '%');\n\n\t\t\tif (response.next == true) {\n\t\t\t\tjQuery(progress).data('start', response.start);\n\t\t\t\tjQuery(progress).data('end', response.end);\n\n\t\t\t\tif (response.last == true) {\n\t\t\t\t\tjQuery(progress).data('next', false);\n\t\t\t\t}\n\t\t\t\tgive_on_donation_import_ajax();\n\t\t\t} else {\n\t\t\t\t/**\n * Now user is allow to reload the page.\n *\n * @since 1.8.14\n */\n\t\t\t\tgive_setting_edit = false;\n\t\t\t\twindow.location = response.url;\n\t\t\t}\n\t\t},\n\t\terror: function error() {\n\t\t\t/**\n * Now user is allow to reload the page.\n *\n * @since 1.8.14\n */\n\t\t\tgive_setting_edit = false;\n\n\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"b\" /* GiveErrorAlert */]({\n\t\t\t\tmodalContent: {\n\t\t\t\t\ttitle: give_vars.import_failed,\n\t\t\t\t\tdesc: give_vars.error_message,\n\t\t\t\t\tcancelBtnTitle: give_vars.ok\n\t\t\t\t}\n\t\t\t}).render();\n\t\t}\n\t});\n}\n\n/**\n * Give Import donation run on load once page is load completed.\n */\nfunction give_import_donation_onload() {\n\twindow.onload = function () {\n\t\tgive_import_donation_required_fields_check();\n\t\tgive_import_donation_on_drop_down_change();\n\t\tgive_start_importing_donations();\n\t\tgive_import_donation_valid_csv();\n\t\tgive_import_donation_csv_not_valid();\n\t\tgive_on_core_settings_import_start();\n\t\tgive_import_core_settings_json_is_valid();\n\t};\n}\n\n/**\n * Give import donation on change of drop down and update the required fields.\n */\nfunction give_import_donation_on_drop_down_change() {\n\tvar fields = document.querySelector('.give-tools-setting-page-import table.step-2 tbody select');\n\tif (fields !== 'undefined' && fields !== null) {\n\t\tjQuery('.give-tools-setting-page-import table.step-2 tbody').on('change', 'select', function () {\n\t\t\tgive_import_donation_required_fields_check();\n\t\t});\n\t}\n}\n\n/**\n * Give Import Donations check required fields\n */\nfunction give_import_donation_required_fields_check() {\n\tvar required_fields = document.querySelector('.give-tools-setting-page-import table.step-2 .give-import-donation-required-fields');\n\tif (required_fields !== 'undefined' && required_fields !== null) {\n\t\tvar submit = true,\n\t\t email = false,\n\t\t first_name = false,\n\t\t amount = false,\n\t\t form = false;\n\n\t\tdocument.querySelectorAll('.give-import-donation-required-fields li').forEach(function (value) {\n\t\t\tvalue.querySelector('.dashicons').classList.remove('dashicons-yes');\n\t\t\tvalue.querySelector('.dashicons').classList.add('dashicons-no-alt');\n\t\t});\n\n\t\tvar select_fields = Array.from(document.querySelectorAll('table.step-2 tbody select')).map(function (field) {\n\t\t\treturn field.value;\n\t\t});\n\n\t\tif (select_fields.includes('email')) {\n\t\t\temail = true;\n\t\t\tdocument.querySelector('.give-import-donation-required-email .dashicons').classList.remove('dashicons-no-alt');\n\t\t\tdocument.querySelector('.give-import-donation-required-email .dashicons').classList.add('dashicons-yes');\n\t\t}\n\n\t\tif (select_fields.includes('first_name')) {\n\t\t\tfirst_name = true;\n\t\t\tdocument.querySelector('.give-import-donation-required-first .dashicons').classList.remove('dashicons-no-alt');\n\t\t\tdocument.querySelector('.give-import-donation-required-first .dashicons').classList.add('dashicons-yes');\n\t\t}\n\n\t\tif (select_fields.includes('amount')) {\n\t\t\tamount = true;\n\t\t\tdocument.querySelector('.give-import-donation-required-amount .dashicons').classList.remove('dashicons-no-alt');\n\t\t\tdocument.querySelector('.give-import-donation-required-amount .dashicons').classList.add('dashicons-yes');\n\t\t}\n\n\t\tif (select_fields.includes('form_id') || select_fields.includes('form_title')) {\n\t\t\tform = true;\n\t\t\tdocument.querySelector('.give-import-donation-required-form .dashicons').classList.remove('dashicons-no-alt');\n\t\t\tdocument.querySelector('.give-import-donation-required-form .dashicons').classList.add('dashicons-yes');\n\t\t}\n\n\t\tif (email && first_name && amount && form) {\n\t\t\tsubmit = false;\n\t\t}\n\n\t\tdocument.getElementById('recount-stats-submit').disabled = submit;\n\t}\n}\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// js/admin.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 18);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 4199db3f1e6f7c0f9e58","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 0\n// module chunks = 0 1 2","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 1\n// module chunks = 1 2","module.exports = global[\"accounting\"] = require(\"-!./accounting.js\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/accounting/accounting.js-exposed\n// module id = 3\n// module chunks = 1 2","/*!\n * accounting.js v0.4.1\n * Copyright 2014 Open Exchange Rates\n *\n * Freely distributable under the MIT license.\n * Portions of accounting.js are inspired or borrowed from underscore.js\n *\n * Full details and documentation:\n * http://openexchangerates.github.io/accounting.js/\n */\n\n(function(root, undefined) {\n\n\t/* --- Setup --- */\n\n\t// Create the local library object, to be exported or referenced globally later\n\tvar lib = {};\n\n\t// Current version\n\tlib.version = '0.4.1';\n\n\n\t/* --- Exposed settings --- */\n\n\t// The library's settings configuration object. Contains default parameters for\n\t// currency and number formatting\n\tlib.settings = {\n\t\tcurrency: {\n\t\t\tsymbol : \"$\",\t\t// default currency symbol is '$'\n\t\t\tformat : \"%s%v\",\t// controls output: %s = symbol, %v = value (can be object, see docs)\n\t\t\tdecimal : \".\",\t\t// decimal point separator\n\t\t\tthousand : \",\",\t\t// thousands separator\n\t\t\tprecision : 2,\t\t// decimal places\n\t\t\tgrouping : 3\t\t// digit grouping (not implemented yet)\n\t\t},\n\t\tnumber: {\n\t\t\tprecision : 0,\t\t// default precision on numbers is 0\n\t\t\tgrouping : 3,\t\t// digit grouping (not implemented yet)\n\t\t\tthousand : \",\",\n\t\t\tdecimal : \".\"\n\t\t}\n\t};\n\n\n\t/* --- Internal Helper Methods --- */\n\n\t// Store reference to possibly-available ECMAScript 5 methods for later\n\tvar nativeMap = Array.prototype.map,\n\t\tnativeIsArray = Array.isArray,\n\t\ttoString = Object.prototype.toString;\n\n\t/**\n\t * Tests whether supplied parameter is a string\n\t * from underscore.js\n\t */\n\tfunction isString(obj) {\n\t\treturn !!(obj === '' || (obj && obj.charCodeAt && obj.substr));\n\t}\n\n\t/**\n\t * Tests whether supplied parameter is a string\n\t * from underscore.js, delegates to ECMA5's native Array.isArray\n\t */\n\tfunction isArray(obj) {\n\t\treturn nativeIsArray ? nativeIsArray(obj) : toString.call(obj) === '[object Array]';\n\t}\n\n\t/**\n\t * Tests whether supplied parameter is a true object\n\t */\n\tfunction isObject(obj) {\n\t\treturn obj && toString.call(obj) === '[object Object]';\n\t}\n\n\t/**\n\t * Extends an object with a defaults object, similar to underscore's _.defaults\n\t *\n\t * Used for abstracting parameter handling from API methods\n\t */\n\tfunction defaults(object, defs) {\n\t\tvar key;\n\t\tobject = object || {};\n\t\tdefs = defs || {};\n\t\t// Iterate over object non-prototype properties:\n\t\tfor (key in defs) {\n\t\t\tif (defs.hasOwnProperty(key)) {\n\t\t\t\t// Replace values with defaults only if undefined (allow empty/zero values):\n\t\t\t\tif (object[key] == null) object[key] = defs[key];\n\t\t\t}\n\t\t}\n\t\treturn object;\n\t}\n\n\t/**\n\t * Implementation of `Array.map()` for iteration loops\n\t *\n\t * Returns a new Array as a result of calling `iterator` on each array value.\n\t * Defers to native Array.map if available\n\t */\n\tfunction map(obj, iterator, context) {\n\t\tvar results = [], i, j;\n\n\t\tif (!obj) return results;\n\n\t\t// Use native .map method if it exists:\n\t\tif (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);\n\n\t\t// Fallback for native .map:\n\t\tfor (i = 0, j = obj.length; i < j; i++ ) {\n\t\t\tresults[i] = iterator.call(context, obj[i], i, obj);\n\t\t}\n\t\treturn results;\n\t}\n\n\t/**\n\t * Check and normalise the value of precision (must be positive integer)\n\t */\n\tfunction checkPrecision(val, base) {\n\t\tval = Math.round(Math.abs(val));\n\t\treturn isNaN(val)? base : val;\n\t}\n\n\n\t/**\n\t * Parses a format string or object and returns format obj for use in rendering\n\t *\n\t * `format` is either a string with the default (positive) format, or object\n\t * containing `pos` (required), `neg` and `zero` values (or a function returning\n\t * either a string or object)\n\t *\n\t * Either string or format.pos must contain \"%v\" (value) to be valid\n\t */\n\tfunction checkCurrencyFormat(format) {\n\t\tvar defaults = lib.settings.currency.format;\n\n\t\t// Allow function as format parameter (should return string or object):\n\t\tif ( typeof format === \"function\" ) format = format();\n\n\t\t// Format can be a string, in which case `value` (\"%v\") must be present:\n\t\tif ( isString( format ) && format.match(\"%v\") ) {\n\n\t\t\t// Create and return positive, negative and zero formats:\n\t\t\treturn {\n\t\t\t\tpos : format,\n\t\t\t\tneg : format.replace(\"-\", \"\").replace(\"%v\", \"-%v\"),\n\t\t\t\tzero : format\n\t\t\t};\n\n\t\t// If no format, or object is missing valid positive value, use defaults:\n\t\t} else if ( !format || !format.pos || !format.pos.match(\"%v\") ) {\n\n\t\t\t// If defaults is a string, casts it to an object for faster checking next time:\n\t\t\treturn ( !isString( defaults ) ) ? defaults : lib.settings.currency.format = {\n\t\t\t\tpos : defaults,\n\t\t\t\tneg : defaults.replace(\"%v\", \"-%v\"),\n\t\t\t\tzero : defaults\n\t\t\t};\n\n\t\t}\n\t\t// Otherwise, assume format was fine:\n\t\treturn format;\n\t}\n\n\n\t/* --- API Methods --- */\n\n\t/**\n\t * Takes a string/array of strings, removes all formatting/cruft and returns the raw float value\n\t * Alias: `accounting.parse(string)`\n\t *\n\t * Decimal must be included in the regular expression to match floats (defaults to\n\t * accounting.settings.number.decimal), so if the number uses a non-standard decimal \n\t * separator, provide it as the second argument.\n\t *\n\t * Also matches bracketed negatives (eg. \"$ (1.99)\" => -1.99)\n\t *\n\t * Doesn't throw any errors (`NaN`s become 0) but this may change in future\n\t */\n\tvar unformat = lib.unformat = lib.parse = function(value, decimal) {\n\t\t// Recursively unformat arrays:\n\t\tif (isArray(value)) {\n\t\t\treturn map(value, function(val) {\n\t\t\t\treturn unformat(val, decimal);\n\t\t\t});\n\t\t}\n\n\t\t// Fails silently (need decent errors):\n\t\tvalue = value || 0;\n\n\t\t// Return the value as-is if it's already a number:\n\t\tif (typeof value === \"number\") return value;\n\n\t\t// Default decimal point comes from settings, but could be set to eg. \",\" in opts:\n\t\tdecimal = decimal || lib.settings.number.decimal;\n\n\t\t // Build regex to strip out everything except digits, decimal point and minus sign:\n\t\tvar regex = new RegExp(\"[^0-9-\" + decimal + \"]\", [\"g\"]),\n\t\t\tunformatted = parseFloat(\n\t\t\t\t(\"\" + value)\n\t\t\t\t.replace(/\\((.*)\\)/, \"-$1\") // replace bracketed values with negatives\n\t\t\t\t.replace(regex, '') // strip out any cruft\n\t\t\t\t.replace(decimal, '.') // make sure decimal point is standard\n\t\t\t);\n\n\t\t// This will fail silently which may cause trouble, let's wait and see:\n\t\treturn !isNaN(unformatted) ? unformatted : 0;\n\t};\n\n\n\t/**\n\t * Implementation of toFixed() that treats floats more like decimals\n\t *\n\t * Fixes binary rounding issues (eg. (0.615).toFixed(2) === \"0.61\") that present\n\t * problems for accounting- and finance-related software.\n\t */\n\tvar toFixed = lib.toFixed = function(value, precision) {\n\t\tprecision = checkPrecision(precision, lib.settings.number.precision);\n\t\tvar power = Math.pow(10, precision);\n\n\t\t// Multiply up by precision, round accurately, then divide and use native toFixed():\n\t\treturn (Math.round(lib.unformat(value) * power) / power).toFixed(precision);\n\t};\n\n\n\t/**\n\t * Format a number, with comma-separated thousands and custom precision/decimal places\n\t * Alias: `accounting.format()`\n\t *\n\t * Localise by overriding the precision and thousand / decimal separators\n\t * 2nd parameter `precision` can be an object matching `settings.number`\n\t */\n\tvar formatNumber = lib.formatNumber = lib.format = function(number, precision, thousand, decimal) {\n\t\t// Resursively format arrays:\n\t\tif (isArray(number)) {\n\t\t\treturn map(number, function(val) {\n\t\t\t\treturn formatNumber(val, precision, thousand, decimal);\n\t\t\t});\n\t\t}\n\n\t\t// Clean up number:\n\t\tnumber = unformat(number);\n\n\t\t// Build options object from second param (if object) or all params, extending defaults:\n\t\tvar opts = defaults(\n\t\t\t\t(isObject(precision) ? precision : {\n\t\t\t\t\tprecision : precision,\n\t\t\t\t\tthousand : thousand,\n\t\t\t\t\tdecimal : decimal\n\t\t\t\t}),\n\t\t\t\tlib.settings.number\n\t\t\t),\n\n\t\t\t// Clean up precision\n\t\t\tusePrecision = checkPrecision(opts.precision),\n\n\t\t\t// Do some calc:\n\t\t\tnegative = number < 0 ? \"-\" : \"\",\n\t\t\tbase = parseInt(toFixed(Math.abs(number || 0), usePrecision), 10) + \"\",\n\t\t\tmod = base.length > 3 ? base.length % 3 : 0;\n\n\t\t// Format the number:\n\t\treturn negative + (mod ? base.substr(0, mod) + opts.thousand : \"\") + base.substr(mod).replace(/(\\d{3})(?=\\d)/g, \"$1\" + opts.thousand) + (usePrecision ? opts.decimal + toFixed(Math.abs(number), usePrecision).split('.')[1] : \"\");\n\t};\n\n\n\t/**\n\t * Format a number into currency\n\t *\n\t * Usage: accounting.formatMoney(number, symbol, precision, thousandsSep, decimalSep, format)\n\t * defaults: (0, \"$\", 2, \",\", \".\", \"%s%v\")\n\t *\n\t * Localise by overriding the symbol, precision, thousand / decimal separators and format\n\t * Second param can be an object matching `settings.currency` which is the easiest way.\n\t *\n\t * To do: tidy up the parameters\n\t */\n\tvar formatMoney = lib.formatMoney = function(number, symbol, precision, thousand, decimal, format) {\n\t\t// Resursively format arrays:\n\t\tif (isArray(number)) {\n\t\t\treturn map(number, function(val){\n\t\t\t\treturn formatMoney(val, symbol, precision, thousand, decimal, format);\n\t\t\t});\n\t\t}\n\n\t\t// Clean up number:\n\t\tnumber = unformat(number);\n\n\t\t// Build options object from second param (if object) or all params, extending defaults:\n\t\tvar opts = defaults(\n\t\t\t\t(isObject(symbol) ? symbol : {\n\t\t\t\t\tsymbol : symbol,\n\t\t\t\t\tprecision : precision,\n\t\t\t\t\tthousand : thousand,\n\t\t\t\t\tdecimal : decimal,\n\t\t\t\t\tformat : format\n\t\t\t\t}),\n\t\t\t\tlib.settings.currency\n\t\t\t),\n\n\t\t\t// Check format (returns object with pos, neg and zero):\n\t\t\tformats = checkCurrencyFormat(opts.format),\n\n\t\t\t// Choose which format to use for this value:\n\t\t\tuseFormat = number > 0 ? formats.pos : number < 0 ? formats.neg : formats.zero;\n\n\t\t// Return with currency symbol added:\n\t\treturn useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(number), checkPrecision(opts.precision), opts.thousand, opts.decimal));\n\t};\n\n\n\t/**\n\t * Format a list of numbers into an accounting column, padding with whitespace\n\t * to line up currency symbols, thousand separators and decimals places\n\t *\n\t * List should be an array of numbers\n\t * Second parameter can be an object containing keys that match the params\n\t *\n\t * Returns array of accouting-formatted number strings of same length\n\t *\n\t * NB: `white-space:pre` CSS rule is required on the list container to prevent\n\t * browsers from collapsing the whitespace in the output strings.\n\t */\n\tlib.formatColumn = function(list, symbol, precision, thousand, decimal, format) {\n\t\tif (!list) return [];\n\n\t\t// Build options object from second param (if object) or all params, extending defaults:\n\t\tvar opts = defaults(\n\t\t\t\t(isObject(symbol) ? symbol : {\n\t\t\t\t\tsymbol : symbol,\n\t\t\t\t\tprecision : precision,\n\t\t\t\t\tthousand : thousand,\n\t\t\t\t\tdecimal : decimal,\n\t\t\t\t\tformat : format\n\t\t\t\t}),\n\t\t\t\tlib.settings.currency\n\t\t\t),\n\n\t\t\t// Check format (returns object with pos, neg and zero), only need pos for now:\n\t\t\tformats = checkCurrencyFormat(opts.format),\n\n\t\t\t// Whether to pad at start of string or after currency symbol:\n\t\t\tpadAfterSymbol = formats.pos.indexOf(\"%s\") < formats.pos.indexOf(\"%v\") ? true : false,\n\n\t\t\t// Store value for the length of the longest string in the column:\n\t\t\tmaxLength = 0,\n\n\t\t\t// Format the list according to options, store the length of the longest string:\n\t\t\tformatted = map(list, function(val, i) {\n\t\t\t\tif (isArray(val)) {\n\t\t\t\t\t// Recursively format columns if list is a multi-dimensional array:\n\t\t\t\t\treturn lib.formatColumn(val, opts);\n\t\t\t\t} else {\n\t\t\t\t\t// Clean up the value\n\t\t\t\t\tval = unformat(val);\n\n\t\t\t\t\t// Choose which format to use for this value (pos, neg or zero):\n\t\t\t\t\tvar useFormat = val > 0 ? formats.pos : val < 0 ? formats.neg : formats.zero,\n\n\t\t\t\t\t\t// Format this value, push into formatted list and save the length:\n\t\t\t\t\t\tfVal = useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(val), checkPrecision(opts.precision), opts.thousand, opts.decimal));\n\n\t\t\t\t\tif (fVal.length > maxLength) maxLength = fVal.length;\n\t\t\t\t\treturn fVal;\n\t\t\t\t}\n\t\t\t});\n\n\t\t// Pad each number in the list and send back the column of numbers:\n\t\treturn map(formatted, function(val, i) {\n\t\t\t// Only if this is a string (not a nested array, which would have already been padded):\n\t\t\tif (isString(val) && val.length < maxLength) {\n\t\t\t\t// Depending on symbol position, pad after symbol or at index 0:\n\t\t\t\treturn padAfterSymbol ? val.replace(opts.symbol, opts.symbol+(new Array(maxLength - val.length + 1).join(\" \"))) : (new Array(maxLength - val.length + 1).join(\" \")) + val;\n\t\t\t}\n\t\t\treturn val;\n\t\t});\n\t};\n\n\n\t/* --- Module Definition --- */\n\n\t// Export accounting for CommonJS. If being loaded as an AMD module, define it as such.\n\t// Otherwise, just add `accounting` to the global object\n\tif (typeof exports !== 'undefined') {\n\t\tif (typeof module !== 'undefined' && module.exports) {\n\t\t\texports = module.exports = lib;\n\t\t}\n\t\texports.accounting = lib;\n\t} else if (typeof define === 'function' && define.amd) {\n\t\t// Return the library as an AMD module:\n\t\tdefine([], function() {\n\t\t\treturn lib;\n\t\t});\n\t} else {\n\t\t// Use accounting.noConflict to restore `accounting` back to its original value.\n\t\t// Returns a reference to the library's `accounting` object;\n\t\t// e.g. `var numbers = accounting.noConflict();`\n\t\tlib.noConflict = (function(oldAccounting) {\n\t\t\treturn function() {\n\t\t\t\t// Reset the value of the root's `accounting` variable:\n\t\t\t\troot.accounting = oldAccounting;\n\t\t\t\t// Delete the noConflict method:\n\t\t\t\tlib.noConflict = undefined;\n\t\t\t\t// Return reference to the library to re-assign it:\n\t\t\t\treturn lib;\n\t\t\t};\n\t\t})(root.accounting);\n\n\t\t// Declare `fx` on the root (global/window) object:\n\t\troot['accounting'] = lib;\n\t}\n\n\t// Root will be `window` in browser or `global` on the server:\n}(this));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/accounting/accounting.js\n// module id = 4\n// module chunks = 1 2","jQuery.fn.giveHintCss = function(action, settings ) {\n\treturn this.each(function(){\n\t\tvar $this = jQuery(this);\n\t\tsettings = jQuery.extend({\n\t\t\tlabel: ''\n\t\t}, settings );\n\n\t\tvar $tooltip = $this.next('span.give-hint-tooltip-js');\n\t\tif( ! $tooltip.length ){\n\t\t\tvar label = ! settings.label.length ? $this.data('hint-aria-label') : settings.label;\n\n\t\t\t// bailout.\n\t\t\tif( ! label.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this.after( '<span class=\"give-hint-tooltip-js hint--top hint--medium\" aria-label=\"' + label + '\"></span>' );\n\t\t\t$tooltip = $this.next();\n\n\t\t\t$tooltip.css({\n\t\t\t\ttop:-( $this.outerHeight() ),\n\t\t\t\tleft: - ($this.outerWidth()/2 )\n\t\t\t});\n\t\t}\n\n\n\t\tif ( action === 'show' ) {\n\t\t\t$tooltip.addClass( 'hint--always' );\n\t\t}else if ( action === 'hide' ) {\n\t\t\t$tooltip.removeClass( 'hint--always' );\n\t\t}\n\t});\n};\n\n// Qtip2 backward compatibility.\njQuery(document).ready(function ($) {\n\tvar qtip_tooltips = $('[data-tooltip]');\n\n\t// Add hintcss tooltip to existing qtip.\n\tif (qtip_tooltips.length) {\n\t\tqtip_tooltips.each(function (index, tooltip) {\n\t\t\ttooltip = ( tooltip instanceof jQuery ) ? tooltip : $(tooltip);\n\t\t\treset_qtip(tooltip);\n\t\t});\n\t}\n\n\t// Add hintcss tooltip to dynamically created qtip.\n\t$('body').on('hover', '[data-tooltip]', function () {\n\t\treset_qtip($(this));\n\t});\n\n\t/**\n\t * Reset qtip to hintcss\n\t * @param tooltip\n\t */\n\tfunction reset_qtip(tooltip) {\n\t\tif (!tooltip.is('[class*=\"hint\"]')) {\n\t\t\tvar classes = tooltip.attr('class'),\n\t\t\t\ticon_classes = [],\n\t\t\t\tlabel_length = tooltip.data('tooltip').split( ' ' ).length;\n\n\t\t\tif (classes) {\n\t\t\t\tclasses = classes.split(' ');\n\t\t\t\ticon_classes = $.grep(classes, function (item) {\n\t\t\t\t\treturn ( -1 !== item.indexOf('give-icon') );\n\t\t\t\t});\n\n\t\t\t\tif (icon_classes.length) {\n\t\t\t\t\t// Set icon classes string.\n\t\t\t\t\ticon_classes = icon_classes.join(' ');\n\n\t\t\t\t\t// Remove icon class.\n\t\t\t\t\ttooltip.removeClass(icon_classes);\n\n\t\t\t\t\t// Add icon.\n\t\t\t\t\ttooltip.append('<i class=\"' + icon_classes + '\"></i>');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add hint.css related classes.\n\t\t\ttooltip.addClass('hint--top');\n\n\t\t\tif( 15 < label_length ) {\n\t\t\t\ttooltip.addClass('hint--large');\n\t\t\t}else if( 7 < label_length ) {\n\t\t\t\ttooltip.addClass('hint--medium');\n\t\t\t}\n\n\t\t\ttooltip.attr('aria-label', tooltip.data('tooltip') );\n\t\t}\n\t}\n});\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/plugins/give-hint.css.js","/**\n * This API is under development, so do not use this in production.\n * We will open this API for use after some testing (coming releases).\n */\nimport 'magnific-popup';\nimport './dynamicListener.js';\n\n/**\n * This abstract class is base for modal\n *\n * @since 2.1.0\n */\nclass GiveModal {\n\tconstructor(obj) {\n\t\tif (GiveModal === this.constructor) {\n\t\t\tthrow new Error('Abstract classes can\\'t be instantiated.');\n\t\t}\n\n\t\tthis.config = Object.assign(\n\t\t\t{\n\t\t\t\ttype: '',\n\t\t\t\ttriggerSelector: '',\n\t\t\t\texternalPlugin: 'magnificPopup',\n\t\t\t\tclasses: {modalWrapper: ''},\n\t\t\t\tmodalContent: {},\n\t\t\t},\n\t\t\tobj\n\t\t);\n\n\t\t// Set main class.\n\t\tthis.config.mainClass = `${this.config.mainClass ? this.config.mainClass : '' } modal-fade-slide`.trim();\n\t}\n\n\t/**\n\t * Bootstrap\n\t */\n\tinit() {\n\t\tthis.setupTemplate();\n\t\tthis.popupConfig();\n\t\tthis.__setupClickEvent();\n\t}\n\n\t/**\n\t * Get template\n\t *\n\t * @since 2.1.0\n\t */\n\tget_template() {\n\t\tlet template = '<div class=\"give-hidden\"></div>';\n\n\t\tif (this.config.type.length) {\n\t\t\ttemplate = `<div class=\"give-modal give-modal--zoom ${ this.config.classes.modalWrapper ? `${this.config.classes.modalWrapper}`.trim() : '' }\">\n\n\t\t\t\t<div class=\"give-modal__body\">\n\t\t\t\t\t${ this.config.modalContent.title ? `<h2 class=\"give-modal__title\">${this.config.modalContent.title}</h2>` : '' }\n\t\t\t\t\t${ this.config.modalContent.desc ? `<p class=\"give-modal__description\">${this.config.modalContent.desc}</p>` : '' }\n\t\t\t\t</div>\n\t\n\t\t\t\t<div class=\"give-modal__controls\">\n\t\t\t\t\t<button class=\"give-button give-button--secondary give-popup-close-button\">\n\t\t\t\t\t\t${ this.config.modalContent.cancelBtnTitle ? this.config.modalContent.cancelBtnTitle : ('confirm' === this.config.type ? give_vars.cancel : give_vars.close ) }\n\t\t\t\t\t</button>\n\t\t\t\t\t${ ('confirm' !== this.config.type) ? '' : `<button class=\"give-button give-button--primary give-popup-confirm-button\">\n\t\t\t\t\t\t${ this.config.modalContent.confirmBtnTitle ? this.config.modalContent.confirmBtnTitle : give_vars.confirm }\n\t\t\t\t\t</button>`}\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t</div>`;\n\t\t}\n\n\t\treturn template;\n\t}\n\n\t/**\n\t * Setup template\n\t *\n\t * @since 2.1.0\n\t */\n\tsetupTemplate() {\n\t\tthis.config.template = this.get_template();\n\t}\n\n\t/**\n\t * Handle click event if triggerSelector is set.\n\t *\n\t * @since 2.1.0\n\t * @private\n\t */\n\t__setupClickEvent() {\n\t\t// Bailout.\n\t\tif (!this.config.triggerSelector.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tjQuery( this.config.triggerSelector ).magnificPopup(this.config);\n\t}\n\n\t/**\n\t * Setup popup params\n\t *\n\t * Note: only for internal purpose\n\t *\n\t * @since 2.1.0\n\t * @private\n\t */\n\tpopupConfig() {\n\t\tif ('magnificPopup' === this.config.externalPlugin) {\n\t\t\tthis.config.items = this.config.items || {\n\t\t\t\tsrc: this.config.template,\n\t\t\t\ttype: 'inline'\n\t\t\t};\n\n\t\t\tthis.config.removalDelay = 300;\n\t\t\tthis.config.fixedContentPos = true;\n\t\t\tthis.config.fixedBgPos = true;\n\t\t\tthis.config.alignTop = true;\n\t\t\tthis.config.showCloseBtn = false;\n\t\t\tthis.config.closeOnBgClick = false;\n\t\t\tthis.config.enableEscapeKey = true;\n\t\t\tthis.config.focus = '.give-popup-close-button';\n\t\t}\n\t}\n\n\t/**\n\t * Click close button event handler\n\t *\n\t * @since 2.1.0\n\t * @private\n\t */\n\tstatic __closePopup(event) {\n\t\tevent.preventDefault();\n\t\tjQuery.magnificPopup.instance.close();\n\t}\n\n\t/**\n\t * Give's Notice Popup\n\t *\n\t * @since 2.1.0\n\t */\n\trender() {\n\t\tswitch (this.config.externalPlugin) {\n\n\t\t\tcase 'magnificPopup':\n\t\t\t\tif( ! this.config.triggerSelector ) {\n\t\t\t\t\tjQuery.magnificPopup.open(this.config);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn this;\n\t}\n\n}\n\n/**\n * This class will handle error alert modal\n *\n * @since 2.1.0\n */\nclass GiveErrorAlert extends GiveModal {\n\tconstructor(obj) {\n\t\tobj.type = 'alert';\n\t\tsuper(obj);\n\t\tthis.config.classes.modalWrapper = 'give-modal--error';\n\n\t\tthis.init();\n\t}\n}\n\n\n/**\n * This class will handle warning alert modal\n *\n * @since 2.1.0\n */\nclass GiveWarningAlert extends GiveModal {\n\tconstructor(obj) {\n\t\tobj.type = 'alert';\n\t\tsuper(obj);\n\t\tthis.config.classes.modalWrapper = 'give-modal--warning';\n\n\t\tthis.init();\n\n\t}\n}\n\n/**\n * This class will handle notice alert modal\n *\n * @since 2.1.0\n */\nclass GiveNoticeAlert extends GiveModal {\n\tconstructor(obj) {\n\t\tobj.type = 'alert';\n\t\tsuper(obj);\n\t\tthis.config.classes.modalWrapper = 'give-modal--notice';\n\n\t\tthis.init();\n\t}\n}\n\n/**\n * This class will handle success alert modal\n *\n * @since 2.1.0\n */\nclass GiveSuccessAlert extends GiveModal {\n\tconstructor(obj) {\n\t\tobj.type = 'alert';\n\t\tsuper(obj);\n\t\tthis.config.classes.modalWrapper = 'give-modal--success';\n\n\t\tthis.init();\n\t}\n}\n\n/**\n * This class will handle confirm modal\n *\n * @since 2.1.0\n */\nclass GiveConfirmModal extends GiveModal {\n\tconstructor(obj) {\n\t\tobj.type = 'confirm';\n\t\tsuper(obj);\n\n\t\tif ( 'undefined' !== typeof( obj.modalWrapper ) && '' !== obj.modalWrapper ) {\n\t\t\tthis.config.classes.modalWrapper = obj.modalWrapper;\n\t\t}\n\n\t\tthis.init();\n\t}\n\n\t/**\n\t * Confirm button click event handler\n\t *\n\t * Note: only for internal purpose\n\t *\n\t * @since 2.1.0\n\t * @private\n\t */\n\tstatic __confirmPopup() {\n\t\tif ('function' === typeof jQuery.magnificPopup.instance.st.successConfirm) {\n\t\t\tjQuery.magnificPopup.instance.st.successConfirm({\n\t\t\t\tel: jQuery.magnificPopup.instance.st.el,\n\t\t\t});\n\t\t\tjQuery.magnificPopup.close();\n\t\t}\n\t}\n}\n\n/**\n * Add events\n */\nwindow.addDynamicEventListener(document, 'click', '.give-popup-close-button', GiveModal.__closePopup);\nwindow.addDynamicEventListener(document, 'click', '.give-popup-confirm-button', GiveConfirmModal.__confirmPopup);\n\nexport {GiveModal, GiveErrorAlert, GiveWarningAlert, GiveNoticeAlert, GiveSuccessAlert, GiveConfirmModal};\n\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/plugins/modal.js","/*! Magnific Popup - v1.1.0 - 2016-02-20\n* http://dimsemenov.com/plugins/magnific-popup/\n* Copyright (c) 2016 Dmitry Semenov; */\n;(function (factory) { \nif (typeof define === 'function' && define.amd) { \n // AMD. Register as an anonymous module. \n define(['jquery'], factory); \n } else if (typeof exports === 'object') { \n // Node/CommonJS \n factory(require('jquery')); \n } else { \n // Browser globals \n factory(window.jQuery || window.Zepto); \n } \n }(function($) { \n\n/*>>core*/\n/**\n * \n * Magnific Popup Core JS file\n * \n */\n\n\n/**\n * Private static constants\n */\nvar CLOSE_EVENT = 'Close',\n\tBEFORE_CLOSE_EVENT = 'BeforeClose',\n\tAFTER_CLOSE_EVENT = 'AfterClose',\n\tBEFORE_APPEND_EVENT = 'BeforeAppend',\n\tMARKUP_PARSE_EVENT = 'MarkupParse',\n\tOPEN_EVENT = 'Open',\n\tCHANGE_EVENT = 'Change',\n\tNS = 'mfp',\n\tEVENT_NS = '.' + NS,\n\tREADY_CLASS = 'mfp-ready',\n\tREMOVING_CLASS = 'mfp-removing',\n\tPREVENT_CLOSE_CLASS = 'mfp-prevent-close';\n\n\n/**\n * Private vars \n */\n/*jshint -W079 */\nvar mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'\n\tMagnificPopup = function(){},\n\t_isJQ = !!(window.jQuery),\n\t_prevStatus,\n\t_window = $(window),\n\t_document,\n\t_prevContentType,\n\t_wrapClasses,\n\t_currPopupType;\n\n\n/**\n * Private functions\n */\nvar _mfpOn = function(name, f) {\n\t\tmfp.ev.on(NS + name + EVENT_NS, f);\n\t},\n\t_getEl = function(className, appendTo, html, raw) {\n\t\tvar el = document.createElement('div');\n\t\tel.className = 'mfp-'+className;\n\t\tif(html) {\n\t\t\tel.innerHTML = html;\n\t\t}\n\t\tif(!raw) {\n\t\t\tel = $(el);\n\t\t\tif(appendTo) {\n\t\t\t\tel.appendTo(appendTo);\n\t\t\t}\n\t\t} else if(appendTo) {\n\t\t\tappendTo.appendChild(el);\n\t\t}\n\t\treturn el;\n\t},\n\t_mfpTrigger = function(e, data) {\n\t\tmfp.ev.triggerHandler(NS + e, data);\n\n\t\tif(mfp.st.callbacks) {\n\t\t\t// converts \"mfpEventName\" to \"eventName\" callback and triggers it if it's present\n\t\t\te = e.charAt(0).toLowerCase() + e.slice(1);\n\t\t\tif(mfp.st.callbacks[e]) {\n\t\t\t\tmfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);\n\t\t\t}\n\t\t}\n\t},\n\t_getCloseBtn = function(type) {\n\t\tif(type !== _currPopupType || !mfp.currTemplate.closeBtn) {\n\t\t\tmfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );\n\t\t\t_currPopupType = type;\n\t\t}\n\t\treturn mfp.currTemplate.closeBtn;\n\t},\n\t// Initialize Magnific Popup only when called at least once\n\t_checkInstance = function() {\n\t\tif(!$.magnificPopup.instance) {\n\t\t\t/*jshint -W020 */\n\t\t\tmfp = new MagnificPopup();\n\t\t\tmfp.init();\n\t\t\t$.magnificPopup.instance = mfp;\n\t\t}\n\t},\n\t// CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr\n\tsupportsTransitions = function() {\n\t\tvar s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist\n\t\t\tv = ['ms','O','Moz','Webkit']; // 'v' for vendor\n\n\t\tif( s['transition'] !== undefined ) {\n\t\t\treturn true; \n\t\t}\n\t\t\t\n\t\twhile( v.length ) {\n\t\t\tif( v.pop() + 'Transition' in s ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn false;\n\t};\n\n\n\n/**\n * Public functions\n */\nMagnificPopup.prototype = {\n\n\tconstructor: MagnificPopup,\n\n\t/**\n\t * Initializes Magnific Popup plugin. \n\t * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed\n\t */\n\tinit: function() {\n\t\tvar appVersion = navigator.appVersion;\n\t\tmfp.isLowIE = mfp.isIE8 = document.all && !document.addEventListener;\n\t\tmfp.isAndroid = (/android/gi).test(appVersion);\n\t\tmfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);\n\t\tmfp.supportsTransition = supportsTransitions();\n\n\t\t// We disable fixed positioned lightbox on devices that don't handle it nicely.\n\t\t// If you know a better way of detecting this - let me know.\n\t\tmfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );\n\t\t_document = $(document);\n\n\t\tmfp.popupsCache = {};\n\t},\n\n\t/**\n\t * Opens popup\n\t * @param data [description]\n\t */\n\topen: function(data) {\n\n\t\tvar i;\n\n\t\tif(data.isObj === false) { \n\t\t\t// convert jQuery collection to array to avoid conflicts later\n\t\t\tmfp.items = data.items.toArray();\n\n\t\t\tmfp.index = 0;\n\t\t\tvar items = data.items,\n\t\t\t\titem;\n\t\t\tfor(i = 0; i < items.length; i++) {\n\t\t\t\titem = items[i];\n\t\t\t\tif(item.parsed) {\n\t\t\t\t\titem = item.el[0];\n\t\t\t\t}\n\t\t\t\tif(item === data.el[0]) {\n\t\t\t\t\tmfp.index = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tmfp.items = $.isArray(data.items) ? data.items : [data.items];\n\t\t\tmfp.index = data.index || 0;\n\t\t}\n\n\t\t// if popup is already opened - we just update the content\n\t\tif(mfp.isOpen) {\n\t\t\tmfp.updateItemHTML();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmfp.types = []; \n\t\t_wrapClasses = '';\n\t\tif(data.mainEl && data.mainEl.length) {\n\t\t\tmfp.ev = data.mainEl.eq(0);\n\t\t} else {\n\t\t\tmfp.ev = _document;\n\t\t}\n\n\t\tif(data.key) {\n\t\t\tif(!mfp.popupsCache[data.key]) {\n\t\t\t\tmfp.popupsCache[data.key] = {};\n\t\t\t}\n\t\t\tmfp.currTemplate = mfp.popupsCache[data.key];\n\t\t} else {\n\t\t\tmfp.currTemplate = {};\n\t\t}\n\n\n\n\t\tmfp.st = $.extend(true, {}, $.magnificPopup.defaults, data ); \n\t\tmfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;\n\n\t\tif(mfp.st.modal) {\n\t\t\tmfp.st.closeOnContentClick = false;\n\t\t\tmfp.st.closeOnBgClick = false;\n\t\t\tmfp.st.showCloseBtn = false;\n\t\t\tmfp.st.enableEscapeKey = false;\n\t\t}\n\t\t\n\n\t\t// Building markup\n\t\t// main containers are created only once\n\t\tif(!mfp.bgOverlay) {\n\n\t\t\t// Dark overlay\n\t\t\tmfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() {\n\t\t\t\tmfp.close();\n\t\t\t});\n\n\t\t\tmfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {\n\t\t\t\tif(mfp._checkIfClose(e.target)) {\n\t\t\t\t\tmfp.close();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmfp.container = _getEl('container', mfp.wrap);\n\t\t}\n\n\t\tmfp.contentContainer = _getEl('content');\n\t\tif(mfp.st.preloader) {\n\t\t\tmfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading);\n\t\t}\n\n\n\t\t// Initializing modules\n\t\tvar modules = $.magnificPopup.modules;\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar n = modules[i];\n\t\t\tn = n.charAt(0).toUpperCase() + n.slice(1);\n\t\t\tmfp['init'+n].call(mfp);\n\t\t}\n\t\t_mfpTrigger('BeforeOpen');\n\n\n\t\tif(mfp.st.showCloseBtn) {\n\t\t\t// Close button\n\t\t\tif(!mfp.st.closeBtnInside) {\n\t\t\t\tmfp.wrap.append( _getCloseBtn() );\n\t\t\t} else {\n\t\t\t\t_mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {\n\t\t\t\t\tvalues.close_replaceWith = _getCloseBtn(item.type);\n\t\t\t\t});\n\t\t\t\t_wrapClasses += ' mfp-close-btn-in';\n\t\t\t}\n\t\t}\n\n\t\tif(mfp.st.alignTop) {\n\t\t\t_wrapClasses += ' mfp-align-top';\n\t\t}\n\n\t\n\n\t\tif(mfp.fixedContentPos) {\n\t\t\tmfp.wrap.css({\n\t\t\t\toverflow: mfp.st.overflowY,\n\t\t\t\toverflowX: 'hidden',\n\t\t\t\toverflowY: mfp.st.overflowY\n\t\t\t});\n\t\t} else {\n\t\t\tmfp.wrap.css({ \n\t\t\t\ttop: _window.scrollTop(),\n\t\t\t\tposition: 'absolute'\n\t\t\t});\n\t\t}\n\t\tif( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) {\n\t\t\tmfp.bgOverlay.css({\n\t\t\t\theight: _document.height(),\n\t\t\t\tposition: 'absolute'\n\t\t\t});\n\t\t}\n\n\t\t\n\n\t\tif(mfp.st.enableEscapeKey) {\n\t\t\t// Close on ESC key\n\t\t\t_document.on('keyup' + EVENT_NS, function(e) {\n\t\t\t\tif(e.keyCode === 27) {\n\t\t\t\t\tmfp.close();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t_window.on('resize' + EVENT_NS, function() {\n\t\t\tmfp.updateSize();\n\t\t});\n\n\n\t\tif(!mfp.st.closeOnContentClick) {\n\t\t\t_wrapClasses += ' mfp-auto-cursor';\n\t\t}\n\t\t\n\t\tif(_wrapClasses)\n\t\t\tmfp.wrap.addClass(_wrapClasses);\n\n\n\t\t// this triggers recalculation of layout, so we get it once to not to trigger twice\n\t\tvar windowHeight = mfp.wH = _window.height();\n\n\t\t\n\t\tvar windowStyles = {};\n\n\t\tif( mfp.fixedContentPos ) {\n if(mfp._hasScrollBar(windowHeight)){\n var s = mfp._getScrollbarSize();\n if(s) {\n windowStyles.marginRight = s;\n }\n }\n }\n\n\t\tif(mfp.fixedContentPos) {\n\t\t\tif(!mfp.isIE7) {\n\t\t\t\twindowStyles.overflow = 'hidden';\n\t\t\t} else {\n\t\t\t\t// ie7 double-scroll bug\n\t\t\t\t$('body, html').css('overflow', 'hidden');\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t\n\t\tvar classesToadd = mfp.st.mainClass;\n\t\tif(mfp.isIE7) {\n\t\t\tclassesToadd += ' mfp-ie7';\n\t\t}\n\t\tif(classesToadd) {\n\t\t\tmfp._addClassToMFP( classesToadd );\n\t\t}\n\n\t\t// add content\n\t\tmfp.updateItemHTML();\n\n\t\t_mfpTrigger('BuildControls');\n\n\t\t// remove scrollbar, add margin e.t.c\n\t\t$('html').css(windowStyles);\n\t\t\n\t\t// add everything to DOM\n\t\tmfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || $(document.body) );\n\n\t\t// Save last focused element\n\t\tmfp._lastFocusedEl = document.activeElement;\n\t\t\n\t\t// Wait for next cycle to allow CSS transition\n\t\tsetTimeout(function() {\n\t\t\t\n\t\t\tif(mfp.content) {\n\t\t\t\tmfp._addClassToMFP(READY_CLASS);\n\t\t\t\tmfp._setFocus();\n\t\t\t} else {\n\t\t\t\t// if content is not defined (not loaded e.t.c) we add class only for BG\n\t\t\t\tmfp.bgOverlay.addClass(READY_CLASS);\n\t\t\t}\n\t\t\t\n\t\t\t// Trap the focus in popup\n\t\t\t_document.on('focusin' + EVENT_NS, mfp._onFocusIn);\n\n\t\t}, 16);\n\n\t\tmfp.isOpen = true;\n\t\tmfp.updateSize(windowHeight);\n\t\t_mfpTrigger(OPEN_EVENT);\n\n\t\treturn data;\n\t},\n\n\t/**\n\t * Closes the popup\n\t */\n\tclose: function() {\n\t\tif(!mfp.isOpen) return;\n\t\t_mfpTrigger(BEFORE_CLOSE_EVENT);\n\n\t\tmfp.isOpen = false;\n\t\t// for CSS3 animation\n\t\tif(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) {\n\t\t\tmfp._addClassToMFP(REMOVING_CLASS);\n\t\t\tsetTimeout(function() {\n\t\t\t\tmfp._close();\n\t\t\t}, mfp.st.removalDelay);\n\t\t} else {\n\t\t\tmfp._close();\n\t\t}\n\t},\n\n\t/**\n\t * Helper for close() function\n\t */\n\t_close: function() {\n\t\t_mfpTrigger(CLOSE_EVENT);\n\n\t\tvar classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';\n\n\t\tmfp.bgOverlay.detach();\n\t\tmfp.wrap.detach();\n\t\tmfp.container.empty();\n\n\t\tif(mfp.st.mainClass) {\n\t\t\tclassesToRemove += mfp.st.mainClass + ' ';\n\t\t}\n\n\t\tmfp._removeClassFromMFP(classesToRemove);\n\n\t\tif(mfp.fixedContentPos) {\n\t\t\tvar windowStyles = {marginRight: ''};\n\t\t\tif(mfp.isIE7) {\n\t\t\t\t$('body, html').css('overflow', '');\n\t\t\t} else {\n\t\t\t\twindowStyles.overflow = '';\n\t\t\t}\n\t\t\t$('html').css(windowStyles);\n\t\t}\n\t\t\n\t\t_document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);\n\t\tmfp.ev.off(EVENT_NS);\n\n\t\t// clean up DOM elements that aren't removed\n\t\tmfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');\n\t\tmfp.bgOverlay.attr('class', 'mfp-bg');\n\t\tmfp.container.attr('class', 'mfp-container');\n\n\t\t// remove close button from target element\n\t\tif(mfp.st.showCloseBtn &&\n\t\t(!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {\n\t\t\tif(mfp.currTemplate.closeBtn)\n\t\t\t\tmfp.currTemplate.closeBtn.detach();\n\t\t}\n\n\n\t\tif(mfp.st.autoFocusLast && mfp._lastFocusedEl) {\n\t\t\t$(mfp._lastFocusedEl).focus(); // put tab focus back\n\t\t}\n\t\tmfp.currItem = null;\t\n\t\tmfp.content = null;\n\t\tmfp.currTemplate = null;\n\t\tmfp.prevHeight = 0;\n\n\t\t_mfpTrigger(AFTER_CLOSE_EVENT);\n\t},\n\t\n\tupdateSize: function(winHeight) {\n\n\t\tif(mfp.isIOS) {\n\t\t\t// fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2\n\t\t\tvar zoomLevel = document.documentElement.clientWidth / window.innerWidth;\n\t\t\tvar height = window.innerHeight * zoomLevel;\n\t\t\tmfp.wrap.css('height', height);\n\t\t\tmfp.wH = height;\n\t\t} else {\n\t\t\tmfp.wH = winHeight || _window.height();\n\t\t}\n\t\t// Fixes #84: popup incorrectly positioned with position:relative on body\n\t\tif(!mfp.fixedContentPos) {\n\t\t\tmfp.wrap.css('height', mfp.wH);\n\t\t}\n\n\t\t_mfpTrigger('Resize');\n\n\t},\n\n\t/**\n\t * Set content of popup based on current index\n\t */\n\tupdateItemHTML: function() {\n\t\tvar item = mfp.items[mfp.index];\n\n\t\t// Detach and perform modifications\n\t\tmfp.contentContainer.detach();\n\n\t\tif(mfp.content)\n\t\t\tmfp.content.detach();\n\n\t\tif(!item.parsed) {\n\t\t\titem = mfp.parseEl( mfp.index );\n\t\t}\n\n\t\tvar type = item.type;\n\n\t\t_mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]);\n\t\t// BeforeChange event works like so:\n\t\t// _mfpOn('BeforeChange', function(e, prevType, newType) { });\n\n\t\tmfp.currItem = item;\n\n\t\tif(!mfp.currTemplate[type]) {\n\t\t\tvar markup = mfp.st[type] ? mfp.st[type].markup : false;\n\n\t\t\t// allows to modify markup\n\t\t\t_mfpTrigger('FirstMarkupParse', markup);\n\n\t\t\tif(markup) {\n\t\t\t\tmfp.currTemplate[type] = $(markup);\n\t\t\t} else {\n\t\t\t\t// if there is no markup found we just define that template is parsed\n\t\t\t\tmfp.currTemplate[type] = true;\n\t\t\t}\n\t\t}\n\n\t\tif(_prevContentType && _prevContentType !== item.type) {\n\t\t\tmfp.container.removeClass('mfp-'+_prevContentType+'-holder');\n\t\t}\n\n\t\tvar newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);\n\t\tmfp.appendContent(newContent, type);\n\n\t\titem.preloaded = true;\n\n\t\t_mfpTrigger(CHANGE_EVENT, item);\n\t\t_prevContentType = item.type;\n\n\t\t// Append container back after its content changed\n\t\tmfp.container.prepend(mfp.contentContainer);\n\n\t\t_mfpTrigger('AfterChange');\n\t},\n\n\n\t/**\n\t * Set HTML content of popup\n\t */\n\tappendContent: function(newContent, type) {\n\t\tmfp.content = newContent;\n\n\t\tif(newContent) {\n\t\t\tif(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&\n\t\t\t\tmfp.currTemplate[type] === true) {\n\t\t\t\t// if there is no markup, we just append close button element inside\n\t\t\t\tif(!mfp.content.find('.mfp-close').length) {\n\t\t\t\t\tmfp.content.append(_getCloseBtn());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmfp.content = newContent;\n\t\t\t}\n\t\t} else {\n\t\t\tmfp.content = '';\n\t\t}\n\n\t\t_mfpTrigger(BEFORE_APPEND_EVENT);\n\t\tmfp.container.addClass('mfp-'+type+'-holder');\n\n\t\tmfp.contentContainer.append(mfp.content);\n\t},\n\n\n\t/**\n\t * Creates Magnific Popup data object based on given data\n\t * @param {int} index Index of item to parse\n\t */\n\tparseEl: function(index) {\n\t\tvar item = mfp.items[index],\n\t\t\ttype;\n\n\t\tif(item.tagName) {\n\t\t\titem = { el: $(item) };\n\t\t} else {\n\t\t\ttype = item.type;\n\t\t\titem = { data: item, src: item.src };\n\t\t}\n\n\t\tif(item.el) {\n\t\t\tvar types = mfp.types;\n\n\t\t\t// check for 'mfp-TYPE' class\n\t\t\tfor(var i = 0; i < types.length; i++) {\n\t\t\t\tif( item.el.hasClass('mfp-'+types[i]) ) {\n\t\t\t\t\ttype = types[i];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\titem.src = item.el.attr('data-mfp-src');\n\t\t\tif(!item.src) {\n\t\t\t\titem.src = item.el.attr('href');\n\t\t\t}\n\t\t}\n\n\t\titem.type = type || mfp.st.type || 'inline';\n\t\titem.index = index;\n\t\titem.parsed = true;\n\t\tmfp.items[index] = item;\n\t\t_mfpTrigger('ElementParse', item);\n\n\t\treturn mfp.items[index];\n\t},\n\n\n\t/**\n\t * Initializes single popup or a group of popups\n\t */\n\taddGroup: function(el, options) {\n\t\tvar eHandler = function(e) {\n\t\t\te.mfpEl = this;\n\t\t\tmfp._openClick(e, el, options);\n\t\t};\n\n\t\tif(!options) {\n\t\t\toptions = {};\n\t\t}\n\n\t\tvar eName = 'click.magnificPopup';\n\t\toptions.mainEl = el;\n\n\t\tif(options.items) {\n\t\t\toptions.isObj = true;\n\t\t\tel.off(eName).on(eName, eHandler);\n\t\t} else {\n\t\t\toptions.isObj = false;\n\t\t\tif(options.delegate) {\n\t\t\t\tel.off(eName).on(eName, options.delegate , eHandler);\n\t\t\t} else {\n\t\t\t\toptions.items = el;\n\t\t\t\tel.off(eName).on(eName, eHandler);\n\t\t\t}\n\t\t}\n\t},\n\t_openClick: function(e, el, options) {\n\t\tvar midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;\n\n\n\t\tif(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;\n\n\t\tif(disableOn) {\n\t\t\tif($.isFunction(disableOn)) {\n\t\t\t\tif( !disableOn.call(mfp) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else { // else it's number\n\t\t\t\tif( _window.width() < disableOn ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(e.type) {\n\t\t\te.preventDefault();\n\n\t\t\t// This will prevent popup from closing if element is inside and popup is already opened\n\t\t\tif(mfp.isOpen) {\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t}\n\n\t\toptions.el = $(e.mfpEl);\n\t\tif(options.delegate) {\n\t\t\toptions.items = el.find(options.delegate);\n\t\t}\n\t\tmfp.open(options);\n\t},\n\n\n\t/**\n\t * Updates text on preloader\n\t */\n\tupdateStatus: function(status, text) {\n\n\t\tif(mfp.preloader) {\n\t\t\tif(_prevStatus !== status) {\n\t\t\t\tmfp.container.removeClass('mfp-s-'+_prevStatus);\n\t\t\t}\n\n\t\t\tif(!text && status === 'loading') {\n\t\t\t\ttext = mfp.st.tLoading;\n\t\t\t}\n\n\t\t\tvar data = {\n\t\t\t\tstatus: status,\n\t\t\t\ttext: text\n\t\t\t};\n\t\t\t// allows to modify status\n\t\t\t_mfpTrigger('UpdateStatus', data);\n\n\t\t\tstatus = data.status;\n\t\t\ttext = data.text;\n\n\t\t\tmfp.preloader.html(text);\n\n\t\t\tmfp.preloader.find('a').on('click', function(e) {\n\t\t\t\te.stopImmediatePropagation();\n\t\t\t});\n\n\t\t\tmfp.container.addClass('mfp-s-'+status);\n\t\t\t_prevStatus = status;\n\t\t}\n\t},\n\n\n\t/*\n\t\t\"Private\" helpers that aren't private at all\n\t */\n\t// Check to close popup or not\n\t// \"target\" is an element that was clicked\n\t_checkIfClose: function(target) {\n\n\t\tif($(target).hasClass(PREVENT_CLOSE_CLASS)) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar closeOnContent = mfp.st.closeOnContentClick;\n\t\tvar closeOnBg = mfp.st.closeOnBgClick;\n\n\t\tif(closeOnContent && closeOnBg) {\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\t// We close the popup if click is on close button or on preloader. Or if there is no content.\n\t\t\tif(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// if click is outside the content\n\t\t\tif( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) {\n\t\t\t\tif(closeOnBg) {\n\t\t\t\t\t// last check, if the clicked element is in DOM, (in case it's removed onclick)\n\t\t\t\t\tif( $.contains(document, target) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if(closeOnContent) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\t},\n\t_addClassToMFP: function(cName) {\n\t\tmfp.bgOverlay.addClass(cName);\n\t\tmfp.wrap.addClass(cName);\n\t},\n\t_removeClassFromMFP: function(cName) {\n\t\tthis.bgOverlay.removeClass(cName);\n\t\tmfp.wrap.removeClass(cName);\n\t},\n\t_hasScrollBar: function(winHeight) {\n\t\treturn ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );\n\t},\n\t_setFocus: function() {\n\t\t(mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();\n\t},\n\t_onFocusIn: function(e) {\n\t\tif( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {\n\t\t\tmfp._setFocus();\n\t\t\treturn false;\n\t\t}\n\t},\n\t_parseMarkup: function(template, values, item) {\n\t\tvar arr;\n\t\tif(item.data) {\n\t\t\tvalues = $.extend(item.data, values);\n\t\t}\n\t\t_mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] );\n\n\t\t$.each(values, function(key, value) {\n\t\t\tif(value === undefined || value === false) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tarr = key.split('_');\n\t\t\tif(arr.length > 1) {\n\t\t\t\tvar el = template.find(EVENT_NS + '-'+arr[0]);\n\n\t\t\t\tif(el.length > 0) {\n\t\t\t\t\tvar attr = arr[1];\n\t\t\t\t\tif(attr === 'replaceWith') {\n\t\t\t\t\t\tif(el[0] !== value[0]) {\n\t\t\t\t\t\t\tel.replaceWith(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(attr === 'img') {\n\t\t\t\t\t\tif(el.is('img')) {\n\t\t\t\t\t\t\tel.attr('src', value);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tel.replaceWith( $('<img>').attr('src', value).attr('class', el.attr('class')) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tel.attr(arr[1], value);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\ttemplate.find(EVENT_NS + '-'+key).html(value);\n\t\t\t}\n\t\t});\n\t},\n\n\t_getScrollbarSize: function() {\n\t\t// thx David\n\t\tif(mfp.scrollbarSize === undefined) {\n\t\t\tvar scrollDiv = document.createElement(\"div\");\n\t\t\tscrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';\n\t\t\tdocument.body.appendChild(scrollDiv);\n\t\t\tmfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n\t\t\tdocument.body.removeChild(scrollDiv);\n\t\t}\n\t\treturn mfp.scrollbarSize;\n\t}\n\n}; /* MagnificPopup core prototype end */\n\n\n\n\n/**\n * Public static functions\n */\n$.magnificPopup = {\n\tinstance: null,\n\tproto: MagnificPopup.prototype,\n\tmodules: [],\n\n\topen: function(options, index) {\n\t\t_checkInstance();\n\n\t\tif(!options) {\n\t\t\toptions = {};\n\t\t} else {\n\t\t\toptions = $.extend(true, {}, options);\n\t\t}\n\n\t\toptions.isObj = true;\n\t\toptions.index = index || 0;\n\t\treturn this.instance.open(options);\n\t},\n\n\tclose: function() {\n\t\treturn $.magnificPopup.instance && $.magnificPopup.instance.close();\n\t},\n\n\tregisterModule: function(name, module) {\n\t\tif(module.options) {\n\t\t\t$.magnificPopup.defaults[name] = module.options;\n\t\t}\n\t\t$.extend(this.proto, module.proto);\n\t\tthis.modules.push(name);\n\t},\n\n\tdefaults: {\n\n\t\t// Info about options is in docs:\n\t\t// http://dimsemenov.com/plugins/magnific-popup/documentation.html#options\n\n\t\tdisableOn: 0,\n\n\t\tkey: null,\n\n\t\tmidClick: false,\n\n\t\tmainClass: '',\n\n\t\tpreloader: true,\n\n\t\tfocus: '', // CSS selector of input to focus after popup is opened\n\n\t\tcloseOnContentClick: false,\n\n\t\tcloseOnBgClick: true,\n\n\t\tcloseBtnInside: true,\n\n\t\tshowCloseBtn: true,\n\n\t\tenableEscapeKey: true,\n\n\t\tmodal: false,\n\n\t\talignTop: false,\n\n\t\tremovalDelay: 0,\n\n\t\tprependTo: null,\n\n\t\tfixedContentPos: 'auto',\n\n\t\tfixedBgPos: 'auto',\n\n\t\toverflowY: 'auto',\n\n\t\tcloseMarkup: '<button title=\"%title%\" type=\"button\" class=\"mfp-close\">×</button>',\n\n\t\ttClose: 'Close (Esc)',\n\n\t\ttLoading: 'Loading...',\n\n\t\tautoFocusLast: true\n\n\t}\n};\n\n\n\n$.fn.magnificPopup = function(options) {\n\t_checkInstance();\n\n\tvar jqEl = $(this);\n\n\t// We call some API method of first param is a string\n\tif (typeof options === \"string\" ) {\n\n\t\tif(options === 'open') {\n\t\t\tvar items,\n\t\t\t\titemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,\n\t\t\t\tindex = parseInt(arguments[1], 10) || 0;\n\n\t\t\tif(itemOpts.items) {\n\t\t\t\titems = itemOpts.items[index];\n\t\t\t} else {\n\t\t\t\titems = jqEl;\n\t\t\t\tif(itemOpts.delegate) {\n\t\t\t\t\titems = items.find(itemOpts.delegate);\n\t\t\t\t}\n\t\t\t\titems = items.eq( index );\n\t\t\t}\n\t\t\tmfp._openClick({mfpEl:items}, jqEl, itemOpts);\n\t\t} else {\n\t\t\tif(mfp.isOpen)\n\t\t\t\tmfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));\n\t\t}\n\n\t} else {\n\t\t// clone options obj\n\t\toptions = $.extend(true, {}, options);\n\n\t\t/*\n\t\t * As Zepto doesn't support .data() method for objects\n\t\t * and it works only in normal browsers\n\t\t * we assign \"options\" object directly to the DOM element. FTW!\n\t\t */\n\t\tif(_isJQ) {\n\t\t\tjqEl.data('magnificPopup', options);\n\t\t} else {\n\t\t\tjqEl[0].magnificPopup = options;\n\t\t}\n\n\t\tmfp.addGroup(jqEl, options);\n\n\t}\n\treturn jqEl;\n};\n\n/*>>core*/\n\n/*>>inline*/\n\nvar INLINE_NS = 'inline',\n\t_hiddenClass,\n\t_inlinePlaceholder,\n\t_lastInlineElement,\n\t_putInlineElementsBack = function() {\n\t\tif(_lastInlineElement) {\n\t\t\t_inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach();\n\t\t\t_lastInlineElement = null;\n\t\t}\n\t};\n\n$.magnificPopup.registerModule(INLINE_NS, {\n\toptions: {\n\t\thiddenClass: 'hide', // will be appended with `mfp-` prefix\n\t\tmarkup: '',\n\t\ttNotFound: 'Content not found'\n\t},\n\tproto: {\n\n\t\tinitInline: function() {\n\t\t\tmfp.types.push(INLINE_NS);\n\n\t\t\t_mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() {\n\t\t\t\t_putInlineElementsBack();\n\t\t\t});\n\t\t},\n\n\t\tgetInline: function(item, template) {\n\n\t\t\t_putInlineElementsBack();\n\n\t\t\tif(item.src) {\n\t\t\t\tvar inlineSt = mfp.st.inline,\n\t\t\t\t\tel = $(item.src);\n\n\t\t\t\tif(el.length) {\n\n\t\t\t\t\t// If target element has parent - we replace it with placeholder and put it back after popup is closed\n\t\t\t\t\tvar parent = el[0].parentNode;\n\t\t\t\t\tif(parent && parent.tagName) {\n\t\t\t\t\t\tif(!_inlinePlaceholder) {\n\t\t\t\t\t\t\t_hiddenClass = inlineSt.hiddenClass;\n\t\t\t\t\t\t\t_inlinePlaceholder = _getEl(_hiddenClass);\n\t\t\t\t\t\t\t_hiddenClass = 'mfp-'+_hiddenClass;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// replace target inline element with placeholder\n\t\t\t\t\t\t_lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);\n\t\t\t\t\t}\n\n\t\t\t\t\tmfp.updateStatus('ready');\n\t\t\t\t} else {\n\t\t\t\t\tmfp.updateStatus('error', inlineSt.tNotFound);\n\t\t\t\t\tel = $('<div>');\n\t\t\t\t}\n\n\t\t\t\titem.inlineElement = el;\n\t\t\t\treturn el;\n\t\t\t}\n\n\t\t\tmfp.updateStatus('ready');\n\t\t\tmfp._parseMarkup(template, {}, item);\n\t\t\treturn template;\n\t\t}\n\t}\n});\n\n/*>>inline*/\n\n/*>>ajax*/\nvar AJAX_NS = 'ajax',\n\t_ajaxCur,\n\t_removeAjaxCursor = function() {\n\t\tif(_ajaxCur) {\n\t\t\t$(document.body).removeClass(_ajaxCur);\n\t\t}\n\t},\n\t_destroyAjaxRequest = function() {\n\t\t_removeAjaxCursor();\n\t\tif(mfp.req) {\n\t\t\tmfp.req.abort();\n\t\t}\n\t};\n\n$.magnificPopup.registerModule(AJAX_NS, {\n\n\toptions: {\n\t\tsettings: null,\n\t\tcursor: 'mfp-ajax-cur',\n\t\ttError: '<a href=\"%url%\">The content</a> could not be loaded.'\n\t},\n\n\tproto: {\n\t\tinitAjax: function() {\n\t\t\tmfp.types.push(AJAX_NS);\n\t\t\t_ajaxCur = mfp.st.ajax.cursor;\n\n\t\t\t_mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);\n\t\t\t_mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);\n\t\t},\n\t\tgetAjax: function(item) {\n\n\t\t\tif(_ajaxCur) {\n\t\t\t\t$(document.body).addClass(_ajaxCur);\n\t\t\t}\n\n\t\t\tmfp.updateStatus('loading');\n\n\t\t\tvar opts = $.extend({\n\t\t\t\turl: item.src,\n\t\t\t\tsuccess: function(data, textStatus, jqXHR) {\n\t\t\t\t\tvar temp = {\n\t\t\t\t\t\tdata:data,\n\t\t\t\t\t\txhr:jqXHR\n\t\t\t\t\t};\n\n\t\t\t\t\t_mfpTrigger('ParseAjax', temp);\n\n\t\t\t\t\tmfp.appendContent( $(temp.data), AJAX_NS );\n\n\t\t\t\t\titem.finished = true;\n\n\t\t\t\t\t_removeAjaxCursor();\n\n\t\t\t\t\tmfp._setFocus();\n\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tmfp.wrap.addClass(READY_CLASS);\n\t\t\t\t\t}, 16);\n\n\t\t\t\t\tmfp.updateStatus('ready');\n\n\t\t\t\t\t_mfpTrigger('AjaxContentAdded');\n\t\t\t\t},\n\t\t\t\terror: function() {\n\t\t\t\t\t_removeAjaxCursor();\n\t\t\t\t\titem.finished = item.loadError = true;\n\t\t\t\t\tmfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));\n\t\t\t\t}\n\t\t\t}, mfp.st.ajax.settings);\n\n\t\t\tmfp.req = $.ajax(opts);\n\n\t\t\treturn '';\n\t\t}\n\t}\n});\n\n/*>>ajax*/\n\n/*>>image*/\nvar _imgInterval,\n\t_getTitle = function(item) {\n\t\tif(item.data && item.data.title !== undefined)\n\t\t\treturn item.data.title;\n\n\t\tvar src = mfp.st.image.titleSrc;\n\n\t\tif(src) {\n\t\t\tif($.isFunction(src)) {\n\t\t\t\treturn src.call(mfp, item);\n\t\t\t} else if(item.el) {\n\t\t\t\treturn item.el.attr(src) || '';\n\t\t\t}\n\t\t}\n\t\treturn '';\n\t};\n\n$.magnificPopup.registerModule('image', {\n\n\toptions: {\n\t\tmarkup: '<div class=\"mfp-figure\">'+\n\t\t\t\t\t'<div class=\"mfp-close\"></div>'+\n\t\t\t\t\t'<figure>'+\n\t\t\t\t\t\t'<div class=\"mfp-img\"></div>'+\n\t\t\t\t\t\t'<figcaption>'+\n\t\t\t\t\t\t\t'<div class=\"mfp-bottom-bar\">'+\n\t\t\t\t\t\t\t\t'<div class=\"mfp-title\"></div>'+\n\t\t\t\t\t\t\t\t'<div class=\"mfp-counter\"></div>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t'</figcaption>'+\n\t\t\t\t\t'</figure>'+\n\t\t\t\t'</div>',\n\t\tcursor: 'mfp-zoom-out-cur',\n\t\ttitleSrc: 'title',\n\t\tverticalFit: true,\n\t\ttError: '<a href=\"%url%\">The image</a> could not be loaded.'\n\t},\n\n\tproto: {\n\t\tinitImage: function() {\n\t\t\tvar imgSt = mfp.st.image,\n\t\t\t\tns = '.image';\n\n\t\t\tmfp.types.push('image');\n\n\t\t\t_mfpOn(OPEN_EVENT+ns, function() {\n\t\t\t\tif(mfp.currItem.type === 'image' && imgSt.cursor) {\n\t\t\t\t\t$(document.body).addClass(imgSt.cursor);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_mfpOn(CLOSE_EVENT+ns, function() {\n\t\t\t\tif(imgSt.cursor) {\n\t\t\t\t\t$(document.body).removeClass(imgSt.cursor);\n\t\t\t\t}\n\t\t\t\t_window.off('resize' + EVENT_NS);\n\t\t\t});\n\n\t\t\t_mfpOn('Resize'+ns, mfp.resizeImage);\n\t\t\tif(mfp.isLowIE) {\n\t\t\t\t_mfpOn('AfterChange', mfp.resizeImage);\n\t\t\t}\n\t\t},\n\t\tresizeImage: function() {\n\t\t\tvar item = mfp.currItem;\n\t\t\tif(!item || !item.img) return;\n\n\t\t\tif(mfp.st.image.verticalFit) {\n\t\t\t\tvar decr = 0;\n\t\t\t\t// fix box-sizing in ie7/8\n\t\t\t\tif(mfp.isLowIE) {\n\t\t\t\t\tdecr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);\n\t\t\t\t}\n\t\t\t\titem.img.css('max-height', mfp.wH-decr);\n\t\t\t}\n\t\t},\n\t\t_onImageHasSize: function(item) {\n\t\t\tif(item.img) {\n\n\t\t\t\titem.hasSize = true;\n\n\t\t\t\tif(_imgInterval) {\n\t\t\t\t\tclearInterval(_imgInterval);\n\t\t\t\t}\n\n\t\t\t\titem.isCheckingImgSize = false;\n\n\t\t\t\t_mfpTrigger('ImageHasSize', item);\n\n\t\t\t\tif(item.imgHidden) {\n\t\t\t\t\tif(mfp.content)\n\t\t\t\t\t\tmfp.content.removeClass('mfp-loading');\n\n\t\t\t\t\titem.imgHidden = false;\n\t\t\t\t}\n\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Function that loops until the image has size to display elements that rely on it asap\n\t\t */\n\t\tfindImageSize: function(item) {\n\n\t\t\tvar counter = 0,\n\t\t\t\timg = item.img[0],\n\t\t\t\tmfpSetInterval = function(delay) {\n\n\t\t\t\t\tif(_imgInterval) {\n\t\t\t\t\t\tclearInterval(_imgInterval);\n\t\t\t\t\t}\n\t\t\t\t\t// decelerating interval that checks for size of an image\n\t\t\t\t\t_imgInterval = setInterval(function() {\n\t\t\t\t\t\tif(img.naturalWidth > 0) {\n\t\t\t\t\t\t\tmfp._onImageHasSize(item);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(counter > 200) {\n\t\t\t\t\t\t\tclearInterval(_imgInterval);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\tif(counter === 3) {\n\t\t\t\t\t\t\tmfpSetInterval(10);\n\t\t\t\t\t\t} else if(counter === 40) {\n\t\t\t\t\t\t\tmfpSetInterval(50);\n\t\t\t\t\t\t} else if(counter === 100) {\n\t\t\t\t\t\t\tmfpSetInterval(500);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, delay);\n\t\t\t\t};\n\n\t\t\tmfpSetInterval(1);\n\t\t},\n\n\t\tgetImage: function(item, template) {\n\n\t\t\tvar guard = 0,\n\n\t\t\t\t// image load complete handler\n\t\t\t\tonLoadComplete = function() {\n\t\t\t\t\tif(item) {\n\t\t\t\t\t\tif (item.img[0].complete) {\n\t\t\t\t\t\t\titem.img.off('.mfploader');\n\n\t\t\t\t\t\t\tif(item === mfp.currItem){\n\t\t\t\t\t\t\t\tmfp._onImageHasSize(item);\n\n\t\t\t\t\t\t\t\tmfp.updateStatus('ready');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\titem.hasSize = true;\n\t\t\t\t\t\t\titem.loaded = true;\n\n\t\t\t\t\t\t\t_mfpTrigger('ImageLoadComplete');\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// if image complete check fails 200 times (20 sec), we assume that there was an error.\n\t\t\t\t\t\t\tguard++;\n\t\t\t\t\t\t\tif(guard < 200) {\n\t\t\t\t\t\t\t\tsetTimeout(onLoadComplete,100);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tonLoadError();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t// image error handler\n\t\t\t\tonLoadError = function() {\n\t\t\t\t\tif(item) {\n\t\t\t\t\t\titem.img.off('.mfploader');\n\t\t\t\t\t\tif(item === mfp.currItem){\n\t\t\t\t\t\t\tmfp._onImageHasSize(item);\n\t\t\t\t\t\t\tmfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\titem.hasSize = true;\n\t\t\t\t\t\titem.loaded = true;\n\t\t\t\t\t\titem.loadError = true;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\timgSt = mfp.st.image;\n\n\n\t\t\tvar el = template.find('.mfp-img');\n\t\t\tif(el.length) {\n\t\t\t\tvar img = document.createElement('img');\n\t\t\t\timg.className = 'mfp-img';\n\t\t\t\tif(item.el && item.el.find('img').length) {\n\t\t\t\t\timg.alt = item.el.find('img').attr('alt');\n\t\t\t\t}\n\t\t\t\titem.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);\n\t\t\t\timg.src = item.src;\n\n\t\t\t\t// without clone() \"error\" event is not firing when IMG is replaced by new IMG\n\t\t\t\t// TODO: find a way to avoid such cloning\n\t\t\t\tif(el.is('img')) {\n\t\t\t\t\titem.img = item.img.clone();\n\t\t\t\t}\n\n\t\t\t\timg = item.img[0];\n\t\t\t\tif(img.naturalWidth > 0) {\n\t\t\t\t\titem.hasSize = true;\n\t\t\t\t} else if(!img.width) {\n\t\t\t\t\titem.hasSize = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmfp._parseMarkup(template, {\n\t\t\t\ttitle: _getTitle(item),\n\t\t\t\timg_replaceWith: item.img\n\t\t\t}, item);\n\n\t\t\tmfp.resizeImage();\n\n\t\t\tif(item.hasSize) {\n\t\t\t\tif(_imgInterval) clearInterval(_imgInterval);\n\n\t\t\t\tif(item.loadError) {\n\t\t\t\t\ttemplate.addClass('mfp-loading');\n\t\t\t\t\tmfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );\n\t\t\t\t} else {\n\t\t\t\t\ttemplate.removeClass('mfp-loading');\n\t\t\t\t\tmfp.updateStatus('ready');\n\t\t\t\t}\n\t\t\t\treturn template;\n\t\t\t}\n\n\t\t\tmfp.updateStatus('loading');\n\t\t\titem.loading = true;\n\n\t\t\tif(!item.hasSize) {\n\t\t\t\titem.imgHidden = true;\n\t\t\t\ttemplate.addClass('mfp-loading');\n\t\t\t\tmfp.findImageSize(item);\n\t\t\t}\n\n\t\t\treturn template;\n\t\t}\n\t}\n});\n\n/*>>image*/\n\n/*>>zoom*/\nvar hasMozTransform,\n\tgetHasMozTransform = function() {\n\t\tif(hasMozTransform === undefined) {\n\t\t\thasMozTransform = document.createElement('p').style.MozTransform !== undefined;\n\t\t}\n\t\treturn hasMozTransform;\n\t};\n\n$.magnificPopup.registerModule('zoom', {\n\n\toptions: {\n\t\tenabled: false,\n\t\teasing: 'ease-in-out',\n\t\tduration: 300,\n\t\topener: function(element) {\n\t\t\treturn element.is('img') ? element : element.find('img');\n\t\t}\n\t},\n\n\tproto: {\n\n\t\tinitZoom: function() {\n\t\t\tvar zoomSt = mfp.st.zoom,\n\t\t\t\tns = '.zoom',\n\t\t\t\timage;\n\n\t\t\tif(!zoomSt.enabled || !mfp.supportsTransition) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar duration = zoomSt.duration,\n\t\t\t\tgetElToAnimate = function(image) {\n\t\t\t\t\tvar newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),\n\t\t\t\t\t\ttransition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,\n\t\t\t\t\t\tcssObj = {\n\t\t\t\t\t\t\tposition: 'fixed',\n\t\t\t\t\t\t\tzIndex: 9999,\n\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t'-webkit-backface-visibility': 'hidden'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tt = 'transition';\n\n\t\t\t\t\tcssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;\n\n\t\t\t\t\tnewImg.css(cssObj);\n\t\t\t\t\treturn newImg;\n\t\t\t\t},\n\t\t\t\tshowMainContent = function() {\n\t\t\t\t\tmfp.content.css('visibility', 'visible');\n\t\t\t\t},\n\t\t\t\topenTimeout,\n\t\t\t\tanimatedImg;\n\n\t\t\t_mfpOn('BuildControls'+ns, function() {\n\t\t\t\tif(mfp._allowZoom()) {\n\n\t\t\t\t\tclearTimeout(openTimeout);\n\t\t\t\t\tmfp.content.css('visibility', 'hidden');\n\n\t\t\t\t\t// Basically, all code below does is clones existing image, puts in on top of the current one and animated it\n\n\t\t\t\t\timage = mfp._getItemToZoom();\n\n\t\t\t\t\tif(!image) {\n\t\t\t\t\t\tshowMainContent();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tanimatedImg = getElToAnimate(image);\n\n\t\t\t\t\tanimatedImg.css( mfp._getOffset() );\n\n\t\t\t\t\tmfp.wrap.append(animatedImg);\n\n\t\t\t\t\topenTimeout = setTimeout(function() {\n\t\t\t\t\t\tanimatedImg.css( mfp._getOffset( true ) );\n\t\t\t\t\t\topenTimeout = setTimeout(function() {\n\n\t\t\t\t\t\t\tshowMainContent();\n\n\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\tanimatedImg.remove();\n\t\t\t\t\t\t\t\timage = animatedImg = null;\n\t\t\t\t\t\t\t\t_mfpTrigger('ZoomAnimationEnded');\n\t\t\t\t\t\t\t}, 16); // avoid blink when switching images\n\n\t\t\t\t\t\t}, duration); // this timeout equals animation duration\n\n\t\t\t\t\t}, 16); // by adding this timeout we avoid short glitch at the beginning of animation\n\n\n\t\t\t\t\t// Lots of timeouts...\n\t\t\t\t}\n\t\t\t});\n\t\t\t_mfpOn(BEFORE_CLOSE_EVENT+ns, function() {\n\t\t\t\tif(mfp._allowZoom()) {\n\n\t\t\t\t\tclearTimeout(openTimeout);\n\n\t\t\t\t\tmfp.st.removalDelay = duration;\n\n\t\t\t\t\tif(!image) {\n\t\t\t\t\t\timage = mfp._getItemToZoom();\n\t\t\t\t\t\tif(!image) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimatedImg = getElToAnimate(image);\n\t\t\t\t\t}\n\n\t\t\t\t\tanimatedImg.css( mfp._getOffset(true) );\n\t\t\t\t\tmfp.wrap.append(animatedImg);\n\t\t\t\t\tmfp.content.css('visibility', 'hidden');\n\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tanimatedImg.css( mfp._getOffset() );\n\t\t\t\t\t}, 16);\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\t_mfpOn(CLOSE_EVENT+ns, function() {\n\t\t\t\tif(mfp._allowZoom()) {\n\t\t\t\t\tshowMainContent();\n\t\t\t\t\tif(animatedImg) {\n\t\t\t\t\t\tanimatedImg.remove();\n\t\t\t\t\t}\n\t\t\t\t\timage = null;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t_allowZoom: function() {\n\t\t\treturn mfp.currItem.type === 'image';\n\t\t},\n\n\t\t_getItemToZoom: function() {\n\t\t\tif(mfp.currItem.hasSize) {\n\t\t\t\treturn mfp.currItem.img;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Get element postion relative to viewport\n\t\t_getOffset: function(isLarge) {\n\t\t\tvar el;\n\t\t\tif(isLarge) {\n\t\t\t\tel = mfp.currItem.img;\n\t\t\t} else {\n\t\t\t\tel = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);\n\t\t\t}\n\n\t\t\tvar offset = el.offset();\n\t\t\tvar paddingTop = parseInt(el.css('padding-top'),10);\n\t\t\tvar paddingBottom = parseInt(el.css('padding-bottom'),10);\n\t\t\toffset.top -= ( $(window).scrollTop() - paddingTop );\n\n\n\t\t\t/*\n\n\t\t\tAnimating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.\n\n\t\t\t */\n\t\t\tvar obj = {\n\t\t\t\twidth: el.width(),\n\t\t\t\t// fix Zepto height+padding issue\n\t\t\t\theight: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop\n\t\t\t};\n\n\t\t\t// I hate to do this, but there is no another option\n\t\t\tif( getHasMozTransform() ) {\n\t\t\t\tobj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';\n\t\t\t} else {\n\t\t\t\tobj.left = offset.left;\n\t\t\t\tobj.top = offset.top;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}\n\n\t}\n});\n\n\n\n/*>>zoom*/\n\n/*>>iframe*/\n\nvar IFRAME_NS = 'iframe',\n\t_emptyPage = '//about:blank',\n\n\t_fixIframeBugs = function(isShowing) {\n\t\tif(mfp.currTemplate[IFRAME_NS]) {\n\t\t\tvar el = mfp.currTemplate[IFRAME_NS].find('iframe');\n\t\t\tif(el.length) {\n\t\t\t\t// reset src after the popup is closed to avoid \"video keeps playing after popup is closed\" bug\n\t\t\t\tif(!isShowing) {\n\t\t\t\t\tel[0].src = _emptyPage;\n\t\t\t\t}\n\n\t\t\t\t// IE8 black screen bug fix\n\t\t\t\tif(mfp.isIE8) {\n\t\t\t\t\tel.css('display', isShowing ? 'block' : 'none');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n$.magnificPopup.registerModule(IFRAME_NS, {\n\n\toptions: {\n\t\tmarkup: '<div class=\"mfp-iframe-scaler\">'+\n\t\t\t\t\t'<div class=\"mfp-close\"></div>'+\n\t\t\t\t\t'<iframe class=\"mfp-iframe\" src=\"//about:blank\" frameborder=\"0\" allowfullscreen></iframe>'+\n\t\t\t\t'</div>',\n\n\t\tsrcAction: 'iframe_src',\n\n\t\t// we don't care and support only one default type of URL by default\n\t\tpatterns: {\n\t\t\tyoutube: {\n\t\t\t\tindex: 'youtube.com',\n\t\t\t\tid: 'v=',\n\t\t\t\tsrc: '//www.youtube.com/embed/%id%?autoplay=1'\n\t\t\t},\n\t\t\tvimeo: {\n\t\t\t\tindex: 'vimeo.com/',\n\t\t\t\tid: '/',\n\t\t\t\tsrc: '//player.vimeo.com/video/%id%?autoplay=1'\n\t\t\t},\n\t\t\tgmaps: {\n\t\t\t\tindex: '//maps.google.',\n\t\t\t\tsrc: '%id%&output=embed'\n\t\t\t}\n\t\t}\n\t},\n\n\tproto: {\n\t\tinitIframe: function() {\n\t\t\tmfp.types.push(IFRAME_NS);\n\n\t\t\t_mfpOn('BeforeChange', function(e, prevType, newType) {\n\t\t\t\tif(prevType !== newType) {\n\t\t\t\t\tif(prevType === IFRAME_NS) {\n\t\t\t\t\t\t_fixIframeBugs(); // iframe if removed\n\t\t\t\t\t} else if(newType === IFRAME_NS) {\n\t\t\t\t\t\t_fixIframeBugs(true); // iframe is showing\n\t\t\t\t\t}\n\t\t\t\t}// else {\n\t\t\t\t\t// iframe source is switched, don't do anything\n\t\t\t\t//}\n\t\t\t});\n\n\t\t\t_mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {\n\t\t\t\t_fixIframeBugs();\n\t\t\t});\n\t\t},\n\n\t\tgetIframe: function(item, template) {\n\t\t\tvar embedSrc = item.src;\n\t\t\tvar iframeSt = mfp.st.iframe;\n\n\t\t\t$.each(iframeSt.patterns, function() {\n\t\t\t\tif(embedSrc.indexOf( this.index ) > -1) {\n\t\t\t\t\tif(this.id) {\n\t\t\t\t\t\tif(typeof this.id === 'string') {\n\t\t\t\t\t\t\tembedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tembedSrc = this.id.call( this, embedSrc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tembedSrc = this.src.replace('%id%', embedSrc );\n\t\t\t\t\treturn false; // break;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar dataObj = {};\n\t\t\tif(iframeSt.srcAction) {\n\t\t\t\tdataObj[iframeSt.srcAction] = embedSrc;\n\t\t\t}\n\t\t\tmfp._parseMarkup(template, dataObj, item);\n\n\t\t\tmfp.updateStatus('ready');\n\n\t\t\treturn template;\n\t\t}\n\t}\n});\n\n\n\n/*>>iframe*/\n\n/*>>gallery*/\n/**\n * Get looped index depending on number of slides\n */\nvar _getLoopedId = function(index) {\n\t\tvar numSlides = mfp.items.length;\n\t\tif(index > numSlides - 1) {\n\t\t\treturn index - numSlides;\n\t\t} else if(index < 0) {\n\t\t\treturn numSlides + index;\n\t\t}\n\t\treturn index;\n\t},\n\t_replaceCurrTotal = function(text, curr, total) {\n\t\treturn text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);\n\t};\n\n$.magnificPopup.registerModule('gallery', {\n\n\toptions: {\n\t\tenabled: false,\n\t\tarrowMarkup: '<button title=\"%title%\" type=\"button\" class=\"mfp-arrow mfp-arrow-%dir%\"></button>',\n\t\tpreload: [0,2],\n\t\tnavigateByImgClick: true,\n\t\tarrows: true,\n\n\t\ttPrev: 'Previous (Left arrow key)',\n\t\ttNext: 'Next (Right arrow key)',\n\t\ttCounter: '%curr% of %total%'\n\t},\n\n\tproto: {\n\t\tinitGallery: function() {\n\n\t\t\tvar gSt = mfp.st.gallery,\n\t\t\t\tns = '.mfp-gallery';\n\n\t\t\tmfp.direction = true; // true - next, false - prev\n\n\t\t\tif(!gSt || !gSt.enabled ) return false;\n\n\t\t\t_wrapClasses += ' mfp-gallery';\n\n\t\t\t_mfpOn(OPEN_EVENT+ns, function() {\n\n\t\t\t\tif(gSt.navigateByImgClick) {\n\t\t\t\t\tmfp.wrap.on('click'+ns, '.mfp-img', function() {\n\t\t\t\t\t\tif(mfp.items.length > 1) {\n\t\t\t\t\t\t\tmfp.next();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t_document.on('keydown'+ns, function(e) {\n\t\t\t\t\tif (e.keyCode === 37) {\n\t\t\t\t\t\tmfp.prev();\n\t\t\t\t\t} else if (e.keyCode === 39) {\n\t\t\t\t\t\tmfp.next();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t_mfpOn('UpdateStatus'+ns, function(e, data) {\n\t\t\t\tif(data.text) {\n\t\t\t\t\tdata.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {\n\t\t\t\tvar l = mfp.items.length;\n\t\t\t\tvalues.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';\n\t\t\t});\n\n\t\t\t_mfpOn('BuildControls' + ns, function() {\n\t\t\t\tif(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {\n\t\t\t\t\tvar markup = gSt.arrowMarkup,\n\t\t\t\t\t\tarrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS),\n\t\t\t\t\t\tarrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS);\n\n\t\t\t\t\tarrowLeft.click(function() {\n\t\t\t\t\t\tmfp.prev();\n\t\t\t\t\t});\n\t\t\t\t\tarrowRight.click(function() {\n\t\t\t\t\t\tmfp.next();\n\t\t\t\t\t});\n\n\t\t\t\t\tmfp.container.append(arrowLeft.add(arrowRight));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_mfpOn(CHANGE_EVENT+ns, function() {\n\t\t\t\tif(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);\n\n\t\t\t\tmfp._preloadTimeout = setTimeout(function() {\n\t\t\t\t\tmfp.preloadNearbyImages();\n\t\t\t\t\tmfp._preloadTimeout = null;\n\t\t\t\t}, 16);\n\t\t\t});\n\n\n\t\t\t_mfpOn(CLOSE_EVENT+ns, function() {\n\t\t\t\t_document.off(ns);\n\t\t\t\tmfp.wrap.off('click'+ns);\n\t\t\t\tmfp.arrowRight = mfp.arrowLeft = null;\n\t\t\t});\n\n\t\t},\n\t\tnext: function() {\n\t\t\tmfp.direction = true;\n\t\t\tmfp.index = _getLoopedId(mfp.index + 1);\n\t\t\tmfp.updateItemHTML();\n\t\t},\n\t\tprev: function() {\n\t\t\tmfp.direction = false;\n\t\t\tmfp.index = _getLoopedId(mfp.index - 1);\n\t\t\tmfp.updateItemHTML();\n\t\t},\n\t\tgoTo: function(newIndex) {\n\t\t\tmfp.direction = (newIndex >= mfp.index);\n\t\t\tmfp.index = newIndex;\n\t\t\tmfp.updateItemHTML();\n\t\t},\n\t\tpreloadNearbyImages: function() {\n\t\t\tvar p = mfp.st.gallery.preload,\n\t\t\t\tpreloadBefore = Math.min(p[0], mfp.items.length),\n\t\t\t\tpreloadAfter = Math.min(p[1], mfp.items.length),\n\t\t\t\ti;\n\n\t\t\tfor(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {\n\t\t\t\tmfp._preloadItem(mfp.index+i);\n\t\t\t}\n\t\t\tfor(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {\n\t\t\t\tmfp._preloadItem(mfp.index-i);\n\t\t\t}\n\t\t},\n\t\t_preloadItem: function(index) {\n\t\t\tindex = _getLoopedId(index);\n\n\t\t\tif(mfp.items[index].preloaded) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar item = mfp.items[index];\n\t\t\tif(!item.parsed) {\n\t\t\t\titem = mfp.parseEl( index );\n\t\t\t}\n\n\t\t\t_mfpTrigger('LazyLoad', item);\n\n\t\t\tif(item.type === 'image') {\n\t\t\t\titem.img = $('<img class=\"mfp-img\" />').on('load.mfploader', function() {\n\t\t\t\t\titem.hasSize = true;\n\t\t\t\t}).on('error.mfploader', function() {\n\t\t\t\t\titem.hasSize = true;\n\t\t\t\t\titem.loadError = true;\n\t\t\t\t\t_mfpTrigger('LazyLoadError', item);\n\t\t\t\t}).attr('src', item.src);\n\t\t\t}\n\n\n\t\t\titem.preloaded = true;\n\t\t}\n\t}\n});\n\n/*>>gallery*/\n\n/*>>retina*/\n\nvar RETINA_NS = 'retina';\n\n$.magnificPopup.registerModule(RETINA_NS, {\n\toptions: {\n\t\treplaceSrc: function(item) {\n\t\t\treturn item.src.replace(/\\.\\w+$/, function(m) { return '@2x' + m; });\n\t\t},\n\t\tratio: 1 // Function or number. Set to 1 to disable.\n\t},\n\tproto: {\n\t\tinitRetina: function() {\n\t\t\tif(window.devicePixelRatio > 1) {\n\n\t\t\t\tvar st = mfp.st.retina,\n\t\t\t\t\tratio = st.ratio;\n\n\t\t\t\tratio = !isNaN(ratio) ? ratio : ratio();\n\n\t\t\t\tif(ratio > 1) {\n\t\t\t\t\t_mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {\n\t\t\t\t\t\titem.img.css({\n\t\t\t\t\t\t\t'max-width': item.img[0].naturalWidth / ratio,\n\t\t\t\t\t\t\t'width': '100%'\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\t_mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {\n\t\t\t\t\t\titem.src = st.replaceSrc(item, ratio);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n});\n\n/*>>retina*/\n _checkInstance(); }));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/magnific-popup/dist/jquery.magnific-popup.js\n// module id = 7\n// module chunks = 1 2","// Plugins\nimport 'chosen-js';\nimport 'accounting';\nimport 'flot';\nimport 'flot-orderbars/js/jquery.flot.orderBars';\nimport 'flot/jquery.flot.time';\n\n// Give plugins.\nimport '../plugins/give-ajaxify-fields';\nimport '../plugins/selector-cache';\nimport '../plugins/repeatable-fields';\nimport '../plugins/give-hint.css';\n\n// Give core.\nimport './admin-forms';\nimport './admin-settings';\nimport './admin-export';\nimport './admin-widgets';\nimport './admin-scripts';\nimport './admin-importer';\n\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/admin/admin.js","(function() {\n var $, AbstractChosen, Chosen, SelectParser,\n bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n SelectParser = (function() {\n function SelectParser() {\n this.options_index = 0;\n this.parsed = [];\n }\n\n SelectParser.prototype.add_node = function(child) {\n if (child.nodeName.toUpperCase() === \"OPTGROUP\") {\n return this.add_group(child);\n } else {\n return this.add_option(child);\n }\n };\n\n SelectParser.prototype.add_group = function(group) {\n var group_position, i, len, option, ref, results1;\n group_position = this.parsed.length;\n this.parsed.push({\n array_index: group_position,\n group: true,\n label: group.label,\n title: group.title ? group.title : void 0,\n children: 0,\n disabled: group.disabled,\n classes: group.className\n });\n ref = group.childNodes;\n results1 = [];\n for (i = 0, len = ref.length; i < len; i++) {\n option = ref[i];\n results1.push(this.add_option(option, group_position, group.disabled));\n }\n return results1;\n };\n\n SelectParser.prototype.add_option = function(option, group_position, group_disabled) {\n if (option.nodeName.toUpperCase() === \"OPTION\") {\n if (option.text !== \"\") {\n if (group_position != null) {\n this.parsed[group_position].children += 1;\n }\n this.parsed.push({\n array_index: this.parsed.length,\n options_index: this.options_index,\n value: option.value,\n text: option.text,\n html: option.innerHTML,\n title: option.title ? option.title : void 0,\n selected: option.selected,\n disabled: group_disabled === true ? group_disabled : option.disabled,\n group_array_index: group_position,\n group_label: group_position != null ? this.parsed[group_position].label : null,\n classes: option.className,\n style: option.style.cssText\n });\n } else {\n this.parsed.push({\n array_index: this.parsed.length,\n options_index: this.options_index,\n empty: true\n });\n }\n return this.options_index += 1;\n }\n };\n\n return SelectParser;\n\n })();\n\n SelectParser.select_to_array = function(select) {\n var child, i, len, parser, ref;\n parser = new SelectParser();\n ref = select.childNodes;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n parser.add_node(child);\n }\n return parser.parsed;\n };\n\n AbstractChosen = (function() {\n function AbstractChosen(form_field, options1) {\n this.form_field = form_field;\n this.options = options1 != null ? options1 : {};\n this.label_click_handler = bind(this.label_click_handler, this);\n if (!AbstractChosen.browser_is_supported()) {\n return;\n }\n this.is_multiple = this.form_field.multiple;\n this.set_default_text();\n this.set_default_values();\n this.setup();\n this.set_up_html();\n this.register_observers();\n this.on_ready();\n }\n\n AbstractChosen.prototype.set_default_values = function() {\n this.click_test_action = (function(_this) {\n return function(evt) {\n return _this.test_active_click(evt);\n };\n })(this);\n this.activate_action = (function(_this) {\n return function(evt) {\n return _this.activate_field(evt);\n };\n })(this);\n this.active_field = false;\n this.mouse_on_container = false;\n this.results_showing = false;\n this.result_highlighted = null;\n this.is_rtl = this.options.rtl || /\\bchosen-rtl\\b/.test(this.form_field.className);\n this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === \"\" ? this.options.allow_single_deselect : false;\n this.disable_search_threshold = this.options.disable_search_threshold || 0;\n this.disable_search = this.options.disable_search || false;\n this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;\n this.group_search = this.options.group_search != null ? this.options.group_search : true;\n this.search_contains = this.options.search_contains || false;\n this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;\n this.max_selected_options = this.options.max_selected_options || Infinity;\n this.inherit_select_classes = this.options.inherit_select_classes || false;\n this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;\n this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;\n this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;\n this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;\n this.case_sensitive_search = this.options.case_sensitive_search || false;\n return this.hide_results_on_select = this.options.hide_results_on_select != null ? this.options.hide_results_on_select : true;\n };\n\n AbstractChosen.prototype.set_default_text = function() {\n if (this.form_field.getAttribute(\"data-placeholder\")) {\n this.default_text = this.form_field.getAttribute(\"data-placeholder\");\n } else if (this.is_multiple) {\n this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;\n } else {\n this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;\n }\n this.default_text = this.escape_html(this.default_text);\n return this.results_none_found = this.form_field.getAttribute(\"data-no_results_text\") || this.options.no_results_text || AbstractChosen.default_no_result_text;\n };\n\n AbstractChosen.prototype.choice_label = function(item) {\n if (this.include_group_label_in_selected && (item.group_label != null)) {\n return \"<b class='group-name'>\" + item.group_label + \"</b>\" + item.html;\n } else {\n return item.html;\n }\n };\n\n AbstractChosen.prototype.mouse_enter = function() {\n return this.mouse_on_container = true;\n };\n\n AbstractChosen.prototype.mouse_leave = function() {\n return this.mouse_on_container = false;\n };\n\n AbstractChosen.prototype.input_focus = function(evt) {\n if (this.is_multiple) {\n if (!this.active_field) {\n return setTimeout(((function(_this) {\n return function() {\n return _this.container_mousedown();\n };\n })(this)), 50);\n }\n } else {\n if (!this.active_field) {\n return this.activate_field();\n }\n }\n };\n\n AbstractChosen.prototype.input_blur = function(evt) {\n if (!this.mouse_on_container) {\n this.active_field = false;\n return setTimeout(((function(_this) {\n return function() {\n return _this.blur_test();\n };\n })(this)), 100);\n }\n };\n\n AbstractChosen.prototype.label_click_handler = function(evt) {\n if (this.is_multiple) {\n return this.container_mousedown(evt);\n } else {\n return this.activate_field();\n }\n };\n\n AbstractChosen.prototype.results_option_build = function(options) {\n var content, data, data_content, i, len, ref, shown_results;\n content = '';\n shown_results = 0;\n ref = this.results_data;\n for (i = 0, len = ref.length; i < len; i++) {\n data = ref[i];\n data_content = '';\n if (data.group) {\n data_content = this.result_add_group(data);\n } else {\n data_content = this.result_add_option(data);\n }\n if (data_content !== '') {\n shown_results++;\n content += data_content;\n }\n if (options != null ? options.first : void 0) {\n if (data.selected && this.is_multiple) {\n this.choice_build(data);\n } else if (data.selected && !this.is_multiple) {\n this.single_set_selected_text(this.choice_label(data));\n }\n }\n if (shown_results >= this.max_shown_results) {\n break;\n }\n }\n return content;\n };\n\n AbstractChosen.prototype.result_add_option = function(option) {\n var classes, option_el;\n if (!option.search_match) {\n return '';\n }\n if (!this.include_option_in_results(option)) {\n return '';\n }\n classes = [];\n if (!option.disabled && !(option.selected && this.is_multiple)) {\n classes.push(\"active-result\");\n }\n if (option.disabled && !(option.selected && this.is_multiple)) {\n classes.push(\"disabled-result\");\n }\n if (option.selected) {\n classes.push(\"result-selected\");\n }\n if (option.group_array_index != null) {\n classes.push(\"group-option\");\n }\n if (option.classes !== \"\") {\n classes.push(option.classes);\n }\n option_el = document.createElement(\"li\");\n option_el.className = classes.join(\" \");\n if (option.style) {\n option_el.style.cssText = option.style;\n }\n option_el.setAttribute(\"data-option-array-index\", option.array_index);\n option_el.innerHTML = option.highlighted_html || option.html;\n if (option.title) {\n option_el.title = option.title;\n }\n return this.outerHTML(option_el);\n };\n\n AbstractChosen.prototype.result_add_group = function(group) {\n var classes, group_el;\n if (!(group.search_match || group.group_match)) {\n return '';\n }\n if (!(group.active_options > 0)) {\n return '';\n }\n classes = [];\n classes.push(\"group-result\");\n if (group.classes) {\n classes.push(group.classes);\n }\n group_el = document.createElement(\"li\");\n group_el.className = classes.join(\" \");\n group_el.innerHTML = group.highlighted_html || this.escape_html(group.label);\n if (group.title) {\n group_el.title = group.title;\n }\n return this.outerHTML(group_el);\n };\n\n AbstractChosen.prototype.results_update_field = function() {\n this.set_default_text();\n if (!this.is_multiple) {\n this.results_reset_cleanup();\n }\n this.result_clear_highlight();\n this.results_build();\n if (this.results_showing) {\n return this.winnow_results();\n }\n };\n\n AbstractChosen.prototype.reset_single_select_options = function() {\n var i, len, ref, result, results1;\n ref = this.results_data;\n results1 = [];\n for (i = 0, len = ref.length; i < len; i++) {\n result = ref[i];\n if (result.selected) {\n results1.push(result.selected = false);\n } else {\n results1.push(void 0);\n }\n }\n return results1;\n };\n\n AbstractChosen.prototype.results_toggle = function() {\n if (this.results_showing) {\n return this.results_hide();\n } else {\n return this.results_show();\n }\n };\n\n AbstractChosen.prototype.results_search = function(evt) {\n if (this.results_showing) {\n return this.winnow_results();\n } else {\n return this.results_show();\n }\n };\n\n AbstractChosen.prototype.winnow_results = function(options) {\n var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;\n this.no_results_clear();\n results = 0;\n query = this.get_search_text();\n escapedQuery = query.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, \"\\\\$&\");\n regex = this.get_search_regex(escapedQuery);\n ref = this.results_data;\n for (i = 0, len = ref.length; i < len; i++) {\n option = ref[i];\n option.search_match = false;\n results_group = null;\n search_match = null;\n option.highlighted_html = '';\n if (this.include_option_in_results(option)) {\n if (option.group) {\n option.group_match = false;\n option.active_options = 0;\n }\n if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {\n results_group = this.results_data[option.group_array_index];\n if (results_group.active_options === 0 && results_group.search_match) {\n results += 1;\n }\n results_group.active_options += 1;\n }\n text = option.group ? option.label : option.text;\n if (!(option.group && !this.group_search)) {\n search_match = this.search_string_match(text, regex);\n option.search_match = search_match != null;\n if (option.search_match && !option.group) {\n results += 1;\n }\n if (option.search_match) {\n if (query.length) {\n startpos = search_match.index;\n prefix = text.slice(0, startpos);\n fix = text.slice(startpos, startpos + query.length);\n suffix = text.slice(startpos + query.length);\n option.highlighted_html = (this.escape_html(prefix)) + \"<em>\" + (this.escape_html(fix)) + \"</em>\" + (this.escape_html(suffix));\n }\n if (results_group != null) {\n results_group.group_match = true;\n }\n } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {\n option.search_match = true;\n }\n }\n }\n }\n this.result_clear_highlight();\n if (results < 1 && query.length) {\n this.update_results_content(\"\");\n return this.no_results(query);\n } else {\n this.update_results_content(this.results_option_build());\n if (!(options != null ? options.skip_highlight : void 0)) {\n return this.winnow_results_set_highlight();\n }\n }\n };\n\n AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {\n var regex_flag, regex_string;\n regex_string = this.search_contains ? escaped_search_string : \"(^|\\\\s|\\\\b)\" + escaped_search_string + \"[^\\\\s]*\";\n if (!(this.enable_split_word_search || this.search_contains)) {\n regex_string = \"^\" + regex_string;\n }\n regex_flag = this.case_sensitive_search ? \"\" : \"i\";\n return new RegExp(regex_string, regex_flag);\n };\n\n AbstractChosen.prototype.search_string_match = function(search_string, regex) {\n var match;\n match = regex.exec(search_string);\n if (!this.search_contains && (match != null ? match[1] : void 0)) {\n match.index += 1;\n }\n return match;\n };\n\n AbstractChosen.prototype.choices_count = function() {\n var i, len, option, ref;\n if (this.selected_option_count != null) {\n return this.selected_option_count;\n }\n this.selected_option_count = 0;\n ref = this.form_field.options;\n for (i = 0, len = ref.length; i < len; i++) {\n option = ref[i];\n if (option.selected) {\n this.selected_option_count += 1;\n }\n }\n return this.selected_option_count;\n };\n\n AbstractChosen.prototype.choices_click = function(evt) {\n evt.preventDefault();\n this.activate_field();\n if (!(this.results_showing || this.is_disabled)) {\n return this.results_show();\n }\n };\n\n AbstractChosen.prototype.keydown_checker = function(evt) {\n var ref, stroke;\n stroke = (ref = evt.which) != null ? ref : evt.keyCode;\n this.search_field_scale();\n if (stroke !== 8 && this.pending_backstroke) {\n this.clear_backstroke();\n }\n switch (stroke) {\n case 8:\n this.backstroke_length = this.get_search_field_value().length;\n break;\n case 9:\n if (this.results_showing && !this.is_multiple) {\n this.result_select(evt);\n }\n this.mouse_on_container = false;\n break;\n case 13:\n if (this.results_showing) {\n evt.preventDefault();\n }\n break;\n case 27:\n if (this.results_showing) {\n evt.preventDefault();\n }\n break;\n case 32:\n if (this.disable_search) {\n evt.preventDefault();\n }\n break;\n case 38:\n evt.preventDefault();\n this.keyup_arrow();\n break;\n case 40:\n evt.preventDefault();\n this.keydown_arrow();\n break;\n }\n };\n\n AbstractChosen.prototype.keyup_checker = function(evt) {\n var ref, stroke;\n stroke = (ref = evt.which) != null ? ref : evt.keyCode;\n this.search_field_scale();\n switch (stroke) {\n case 8:\n if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {\n this.keydown_backstroke();\n } else if (!this.pending_backstroke) {\n this.result_clear_highlight();\n this.results_search();\n }\n break;\n case 13:\n evt.preventDefault();\n if (this.results_showing) {\n this.result_select(evt);\n }\n break;\n case 27:\n if (this.results_showing) {\n this.results_hide();\n }\n break;\n case 9:\n case 16:\n case 17:\n case 18:\n case 38:\n case 40:\n case 91:\n break;\n default:\n this.results_search();\n break;\n }\n };\n\n AbstractChosen.prototype.clipboard_event_checker = function(evt) {\n if (this.is_disabled) {\n return;\n }\n return setTimeout(((function(_this) {\n return function() {\n return _this.results_search();\n };\n })(this)), 50);\n };\n\n AbstractChosen.prototype.container_width = function() {\n if (this.options.width != null) {\n return this.options.width;\n } else {\n return this.form_field.offsetWidth + \"px\";\n }\n };\n\n AbstractChosen.prototype.include_option_in_results = function(option) {\n if (this.is_multiple && (!this.display_selected_options && option.selected)) {\n return false;\n }\n if (!this.display_disabled_options && option.disabled) {\n return false;\n }\n if (option.empty) {\n return false;\n }\n return true;\n };\n\n AbstractChosen.prototype.search_results_touchstart = function(evt) {\n this.touch_started = true;\n return this.search_results_mouseover(evt);\n };\n\n AbstractChosen.prototype.search_results_touchmove = function(evt) {\n this.touch_started = false;\n return this.search_results_mouseout(evt);\n };\n\n AbstractChosen.prototype.search_results_touchend = function(evt) {\n if (this.touch_started) {\n return this.search_results_mouseup(evt);\n }\n };\n\n AbstractChosen.prototype.outerHTML = function(element) {\n var tmp;\n if (element.outerHTML) {\n return element.outerHTML;\n }\n tmp = document.createElement(\"div\");\n tmp.appendChild(element);\n return tmp.innerHTML;\n };\n\n AbstractChosen.prototype.get_single_html = function() {\n return \"<a class=\\\"chosen-single chosen-default\\\">\\n <input class=\\\"chosen-focus-input\\\" type=\\\"text\\\" autocomplete=\\\"off\\\" />\\n <span>\" + this.default_text + \"</span>\\n <div><b></b></div>\\n</a>\\n<div class=\\\"chosen-drop\\\">\\n <div class=\\\"chosen-search\\\">\\n <input class=\\\"chosen-search-input\\\" type=\\\"text\\\" autocomplete=\\\"off\\\" />\\n </div>\\n <ul class=\\\"chosen-results\\\"></ul>\\n</div>\";\n };\n\n AbstractChosen.prototype.get_multi_html = function() {\n return \"<ul class=\\\"chosen-choices\\\">\\n <li class=\\\"search-field\\\">\\n <input class=\\\"chosen-search-input\\\" type=\\\"text\\\" autocomplete=\\\"off\\\" value=\\\"\" + this.default_text + \"\\\" />\\n </li>\\n</ul>\\n<div class=\\\"chosen-drop\\\">\\n <ul class=\\\"chosen-results\\\"></ul>\\n</div>\";\n };\n\n AbstractChosen.prototype.get_no_results_html = function(terms) {\n return \"<li class=\\\"no-results\\\">\\n \" + this.results_none_found + \" <span>\" + (this.escape_html(terms)) + \"</span>\\n</li>\";\n };\n\n AbstractChosen.browser_is_supported = function() {\n if (\"Microsoft Internet Explorer\" === window.navigator.appName) {\n return document.documentMode >= 8;\n }\n if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {\n return false;\n }\n return true;\n };\n\n AbstractChosen.default_multiple_text = \"Select Some Options\";\n\n AbstractChosen.default_single_text = \"Select an Option\";\n\n AbstractChosen.default_no_result_text = \"No results match\";\n\n return AbstractChosen;\n\n })();\n\n $ = jQuery;\n\n $.fn.extend({\n chosen: function(options) {\n if (!AbstractChosen.browser_is_supported()) {\n return this;\n }\n return this.each(function(input_field) {\n var $this, chosen;\n $this = $(this);\n chosen = $this.data('chosen');\n if (options === 'destroy') {\n if (chosen instanceof Chosen) {\n chosen.destroy();\n }\n return;\n }\n if (!(chosen instanceof Chosen)) {\n $this.data('chosen', new Chosen(this, options));\n }\n });\n }\n });\n\n Chosen = (function(superClass) {\n extend(Chosen, superClass);\n\n function Chosen() {\n return Chosen.__super__.constructor.apply(this, arguments);\n }\n\n Chosen.prototype.setup = function() {\n this.form_field_jq = $(this.form_field);\n return this.current_selectedIndex = this.form_field.selectedIndex;\n };\n\n Chosen.prototype.set_up_html = function() {\n var container_classes, container_props;\n container_classes = [\"chosen-container\"];\n container_classes.push(\"chosen-container-\" + (this.is_multiple ? \"multi\" : \"single\"));\n if (this.inherit_select_classes && this.form_field.className) {\n container_classes.push(this.form_field.className);\n }\n if (this.is_rtl) {\n container_classes.push(\"chosen-rtl\");\n }\n container_props = {\n 'class': container_classes.join(' '),\n 'title': this.form_field.title\n };\n if (this.form_field.id.length) {\n container_props.id = this.form_field.id.replace(/[^\\w]/g, '_') + \"_chosen\";\n }\n this.container = $(\"<div />\", container_props);\n this.container.width(this.container_width());\n if (this.is_multiple) {\n this.container.html(this.get_multi_html());\n } else {\n this.container.html(this.get_single_html());\n }\n this.form_field_jq.hide().after(this.container);\n this.dropdown = this.container.find('div.chosen-drop').first();\n this.search_field = this.container.find('input.chosen-search-input');\n this.focus_field = this.container.find('input.chosen-focus-input');\n this.search_results = this.container.find('ul.chosen-results').first();\n this.search_field_scale();\n this.search_no_results = this.container.find('li.no-results').first();\n if (this.is_multiple) {\n this.search_choices = this.container.find('ul.chosen-choices').first();\n this.search_container = this.container.find('li.search-field').first();\n } else {\n this.search_container = this.container.find('div.chosen-search').first();\n this.selected_item = this.container.find('.chosen-single').first();\n }\n this.results_build();\n this.set_tab_index();\n return this.set_label_behavior();\n };\n\n Chosen.prototype.on_ready = function() {\n return this.form_field_jq.trigger(\"chosen:ready\", {\n chosen: this\n });\n };\n\n Chosen.prototype.register_observers = function() {\n var transfer_value;\n this.container.on('touchstart.chosen', (function(_this) {\n return function(evt) {\n _this.container_mousedown(evt);\n };\n })(this));\n this.container.on('touchend.chosen', (function(_this) {\n return function(evt) {\n _this.container_mouseup(evt);\n };\n })(this));\n this.container.on('mousedown.chosen', (function(_this) {\n return function(evt) {\n _this.container_mousedown(evt);\n };\n })(this));\n this.container.on('mouseup.chosen', (function(_this) {\n return function(evt) {\n _this.container_mouseup(evt);\n };\n })(this));\n this.container.on('mouseenter.chosen', (function(_this) {\n return function(evt) {\n _this.mouse_enter(evt);\n };\n })(this));\n this.container.on('mouseleave.chosen', (function(_this) {\n return function(evt) {\n _this.mouse_leave(evt);\n };\n })(this));\n this.search_results.on('mouseup.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_mouseup(evt);\n };\n })(this));\n this.search_results.on('mouseover.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_mouseover(evt);\n };\n })(this));\n this.search_results.on('mouseout.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_mouseout(evt);\n };\n })(this));\n this.search_results.on('mousewheel.chosen DOMMouseScroll.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_mousewheel(evt);\n };\n })(this));\n this.search_results.on('touchstart.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_touchstart(evt);\n };\n })(this));\n this.search_results.on('touchmove.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_touchmove(evt);\n };\n })(this));\n this.search_results.on('touchend.chosen', (function(_this) {\n return function(evt) {\n _this.search_results_touchend(evt);\n };\n })(this));\n this.form_field_jq.on(\"chosen:updated.chosen\", (function(_this) {\n return function(evt) {\n _this.results_update_field(evt);\n };\n })(this));\n this.form_field_jq.on(\"chosen:activate.chosen\", (function(_this) {\n return function(evt) {\n _this.activate_field(evt);\n };\n })(this));\n this.form_field_jq.on(\"chosen:open.chosen\", (function(_this) {\n return function(evt) {\n _this.container_mousedown(evt);\n };\n })(this));\n this.form_field_jq.on(\"chosen:close.chosen\", (function(_this) {\n return function(evt) {\n _this.close_field(evt);\n };\n })(this));\n this.search_field.on('blur.chosen', (function(_this) {\n return function(evt) {\n _this.input_blur(evt);\n };\n })(this));\n this.search_field.on('keyup.chosen', (function(_this) {\n return function(evt) {\n _this.keyup_checker(evt);\n };\n })(this));\n this.search_field.on('keydown.chosen', (function(_this) {\n return function(evt) {\n _this.keydown_checker(evt);\n };\n })(this));\n this.search_field.on('focus.chosen', (function(_this) {\n return function(evt) {\n _this.input_focus(evt);\n };\n })(this));\n this.search_field.on('cut.chosen', (function(_this) {\n return function(evt) {\n _this.clipboard_event_checker(evt);\n };\n })(this));\n this.search_field.on('paste.chosen', (function(_this) {\n return function(evt) {\n _this.clipboard_event_checker(evt);\n };\n })(this));\n if (this.is_multiple) {\n return this.search_choices.on('click.chosen', (function(_this) {\n return function(evt) {\n _this.choices_click(evt);\n };\n })(this));\n } else {\n this.container.on('click.chosen', function(evt) {\n evt.preventDefault();\n });\n this.focus_field.on('blur.chosen', (function(_this) {\n return function(evt) {\n _this.input_blur(evt);\n };\n })(this));\n this.focus_field.on('focus.chosen', (function(_this) {\n return function(evt) {\n _this.input_focus(evt);\n };\n })(this));\n transfer_value = (function(_this) {\n return function() {\n _this.search_field.val(_this.focus_field.val());\n return _this.focus_field.val('');\n };\n })(this);\n this.focus_field.on('keyup.chosen', (function(_this) {\n return function(evt) {\n transfer_value();\n _this.keyup_checker(evt);\n };\n })(this));\n this.focus_field.on('keydown.chosen', (function(_this) {\n return function(evt) {\n transfer_value();\n _this.keydown_checker(evt);\n };\n })(this));\n this.focus_field.on('cut.chosen', (function(_this) {\n return function(evt) {\n setTimeout(transfer_value, 0);\n _this.clipboard_event_checker(evt);\n };\n })(this));\n return this.focus_field.on('paste.chosen', (function(_this) {\n return function(evt) {\n setTimeout(transfer_value, 0);\n _this.clipboard_event_checker(evt);\n };\n })(this));\n }\n };\n\n Chosen.prototype.destroy = function() {\n $(this.container[0].ownerDocument).off('click.chosen', this.click_test_action);\n if (this.form_field_label.length > 0) {\n this.form_field_label.off('click.chosen');\n }\n if (this.search_field[0].tabIndex) {\n this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;\n }\n this.container.remove();\n this.form_field_jq.removeData('chosen');\n return this.form_field_jq.show();\n };\n\n Chosen.prototype.search_field_disabled = function() {\n this.is_disabled = this.form_field.disabled || this.form_field_jq.parents('fieldset').is(':disabled');\n this.container.toggleClass('chosen-disabled', this.is_disabled);\n this.search_field[0].disabled = this.is_disabled;\n if (!this.is_multiple) {\n this.selected_item.off('focus.chosen', this.activate_field);\n }\n if (this.is_disabled) {\n return this.close_field();\n } else if (!this.is_multiple) {\n return this.selected_item.on('focus.chosen', this.activate_field);\n }\n };\n\n Chosen.prototype.container_mousedown = function(evt) {\n var ref;\n if (this.is_disabled) {\n return;\n }\n if (evt && ((ref = evt.type) === 'mousedown' || ref === 'touchstart') && !this.results_showing) {\n evt.preventDefault();\n }\n if (!((evt != null) && ($(evt.target)).hasClass(\"search-choice-close\"))) {\n if (!this.active_field) {\n if (this.is_multiple) {\n this.search_field.val(\"\");\n }\n $(this.container[0].ownerDocument).on('click.chosen', this.click_test_action);\n this.results_show();\n } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents(\"a.chosen-single\").length)) {\n evt.preventDefault();\n this.results_toggle();\n }\n return this.activate_field();\n }\n };\n\n Chosen.prototype.container_mouseup = function(evt) {\n if (evt.target.nodeName === \"ABBR\" && !this.is_disabled) {\n return this.results_reset(evt);\n }\n };\n\n Chosen.prototype.search_results_mousewheel = function(evt) {\n var delta;\n if (evt.originalEvent) {\n delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;\n }\n if (delta != null) {\n evt.preventDefault();\n if (evt.type === 'DOMMouseScroll') {\n delta = delta * 40;\n }\n return this.search_results.scrollTop(delta + this.search_results.scrollTop());\n }\n };\n\n Chosen.prototype.blur_test = function(evt) {\n if (!this.active_field && this.container.hasClass(\"chosen-container-active\")) {\n return this.close_field();\n }\n };\n\n Chosen.prototype.close_field = function() {\n $(this.container[0].ownerDocument).off(\"click.chosen\", this.click_test_action);\n this.active_field = false;\n this.results_hide();\n this.container.removeClass(\"chosen-container-active\");\n this.clear_backstroke();\n this.show_search_field_default();\n this.search_field_scale();\n return this.search_field.blur();\n };\n\n Chosen.prototype.activate_field = function() {\n if (this.is_disabled) {\n return;\n }\n this.container.addClass(\"chosen-container-active\");\n this.active_field = true;\n return this.search_field.focus();\n };\n\n Chosen.prototype.test_active_click = function(evt) {\n var active_container;\n active_container = $(evt.target).closest('.chosen-container');\n if (active_container.length && this.container[0] === active_container[0]) {\n return this.active_field = true;\n } else {\n return this.close_field();\n }\n };\n\n Chosen.prototype.results_build = function() {\n this.parsing = true;\n this.selected_option_count = null;\n this.results_data = SelectParser.select_to_array(this.form_field);\n if (this.is_multiple) {\n this.search_choices.find(\"li.search-choice\").remove();\n } else {\n this.single_set_selected_text();\n if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {\n this.search_field[0].readOnly = true;\n this.focus_field[0].readOnly = true;\n this.container.addClass(\"chosen-container-single-nosearch\");\n } else {\n this.search_field[0].readOnly = false;\n this.focus_field[0].readOnly = false;\n this.container.removeClass(\"chosen-container-single-nosearch\");\n }\n }\n this.update_results_content(this.results_option_build({\n first: true\n }));\n this.search_field_disabled();\n this.show_search_field_default();\n this.search_field_scale();\n return this.parsing = false;\n };\n\n Chosen.prototype.result_do_highlight = function(el) {\n var high_bottom, high_top, maxHeight, visible_bottom, visible_top;\n if (el.length) {\n this.result_clear_highlight();\n this.result_highlight = el;\n this.result_highlight.addClass(\"highlighted\");\n maxHeight = parseInt(this.search_results.css(\"maxHeight\"), 10);\n visible_top = this.search_results.scrollTop();\n visible_bottom = maxHeight + visible_top;\n high_top = this.result_highlight.position().top + this.search_results.scrollTop();\n high_bottom = high_top + this.result_highlight.outerHeight();\n if (high_bottom >= visible_bottom) {\n return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);\n } else if (high_top < visible_top) {\n return this.search_results.scrollTop(high_top);\n }\n }\n };\n\n Chosen.prototype.result_clear_highlight = function() {\n if (this.result_highlight) {\n this.result_highlight.removeClass(\"highlighted\");\n }\n return this.result_highlight = null;\n };\n\n Chosen.prototype.results_show = function() {\n if (this.is_multiple && this.max_selected_options <= this.choices_count()) {\n this.form_field_jq.trigger(\"chosen:maxselected\", {\n chosen: this\n });\n return false;\n }\n this.container.addClass(\"chosen-with-drop\");\n this.results_showing = true;\n this.search_field.focus();\n this.search_field.val(this.get_search_field_value());\n this.winnow_results();\n return this.form_field_jq.trigger(\"chosen:showing_dropdown\", {\n chosen: this\n });\n };\n\n Chosen.prototype.update_results_content = function(content) {\n return this.search_results.html(content);\n };\n\n Chosen.prototype.results_hide = function() {\n if (this.results_showing) {\n this.result_clear_highlight();\n setTimeout(((function(_this) {\n return function() {\n return _this.focus_field.focus();\n };\n })(this)), 0);\n this.container.removeClass(\"chosen-with-drop\");\n this.form_field_jq.trigger(\"chosen:hiding_dropdown\", {\n chosen: this\n });\n }\n return this.results_showing = false;\n };\n\n Chosen.prototype.set_tab_index = function(el) {\n var ref, ti;\n if (this.form_field.tabIndex) {\n ti = this.form_field.tabIndex;\n this.form_field.tabIndex = -1;\n this.search_field[0].tabIndex = ti;\n return (ref = this.focus_field[0]) != null ? ref.tabIndex = ti : void 0;\n }\n };\n\n Chosen.prototype.set_label_behavior = function() {\n this.form_field_label = this.form_field_jq.parents(\"label\");\n if (!this.form_field_label.length && this.form_field.id.length) {\n this.form_field_label = $(\"label[for='\" + this.form_field.id + \"']\");\n }\n if (this.form_field_label.length > 0) {\n return this.form_field_label.on('click.chosen', this.label_click_handler);\n }\n };\n\n Chosen.prototype.show_search_field_default = function() {\n if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {\n this.search_field.val(this.default_text);\n return this.search_field.addClass(\"default\");\n } else {\n this.search_field.val(\"\");\n return this.search_field.removeClass(\"default\");\n }\n };\n\n Chosen.prototype.search_results_mouseup = function(evt) {\n var target;\n target = $(evt.target).hasClass(\"active-result\") ? $(evt.target) : $(evt.target).parents(\".active-result\").first();\n if (target.length) {\n this.result_highlight = target;\n this.result_select(evt);\n return this.search_field.focus();\n }\n };\n\n Chosen.prototype.search_results_mouseover = function(evt) {\n var target;\n target = $(evt.target).hasClass(\"active-result\") ? $(evt.target) : $(evt.target).parents(\".active-result\").first();\n if (target) {\n return this.result_do_highlight(target);\n }\n };\n\n Chosen.prototype.search_results_mouseout = function(evt) {\n if ($(evt.target).hasClass(\"active-result\") || $(evt.target).parents('.active-result').first()) {\n return this.result_clear_highlight();\n }\n };\n\n Chosen.prototype.choice_build = function(item) {\n var choice, close_link;\n choice = $('<li />', {\n \"class\": \"search-choice\"\n }).html(\"<span>\" + (this.choice_label(item)) + \"</span>\");\n if (item.disabled) {\n choice.addClass('search-choice-disabled');\n } else {\n close_link = $('<a />', {\n \"class\": 'search-choice-close',\n 'data-option-array-index': item.array_index\n });\n close_link.on('click.chosen', (function(_this) {\n return function(evt) {\n return _this.choice_destroy_link_click(evt);\n };\n })(this));\n choice.append(close_link);\n }\n return this.search_container.before(choice);\n };\n\n Chosen.prototype.choice_destroy_link_click = function(evt) {\n evt.preventDefault();\n evt.stopPropagation();\n if (!this.is_disabled) {\n return this.choice_destroy($(evt.target));\n }\n };\n\n Chosen.prototype.choice_destroy = function(link) {\n if (this.result_deselect(link[0].getAttribute(\"data-option-array-index\"))) {\n if (this.active_field) {\n this.search_field.focus();\n } else {\n this.show_search_field_default();\n }\n if (this.is_multiple && this.choices_count() > 0 && this.get_search_field_value().length < 1) {\n this.results_hide();\n }\n link.parents('li').first().remove();\n return this.search_field_scale();\n }\n };\n\n Chosen.prototype.results_reset = function() {\n this.reset_single_select_options();\n this.form_field.options[0].selected = true;\n this.single_set_selected_text();\n this.show_search_field_default();\n this.results_reset_cleanup();\n this.trigger_form_field_change();\n if (this.active_field) {\n return this.results_hide();\n }\n };\n\n Chosen.prototype.results_reset_cleanup = function() {\n this.current_selectedIndex = this.form_field.selectedIndex;\n return this.selected_item.find(\"abbr\").remove();\n };\n\n Chosen.prototype.result_select = function(evt) {\n var high, item;\n if (this.result_highlight) {\n high = this.result_highlight;\n this.result_clear_highlight();\n if (this.is_multiple && this.max_selected_options <= this.choices_count()) {\n this.form_field_jq.trigger(\"chosen:maxselected\", {\n chosen: this\n });\n return false;\n }\n if (this.is_multiple) {\n high.removeClass(\"active-result\");\n } else {\n this.reset_single_select_options();\n }\n high.addClass(\"result-selected\");\n item = this.results_data[high[0].getAttribute(\"data-option-array-index\")];\n item.selected = true;\n this.form_field.options[item.options_index].selected = true;\n this.selected_option_count = null;\n if (this.is_multiple) {\n this.choice_build(item);\n } else {\n this.single_set_selected_text(this.choice_label(item));\n }\n if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {\n if (evt.metaKey || evt.ctrlKey) {\n this.winnow_results({\n skip_highlight: true\n });\n } else {\n this.search_field.val(\"\");\n this.winnow_results();\n }\n } else {\n this.results_hide();\n this.show_search_field_default();\n }\n if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {\n this.trigger_form_field_change({\n selected: this.form_field.options[item.options_index].value\n });\n }\n this.current_selectedIndex = this.form_field.selectedIndex;\n evt.preventDefault();\n return this.search_field_scale();\n }\n };\n\n Chosen.prototype.single_set_selected_text = function(text) {\n if (text == null) {\n text = this.default_text;\n }\n if (text === this.default_text) {\n this.selected_item.addClass(\"chosen-default\");\n } else {\n this.single_deselect_control_build();\n this.selected_item.removeClass(\"chosen-default\");\n }\n return this.selected_item.find(\"span\").html(text);\n };\n\n Chosen.prototype.result_deselect = function(pos) {\n var result_data;\n result_data = this.results_data[pos];\n if (!this.form_field.options[result_data.options_index].disabled) {\n result_data.selected = false;\n this.form_field.options[result_data.options_index].selected = false;\n this.selected_option_count = null;\n this.result_clear_highlight();\n if (this.results_showing) {\n this.winnow_results();\n }\n this.trigger_form_field_change({\n deselected: this.form_field.options[result_data.options_index].value\n });\n this.search_field_scale();\n return true;\n } else {\n return false;\n }\n };\n\n Chosen.prototype.single_deselect_control_build = function() {\n if (!this.allow_single_deselect) {\n return;\n }\n if (!this.selected_item.find(\"abbr\").length) {\n this.selected_item.find(\"span\").first().after(\"<abbr class=\\\"search-choice-close\\\"></abbr>\");\n }\n return this.selected_item.addClass(\"chosen-single-with-deselect\");\n };\n\n Chosen.prototype.get_search_field_value = function() {\n return this.search_field.val();\n };\n\n Chosen.prototype.get_search_text = function() {\n return $.trim(this.get_search_field_value());\n };\n\n Chosen.prototype.escape_html = function(text) {\n return $('<div/>').text(text).html();\n };\n\n Chosen.prototype.winnow_results_set_highlight = function() {\n var do_high, selected_results;\n selected_results = !this.is_multiple ? this.search_results.find(\".result-selected.active-result\") : [];\n do_high = selected_results.length ? selected_results.first() : this.search_results.find(\".active-result\").first();\n if (do_high != null) {\n return this.result_do_highlight(do_high);\n }\n };\n\n Chosen.prototype.no_results = function(terms) {\n var no_results_html;\n no_results_html = this.get_no_results_html(terms);\n this.search_results.append(no_results_html);\n return this.form_field_jq.trigger(\"chosen:no_results\", {\n chosen: this\n });\n };\n\n Chosen.prototype.no_results_clear = function() {\n return this.search_results.find(\".no-results\").remove();\n };\n\n Chosen.prototype.keydown_arrow = function() {\n var next_sib;\n if (this.results_showing && this.result_highlight) {\n next_sib = this.result_highlight.nextAll(\"li.active-result\").first();\n if (next_sib) {\n return this.result_do_highlight(next_sib);\n }\n } else {\n return this.results_show();\n }\n };\n\n Chosen.prototype.keyup_arrow = function() {\n var prev_sibs;\n if (!this.results_showing && !this.is_multiple) {\n return this.results_show();\n } else if (this.result_highlight) {\n prev_sibs = this.result_highlight.prevAll(\"li.active-result\");\n if (prev_sibs.length) {\n return this.result_do_highlight(prev_sibs.first());\n } else {\n if (this.choices_count() > 0) {\n this.results_hide();\n }\n return this.result_clear_highlight();\n }\n }\n };\n\n Chosen.prototype.keydown_backstroke = function() {\n var next_available_destroy;\n if (this.pending_backstroke) {\n this.choice_destroy(this.pending_backstroke.find(\"a\").first());\n return this.clear_backstroke();\n } else {\n next_available_destroy = this.search_container.siblings(\"li.search-choice\").last();\n if (next_available_destroy.length && !next_available_destroy.hasClass(\"search-choice-disabled\")) {\n this.pending_backstroke = next_available_destroy;\n if (this.single_backstroke_delete) {\n return this.keydown_backstroke();\n } else {\n return this.pending_backstroke.addClass(\"search-choice-focus\");\n }\n }\n }\n };\n\n Chosen.prototype.clear_backstroke = function() {\n if (this.pending_backstroke) {\n this.pending_backstroke.removeClass(\"search-choice-focus\");\n }\n return this.pending_backstroke = null;\n };\n\n Chosen.prototype.search_field_scale = function() {\n var div, i, len, style, style_block, styles, width;\n if (!this.is_multiple) {\n return;\n }\n style_block = {\n position: 'absolute',\n left: '-1000px',\n top: '-1000px',\n display: 'none',\n whiteSpace: 'pre'\n };\n styles = ['fontSize', 'fontStyle', 'fontWeight', 'fontFamily', 'lineHeight', 'textTransform', 'letterSpacing'];\n for (i = 0, len = styles.length; i < len; i++) {\n style = styles[i];\n style_block[style] = this.search_field.css(style);\n }\n div = $('<div />').css(style_block);\n div.text(this.get_search_field_value());\n $('body').append(div);\n width = div.width() + 25;\n div.remove();\n if (this.container.is(':visible')) {\n width = Math.min(this.container.outerWidth() - 10, width);\n }\n return this.search_field.width(width);\n };\n\n Chosen.prototype.trigger_form_field_change = function(extra) {\n this.form_field_jq.trigger(\"input\", extra);\n return this.form_field_jq.trigger(\"change\", extra);\n };\n\n return Chosen;\n\n })(AbstractChosen);\n\n}).call(this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/chosen-js/chosen.jquery.js\n// module id = 20\n// module chunks = 1","/* Javascript plotting library for jQuery, version 0.8 alpha.\n\nCopyright (c) 2007-2012 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\n*/\n\n// first an inline dependency, jquery.colorhelpers.js, we inline it here\n// for convenience\n\n/* Plugin for jQuery for working with colors.\n *\n * Version 1.1.\n *\n * Inspiration from jQuery color animation plugin by John Resig.\n *\n * Released under the MIT license by Ole Laursen, October 2009.\n *\n * Examples:\n *\n * $.color.parse(\"#fff\").scale('rgb', 0.25).add('a', -0.5).toString()\n * var c = $.color.extract($(\"#mydiv\"), 'background-color');\n * console.log(c.r, c.g, c.b, c.a);\n * $.color.make(100, 50, 25, 0.4).toString() // returns \"rgba(100,50,25,0.4)\"\n *\n * Note that .scale() and .add() return the same modified object\n * instead of making a new one.\n *\n * V. 1.1: Fix error handling so e.g. parsing an empty string does\n * produce a color rather than just crashing.\n */\n(function(B){B.color={};B.color.make=function(F,E,C,D){var G={};G.r=F||0;G.g=E||0;G.b=C||0;G.a=D!=null?D:1;G.add=function(J,I){for(var H=0;H<J.length;++H){G[J.charAt(H)]+=I}return G.normalize()};G.scale=function(J,I){for(var H=0;H<J.length;++H){G[J.charAt(H)]*=I}return G.normalize()};G.toString=function(){if(G.a>=1){return\"rgb(\"+[G.r,G.g,G.b].join(\",\")+\")\"}else{return\"rgba(\"+[G.r,G.g,G.b,G.a].join(\",\")+\")\"}};G.normalize=function(){function H(J,K,I){return K<J?J:(K>I?I:K)}G.r=H(0,parseInt(G.r),255);G.g=H(0,parseInt(G.g),255);G.b=H(0,parseInt(G.b),255);G.a=H(0,G.a,1);return G};G.clone=function(){return B.color.make(G.r,G.b,G.g,G.a)};return G.normalize()};B.color.extract=function(D,C){var E;do{E=D.css(C).toLowerCase();if(E!=\"\"&&E!=\"transparent\"){break}D=D.parent()}while(!B.nodeName(D.get(0),\"body\"));if(E==\"rgba(0, 0, 0, 0)\"){E=\"transparent\"}return B.color.parse(E)};B.color.parse=function(F){var E,C=B.color.make;if(E=/rgb\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.exec(F)){return C(parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10))}if(E=/rgba\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(F)){return C(parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10),parseFloat(E[4]))}if(E=/rgb\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.exec(F)){return C(parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55)}if(E=/rgba\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(F)){return C(parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55,parseFloat(E[4]))}if(E=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(F)){return C(parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16))}if(E=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(F)){return C(parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16))}var D=B.trim(F).toLowerCase();if(D==\"transparent\"){return C(255,255,255,0)}else{E=A[D]||[0,0,0];return C(E[0],E[1],E[2])}};var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);\n\n// the actual Flot code\n(function($) {\n function Plot(placeholder, data_, options_, plugins) {\n // data is on the form:\n // [ series1, series2 ... ]\n // where series is either just the data as [ [x1, y1], [x2, y2], ... ]\n // or { data: [ [x1, y1], [x2, y2], ... ], label: \"some label\", ... }\n\n var series = [],\n options = {\n // the color theme used for graphs\n colors: [\"#edc240\", \"#afd8f8\", \"#cb4b4b\", \"#4da74d\", \"#9440ed\"],\n legend: {\n show: true,\n noColumns: 1, // number of colums in legend table\n labelFormatter: null, // fn: string -> string\n labelBoxBorderColor: \"#ccc\", // border color for the little label boxes\n container: null, // container (as jQuery object) to put legend in, null means default on top of graph\n position: \"ne\", // position of default legend container within plot\n margin: 5, // distance from grid edge to default legend container within plot\n backgroundColor: null, // null means auto-detect\n backgroundOpacity: 0.85, // set to 0 to avoid background\n sorted: null // default to no legend sorting\n },\n xaxis: {\n show: null, // null = auto-detect, true = always, false = never\n position: \"bottom\", // or \"top\"\n mode: null, // null or \"time\"\n timezone: null, // \"browser\" for local to the client or timezone for timezone-js\n font: null, // null (derived from CSS in placeholder) or object like { size: 11, style: \"italic\", weight: \"bold\", family: \"sans-serif\", variant: \"small-caps\" }\n color: null, // base color, labels, ticks\n tickColor: null, // possibly different color of ticks, e.g. \"rgba(0,0,0,0.15)\"\n transform: null, // null or f: number -> number to transform axis\n inverseTransform: null, // if transform is set, this should be the inverse function\n min: null, // min. value to show, null means set automatically\n max: null, // max. value to show, null means set automatically\n autoscaleMargin: null, // margin in % to add if auto-setting min/max\n ticks: null, // either [1, 3] or [[1, \"a\"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks\n tickFormatter: null, // fn: number -> string\n labelWidth: null, // size of tick labels in pixels\n labelHeight: null,\n reserveSpace: null, // whether to reserve space even if axis isn't shown\n tickLength: null, // size in pixels of ticks, or \"full\" for whole line\n alignTicksWithAxis: null, // axis number or null for no sync\n\n // mode specific options\n tickDecimals: null, // no. of decimals, null means auto\n tickSize: null, // number or [number, \"unit\"]\n minTickSize: null, // number or [number, \"unit\"]\n monthNames: null, // list of names of months\n timeformat: null, // format string to use\n twelveHourClock: false // 12 or 24 time in time mode\n },\n yaxis: {\n autoscaleMargin: 0.02,\n position: \"left\" // or \"right\"\n },\n xaxes: [],\n yaxes: [],\n series: {\n points: {\n show: false,\n radius: 3,\n lineWidth: 2, // in pixels\n fill: true,\n fillColor: \"#ffffff\",\n symbol: \"circle\" // or callback\n },\n lines: {\n // we don't put in show: false so we can see\n // whether lines were actively disabled\n lineWidth: 2, // in pixels\n fill: false,\n fillColor: null,\n steps: false\n // Omit 'zero', so we can later default its value to\n // match that of the 'fill' option.\n },\n bars: {\n show: false,\n lineWidth: 2, // in pixels\n barWidth: 1, // in units of the x axis\n fill: true,\n fillColor: null,\n align: \"left\", // \"left\", \"right\", or \"center\"\n horizontal: false,\n zero: true\n },\n shadowSize: 3,\n highlightColor: null\n },\n grid: {\n show: true,\n aboveData: false,\n color: \"#545454\", // primary color used for outline and labels\n backgroundColor: null, // null for transparent, else color\n borderColor: null, // set if different from the grid color\n tickColor: null, // color for the ticks, e.g. \"rgba(0,0,0,0.15)\"\n margin: 0, // distance from the canvas edge to the grid\n labelMargin: 5, // in pixels\n axisMargin: 8, // in pixels\n borderWidth: 2, // in pixels\n minBorderMargin: null, // in pixels, null means taken from points radius\n markings: null, // array of ranges or fn: axes -> array of ranges\n markingsColor: \"#f4f4f4\",\n markingsLineWidth: 2,\n // interactive stuff\n clickable: false,\n hoverable: false,\n autoHighlight: true, // highlight in case mouse is near\n mouseActiveRadius: 10 // how far the mouse can be away to activate an item\n },\n interaction: {\n redrawOverlayInterval: 1000/60 // time between updates, -1 means in same flow\n },\n hooks: {}\n },\n canvas = null, // the canvas for the plot itself\n overlay = null, // canvas for interactive stuff on top of plot\n eventHolder = null, // jQuery object that events should be bound to\n ctx = null, octx = null,\n xaxes = [], yaxes = [],\n plotOffset = { left: 0, right: 0, top: 0, bottom: 0},\n canvasWidth = 0, canvasHeight = 0,\n plotWidth = 0, plotHeight = 0,\n hooks = {\n processOptions: [],\n processRawData: [],\n processDatapoints: [],\n processOffset: [],\n drawBackground: [],\n drawSeries: [],\n draw: [],\n bindEvents: [],\n drawOverlay: [],\n shutdown: []\n },\n plot = this;\n\n // public functions\n plot.setData = setData;\n plot.setupGrid = setupGrid;\n plot.draw = draw;\n plot.getPlaceholder = function() { return placeholder; };\n plot.getCanvas = function() { return canvas; };\n plot.getPlotOffset = function() { return plotOffset; };\n plot.width = function () { return plotWidth; };\n plot.height = function () { return plotHeight; };\n plot.offset = function () {\n var o = eventHolder.offset();\n o.left += plotOffset.left;\n o.top += plotOffset.top;\n return o;\n };\n plot.getData = function () { return series; };\n plot.getAxes = function () {\n var res = {}, i;\n $.each(xaxes.concat(yaxes), function (_, axis) {\n if (axis)\n res[axis.direction + (axis.n != 1 ? axis.n : \"\") + \"axis\"] = axis;\n });\n return res;\n };\n plot.getXAxes = function () { return xaxes; };\n plot.getYAxes = function () { return yaxes; };\n plot.c2p = canvasToAxisCoords;\n plot.p2c = axisToCanvasCoords;\n plot.getOptions = function () { return options; };\n plot.highlight = highlight;\n plot.unhighlight = unhighlight;\n plot.triggerRedrawOverlay = triggerRedrawOverlay;\n plot.pointOffset = function(point) {\n return {\n left: parseInt(xaxes[axisNumber(point, \"x\") - 1].p2c(+point.x) + plotOffset.left, 10),\n top: parseInt(yaxes[axisNumber(point, \"y\") - 1].p2c(+point.y) + plotOffset.top, 10)\n };\n };\n plot.shutdown = shutdown;\n plot.resize = function () {\n getCanvasDimensions();\n resizeCanvas(canvas);\n resizeCanvas(overlay);\n };\n\n // public attributes\n plot.hooks = hooks;\n\n // initialize\n initPlugins(plot);\n parseOptions(options_);\n setupCanvases();\n setData(data_);\n setupGrid();\n draw();\n bindEvents();\n\n\n function executeHooks(hook, args) {\n args = [plot].concat(args);\n for (var i = 0; i < hook.length; ++i)\n hook[i].apply(this, args);\n }\n\n function initPlugins() {\n for (var i = 0; i < plugins.length; ++i) {\n var p = plugins[i];\n p.init(plot);\n if (p.options)\n $.extend(true, options, p.options);\n }\n }\n\n function parseOptions(opts) {\n var i;\n\n $.extend(true, options, opts);\n\n if (options.xaxis.color == null)\n options.xaxis.color = options.grid.color;\n if (options.yaxis.color == null)\n options.yaxis.color = options.grid.color;\n\n if (options.xaxis.tickColor == null) // backwards-compatibility\n options.xaxis.tickColor = options.grid.tickColor;\n if (options.yaxis.tickColor == null) // backwards-compatibility\n options.yaxis.tickColor = options.grid.tickColor;\n\n if (options.grid.borderColor == null)\n options.grid.borderColor = options.grid.color;\n if (options.grid.tickColor == null)\n options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString();\n\n // fill in defaults in axes, copy at least always the\n // first as the rest of the code assumes it'll be there\n for (i = 0; i < Math.max(1, options.xaxes.length); ++i)\n options.xaxes[i] = $.extend(true, {}, options.xaxis, options.xaxes[i]);\n for (i = 0; i < Math.max(1, options.yaxes.length); ++i)\n options.yaxes[i] = $.extend(true, {}, options.yaxis, options.yaxes[i]);\n\n // backwards compatibility, to be removed in future\n if (options.xaxis.noTicks && options.xaxis.ticks == null)\n options.xaxis.ticks = options.xaxis.noTicks;\n if (options.yaxis.noTicks && options.yaxis.ticks == null)\n options.yaxis.ticks = options.yaxis.noTicks;\n if (options.x2axis) {\n options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis);\n options.xaxes[1].position = \"top\";\n }\n if (options.y2axis) {\n options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis);\n options.yaxes[1].position = \"right\";\n }\n if (options.grid.coloredAreas)\n options.grid.markings = options.grid.coloredAreas;\n if (options.grid.coloredAreasColor)\n options.grid.markingsColor = options.grid.coloredAreasColor;\n if (options.lines)\n $.extend(true, options.series.lines, options.lines);\n if (options.points)\n $.extend(true, options.series.points, options.points);\n if (options.bars)\n $.extend(true, options.series.bars, options.bars);\n if (options.shadowSize != null)\n options.series.shadowSize = options.shadowSize;\n if (options.highlightColor != null)\n options.series.highlightColor = options.highlightColor;\n\n // save options on axes for future reference\n for (i = 0; i < options.xaxes.length; ++i)\n getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i];\n for (i = 0; i < options.yaxes.length; ++i)\n getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i];\n\n // add hooks from options\n for (var n in hooks)\n if (options.hooks[n] && options.hooks[n].length)\n hooks[n] = hooks[n].concat(options.hooks[n]);\n\n executeHooks(hooks.processOptions, [options]);\n }\n\n function setData(d) {\n series = parseData(d);\n fillInSeriesOptions();\n processData();\n }\n\n function parseData(d) {\n var res = [];\n for (var i = 0; i < d.length; ++i) {\n var s = $.extend(true, {}, options.series);\n\n if (d[i].data != null) {\n s.data = d[i].data; // move the data instead of deep-copy\n delete d[i].data;\n\n $.extend(true, s, d[i]);\n\n d[i].data = s.data;\n }\n else\n s.data = d[i];\n res.push(s);\n }\n\n return res;\n }\n\n function axisNumber(obj, coord) {\n var a = obj[coord + \"axis\"];\n if (typeof a == \"object\") // if we got a real axis, extract number\n a = a.n;\n if (typeof a != \"number\")\n a = 1; // default to first axis\n return a;\n }\n\n function allAxes() {\n // return flat array without annoying null entries\n return $.grep(xaxes.concat(yaxes), function (a) { return a; });\n }\n\n function canvasToAxisCoords(pos) {\n // return an object with x/y corresponding to all used axes\n var res = {}, i, axis;\n for (i = 0; i < xaxes.length; ++i) {\n axis = xaxes[i];\n if (axis && axis.used)\n res[\"x\" + axis.n] = axis.c2p(pos.left);\n }\n\n for (i = 0; i < yaxes.length; ++i) {\n axis = yaxes[i];\n if (axis && axis.used)\n res[\"y\" + axis.n] = axis.c2p(pos.top);\n }\n\n if (res.x1 !== undefined)\n res.x = res.x1;\n if (res.y1 !== undefined)\n res.y = res.y1;\n\n return res;\n }\n\n function axisToCanvasCoords(pos) {\n // get canvas coords from the first pair of x/y found in pos\n var res = {}, i, axis, key;\n\n for (i = 0; i < xaxes.length; ++i) {\n axis = xaxes[i];\n if (axis && axis.used) {\n key = \"x\" + axis.n;\n if (pos[key] == null && axis.n == 1)\n key = \"x\";\n\n if (pos[key] != null) {\n res.left = axis.p2c(pos[key]);\n break;\n }\n }\n }\n\n for (i = 0; i < yaxes.length; ++i) {\n axis = yaxes[i];\n if (axis && axis.used) {\n key = \"y\" + axis.n;\n if (pos[key] == null && axis.n == 1)\n key = \"y\";\n\n if (pos[key] != null) {\n res.top = axis.p2c(pos[key]);\n break;\n }\n }\n }\n\n return res;\n }\n\n function getOrCreateAxis(axes, number) {\n if (!axes[number - 1])\n axes[number - 1] = {\n n: number, // save the number for future reference\n direction: axes == xaxes ? \"x\" : \"y\",\n options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis)\n };\n\n return axes[number - 1];\n }\n\n function fillInSeriesOptions() {\n\n var neededColors = series.length, maxIndex = -1, i;\n\n // Subtract the number of series that already have fixed colors or\n // color indexes from the number that we still need to generate.\n\n for (i = 0; i < series.length; ++i) {\n var sc = series[i].color;\n if (sc != null) {\n neededColors--;\n if (typeof sc == \"number\" && sc > maxIndex) {\n maxIndex = sc;\n }\n }\n }\n\n // If any of the series have fixed color indexes, then we need to\n // generate at least as many colors as the highest index.\n\n if (neededColors <= maxIndex) {\n neededColors = maxIndex + 1;\n }\n\n // Generate all the colors, using first the option colors and then\n // variations on those colors once they're exhausted.\n\n var c, colors = [], colorPool = options.colors,\n colorPoolSize = colorPool.length, variation = 0;\n\n for (i = 0; i < neededColors; i++) {\n\n c = $.color.parse(colorPool[i % colorPoolSize] || \"#666\");\n\n // Each time we exhaust the colors in the pool we adjust\n // a scaling factor used to produce more variations on\n // those colors. The factor alternates negative/positive\n // to produce lighter/darker colors.\n\n // Reset the variation after every few cycles, or else\n // it will end up producing only white or black colors.\n\n if (i % colorPoolSize == 0 && i) {\n if (variation >= 0) {\n if (variation < 0.5) {\n variation = -variation - 0.2;\n } else variation = 0;\n } else variation = -variation;\n }\n\n colors[i] = c.scale('rgb', 1 + variation);\n }\n\n // Finalize the series options, filling in their colors\n\n var colori = 0, s;\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n // assign colors\n if (s.color == null) {\n s.color = colors[colori].toString();\n ++colori;\n }\n else if (typeof s.color == \"number\")\n s.color = colors[s.color].toString();\n\n // turn on lines automatically in case nothing is set\n if (s.lines.show == null) {\n var v, show = true;\n for (v in s)\n if (s[v] && s[v].show) {\n show = false;\n break;\n }\n if (show)\n s.lines.show = true;\n }\n\n // If nothing was provided for lines.zero, default it to match\n // lines.fill, since areas by default should extend to zero.\n\n if (s.lines.zero == null) {\n s.lines.zero = !!s.lines.fill;\n }\n\n // setup axes\n s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, \"x\"));\n s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, \"y\"));\n }\n }\n\n function processData() {\n var topSentry = Number.POSITIVE_INFINITY,\n bottomSentry = Number.NEGATIVE_INFINITY,\n fakeInfinity = Number.MAX_VALUE,\n i, j, k, m, length,\n s, points, ps, x, y, axis, val, f, p,\n data, format;\n\n function updateAxis(axis, min, max) {\n if (min < axis.datamin && min != -fakeInfinity)\n axis.datamin = min;\n if (max > axis.datamax && max != fakeInfinity)\n axis.datamax = max;\n }\n\n $.each(allAxes(), function (_, axis) {\n // init axis\n axis.datamin = topSentry;\n axis.datamax = bottomSentry;\n axis.used = false;\n });\n\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n s.datapoints = { points: [] };\n\n executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]);\n }\n\n // first pass: clean and copy data\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n data = s.data;\n format = s.datapoints.format;\n\n if (!format) {\n format = [];\n // find out how to copy\n format.push({ x: true, number: true, required: true });\n format.push({ y: true, number: true, required: true });\n\n if (s.bars.show || (s.lines.show && s.lines.fill)) {\n var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));\n format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });\n if (s.bars.horizontal) {\n delete format[format.length - 1].y;\n format[format.length - 1].x = true;\n }\n }\n\n s.datapoints.format = format;\n }\n\n if (s.datapoints.pointsize != null)\n continue; // already filled in\n\n s.datapoints.pointsize = format.length;\n\n ps = s.datapoints.pointsize;\n points = s.datapoints.points;\n\n var insertSteps = s.lines.show && s.lines.steps;\n s.xaxis.used = s.yaxis.used = true;\n\n for (j = k = 0; j < data.length; ++j, k += ps) {\n p = data[j];\n\n var nullify = p == null;\n if (!nullify) {\n for (m = 0; m < ps; ++m) {\n val = p[m];\n f = format[m];\n\n if (f) {\n if (f.number && val != null) {\n val = +val; // convert to number\n if (isNaN(val))\n val = null;\n else if (val == Infinity)\n val = fakeInfinity;\n else if (val == -Infinity)\n val = -fakeInfinity;\n }\n\n if (val == null) {\n if (f.required)\n nullify = true;\n\n if (f.defaultValue != null)\n val = f.defaultValue;\n }\n }\n\n points[k + m] = val;\n }\n }\n\n if (nullify) {\n for (m = 0; m < ps; ++m) {\n val = points[k + m];\n if (val != null) {\n f = format[m];\n // extract min/max info\n if (f.x)\n updateAxis(s.xaxis, val, val);\n if (f.y)\n updateAxis(s.yaxis, val, val);\n }\n points[k + m] = null;\n }\n }\n else {\n // a little bit of line specific stuff that\n // perhaps shouldn't be here, but lacking\n // better means...\n if (insertSteps && k > 0\n && points[k - ps] != null\n && points[k - ps] != points[k]\n && points[k - ps + 1] != points[k + 1]) {\n // copy the point to make room for a middle point\n for (m = 0; m < ps; ++m)\n points[k + ps + m] = points[k + m];\n\n // middle point has same y\n points[k + 1] = points[k - ps + 1];\n\n // we've added a point, better reflect that\n k += ps;\n }\n }\n }\n }\n\n // give the hooks a chance to run\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n executeHooks(hooks.processDatapoints, [ s, s.datapoints]);\n }\n\n // second pass: find datamax/datamin for auto-scaling\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n points = s.datapoints.points,\n ps = s.datapoints.pointsize;\n format = s.datapoints.format;\n\n var xmin = topSentry, ymin = topSentry,\n xmax = bottomSentry, ymax = bottomSentry;\n\n for (j = 0; j < points.length; j += ps) {\n if (points[j] == null)\n continue;\n\n for (m = 0; m < ps; ++m) {\n val = points[j + m];\n f = format[m];\n if (!f || f.autoscale === false || val == fakeInfinity || val == -fakeInfinity)\n continue;\n\n if (f.x) {\n if (val < xmin)\n xmin = val;\n if (val > xmax)\n xmax = val;\n }\n if (f.y) {\n if (val < ymin)\n ymin = val;\n if (val > ymax)\n ymax = val;\n }\n }\n }\n\n if (s.bars.show) {\n // make sure we got room for the bar on the dancing floor\n var delta;\n\n switch (s.bars.align) {\n case \"left\":\n delta = 0;\n break;\n case \"right\":\n delta = -s.bars.barWidth;\n break;\n case \"center\":\n delta = -s.bars.barWidth / 2;\n break;\n default:\n throw new Error(\"Invalid bar alignment: \" + s.bars.align);\n }\n\n if (s.bars.horizontal) {\n ymin += delta;\n ymax += delta + s.bars.barWidth;\n }\n else {\n xmin += delta;\n xmax += delta + s.bars.barWidth;\n }\n }\n\n updateAxis(s.xaxis, xmin, xmax);\n updateAxis(s.yaxis, ymin, ymax);\n }\n\n $.each(allAxes(), function (_, axis) {\n if (axis.datamin == topSentry)\n axis.datamin = null;\n if (axis.datamax == bottomSentry)\n axis.datamax = null;\n });\n }\n\n //////////////////////////////////////////////////////////////////////////////////\n // Returns the display's ratio between physical and device-independent pixels.\n //\n // This is the ratio between the width that the browser advertises and the number\n // of pixels actually available in that space. The iPhone 4, for example, has a\n // device-independent width of 320px, but its screen is actually 640px wide. It\n // therefore has a pixel ratio of 2, while most normal devices have a ratio of 1.\n\n function getPixelRatio(cctx) {\n var devicePixelRatio = window.devicePixelRatio || 1;\n var backingStoreRatio =\n cctx.webkitBackingStorePixelRatio ||\n cctx.mozBackingStorePixelRatio ||\n cctx.msBackingStorePixelRatio ||\n cctx.oBackingStorePixelRatio ||\n cctx.backingStorePixelRatio || 1;\n\n return devicePixelRatio / backingStoreRatio;\n }\n\n function makeCanvas(cls) {\n\n var c = document.createElement('canvas');\n c.className = cls;\n\n\t\t\t$(c).css({ direction: \"ltr\", position: \"absolute\", left: 0, top: 0 })\n\t\t\t\t.appendTo(placeholder);\n\n\t\t\t// If HTML5 Canvas isn't available, fall back to Excanvas\n\n\t\t\tif (!c.getContext) {\n\t\t\t\tif (window.G_vmlCanvasManager) {\n\t\t\t\t\tc = window.G_vmlCanvasManager.initElement(c);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.\");\n\t\t\t\t}\n\t\t\t}\n\n var cctx = c.getContext(\"2d\");\n\n // Increase the canvas density based on the display's pixel ratio; basically\n // giving the canvas more pixels without increasing the size of its element,\n // to take advantage of the fact that retina displays have that many more\n // pixels than they actually use for page & element widths.\n\n var pixelRatio = getPixelRatio(cctx);\n\n c.width = canvasWidth * pixelRatio;\n c.height = canvasHeight * pixelRatio;\n c.style.width = canvasWidth + \"px\";\n c.style.height = canvasHeight + \"px\";\n\n // Save the context so we can reset in case we get replotted\n\n cctx.save();\n\n // Scale the coordinate space to match the display density; so even though we\n // may have twice as many pixels, we still want lines and other drawing to\n // appear at the same size; the extra pixels will just make them crisper.\n\n cctx.scale(pixelRatio, pixelRatio);\n\n return c;\n }\n\n function getCanvasDimensions() {\n canvasWidth = placeholder.width();\n canvasHeight = placeholder.height();\n\n if (canvasWidth <= 0 || canvasHeight <= 0)\n throw new Error(\"Invalid dimensions for plot, width = \" + canvasWidth + \", height = \" + canvasHeight);\n }\n\n function resizeCanvas(c) {\n\n var cctx = c.getContext(\"2d\");\n\n // Handle pixel ratios > 1 for retina displays, as explained in makeCanvas\n\n var pixelRatio = getPixelRatio(cctx);\n\n // Resizing should reset the state (excanvas seems to be buggy though)\n\n if (c.style.width != canvasWidth) {\n c.width = canvasWidth * pixelRatio;\n c.style.width = canvasWidth + \"px\";\n }\n\n if (c.style.height != canvasHeight) {\n c.height = canvasHeight * pixelRatio;\n c.style.height = canvasHeight + \"px\";\n }\n\n // so try to get back to the initial state (even if it's\n // gone now, this should be safe according to the spec)\n cctx.restore();\n\n // and save again\n cctx.save();\n\n // Apply scaling for retina displays, as explained in makeCanvas\n\n cctx.scale(pixelRatio, pixelRatio);\n }\n\n function setupCanvases() {\n var reused,\n existingCanvas = placeholder.children(\"canvas.flot-base\"),\n existingOverlay = placeholder.children(\"canvas.flot-overlay\");\n\n if (existingCanvas.length == 0 || existingOverlay == 0) {\n // init everything\n\n placeholder.html(\"\"); // make sure placeholder is clear\n\n placeholder.css({ padding: 0 }); // padding messes up the positioning\n\n if (placeholder.css(\"position\") == 'static')\n placeholder.css(\"position\", \"relative\"); // for positioning labels and overlay\n\n getCanvasDimensions();\n\n canvas = makeCanvas(\"flot-base\");\n overlay = makeCanvas(\"flot-overlay\"); // overlay canvas for interactive features\n\n reused = false;\n }\n else {\n // reuse existing elements\n\n canvas = existingCanvas.get(0);\n overlay = existingOverlay.get(0);\n\n reused = true;\n }\n\n ctx = canvas.getContext(\"2d\");\n octx = overlay.getContext(\"2d\");\n\n // define which element we're listening for events on\n eventHolder = $(overlay);\n\n if (reused) {\n // run shutdown in the old plot object\n placeholder.data(\"plot\").shutdown();\n\n // reset reused canvases\n plot.resize();\n\n // make sure overlay pixels are cleared (canvas is cleared when we redraw)\n octx.clearRect(0, 0, canvasWidth, canvasHeight);\n\n // then whack any remaining obvious garbage left\n eventHolder.unbind();\n placeholder.children().not([canvas, overlay]).remove();\n }\n\n // save in case we get replotted\n placeholder.data(\"plot\", plot);\n }\n\n function bindEvents() {\n // bind events\n if (options.grid.hoverable) {\n eventHolder.mousemove(onMouseMove);\n\n // Use bind, rather than .mouseleave, because we officially\n // still support jQuery 1.2.6, which doesn't define a shortcut\n // for mouseenter or mouseleave. This was a bug/oversight that\n // was fixed somewhere around 1.3.x. We can return to using\n // .mouseleave when we drop support for 1.2.6.\n\n eventHolder.bind(\"mouseleave\", onMouseLeave);\n }\n\n if (options.grid.clickable)\n eventHolder.click(onClick);\n\n executeHooks(hooks.bindEvents, [eventHolder]);\n }\n\n function shutdown() {\n if (redrawTimeout)\n clearTimeout(redrawTimeout);\n\n eventHolder.unbind(\"mousemove\", onMouseMove);\n eventHolder.unbind(\"mouseleave\", onMouseLeave);\n eventHolder.unbind(\"click\", onClick);\n\n executeHooks(hooks.shutdown, [eventHolder]);\n }\n\n function setTransformationHelpers(axis) {\n // set helper functions on the axis, assumes plot area\n // has been computed already\n\n function identity(x) { return x; }\n\n var s, m, t = axis.options.transform || identity,\n it = axis.options.inverseTransform;\n\n // precompute how much the axis is scaling a point\n // in canvas space\n if (axis.direction == \"x\") {\n s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min));\n m = Math.min(t(axis.max), t(axis.min));\n }\n else {\n s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min));\n s = -s;\n m = Math.max(t(axis.max), t(axis.min));\n }\n\n // data point to canvas coordinate\n if (t == identity) // slight optimization\n axis.p2c = function (p) { return (p - m) * s; };\n else\n axis.p2c = function (p) { return (t(p) - m) * s; };\n // canvas coordinate to data point\n if (!it)\n axis.c2p = function (c) { return m + c / s; };\n else\n axis.c2p = function (c) { return it(m + c / s); };\n }\n\n function measureTickLabels(axis) {\n var opts = axis.options, ticks = axis.ticks || [],\n axisw = opts.labelWidth || 0, axish = opts.labelHeight || 0,\n f = axis.font;\n\n ctx.save();\n ctx.font = f.style + \" \" + f.variant + \" \" + f.weight + \" \" + f.size + \"px '\" + f.family + \"'\";\n\n for (var i = 0; i < ticks.length; ++i) {\n var t = ticks[i];\n\n t.lines = [];\n t.width = t.height = 0;\n\n if (!t.label)\n continue;\n\n // accept various kinds of newlines, including HTML ones\n // (you can actually split directly on regexps in Javascript,\n // but IE < 9 is unfortunately broken)\n var lines = (t.label + \"\").replace(/<br ?\\/?>|\\r\\n|\\r/g, \"\\n\").split(\"\\n\");\n for (var j = 0; j < lines.length; ++j) {\n var line = { text: lines[j] },\n m = ctx.measureText(line.text);\n\n line.width = m.width;\n // m.height might not be defined, not in the\n // standard yet\n line.height = m.height != null ? m.height : f.size;\n\n // add a bit of margin since font rendering is\n // not pixel perfect and cut off letters look\n // bad, this also doubles as spacing between\n // lines\n line.height += Math.round(f.size * 0.15);\n\n t.width = Math.max(line.width, t.width);\n t.height += line.height;\n\n t.lines.push(line);\n }\n\n if (opts.labelWidth == null)\n axisw = Math.max(axisw, t.width);\n if (opts.labelHeight == null)\n axish = Math.max(axish, t.height);\n }\n ctx.restore();\n\n axis.labelWidth = Math.ceil(axisw);\n axis.labelHeight = Math.ceil(axish);\n }\n\n function allocateAxisBoxFirstPhase(axis) {\n // find the bounding box of the axis by looking at label\n // widths/heights and ticks, make room by diminishing the\n // plotOffset; this first phase only looks at one\n // dimension per axis, the other dimension depends on the\n // other axes so will have to wait\n\n var lw = axis.labelWidth,\n lh = axis.labelHeight,\n pos = axis.options.position,\n tickLength = axis.options.tickLength,\n axisMargin = options.grid.axisMargin,\n padding = options.grid.labelMargin,\n all = axis.direction == \"x\" ? xaxes : yaxes,\n index, innermost;\n\n // determine axis margin\n var samePosition = $.grep(all, function (a) {\n return a && a.options.position == pos && a.reserveSpace;\n });\n if ($.inArray(axis, samePosition) == samePosition.length - 1)\n axisMargin = 0; // outermost\n\n // determine tick length - if we're innermost, we can use \"full\"\n if (tickLength == null) {\n var sameDirection = $.grep(all, function (a) {\n return a && a.reserveSpace;\n });\n\n innermost = $.inArray(axis, sameDirection) == 0;\n if (innermost)\n tickLength = \"full\";\n else\n tickLength = 5;\n }\n\n if (!isNaN(+tickLength))\n padding += +tickLength;\n\n // compute box\n if (axis.direction == \"x\") {\n lh += padding;\n\n if (pos == \"bottom\") {\n plotOffset.bottom += lh + axisMargin;\n axis.box = { top: canvasHeight - plotOffset.bottom, height: lh };\n }\n else {\n axis.box = { top: plotOffset.top + axisMargin, height: lh };\n plotOffset.top += lh + axisMargin;\n }\n }\n else {\n lw += padding;\n\n if (pos == \"left\") {\n axis.box = { left: plotOffset.left + axisMargin, width: lw };\n plotOffset.left += lw + axisMargin;\n }\n else {\n plotOffset.right += lw + axisMargin;\n axis.box = { left: canvasWidth - plotOffset.right, width: lw };\n }\n }\n\n // save for future reference\n axis.position = pos;\n axis.tickLength = tickLength;\n axis.box.padding = padding;\n axis.innermost = innermost;\n }\n\n function allocateAxisBoxSecondPhase(axis) {\n // now that all axis boxes have been placed in one\n // dimension, we can set the remaining dimension coordinates\n if (axis.direction == \"x\") {\n axis.box.left = plotOffset.left - axis.labelWidth / 2;\n axis.box.width = canvasWidth - plotOffset.left - plotOffset.right + axis.labelWidth;\n }\n else {\n axis.box.top = plotOffset.top - axis.labelHeight / 2;\n axis.box.height = canvasHeight - plotOffset.bottom - plotOffset.top + axis.labelHeight;\n }\n }\n\n function adjustLayoutForThingsStickingOut() {\n // possibly adjust plot offset to ensure everything stays\n // inside the canvas and isn't clipped off\n\n var minMargin = options.grid.minBorderMargin,\n margins = { x: 0, y: 0 }, i, axis;\n\n // check stuff from the plot (FIXME: this should just read\n // a value from the series, otherwise it's impossible to\n // customize)\n if (minMargin == null) {\n minMargin = 0;\n for (i = 0; i < series.length; ++i)\n minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2));\n }\n\n margins.x = margins.y = Math.ceil(minMargin);\n\n // check axis labels, note we don't check the actual\n // labels but instead use the overall width/height to not\n // jump as much around with replots\n $.each(allAxes(), function (_, axis) {\n var dir = axis.direction;\n if (axis.reserveSpace)\n margins[dir] = Math.ceil(Math.max(margins[dir], (dir == \"x\" ? axis.labelWidth : axis.labelHeight) / 2));\n });\n\n plotOffset.left = Math.max(margins.x, plotOffset.left);\n plotOffset.right = Math.max(margins.x, plotOffset.right);\n plotOffset.top = Math.max(margins.y, plotOffset.top);\n plotOffset.bottom = Math.max(margins.y, plotOffset.bottom);\n }\n\n function setupGrid() {\n var i, axes = allAxes(), showGrid = options.grid.show;\n\n // Initialize the plot's offset from the edge of the canvas\n\n for (var a in plotOffset) {\n var margin = options.grid.margin || 0;\n plotOffset[a] = typeof margin == \"number\" ? margin : margin[a] || 0;\n }\n\n executeHooks(hooks.processOffset, [plotOffset]);\n\n // If the grid is visible, add its border width to the offset\n\n for (var a in plotOffset) {\n if(typeof(options.grid.borderWidth) == \"object\") {\n plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0;\n }\n else {\n plotOffset[a] += showGrid ? options.grid.borderWidth : 0;\n }\n }\n\n // init axes\n $.each(axes, function (_, axis) {\n axis.show = axis.options.show;\n if (axis.show == null)\n axis.show = axis.used; // by default an axis is visible if it's got data\n\n axis.reserveSpace = axis.show || axis.options.reserveSpace;\n\n setRange(axis);\n });\n\n if (showGrid) {\n // determine from the placeholder the font size ~ height of font ~ 1 em\n var fontDefaults = {\n style: placeholder.css(\"font-style\"),\n size: Math.round(0.8 * (+placeholder.css(\"font-size\").replace(\"px\", \"\") || 13)),\n variant: placeholder.css(\"font-variant\"),\n weight: placeholder.css(\"font-weight\"),\n family: placeholder.css(\"font-family\")\n };\n\n var allocatedAxes = $.grep(axes, function (axis) { return axis.reserveSpace; });\n\n $.each(allocatedAxes, function (_, axis) {\n // make the ticks\n setupTickGeneration(axis);\n setTicks(axis);\n snapRangeToTicks(axis, axis.ticks);\n\n // find labelWidth/Height for axis\n axis.font = $.extend({}, fontDefaults, axis.options.font);\n measureTickLabels(axis);\n });\n\n // with all dimensions calculated, we can compute the\n // axis bounding boxes, start from the outside\n // (reverse order)\n for (i = allocatedAxes.length - 1; i >= 0; --i)\n allocateAxisBoxFirstPhase(allocatedAxes[i]);\n\n // make sure we've got enough space for things that\n // might stick out\n adjustLayoutForThingsStickingOut();\n\n $.each(allocatedAxes, function (_, axis) {\n allocateAxisBoxSecondPhase(axis);\n });\n }\n\n plotWidth = canvasWidth - plotOffset.left - plotOffset.right;\n plotHeight = canvasHeight - plotOffset.bottom - plotOffset.top;\n\n // now we got the proper plot dimensions, we can compute the scaling\n $.each(axes, function (_, axis) {\n setTransformationHelpers(axis);\n });\n\n insertLegend();\n }\n\n function setRange(axis) {\n var opts = axis.options,\n min = +(opts.min != null ? opts.min : axis.datamin),\n max = +(opts.max != null ? opts.max : axis.datamax),\n delta = max - min;\n\n if (delta == 0.0) {\n // degenerate case\n var widen = max == 0 ? 1 : 0.01;\n\n if (opts.min == null)\n min -= widen;\n // always widen max if we couldn't widen min to ensure we\n // don't fall into min == max which doesn't work\n if (opts.max == null || opts.min != null)\n max += widen;\n }\n else {\n // consider autoscaling\n var margin = opts.autoscaleMargin;\n if (margin != null) {\n if (opts.min == null) {\n min -= delta * margin;\n // make sure we don't go below zero if all values\n // are positive\n if (min < 0 && axis.datamin != null && axis.datamin >= 0)\n min = 0;\n }\n if (opts.max == null) {\n max += delta * margin;\n if (max > 0 && axis.datamax != null && axis.datamax <= 0)\n max = 0;\n }\n }\n }\n axis.min = min;\n axis.max = max;\n }\n\n function setupTickGeneration(axis) {\n var opts = axis.options;\n\n // estimate number of ticks\n var noTicks;\n if (typeof opts.ticks == \"number\" && opts.ticks > 0)\n noTicks = opts.ticks;\n else\n // heuristic based on the model a*sqrt(x) fitted to\n // some data points that seemed reasonable\n noTicks = 0.3 * Math.sqrt(axis.direction == \"x\" ? canvasWidth : canvasHeight);\n\n axis.delta = (axis.max - axis.min) / noTicks;\n\n // Time mode was moved to a plug-in in 0.8, but since so many people use this\n // we'll add an especially friendly make sure they remembered to include it.\n\n if (opts.mode == \"time\" && !axis.tickGenerator) {\n throw new Error(\"Time mode requires the flot.time plugin.\");\n }\n\n // Flot supports base-10 axes; any other mode else is handled by a plug-in,\n // like flot.time.js.\n\n if (!axis.tickGenerator) {\n\n axis.tickGenerator = function (axis) {\n var maxDec = opts.tickDecimals,\n dec = -Math.floor(Math.log(axis.delta) / Math.LN10);\n\n if (maxDec != null && dec > maxDec)\n dec = maxDec;\n\n var magn = Math.pow(10, -dec),\n norm = axis.delta / magn, // norm is between 1.0 and 10.0\n size,\n\n ticks = [],\n start,\n i = 0,\n v = Number.NaN,\n prev;\n\n if (norm < 1.5)\n size = 1;\n else if (norm < 3) {\n size = 2;\n // special case for 2.5, requires an extra decimal\n if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) {\n size = 2.5;\n ++dec;\n }\n }\n else if (norm < 7.5)\n size = 5;\n else size = 10;\n\n size *= magn;\n\n if (opts.minTickSize != null && size < opts.minTickSize)\n size = opts.minTickSize;\n\n axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec);\n axis.tickSize = opts.tickSize || size;\n\n start = floorInBase(axis.min, axis.tickSize)\n\n do {\n prev = v;\n v = start + i * axis.tickSize;\n ticks.push(v);\n ++i;\n } while (v < axis.max && v != prev);\n return ticks;\n };\n\n\t\t\t\taxis.tickFormatter = function (value, axis) {\n\n\t\t\t\t\tvar factor = axis.tickDecimals ? Math.pow(10, axis.tickDecimals) : 1;\n\t\t\t\t\tvar formatted = \"\" + Math.round(value * factor) / factor;\n\n\t\t\t\t\t// If tickDecimals was specified, ensure that we have exactly that\n\t\t\t\t\t// much precision; otherwise default to the value's own precision.\n\n\t\t\t\t\tif (axis.tickDecimals != null) {\n\t\t\t\t\t\tvar decimal = formatted.indexOf(\".\");\n\t\t\t\t\t\tvar precision = decimal == -1 ? 0 : formatted.length - decimal - 1;\n\t\t\t\t\t\tif (precision < axis.tickDecimals) {\n\t\t\t\t\t\t\treturn (precision ? formatted : formatted + \".\") + (\"\" + factor).substr(1, axis.tickDecimals - precision);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n return formatted;\n };\n }\n\n if ($.isFunction(opts.tickFormatter))\n axis.tickFormatter = function (v, axis) { return \"\" + opts.tickFormatter(v, axis); };\n\n if (opts.alignTicksWithAxis != null) {\n var otherAxis = (axis.direction == \"x\" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1];\n if (otherAxis && otherAxis.used && otherAxis != axis) {\n // consider snapping min/max to outermost nice ticks\n var niceTicks = axis.tickGenerator(axis);\n if (niceTicks.length > 0) {\n if (opts.min == null)\n axis.min = Math.min(axis.min, niceTicks[0]);\n if (opts.max == null && niceTicks.length > 1)\n axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]);\n }\n\n axis.tickGenerator = function (axis) {\n // copy ticks, scaled to this axis\n var ticks = [], v, i;\n for (i = 0; i < otherAxis.ticks.length; ++i) {\n v = (otherAxis.ticks[i].v - otherAxis.min) / (otherAxis.max - otherAxis.min);\n v = axis.min + v * (axis.max - axis.min);\n ticks.push(v);\n }\n return ticks;\n };\n\n // we might need an extra decimal since forced\n // ticks don't necessarily fit naturally\n if (!axis.mode && opts.tickDecimals == null) {\n var extraDec = Math.max(0, -Math.floor(Math.log(axis.delta) / Math.LN10) + 1),\n ts = axis.tickGenerator(axis);\n\n // only proceed if the tick interval rounded\n // with an extra decimal doesn't give us a\n // zero at end\n if (!(ts.length > 1 && /\\..*0$/.test((ts[1] - ts[0]).toFixed(extraDec))))\n axis.tickDecimals = extraDec;\n }\n }\n }\n }\n\n function setTicks(axis) {\n var oticks = axis.options.ticks, ticks = [];\n if (oticks == null || (typeof oticks == \"number\" && oticks > 0))\n ticks = axis.tickGenerator(axis);\n else if (oticks) {\n if ($.isFunction(oticks))\n // generate the ticks\n ticks = oticks(axis);\n else\n ticks = oticks;\n }\n\n // clean up/labelify the supplied ticks, copy them over\n var i, v;\n axis.ticks = [];\n for (i = 0; i < ticks.length; ++i) {\n var label = null;\n var t = ticks[i];\n if (typeof t == \"object\") {\n v = +t[0];\n if (t.length > 1)\n label = t[1];\n }\n else\n v = +t;\n if (label == null)\n label = axis.tickFormatter(v, axis);\n if (!isNaN(v))\n axis.ticks.push({ v: v, label: label });\n }\n }\n\n function snapRangeToTicks(axis, ticks) {\n if (axis.options.autoscaleMargin && ticks.length > 0) {\n // snap to ticks\n if (axis.options.min == null)\n axis.min = Math.min(axis.min, ticks[0].v);\n if (axis.options.max == null && ticks.length > 1)\n axis.max = Math.max(axis.max, ticks[ticks.length - 1].v);\n }\n }\n\n function draw() {\n ctx.clearRect(0, 0, canvasWidth, canvasHeight);\n\n executeHooks(hooks.drawBackground, [ctx]);\n\n var grid = options.grid;\n\n // draw background, if any\n if (grid.show && grid.backgroundColor)\n drawBackground();\n\n if (grid.show && !grid.aboveData) {\n drawGrid();\n drawAxisLabels();\n }\n\n for (var i = 0; i < series.length; ++i) {\n executeHooks(hooks.drawSeries, [ctx, series[i]]);\n drawSeries(series[i]);\n }\n\n executeHooks(hooks.draw, [ctx]);\n\n if (grid.show && grid.aboveData) {\n drawGrid();\n drawAxisLabels();\n }\n }\n\n function extractRange(ranges, coord) {\n var axis, from, to, key, axes = allAxes();\n\n for (var i = 0; i < axes.length; ++i) {\n axis = axes[i];\n if (axis.direction == coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n == 1)\n key = coord + \"axis\"; // support x1axis as xaxis\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord == \"x\" ? xaxes[0] : yaxes[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n\n return { from: from, to: to, axis: axis };\n }\n\n function drawBackground() {\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, \"rgba(255, 255, 255, 0)\");\n ctx.fillRect(0, 0, plotWidth, plotHeight);\n ctx.restore();\n }\n\n function drawGrid() {\n var i, axes, bw, bc;\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n // draw markings\n var markings = options.grid.markings;\n if (markings) {\n if ($.isFunction(markings)) {\n axes = plot.getAxes();\n // xmin etc. is backwards compatibility, to be\n // removed in the future\n axes.xmin = axes.xaxis.min;\n axes.xmax = axes.xaxis.max;\n axes.ymin = axes.yaxis.min;\n axes.ymax = axes.yaxis.max;\n\n markings = markings(axes);\n }\n\n for (i = 0; i < markings.length; ++i) {\n var m = markings[i],\n xrange = extractRange(m, \"x\"),\n yrange = extractRange(m, \"y\");\n\n // fill in missing\n if (xrange.from == null)\n xrange.from = xrange.axis.min;\n if (xrange.to == null)\n xrange.to = xrange.axis.max;\n if (yrange.from == null)\n yrange.from = yrange.axis.min;\n if (yrange.to == null)\n yrange.to = yrange.axis.max;\n\n // clip\n if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max ||\n yrange.to < yrange.axis.min || yrange.from > yrange.axis.max)\n continue;\n\n xrange.from = Math.max(xrange.from, xrange.axis.min);\n xrange.to = Math.min(xrange.to, xrange.axis.max);\n yrange.from = Math.max(yrange.from, yrange.axis.min);\n yrange.to = Math.min(yrange.to, yrange.axis.max);\n\n if (xrange.from == xrange.to && yrange.from == yrange.to)\n continue;\n\n // then draw\n xrange.from = xrange.axis.p2c(xrange.from);\n xrange.to = xrange.axis.p2c(xrange.to);\n yrange.from = yrange.axis.p2c(yrange.from);\n yrange.to = yrange.axis.p2c(yrange.to);\n\n if (xrange.from == xrange.to || yrange.from == yrange.to) {\n // draw line\n ctx.beginPath();\n ctx.strokeStyle = m.color || options.grid.markingsColor;\n ctx.lineWidth = m.lineWidth || options.grid.markingsLineWidth;\n ctx.moveTo(xrange.from, yrange.from);\n ctx.lineTo(xrange.to, yrange.to);\n ctx.stroke();\n }\n else {\n // fill area\n ctx.fillStyle = m.color || options.grid.markingsColor;\n ctx.fillRect(xrange.from, yrange.to,\n xrange.to - xrange.from,\n yrange.from - yrange.to);\n }\n }\n }\n\n // draw the ticks\n axes = allAxes();\n bw = options.grid.borderWidth;\n\n for (var j = 0; j < axes.length; ++j) {\n var axis = axes[j], box = axis.box,\n t = axis.tickLength, x, y, xoff, yoff;\n if (!axis.show || axis.ticks.length == 0)\n continue;\n\n ctx.strokeStyle = axis.options.tickColor || $.color.parse(axis.options.color).scale('a', 0.22).toString();\n ctx.lineWidth = 1;\n\n // find the edges\n if (axis.direction == \"x\") {\n x = 0;\n if (t == \"full\")\n y = (axis.position == \"top\" ? 0 : plotHeight);\n else\n y = box.top - plotOffset.top + (axis.position == \"top\" ? box.height : 0);\n }\n else {\n y = 0;\n if (t == \"full\")\n x = (axis.position == \"left\" ? 0 : plotWidth);\n else\n x = box.left - plotOffset.left + (axis.position == \"left\" ? box.width : 0);\n }\n\n // draw tick bar\n if (!axis.innermost) {\n ctx.beginPath();\n xoff = yoff = 0;\n if (axis.direction == \"x\")\n xoff = plotWidth;\n else\n yoff = plotHeight;\n\n if (ctx.lineWidth == 1) {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n\n ctx.moveTo(x, y);\n ctx.lineTo(x + xoff, y + yoff);\n ctx.stroke();\n }\n\n // draw ticks\n ctx.beginPath();\n for (i = 0; i < axis.ticks.length; ++i) {\n var v = axis.ticks[i].v;\n\n xoff = yoff = 0;\n\n if (isNaN(v) || v < axis.min || v > axis.max\n // skip those lying on the axes if we got a border\n || (t == \"full\"\n && ((typeof bw == \"object\" && bw[axis.position] > 0) || bw > 0)\n && (v == axis.min || v == axis.max)))\n continue;\n\n if (axis.direction == \"x\") {\n x = axis.p2c(v);\n yoff = t == \"full\" ? -plotHeight : t;\n\n if (axis.position == \"top\")\n yoff = -yoff;\n }\n else {\n y = axis.p2c(v);\n xoff = t == \"full\" ? -plotWidth : t;\n\n if (axis.position == \"left\")\n xoff = -xoff;\n }\n\n if (ctx.lineWidth == 1) {\n if (axis.direction == \"x\")\n x = Math.floor(x) + 0.5;\n else\n y = Math.floor(y) + 0.5;\n }\n\n ctx.moveTo(x, y);\n ctx.lineTo(x + xoff, y + yoff);\n }\n\n ctx.stroke();\n }\n\n\n // draw border\n if (bw) {\n // If either borderWidth or borderColor is an object, then draw the border\n // line by line instead of as one rectangle\n bc = options.grid.borderColor;\n if(typeof bw == \"object\" || typeof bc == \"object\") {\n if (typeof bw !== \"object\") {\n bw = {top: bw, right: bw, bottom: bw, left: bw};\n }\n if (typeof bc !== \"object\") {\n bc = {top: bc, right: bc, bottom: bc, left: bc};\n }\n\n if (bw.top > 0) {\n ctx.strokeStyle = bc.top;\n ctx.lineWidth = bw.top;\n ctx.beginPath();\n ctx.moveTo(0 - bw.left, 0 - bw.top/2);\n ctx.lineTo(plotWidth, 0 - bw.top/2);\n ctx.stroke();\n }\n\n if (bw.right > 0) {\n ctx.strokeStyle = bc.right;\n ctx.lineWidth = bw.right;\n ctx.beginPath();\n ctx.moveTo(plotWidth + bw.right / 2, 0 - bw.top);\n ctx.lineTo(plotWidth + bw.right / 2, plotHeight);\n ctx.stroke();\n }\n\n if (bw.bottom > 0) {\n ctx.strokeStyle = bc.bottom;\n ctx.lineWidth = bw.bottom;\n ctx.beginPath();\n ctx.moveTo(plotWidth + bw.right, plotHeight + bw.bottom / 2);\n ctx.lineTo(0, plotHeight + bw.bottom / 2);\n ctx.stroke();\n }\n\n if (bw.left > 0) {\n ctx.strokeStyle = bc.left;\n ctx.lineWidth = bw.left;\n ctx.beginPath();\n ctx.moveTo(0 - bw.left/2, plotHeight + bw.bottom);\n ctx.lineTo(0- bw.left/2, 0);\n ctx.stroke();\n }\n }\n else {\n ctx.lineWidth = bw;\n ctx.strokeStyle = options.grid.borderColor;\n ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw);\n }\n }\n\n ctx.restore();\n }\n\n function drawAxisLabels() {\n ctx.save();\n\n $.each(allAxes(), function (_, axis) {\n if (!axis.show || axis.ticks.length == 0)\n return;\n\n var box = axis.box, f = axis.font;\n // placeholder.append('<div style=\"position:absolute;opacity:0.10;background-color:red;left:' + box.left + 'px;top:' + box.top + 'px;width:' + box.width + 'px;height:' + box.height + 'px\"></div>') // debug\n\n ctx.fillStyle = axis.options.color;\n // Important: Don't use quotes around axis.font.family! Just around single\n // font names like 'Times New Roman' that have a space or special character in it.\n ctx.font = f.style + \" \" + f.variant + \" \" + f.weight + \" \" + f.size + \"px \" + f.family;\n ctx.textAlign = \"start\";\n // middle align the labels - top would be more\n // natural, but browsers can differ a pixel or two in\n // where they consider the top to be, so instead we\n // middle align to minimize variation between browsers\n // and compensate when calculating the coordinates\n ctx.textBaseline = \"middle\";\n\n for (var i = 0; i < axis.ticks.length; ++i) {\n var tick = axis.ticks[i];\n if (!tick.label || tick.v < axis.min || tick.v > axis.max)\n continue;\n\n var x, y, offset = 0, line;\n for (var k = 0; k < tick.lines.length; ++k) {\n line = tick.lines[k];\n\n if (axis.direction == \"x\") {\n x = plotOffset.left + axis.p2c(tick.v) - line.width/2;\n if (axis.position == \"bottom\")\n y = box.top + box.padding;\n else\n y = box.top + box.height - box.padding - tick.height;\n }\n else {\n y = plotOffset.top + axis.p2c(tick.v) - tick.height/2;\n if (axis.position == \"left\")\n x = box.left + box.width - box.padding - line.width;\n else\n x = box.left + box.padding;\n }\n\n // account for middle aligning and line number\n y += line.height/2 + offset;\n offset += line.height;\n\n if (!!(window.opera && window.opera.version().split('.')[0] < 12)) {\n // FIXME: LEGACY BROWSER FIX\n // AFFECTS: Opera < 12.00\n\n // round the coordinates since Opera\n // otherwise switches to more ugly\n // rendering (probably non-hinted) and\n // offset the y coordinates since it seems\n // to be off pretty consistently compared\n // to the other browsers\n x = Math.floor(x);\n y = Math.ceil(y - 2);\n }\n ctx.fillText(line.text, x, y);\n }\n }\n });\n\n ctx.restore();\n }\n\n function drawSeries(series) {\n if (series.lines.show)\n drawSeriesLines(series);\n if (series.bars.show)\n drawSeriesBars(series);\n if (series.points.show)\n drawSeriesPoints(series);\n }\n\n function drawSeriesLines(series) {\n function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {\n var points = datapoints.points,\n ps = datapoints.pointsize,\n prevx = null, prevy = null;\n\n ctx.beginPath();\n for (var i = ps; i < points.length; i += ps) {\n var x1 = points[i - ps], y1 = points[i - ps + 1],\n x2 = points[i], y2 = points[i + 1];\n\n if (x1 == null || x2 == null)\n continue;\n\n // clip with ymin\n if (y1 <= y2 && y1 < axisy.min) {\n if (y2 < axisy.min)\n continue; // line segment is outside\n // compute new intersection point\n x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.min;\n }\n else if (y2 <= y1 && y2 < axisy.min) {\n if (y1 < axisy.min)\n continue;\n x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.min;\n }\n\n // clip with ymax\n if (y1 >= y2 && y1 > axisy.max) {\n if (y2 > axisy.max)\n continue;\n x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.max;\n }\n else if (y2 >= y1 && y2 > axisy.max) {\n if (y1 > axisy.max)\n continue;\n x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.max;\n }\n\n // clip with xmin\n if (x1 <= x2 && x1 < axisx.min) {\n if (x2 < axisx.min)\n continue;\n y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.min;\n }\n else if (x2 <= x1 && x2 < axisx.min) {\n if (x1 < axisx.min)\n continue;\n y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.min;\n }\n\n // clip with xmax\n if (x1 >= x2 && x1 > axisx.max) {\n if (x2 > axisx.max)\n continue;\n y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.max;\n }\n else if (x2 >= x1 && x2 > axisx.max) {\n if (x1 > axisx.max)\n continue;\n y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.max;\n }\n\n if (x1 != prevx || y1 != prevy)\n ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);\n\n prevx = x2;\n prevy = y2;\n ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset);\n }\n ctx.stroke();\n }\n\n function plotLineArea(datapoints, axisx, axisy) {\n var points = datapoints.points,\n ps = datapoints.pointsize,\n bottom = Math.min(Math.max(0, axisy.min), axisy.max),\n i = 0, top, areaOpen = false,\n ypos = 1, segmentStart = 0, segmentEnd = 0;\n\n // we process each segment in two turns, first forward\n // direction to sketch out top, then once we hit the\n // end we go backwards to sketch the bottom\n while (true) {\n if (ps > 0 && i > points.length + ps)\n break;\n\n i += ps; // ps is negative if going backwards\n\n var x1 = points[i - ps],\n y1 = points[i - ps + ypos],\n x2 = points[i], y2 = points[i + ypos];\n\n if (areaOpen) {\n if (ps > 0 && x1 != null && x2 == null) {\n // at turning point\n segmentEnd = i;\n ps = -ps;\n ypos = 2;\n continue;\n }\n\n if (ps < 0 && i == segmentStart + ps) {\n // done with the reverse sweep\n ctx.fill();\n areaOpen = false;\n ps = -ps;\n ypos = 1;\n i = segmentStart = segmentEnd + ps;\n continue;\n }\n }\n\n if (x1 == null || x2 == null)\n continue;\n\n // clip x values\n\n // clip with xmin\n if (x1 <= x2 && x1 < axisx.min) {\n if (x2 < axisx.min)\n continue;\n y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.min;\n }\n else if (x2 <= x1 && x2 < axisx.min) {\n if (x1 < axisx.min)\n continue;\n y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.min;\n }\n\n // clip with xmax\n if (x1 >= x2 && x1 > axisx.max) {\n if (x2 > axisx.max)\n continue;\n y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.max;\n }\n else if (x2 >= x1 && x2 > axisx.max) {\n if (x1 > axisx.max)\n continue;\n y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.max;\n }\n\n if (!areaOpen) {\n // open area\n ctx.beginPath();\n ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom));\n areaOpen = true;\n }\n\n // now first check the case where both is outside\n if (y1 >= axisy.max && y2 >= axisy.max) {\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max));\n continue;\n }\n else if (y1 <= axisy.min && y2 <= axisy.min) {\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));\n continue;\n }\n\n // else it's a bit more complicated, there might\n // be a flat maxed out rectangle first, then a\n // triangular cutout or reverse; to find these\n // keep track of the current x values\n var x1old = x1, x2old = x2;\n\n // clip the y values, without shortcutting, we\n // go through all cases in turn\n\n // clip with ymin\n if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {\n x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.min;\n }\n else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) {\n x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.min;\n }\n\n // clip with ymax\n if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) {\n x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.max;\n }\n else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) {\n x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.max;\n }\n\n // if the x value was changed we got a rectangle\n // to fill\n if (x1 != x1old) {\n ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1));\n // it goes to (x1, y1), but we fill that below\n }\n\n // fill triangular section, this sometimes result\n // in redundant points if (x1, y1) hasn't changed\n // from previous line to, but we just ignore that\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));\n\n // fill the other rectangle if it's there\n if (x2 != x2old) {\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));\n ctx.lineTo(axisx.p2c(x2old), axisy.p2c(y2));\n }\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n ctx.lineJoin = \"round\";\n\n var lw = series.lines.lineWidth,\n sw = series.shadowSize;\n // FIXME: consider another form of shadow when filling is turned on\n if (lw > 0 && sw > 0) {\n // draw shadow as a thick and thin line with transparency\n ctx.lineWidth = sw;\n ctx.strokeStyle = \"rgba(0,0,0,0.1)\";\n // position shadow at angle from the mid of line\n var angle = Math.PI/18;\n plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis);\n ctx.lineWidth = sw/2;\n plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis);\n }\n\n ctx.lineWidth = lw;\n ctx.strokeStyle = series.color;\n var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight);\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n plotLineArea(series.datapoints, series.xaxis, series.yaxis);\n }\n\n if (lw > 0)\n plotLine(series.datapoints, 0, 0, series.xaxis, series.yaxis);\n ctx.restore();\n }\n\n function drawSeriesPoints(series) {\n function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) {\n var points = datapoints.points, ps = datapoints.pointsize;\n\n for (var i = 0; i < points.length; i += ps) {\n var x = points[i], y = points[i + 1];\n if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)\n continue;\n\n ctx.beginPath();\n x = axisx.p2c(x);\n y = axisy.p2c(y) + offset;\n if (symbol == \"circle\")\n ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);\n else\n symbol(ctx, x, y, radius, shadow);\n ctx.closePath();\n\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n ctx.fill();\n }\n ctx.stroke();\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n var lw = series.points.lineWidth,\n sw = series.shadowSize,\n radius = series.points.radius,\n symbol = series.points.symbol;\n\n // If the user sets the line width to 0, we change it to a very \n // small value. A line width of 0 seems to force the default of 1.\n // Doing the conditional here allows the shadow setting to still be \n // optional even with a lineWidth of 0.\n\n if( lw == 0 )\n lw = 0.0001;\n\n if (lw > 0 && sw > 0) {\n // draw shadow in two steps\n var w = sw / 2;\n ctx.lineWidth = w;\n ctx.strokeStyle = \"rgba(0,0,0,0.1)\";\n plotPoints(series.datapoints, radius, null, w + w/2, true,\n series.xaxis, series.yaxis, symbol);\n\n ctx.strokeStyle = \"rgba(0,0,0,0.2)\";\n plotPoints(series.datapoints, radius, null, w/2, true,\n series.xaxis, series.yaxis, symbol);\n }\n\n ctx.lineWidth = lw;\n ctx.strokeStyle = series.color;\n plotPoints(series.datapoints, radius,\n getFillStyle(series.points, series.color), 0, false,\n series.xaxis, series.yaxis, symbol);\n ctx.restore();\n }\n\n function drawBar(x, y, b, barLeft, barRight, offset, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {\n var left, right, bottom, top,\n drawLeft, drawRight, drawTop, drawBottom,\n tmp;\n\n // in horizontal mode, we start the bar from the left\n // instead of from the bottom so it appears to be\n // horizontal rather than vertical\n if (horizontal) {\n drawBottom = drawRight = drawTop = true;\n drawLeft = false;\n left = b;\n right = x;\n top = y + barLeft;\n bottom = y + barRight;\n\n // account for negative bars\n if (right < left) {\n tmp = right;\n right = left;\n left = tmp;\n drawLeft = true;\n drawRight = false;\n }\n }\n else {\n drawLeft = drawRight = drawTop = true;\n drawBottom = false;\n left = x + barLeft;\n right = x + barRight;\n bottom = b;\n top = y;\n\n // account for negative bars\n if (top < bottom) {\n tmp = top;\n top = bottom;\n bottom = tmp;\n drawBottom = true;\n drawTop = false;\n }\n }\n\n // clip\n if (right < axisx.min || left > axisx.max ||\n top < axisy.min || bottom > axisy.max)\n return;\n\n if (left < axisx.min) {\n left = axisx.min;\n drawLeft = false;\n }\n\n if (right > axisx.max) {\n right = axisx.max;\n drawRight = false;\n }\n\n if (bottom < axisy.min) {\n bottom = axisy.min;\n drawBottom = false;\n }\n\n if (top > axisy.max) {\n top = axisy.max;\n drawTop = false;\n }\n\n left = axisx.p2c(left);\n bottom = axisy.p2c(bottom);\n right = axisx.p2c(right);\n top = axisy.p2c(top);\n\n // fill the bar\n if (fillStyleCallback) {\n c.beginPath();\n c.moveTo(left, bottom);\n c.lineTo(left, top);\n c.lineTo(right, top);\n c.lineTo(right, bottom);\n c.fillStyle = fillStyleCallback(bottom, top);\n c.fill();\n }\n\n // draw outline\n if (lineWidth > 0 && (drawLeft || drawRight || drawTop || drawBottom)) {\n c.beginPath();\n\n // FIXME: inline moveTo is buggy with excanvas\n c.moveTo(left, bottom + offset);\n if (drawLeft)\n c.lineTo(left, top + offset);\n else\n c.moveTo(left, top + offset);\n if (drawTop)\n c.lineTo(right, top + offset);\n else\n c.moveTo(right, top + offset);\n if (drawRight)\n c.lineTo(right, bottom + offset);\n else\n c.moveTo(right, bottom + offset);\n if (drawBottom)\n c.lineTo(left, bottom + offset);\n else\n c.moveTo(left, bottom + offset);\n c.stroke();\n }\n }\n\n function drawSeriesBars(series) {\n function plotBars(datapoints, barLeft, barRight, offset, fillStyleCallback, axisx, axisy) {\n var points = datapoints.points, ps = datapoints.pointsize;\n\n for (var i = 0; i < points.length; i += ps) {\n if (points[i] == null)\n continue;\n drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, offset, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n // FIXME: figure out a way to add shadows (for instance along the right edge)\n ctx.lineWidth = series.bars.lineWidth;\n ctx.strokeStyle = series.color;\n\n var barLeft;\n\n switch (series.bars.align) {\n case \"left\":\n barLeft = 0;\n break;\n case \"right\":\n barLeft = -series.bars.barWidth;\n break;\n case \"center\":\n barLeft = -series.bars.barWidth / 2;\n break;\n default:\n throw new Error(\"Invalid bar alignment: \" + series.bars.align);\n }\n\n var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null;\n plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, 0, fillStyleCallback, series.xaxis, series.yaxis);\n ctx.restore();\n }\n\n function getFillStyle(filloptions, seriesColor, bottom, top) {\n var fill = filloptions.fill;\n if (!fill)\n return null;\n\n if (filloptions.fillColor)\n return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor);\n\n var c = $.color.parse(seriesColor);\n c.a = typeof fill == \"number\" ? fill : 0.4;\n c.normalize();\n return c.toString();\n }\n\n function insertLegend() {\n\n placeholder.find(\".legend\").remove();\n\n if (!options.legend.show)\n return;\n\n var fragments = [], entries = [], rowStarted = false,\n lf = options.legend.labelFormatter, s, label;\n\n // Build a list of legend entries, with each having a label and a color\n\n for (var i = 0; i < series.length; ++i) {\n s = series[i];\n if (s.label) {\n label = lf ? lf(s.label, s) : s.label;\n if (label) {\n entries.push({\n label: label,\n color: s.color\n });\n }\n }\n }\n\n // Sort the legend using either the default or a custom comparator\n\n if (options.legend.sorted) {\n if ($.isFunction(options.legend.sorted)) {\n entries.sort(options.legend.sorted);\n } else if (options.legend.sorted == \"reverse\") {\n \tentries.reverse();\n } else {\n var ascending = options.legend.sorted != \"descending\";\n entries.sort(function(a, b) {\n return a.label == b.label ? 0 : (\n (a.label < b.label) != ascending ? 1 : -1 // Logical XOR\n );\n });\n }\n }\n\n // Generate markup for the list of entries, in their final order\n\n for (var i = 0; i < entries.length; ++i) {\n\n var entry = entries[i];\n\n if (i % options.legend.noColumns == 0) {\n if (rowStarted)\n fragments.push('</tr>');\n fragments.push('<tr>');\n rowStarted = true;\n }\n\n fragments.push(\n '<td class=\"legendColorBox\"><div style=\"border:1px solid ' + options.legend.labelBoxBorderColor + ';padding:1px\"><div style=\"width:4px;height:0;border:5px solid ' + entry.color + ';overflow:hidden\"></div></div></td>' +\n '<td class=\"legendLabel\">' + entry.label + '</td>'\n );\n }\n\n if (rowStarted)\n fragments.push('</tr>');\n\n if (fragments.length == 0)\n return;\n\n var table = '<table style=\"font-size:smaller;color:' + options.grid.color + '\">' + fragments.join(\"\") + '</table>';\n if (options.legend.container != null)\n $(options.legend.container).html(table);\n else {\n var pos = \"\",\n p = options.legend.position,\n m = options.legend.margin;\n if (m[0] == null)\n m = [m, m];\n if (p.charAt(0) == \"n\")\n pos += 'top:' + (m[1] + plotOffset.top) + 'px;';\n else if (p.charAt(0) == \"s\")\n pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;';\n if (p.charAt(1) == \"e\")\n pos += 'right:' + (m[0] + plotOffset.right) + 'px;';\n else if (p.charAt(1) == \"w\")\n pos += 'left:' + (m[0] + plotOffset.left) + 'px;';\n var legend = $('<div class=\"legend\">' + table.replace('style=\"', 'style=\"position:absolute;' + pos +';') + '</div>').appendTo(placeholder);\n if (options.legend.backgroundOpacity != 0.0) {\n // put in the transparent background\n // separately to avoid blended labels and\n // label boxes\n var c = options.legend.backgroundColor;\n if (c == null) {\n c = options.grid.backgroundColor;\n if (c && typeof c == \"string\")\n c = $.color.parse(c);\n else\n c = $.color.extract(legend, 'background-color');\n c.a = 1;\n c = c.toString();\n }\n var div = legend.children();\n $('<div style=\"position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos +'background-color:' + c + ';\"> </div>').prependTo(legend).css('opacity', options.legend.backgroundOpacity);\n }\n }\n }\n\n\n // interactive features\n\n var highlights = [],\n redrawTimeout = null;\n\n // returns the data item the mouse is over, or null if none is found\n function findNearbyItem(mouseX, mouseY, seriesFilter) {\n var maxDistance = options.grid.mouseActiveRadius,\n smallestDistance = maxDistance * maxDistance + 1,\n item = null, foundPoint = false, i, j, ps;\n\n for (i = series.length - 1; i >= 0; --i) {\n if (!seriesFilter(series[i]))\n continue;\n\n var s = series[i],\n axisx = s.xaxis,\n axisy = s.yaxis,\n points = s.datapoints.points,\n mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster\n my = axisy.c2p(mouseY),\n maxx = maxDistance / axisx.scale,\n maxy = maxDistance / axisy.scale;\n\n ps = s.datapoints.pointsize;\n // with inverse transforms, we can't use the maxx/maxy\n // optimization, sadly\n if (axisx.options.inverseTransform)\n maxx = Number.MAX_VALUE;\n if (axisy.options.inverseTransform)\n maxy = Number.MAX_VALUE;\n\n if (s.lines.show || s.points.show) {\n for (j = 0; j < points.length; j += ps) {\n var x = points[j], y = points[j + 1];\n if (x == null)\n continue;\n\n // For points and lines, the cursor must be within a\n // certain distance to the data point\n if (x - mx > maxx || x - mx < -maxx ||\n y - my > maxy || y - my < -maxy)\n continue;\n\n // We have to calculate distances in pixels, not in\n // data units, because the scales of the axes may be different\n var dx = Math.abs(axisx.p2c(x) - mouseX),\n dy = Math.abs(axisy.p2c(y) - mouseY),\n dist = dx * dx + dy * dy; // we save the sqrt\n\n // use <= to ensure last point takes precedence\n // (last generally means on top of)\n if (dist < smallestDistance) {\n smallestDistance = dist;\n item = [i, j / ps];\n }\n }\n }\n\n if (s.bars.show && !item) { // no other point can be nearby\n var barLeft = s.bars.align == \"left\" ? 0 : -s.bars.barWidth/2,\n barRight = barLeft + s.bars.barWidth;\n\n for (j = 0; j < points.length; j += ps) {\n var x = points[j], y = points[j + 1], b = points[j + 2];\n if (x == null)\n continue;\n\n // for a bar graph, the cursor must be inside the bar\n if (series[i].bars.horizontal ?\n (mx <= Math.max(b, x) && mx >= Math.min(b, x) &&\n my >= y + barLeft && my <= y + barRight) :\n (mx >= x + barLeft && mx <= x + barRight &&\n my >= Math.min(b, y) && my <= Math.max(b, y)))\n item = [i, j / ps];\n }\n }\n }\n\n if (item) {\n i = item[0];\n j = item[1];\n ps = series[i].datapoints.pointsize;\n\n return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),\n dataIndex: j,\n series: series[i],\n seriesIndex: i };\n }\n\n return null;\n }\n\n function onMouseMove(e) {\n if (options.grid.hoverable)\n triggerClickHoverEvent(\"plothover\", e,\n function (s) { return s[\"hoverable\"] != false; });\n }\n\n function onMouseLeave(e) {\n if (options.grid.hoverable)\n triggerClickHoverEvent(\"plothover\", e,\n function (s) { return false; });\n }\n\n function onClick(e) {\n triggerClickHoverEvent(\"plotclick\", e,\n function (s) { return s[\"clickable\"] != false; });\n }\n\n // trigger click or hover event (they send the same parameters\n // so we share their code)\n function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }\n\n function triggerRedrawOverlay() {\n var t = options.interaction.redrawOverlayInterval;\n if (t == -1) { // skip event queue\n drawOverlay();\n return;\n }\n\n if (!redrawTimeout)\n redrawTimeout = setTimeout(drawOverlay, t);\n }\n\n function drawOverlay() {\n redrawTimeout = null;\n\n // draw highlights\n octx.save();\n octx.clearRect(0, 0, canvasWidth, canvasHeight);\n octx.translate(plotOffset.left, plotOffset.top);\n\n var i, hi;\n for (i = 0; i < highlights.length; ++i) {\n hi = highlights[i];\n\n if (hi.series.bars.show)\n drawBarHighlight(hi.series, hi.point);\n else\n drawPointHighlight(hi.series, hi.point);\n }\n octx.restore();\n\n executeHooks(hooks.drawOverlay, [octx]);\n }\n\n function highlight(s, point, auto) {\n if (typeof s == \"number\")\n s = series[s];\n\n if (typeof point == \"number\") {\n var ps = s.datapoints.pointsize;\n point = s.datapoints.points.slice(ps * point, ps * (point + 1));\n }\n\n var i = indexOfHighlight(s, point);\n if (i == -1) {\n highlights.push({ series: s, point: point, auto: auto });\n\n triggerRedrawOverlay();\n }\n else if (!auto)\n highlights[i].auto = false;\n }\n\n function unhighlight(s, point) {\n if (s == null && point == null) {\n highlights = [];\n triggerRedrawOverlay();\n }\n\n if (typeof s == \"number\")\n s = series[s];\n\n if (typeof point == \"number\")\n point = s.data[point];\n\n var i = indexOfHighlight(s, point);\n if (i != -1) {\n highlights.splice(i, 1);\n\n triggerRedrawOverlay();\n }\n }\n\n function indexOfHighlight(s, p) {\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.series == s && h.point[0] == p[0]\n && h.point[1] == p[1])\n return i;\n }\n return -1;\n }\n\n function drawPointHighlight(series, point) {\n var x = point[0], y = point[1],\n axisx = series.xaxis, axisy = series.yaxis,\n highlightColor = (typeof series.highlightColor === \"string\") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString();\n\n if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)\n return;\n\n var pointRadius = series.points.radius + series.points.lineWidth / 2;\n octx.lineWidth = pointRadius;\n octx.strokeStyle = highlightColor;\n var radius = 1.5 * pointRadius;\n x = axisx.p2c(x);\n y = axisy.p2c(y);\n\n octx.beginPath();\n if (series.points.symbol == \"circle\")\n octx.arc(x, y, radius, 0, 2 * Math.PI, false);\n else\n series.points.symbol(octx, x, y, radius, false);\n octx.closePath();\n octx.stroke();\n }\n\n function drawBarHighlight(series, point) {\n var highlightColor = (typeof series.highlightColor === \"string\") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString(),\n fillStyle = highlightColor,\n barLeft = series.bars.align == \"left\" ? 0 : -series.bars.barWidth/2;\n\n octx.lineWidth = series.bars.lineWidth;\n octx.strokeStyle = highlightColor;\n\n drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth,\n 0, function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth);\n }\n\n function getColorOrGradient(spec, bottom, top, defaultColor) {\n if (typeof spec == \"string\")\n return spec;\n else {\n // assume this is a gradient spec; IE currently only\n // supports a simple vertical gradient properly, so that's\n // what we support too\n var gradient = ctx.createLinearGradient(0, top, 0, bottom);\n\n for (var i = 0, l = spec.colors.length; i < l; ++i) {\n var c = spec.colors[i];\n if (typeof c != \"string\") {\n var co = $.color.parse(defaultColor);\n if (c.brightness != null)\n co = co.scale('rgb', c.brightness);\n if (c.opacity != null)\n co.a *= c.opacity;\n c = co.toString();\n }\n gradient.addColorStop(i / (l - 1), c);\n }\n\n return gradient;\n }\n }\n }\n\n // Add the plot function to the top level of the jQuery object\n\n $.plot = function(placeholder, data, options) {\n //var t0 = new Date();\n var plot = new Plot($(placeholder), data, options, $.plot.plugins);\n //(window.console ? console.log : alert)(\"time used (msecs): \" + ((new Date()).getTime() - t0.getTime()));\n return plot;\n };\n\n $.plot.version = \"0.8-alpha\";\n\n $.plot.plugins = [];\n\n // Also add the plot function as a chainable property\n\n $.fn.plot = function(data, options) {\n return this.each(function() {\n $.plot(this, data, options);\n });\n }\n\n // round to nearby lower multiple of base\n function floorInBase(n, base) {\n return base * Math.floor(n / base);\n }\n\n})(jQuery);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/flot/jquery.flot.js\n// module id = 21\n// module chunks = 1","/*\r\n * Flot plugin to order bars side by side.\r\n *\r\n * Released under the MIT license by Benjamin BUFFET, 20-Sep-2010.\r\n * Modifications made by Steven Hall <github.com/emmerich>, 01-May-2013.\r\n *\r\n * This plugin is an alpha version.\r\n *\r\n * To activate the plugin you must specify the parameter \"order\" for the specific serie :\r\n *\r\n * $.plot($(\"#placeholder\"), [{ data: [ ... ], bars :{ order = null or integer }])\r\n *\r\n * If 2 series have the same order param, they are ordered by the position in the array;\r\n *\r\n * The plugin adjust the point by adding a value depanding of the barwidth\r\n * Exemple for 3 series (barwidth : 0.1) :\r\n *\r\n * first bar décalage : -0.15\r\n * second bar décalage : -0.05\r\n * third bar décalage : 0.05\r\n *\r\n */\r\n\r\n// INFO: decalage/decallage is French for gap. It's used to denote the spacing applied to each\r\n// bar.\r\n(function($){\r\n function init(plot){\r\n var orderedBarSeries;\r\n var nbOfBarsToOrder;\r\n var borderWidth;\r\n var borderWidthInXabsWidth;\r\n var pixelInXWidthEquivalent = 1;\r\n var isHorizontal = false;\r\n\r\n // A mapping of order integers to decallage.\r\n var decallageByOrder = {};\r\n\r\n /*\r\n * This method add shift to x values\r\n */\r\n function reOrderBars(plot, serie, datapoints){\r\n var shiftedPoints = null;\r\n\r\n if(serieNeedToBeReordered(serie)){\r\n checkIfGraphIsHorizontal(serie);\r\n calculPixel2XWidthConvert(plot);\r\n retrieveBarSeries(plot);\r\n calculBorderAndBarWidth(serie);\r\n\r\n if(nbOfBarsToOrder >= 2){\r\n var position = findPosition(serie);\r\n var decallage = 0;\r\n\r\n var centerBarShift = calculCenterBarShift();\r\n\r\n // If we haven't already calculated the decallage for this order value, do it.\r\n if(typeof decallageByOrder[serie.bars.order] === 'undefined') {\r\n if (isBarAtLeftOfCenter(position)){\r\n decallageByOrder[serie.bars.order] = -1*(sumWidth(orderedBarSeries,position-1,Math.floor(nbOfBarsToOrder / 2)-1)) - centerBarShift;\r\n }else{\r\n decallageByOrder[serie.bars.order] = sumWidth(orderedBarSeries,Math.ceil(nbOfBarsToOrder / 2),position-2) + centerBarShift + borderWidthInXabsWidth*2;\r\n }\r\n }\r\n\r\n // Lookup the decallage based on the series' order value.\r\n decallage = decallageByOrder[serie.bars.order];\r\n\r\n shiftedPoints = shiftPoints(datapoints,serie,decallage);\r\n datapoints.points = shiftedPoints;\r\n }\r\n }\r\n return shiftedPoints;\r\n }\r\n\r\n function serieNeedToBeReordered(serie){\r\n return serie.bars != null\r\n && serie.bars.show\r\n && serie.bars.order != null;\r\n }\r\n\r\n function calculPixel2XWidthConvert(plot){\r\n var gridDimSize = isHorizontal ? plot.getPlaceholder().innerHeight() : plot.getPlaceholder().innerWidth();\r\n var minMaxValues = isHorizontal ? getAxeMinMaxValues(plot.getData(),1) : getAxeMinMaxValues(plot.getData(),0);\r\n var AxeSize = minMaxValues[1] - minMaxValues[0];\r\n pixelInXWidthEquivalent = AxeSize / gridDimSize;\r\n }\r\n\r\n function getAxeMinMaxValues(series,AxeIdx){\r\n var minMaxValues = new Array();\r\n for(var i = 0; i < series.length; i++){\r\n minMaxValues[0] = (series[i].data[0]) ? series[i].data[0][AxeIdx]: null;\r\n minMaxValues[1] = (series[i].data[series[i].data.length - 1]) ? series[i].data[series[i].data.length - 1][AxeIdx]: null;\r\n }\r\n return minMaxValues;\r\n }\r\n\r\n function retrieveBarSeries(plot){\r\n orderedBarSeries = findOthersBarsToReOrders(plot.getData());\r\n nbOfBarsToOrder = orderedBarSeries.length;\r\n }\r\n\r\n function findOthersBarsToReOrders(series){\r\n var retSeries = new Array();\r\n var orderValuesSeen = [];\r\n\r\n for(var i = 0; i < series.length; i++){\r\n if(series[i].bars.order != null && series[i].bars.show &&\r\n orderValuesSeen.indexOf(series[i].bars.order) < 0){\r\n\r\n orderValuesSeen.push(series[i].bars.order);\r\n retSeries.push(series[i]);\r\n }\r\n }\r\n return retSeries.sort(sortByOrder);\r\n }\r\n\r\n function sortByOrder(serie1,serie2){\r\n var x = serie1.bars.order;\r\n var y = serie2.bars.order;\r\n return ((x < y) ? -1 : ((x > y) ? 1 : 0));\r\n }\r\n\r\n function calculBorderAndBarWidth(serie){\r\n borderWidth = typeof serie.bars.lineWidth !== 'undefined' ? serie.bars.lineWidth : 2;\r\n borderWidthInXabsWidth = borderWidth * pixelInXWidthEquivalent;\r\n }\r\n\r\n function checkIfGraphIsHorizontal(serie){\r\n if(serie.bars.horizontal){\r\n isHorizontal = true;\r\n }\r\n }\r\n\r\n function findPosition(serie){\r\n var pos = 0\r\n for (var i = 0; i < orderedBarSeries.length; ++i) {\r\n if (serie == orderedBarSeries[i]){\r\n pos = i;\r\n break;\r\n }\r\n }\r\n\r\n return pos+1;\r\n }\r\n\r\n function calculCenterBarShift(){\r\n var width = 0;\r\n\r\n if(nbOfBarsToOrder%2 != 0)\r\n width = (orderedBarSeries[Math.ceil(nbOfBarsToOrder / 2)].bars.barWidth)/2;\r\n\r\n return width;\r\n }\r\n\r\n function isBarAtLeftOfCenter(position){\r\n return position <= Math.ceil(nbOfBarsToOrder / 2);\r\n }\r\n\r\n function sumWidth(series,start,end){\r\n var totalWidth = 0;\r\n\r\n for(var i = start; i <= end; i++){\r\n totalWidth += series[i].bars.barWidth+borderWidthInXabsWidth*2;\r\n }\r\n\r\n return totalWidth;\r\n }\r\n\r\n function shiftPoints(datapoints,serie,dx){\r\n var ps = datapoints.pointsize;\r\n var points = datapoints.points;\r\n var j = 0;\r\n for(var i = isHorizontal ? 1 : 0;i < points.length; i += ps){\r\n points[i] += dx;\r\n //Adding the new x value in the serie to be abble to display the right tooltip value,\r\n //using the index 3 to not overide the third index.\r\n serie.data[j][3] = points[i];\r\n j++;\r\n }\r\n\r\n return points;\r\n }\r\n\r\n plot.hooks.processDatapoints.push(reOrderBars);\r\n\r\n }\r\n\r\n var options = {\r\n series : {\r\n bars: {order: null} // or number/string\r\n }\r\n };\r\n\r\n $.plot.plugins.push({\r\n init: init,\r\n options: options,\r\n name: \"orderBars\",\r\n version: \"0.2\"\r\n });\r\n\r\n})(jQuery);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/flot-orderbars/js/jquery.flot.orderBars.js\n// module id = 22\n// module chunks = 1","/* Pretty handling of time axes.\n\nCopyright (c) 2007-2012 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\nSet axis.mode to \"time\" to enable. See the section \"Time series data\" in\nAPI.txt for details.\n\n*/\n\n(function($) {\n\n\tvar options = {};\n\n\t// round to nearby lower multiple of base\n\n\tfunction floorInBase(n, base) {\n\t\treturn base * Math.floor(n / base);\n\t}\n\n\t// Returns a string with the date d formatted according to fmt.\n\t// A subset of the Open Group's strftime format is supported.\n\n\tfunction formatDate(d, fmt, monthNames, dayNames) {\n\n\t\tif (typeof d.strftime == \"function\") {\n\t\t\treturn d.strftime(fmt);\n\t\t}\n\n\t\tvar leftPad = function(n, pad) {\n\t\t\tn = \"\" + n;\n\t\t\tpad = \"\" + (pad == null ? \"0\" : pad);\n\t\t\treturn n.length == 1 ? pad + n : n;\n\t\t};\n\n\t\tvar r = [];\n\t\tvar escape = false;\n\t\tvar hours = d.getHours();\n\t\tvar isAM = hours < 12;\n\n\t\tif (monthNames == null) {\n\t\t\tmonthNames = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\t\t}\n\n\t\tif (dayNames == null) {\n\t\t\tdayNames = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\t\t}\n\n\t\tvar hours12;\n\n\t\tif (hours > 12) {\n\t\t\thours12 = hours - 12;\n\t\t} else if (hours == 0) {\n\t\t\thours12 = 12;\n\t\t} else {\n\t\t\thours12 = hours;\n\t\t}\n\n\t\tfor (var i = 0; i < fmt.length; ++i) {\n\n\t\t\tvar c = fmt.charAt(i);\n\n\t\t\tif (escape) {\n\t\t\t\tswitch (c) {\n\t\t\t\t\tcase 'a': c = \"\" + dayNames[d.getDay()]; break;\n\t\t\t\t\tcase 'b': c = \"\" + monthNames[d.getMonth()]; break;\n\t\t\t\t\tcase 'd': c = leftPad(d.getDate()); break;\n\t\t\t\t\tcase 'e': c = leftPad(d.getDate(), \" \"); break;\n\t\t\t\t\tcase 'H': c = leftPad(hours); break;\n\t\t\t\t\tcase 'I': c = leftPad(hours12); break;\n\t\t\t\t\tcase 'l': c = leftPad(hours12, \" \"); break;\n\t\t\t\t\tcase 'm': c = leftPad(d.getMonth() + 1); break;\n\t\t\t\t\tcase 'M': c = leftPad(d.getMinutes()); break;\n\t\t\t\t\t// quarters not in Open Group's strftime specification\n\t\t\t\t\tcase 'q':\n\t\t\t\t\t\tc = \"\" + (Math.floor(d.getMonth() / 3) + 1); break;\n\t\t\t\t\tcase 'S': c = leftPad(d.getSeconds()); break;\n\t\t\t\t\tcase 'y': c = leftPad(d.getFullYear() % 100); break;\n\t\t\t\t\tcase 'Y': c = \"\" + d.getFullYear(); break;\n\t\t\t\t\tcase 'p': c = (isAM) ? (\"\" + \"am\") : (\"\" + \"pm\"); break;\n\t\t\t\t\tcase 'P': c = (isAM) ? (\"\" + \"AM\") : (\"\" + \"PM\"); break;\n\t\t\t\t\tcase 'w': c = \"\" + d.getDay(); break;\n\t\t\t\t}\n\t\t\t\tr.push(c);\n\t\t\t\tescape = false;\n\t\t\t} else {\n\t\t\t\tif (c == \"%\") {\n\t\t\t\t\tescape = true;\n\t\t\t\t} else {\n\t\t\t\t\tr.push(c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn r.join(\"\");\n\t}\n\n\t// To have a consistent view of time-based data independent of which time\n\t// zone the client happens to be in we need a date-like object independent\n\t// of time zones. This is done through a wrapper that only calls the UTC\n\t// versions of the accessor methods.\n\n\tfunction makeUtcWrapper(d) {\n\n\t\tfunction addProxyMethod(sourceObj, sourceMethod, targetObj, targetMethod) {\n\t\t\tsourceObj[sourceMethod] = function() {\n\t\t\t\treturn targetObj[targetMethod].apply(targetObj, arguments);\n\t\t\t};\n\t\t};\n\n\t\tvar utc = {\n\t\t\tdate: d\n\t\t};\n\n\t\t// support strftime, if found\n\n\t\tif (d.strftime != undefined) {\n\t\t\taddProxyMethod(utc, \"strftime\", d, \"strftime\");\n\t\t}\n\n\t\taddProxyMethod(utc, \"getTime\", d, \"getTime\");\n\t\taddProxyMethod(utc, \"setTime\", d, \"setTime\");\n\n\t\tvar props = [\"Date\", \"Day\", \"FullYear\", \"Hours\", \"Milliseconds\", \"Minutes\", \"Month\", \"Seconds\"];\n\n\t\tfor (var p = 0; p < props.length; p++) {\n\t\t\taddProxyMethod(utc, \"get\" + props[p], d, \"getUTC\" + props[p]);\n\t\t\taddProxyMethod(utc, \"set\" + props[p], d, \"setUTC\" + props[p]);\n\t\t}\n\n\t\treturn utc;\n\t};\n\n\t// select time zone strategy. This returns a date-like object tied to the\n\t// desired timezone\n\n\tfunction dateGenerator(ts, opts) {\n\t\tif (opts.timezone == \"browser\") {\n\t\t\treturn new Date(ts);\n\t\t} else if (!opts.timezone || opts.timezone == \"utc\") {\n\t\t\treturn makeUtcWrapper(new Date(ts));\n\t\t} else if (typeof timezoneJS != \"undefined\" && typeof timezoneJS.Date != \"undefined\") {\n\t\t\tvar d = new timezoneJS.Date();\n\t\t\t// timezone-js is fickle, so be sure to set the time zone before\n\t\t\t// setting the time.\n\t\t\td.setTimezone(opts.timezone);\n\t\t\td.setTime(ts);\n\t\t\treturn d;\n\t\t} else {\n\t\t\treturn makeUtcWrapper(new Date(ts));\n\t\t}\n\t}\n\t\n\t// map of app. size of time units in milliseconds\n\n\tvar timeUnitSize = {\n\t\t\"second\": 1000,\n\t\t\"minute\": 60 * 1000,\n\t\t\"hour\": 60 * 60 * 1000,\n\t\t\"day\": 24 * 60 * 60 * 1000,\n\t\t\"month\": 30 * 24 * 60 * 60 * 1000,\n\t\t\"quarter\": 3 * 30 * 24 * 60 * 60 * 1000,\n\t\t\"year\": 365.2425 * 24 * 60 * 60 * 1000\n\t};\n\n\t// the allowed tick sizes, after 1 year we use\n\t// an integer algorithm\n\n\tvar baseSpec = [\n\t\t[1, \"second\"], [2, \"second\"], [5, \"second\"], [10, \"second\"],\n\t\t[30, \"second\"], \n\t\t[1, \"minute\"], [2, \"minute\"], [5, \"minute\"], [10, \"minute\"],\n\t\t[30, \"minute\"], \n\t\t[1, \"hour\"], [2, \"hour\"], [4, \"hour\"],\n\t\t[8, \"hour\"], [12, \"hour\"],\n\t\t[1, \"day\"], [2, \"day\"], [3, \"day\"],\n\t\t[0.25, \"month\"], [0.5, \"month\"], [1, \"month\"],\n\t\t[2, \"month\"]\n\t];\n\n\t// we don't know which variant(s) we'll need yet, but generating both is\n\t// cheap\n\n\tvar specMonths = baseSpec.concat([[3, \"month\"], [6, \"month\"],\n\t\t[1, \"year\"]]);\n\tvar specQuarters = baseSpec.concat([[1, \"quarter\"], [2, \"quarter\"],\n\t\t[1, \"year\"]]);\n\n\tfunction init(plot) {\n\t\tplot.hooks.processDatapoints.push(function (plot, series, datapoints) {\n\t\t\t$.each(plot.getAxes(), function(axisName, axis) {\n\n\t\t\t\tvar opts = axis.options;\n\n\t\t\t\tif (opts.mode == \"time\") {\n\t\t\t\t\taxis.tickGenerator = function(axis) {\n\n\t\t\t\t\t\tvar ticks = [];\n\t\t\t\t\t\tvar d = dateGenerator(axis.min, opts);\n\t\t\t\t\t\tvar minSize = 0;\n\n\t\t\t\t\t\t// make quarter use a possibility if quarters are\n\t\t\t\t\t\t// mentioned in either of these options\n\n\t\t\t\t\t\tvar spec = (opts.tickSize && opts.tickSize[1] ===\n\t\t\t\t\t\t\t\"quarter\") ||\n\t\t\t\t\t\t\t(opts.minTickSize && opts.minTickSize[1] ===\n\t\t\t\t\t\t\t\"quarter\") ? specQuarters : specMonths;\n\n\t\t\t\t\t\tif (opts.minTickSize != null) {\n\t\t\t\t\t\t\tif (typeof opts.tickSize == \"number\") {\n\t\t\t\t\t\t\t\tminSize = opts.tickSize;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tminSize = opts.minTickSize[0] * timeUnitSize[opts.minTickSize[1]];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (var i = 0; i < spec.length - 1; ++i) {\n\t\t\t\t\t\t\tif (axis.delta < (spec[i][0] * timeUnitSize[spec[i][1]]\n\t\t\t\t\t\t\t\t\t\t\t + spec[i + 1][0] * timeUnitSize[spec[i + 1][1]]) / 2\n\t\t\t\t\t\t\t\t&& spec[i][0] * timeUnitSize[spec[i][1]] >= minSize) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar size = spec[i][0];\n\t\t\t\t\t\tvar unit = spec[i][1];\n\n\t\t\t\t\t\t// special-case the possibility of several years\n\n\t\t\t\t\t\tif (unit == \"year\") {\n\n\t\t\t\t\t\t\t// if given a minTickSize in years, just use it,\n\t\t\t\t\t\t\t// ensuring that it's an integer\n\n\t\t\t\t\t\t\tif (opts.minTickSize != null && opts.minTickSize[1] == \"year\") {\n\t\t\t\t\t\t\t\tsize = Math.floor(opts.minTickSize[0]);\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tvar magn = Math.pow(10, Math.floor(Math.log(axis.delta / timeUnitSize.year) / Math.LN10));\n\t\t\t\t\t\t\t\tvar norm = (axis.delta / timeUnitSize.year) / magn;\n\n\t\t\t\t\t\t\t\tif (norm < 1.5) {\n\t\t\t\t\t\t\t\t\tsize = 1;\n\t\t\t\t\t\t\t\t} else if (norm < 3) {\n\t\t\t\t\t\t\t\t\tsize = 2;\n\t\t\t\t\t\t\t\t} else if (norm < 7.5) {\n\t\t\t\t\t\t\t\t\tsize = 5;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsize = 10;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tsize *= magn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// minimum size for years is 1\n\n\t\t\t\t\t\t\tif (size < 1) {\n\t\t\t\t\t\t\t\tsize = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\taxis.tickSize = opts.tickSize || [size, unit];\n\t\t\t\t\t\tvar tickSize = axis.tickSize[0];\n\t\t\t\t\t\tunit = axis.tickSize[1];\n\n\t\t\t\t\t\tvar step = tickSize * timeUnitSize[unit];\n\n\t\t\t\t\t\tif (unit == \"second\") {\n\t\t\t\t\t\t\td.setSeconds(floorInBase(d.getSeconds(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"minute\") {\n\t\t\t\t\t\t\td.setMinutes(floorInBase(d.getMinutes(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"hour\") {\n\t\t\t\t\t\t\td.setHours(floorInBase(d.getHours(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"month\") {\n\t\t\t\t\t\t\td.setMonth(floorInBase(d.getMonth(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"quarter\") {\n\t\t\t\t\t\t\td.setMonth(3 * floorInBase(d.getMonth() / 3,\n\t\t\t\t\t\t\t\ttickSize));\n\t\t\t\t\t\t} else if (unit == \"year\") {\n\t\t\t\t\t\t\td.setFullYear(floorInBase(d.getFullYear(), tickSize));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// reset smaller components\n\n\t\t\t\t\t\td.setMilliseconds(0);\n\n\t\t\t\t\t\tif (step >= timeUnitSize.minute) {\n\t\t\t\t\t\t\td.setSeconds(0);\n\t\t\t\t\t\t} else if (step >= timeUnitSize.hour) {\n\t\t\t\t\t\t\td.setMinutes(0);\n\t\t\t\t\t\t} else if (step >= timeUnitSize.day) {\n\t\t\t\t\t\t\td.setHours(0);\n\t\t\t\t\t\t} else if (step >= timeUnitSize.day * 4) {\n\t\t\t\t\t\t\td.setDate(1);\n\t\t\t\t\t\t} else if (step >= timeUnitSize.month * 2) {\n\t\t\t\t\t\t\td.setMonth(floorInBase(d.getMonth(), 3));\n\t\t\t\t\t\t} else if (step >= timeUnitSize.quarter * 2) {\n\t\t\t\t\t\t\td.setMonth(floorInBase(d.getMonth(), 6));\n\t\t\t\t\t\t} else if (step >= timeUnitSize.year) {\n\t\t\t\t\t\t\td.setMonth(0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar carry = 0;\n\t\t\t\t\t\tvar v = Number.NaN;\n\t\t\t\t\t\tvar prev;\n\n\t\t\t\t\t\tdo {\n\n\t\t\t\t\t\t\tprev = v;\n\t\t\t\t\t\t\tv = d.getTime();\n\t\t\t\t\t\t\tticks.push(v);\n\n\t\t\t\t\t\t\tif (unit == \"month\" || unit == \"quarter\") {\n\t\t\t\t\t\t\t\tif (tickSize < 1) {\n\n\t\t\t\t\t\t\t\t\t// a bit complicated - we'll divide the\n\t\t\t\t\t\t\t\t\t// month/quarter up but we need to take\n\t\t\t\t\t\t\t\t\t// care of fractions so we don't end up in\n\t\t\t\t\t\t\t\t\t// the middle of a day\n\n\t\t\t\t\t\t\t\t\td.setDate(1);\n\t\t\t\t\t\t\t\t\tvar start = d.getTime();\n\t\t\t\t\t\t\t\t\td.setMonth(d.getMonth() +\n\t\t\t\t\t\t\t\t\t\t(unit == \"quarter\" ? 3 : 1));\n\t\t\t\t\t\t\t\t\tvar end = d.getTime();\n\t\t\t\t\t\t\t\t\td.setTime(v + carry * timeUnitSize.hour + (end - start) * tickSize);\n\t\t\t\t\t\t\t\t\tcarry = d.getHours();\n\t\t\t\t\t\t\t\t\td.setHours(0);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\td.setMonth(d.getMonth() +\n\t\t\t\t\t\t\t\t\t\ttickSize * (unit == \"quarter\" ? 3 : 1));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (unit == \"year\") {\n\t\t\t\t\t\t\t\td.setFullYear(d.getFullYear() + tickSize);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\td.setTime(v + step);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (v < axis.max && v != prev);\n\n\t\t\t\t\t\treturn ticks;\n\t\t\t\t\t};\n\n\t\t\t\t\taxis.tickFormatter = function (v, axis) {\n\n\t\t\t\t\t\tvar d = dateGenerator(v, axis.options);\n\n\t\t\t\t\t\t// first check global format\n\n\t\t\t\t\t\tif (opts.timeformat != null) {\n\t\t\t\t\t\t\treturn formatDate(d, opts.timeformat, opts.monthNames, opts.dayNames);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// possibly use quarters if quarters are mentioned in\n\t\t\t\t\t\t// any of these places\n\n\t\t\t\t\t\tvar useQuarters = (axis.options.tickSize &&\n\t\t\t\t\t\t\t\taxis.options.tickSize[1] == \"quarter\") ||\n\t\t\t\t\t\t\t(axis.options.minTickSize &&\n\t\t\t\t\t\t\t\taxis.options.minTickSize[1] == \"quarter\");\n\n\t\t\t\t\t\tvar t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]];\n\t\t\t\t\t\tvar span = axis.max - axis.min;\n\t\t\t\t\t\tvar suffix = (opts.twelveHourClock) ? \" %p\" : \"\";\n\t\t\t\t\t\tvar hourCode = (opts.twelveHourClock) ? \"%I\" : \"%H\";\n\t\t\t\t\t\tvar fmt;\n\n\t\t\t\t\t\tif (t < timeUnitSize.minute) {\n\t\t\t\t\t\t\tfmt = hourCode + \":%M:%S\" + suffix;\n\t\t\t\t\t\t} else if (t < timeUnitSize.day) {\n\t\t\t\t\t\t\tif (span < 2 * timeUnitSize.day) {\n\t\t\t\t\t\t\t\tfmt = hourCode + \":%M\" + suffix;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfmt = \"%b %d \" + hourCode + \":%M\" + suffix;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (t < timeUnitSize.month) {\n\t\t\t\t\t\t\tfmt = \"%b %d\";\n\t\t\t\t\t\t} else if ((useQuarters && t < timeUnitSize.quarter) ||\n\t\t\t\t\t\t\t(!useQuarters && t < timeUnitSize.year)) {\n\t\t\t\t\t\t\tif (span < timeUnitSize.year) {\n\t\t\t\t\t\t\t\tfmt = \"%b\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfmt = \"%b %Y\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (useQuarters && t < timeUnitSize.year) {\n\t\t\t\t\t\t\tif (span < timeUnitSize.year) {\n\t\t\t\t\t\t\t\tfmt = \"Q%q\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfmt = \"Q%q %Y\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfmt = \"%Y\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar rt = formatDate(d, fmt, opts.monthNames, opts.dayNames);\n\n\t\t\t\t\t\treturn rt;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t$.plot.plugins.push({\n\t\tinit: init,\n\t\toptions: options,\n\t\tname: 'time',\n\t\tversion: '1.0'\n\t});\n\n\t// Time-axis support used to be in Flot core, which exposed the\n\t// formatDate function on the plot object. Various plugins depend\n\t// on the function, so we need to re-expose it here.\n\n\t$.plot.formatDate = formatDate;\n\n})(jQuery);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/flot/jquery.flot.time.js\n// module id = 23\n// module chunks = 1","/**\n * Note: This script is under development. We are using this inside core only and can be update in future.\n */\n( function( $ ) {\n\t'use strict';\n\n\t$.extend({\n\t\tgiveAjaxifyFields: function( customSettings ) {\n\t\t\tvar $countryField,\n\t\t\t\t$parentWrapper,\n\t\t\t\tdefaultSettings = {\n\n\t\t\t\t\t// Supported types: country_state.\n\t\t\t\t\ttype: '',\n\n\t\t\t\t\t// Define these setting only if type set to country_state.\n\t\t\t\t\tparentWrapper: 'form',\n\t\t\t\t\tcountryFieldName: 'country',\n\t\t\t\t\tstateFieldName: 'state',\n\t\t\t\t\tstateFieldWrapper: '.give-field-wrap',\n\t\t\t\t\tchosenState: true\n\t\t\t\t};\n\n\t\t\tvar settings = $.extend( {}, defaultSettings, ( customSettings || {} ) );\n\n\t\t\tswitch ( settings.type ) {\n\t\t\t\tcase 'country_state':\n\t\t\t\t\t$countryField = $( 'select[name=\"' + settings.countryFieldName + '\"]' );\n\t\t\t\t\t$parentWrapper = $countryField.closest( settings.parentWrapper );\n\n\t\t\t\t\t// Bailout.\n\t\t\t\t\tif(\n\t\t\t\t\t\t! $countryField.length ||\n\t\t\t\t\t\t'Country_state' === $countryField.data( 'give-ajaxify-field' )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set data attribute.\n\t\t\t\t\t$countryField.data( 'give-ajaxify-field', 'country_state' );\n\n\t\t\t\t\t// Update base state field based on selected base country\n\t\t\t\t\t$countryField.change( function() {\n\t\t\t\t\t\tvar $this = $(this),\n\t\t\t\t\t\t\t$stateField = $this.closest( settings.parentWrapper )\n\t\t\t\t\t\t\t\t.find( '[name=\"' + settings.stateFieldName + '\"]' ),\n\t\t\t\t\t\t\t$stateFieldWrapper = $stateField.closest(settings.stateFieldWrapper),\n\t\t\t\t\t\t\t$stateFieldLabel = $( 'label', $stateFieldWrapper );\n\n\t\t\t\t\t\t// If state does not has wrapper then find it's label\n\t\t\t\t\t\tif( ! settings.stateFieldWrapper ) {\n\t\t\t\t\t\t\t$stateFieldLabel = $( 'label[for=\"' + settings.stateFieldName + '\"]', $parentWrapper );\n\t\t\t\t\t\t\t$stateFieldWrapper = $stateField.parent();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\taction: 'give_get_states',\n\t\t\t\t\t\t\tcountry: $this.val(),\n\t\t\t\t\t\t\tfield_name: settings.stateFieldName\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t$.post( ajaxurl, data, function ( response ) {\n\n\t\t\t\t\t\t\t// Bailout.\n\t\t\t\t\t\t\tif ( ! response.show_field ) {\n\t\t\t\t\t\t\t\tif( settings.stateFieldWrapper ) {\n\t\t\t\t\t\t\t\t\t$stateFieldWrapper.addClass('give-hidden');\n\t\t\t\t\t\t\t\t} else{\n\t\t\t\t\t\t\t\t\t$stateField.addClass('give-hidden');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif( $stateFieldLabel.length ){\n\t\t\t\t\t\t\t\t$stateFieldLabel.text( response.states_label );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif( settings.chosenState ) {\n\t\t\t\t\t\t\t\t$stateField.chosen( 'destroy' );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Show field.\n\t\t\t\t\t\t\tif( settings.stateFieldWrapper ) {\n\t\t\t\t\t\t\t\t$stateFieldWrapper.removeClass('give-hidden');\n\t\t\t\t\t\t\t} else{\n\t\t\t\t\t\t\t\t$stateField.removeClass('give-hidden');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\ttypeof ( response.states_found ) !== undefined &&\n\t\t\t\t\t\t\t\ttrue === response.states_found\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// Update html.\n\t\t\t\t\t\t\t\t$stateField.replaceWith(response.data);\n\n\t\t\t\t\t\t\t\t// Update selector.\n\t\t\t\t\t\t\t\t$stateField = $('[name=\"' + settings.stateFieldName + '\"]', $stateFieldWrapper );\n\n\t\t\t\t\t\t\t\t// Reset chosenState\n\t\t\t\t\t\t\t\tif( settings.chosenState ) {\n\t\t\t\t\t\t\t\t\t$stateField.chosen();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$stateField.replaceWith('<input type=\"text\" name=\"' + settings.stateFieldName + '\" value=\"' + response.default_state + '\" class=\"medium-text\"/>');\n\n\t\t\t\t\t\t\t\t// Update selector.\n\t\t\t\t\t\t\t\t$stateField = $('[name=\"' + settings.stateFieldName + '\"]', $stateFieldWrapper );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n})( jQuery );\n\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/plugins/give-ajaxify-fields.js","const Give_Selector_Cache = {\n\tcollection: {},\n\n\tget: function( selector, parent, refresh_cache ) {\n\t\t// Bailout.\n\t\tif ( ! jQuery ) {\n\t\t\treturn - 1;\n\t\t}\n\n\t\t// Set default parent.\n\t\tparent = (undefined !== parent) ? parent : undefined;\n\t\trefresh_cache = (refresh_cache === true);\n\n\t\tif ( (undefined === this.collection[ selector ]) || refresh_cache ) {\n\t\t\tif ( undefined !== parent ) {\n\t\t\t\tthis.collection[ selector ] = jQuery( selector, parent );\n\t\t\t} else {\n\t\t\t\tthis.collection[ selector ] = jQuery( selector );\n\t\t\t}\n\t\t}\n\n\t\treturn this.collection[ selector ];\n\t}\n};\n\nwindow.Give_Selector_Cache = Give_Selector_Cache;\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/plugins/selector-cache.js","/*\n * jQuery Repeatable Fields v1.4.8\n * http://www.rhyzz.com/repeatable-fields.html\n *\n * Copyright (c) 2014-2015 Rhyzz\n * License MIT\n */\n\n(function ($) {\n\t$.fn.repeatable_fields = function (custom_settings) {\n\t\tvar default_settings = {\n\t\t\twrapper : '.wrapper',\n\t\t\tcontainer : '.container',\n\t\t\trow : '.row',\n\t\t\tadd : '.add',\n\t\t\tremove : '.remove',\n\t\t\tconfirm_before_remove_row : false,\n\t\t\tconfirm_before_remove_row_text: '',\n\t\t\tmove : '.move',\n\t\t\ttemplate : '.template',\n\t\t\tis_sortable : true,\n\t\t\tbefore_add : null,\n\t\t\tafter_add : after_add,\n\t\t\tbefore_remove : null,\n\t\t\tafter_remove : null,\n\t\t\tsortable_options : null,\n\t\t\trow_count_placeholder : '{{row-count-placeholder}}',\n\t\t}\n\n\t\tvar settings = $.extend({}, default_settings, custom_settings);\n\n\t\t// Initialize all repeatable field wrappers\n\t\tinitialize(this);\n\n\t\tfunction initialize(parent) {\n\t\t\t$(settings.wrapper, parent).each(function (index, element) {\n\t\t\t\tvar wrapper = this;\n\n\t\t\t\tvar container = $(wrapper).children(settings.container);\n\n\t\t\t\t// Disable all form elements inside the row template\n\t\t\t\t$(container).children(settings.template).hide().find(':input').each(function () {\n\t\t\t\t\t$(this).prop('disabled', true);\n\t\t\t\t});\n\n\t\t\t\tvar row_count = $(container).children(settings.row).filter(function () {\n\t\t\t\t\treturn !$(this).hasClass(settings.template.replace('.', ''));\n\t\t\t\t}).length;\n\n\t\t\t\t$(container).attr('data-rf-row-count', row_count);\n\n\t\t\t\t$(wrapper).on('click', settings.add, function (event) {\n\t\t\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t\t\tvar row_template = $($(container).children(settings.template).clone().removeClass(settings.template.replace('.', ''))[0].outerHTML);\n\n\t\t\t\t\t// Enable all form elements inside the row template\n\t\t\t\t\t$(row_template).find(':input').each(function () {\n\t\t\t\t\t\t$(this).prop('disabled', false);\n\t\t\t\t\t});\n\n\t\t\t\t\tif (typeof settings.before_add === 'function') {\n\t\t\t\t\t\tsettings.before_add(container);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar new_row = $(row_template).show().appendTo(container);\n\n\t\t\t\t\tif (typeof settings.after_add === 'function') {\n\t\t\t\t\t\tsettings.after_add(container, new_row, after_add);\n\t\t\t\t\t}\n\n\t\t\t\t\t// The new row might have it's own repeatable field wrappers so initialize them too\n\t\t\t\t\tinitialize(new_row);\n\t\t\t\t});\n\n\t\t\t\t$(wrapper).on('click', settings.remove, function (event) {\n\t\t\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t\t\tif (settings.confirm_before_remove_row && settings.confirm_before_remove_row_text) {\n\t\t\t\t\t\tif (!confirm(settings.confirm_before_remove_row_text)) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tvar row = $(this).parents(settings.row).first();\n\n\t\t\t\t\tif (typeof settings.before_remove === 'function') {\n\t\t\t\t\t\tsettings.before_remove(container, row);\n\t\t\t\t\t}\n\n\t\t\t\t\trow.remove();\n\n\t\t\t\t\tif (typeof settings.after_remove === 'function') {\n\t\t\t\t\t\tsettings.after_remove(container);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (settings.is_sortable === true && typeof $.ui !== 'undefined' && typeof $.ui.sortable !== 'undefined') {\n\t\t\t\t\tvar sortable_options = settings.sortable_options !== null ? settings.sortable_options : {};\n\n\t\t\t\t\tsortable_options.handle = settings.move;\n\n\t\t\t\t\t$(wrapper).find(settings.container).sortable(sortable_options);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tfunction after_add(container, new_row) {\n\t\t\tvar row_count = $(container).attr('data-rf-row-count');\n\n\t\t\trow_count++;\n\n\t\t\t$('*', new_row).each(function () {\n\t\t\t\t$.each(this.attributes, function (index, element) {\n\t\t\t\t\tthis.value = this.value.replace(settings.row_count_placeholder, row_count - 1);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t$(container).attr('data-rf-row-count', row_count);\n\t\t}\n\t}\n})(jQuery);\n\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/plugins/repeatable-fields.js","/*!\n * Give Admin Forms JS\n *\n * @description: The Give Admin Forms scripts. Only enqueued on the give_forms CPT; used to validate fields, show/hide, and other functions\n * @package: Give\n * @subpackage: Assets/JS\n * @copyright: Copyright (c) 2016, WordImpress\n * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\n\njQuery.noConflict();\n(function( $ ) {\n\t/**\n\t * Default Radio Button\n\t *\n\t * @description: Allow only one radio button to be checked at a time\n\t * @since: 1.0\n\t */\n\tvar handle_default_radio = function() {\n\t\t$( 'body' ).on( 'change', '.give-give_default_radio_inline', function() {\n\t\t\t// Unset pre selected default level.\n\t\t\t$( '.give-give_default_radio_inline' ).prop( 'checked', false );\n\n\t\t\t// Set level as default.\n\t\t\t$( this ).prop( 'checked', true );\n\t\t} );\n\n\t\t// Note: some cases is covered in admin-scripts.js.\n\t\t// For ref: handle_metabox_repeater_field_row_count, handle_metabox_repeater_field_row_remove\n\t};\n\n\t/**\n\t * Toggle Conditional Form Fields\n\t *\n\t * @since: 1.0\n\t */\n\tvar toggle_conditional_form_fields = function() {\n\n\t\t//Price Option\n\t\tvar price_option = $( '._give_price_option_field input:radio' );\n\n\t\tprice_option.on( 'change', function() {\n\n\t\t\tvar price_option_val = $( '._give_price_option_field input:radio:checked' ).val();\n\t\t\tif ( price_option_val === 'set' ) {\n\t\t\t\t//set price shows\n\t\t\t\t$( '._give_set_price_field' ).show();\n\t\t\t\t$( '#_give_donation_levels_field' ).hide(); // Hide multi-val stuffs.\n\t\t\t\t$( '._give_display_style_field' ).hide(); // Hide display style setting.\n\n\t\t\t} else {\n\t\t\t\t//multi-value shows\n\t\t\t\t$( '._give_set_price_field' ).hide();\n\t\t\t\t$( '#_give_donation_levels_field' ).show(); // Show set stuffs.\n\t\t\t\t$( '._give_display_style_field' ).show(); // Show display style setting.\n\t\t\t}\n\t\t} ).change();\n\n\t\t//Content Option\n\t\tvar display_content = $( '._give_display_content_field input:radio' );\n\t\tdisplay_content.on( 'change', function() {\n\t\t\t// Get checked radio button value.\n\t\t\tvar display_content_val = $( '._give_display_content_field input:radio:checked' ).val();\n\n\t\t\tif ( display_content_val === 'enabled' ) {\n\t\t\t\t$( '._give_content_placement_field' ).show();\n\t\t\t\t$( '._give_form_content_field' ).show();\n\t\t\t} else {\n\t\t\t\t$( '._give_content_placement_field' ).hide();\n\t\t\t\t$( '._give_form_content_field' ).hide();\n\t\t\t}\n\t\t} ).change();\n\n\t\t//Terms Option\n\t\tvar terms_option = $( '._give_terms_option_field input:radio' );\n\t\tterms_option.on( 'change', function() {\n\t\t\t// Get checked radio button value.\n\t\t\tvar terms_option_val = $( '._give_terms_option_field input:radio:checked' ).val();\n\n\t\t\tif ( terms_option_val === 'enabled' ) {\n\t\t\t\t$( '._give_agree_label_field' ).show();\n\t\t\t\t$( '._give_agree_text_field' ).show();\n\t\t\t} else {\n\t\t\t\t$( '._give_agree_label_field' ).hide();\n\t\t\t\t$( '._give_agree_text_field' ).hide();\n\t\t\t}\n\t\t} ).change();\n\n\t\t//Payment Display\n\t\tvar payment_display_option = $( '._give_payment_display_field input:radio' );\n\t\tpayment_display_option.on( 'change', function() {\n\t\t\tvar payment_display_option_val = $( '._give_payment_display_field input:radio:checked' ).val();\n\n\t\t\tif ( payment_display_option_val === 'onpage' ) {\n\t\t\t\t$( '._give_reveal_label_field' ).hide();\n\t\t\t} else {\n\t\t\t\t$( '._give_reveal_label_field' ).show();\n\t\t\t}\n\t\t} ).change();\n\n\t\t//Custom Amount\n\t\tvar custom_amount_option = $( '._give_custom_amount_field input:radio' );\n\t\tcustom_amount_option.on( 'change', function() {\n\t\t\tvar custom_amount_option_val = $( '._give_custom_amount_field input:radio:checked' ).val();\n\t\t\tif ( custom_amount_option_val === 'disabled' ) {\n\t\t\t\t$( '._give_custom_amount_range_field ' ).hide();\n\t\t\t\t$( '._give_custom_amount_text_field' ).hide();\n\t\t\t} else {\n\t\t\t\t$( '._give_custom_amount_range_field ' ).show();\n\t\t\t\t$( '._give_custom_amount_text_field' ).show();\n\t\t\t}\n\t\t} ).change();\n\n\t\t//Goals\n\t\tvar goal_option = $( '._give_goal_option_field' );\n\t\tvar goal_format = $( '._give_goal_format_field input:radio' );\n\t\t//Close Form when Goal Achieved\n\t\tvar close_form_when_goal_achieved_option = $( '._give_close_form_when_goal_achieved_field input:radio' );\n\n\t\tclose_form_when_goal_achieved_option.on( 'change', function() {\n\t\t\tvar close_form_when_goal_achieved_option_val = $( '._give_close_form_when_goal_achieved_field input:radio:checked' ).val();\n\t\t\tif ( close_form_when_goal_achieved_option_val === 'disabled' ) {\n\t\t\t\t$( '._give_form_goal_achieved_message_field' ).hide();\n\t\t\t} else {\n\t\t\t\t$( '._give_form_goal_achieved_message_field' ).show();\n\t\t\t}\n\t\t} ).change();\n\n\t\tgoal_option.on( 'change', function() {\n\t\t\tvar goal_option = $( '._give_goal_option_field input:radio:checked' ).val();\n\t\t\tif ( goal_option === 'disabled' ) {\n\n\t\t\t\t$( '._give_set_goal_field' ).hide();\n\t\t\t\t$( '._give_goal_format_field' ).hide();\n\t\t\t\t$( '._give_goal_color_field' ).hide();\n\t\t\t\t$( '._give_close_form_when_goal_achieved_field' ).hide();\n\t\t\t\t$( '._give_form_goal_achieved_message_field' ).hide();\n\t\t\t\t$( '._give_number_of_donation_goal_field' ).hide();\n\t\t\t\t$( '._give_number_of_donor_goal_field' ).hide();\n\t\t\t} else {\n\t\t\t\t$( '._give_set_goal_field' ).show();\n\t\t\t\t$( '._give_goal_format_field' ).show();\n\t\t\t\t$( '._give_goal_color_field' ).show();\n\t\t\t\t$( '._give_close_form_when_goal_achieved_field' ).show();\n\n\t\t\t\tvar close_form_when_goal_achieved_option_val = $( '._give_close_form_when_goal_achieved_field input:radio:checked' ).val();\n\n\t\t\t\tif ( close_form_when_goal_achieved_option_val === 'enabled' ) {\n\t\t\t\t\t$( '._give_form_goal_achieved_message_field' ).show();\n\t\t\t\t}\n\n\t\t\t\t// Trigger goal format option.\n\t\t\t\tgoal_format.change();\n\t\t\t}\n\t\t} ).change();\n\n\t\tgoal_format.on( 'change', function() {\n\t\t\tvar goal_format_val = $( '._give_goal_format_field input:radio:checked' ).val();\n\t\t\tvar goal_option_val = $( '._give_goal_option_field input:radio:checked' ).val();\n\n\t\t\tif ( 'donation' === goal_format_val ) {\n\t\t\t\t$( '._give_set_goal_field, ._give_number_of_donor_goal_field,._give_number_of_donation_goal_field' ).hide();\n\t\t\t\tif( 'disabled' !== goal_option_val ) {\n\t\t\t\t\t$( '._give_number_of_donation_goal_field' ).show()\n\t\t\t\t}\n\t\t\t} else if ( 'donors' === goal_format_val ) {\n\t\t\t\t$( '._give_set_goal_field, ._give_number_of_donation_goal_field, ._give_number_of_donor_goal_field' ).hide();\n\t\t\t\tif ( 'disabled' !== goal_option_val ) {\n\t\t\t\t\t$( '._give_number_of_donor_goal_field' ).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t('disabled' === goal_option_val) ? $( '._give_set_goal_field' ).hide() : $( '._give_set_goal_field' ).show();\n\t\t\t\t$( '._give_number_of_donation_goal_field, ._give_number_of_donor_goal_field' ).hide();\n\t\t\t}\n\t\t} ).change();\n\n\t\t// Offline Donations.\n\t\tvar offline_customization_option = $( '._give_customize_offline_donations_field input:radio' );\n\t\toffline_customization_option.on( 'change', function() {\n\t\t\tvar offline_customization_option_val = $( '._give_customize_offline_donations_field input:radio:checked' ).val();\n\t\t\tif ( 'enabled' === offline_customization_option_val ) {\n\t\t\t\t$( '._give_offline_checkout_notes_field' ).show();\n\t\t\t\t$( '._give_offline_donation_enable_billing_fields_single_field' ).show();\n\t\t\t\t$( '._give_offline_donation_subject_field' ).show();\n\t\t\t\t$( '._give_offline_donation_email_field' ).show();\n\t\t\t} else {\n\t\t\t\t$( '._give_offline_checkout_notes_field' ).hide();\n\t\t\t\t$( '._give_offline_donation_enable_billing_fields_single_field' ).hide();\n\t\t\t\t$( '._give_offline_donation_subject_field' ).hide();\n\t\t\t\t$( '._give_offline_donation_email_field' ).hide();\n\t\t\t}\n\t\t} ).change();\n\n\t\t//Email options.\n\t\tvar email_options = $( '._give_email_options_field input:radio' );\n\t\temail_options.on( 'change', function() {\n\t\t\t// Get checked radio button value.\n\t\t\tvar email_options_val = $( '._give_email_options_field input:radio:checked' ).val();\n\n\t\t\tif ( email_options_val === 'enabled' ) {\n\t\t\t\t$( '#email_notification_options .give-field-wrap:not(._give_email_options_field)' ).show();\n\t\t\t} else {\n\t\t\t\t$( '#email_notification_options .give-field-wrap:not(._give_email_options_field)' ).hide();\n\t\t\t}\n\t\t} ).change();\n\t};\n\n\t//Handle Repeatable Row ID\n\tvar handle_repeatable_row_ID = function() {\n\n\t\t//Ensure for new posts that the repeater is filled\n\t\tif ( $( '.give-level-id' ).text() === '' ) {\n\t\t\tvar row_group = $( '.cmb-repeatable-grouping' );\n\t\t\t//loop through all repeatable rows and set vals\n\t\t\trow_group.each( function( index, object ) {\n\n\t\t\t\tvar row_id = $( object ).data( 'iterator' ) + 1;\n\n\t\t\t\t$( object ).find( '.give-level-id' ).text( row_id );\n\t\t\t\t$( object ).find( '.give-level-id-input' ).val( row_id );\n\n\t\t\t} );\n\t\t}\n\n\t\t$( 'body' ).on( 'cmb2_add_row', function( event, row ) {\n\t\t\tset_row_ids( row );\n\t\t} );\n\t\t$( 'body' ).on( 'cmb2_shift_rows_complete', function( event, self ) {\n\n\t\t\tvar row_group = $( '.cmb-repeatable-grouping' );\n\t\t\t//loop through all repeatable rows and set vals\n\t\t\trow_group.each( function( index, object ) {\n\n\t\t\t\tvar row_id = $( object ).find( 'input.give-level-id-input' ).val();\n\n\t\t\t\t$( object ).find( '.give-level-id' ).text( row_id );\n\n\t\t\t} );\n\n\t\t} );\n\n\t\t/**\n\t\t * Set Row IDs\n\t\t *\n\t\t * @description: Sets values in the Multi-level donation repeatable field\n\t\t * @param row\n\t\t */\n\t\tfunction set_row_ids( row ) {\n\n\t\t\tvar row_count = count_repeatable_rows();\n\n\t\t\t//Add row ID value to hidden field\n\t\t\t$( row ).find( 'input.give-level-id-input' ).val( row_count );\n\t\t\t//Add row ID to displayed ID\n\t\t\t$( row ).find( '.give-level-id' ).text( row_count );\n\n\t\t}\n\n\t\t/**\n\t\t * Loops through Multi-level repeater rows\n\t\t *\n\t\t * @description: First counts the rows then it compares the row count with the largest iterator count.\n\t\t *\n\t\t * @returns {number}\n\t\t */\n\t\tfunction count_repeatable_rows() {\n\t\t\tvar row_counter = 0;\n\t\t\tvar row_largest_number = 0;\n\t\t\tvar row_number = 0;\n\n\t\t\t//Loop through repeatable rows to see what highest ID is currently\n\t\t\t$( '#_give_donation_levels_repeat > .cmb-repeatable-grouping' ).each( function( index, value ) {\n\n\t\t\t\trow_number = $( this ).find( 'input.give-level-id-input' ).val();\n\n\t\t\t\tif ( row_number > row_largest_number ) {\n\t\t\t\t\trow_largest_number = row_number;\n\t\t\t\t}\n\n\t\t\t\trow_counter ++;\n\n\t\t\t} );\n\n\t\t\tif ( typeof row_largest_number !== 'undefined' && row_largest_number >= row_counter ) {\n\t\t\t\treturn (parseInt( row_largest_number ) + 1); //ensure no duplicate rows returned\n\t\t\t} else {\n\t\t\t\treturn row_counter;\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\t/**\n\t * Misc Cleanup\n\t *\n\t * @description: Clean up and tweaks\n\t * @since: 1.0\n\t */\n\tfunction misc_cleanup() {\n\n\t\t//No Value = Placeholders: determine if value is 0.00 and remove if so in favor of placeholders\n\t\t$( '.cmb2-text-money' ).each( function( index, object ) {\n\t\t\tvar this_val = parseInt( $( object ).val() );\n\t\t\tif ( ! this_val ) {\n\t\t\t\t$( object ).removeAttr( 'value' );\n\t\t\t}\n\t\t} );\n\n\t}\n\n\t//On DOM Ready\n\t$( function() {\n\n\t\thandle_default_radio();\n\t\ttoggle_conditional_form_fields();\n\t\thandle_repeatable_row_ID();\n\t\tmisc_cleanup();\n\n\t} );\n\n})( jQuery );\n\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/admin/admin-forms.js","/*!\n * Give Admin Forms JS\n *\n * @description: The Give Admin Settings scripts. Only enqueued on the give-settings page; used for tabs and other show/hide functionality\n * @package: Give\n * @since: 1.5\n * @subpackage: Assets/JS\n * @copyright: Copyright (c) 2016, WordImpress\n * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\nimport {GiveWarningAlert, GiveErrorAlert, GiveConfirmModal, GiveSuccessAlert} from '../plugins/modal';\n\njQuery.noConflict();\njQuery(document).ready(function ($) {\n\n\t/**\n\t * Sortable payment gateways.\n\t */\n\tvar $payment_gateways = jQuery( 'ul.give-payment-gatways-list' );\n\tif( $payment_gateways.length ){\n\t\t$payment_gateways.sortable();\n\t}\n\n\t/**\n\t * Change currency position symbol on changing the currency\n\t */\n\tvar give_settings_currency = '#give-mainform #currency';\n\tvar give_settings_position = '#give-mainform #currency_position';\n\t$( 'body' ).on( 'change', give_settings_currency, function () {\n\t\tvar currency_text = $( give_settings_currency + ' option:selected' ).text(),\n\t\t\tcurrency_sign = currency_text.split( '(' ).pop().split( ')' ).shift();\n\n\t\tif ( '' === currency_sign ) {\n\t\t\tcurrency_sign = give_vars.currency_sign;\n\t\t}\n\n\t\tvar before_text = $( give_settings_position ).data( 'before-template' );\n\t\tbefore_text = before_text.replace( '{currency_pos}', currency_sign );\n\t\t$( give_settings_position + ' option[value=\"before\"]' ).text( before_text );\n\n\n\t\tvar after_text = $( give_settings_position ).data( 'after-template' );\n\t\tafter_text = after_text.replace( '{currency_pos}', currency_sign );\n\t\t$( give_settings_position + ' option[value=\"after\"]' ).text( after_text );\n\n\t} );\n\n\t/**\n\t * Repeater setting field event.\n\t */\n\t$( 'a.give-repeat-setting-field' ).on( 'click', function(e){\n\t\te.preventDefault();\n\t\tvar $parent = $(this).parents('td'),\n\t\t\t$first_setting_field_group = $( 'p:first-child', $parent ),\n\t\t\t$new_setting_field_group = $first_setting_field_group.clone(),\n\t\t\tsetting_field_count = $( 'p', $parent ).not('.give-field-description').length,\n\t\t\tfieldID = $(this).data('id') + '_' + (++setting_field_count),\n\t\t\t$prev_field = $(this).prev();\n\n\t\t// Create new field only if previous is non empty.\n\t\tif( $( 'input', $prev_field ).val() ) {\n\t\t\t// Add setting field html to dom.\n\t\t\t$(this).before( $new_setting_field_group );\n\t\t\t$prev_field = $(this).prev();\n\n\t\t\t// Set id and value for setting field.\n\t\t\t$( 'input', $prev_field ).attr( 'id', fieldID );\n\t\t\t$( 'input', $prev_field ).val( '' );\n\t\t}\n\n\t\treturn false;\n\t});\n\n\t$( '.give-settings-page' ).on( 'click', 'span.give-remove-setting-field', function(e){\n\t\t$(this).parents('p').remove();\n\t});\n\n\t/**\n\t * Enabled & disable email notification event.\n\t */\n\t$( '.give-email-notification-status', 'table.giveemailnotifications' ).on( 'click', function(){\n\t\tvar $this = $(this),\n\t\t\t$icon_container = $('i', $this),\n\t\t\t$loader = $(this).next(),\n\t\t\tset_notification_status = $(this).hasClass( 'give-email-notification-enabled' ) ? 'disabled' : 'enabled',\n\t\t\tnotification_id = $(this).data('id');\n\n\t\t// Bailout if admin can not edit notification status setting.\n\t\tif( ! parseInt( $this.data('edit') ) ) {\n\t\t\t// Remove all notice.\n\t\t\t$('div.give-email-notification-status-notice').remove();\n\n\t\t\t// Add notice.\n\t\t\t$('hr.wp-header-end').after('<div class=\"updated error give-email-notification-status-notice\"><p>' + $(this).closest('.give-email-notification-status').data('notice') + '</p></div>');\n\n\t\t\t// Scroll to notice.\n\t\t\t$('html, body').animate({scrollTop:$('div.give-email-notification-status-notice').position().top}, 'slow');\n\n\t\t\treturn false;\n\t\t}\n\n\t\t$.ajax({\n\t\t\turl: ajaxurl,\n\t\t\tmethod: 'POST',\n\t\t\tdata: {\n\t\t\t\taction: 'give_set_notification_status',\n\t\t\t\tstatus: set_notification_status,\n\t\t\t\tnotification_id: notification_id\n\t\t\t},\n\t\t\tbeforeSend: function(){\n\t\t\t\t$this.hide();\n\t\t\t\t$loader.addClass('is-active');\n\t\t\t},\n\t\t\tsuccess: function(res) {\n\t\t\t\tif( res.success ) {\n\t\t\t\t\t$this.removeClass( 'give-email-notification-' + $this.data('status') );\n\t\t\t\t\t$this.addClass( 'give-email-notification-' + set_notification_status );\n\t\t\t\t\t$this.data( 'status', set_notification_status );\n\n\t\t\t\t\tif( 'enabled' === set_notification_status ) {\n\t\t\t\t\t\t$icon_container.removeClass('dashicons-no-alt');\n\t\t\t\t\t\t$icon_container.addClass('dashicons-yes');\n\t\t\t\t\t} else{\n\t\t\t\t\t\t$icon_container.removeClass('dashicons-yes');\n\t\t\t\t\t\t$icon_container.addClass('dashicons-no-alt');\n\t\t\t\t\t}\n\n\t\t\t\t\t$loader.removeClass('is-active');\n\t\t\t\t\t$this.show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n\n\t/**\n\t * Ajax call to clear Give's cache.\n\t */\n\t$( '#give-clear-cache' ).on( 'click', function() {\n\t\t$.ajax({\n\t\t\turl: ajaxurl,\n\t\t\ttype: 'GET',\n\t\t\tdata: {\n\t\t\t\taction: 'give_cache_flush'\n\t\t\t}\n\t\t})\n\t\t.done( function( response ) {\n\t\t\tif ( response.success ) {\n\t\t\t\tnew GiveSuccessAlert({\n\t\t\t\t\tmodalContent:{\n\t\t\t\t\t\ttitle: give_vars.flush_success,\n\t\t\t\t\t\tdesc: response.data.message,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok,\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t} else {\n\t\t\t\tnew GiveErrorAlert({\n\t\t\t\t\tmodalContent:{\n\t\t\t\t\t\ttitle: give_vars.flush_error,\n\t\t\t\t\t\tdesc: response.data.message,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok,\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t}\n\t\t})\n\t});\n});\n\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/admin/admin-settings.js","(function(globalSope) {\n 'use strict';\n\n /**\n * Including this file adds the `addDynamicListener` to the ELement prototype.\n * \n * The dynamic listener gets an extra `selector` parameter that only calls the callback\n * if the target element matches the selector.\n * \n * The listener has to be added to the container/root element and the selector should match\n * the elements that should trigger the event.\n * \n * Browser support: IE9+\n */\n\n // Polyfil Element.matches\n // https://developer.mozilla.org/en/docs/Web/API/Element/matches#Polyfill\n if (!Element.prototype.matches) {\n Element.prototype.matches = \n Element.prototype.matchesSelector || \n Element.prototype.mozMatchesSelector ||\n Element.prototype.msMatchesSelector || \n Element.prototype.oMatchesSelector || \n Element.prototype.webkitMatchesSelector ||\n function(s) {\n var matches = (this.document || this.ownerDocument).querySelectorAll(s),\n i = matches.length;\n while (--i >= 0 && matches.item(i) !== this) {}\n return i > -1; \n };\n }\n\n /**\n * Returns a modified callback function that calls the\n * initial callback function only if the target element matches the given selector\n * \n * @param {string} selector \n * @param {function} callback \n */\n function getConditionalCallback(selector, callback) {\n return function(e) {\n if(!e.target) return;\n if(!e.target.matches(selector)) return;\n callback.apply(this, arguments);\n };\n }\n\n /**\n * \n * \n * @param {Element} rootElement The root element to add the linster too.\n * @param {string} eventType The event type to listen for.\n * @param {string} selector The selector that should match the dynamic elements.\n * @param {function} callback The function to call when an event occurs on the given selector.\n * @param {boolean|object} options Passed as the regular `options` parameter to the addEventListener function\n * Set to `true` to use capture.\n * Usually used as an object to add the listener as `passive`\n */\n globalSope.addDynamicEventListener = function (rootElement, eventType, selector, callback, options) {\n rootElement.addEventListener(eventType, getConditionalCallback(selector, callback), options);\n };\n})(window);\n\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/plugins/dynamicListener.js","/*!\n * Give Admin Export JS\n *\n * @description: The Give Admin Settings scripts. Only enqueued on the give-settings and give-tools page; used for exporting CSV\n * @package: Give\n * @since: 2.1\n * @subpackage: Assets/JS\n * @copyright: Copyright (c) 2016, WordImpress\n * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\n\njQuery.noConflict();\njQuery( document ).ready( function ( $ ) {\n\n\t/**\n\t * Update Export Donation Form\n\t *\n\t * @since 2.1\n\t */\n\tfunction give_export_update_donation_form() {\n\n\t\tvar $form = $( 'form#give-export_donations-form' ),\n\t\t\t$container = $( $form ).find( 'tr.give-export-donation-form .give-select-chosen' ),\n\t\t\tselect = $container.prev(),\n\t\t\t$search_field = $container.find( 'input[type=\"text\"]' ),\n\t\t\tvariations = $container.hasClass( 'variations' ),\n\t\t\tresponse = '';\n\n\t\t$( '.give-export-donations-hide' ).addClass( 'give-hidden' );\n\t\t$( 'li.give-export-donation-checkbox-remove' ).remove();\n\n\t\t$.ajax( {\n\t\t\ttype: 'POST',\n\t\t\turl: ajaxurl,\n\t\t\tdata: {\n\t\t\t\taction: 'give_form_search',\n\t\t\t\ts: '',\n\t\t\t\tfields: $( $form ).serialize()\n\t\t\t},\n\t\t\tbeforeSend: function () {\n\t\t\t\tselect.closest( 'ul.chosen-results' ).empty();\n\t\t\t},\n\t\t\tsuccess: function ( data ) {\n\n\t\t\t\t// Remove all options but those that are selected.\n\t\t\t\t$( 'option', select ).remove();\n\t\t\t\tvar form_ids = [];\n\n\t\t\t\tif ( data.length ) {\n\n\t\t\t\t\t$form.find( '.give-export-donation-button' ).prop('disabled', false);\n\t\t\t\t\t$.each( data, function ( key, item ) {\n\t\t\t\t\t\tselect.prepend( '<option value=\"' + item.id + '\">' + item.name + '</option>' );\n\t\t\t\t\t\tform_ids.push( item.id );\n\t\t\t\t\t} );\n\n\t\t\t\t\tselect.prepend( '<option value=\"0\" selected>' + select.data( 'placeholder' ) + '</option>' );\n\t\t\t\t} else {\n\t\t\t\t\t// Trigger no result message event.\n\t\t\t\t\tselect.prepend( '<option value=\"0\">' + select.data( 'no-form' ) + '</option>' );\n\n\t\t\t\t\t$form.find( '.give-export-donation-button' ).prop('disabled', true);\n\t\t\t\t}\n\n\t\t\t\t$form.find( '.form_ids' ).val( form_ids.join() );\n\n\t\t\t\t// Trigger update event.\n\t\t\t\t$container.prev( 'select.give-select-chosen' ).trigger( 'chosen:updated' );\n\n\t\t\t \toutput_give_donations_fields( response );\n\t\t\t}\n\t\t} )\n\t}\n\n\t/**\n\t * Update export Donation Form when cat or tag are change\n\t *\n\t * @since 2.1\n\t */\n\t$( '.give-export_donations #give-export_donations-form .give_forms_categories , .give-export_donations #give-export_donations-form .give_forms_tags' ).change( function () {\n\t\tgive_export_update_donation_form();\n\t} );\n\n\t/**\n\t * Ajax call to get donation fields.\n\t */\n\t$( '.give-export_donations #give-export_donations-form #give_payment_form_select' ).change( function () {\n\n\t\t$( '.give-export-donations-hide' ).addClass( 'give-hidden' );\n\n\t\t$( 'li.give-export-donation-checkbox-remove' ).remove();\n\n\t\tjQuery( document ).trigger( 'give_export_donations_form_change' );\n\n\t\tvar give_form_id;\n\n\t\t// Check for form ID.\n\t\tif ( ! (\n\t\t\t\tgive_form_id = $( this ).val()\n\t\t\t) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Ajax.\n\t\t$.ajax( {\n\t\t\ttype: 'POST',\n\t\t\turl: ajaxurl,\n\t\t\tdata: {\n\t\t\t\tform_id: give_form_id,\n\t\t\t\taction: 'give_export_donations_get_custom_fields'\n\t\t\t},\n\t\t\tsuccess: function ( response ) {\n\t\t\t\tif ( response ) {\n\t\t\t\t\toutput_give_donations_fields( response );\n\t\t\t\t} else {\n\t\t\t\t\talert( give_vars.error_message );\n\t\t\t\t}\n\n\t\t\t\tjQuery( document ).trigger( 'give_export_donations_form_response', response );\n\t\t\t}\n\t\t} );\n\t} );\n\n\t/**\n\t * Outputs the custom field checkboxes.\n\t *\n\t * @param response\n\t */\n\tfunction output_give_donations_fields( response ) {\n\n\t\t/**\n\t\t * Standard Fields\n\t\t */\n\t\tvar standard_fields = 'undefined' !== typeof response.standard_fields && null !== response.standard_fields ? response.standard_fields : '';\n\t\tvar standard_field_list = $( '.give-export-donations-standard-fields ul' );\n\t\tif ( standard_fields.length > 0 ) {\n\t\t\tstandard_field_list.closest( 'tr' ).removeClass( 'give-hidden' );\n\t\t\t// Loop through STANDARD fields & output\n\t\t\t$( standard_fields ).each( function ( index, value ) {\n\t\t\t\tstandard_field_list.append( '<li class=\"give-export-donation-checkbox-remove\"><label for=\"give-give-donations-standard-field-' + value + '\"><input type=\"checkbox\" name=\"give_give_donations_export_option[' + value + ']\" id=\"give-give-donations-standard-field-' + value + '\">' + value + '</label> </li>' );\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Hidden Fields\n\t\t */\n\t\tvar hidden_fields = 'undefined' !== typeof response.hidden_fields && null !== response.hidden_fields ? response.hidden_fields : '';\n\t\tvar hidden_field_list = $( '.give-export-donations-hidden-fields ul' );\n\n\t\tif ( hidden_fields ) {\n\t\t\thidden_field_list.closest( 'tr' ).removeClass( 'give-hidden' );\n\n\t\t\t// Loop through HIDDEN fields & output.\n\t\t\t$( hidden_fields ).each( function ( index, value ) {\n\t\t\t\thidden_field_list.append( '<li class=\"give-export-donation-checkbox-remove\"><label for=\"give-give-donations-hidden-field-' + value + '\"><input type=\"checkbox\" name=\"give_give_donations_export_option[' + value + ']\" id=\"give-give-donations-hidden-field-' + value + '\">' + value + '</label> </li>' );\n\t\t\t} );\n\t\t}\n\t}\n} );\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/admin/admin-export.js","/*!\n * Give Admin Widgets JS\n *\n * @description: The Give Admin Widget scripts. Only enqueued on the admin widgets screen; used to validate fields, show/hide, and other functions\n * @package: Give\n * @subpackage: Assets/JS\n * @copyright: Copyright (c) 2016, WordImpress\n * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\n\njQuery.noConflict();\n(function ( $ ) {\n\n\t/**\n\t * Show/Hide continue button tile setting on basis of display setting for Give Form widget.\n\t */\n\tvar continue_button_setting_js = function() {\n\t\t$( '.widget-liquid-right' ).on( 'change', '.give_forms_display_style_setting_row input', function(){\n\t\t\tvar $parent = $(this).parents('p'),\n\t\t\t\t$continue_button_title = $parent.next();\n\n\t\t\tif( 'onpage' === $('input:checked', $parent ).val() ) {\n\t\t\t\t$continue_button_title.hide();\n\t\t\t} else {\n\t\t\t\t$continue_button_title.show();\n\t\t\t}\n\t\t});\n\t};\n\n\n\t//On DOM Ready\n\t$( function () {\n\t\tcontinue_button_setting_js();\n\t\t$( '.give_forms_display_style_setting_row input', '.widget-liquid-right' ).trigger('change');\n\t} );\n\n\t//Function to Refresh jQuery toggles for Yelp Widget Pro upon saving specific widget\n\t$( document ).ajaxSuccess( function ( e, xhr, settings ) {\n\t\tcontinue_button_setting_js();\n\t\t$( '.give_forms_display_style_setting_row input', '.widget-liquid-right' ).trigger('change');\n\t} );\n\n\n})( jQuery );\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/admin/admin-widgets.js","/**\n * Give Admin JS\n *\n * @package: Give\n * @subpackage: Assets/JS\n * @copyright: Copyright (c) 2016, WordImpress\n * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\nimport {GiveWarningAlert, GiveErrorAlert, GiveConfirmModal} from '../plugins/modal';\n\njQuery.noConflict();\n\n// Provided access to global level.\nvar give_setting_edit = false;\n\n(function ($) {\n\t/**\n\t * Show/Hide ajax loader.\n\t *\n\t * @since 2.0\n\t *\n\t * @param $parent\n\t * @param args\n\t */\n\tvar giveAjaxLoader = function ($parent, args) {\n\t\targs = jQuery.extend(\n\t\t\t{\n\t\t\t\twrapper: true,\n\t\t\t\tshow: false\n\t\t\t},\n\t\t\targs\n\t\t);\n\n\t\tvar $loaderParent = args.wrapper ? $('.give-spinner-wrapper', $parent) : {},\n\t\t\t$loader = $('.give-spinner', $parent);\n\n\t\t// Show loader.\n\t\tif (args.show) {\n\t\t\tif ($loaderParent.length) {\n\t\t\t\t$loaderParent.addClass('is-active');\n\t\t\t}\n\n\t\t\t$loader.addClass('is-active');\n\t\t\treturn;\n\t\t}\n\n\t\t// Hide loader.\n\t\tif ($loaderParent.length) {\n\t\t\t$loaderParent.removeClass('is-active');\n\t\t}\n\n\t\t$loader.removeClass('is-active');\n\t};\n\n\t/**\n\t * Onclick remove give-message parameter from url\n\t *\n\t * @since 1.8.14\n\t */\n\tvar give_dismiss_notice = function () {\n\t\t$('body').on('click', 'button.notice-dismiss', function () {\n\t\t\tif ('give-invalid-license' !== jQuery(this).closest('div.give-notice').data('notice-id')) {\n\t\t\t\tgive_remove_give_message();\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Remove give-message parameter from URL.\n\t *\n\t * @since 1.8.14\n\t */\n\tvar give_remove_give_message = function () {\n\t\tvar parameter = 'give-message',\n\t\t\turl = document.location.href,\n\t\t\turlparts = url.split('?');\n\n\t\tif (urlparts.length >= 2) {\n\t\t\tvar urlBase = urlparts.shift();\n\t\t\tvar queryString = urlparts.join('?');\n\n\t\t\tvar prefix = encodeURIComponent(parameter) + '=';\n\t\t\tvar pars = queryString.split(/[&;]/g);\n\t\t\tfor (var i = pars.length; i-- > 0;) {\n\t\t\t\tif (pars[i].lastIndexOf(prefix, 0) !== -1) {\n\t\t\t\t\tpars.splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\turl = urlBase + '?' + pars.join('&');\n\t\t\twindow.history.pushState('', document.title, url); // added this line to push the new url directly to url bar .\n\t\t}\n\t\treturn url;\n\t};\n\n\t/**\n\t * Setup Admin Datepicker\n\t * @since: 1.0\n\t */\n\tvar enable_admin_datepicker = function () {\n\n\t\t// Date picker.\n\t\tif ($('.give_datepicker').length > 0) {\n\t\t\tvar dateFormat = 'mm/dd/yy';\n\t\t\t$('.give_datepicker').datepicker({\n\t\t\t\tdateFormat: dateFormat\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Setup Pretty Chosen Select Fields\n\t */\n\tvar setup_chosen_give_selects = function () {\n\n\t\t// Setup Chosen Selects.\n\t\tvar $give_chosen_containers = $('.give-select-chosen');\n\n\t\t// Add loader with each input field.\n\t\t$give_chosen_containers.on('chosen:ready', function () {\n\t\t\t$(this).next('.chosen-container')\n\t\t\t\t.find('input.chosen-search-input')\n\t\t\t\t.after('<span class=\"spinner\"></span>');\n\t\t});\n\n\t\t// No results returned from search trigger.\n\t\t$give_chosen_containers.on('chosen:no_results', function () {\n\t\t\tvar $container = $(this).next('.chosen-container'),\n\t\t\t\t$no_results_li = $container.find('li.no-results'),\n\t\t\t\terror_string = '';\n\n\t\t\tif ($container.hasClass('give-select-chosen-ajax') && $no_results_li.length) {\n\t\t\t\terror_string = give_vars.chosen.ajax_search_msg.replace('{search_term}', '\"' + $('input', $container).val() + '\"');\n\t\t\t} else {\n\t\t\t\terror_string = give_vars.chosen.no_results_msg.replace('{search_term}', '\"' + $('input', $container).val() + '\"');\n\t\t\t}\n\n\t\t\t$no_results_li.html(error_string);\n\n\t\t});\n\n\t\t// Initiate chosen.\n\t\t$give_chosen_containers.chosen({\n\t\t\tinherit_select_classes: true,\n\t\t\tplaceholder_text_single: give_vars.one_option,\n\t\t\tplaceholder_text_multiple: give_vars.one_or_more_option\n\t\t});\n\n\t\t// Fix: Chosen JS - Zero Width Issue.\n\t\t// @see https://github.com/harvesthq/chosen/issues/472#issuecomment-344414059\n\t\t$('.chosen-container').each(function () {\n\t\t\tif (0 === $(this).width()) {\n\t\t\t\t$(this).css('width', '100%');\n\t\t\t}\n\t\t});\n\n\t\t// This fixes the Chosen box being 0px wide when the thickbox is opened.\n\t\t$('#post').on('click', '.give-thickbox', function () {\n\t\t\t$('.give-select-chosen', '#choose-give-form').css('width', '100%');\n\t\t});\n\n\t\t// Variables for setting up the typing timer.\n\t\tvar typingTimer; // Timer identifier.\n\t\tvar doneTypingInterval = 342; // Time in ms, Slow - 521ms, Moderate - 342ms, Fast - 300ms.\n\n\t\t// Replace options with search results.\n\t\t$(document.body).on('keyup', '.give-select.chosen-container .chosen-search input, .give-select.chosen-container .search-field input', function (e) {\n\n\t\t\tvar val = $(this).val(),\n\t\t\t\t$container = $(this).closest('.give-select-chosen'),\n\t\t\t\tselect = $container.prev(),\n\t\t\t\t$search_field = $container.find('input[type=\"text\"]'),\n\t\t\t\tvariations = $container.hasClass('variations'),\n\t\t\t\tlastKey = e.which,\n\t\t\t\tsearch_type = 'give_form_search',\n\t\t\t\t$this = this;\n\n\n\t\t\t// Detect if we have a defined search type, otherwise default to donation forms.\n\t\t\tif ($container.prev().data('search-type')) {\n\n\t\t\t\t// Don't trigger AJAX if this select has all options loaded.\n\t\t\t\tif ('no_ajax' === select.data('search-type')) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsearch_type = 'give_' + select.data('search-type') + '_search';\n\t\t\t}\n\n\t\t\t// Don't fire if short or is a modifier key (shift, ctrl, apple command key, or arrow keys).\n\t\t\tif (\n\t\t\t\tval.length <= 3 ||\n\t\t\t\t!search_type.length ||\n\t\t\t\t(\n\t\t\t\t\t(9 === lastKey) || // Tab.\n\t\t\t\t\t(13 === lastKey) || // Enter.\n\t\t\t\t\t(16 === lastKey) || // Shift.\n\t\t\t\t\t(17 === lastKey) || // Ctrl.\n\t\t\t\t\t(18 === lastKey) || // Alt.\n\t\t\t\t\t(19 === lastKey) || // Pause, Break.\n\t\t\t\t\t(20 === lastKey) || // CapsLock.\n\t\t\t\t\t(27 === lastKey) || // Esc.\n\t\t\t\t\t(33 === lastKey) || // Page Up.\n\t\t\t\t\t(34 === lastKey) || // Page Down.\n\t\t\t\t\t(35 === lastKey) || // End.\n\t\t\t\t\t(36 === lastKey) || // Home.\n\t\t\t\t\t(37 === lastKey) || // Left arrow.\n\t\t\t\t\t(38 === lastKey) || // Up arrow.\n\t\t\t\t\t(39 === lastKey) || // Right arrow.\n\t\t\t\t\t(40 === lastKey) || // Down arrow.\n\t\t\t\t\t(44 === lastKey) || // PrntScrn.\n\t\t\t\t\t(45 === lastKey) || // Insert.\n\t\t\t\t\t(144 === lastKey) || // NumLock.\n\t\t\t\t\t(145 === lastKey) || // ScrollLock.\n\t\t\t\t\t(91 === lastKey) || // WIN Key (Start).\n\t\t\t\t\t(93 === lastKey) || // WIN Menu.\n\t\t\t\t\t(224 === lastKey) || // Command key.\n\t\t\t\t\t(112 <= lastKey && 123 >= lastKey) // F1 to F12 lastKey.\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(typingTimer);\n\t\t\t$container.addClass('give-select-chosen-ajax');\n\n\t\t\ttypingTimer = setTimeout(\n\t\t\t\tfunction () {\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\taction: search_type,\n\t\t\t\t\t\t\ts: val,\n\t\t\t\t\t\t\tfields: $( $this ).closest( 'form' ).serialize()\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdataType: 'json',\n\t\t\t\t\t\tbeforeSend: function () {\n\t\t\t\t\t\t\tselect.closest('ul.chosen-results').empty();\n\t\t\t\t\t\t\t$search_field.prop('disabled', true);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess: function (data) {\n\n\t\t\t\t\t\t\t$container.removeClass('give-select-chosen-ajax');\n\n\t\t\t\t\t\t\t// Remove all options but those that are selected.\n\t\t\t\t\t\t\t$('option:not(:selected)', select).remove();\n\n\t\t\t\t\t\t\tif (data.length) {\n\t\t\t\t\t\t\t\t$.each(data, function (key, item) {\n\n\t\t\t\t\t\t\t\t\t// Add any option that doesn't already exist.\n\t\t\t\t\t\t\t\t\tif (!$('option[value=\"' + item.id + '\"]', select).length) {\n\t\t\t\t\t\t\t\t\t\tselect.prepend('<option value=\"' + item.id + '\">' + item.name + '</option>');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t// Trigger update event.\n\t\t\t\t\t\t\t\t$container.prev('select.give-select-chosen').trigger('chosen:updated');\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Trigger no result message event.\n\t\t\t\t\t\t\t\t$container.prev('select.give-select-chosen').trigger('chosen:no_results');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Ensure the original query is retained within the search input.\n\t\t\t\t\t\t\t$search_field.prop('disabled', false);\n\t\t\t\t\t\t\t$search_field.val(val).focus();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fail(function (response) {\n\t\t\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\t\t\tconsole.log(response);\n\t\t\t\t\t\t}\n\t\t\t\t\t}).done(function (response) {\n\t\t\t\t\t\t$search_field.prop('disabled', false);\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tdoneTypingInterval\n\t\t\t);\n\t\t});\n\n\t\t$('.give-select-chosen .chosen-search input').each(function () {\n\t\t\tvar type = $(this).parent().parent().parent().prev('select.give-select-chosen').data('search-type');\n\t\t\tvar placeholder = '';\n\n\t\t\tif ('form' === type) {\n\t\t\t\tplaceholder = give_vars.search_placeholder;\n\t\t\t} else {\n\t\t\t\ttype = 'search_placeholder_' + type;\n\t\t\t\tif (give_vars[type]) {\n\t\t\t\t\tplaceholder = give_vars[type];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$(this).attr('placeholder', placeholder);\n\n\t\t});\n\n\t};\n\n\t/**\n\t * Unformat Currency\n\t *\n\t * @use string give_vars.currency_decimals Number of decimals\n\t *\n\t * @param {string} price Price\n\t * @param {number|bool} dp Number of decimals\n\t *\n\t * @returns {string}\n\t */\n\tfunction give_unformat_currency(price, dp) {\n\t\tprice = accounting.unformat(price, give_vars.decimal_separator).toString();\n\t\tdp = ('undefined' === dp ? false : dp);\n\n\t\t// Set default value for number of decimals.\n\t\tif (false !== dp) {\n\t\t\tprice = parseFloat(price).toFixed(dp);\n\t\t} else {\n\n\t\t\t// If price do not have decimal value then set default number of decimals.\n\t\t\tprice = parseFloat(price).toFixed(give_vars.currency_decimals);\n\t\t}\n\n\t\treturn price;\n\t}\n\n\t/**\n\t * List donation screen JS\n\t */\n\n\tvar GiveListDonation = {\n\n\t\tinit: function () {\n\t\t\tthis.deleteSingleDonation();\n\t\t\tthis.resendSingleDonationReceipt();\n\t\t},\n\n\t\tdeleteSingleDonation: function () {\n\t\t\tnew GiveConfirmModal(\n\t\t\t\t{\n\t\t\t\t\ttriggerSelector: '.delete-single-donation',\n\t\t\t\t\tmodalWrapper : 'give-modal--warning',\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: give_vars.confirm_delete_donation,\n\t\t\t\t\t\tdesc: give_vars.delete_payment\n\t\t\t\t\t},\n\t\t\t\t\tsuccessConfirm: function ( args ) {\n\t\t\t\t\t\twindow.location.assign( args.el.attr('href') );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\n\t\tresendSingleDonationReceipt: function () {\n\t\t\tnew GiveConfirmModal(\n\t\t\t\t{\n\t\t\t\t\ttriggerSelector: '.resend-single-donation-receipt',\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: give_vars.confirm_resend,\n\t\t\t\t\t\tdesc: give_vars.resend_receipt\n\t\t\t\t\t},\n\t\t\t\t\tsuccessConfirm: function ( args ) {\n\t\t\t\t\t\twindow.location.assign( args.el.attr('href') );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\t/**\n\t * Edit donation screen JS\n\t */\n\tvar Give_Edit_Donation = {\n\n\t\tinit: function () {\n\t\t\tthis.edit_address();\n\t\t\tthis.add_note();\n\t\t\tthis.remove_note();\n\t\t\tthis.new_donor();\n\t\t\tthis.resend_receipt();\n\t\t\tthis.variable_price_list();\n\t\t},\n\n\t\tedit_address: function () {\n\n\t\t\t// Update base state field based on selected base country.\n\t\t\t$('select[name=\"give-payment-address[0][country]\"]').change(function () {\n\t\t\t\tvar $this = $(this);\n\n\t\t\t\tdata = {\n\t\t\t\t\taction: 'give_get_states',\n\t\t\t\t\tcountry: $this.val(),\n\t\t\t\t\tfield_name: 'give-payment-address[0][state]'\n\t\t\t\t};\n\t\t\t\t$.post(ajaxurl, data, function (response) {\n\n\t\t\t\t\t// Show the states dropdown menu.\n\t\t\t\t\t$this.closest('.column-container').find('#give-order-address-state-wrap').removeClass('give-hidden');\n\n\t\t\t\t\t// Add support to zip fields.\n\t\t\t\t\t$this.closest('.column-container').find('.give-column').removeClass('column-full');\n\t\t\t\t\t$this.closest('.column-container').find('.give-column').addClass('column');\n\n\t\t\t\t\tvar state_wrap = $('#give-order-address-state-wrap');\n\t\t\t\t\tstate_wrap.find('*').not('.order-data-address-line').remove();\n\t\t\t\t\tif (typeof (response.states_found) !== undefined && true === response.states_found) {\n\t\t\t\t\t\tstate_wrap.append(response.data);\n\t\t\t\t\t\tstate_wrap.find('select').chosen();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate_wrap.append('<input type=\"text\" name=\"give-payment-address[0][state]\" value=\"' + response.default_state + '\" class=\"give-edit-toggles medium-text\"/>');\n\n\t\t\t\t\t\tif (typeof (response.show_field) !== undefined && false === response.show_field) {\n\t\t\t\t\t\t\t// Hide the states dropdown menu.\n\t\t\t\t\t\t\t$this.closest('.column-container').find('#give-order-address-state-wrap').addClass('give-hidden');\n\n\t\t\t\t\t\t\t// Add support to zip fields.\n\t\t\t\t\t\t\t$this.closest('.column-container').find('.give-column').addClass('column-full');\n\t\t\t\t\t\t\t$this.closest('.column-container').find('.give-column').removeClass('column');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t},\n\n\t\tadd_note: function () {\n\n\t\t\t$('#give-add-payment-note').on('click', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar postData = {\n\t\t\t\t\taction: 'give_insert_payment_note',\n\t\t\t\t\tpayment_id: $(this).data('payment-id'),\n\t\t\t\t\tnote: $('#give-payment-note').val()\n\t\t\t\t};\n\n\t\t\t\tif (postData.note) {\n\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\tdata: postData,\n\t\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\t\t$('#give-payment-notes-inner').append(response);\n\t\t\t\t\t\t\t$('.give-no-payment-notes').hide();\n\t\t\t\t\t\t\t$('#give-payment-note').val('');\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fail(function (data) {\n\t\t\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\t\t\tconsole.log(data);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t} else {\n\t\t\t\t\tvar border_color = $('#give-payment-note').css('border-color');\n\t\t\t\t\t$('#give-payment-note').css('border-color', 'red');\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t$('#give-payment-note').css('border-color', border_color);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t},\n\n\t\tremove_note: function () {\n\n\t\t\t$('body').on('click', '.give-delete-payment-note', function (e) {\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\tlet that = this;\n\n\t\t\t\tnew GiveConfirmModal(\n\t\t\t\t\t{\n\t\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\t\ttitle: give_vars.confirm_deletion,\n\t\t\t\t\t\t\tdesc: give_vars.delete_payment_note\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccessConfirm: function ( args ) {\n\t\t\t\t\t\t\tvar postData = {\n\t\t\t\t\t\t\t\taction: 'give_delete_payment_note',\n\t\t\t\t\t\t\t\tpayment_id: $(that).data('payment-id'),\n\t\t\t\t\t\t\t\tnote_id: $(that).data('note-id')\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\t\t\tdata: postData,\n\t\t\t\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\t\t\t\t$('#give-payment-note-' + postData.note_id).remove();\n\t\t\t\t\t\t\t\t\tif (!$('.give-payment-note').length) {\n\t\t\t\t\t\t\t\t\t\t$('.give-no-payment-notes').show();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).fail(function (data) {\n\t\t\t\t\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\t\t\t\t\tconsole.log(data);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t).render();\n\t\t\t});\n\n\t\t},\n\n\t\tnew_donor: function () {\n\n\t\t\t$('#give-donor-details').on('click', '.give-payment-new-donor, .give-payment-new-donor-cancel', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$('.donor-info').toggle();\n\t\t\t\t$('.new-donor').toggle();\n\n\t\t\t\tif ($('.new-donor').is(':visible')) {\n\t\t\t\t\t$('#give-new-donor').val(1);\n\t\t\t\t} else {\n\t\t\t\t\t$('#give-new-donor').val(0);\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t},\n\n\t\tresend_receipt: function () {\n\t\t\t$('body').on('click', '#give-resend-receipt', function (e) {\n\t\t\t\treturn confirm(give_vars.resend_receipt);\n\t\t\t});\n\t\t},\n\n\t\tvariable_price_list: function () {\n\t\t\t// Update variable price list when form changes.\n\t\t\t$('#give_payment_form_select').chosen().change(function () {\n\t\t\t\tvar give_form_id,\n\t\t\t\t\tvariable_prices_html_container = $('.give-donation-level');\n\n\t\t\t\t// Check for form ID.\n\t\t\t\tif (!(give_form_id = $(this).val())) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Bailout.\n\t\t\t\tif (!variable_prices_html_container.length) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Ajax.\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tform_id: give_form_id,\n\t\t\t\t\t\tpayment_id: $('input[name=\"give_payment_id\"]').val(),\n\t\t\t\t\t\taction: 'give_check_for_form_price_variations_html'\n\t\t\t\t\t},\n\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\tresponse = response.trim();\n\t\t\t\t\t\tif (response) {\n\n\t\t\t\t\t\t\t// Update Variable price html.\n\t\t\t\t\t\t\tvariable_prices_html_container.html(response);\n\n\t\t\t\t\t\t\t// Add chosen feature to select tag.\n\t\t\t\t\t\t\t$('select[name=\"give-variable-price\"]').chosen().change();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Update Variable price html.\n\t\t\t\t\t\t\tvariable_prices_html_container.html('');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// Add total donation amount if level changes.\n\t\t\t$('#give-donation-overview').on('change', 'select[name=\"give-variable-price\"]', function () {\n\t\t\t\tvar prices = jQuery(this).data('prices'),\n\t\t\t\t\t$total_amount = $('#give-payment-total');\n\n\t\t\t\tif ('' !== prices && $(this).val() in prices) {\n\n\t\t\t\t\t$total_amount.val(prices[$(this).val()]).css('background-color', 'yellow');\n\n\t\t\t\t\twindow.setTimeout(\n\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t$total_amount.css('background-color', 'white');\n\t\t\t\t\t\t},\n\t\t\t\t\t\t1000\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t};\n\n\t/**\n\t * Settings screen JS\n\t */\n\tvar Give_Settings = {\n\n\t\tinit: function () {\n\t\t\tthis.setting_change_country();\n\t\t\tthis.toggle_options();\n\t\t\tthis.main_setting_update_notice();\n\t\t\tthis.verify_settings();\n\t\t\tthis.saveButtonTriggered();\n\t\t\tthis.changeAlert();\n\t\t\tthis.detectSettingsChange();\n\t\t\tthis.sequentialDonationIDPreview();\n\t\t},\n\n\t\t/**\n\t\t * Fire when user change the country from the dropdown\n\t\t *\n\t\t * @since 1.8.14\n\t\t */\n\t\tsetting_change_country: function () {\n\t\t\t$('select[name=\"base_country\"]').change(function () {\n\t\t\t\tvar $this = $(this);\n\t\t\t\tvar data = {\n\t\t\t\t\taction: 'give_get_states',\n\t\t\t\t\tcountry: $this.val(),\n\t\t\t\t\tfield_name: 'base_state',\n\t\t\t\t};\n\n\t\t\t\t$.post(ajaxurl, data, function (response) {\n\t\t\t\t\t// Show the states dropdown menu.\n\t\t\t\t\t$this.closest('tr').next().show();\n\t\t\t\t\tif (typeof (response.states_found) != undefined && true == response.states_found) {\n\t\t\t\t\t\t$(':input[name=\"base_state\"]').replaceWith(response.data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (typeof (response.show_field) != undefined && false == response.show_field) {\n\t\t\t\t\t\t\t// Hide the states dropdown menu.\n\t\t\t\t\t\t\t$this.closest('tr').next().hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$(':input[name=\"base_state\"]').replaceWith('<input type=\"text\" name=\"' + data.field_name + '\" value=\"' + response.default_state + '\" class=\"give-edit-toggles medium-text\"/>');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn false;\n\t\t\t});\n\t\t},\n\n\t\ttoggle_options: function () {\n\n\t\t\t/**\n\t\t\t * Email access\n\t\t\t */\n\t\t\tvar emailAccess = $('input[name=\"email_access\"]', '.give-setting-tab-body-general');\n\t\t\temailAccess.on('change', function () {\n\t\t\t\tvar fieldValueEmail = $('input[name=\"email_access\"]:checked', '.give-setting-tab-body-general').val();\n\t\t\t\tvar fieldValueRecaptcha = $('input[name=\"enable_recaptcha\"]:checked', '.give-setting-tab-body-general').val();\n\t\t\t\tif ('enabled' === fieldValueEmail) {\n\t\t\t\t\t$('input[name=\"enable_recaptcha\"]').parents('tr').show();\n\n\t\t\t\t\tif ('enabled' === fieldValueRecaptcha) {\n\t\t\t\t\t\t$('#recaptcha_key').parents('tr').show();\n\t\t\t\t\t\t$('#recaptcha_secret').parents('tr').show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$('#recaptcha_key').parents('tr').hide();\n\t\t\t\t\t\t$('#recaptcha_secret').parents('tr').hide();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$('#recaptcha_key').parents('tr').hide();\n\t\t\t\t\t$('#recaptcha_secret').parents('tr').hide();\n\t\t\t\t\t$('input[name=\"enable_recaptcha\"]').parents('tr').hide();\n\t\t\t\t}\n\t\t\t}).change();\n\n\t\t\t/**\n\t\t\t * Email reCAPTCHA\n\t\t\t */\n\t\t\tvar recaptcha = $('input[name=\"enable_recaptcha\"]', '.give-setting-tab-body-general');\n\t\t\trecaptcha.on('change', function () {\n\t\t\t\tvar fieldValueEmail = $('input[name=\"email_access\"]:checked', '.give-setting-tab-body-general').val();\n\t\t\t\tvar fieldValueRecaptcha = $('input[name=\"enable_recaptcha\"]:checked', '.give-setting-tab-body-general').val();\n\n\t\t\t\tif ('enabled' === fieldValueEmail && 'enabled' === fieldValueRecaptcha) {\n\t\t\t\t\t$('#recaptcha_key').parents('tr').show();\n\t\t\t\t\t$('#recaptcha_secret').parents('tr').show();\n\t\t\t\t} else {\n\t\t\t\t\t$('#recaptcha_key').parents('tr').hide();\n\t\t\t\t\t$('#recaptcha_secret').parents('tr').hide();\n\t\t\t\t}\n\t\t\t}).change();\n\n\t\t\t/**\n\t\t\t * Form featured image\n\t\t\t */\n\t\t\tvar form_featured_image = $('input[name=\"form_featured_img\"]', '.give-setting-tab-body-display');\n\t\t\tform_featured_image.on('change', function () {\n\t\t\t\tvar field_value = $('input[name=\"form_featured_img\"]:checked', '.give-setting-tab-body-display').val();\n\t\t\t\tif ('enabled' === field_value) {\n\t\t\t\t\t$('#featured_image_size').parents('tr').show();\n\t\t\t\t} else {\n\t\t\t\t\t$('#featured_image_size').parents('tr').hide();\n\t\t\t\t}\n\t\t\t}).change();\n\n\t\t\t/**\n\t\t\t * Terms and Conditions\n\t\t\t */\n\t\t\tvar terms_and_conditions = $('input[name=\"terms\"]', '.give-setting-tab-body-display');\n\t\t\tterms_and_conditions.on('change', function () {\n\t\t\t\tvar field_value = $('input[name=\"terms\"]:checked', '.give-setting-tab-body-display').val();\n\t\t\t\tif ('enabled' === field_value) {\n\t\t\t\t\t$('#agree_to_terms_label').parents('tr').show();\n\t\t\t\t\t$('#wp-agreement_text-wrap').parents('tr').show();\n\t\t\t\t} else {\n\t\t\t\t\t$('#agree_to_terms_label').parents('tr').hide();\n\t\t\t\t\t$('#wp-agreement_text-wrap').parents('tr').hide();\n\t\t\t\t}\n\t\t\t}).change();\n\n\t\t\t/**\n\t\t\t * Disable admin notification\n\t\t\t */\n\t\t\tvar admin_notification = $('input[name=\"admin_notices\"]', '.give-setting-tab-body-emails');\n\t\t\tadmin_notification.on('change', function () {\n\t\t\t\tvar field_value = $('input[name=\"admin_notices\"]:checked', '.give-setting-tab-body-emails').val();\n\t\t\t\tif ('enabled' === field_value) {\n\t\t\t\t\t$('#donation_notification_subject').parents('tr').show();\n\t\t\t\t\t$('#wp-donation_notification-wrap').parents('tr').show();\n\t\t\t\t\t$('#admin_notice_emails').parents('tr').show();\n\t\t\t\t} else {\n\t\t\t\t\t$('#donation_notification_subject').parents('tr').hide();\n\t\t\t\t\t$('#wp-donation_notification-wrap').parents('tr').hide();\n\t\t\t\t\t$('#admin_notice_emails').parents('tr').hide();\n\t\t\t\t}\n\t\t\t}).change();\n\n\t\t\t/**\n\t\t\t * Toggle sequential ordering settings\n\t\t\t */\n\t\t\tvar sequential_ordering = $('input[name=\"sequential-ordering_status\"]', '.give-setting-tab-body-general');\n\t\t\tsequential_ordering.on('change', function () {\n\t\t\t\tvar field_value = $('input[name=\"sequential-ordering_status\"]:checked', '.give-setting-tab-body-general').val(),\n\t\t\t\t\t$parent = $(this).closest('table');\n\t\t\t\tif ('enabled' === field_value) {\n\t\t\t\t\t$('input', $parent).not( 'input[name=\"sequential-ordering_status\"]' ).parents('tr').show();\n\t\t\t\t} else {\n\t\t\t\t\t$('input', $parent).not( 'input[name=\"sequential-ordering_status\"]' ).parents('tr').hide();\n\t\t\t\t}\n\t\t\t}).change();\n\t\t},\n\n\t\tmain_setting_update_notice: function () {\n\t\t\tvar $setting_message = $('#setting-error-give-setting-updated');\n\t\t\tif ($setting_message.length) {\n\n\t\t\t\t// auto hide setting message in 5 seconds.\n\t\t\t\twindow.setTimeout(\n\t\t\t\t\tfunction () {\n\t\t\t\t\t\t$setting_message.slideUp();\n\t\t\t\t\t},\n\t\t\t\t\t5000\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\n\t\tverify_settings: function () {\n\t\t\tvar success_setting = $('#success_page');\n\t\t\tvar failure_setting = $('#failure_page');\n\n\t\t\t/**\n\t\t\t * Verify success and failure page.\n\t\t\t */\n\t\t\tsuccess_setting.add(failure_setting).change(function () {\n\t\t\t\tif (success_setting.val() === failure_setting.val()) {\n\t\t\t\t\tvar notice_html = '<div id=\"setting-error-give-matched-success-failure-page\" class=\"updated settings-error notice is-dismissible\"> <p><strong>' + give_vars.matched_success_failure_page + '</strong></p> <button type=\"button\" class=\"notice-dismiss\"><span class=\"screen-reader-text\">' + give_vars.dismiss_notice_text + '</span></button> </div>',\n\t\t\t\t\t\t$notice_container = $('#setting-error-give-matched-success-failure-page');\n\n\t\t\t\t\t// Unset setting field.\n\t\t\t\t\t$(this).val('');\n\n\t\t\t\t\t// Bailout.\n\t\t\t\t\tif ($notice_container.length) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add html.\n\t\t\t\t\t$('h1', '#give-mainform').after(notice_html);\n\t\t\t\t\t$notice_container = $('#setting-error-give-matched-success-failure-page');\n\n\t\t\t\t\t// Add event to dismiss button.\n\t\t\t\t\t$('.notice-dismiss', $notice_container).click(function () {\n\t\t\t\t\t\t$notice_container.remove();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}).change();\n\t\t},\n\n\t\tsaveButtonTriggered: function () {\n\t\t\t$('.give-settings-setting-page').on('click', '.give-save-button', function () {\n\t\t\t\t$(window).unbind('beforeunload');\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Show alert when admin try to reload the page with saving the changes.\n\t\t *\n\t\t * @since 1.8.14\n\t\t */\n\t\tchangeAlert: function () {\n\n\t\t\t$(window).bind('beforeunload', function (e) {\n\n\t\t\t\tvar confirmationMessage = give_vars.setting_not_save_message;\n\n\t\t\t\tif (give_setting_edit) {\n\t\t\t\t\t(e || window.event).returnValue = confirmationMessage; //Gecko + IE.\n\t\t\t\t\treturn confirmationMessage; //Webkit, Safari, Chrome.\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Display alert in setting page of give if user try to reload the page with saving the changes.\n\t\t *\n\t\t * @since 1.8.14\n\t\t */\n\t\tdetectSettingsChange: function () {\n\n\t\t\tvar settingsPage = $('.give-settings-setting-page');\n\n\t\t\t// Check if it give setting page or not.\n\t\t\tif (settingsPage.length > 0) {\n\n\t\t\t\t// Get the default value.\n\t\t\t\tvar on_load_value = $('#give-mainform').serialize();\n\n\t\t\t\t/**\n\t\t\t\t * Keyup event add to support to text box and textarea.\n\t\t\t\t * blur event add to support to dropdown.\n\t\t\t\t * Change event add to support to rest all element.\n\t\t\t\t */\n\t\t\t\tsettingsPage.on('change keyup blur', 'form', function () {\n\t\t\t\t\t// Get the form value after change.\n\t\t\t\t\tvar on_change_value = $('#give-mainform').serialize();\n\n\t\t\t\t\t// If both the value are same then no change has being made else change has being made.\n\t\t\t\t\tgive_setting_edit = (on_load_value !== on_change_value) ? true : false;\n\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Render donation id for sequential ordering.\n\t\t *\n\t\t * @since 2.1.0\n\t\t */\n\t\tsequentialDonationIDPreview: function(){\n\t\t\tconst $previewField = jQuery('#sequential-ordering_preview');\n\n\t\t\t// Bailout.\n\t\t\tif( ! $previewField.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tjQuery( '#sequential-ordering_number_prefix, #sequential-ordering_number, #sequential-ordering_number_padding, #sequential-ordering_number_suffix' ).on( 'keyup change', function(){\n\t\t\t\tconst prefix =jQuery('#sequential-ordering_number_prefix').val(),\n\t\t\t\t\tstartingNumber =jQuery('#sequential-ordering_number').val().trim() || '1',\n\t\t\t\t\tnumberPadding = jQuery('#sequential-ordering_number_padding').val().trim(),\n\t\t\t\t\tsuffix = jQuery('#sequential-ordering_number_suffix').val(),\n\t\t\t\t\t$donationID = `${prefix}${startingNumber.padStart( numberPadding, '0' ) }${suffix}`;\n\n\t\t\t\t$previewField.val($donationID);\n\t\t\t});\n\n\t\t\tjQuery( '#sequential-ordering_number_prefix' ).trigger('keyup');\n\n\t\t\tjQuery( '#sequential-ordering_number_prefix, #sequential-ordering_number_suffix' ).on( 'blur', function(){\n\t\t\t\t$(this).val( $(this).val().replace( new RegExp( ' ', 'g' ), '-' ) );\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Reports / Exports / Tools screen JS\n\t */\n\tvar Give_Reports = {\n\n\t\tinit: function () {\n\t\t\tthis.date_options();\n\t\t\tthis.donors_export();\n\t\t\tthis.recount_stats();\n\t\t},\n\n\t\tdate_options: function () {\n\n\t\t\t// Show hide extended date options.\n\t\t\t$('#give-graphs-date-options').change(function () {\n\t\t\t\tvar $this = $(this);\n\t\t\t\tif ('other' === $this.val()) {\n\t\t\t\t\t$('#give-date-range-options').show();\n\t\t\t\t} else {\n\t\t\t\t\t$('#give-date-range-options').hide();\n\t\t\t\t}\n\t\t\t});\n\n\t\t},\n\n\t\tdonors_export: function () {\n\n\t\t\t// Show / hide Donation Form option when exporting donors.\n\t\t\t$('#give_donor_export_form').change(function () {\n\n\t\t\t\tvar $this = $(this),\n\t\t\t\t\tform_id = $('option:selected', $this).val(),\n\t\t\t\t\tcustomer_export_option = $('#give_customer_export_option');\n\n\t\t\t\tif ('0' === $this.val()) {\n\t\t\t\t\tcustomer_export_option.show();\n\t\t\t\t} else {\n\t\t\t\t\tcustomer_export_option.hide();\n\t\t\t\t}\n\n\t\t\t\tvar price_options_select = $('.give_price_options_select');\n\n\t\t\t\t// On Form Select, Check if Variable Prices Exist.\n\t\t\t\tif (parseInt(form_id) != 0) {\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\taction: 'give_check_for_form_price_variations',\n\t\t\t\t\t\tform_id: form_id,\n\t\t\t\t\t\tall_prices: true\n\t\t\t\t\t};\n\n\t\t\t\t\t$.post(ajaxurl, data, function (response) {\n\t\t\t\t\t\tprice_options_select.remove();\n\t\t\t\t\t\t$('#give_donor_export_form_chosen').after(response);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tprice_options_select.remove();\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t},\n\n\t\trecount_stats: function () {\n\n\t\t\t$('body').on('change', '#recount-stats-type', function () {\n\n\t\t\t\tvar export_form = $('#give-tools-recount-form');\n\t\t\t\tvar selected_type = $('option:selected', this).data('type');\n\t\t\t\tvar submit_button = $('#recount-stats-submit');\n\t\t\t\tvar forms = $('.tools-form-dropdown');\n\n\t\t\t\t// Reset the form\n\t\t\t\texport_form.find('.notice-wrap').remove();\n\t\t\t\tsubmit_button.removeClass('button-disabled').attr('disabled', false);\n\t\t\t\tforms.hide();\n\t\t\t\t$('.give-recount-stats-descriptions span').hide();\n\n\t\t\t\tif ('reset-stats' === selected_type) {\n\t\t\t\t\texport_form.append('<div class=\"notice-wrap\"></div>');\n\t\t\t\t\tvar notice_wrap = export_form.find('.notice-wrap');\n\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-warning\"><p><input type=\"checkbox\" id=\"confirm-reset\" name=\"confirm_reset_store\" value=\"1\" /> <label for=\"confirm-reset\">' + give_vars.reset_stats_warn + '</label></p></div>');\n\t\t\t\t\tsubmit_button.addClass('button-disabled').attr('disabled', 'disabled');\n\n\t\t\t\t\t// Add check when admin try to delete all the test donors.\n\t\t\t\t} else if ('delete-test-donors' === selected_type) {\n\t\t\t\t\texport_form.append('<div class=\"notice-wrap\"></div>');\n\t\t\t\t\tvar notice_wrap = export_form.find('.notice-wrap');\n\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-warning\"><p><input type=\"checkbox\" id=\"confirm-reset\" name=\"confirm_reset_store\" value=\"1\" /> <label for=\"confirm-reset\">' + give_vars.delete_test_donor + '</label></p></div>');\n\t\t\t\t\tsubmit_button.addClass('button-disabled').attr('disabled', 'disabled');\n\t\t\t\t\t// Add check when admin try to delete all the imported donations.\n\t\t\t\t} else if ('delete-import-donors' === selected_type) {\n\n\t\t\t\t\texport_form.append('<div class=\"notice-wrap\"></div>');\n\t\t\t\t\tvar notice_wrap = export_form.find('.notice-wrap');\n\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-warning\"><p><input type=\"checkbox\" id=\"confirm-reset\" name=\"confirm_reset_store\" value=\"1\" /> <label for=\"confirm-reset\">' + give_vars.delete_import_donor + '</label></p></div>');\n\t\t\t\t\tsubmit_button.addClass('button-disabled').attr('disabled', 'disabled');\n\t\t\t\t} else {\n\t\t\t\t\tforms.hide();\n\t\t\t\t\tforms.val(0);\n\t\t\t\t}\n\n\t\t\t\tvar current_forms = $('.tools-form-dropdown-' + selected_type);\n\t\t\t\tcurrent_forms.show();\n\t\t\t\tcurrent_forms.find('.give-select-chosen').css({\n\t\t\t\t\t'width': 'auto',\n\t\t\t\t\t'min-width': '250px'\n\t\t\t\t});\n\t\t\t\t$('#' + selected_type).show();\n\t\t\t});\n\n\t\t\t$('body').on('change', '#confirm-reset', function () {\n\t\t\t\tvar checked = $(this).is(':checked');\n\t\t\t\tif (checked) {\n\t\t\t\t\t$('#recount-stats-submit').removeClass('button-disabled').removeAttr('disabled');\n\t\t\t\t} else {\n\t\t\t\t\t$('#recount-stats-submit').addClass('button-disabled').attr('disabled', 'disabled');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$('#give-tools-recount-form').submit(function (e) {\n\t\t\t\tvar selection = $('#recount-stats-type').val();\n\t\t\t\tvar export_form = $(this);\n\t\t\t\tvar selected_type = $('option:selected', this).data('type');\n\n\t\t\t\tif ('reset-stats' === selected_type) {\n\t\t\t\t\tvar is_confirmed = $('#confirm-reset').is(':checked');\n\t\t\t\t\tif (is_confirmed) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\thas_errors = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\texport_form.find('.notice-wrap').remove();\n\n\t\t\t\texport_form.append('<div class=\"notice-wrap\"></div>');\n\t\t\t\tvar notice_wrap = export_form.find('.notice-wrap');\n\t\t\t\tvar has_errors = false;\n\n\t\t\t\tif (null === selection || 0 === selection) {\n\t\t\t\t\t// Needs to pick a method give_vars.batch_export_no_class.\n\t\t\t\t\tnotice_wrap.html('<div class=\"updated error\"><p>' + give_vars.batch_export_no_class + '</p></div>');\n\t\t\t\t\thas_errors = true;\n\t\t\t\t}\n\n\t\t\t\tif ('recount-form' === selected_type) {\n\n\t\t\t\t\tvar selected_form = $('select[name=\"form_id\"]').val();\n\t\t\t\t\tif (selected_form == 0) {\n\t\t\t\t\t\t// Needs to pick give_vars.batch_export_no_reqs.\n\t\t\t\t\t\tnotice_wrap.html('<div class=\"updated error\"><p>' + give_vars.batch_export_no_reqs + '</p></div>');\n\t\t\t\t\t\thas_errors = true;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif (has_errors) {\n\t\t\t\t\texport_form.find('.button-disabled').removeClass('button-disabled');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t};\n\n\t/**\n\t * Export screen JS\n\t */\n\tvar Give_Export = {\n\n\t\tinit: function () {\n\t\t\tthis.submit();\n\t\t\tthis.dismiss_message();\n\t\t},\n\n\t\tsubmit: function () {\n\n\t\t\tvar self = this;\n\n\t\t\t$(document.body).on('submit', '.give-export-form', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvar submitButton = $(this).find('input[type=\"submit\"]');\n\n\t\t\t\tif (!submitButton.hasClass('button-disabled')) {\n\n\t\t\t\t\tvar data = $(this).serialize();\n\n\t\t\t\t\tsubmitButton.addClass('button-disabled');\n\t\t\t\t\t$('form.give-export-form select').attr('disabled', true).trigger('chosen:updated');\n\n\t\t\t\t\tvar parent_notices = $( this );\n\n\t\t\t\t\t// show notices inside add-notices class\n\t\t\t\t\tif ( $( this ).find( '.add-notices' ).length > 0 ) {\n\t\t\t\t\t\tparent_notices = $( this ).find( '.add-notices' );\n\t\t\t\t\t}\n\n\t\t\t\t\tparent_notices.find('.notice-wrap').remove();\n\t\t\t\t\tparent_notices.append('<div class=\"notice-wrap give-clearfix\"><span class=\"spinner is-active\"></span><div class=\"give-progress\"><div></div></div></div>');\n\n\t\t\t\t\t// start the process\n\t\t\t\t\tself.process_step(1, data, self, this );\n\n\t\t\t\t}\n\n\t\t\t});\n\t\t},\n\n\t\tprocess_step: function (step, data, self, form) {\n\t\t\t/**\n\t\t\t * Do not allow user to reload the page\n\t\t\t *\n\t\t\t * @since 1.8.14\n\t\t\t */\n\t\t\tgive_setting_edit = true;\n\n\t\t\tvar reset_form = false;\n\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: ajaxurl,\n\t\t\t\tdata: {\n\t\t\t\t\tform: data,\n\t\t\t\t\taction: 'give_do_ajax_export',\n\t\t\t\t\tstep: step,\n\t\t\t\t},\n\t\t\t\tdataType: 'json',\n\t\t\t\tsuccess: function (response) {\n\n\t\t\t\t\tif ('done' == response.step || response.error || response.success) {\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Now allow user to reload the page\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @since 1.8.14\n\t\t\t\t\t\t */\n\t\t\t\t\t\tgive_setting_edit = false;\n\n\t\t\t\t\t\treset_form = true;\n\n\t\t\t\t\t\t// We need to get the actual in progress form, not all forms on the page\n\t\t\t\t\t\tvar notice_wrap = $( form ).parent().find('.notice-wrap');\n\t\t\t\t\t\tvar export_form = notice_wrap.find('.give-progress');\n\n\n\t\t\t\t\t\t$( form ).find('.button-disabled').removeClass('button-disabled');\n\t\t\t\t\t\t$( form ).find('select').attr('disabled', false).trigger('chosen:updated');\n\n\t\t\t\t\t\tif (response.error) {\n\t\t\t\t\t\t\tvar error_message = response.message;\n\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"updated error\"><p>' + error_message + '</p></div>');\n\t\t\t\t\t\t} else if (response.success) {\n\t\t\t\t\t\t\tvar success_message = response.message;\n\t\t\t\t\t\t\tnotice_wrap.html('<div id=\"give-batch-success\" class=\"updated notice is-dismissible\"><p>' + success_message + '<span class=\"notice-dismiss\"></span></p></div>');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnotice_wrap.remove();\n\t\t\t\t\t\t\twindow.location = response.url;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$('.give-progress div').animate({\n\t\t\t\t\t\t\twidth: response.percentage + '%',\n\t\t\t\t\t\t}, 50, function () {\n\t\t\t\t\t\t\t// Animation complete.\n\t\t\t\t\t\t});\n\t\t\t\t\t\tself.process_step(parseInt(response.step), data, self, form);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( true === reset_form && $( '#give-tools-recount-form' ).length > 0 ) {\n\t\t\t\t\t\t// Reset the form for preventing multiple ajax request.\n\t\t\t\t\t\t$('#give-tools-recount-form')[0].reset();\n\t\t\t\t\t\t$('#give-tools-recount-form .tools-form-dropdown').hide();\n\t\t\t\t\t\t$('#give-tools-recount-form .tools-form-dropdown-recount-form-select').val('0').trigger('chosen:updated');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).fail(function (response) {\n\t\t\t\t/**\n\t\t\t\t * Now allow user to reload the page\n\t\t\t\t *\n\t\t\t\t * @since 1.8.14\n\t\t\t\t */\n\t\t\t\tgive_setting_edit = false;\n\n\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\tconsole.log(response);\n\t\t\t\t}\n\t\t\t\t$('.notice-wrap').append(response.responseText);\n\t\t\t});\n\t\t},\n\n\t\tdismiss_message: function () {\n\t\t\t$('body').on('click', '#give-batch-success .notice-dismiss', function () {\n\t\t\t\t$('#give-batch-success').parent().slideUp('fast');\n\t\t\t});\n\t\t}\n\n\t};\n\n\t/**\n\t * Updates screen JS\n\t */\n\tvar Give_Updates = {\n\t\tel: {},\n\n\t\tinit: function () {\n\t\t\tthis.submit();\n\t\t\tthis.dismiss_message();\n\t\t},\n\n\t\tsubmit: function () {\n\t\t\tvar $self = this, step = 1, resume_update_step = 0;\n\n\t\t\t$self.el.main_container = Give_Selector_Cache.get('#give-db-updates');\n\t\t\t$self.el.update_link = Give_Selector_Cache.get('.give-update-now', $self.el.main_container);\n\t\t\t$self.el.run_upload_container = Give_Selector_Cache.get('.give-run-database-update', $self.el.progress_main_container);\n\t\t\t$self.el.progress_main_container = Give_Selector_Cache.get('.progress-container', $self.el.main_container);\n\t\t\t$self.el.heading = Give_Selector_Cache.get('.update-message', $self.el.progress_main_container);\n\t\t\t$self.el.progress_container = Give_Selector_Cache.get('.progress-content', $self.el.progress_main_container);\n\t\t\t$self.el.update_progress_counter = Give_Selector_Cache.get($('.give-update-progress-count'));\n\n\t\t\tif ($self.el.main_container.data('resume-update')) {\n\t\t\t\t$self.el.update_link.addClass('active').hide().removeClass('give-hidden');\n\n\t\t\t\tif (!$('#give-restart-upgrades').length) {\n\t\t\t\t\twindow.setTimeout(Give_Updates.get_db_updates_info, 1000, $self);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Bailout.\n\t\t\tif ($self.el.update_link.hasClass('active')) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$self.el.update_link.on('click', '', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t$self.el.run_upload_container.find('.notice').remove();\n\t\t\t\t$self.el.run_upload_container.append('<div class=\"notice notice-error non-dismissible give-run-update-containt\"><p> <a href=\"#\" class=\"give-run-update-button button\">' + give_vars.db_update_confirmation_msg_button + '</a> ' + give_vars.db_update_confirmation_msg + '</p></div>');\n\t\t\t});\n\n\t\t\t$('#give-db-updates').on('click', 'a.give-run-update-button', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tif ($(this).hasClass('active')) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$(this).addClass('active').fadeOut();\n\t\t\t\t$self.el.update_link.addClass('active').fadeOut();\n\t\t\t\t$('#give-db-updates .give-run-update-containt').slideUp();\n\n\t\t\t\t$self.el.progress_container.find('.notice-wrap').remove();\n\t\t\t\t$self.el.progress_container.append('<div class=\"notice-wrap give-clearfix\"><span class=\"spinner is-active\"></span><div class=\"give-progress\"><div></div></div></div>');\n\t\t\t\t$self.el.progress_main_container.removeClass('give-hidden');\n\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\taction: 'give_run_db_updates',\n\t\t\t\t\t\trun_db_update: 1\n\t\t\t\t\t},\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: function (response) {\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\twindow.setTimeout(Give_Updates.get_db_updates_info, 500, $self);\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t},\n\n\t\tget_db_updates_info: function ($self) {\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: ajaxurl,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'give_db_updates_info',\n\t\t\t\t},\n\t\t\t\tdataType: 'json',\n\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t// We need to get the actual in progress form, not all forms on the page.\n\t\t\t\t\tvar notice_wrap = Give_Selector_Cache.get('.notice-wrap', $self.el.progress_container, true);\n\n\t\t\t\t\tif (-1 !== $.inArray('success', Object.keys(response))) {\n\t\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t\tif ($self.el.update_progress_counter.length) {\n\t\t\t\t\t\t\t\t$self.el.update_progress_counter.text('100%');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Update steps info.\n\t\t\t\t\t\t\tif (-1 !== $.inArray('heading', Object.keys(response.data))) {\n\t\t\t\t\t\t\t\t$self.el.heading.html('<strong>' + response.data.heading + '</strong>');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$self.el.update_link.closest('p').remove();\n\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-success is-dismissible\"><p>' + response.data.message + '</p><button type=\"button\" class=\"notice-dismiss\"></button></div>');\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Update steps info.\n\t\t\t\t\t\t\tif (-1 !== $.inArray('heading', Object.keys(response.data))) {\n\t\t\t\t\t\t\t\t$self.el.heading.html('<strong>' + response.data.heading + '</strong>');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (response.data.message) {\n\t\t\t\t\t\t\t\t$self.el.update_link.closest('p').remove();\n\t\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-error is-dismissible\"><p>' + response.data.message + '</p><button type=\"button\" class=\"notice-dismiss\"></button></div>');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t\t$self.el.update_link.removeClass('active').show();\n\t\t\t\t\t\t\t\t\t$self.el.progress_main_container.addClass('give-hidden');\n\t\t\t\t\t\t\t\t}, 1000);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (response && -1 !== $.inArray('percentage', Object.keys(response.data))) {\n\t\t\t\t\t\t\tif ($self.el.update_progress_counter.length) {\n\t\t\t\t\t\t\t\t$self.el.update_progress_counter.text(response.data.total_percentage + '%');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Update steps info.\n\t\t\t\t\t\t\tif (-1 !== $.inArray('heading', Object.keys(response.data))) {\n\t\t\t\t\t\t\t\t$self.el.heading.html('<strong>' + response.data.heading + '</strong>');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Update progress.\n\t\t\t\t\t\t\t$('.give-progress div', '#give-db-updates').animate({\n\t\t\t\t\t\t\t\twidth: response.data.percentage + '%',\n\t\t\t\t\t\t\t}, 50, function () {\n\t\t\t\t\t\t\t\t// Animation complete.\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\twindow.setTimeout(Give_Updates.get_db_updates_info, 1000, $self);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-error\"><p>' + give_vars.updates.ajax_error + '</p></div>');\n\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t$self.el.update_link.removeClass('active').show();\n\t\t\t\t\t\t\t\t$self.el.progress_main_container.addClass('give-hidden');\n\t\t\t\t\t\t\t}, 1000);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tprocess_step: function (step, update, $self) {\n\n\t\t\tgive_setting_edit = true;\n\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: ajaxurl,\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'give_do_ajax_updates',\n\t\t\t\t\tstep: parseInt(step),\n\t\t\t\t\tupdate: parseInt(update)\n\t\t\t\t},\n\t\t\t\tdataType: 'json',\n\t\t\t\tsuccess: function (response) {\n\t\t\t\t\tgive_setting_edit = false;\n\n\t\t\t\t\t// We need to get the actual in progress form, not all forms on the page.\n\t\t\t\t\tvar notice_wrap = Give_Selector_Cache.get('.notice-wrap', $self.el.progress_container, true);\n\n\t\t\t\t\tif (-1 !== $.inArray('success', Object.keys(response))) {\n\t\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t\t// Update steps info.\n\t\t\t\t\t\t\tif (-1 !== $.inArray('heading', Object.keys(response.data))) {\n\t\t\t\t\t\t\t\t$self.el.heading.html('<strong>' + response.data.heading + '</strong>');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$self.el.update_link.closest('p').remove();\n\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-success is-dismissible\"><p>' + response.data.message + '</p><button type=\"button\" class=\"notice-dismiss\"></button></div>');\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Update steps info.\n\t\t\t\t\t\t\tif (-1 !== $.inArray('heading', Object.keys(response.data))) {\n\t\t\t\t\t\t\t\t$self.el.heading.html('<strong>' + response.data.heading + '</strong>');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-error\"><p>' + response.data.message + '</p></div>');\n\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t$self.el.update_link.removeClass('active').show();\n\t\t\t\t\t\t\t\t$self.el.progress_main_container.addClass('give-hidden');\n\t\t\t\t\t\t\t}, 5000);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (response && -1 !== $.inArray('percentage', Object.keys(response.data))) {\n\t\t\t\t\t\t\t// Update progress.\n\t\t\t\t\t\t\t$('.give-progress div', '#give-db-updates').animate({\n\t\t\t\t\t\t\t\twidth: response.data.percentage + '%',\n\t\t\t\t\t\t\t}, 50, function () {\n\t\t\t\t\t\t\t\t// Animation complete.\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// Update steps info.\n\t\t\t\t\t\t\tif (-1 !== $.inArray('heading', Object.keys(response.data))) {\n\t\t\t\t\t\t\t\t$self.el.heading.html('<strong>' + response.data.heading.replace('{update_count}', $self.el.heading.data('update-count')) + '</strong>');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$self.process_step(parseInt(response.data.step), response.data.update, $self);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnotice_wrap.html('<div class=\"notice notice-error\"><p>' + give_vars.updates.ajax_error + '</p></div>');\n\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t$self.el.update_link.removeClass('active').show();\n\t\t\t\t\t\t\t\t$self.el.progress_main_container.addClass('give-hidden');\n\t\t\t\t\t\t\t}, 5000);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}).fail(function (response) {\n\n\t\t\t\tgive_setting_edit = false;\n\n\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\tconsole.log(response);\n\t\t\t\t}\n\n\t\t\t\tGive_Selector_Cache.get('.notice-wrap', self.el.progress_container).append(response.responseText);\n\n\t\t\t}).always(function () {\n\t\t\t});\n\n\t\t},\n\n\t\tdismiss_message: function () {\n\t\t\t$('body').on('click', '#poststuff .notice-dismiss', function () {\n\t\t\t\t$(this).parent().slideUp('fast');\n\t\t\t});\n\t\t}\n\n\t};\n\n\n\t/**\n\t * Give Upgrader\n\t */\n\tvar Give_Upgrades = {\n\t\tinit: function() {\n\t\t\tthis.restartUpgrade();\n\t\t\tthis.stopUpgrade();\n\t\t\tthis.restartUpdater();\n\t\t},\n\n\t\t/**\n\t\t * Function to restart the upgrade process.\n\t\t */\n\t\trestartUpgrade: function() {\n\t\t\tjQuery( '#give-restart-upgrades' ).click( 'click', function ( e ) {\n\n\t\t\t\tlet that = this;\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\tjQuery( '.give-doing-update-text-p' ).show();\n\t\t\t\tjQuery( '.give-update-paused-text-p' ).hide();\n\n\t\t\t\tnew GiveConfirmModal(\n\t\t\t\t\t{\n\t\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\t\ttitle: give_vars.confirm_action,\n\t\t\t\t\t\t\tdesc: give_vars.restart_upgrade,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccessConfirm: function () {\n\t\t\t\t\t\t\twindow.location.assign( jQuery( that ).data( 'redirect-url' ) );\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t).render();\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Function to pause the upgrade process.\n\t\t */\n\t\tstopUpgrade: function() {\n\t\t\tjQuery( '#give-pause-upgrades' ).click( 'click', function ( e ) {\n\t\t\t\tlet that = this;\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\tjQuery('.give-doing-update-text-p').hide();\n\t\t\t\tjQuery('.give-update-paused-text-p').show();\n\n\n\t\t\t\tnew GiveConfirmModal(\n\t\t\t\t\t{\n\t\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\t\ttitle: give_vars.confirm_action,\n\t\t\t\t\t\t\tdesc: give_vars.stop_upgrade,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccessConfirm: function () {\n\t\t\t\t\t\t\twindow.location.assign( jQuery( that ).data( 'redirect-url' ) );\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t).render();\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Function to restart the update process.\n\t\t */\n\t\trestartUpdater: function() {\n\t\t\tjQuery( '.give-restart-updater-btn,.give-run-update-now' ).click( 'click', function ( e ) {\n\n\t\t\t\tlet that = this;\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\tnew GiveConfirmModal(\n\t\t\t\t\t{\n\t\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\t\ttitle: give_vars.confirm_action,\n\t\t\t\t\t\t\tdesc: give_vars.restart_update,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccessConfirm: function () {\n\t\t\t\t\t\t\twindow.location.assign( jQuery( that ).attr( 'href' ) );\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t).render();\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Admin Status Select Field Change\n\t *\n\t * @description: Handle status switching\n\t * @since: 1.0\n\t */\n\tvar handle_status_change = function () {\n\n\t\t$('select[name=\"give-payment-status\"]').on('change', function () {\n\n\t\t\tvar status = $(this).val();\n\n\t\t\t$('.give-donation-status').removeClass(function (index, css) {\n\t\t\t\treturn (css.match(/\\bstatus-\\S+/g) || []).join(' ');\n\t\t\t}).addClass('status-' + status);\n\n\t\t});\n\n\t};\n\n\t/**\n\t * Donor management screen JS\n\t */\n\tvar GiveDonor = {\n\n\t\tinit: function () {\n\t\t\tthis.unlockDonorFields();\n\t\t\tthis.editDonor();\n\t\t\tthis.add_email();\n\t\t\tthis.removeUser();\n\t\t\tthis.cancelEdit();\n\t\t\tthis.add_note();\n\t\t\tthis.delete_checked();\n\t\t\tthis.addressesAction();\n\t\t\tthis.bulkDeleteDonor();\n\t\t\t$('body').on('click', '#give-donors-filter .bulkactions input[type=\"submit\"]', this.handleBulkActions);\n\t\t},\n\n\t\tunlockDonorFields: function (e) {\n\t\t\t$('body').on('click', '.give-lock-block', function (e) {\n\t\t\t\tnew GiveErrorAlert({\n\t\t\t\t\tmodalContent:{\n\t\t\t\t\t\ttitle: give_vars.unlock_donor_fields_title,\n\t\t\t\t\t\tdesc: give_vars.unlock_donor_fields_message,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok,\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t\te.preventDefault();\n\t\t\t});\n\t\t},\n\n\t\teditDonor: function () {\n\t\t\t$('body').on('click', '#edit-donor', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$('#give-donor-card-wrapper .editable').hide();\n\t\t\t\t$('#give-donor-card-wrapper .edit-item').fadeIn().css('display', 'block');\n\t\t\t});\n\t\t},\n\n\t\tremoveUser: function () {\n\t\t\t$('body').on('click', '#disconnect-donor', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tif (!confirm(give_vars.disconnect_user)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvar donorID = $('input[name=\"customerinfo[id]\"]').val();\n\n\t\t\t\tvar postData = {\n\t\t\t\t\tgive_action: 'disconnect-userid',\n\t\t\t\t\tcustomer_id: donorID,\n\t\t\t\t\t_wpnonce: $('#edit-donor-info #_wpnonce').val()\n\t\t\t\t};\n\n\t\t\t\t$.post(ajaxurl, postData, function (response) {\n\t\t\t\t\twindow.location.href = response.redirect;\n\t\t\t\t}, 'json');\n\n\t\t\t});\n\t\t},\n\n\t\tcancelEdit: function () {\n\t\t\t$('body').on('click', '#give-edit-donor-cancel', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$('#give-donor-card-wrapper .edit-item').hide();\n\t\t\t\t$('#give-donor-card-wrapper .editable').show();\n\t\t\t\t$('.give_user_search_results').html('');\n\t\t\t});\n\t\t},\n\n\t\tadd_note: function () {\n\t\t\t$('body').on('click', '#add-donor-note', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar postData = {\n\t\t\t\t\tgive_action: 'add-donor-note',\n\t\t\t\t\tcustomer_id: $('#donor-id').val(),\n\t\t\t\t\tdonor_note: $('#donor-note').val(),\n\t\t\t\t\tadd_donor_note_nonce: $('#add_donor_note_nonce').val()\n\t\t\t\t};\n\n\t\t\t\tif (postData.donor_note) {\n\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\tdata: postData,\n\t\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\t\t$('#give-donor-notes').prepend(response);\n\t\t\t\t\t\t\t$('.give-no-donor-notes').hide();\n\t\t\t\t\t\t\t$('#donor-note').val('');\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fail(function (data) {\n\t\t\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\t\t\tconsole.log(data);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t} else {\n\t\t\t\t\tvar border_color = $('#donor-note').css('border-color');\n\t\t\t\t\t$('#donor-note').css('border-color', 'red');\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t$('#donor-note').css('border-color', border_color);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tdelete_checked: function () {\n\t\t\t$('#give-donor-delete-confirm').change(function () {\n\t\t\t\tvar records_input = $('#give-donor-delete-records');\n\t\t\t\tvar submit_button = $('#give-delete-donor');\n\n\t\t\t\tif ($(this).prop('checked')) {\n\t\t\t\t\trecords_input.attr('disabled', false);\n\t\t\t\t\tsubmit_button.attr('disabled', false);\n\t\t\t\t} else {\n\t\t\t\t\trecords_input.attr('disabled', true);\n\t\t\t\t\trecords_input.prop('checked', false);\n\t\t\t\t\tsubmit_button.attr('disabled', true);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tadd_email: function () {\n\t\t\tif (!$('#add-donor-email').length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$(document.body).on('click', '#add-donor-email', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar button = $(this);\n\t\t\t\tvar wrapper = button.parent();\n\n\t\t\t\twrapper.parent().find('.notice-wrap').remove();\n\t\t\t\twrapper.find('.spinner').css('visibility', 'visible');\n\t\t\t\tbutton.attr('disabled', true);\n\n\t\t\t\tvar customer_id = wrapper.find('input[name=\"donor-id\"]').val();\n\t\t\t\tvar email = wrapper.find('input[name=\"additional-email\"]').val();\n\t\t\t\tvar primary = wrapper.find('input[name=\"make-additional-primary\"]').is(':checked');\n\t\t\t\tvar nonce = wrapper.find('input[name=\"add_email_nonce\"]').val();\n\n\t\t\t\tvar postData = {\n\t\t\t\t\tgive_action: 'add_donor_email',\n\t\t\t\t\tcustomer_id: customer_id,\n\t\t\t\t\temail: email,\n\t\t\t\t\tprimary: primary,\n\t\t\t\t\t_wpnonce: nonce\n\t\t\t\t};\n\n\t\t\t\t$.post(ajaxurl, postData, function (response) {\n\n\t\t\t\t\tif (true === response.success) {\n\t\t\t\t\t\twindow.location.href = response.redirect;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbutton.attr('disabled', false);\n\t\t\t\t\t\twrapper.after('<div class=\"notice-wrap\"><div class=\"notice notice-error inline\"><p>' + response.message + '</p></div></div>');\n\t\t\t\t\t\twrapper.find('.spinner').css('visibility', 'hidden');\n\t\t\t\t\t}\n\n\t\t\t\t}, 'json');\n\n\t\t\t});\n\t\t},\n\n\t\taddressesAction: function () {\n\t\t\tvar $obj = this,\n\t\t\t\t$addressWrapper = $('#donor-address-wrapper'),\n\t\t\t\t$allAddress = $('.all-address', $addressWrapper),\n\t\t\t\t$noAddressMessageWrapper = $('.give-no-address-message', $addressWrapper),\n\t\t\t\t$allAddressParent = $($allAddress).parent(),\n\t\t\t\t$addressForm = $('.address-form', $addressWrapper),\n\t\t\t\t$addressFormCancelBtn = $('.js-cancel', $addressForm),\n\t\t\t\t$addressFormCountryField = $('select[name=\"country\"]', $addressForm),\n\t\t\t\t$addNewAddressBtn = $('.add-new-address', $addressWrapper),\n\t\t\t\tdonorID = parseInt($('input[name=\"donor-id\"]').val());\n\n\t\t\t$addressFormCountryField.on('change', function () {\n\t\t\t\t$(this).trigger('chosen:updated');\n\t\t\t});\n\n\t\t\t// Edit current address button event.\n\t\t\t$allAddress.on('click', '.js-edit', function (e) {\n\t\t\t\tvar $parent = $(this).closest('.address');\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\t// Remove notice.\n\t\t\t\t$('.notice', $allAddressParent).remove();\n\n\t\t\t\t$obj.__set_address_form_val($parent);\n\t\t\t\t$obj.__set_address_form_action('update', $parent.data('address-id'));\n\n\t\t\t\t$addNewAddressBtn.hide();\n\t\t\t\t$allAddress.addClass('give-hidden');\n\t\t\t\t$addressForm.removeClass('add-new-address-form-hidden');\n\t\t\t\t$addressForm.data('process', 'update');\n\t\t\t});\n\n\t\t\t// Remove address button event.\n\t\t\t$allAddress.on('click', '.js-remove', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvar $parent = $(this).closest('.address');\n\n\t\t\t\t// Remove notice.\n\t\t\t\t$('.notice', $allAddressParent).remove();\n\n\t\t\t\t$addressForm.data('changed', true);\n\t\t\t\t$obj.__set_address_form_val($parent);\n\t\t\t\t$obj.__set_address_form_action('remove', $parent.data('address-id'));\n\n\t\t\t\t$addressForm.trigger('submit');\n\t\t\t});\n\n\t\t\t// Add new address button event.\n\t\t\t$addNewAddressBtn.on('click', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t// Remove notice.\n\t\t\t\t$('.notice', $allAddressParent).remove();\n\n\t\t\t\t$(this).hide();\n\t\t\t\t$allAddress.addClass('give-hidden');\n\t\t\t\t$addressForm.removeClass('add-new-address-form-hidden');\n\t\t\t\t$obj.__set_address_form_action('add');\n\n\t\t\t\t$obj.__set_address_form_action();\n\t\t\t});\n\n\t\t\t// Cancel add new address form button event.\n\t\t\t$addressFormCancelBtn.on('click', function (e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t// Reset form.\n\t\t\t\t$addressForm.find('input[type=\"text\"]').val('');\n\n\t\t\t\t$addNewAddressBtn.show();\n\t\t\t\t$allAddress.removeClass('give-hidden');\n\t\t\t\t$addressForm.addClass('add-new-address-form-hidden');\n\t\t\t});\n\n\t\t\t// Save address.\n\t\t\t$addressForm\n\t\t\t\t.on('change', function () {\n\t\t\t\t\t$(this).data('changed', true);\n\t\t\t\t})\n\t\t\t\t.on('submit', function (e) {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tvar $this = $(this);\n\n\t\t\t\t\t// Remove notice.\n\t\t\t\t\t$('.notice', $allAddressParent).remove();\n\n\t\t\t\t\t// Do not send ajax if form does not change.\n\t\t\t\t\tif (!$(this).data('changed')) {\n\t\t\t\t\t\t$addNewAddressBtn.show();\n\t\t\t\t\t\t$allAddress.removeClass('give-hidden');\n\t\t\t\t\t\t$addressForm.addClass('add-new-address-form-hidden');\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\taction: 'donor_manage_addresses',\n\t\t\t\t\t\t\tdonorID: donorID,\n\t\t\t\t\t\t\tform: $('form', $addressForm).serialize()\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbeforeSend: function () {\n\t\t\t\t\t\t\tgiveAjaxLoader($addressWrapper, {show: true});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\t\tgiveAjaxLoader($addressWrapper);\n\n\t\t\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t\t\tvar parent;\n\n\t\t\t\t\t\t\t\tswitch (response.data.action) {\n\t\t\t\t\t\t\t\t\tcase 'add':\n\t\t\t\t\t\t\t\t\t\t$('.give-grid-row', $allAddress).append(response.data.address_html);\n\n\t\t\t\t\t\t\t\t\t\tif (!$noAddressMessageWrapper.hasClass('give-hidden') && $('div.give-grid-col-4', $allAddress).length) {\n\t\t\t\t\t\t\t\t\t\t\t$noAddressMessageWrapper.addClass('give-hidden');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase 'remove':\n\t\t\t\t\t\t\t\t\t\tparent = $allAddress\n\t\t\t\t\t\t\t\t\t\t\t.find('div[data-address-id*=\"' + response.data.id + '\"]').parent();\n\n\t\t\t\t\t\t\t\t\t\tif (parent.length) {\n\t\t\t\t\t\t\t\t\t\t\tparent.animate(\n\t\t\t\t\t\t\t\t\t\t\t\t{'margin-left': '-999'},\n\t\t\t\t\t\t\t\t\t\t\t\t1000,\n\t\t\t\t\t\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\t\t\t\t\t\tparent.remove();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$noAddressMessageWrapper.hasClass('give-hidden') &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!$('div.give-grid-col-4', $allAddress).length\n\t\t\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$noAddressMessageWrapper.removeClass('give-hidden');\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase 'update':\n\t\t\t\t\t\t\t\t\t\tparent = $allAddress\n\t\t\t\t\t\t\t\t\t\t\t.find('div[data-address-id*=\"' + response.data.id + '\"]').parent();\n\t\t\t\t\t\t\t\t\t\tvar $prevParent = parent.prev(),\n\t\t\t\t\t\t\t\t\t\t\t$nextParent = {},\n\t\t\t\t\t\t\t\t\t\t\tis_address_added = false;\n\n\t\t\t\t\t\t\t\t\t\tif (parseInt($('.give-grid-row>div', $allAddress).length) < 2) {\n\t\t\t\t\t\t\t\t\t\t\t$('.give-grid-row', $allAddress).append(response.data.address_html);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif ($prevParent.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t$prevParent.after(response.data.address_html);\n\t\t\t\t\t\t\t\t\t\t\t\tis_address_added = true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif (!is_address_added) {\n\t\t\t\t\t\t\t\t\t\t\t\t$nextParent = parent.next();\n\n\t\t\t\t\t\t\t\t\t\t\t\tif ($nextParent.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$nextParent.before(response.data.address_html);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tparent.remove();\n\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$allAddressParent.prepend(response.data.success_msg);\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$allAddressParent.prepend(response.data.error_msg);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdataType: 'json'\n\t\t\t\t\t}).always(function () {\n\t\t\t\t\t\t$this.data('changed', false);\n\n\t\t\t\t\t\t// Reset form.\n\t\t\t\t\t\t$addressForm.find('input[type=\"text\"]').val('');\n\n\t\t\t\t\t\t$addNewAddressBtn.show();\n\t\t\t\t\t\t$allAddress.removeClass('give-hidden');\n\t\t\t\t\t\t$addressForm.addClass('add-new-address-form-hidden');\n\t\t\t\t\t});\n\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t},\n\n\t\t__set_address_form_action: function (addressAction, addressID) {\n\t\t\tvar $addressWrapper = $('#donor-address-wrapper'),\n\t\t\t\t$addressForm = $('.address-form', $addressWrapper),\n\t\t\t\t$addressActionField = $('input[name=\"address-action\"]', $addressForm),\n\t\t\t\t$addressIDField = $('input[name=\"address-id\"]', $addressForm);\n\n\t\t\taddressAction = addressAction || 'add';\n\t\t\taddressID = addressID || 'billing';\n\n\t\t\t$addressActionField.val(addressAction);\n\t\t\t$addressIDField.val(addressID);\n\t\t},\n\n\t\t__set_address_form_val: function ($form) {\n\t\t\tvar $addressWrapper = $('#donor-address-wrapper'),\n\t\t\t\t$addressForm = $('.address-form', $addressWrapper),\n\t\t\t\tstate = $('[data-address-type=\"state\"]', $form).text().substr(2).trim(); // State will be like \", HR\".\n\n\t\t\tif ($('select[name=\"country\"]', $addressForm).val().trim() !== $('[data-address-type=\"country\"]', $form).text().trim()) {\n\t\t\t\t$('select[name=\"country\"]', $addressForm).val($('[data-address-type=\"country\"]', $form).text().trim()).trigger('chosen:updated').change();\n\n\t\t\t\t// Update state after some time because state load by ajax for each country.\n\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t$('[name=\"state\"]', $addressForm).val(state).trigger('chosen:updated');\n\t\t\t\t}, 500);\n\t\t\t} else {\n\t\t\t\t$('[name=\"state\"]', $addressForm).val(state).trigger('chosen:updated');\n\t\t\t}\n\n\t\t\t$('input[name=\"line1\"]', $addressForm).val($('[data-address-type=\"line1\"]', $form).text().trim());\n\t\t\t$('input[name=\"line2\"]', $addressForm).val($('[data-address-type=\"line2\"]', $form).text().trim());\n\t\t\t$('input[name=\"city\"]', $addressForm).val($('[data-address-type=\"city\"]', $form).text().trim());\n\t\t\t$('input[name=\"zip\"]', $addressForm).val($('[data-address-type=\"zip\"]', $form).text().trim());\n\t\t},\n\n\t\tbulkDeleteDonor: function () {\n\t\t\tvar $body = $('body');\n\n\t\t\t// Cancel button click event for donor.\n\t\t\t$body.on('click', '#give-bulk-delete-cancel', function (e) {\n\t\t\t\t$(this).closest('tr').hide();\n\t\t\t\t$('.give-skip-donor').trigger('click');\n\t\t\t\te.preventDefault();\n\t\t\t});\n\n\t\t\t// Select All checkbox.\n\t\t\t$body.on('click', '#cb-select-all-1, #cb-select-all-2', function () {\n\n\t\t\t\tvar selectAll = $(this);\n\n\t\t\t\t// Loop through donor selector checkbox.\n\t\t\t\t$.each($('.donor-selector'), function () {\n\n\t\t\t\t\tvar donorId = $(this).val(),\n\t\t\t\t\t\tdonorName = $(this).data('name'),\n\t\t\t\t\t\tdonorHtml = '<div id=\"give-donor-' + donorId + '\" data-id=\"' + donorId + '\">' +\n\t\t\t\t\t\t\t'<a class=\"give-skip-donor\" title=\"' + give_vars.remove_from_bulk_delete + '\">X</a>' +\n\t\t\t\t\t\t\tdonorName + '</div>';\n\n\t\t\t\t\tif (selectAll.is(':checked') && !$(this).is(':checked')) {\n\t\t\t\t\t\t$('#give-bulk-donors').append(donorHtml);\n\t\t\t\t\t} else if (!selectAll.is(':checked')) {\n\t\t\t\t\t\t$('#give-bulk-donors').find('#give-donor-' + donorId).remove();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// On checking checkbox, add to bulk delete donor.\n\t\t\t$body.on('click', '.donor-selector', function () {\n\t\t\t\tvar donorId = $(this).val(),\n\t\t\t\t\tdonorName = $(this).data('name'),\n\t\t\t\t\tdonorHtml = '<div id=\"give-donor-' + donorId + '\" data-id=\"' + donorId + '\">' +\n\t\t\t\t\t\t'<a class=\"give-skip-donor\" title=\"' + give_vars.remove_from_bulk_delete + '\">X</a>' +\n\t\t\t\t\t\tdonorName + '</div>';\n\n\t\t\t\tif ($(this).is(':checked')) {\n\t\t\t\t\t$('#give-bulk-donors').prepend(donorHtml);\n\t\t\t\t} else {\n\t\t\t\t\t$('#give-bulk-donors').find('#give-donor-' + donorId).remove();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// CheckBox click event to confirm deletion of donor.\n\t\t\t$body.on('click', '#give-delete-donor-confirm', function () {\n\t\t\t\tif ($(this).is(':checked')) {\n\t\t\t\t\t$('#give-bulk-delete-button').removeAttr('disabled');\n\t\t\t\t} else {\n\t\t\t\t\t$('#give-bulk-delete-button').attr('disabled', true);\n\t\t\t\t\t$('#give-delete-donor-records').removeAttr('checked');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// CheckBox click event to delete records with donor.\n\t\t\t$body.on('click', '#give-delete-donor-records', function () {\n\t\t\t\tif ($(this).is(':checked')) {\n\t\t\t\t\t$('#give-delete-donor-confirm').attr('checked', 'checked');\n\t\t\t\t\t$('#give-bulk-delete-button').removeAttr('disabled');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Skip Donor from Bulk Delete List.\n\t\t\t$body.on('click', '.give-skip-donor', function () {\n\t\t\t\tvar donorId = $(this).closest('div').data('id');\n\t\t\t\t$('#give-donor-' + donorId).remove();\n\t\t\t\t$('#donor-' + donorId).find('input[type=\"checkbox\"]').removeAttr('checked');\n\t\t\t});\n\n\t\t\t// Clicking Event to Delete Single Donor.\n\t\t\t$body.on('click', '.give-single-donor-delete', function (e) {\n\t\t\t\tvar donorId = $(this).data('id'),\n\t\t\t\t\tdonorSelector = $('tr#donor-' + donorId).find('.donor-selector'),\n\t\t\t\t\tselectAll = $('[id^=\"cb-select-all-\"]'),\n\t\t\t\t\tbulkDeleteList = $('#give-bulk-donors'),\n\t\t\t\t\tdonorName = donorSelector.data('name'),\n\t\t\t\t\tdonorHtml = '<div id=\"give-donor-' + donorId + '\" data-id=\"' + donorId + '\">' +\n\t\t\t\t\t\t'<a class=\"give-skip-donor\" title=\"' + give_vars.remove_from_bulk_delete + '\">X</a>' +\n\t\t\t\t\t\tdonorName + '</div>';\n\n\t\t\t\t// Reset Donors List.\n\t\t\t\tbulkDeleteList.html('');\n\n\t\t\t\t// Check whether the select all donor checkbox is already set, then unset it.\n\t\t\t\tif (selectAll.is(':checked')) {\n\t\t\t\t\tselectAll.removeAttr('checked');\n\t\t\t\t}\n\n\t\t\t\t// Select the donor checkbox for which delete is clicked and others should be de-selected.\n\t\t\t\t$('.donor-selector').removeAttr('checked');\n\t\t\t\tdonorSelector.attr('checked', 'checked');\n\n\t\t\t\t// Add Donor to the Bulk Delete List, if donor doesn't exists in the list.\n\t\t\t\tif ($('#give-donor-' + donorId).length === 0) {\n\t\t\t\t\tbulkDeleteList.prepend(donorHtml);\n\t\t\t\t\t$('#give-bulk-delete').slideDown();\n\t\t\t\t}\n\n\t\t\t\te.preventDefault();\n\t\t\t});\n\t\t},\n\n\t\thandleBulkActions: function (e) {\n\t\t\tvar currentAction = $(this).closest('.tablenav').find('select').val(),\n\t\t\t\tdonors = [],\n\t\t\t\tselectBulkActionNotice = give_vars.donors_bulk_action.no_action_selected,\n\t\t\t\tconfirmActionNotice = give_vars.donors_bulk_action.no_donor_selected;\n\n\t\t\t$.each($('.donor-selector:checked'), function () {\n\t\t\t\tdonors.push($(this).val());\n\t\t\t});\n\n\t\t\t// If there is no bulk action selected then show an alert message.\n\t\t\tif ( '-1' === currentAction ) {\n\t\t\t\tnew GiveWarningAlert({\n\t\t\t\t\tmodalContent:{\n\t\t\t\t\t\ttitle: selectBulkActionNotice.title,\n\t\t\t\t\t\tdesc: selectBulkActionNotice.desc,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok,\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// If there is no donor selected then show an alert.\n\t\t\tif ( ! parseInt( donors ) ) {\n\t\t\t\tnew GiveWarningAlert({\n\t\t\t\t\tmodalContent:{\n\t\t\t\t\t\ttitle: confirmActionNotice.title,\n\t\t\t\t\t\tdesc: confirmActionNotice.desc,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok,\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ('delete' === currentAction) {\n\t\t\t\t$('#give-bulk-delete').slideDown();\n\t\t\t}\n\n\t\t\te.preventDefault();\n\t\t}\n\t};\n\n\t/**\n\t * API screen JS\n\t */\n\tvar API_Screen = {\n\n\t\tinit: function () {\n\t\t\tthis.revoke_api_key();\n\t\t\tthis.regenerate_api_key();\n\t\t},\n\n\t\trevoke_api_key: function () {\n\t\t\t$('body').on('click', '.give-revoke-api-key', function (e) {\n\t\t\t\treturn confirm(give_vars.revoke_api_key);\n\t\t\t});\n\t\t},\n\t\tregenerate_api_key: function () {\n\t\t\t$('body').on('click', '.give-regenerate-api-key', function (e) {\n\t\t\t\treturn confirm(give_vars.regenerate_api_key);\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Edit Donation form screen Js\n\t */\n\tvar Edit_Form_Screen = {\n\t\tinit: function () {\n\t\t\tvar default_tab_id = $.query.get('give_tab').length ? $.query.get('give_tab') : 'form_field_options';\n\n\t\t\tthis.handle_metabox_tab_click();\n\t\t\tthis.setup_colorpicker_fields();\n\t\t\tthis.setup_media_fields();\n\t\t\tthis.setup_repeatable_fields();\n\t\t\tthis.handle_repeater_group_events();\n\n\t\t\t// Multi level repeater field js.\n\t\t\tthis.handle_multi_levels_repeater_group_events();\n\n\t\t\t// Set active tab on page load.\n\t\t\tthis.activate_tab($('a[href=\"#' + default_tab_id + '\"]'));\n\t\t},\n\n\t\t/**\n\t\t * Attach click event handler to tabs.\n\t\t */\n\t\thandle_metabox_tab_click: function () {\n\t\t\tvar self = this;\n\t\t\tvar $tab_links = $('.give-metabox-tabs a');\n\n\t\t\t$tab_links.on('click', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tlet $this = $(this);\n\t\t\t\tself.activate_tab($this);\n\t\t\t\tself.update_query($this);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Set the active tab.\n\t\t */\n\t\tactivate_tab: function ($tab_link) {\n\t\t\tvar tab_id = $tab_link.data('tab-id'),\n\t\t\t\t$li_parent = $tab_link.parent(),\n\t\t\t\t$sub_field = $('ul.give-metabox-sub-tabs', $li_parent),\n\t\t\t\thas_sub_field = $sub_field.length,\n\t\t\t\t$tab_links = $('.give-metabox-tabs a'),\n\t\t\t\t$all_tab_links_li = $tab_links.parents('li'),\n\t\t\t\t$all_sub_fields = $('ul.give-metabox-sub-tabs'),\n\t\t\t\tin_sub_fields = $tab_link.parents('ul.give-metabox-sub-tabs').length;\n\n\t\t\t// Update active tab hidden field to maintain tab after save.\n\t\t\t$('#give_form_active_tab').val(tab_id);\n\n\t\t\tif (has_sub_field) {\n\t\t\t\t$li_parent.toggleClass('active');\n\t\t\t\t$sub_field.removeClass('give-hidden');\n\n\t\t\t\tvar $active_subtab_li = $('li.active', 'ul.give-metabox-sub-tabs');\n\n\t\t\t\t// Show hide sub fields if any and exit.\n\t\t\t\t$all_sub_fields.not($sub_field).addClass('give-hidden');\n\t\t\t\t$all_tab_links_li.not($li_parent).removeClass('active');\n\n\t\t\t\t$active_subtab_li.addClass('active');\n\t\t\t} else if (!in_sub_fields) {\n\t\t\t\t// Hide all tab and sub tabs.\n\t\t\t\t$all_tab_links_li.each(function (index, item) {\n\t\t\t\t\titem = $(item);\n\t\t\t\t\titem.removeClass('active');\n\n\t\t\t\t\tif (item.hasClass('has-sub-fields')) {\n\t\t\t\t\t\t$('ul.give-metabox-sub-tabs', item).addClass('give-hidden');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else if (in_sub_fields) {\n\t\t\t\t// Hide all sub tabs.\n\t\t\t\t$('ul.give-metabox-sub-tabs').addClass('give-hidden');\n\t\t\t\t$all_tab_links_li.removeClass('active');\n\n\t\t\t\t// Hide all tab inside sub tabs.\n\t\t\t\t$tab_link.parents('ul.give-metabox-sub-tabs')\n\t\t\t\t\t.removeClass('give-hidden')\n\t\t\t\t\t.children('li')\n\t\t\t\t\t.removeClass('active');\n\n\t\t\t\t// Add active class to parent li.\n\t\t\t\t$tab_link.parents('li.has-sub-fields').addClass('active');\n\t\t\t}\n\n\t\t\t// Add active class to current tab link.\n\t\t\t$tab_link.parent().addClass('active');\n\n\t\t\t// Hide all tab contents.\n\t\t\t$('.give_options_panel').removeClass('active');\n\n\t\t\t// Show tab content.\n\t\t\t$($tab_link.attr('href')).addClass('active');\n\t\t},\n\n\t\t/**\n\t\t * Update query string with active tab ID.\n\t\t */\n\t\tupdate_query: function ($tab_link) {\n\t\t\tvar tab_id = $tab_link.data('tab-id');\n\t\t\tvar new_query = $.query.set('give_tab', tab_id).remove('message').toString();\n\n\t\t\tif (history.replaceState) {\n\t\t\t\thistory.replaceState(null, null, new_query);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Initialize colorpicker.\n\t\t */\n\t\tsetup_colorpicker_fields: function () {\n\t\t\t$(document).ready(function () {\n\t\t\t\tvar $colorpicker_fields = $('.give-colorpicker');\n\n\t\t\t\tif ($colorpicker_fields.length) {\n\t\t\t\t\t$colorpicker_fields.each(function (index, item) {\n\t\t\t\t\t\tvar $item = $(item);\n\n\t\t\t\t\t\t// Bailout: do not automatically initialize color picker for repeater field group template.\n\t\t\t\t\t\tif ($item.parents('.give-template').length) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$item.wpColorPicker();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tsetup_media_fields: function () {\n\t\t\tvar give_media_uploader,\n\t\t\t\t$give_upload_button,\n\t\t\t\t$body = $('body');\n\n\t\t\t/**\n\t\t\t * Set media modal.\n\t\t\t */\n\t\t\t$body.on('click', '.give-upload-button', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar $media_modal_config = {};\n\n\t\t\t\t// Cache input field.\n\t\t\t\t$give_upload_button = $(this);\n\n\t\t\t\t// Set modal config.\n\t\t\t\tswitch ($(this).data('field-type')) {\n\t\t\t\t\tcase 'media':\n\t\t\t\t\t\t$media_modal_config = {\n\t\t\t\t\t\t\ttitle: give_vars.metabox_fields.media.button_title,\n\t\t\t\t\t\t\tbutton: {text: give_vars.metabox_fields.media.button_title},\n\t\t\t\t\t\t\tmultiple: false, // Set to true to allow multiple files to be selected.\n\t\t\t\t\t\t\tlibrary: {type: 'image'}\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$media_modal_config = {\n\t\t\t\t\t\t\ttitle: give_vars.metabox_fields.file.button_title,\n\t\t\t\t\t\t\tbutton: {text: give_vars.metabox_fields.file.button_title},\n\t\t\t\t\t\t\tmultiple: false\n\t\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tvar editing = jQuery(this).closest('.give-field-wrap').find('.give-input-field').attr('editing');\n\t\t\t\tif ('undefined' !== typeof(editing)) {\n\t\t\t\t\twp.media.controller.Library.prototype.defaults.contentUserSetting = false;\n\t\t\t\t}\n\n\t\t\t\tvar $library = jQuery(this).closest('.give-field-wrap').find('.give-input-field').attr('library');\n\t\t\t\tif ('undefined' !== typeof($library) && '' !== $library) {\n\t\t\t\t\t$media_modal_config.library = {type: $library};\n\t\t\t\t}\n\n\t\t\t\t// Extend the wp.media object.\n\t\t\t\tgive_media_uploader = wp.media($media_modal_config);\n\n\t\t\t\t// When a file is selected, grab the URL and set it as the text field's value.\n\t\t\t\tgive_media_uploader.on('select', function () {\n\t\t\t\t\tvar attachment = give_media_uploader.state().get('selection').first().toJSON(),\n\t\t\t\t\t\t$input_field = $give_upload_button.prev(),\n\t\t\t\t\t\tfvalue = ('id' === $give_upload_button.data('fvalue') ? attachment.id : attachment.url);\n\n\t\t\t\t\t$body.trigger('give_media_inserted', [attachment, $input_field]);\n\n\t\t\t\t\t// Set input field value.\n\t\t\t\t\t$input_field.val(fvalue);\n\n\t\t\t\t\t// Update attachment id field value if fvalue is not set to id.\n\t\t\t\t\tif ('id' !== $give_upload_button.data('fvalue')) {\n\t\t\t\t\t\tvar attachment_id_field_name = 'input[name=\"' + $input_field.attr('name') + '_id\"]',\n\t\t\t\t\t\t\tid_field = $input_field.closest('tr').next('tr').find(attachment_id_field_name);\n\n\t\t\t\t\t\tif (id_field.length) {\n\t\t\t\t\t\t\t$input_field.closest('tr').next('tr').find(attachment_id_field_name).val(attachment.id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Open the uploader dialog.\n\t\t\t\tgive_media_uploader.open();\n\t\t\t});\n\n\t\t\t/**\n\t\t\t * Show image preview.\n\t\t\t */\n\t\t\t$body.on('give_media_inserted', function (e, attachment) {\n\t\t\t\tvar $parent = $give_upload_button.parents('.give-field-wrap'),\n\t\t\t\t\t$image_container = $('.give-image-thumb', $parent);\n\n\t\t\t\t// Bailout.\n\t\t\t\tif (!$image_container.length) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Bailout and hide preview.\n\t\t\t\tif ('image' !== attachment.type) {\n\t\t\t\t\t$image_container.addClass('give-hidden');\n\t\t\t\t\t$('img', $image_container).attr('src', '');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Set the attachment URL to our custom image input field.\n\t\t\t\t$image_container.find('img').attr('src', attachment.url);\n\n\t\t\t\t// Hide the add image link.\n\t\t\t\t$image_container.removeClass('give-hidden');\n\t\t\t});\n\n\t\t\t/**\n\t\t\t * Delete Image Link.\n\t\t\t */\n\t\t\t$('span.give-delete-image-thumb', '.give-image-thumb').on('click', function (event) {\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tvar $parent = $(this).parents('.give-field-wrap'),\n\t\t\t\t\t$image_container = $(this).parent(),\n\t\t\t\t\t$image_input_field = $('input[type=\"text\"]', $parent);\n\n\t\t\t\t// Clear out the preview image.\n\t\t\t\t$image_container.addClass('give-hidden');\n\n\t\t\t\t// Remove image link from input field.\n\t\t\t\t$image_input_field.val('');\n\n\t\t\t\t// Hide the add image link.\n\t\t\t\t$('img', $image_container).attr('src', '');\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Setup repeater field.\n\t\t */\n\t\tsetup_repeatable_fields: function () {\n\t\t\tjQuery(function () {\n\t\t\t\tjQuery('.give-repeatable-field-section').each(function () {\n\t\t\t\t\tvar $this = $(this);\n\n\t\t\t\t\t// Note: Do not change option params, it can break repeatable fields functionality.\n\t\t\t\t\tvar options = {\n\t\t\t\t\t\twrapper: '.give-repeatable-fields-section-wrapper',\n\t\t\t\t\t\tcontainer: '.container',\n\t\t\t\t\t\trow: '.give-row',\n\t\t\t\t\t\tadd: '.give-add-repeater-field-section-row',\n\t\t\t\t\t\tremove: '.give-remove',\n\t\t\t\t\t\tmove: '.give-move',\n\t\t\t\t\t\ttemplate: '.give-template',\n\t\t\t\t\t\tconfirm_before_remove_row: true,\n\t\t\t\t\t\tconfirm_before_remove_row_text: give_vars.confirm_before_remove_row_text,\n\t\t\t\t\t\tis_sortable: true,\n\t\t\t\t\t\tbefore_add: null,\n\t\t\t\t\t\tafter_add: handle_metabox_repeater_field_row_count,\n\t\t\t\t\t\t//after_add: after_add, Note: after_add is internal function in repeatable-fields.js. Uncomment this can cause of js error.\n\t\t\t\t\t\tbefore_remove: null,\n\t\t\t\t\t\tafter_remove: handle_metabox_repeater_field_row_remove,\n\t\t\t\t\t\tsortable_options: {\n\t\t\t\t\t\t\tplaceholder: 'give-ui-placeholder-state-highlight',\n\t\t\t\t\t\t\tstart: function (event, ui) {\n\t\t\t\t\t\t\t\t$('body').trigger('repeater_field_sorting_start', [ui.item]);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tstop: function (event, ui) {\n\t\t\t\t\t\t\t\t$('body').trigger('repeater_field_sorting_stop', [ui.item]);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tupdate: function (event, ui) {\n\t\t\t\t\t\t\t\t// Do not allow any row at position 0.\n\t\t\t\t\t\t\t\tif (ui.item.next().hasClass('give-template')) {\n\t\t\t\t\t\t\t\t\tui.item.next().after(ui.item);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tvar $rows = $('.give-row', $this).not('.give-template');\n\n\t\t\t\t\t\t\t\tif ($rows.length) {\n\t\t\t\t\t\t\t\t\tvar row_count = 1;\n\t\t\t\t\t\t\t\t\t$rows.each(function (index, item) {\n\t\t\t\t\t\t\t\t\t\t// Set name for fields.\n\t\t\t\t\t\t\t\t\t\tvar $fields = $('.give-field, label', $(item));\n\n\t\t\t\t\t\t\t\t\t\tif ($fields.length) {\n\t\t\t\t\t\t\t\t\t\t\t$fields.each(function () {\n\t\t\t\t\t\t\t\t\t\t\t\tvar $parent = $(this).parents('.give-field-wrap'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t$currentElement = $(this);\n\n\t\t\t\t\t\t\t\t\t\t\t\t$.each(this.attributes, function (index, element) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar old_class_name_prefix = this.value.replace(/\\[/g, '_').replace(/]/g, ''),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\told_class_name = old_class_name_prefix + '_field',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew_class_name = '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew_class_name_prefix = '';\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Bailout.\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!this.value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Reorder index.\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.value = this.value.replace(/\\[\\d+\\]/g, '[' + (row_count - 1) + ']');\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew_class_name_prefix = this.value.replace(/\\[/g, '_').replace(/]/g, '');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Update class name.\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($parent.hasClass(old_class_name)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew_class_name = new_class_name_prefix + '_field';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$parent.removeClass(old_class_name).addClass(new_class_name);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Update field id.\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (old_class_name_prefix == $currentElement.attr('id')) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$currentElement.attr('id', new_class_name_prefix);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\trow_count++;\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t// Fire event.\n\t\t\t\t\t\t\t\t\t$this.trigger('repeater_field_row_reordered', [ui.item]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//row_count_placeholder: '{{row-count-placeholder}}' Note: do not modify this param otherwise it will break repeatable field functionality.\n\t\t\t\t\t};\n\n\t\t\t\t\tjQuery(this).repeatable_fields(options);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Handle repeater field events.\n\t\t */\n\t\thandle_repeater_group_events: function () {\n\t\t\tvar $repeater_fields = $('.give-repeatable-field-section'),\n\t\t\t\t$body = $('body');\n\n\t\t\t// Auto toggle repeater group\n\t\t\t$body.on('click', '.give-row-head button', function () {\n\t\t\t\tvar $parent = $(this).closest('tr');\n\t\t\t\t$parent.toggleClass('closed');\n\t\t\t\t$('.give-row-body', $parent).toggle();\n\t\t\t});\n\n\t\t\t// Reset header title when new row added.\n\t\t\t$repeater_fields.on('repeater_field_new_row_added repeater_field_row_deleted repeater_field_row_reordered', function () {\n\t\t\t\thandle_repeater_group_add_number_suffix($(this));\n\t\t\t});\n\n\t\t\t// Disable editor when sorting start.\n\t\t\t$body.on('repeater_field_sorting_start', function (e, row) {\n\t\t\t\tvar $textarea = $('.wp-editor-area', row);\n\n\t\t\t\tif ($textarea.length) {\n\t\t\t\t\t$textarea.each(function (index, item) {\n\t\t\t\t\t\twindow.setTimeout(\n\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\ttinyMCE.execCommand('mceRemoveEditor', true, $(item).attr('id'));\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t300\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Enable editor when sorting stop.\n\t\t\t$body.on('repeater_field_sorting_stop', function (e, row) {\n\t\t\t\tvar $textarea = $('.wp-editor-area', row);\n\n\t\t\t\tif ($textarea.length) {\n\t\t\t\t\t$textarea.each(function (index, item) {\n\t\t\t\t\t\twindow.setTimeout(\n\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\tvar textarea_id = $(item).attr('id');\n\t\t\t\t\t\t\t\ttinyMCE.execCommand('mceAddEditor', true, textarea_id);\n\n\t\t\t\t\t\t\t\t// Switch editor to tmce mode to fix some glitch which appear when you reorder rows.\n\t\t\t\t\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t\t\t\t\t// Hack to show tmce mode.\n\t\t\t\t\t\t\t\t\tswitchEditors.go(textarea_id, 'html');\n\t\t\t\t\t\t\t\t\t$('#' + textarea_id + '-tmce').trigger('click');\n\t\t\t\t\t\t\t\t}, 100);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t300\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Process jobs on document load for repeater fields.\n\t\t\t$repeater_fields.each(function (index, item) {\n\t\t\t\t// Reset title on document load for already exist groups.\n\t\t\t\tvar $item = $(item);\n\t\t\t\thandle_repeater_group_add_number_suffix($item);\n\n\t\t\t\t// Close all tabs when page load.\n\t\t\t\tif (parseInt($item.data('close-tabs'))) {\n\t\t\t\t\t$('.give-row-head button', $item).trigger('click');\n\t\t\t\t\t$('.give-template', $item).removeClass('closed');\n\t\t\t\t\t$('.give-template .give-row-body', $item).show();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Setup colorpicker field when row added.\n\t\t\t$repeater_fields.on('repeater_field_new_row_added', function (e, container, new_row) {\n\t\t\t\t$('.give-colorpicker', $(this)).each(function (index, item) {\n\t\t\t\t\tvar $item = $(item);\n\n\t\t\t\t\t// Bailout: skip already init colorpocker fields.\n\t\t\t\t\tif ($item.parents('.wp-picker-container').length || $item.parents('.give-template').length) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t$item.wpColorPicker();\n\t\t\t\t});\n\n\t\t\t\t// Load WordPress editor by ajax.\n\t\t\t\tvar wysiwyg_editor_container = $('div[data-wp-editor]', new_row);\n\n\t\t\t\tif (wysiwyg_editor_container.length) {\n\t\t\t\t\twysiwyg_editor_container.each(function (index, item) {\n\t\t\t\t\t\tvar $item = $(item),\n\t\t\t\t\t\t\twysiwyg_editor = $('.wp-editor-wrap', $item),\n\t\t\t\t\t\t\ttextarea = $('textarea', $item),\n\t\t\t\t\t\t\ttextarea_id = 'give_wysiwyg_unique_' + Math.random().toString().replace('.', '_'),\n\t\t\t\t\t\t\twysiwyg_editor_label = wysiwyg_editor.prev();\n\n\t\t\t\t\t\ttextarea.attr('id', textarea_id);\n\n\t\t\t\t\t\t$.post(\n\t\t\t\t\t\t\tajaxurl,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\taction: 'give_load_wp_editor',\n\t\t\t\t\t\t\t\twp_editor: $item.data('wp-editor'),\n\t\t\t\t\t\t\t\twp_editor_id: textarea_id,\n\t\t\t\t\t\t\t\ttextarea_name: $('textarea', $item).attr('name')\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction (res) {\n\t\t\t\t\t\t\t\twysiwyg_editor.remove();\n\t\t\t\t\t\t\t\twysiwyg_editor_label.after(res);\n\n\t\t\t\t\t\t\t\t// Setup qt data for editor.\n\t\t\t\t\t\t\t\ttinyMCEPreInit.qtInit[textarea.attr('id')] = $.extend(\n\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\ttinyMCEPreInit.qtInit['_give_agree_text'],\n\t\t\t\t\t\t\t\t\t{id: textarea_id}\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t// Setup mce data for editor.\n\t\t\t\t\t\t\t\ttinyMCEPreInit.mceInit[textarea_id] = $.extend(\n\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\ttinyMCEPreInit.mceInit['_give_agree_text'],\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbody_class: textarea_id + ' post-type-give_forms post-status-publish locale-' + tinyMCEPreInit.mceInit['_give_agree_text']['wp_lang_attr'].toLowerCase(),\n\t\t\t\t\t\t\t\t\t\tselector: '#' + textarea_id\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t// Setup editor.\n\t\t\t\t\t\t\t\ttinymce.init(tinyMCEPreInit.mceInit[textarea_id]);\n\t\t\t\t\t\t\t\tquicktags(tinyMCEPreInit.qtInit[textarea_id]);\n\t\t\t\t\t\t\t\tQTags._buttonsInit();\n\n\t\t\t\t\t\t\t\twindow.setTimeout(function () {\n\t\t\t\t\t\t\t\t\t// Hack to show tmce mode.\n\t\t\t\t\t\t\t\t\tswitchEditors.go(textarea_id, 'html');\n\t\t\t\t\t\t\t\t\t$('#' + textarea_id + '-tmce').trigger('click');\n\t\t\t\t\t\t\t\t}, 100);\n\n\t\t\t\t\t\t\t\tif (!window.wpActiveEditor) {\n\t\t\t\t\t\t\t\t\twindow.wpActiveEditor = textarea_id;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t},\n\n\t\t/**\n\t\t * Handle events for multi level repeater group.\n\t\t */\n\t\thandle_multi_levels_repeater_group_events: function () {\n\t\t\tvar $repeater_fields = $('#_give_donation_levels_field');\n\n\t\t\t// Add level title as suffix to header title when admin add level title.\n\t\t\t$('body').on('keyup', '.give-multilevel-text-field', function () {\n\t\t\t\tvar $parent = $(this).closest('tr'),\n\t\t\t\t\t$header_title_container = $('.give-row-head h2 span', $parent),\n\t\t\t\t\tdonation_level_header_text_prefix = $header_title_container.data('header-title');\n\n\t\t\t\t// Donation level header already set.\n\t\t\t\tif ($(this).val() && ($(this).val() === $header_title_container.html())) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ($(this).val()) {\n\t\t\t\t\t// Change donaiton level header text.\n\t\t\t\t\t$header_title_container.html(donation_level_header_text_prefix + ': ' + $(this).val());\n\t\t\t\t} else {\n\t\t\t\t\t// Reset donation level header heading text.\n\t\t\t\t\t$header_title_container.html(donation_level_header_text_prefix);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Add level title as suffix to header title on document load.\n\t\t\t$('.give-multilevel-text-field').each(function (index, item) {\n\n\t\t\t\t// Skip first element.\n\t\t\t\tif (!index) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Check if item is jquery object or not.\n\t\t\t\tvar $item = $(item);\n\n\t\t\t\tvar $parent = $item.closest('tr'),\n\t\t\t\t\t$header_title_container = $('.give-row-head h2 span', $parent),\n\t\t\t\t\tdonation_level_header_text_prefix = $header_title_container.data('header-title');\n\n\t\t\t\t// Donation level header already set.\n\t\t\t\tif ($item.val() && ($item.val() === $header_title_container.html())) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ($item.val()) {\n\t\t\t\t\t// Change donaiton level header text.\n\t\t\t\t\t$header_title_container.html(donation_level_header_text_prefix + ': ' + $item.val());\n\t\t\t\t} else {\n\t\t\t\t\t// Reset donation level header heading text.\n\t\t\t\t\t$header_title_container.html(donation_level_header_text_prefix);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Handle row deleted event for levels repeater field.\n\t\t\t$repeater_fields.on('repeater_field_row_deleted', function () {\n\t\t\t\tvar $this = $(this);\n\n\t\t\t\twindow.setTimeout(\n\t\t\t\t\tfunction () {\n\t\t\t\t\t\tvar $parent = $this,\n\t\t\t\t\t\t\t$repeatable_rows = $('.give-row', $parent).not('.give-template'),\n\t\t\t\t\t\t\t$default_radio = $('.give-give_default_radio_inline', $repeatable_rows),\n\t\t\t\t\t\t\tnumber_of_level = $repeatable_rows.length;\n\n\t\t\t\t\t\tif (number_of_level === 1) {\n\t\t\t\t\t\t\t$default_radio.prop('checked', true);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t200\n\t\t\t\t);\n\t\t\t});\n\n\t\t\t// Handle row added event for levels repeater field.\n\t\t\t$repeater_fields.on('repeater_field_new_row_added', function (e, container, new_row) {\n\t\t\t\tvar $this = $(this),\n\t\t\t\t\tmax_level_id = 0;\n\n\t\t\t\t// Auto set default level if no level set as default.\n\t\t\t\twindow.setTimeout(\n\t\t\t\t\tfunction () {\n\t\t\t\t\t\t// Set first row as default if selected default row deleted.\n\t\t\t\t\t\t// When a row is removed containing the default selection then revert default to first repeatable row.\n\t\t\t\t\t\tif ($('.give-give_default_radio_inline', $this).is(':checked') === false) {\n\t\t\t\t\t\t\t$('.give-row', $this)\n\t\t\t\t\t\t\t\t.not('.give-template')\n\t\t\t\t\t\t\t\t.first()\n\t\t\t\t\t\t\t\t.find('.give-give_default_radio_inline')\n\t\t\t\t\t\t\t\t.prop('checked', true);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t200\n\t\t\t\t);\n\n\t\t\t\t// Get max level id.\n\t\t\t\t$('input[type=\"hidden\"].give-levels_id', $this).each(function (index, item) {\n\t\t\t\t\tvar $item = $(item),\n\t\t\t\t\t\tcurrent_level = parseInt($item.val());\n\t\t\t\t\tif (max_level_id < current_level) {\n\t\t\t\t\t\tmax_level_id = current_level;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Auto set level id for new setting level setting group.\n\t\t\t\t$('input[type=\"hidden\"].give-levels_id', new_row).val(++max_level_id);\n\t\t\t});\n\t\t},\n\t};\n\n\t/**\n\t * Handle row count and field count for repeatable field.\n\t */\n\tvar handle_metabox_repeater_field_row_count = function (container, new_row) {\n\t\tvar row_count = $(container).attr('data-rf-row-count'),\n\t\t\t$container = $(container),\n\t\t\t$parent = $container.parents('.give-repeatable-field-section');\n\n\t\trow_count++;\n\n\t\t// Set name for fields.\n\t\t$('*', new_row).each(function () {\n\t\t\t$.each(this.attributes, function (index, element) {\n\t\t\t\tthis.value = this.value.replace('{{row-count-placeholder}}', row_count - 1);\n\t\t\t});\n\t\t});\n\n\t\t// Set row counter.\n\t\t$(container).attr('data-rf-row-count', row_count);\n\n\t\t// Fire event: Row added.\n\t\t$parent.trigger('repeater_field_new_row_added', [container, new_row]);\n\t};\n\n\t/**\n\t * Handle row remove for repeatable field.\n\t */\n\tvar handle_metabox_repeater_field_row_remove = function (container) {\n\t\tvar $container = $(container),\n\t\t\t$parent = $container.parents('.give-repeatable-field-section'),\n\t\t\trow_count = $(container).attr('data-rf-row-count');\n\n\t\t// Reduce row count.\n\t\t$container.attr('data-rf-row-count', --row_count);\n\n\t\t// Fire event: Row deleted.\n\t\t$parent.trigger('repeater_field_row_deleted');\n\t};\n\n\t/**\n\t * Add number suffix to repeater group.\n\t */\n\tvar handle_repeater_group_add_number_suffix = function ($parent) {\n\n\t\t// Bailout: check if auto group numbering is on or not.\n\t\tif (!parseInt($parent.data('group-numbering'))) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar $header_title_container = $('.give-row-head h2 span', $parent),\n\t\t\theader_text_prefix = $header_title_container.data('header-title');\n\n\t\t$header_title_container.each(function (index, item) {\n\t\t\tvar $item = $(item);\n\n\t\t\t// Bailout: do not rename header title in fields template.\n\t\t\tif ($item.parents('.give-template').length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$item.html(header_text_prefix + ': ' + index);\n\t\t});\n\t};\n\n\t/**\n\t * Payment history listing page js\n\t */\n\tvar GivePaymentHistory = {\n\t\tinit: function () {\n\t\t\t$('body').on('click', '#give-payments-filter input[type=\"submit\"]', this.handleBulkActions);\n\t\t},\n\n\t\thandleBulkActions: function ( e ) {\n\t\t\tvar currentAction = $(this).closest('.tablenav').find('select').val(),\n\t\t\t\tcurrentActionLabel = $(this).closest('.tablenav').find('option[value=\"' + currentAction + '\"]').text(),\n\t\t\t\t$payments = $('input[name=\"payment[]\"]:checked').length,\n\t\t\t\tisStatusTypeAction = (-1 !== currentAction.indexOf('set-status-')),\n\t\t\t\tconfirmActionNotice = '',\n\t\t\t\tstatus = '';\n\n\t\t\t// Set common action, if action type is status.\n\t\t\tcurrentAction = isStatusTypeAction ?\n\t\t\t\t'set-to-status' :\n\t\t\t\tcurrentAction;\n\n\t\t\tif ( '-1' === currentAction ) {\n\t\t\t\tnew GiveWarningAlert({\n\t\t\t\t\tmodalContent:{\n\t\t\t\t\t\ttitle: give_vars.donors_bulk_action.no_action_selected.title,\n\t\t\t\t\t\tdesc: give_vars.donors_bulk_action.no_action_selected.desc,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok,\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (Object.keys(give_vars.donations_bulk_action).length) {\n\t\t\t\tfor (status in give_vars.donations_bulk_action) {\n\t\t\t\t\tif (status === currentAction) {\n\n\t\t\t\t\t\t// Get status text if current action types is status.\n\t\t\t\t\t\tconfirmActionNotice = isStatusTypeAction ?\n\t\t\t\t\t\t\tgive_vars.donations_bulk_action[currentAction].zero.replace('{status}', currentActionLabel.replace('Set To ', '')) :\n\t\t\t\t\t\t\tgive_vars.donations_bulk_action[currentAction].zero;\n\n\t\t\t\t\t\t// Check if admin selected any donations or not.\n\t\t\t\t\t\tif (!parseInt($payments)) {\n\t\t\t\t\t\t\tnew GiveWarningAlert({\n\t\t\t\t\t\t\t\tmodalContent:{\n\t\t\t\t\t\t\t\t\ttitle: give_vars.donations_bulk_action.titles.zero,\n\t\t\t\t\t\t\t\t\tdesc: confirmActionNotice,\n\t\t\t\t\t\t\t\t\tcancelBtnTitle: give_vars.ok,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).render();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Get message on basis of payment count.\n\t\t\t\t\t\tconfirmActionNotice = (1 < $payments) ?\n\t\t\t\t\t\t\tgive_vars.donations_bulk_action[currentAction].multiple :\n\t\t\t\t\t\t\tgive_vars.donations_bulk_action[currentAction].single;\n\n\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\tnew GiveConfirmModal(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\t\t\t\ttitle: give_vars.confirm_bulk_action,\n\t\t\t\t\t\t\t\t\tdesc: confirmActionNotice\n\t\t\t\t\t\t\t\t\t\t.replace('{payment_count}', $payments)\n\t\t\t\t\t\t\t\t\t\t.replace('{status}', currentActionLabel.replace('Set To ', ''))\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tsuccessConfirm: function ( args ) {\n\t\t\t\t\t\t\t\t\t$( '#give-payments-filter' ).submit();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t).render();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t};\n\n\t// On DOM Ready.\n\t$(function () {\n\n\t\tgive_dismiss_notice();\n\t\tenable_admin_datepicker();\n\t\thandle_status_change();\n\t\tsetup_chosen_give_selects();\n\t\t$.giveAjaxifyFields({type: 'country_state', debug: true});\n\t\tGiveListDonation.init();\n\t\tGive_Edit_Donation.init();\n\t\tGive_Settings.init();\n\t\tGive_Reports.init();\n\t\tGiveDonor.init();\n\t\tAPI_Screen.init();\n\t\tGive_Export.init();\n\t\tGive_Updates.init();\n\t\tGive_Upgrades.init();\n\t\tEdit_Form_Screen.init();\n\t\tGivePaymentHistory.init();\n\n\t\t// Footer.\n\t\t$('a.give-rating-link').click(function () {\n\t\t\tjQuery(this).parent().text(jQuery(this).data('rated'));\n\t\t});\n\n\t\t// Ajax user search.\n\t\t$('.give-ajax-user-search').on('keyup', function () {\n\t\t\tvar user_search = $(this).val();\n\t\t\tvar exclude = '';\n\n\t\t\tif ($(this).data('exclude')) {\n\t\t\t\texclude = $(this).data('exclude');\n\t\t\t}\n\n\t\t\t$('.give-ajax').show();\n\t\t\tdata = {\n\t\t\t\taction: 'give_search_users',\n\t\t\t\tuser_name: user_search,\n\t\t\t\texclude: exclude\n\t\t\t};\n\n\t\t\tdocument.body.style.cursor = 'wait';\n\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\tdata: data,\n\t\t\t\tdataType: 'json',\n\t\t\t\turl: ajaxurl,\n\t\t\t\tsuccess: function (search_response) {\n\t\t\t\t\t$('.give-ajax').hide();\n\t\t\t\t\t$('.give_user_search_results').removeClass('hidden');\n\t\t\t\t\t$('.give_user_search_results span').html('');\n\t\t\t\t\t$(search_response.results).appendTo('.give_user_search_results span');\n\t\t\t\t\tdocument.body.style.cursor = 'default';\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\t$('body').on('click.giveSelectUser', '.give_user_search_results span a', function (e) {\n\t\t\te.preventDefault();\n\t\t\tvar login = $(this).data('login');\n\t\t\t$('.give-ajax-user-search').val(login);\n\t\t\t$('.give_user_search_results').addClass('hidden');\n\t\t\t$('.give_user_search_results span').html('');\n\t\t});\n\n\t\t$('body').on('click.giveCancelUserSearch', '.give_user_search_results a.give-ajax-user-cancel', function (e) {\n\t\t\te.preventDefault();\n\t\t\t$('.give-ajax-user-search').val('');\n\t\t\t$('.give_user_search_results').addClass('hidden');\n\t\t\t$('.give_user_search_results span').html('');\n\t\t});\n\n\t\tvar $poststuff = $('#poststuff'),\n\t\t\tthousand_separator = give_vars.thousands_separator,\n\t\t\tdecimal_separator = give_vars.decimal_separator,\n\t\t\tthousand_separator_count = '',\n\t\t\talphabet_count = '',\n\t\t\tprice_string = '',\n\n\t\t\t// Thousand separation limit in price depends upon decimal separator symbol.\n\t\t\t// If thousand separator is equal to decimal separator then price does not have more then 1 thousand separator otherwise limit is zero.\n\t\t\tthousand_separator_limit = (decimal_separator === thousand_separator ? 1 : 0);\n\n\t\t// Check & show message on keyup event.\n\t\t$poststuff.on('keyup', 'input.give-money-field, input.give-price-field', function () {\n\t\t\tvar tootltip_setting = {\n\t\t\t\tlabel: give_vars.price_format_guide.trim()\n\t\t\t};\n\n\t\t\t// Count thousand separator in price string.\n\t\t\tthousand_separator_count = ($(this).val().match(new RegExp(thousand_separator, 'g')) || []).length;\n\t\t\talphabet_count = ($(this).val().match(new RegExp('[a-z]', 'g')) || []).length;\n\n\t\t\t// Show qtip conditionally if thousand separator detected on price string.\n\t\t\tif ((-1 !== $(this).val().indexOf(thousand_separator)) && (thousand_separator_limit < thousand_separator_count)) {\n\t\t\t\t$(this).giveHintCss('show', tootltip_setting);\n\t\t\t} else if (alphabet_count) {\n\t\t\t\t$(this).giveHintCss('show', tootltip_setting);\n\t\t\t} else {\n\t\t\t\t$(this).giveHintCss('hide', tootltip_setting);\n\t\t\t}\n\n\t\t\t// Reset thousand separator count.\n\t\t\tthousand_separator_count = alphabet_count = '';\n\t\t});\n\n\t\t// Format price sting of input field on focusout.\n\t\t$poststuff.on('focusout', 'input.give-money-field, input.give-price-field', function () {\n\t\t\tprice_string = give_unformat_currency($(this).val(), false);\n\n\t\t\t$(this).giveHintCss( 'hide', {});\n\n\t\t\t// Back out.\n\t\t\tif (give_unformat_currency('0', false) === give_unformat_currency($(this).val(), false)) {\n\t\t\t\tvar default_amount = $(this).attr('placeholder');\n\t\t\t\tdefault_amount = !default_amount ? '0' : default_amount;\n\n\t\t\t\t$(this).val(default_amount);\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Replace dot decimal separator with user defined decimal separator.\n\t\t\tprice_string = price_string.replace('.', decimal_separator);\n\n\t\t\t// Check if current number is negative or not.\n\t\t\tif (-1 !== price_string.indexOf('-')) {\n\t\t\t\tprice_string = price_string.replace('-', '');\n\t\t\t}\n\n\t\t\t// Update format price string in input field.\n\t\t\t$(this).val(price_string);\n\t\t});\n\n\t\t// Set default value to 1 even if user inputs empty or negative number of donations.\n\t\t$poststuff.on('focusout', '#_give_number_of_donation_goal', function () {\n\t\t\tif (1 > $(this).val()) {\n\t\t\t\t$(this).val(1);\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * Responsive setting tab features.\n\t\t */\n\n\t\t// Show/Hide sub tab nav.\n\t\t$('.give-settings-page').on('click', '#give-show-sub-nav', function (e) {\n\t\t\te.preventDefault();\n\n\t\t\tvar $sub_tab_nav = $(this).next();\n\n\t\t\tif (!$sub_tab_nav.is(':hover')) {\n\t\t\t\t$sub_tab_nav.toggleClass('give-hidden');\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}).on('blur', '#give-show-sub-nav', function () {\n\t\t\tvar $sub_tab_nav = $(this).next();\n\n\t\t\tif (!$sub_tab_nav.is(':hover')) {\n\t\t\t\t$sub_tab_nav.addClass('give-hidden');\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * Automatically show/hide email setting fields.\n\t\t */\n\t\t$('.give_email_api_notification_status_setting input').change(function () {\n\t\t\t// Bailout.\n\t\t\tvar value = $(this).val(),\n\t\t\t\tis_enabled = ('enabled' === value),\n\t\t\t\t$setting_fields = {};\n\n\t\t\t// Get setting fields.\n\t\t\tif ($(this).closest('.give_options_panel').length) {\n\t\t\t\t$setting_fields = $(this).closest('.give_options_panel').children('.give-field-wrap:not(.give_email_api_notification_status_setting), .give-repeatable-field-section');\n\t\t\t} else if ($(this).closest('table').length) {\n\t\t\t\t$setting_fields = $(this).closest('table').find('tr:not(.give_email_api_notification_status_setting)');\n\t\t\t}\n\n\t\t\tif (-1 === jQuery.inArray(value, ['enabled', 'disabled', 'global'])) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Bailout.\n\t\t\tif (!$setting_fields.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Show hide setting fields.\n\t\t\tis_enabled ? $setting_fields.show() : $setting_fields.hide();\n\t\t});\n\n\t\t$('.give_email_api_notification_status_setting input:checked').change();\n\n\t\t// Render setting tab.\n\t\tgive_render_responsive_tabs();\n\t} );\n})( jQuery );\n\n/**\n * Responsive js.\n */\njQuery(window).resize(function () {\n\tgive_render_responsive_tabs();\n});\n\n/**\n * Render responsive tabs\n */\nfunction give_render_responsive_tabs() {\n\tvar $setting_page_form = jQuery('.give-settings-page'),\n\t\t$main_tab_nav = jQuery('h2.give-nav-tab-wrapper'),\n\t\tsetting_page_form_width = $setting_page_form.width(),\n\t\t$sub_tab_nav_wrapper = jQuery('.give-sub-nav-tab-wrapper'),\n\t\t$sub_tab_nav = jQuery('nav', $sub_tab_nav_wrapper),\n\t\t$setting_tab_links = jQuery('div.give-nav-tab-wrapper > a:not(give-not-tab)'),\n\t\t$show_tabs = [],\n\t\t$hide_tabs = [],\n\t\ttab_width = 0;\n\n\tif (600 < jQuery(window).outerWidth()) {\n\t\ttab_width = 200;\n\t}\n\n\t// Bailout.\n\tif (!$setting_page_form.length) {\n\t\treturn false;\n\t}\n\n\t// Update tab wrapper css.\n\t$main_tab_nav.css({\n\t\theight: 'auto',\n\t\toverflow: 'visible'\n\t});\n\n\t// Show all tab if anyone hidden to calculate correct tab width.\n\t$setting_tab_links.removeClass('give-hidden');\n\n\tvar refactor_tabs = new Promise(\n\t\tfunction (resolve, reject) {\n\n\t\t\t// Collect tabs to show or hide.\n\t\t\tjQuery.each($setting_tab_links, function (index, $tab_link) {\n\t\t\t\t$tab_link = jQuery($tab_link);\n\t\t\t\ttab_width = tab_width + parseInt($tab_link.outerWidth());\n\n\t\t\t\tif (tab_width < setting_page_form_width) {\n\t\t\t\t\t$show_tabs.push($tab_link);\n\t\t\t\t} else {\n\t\t\t\t\t$hide_tabs.push($tab_link);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tresolve(true);\n\t\t}\n\t);\n\n\trefactor_tabs.then(function (is_refactor_tabs) {\n\n\t\t// Remove current tab from sub menu and add this to main menu if exist and get last tab from main menu and add this to sub menu.\n\t\tif ($hide_tabs.length && (-1 !== window.location.search.indexOf('&tab='))) {\n\t\t\tvar $current_tab_nav = {},\n\t\t\t\tquery_params = get_url_params();\n\n\t\t\t$hide_tabs = $hide_tabs.filter(function ($tab_link) {\n\t\t\t\tvar is_current_nav_item = (-1 !== parseInt($tab_link.attr('href').indexOf('&tab=' + query_params['tab'])));\n\n\t\t\t\tif (is_current_nav_item) {\n\t\t\t\t\t$current_tab_nav = $tab_link;\n\t\t\t\t}\n\n\t\t\t\treturn (!is_current_nav_item);\n\t\t\t});\n\n\t\t\tif ($current_tab_nav.length) {\n\t\t\t\t$hide_tabs.unshift($show_tabs.pop());\n\t\t\t\t$show_tabs.push($current_tab_nav);\n\t\t\t}\n\t\t}\n\n\t\tvar show_tabs = new Promise(function (resolve, reject) {\n\n\t\t\t// Show main menu tabs.\n\t\t\tif ($show_tabs.length) {\n\t\t\t\tjQuery.each($show_tabs, function (index, $tab_link) {\n\t\t\t\t\t$tab_link = jQuery($tab_link);\n\n\t\t\t\t\tif ($tab_link.hasClass('give-hidden')) {\n\t\t\t\t\t\t$tab_link.removeClass('give-hidden');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tresolve(true);\n\t\t});\n\n\t\tshow_tabs.then(function (is_show_tabs) {\n\n\t\t\t// Hide sub menu tabs.\n\t\t\tif ($hide_tabs.length) {\n\t\t\t\t$sub_tab_nav.html('');\n\n\t\t\t\tjQuery.each($hide_tabs, function (index, $tab_link) {\n\t\t\t\t\t$tab_link = jQuery($tab_link);\n\t\t\t\t\tif (!$tab_link.hasClass('nav-tab-active')) {\n\t\t\t\t\t\t$tab_link.addClass('give-hidden');\n\t\t\t\t\t}\n\t\t\t\t\t$tab_link.clone().removeClass().appendTo($sub_tab_nav);\n\t\t\t\t});\n\n\t\t\t\tif (!jQuery('.give-sub-nav-tab-wrapper', $main_tab_nav).length) {\n\t\t\t\t\t$main_tab_nav.append($sub_tab_nav_wrapper);\n\t\t\t\t}\n\n\t\t\t\t$sub_tab_nav_wrapper.show();\n\t\t\t} else {\n\t\t\t\t$sub_tab_nav_wrapper.hide();\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Get url query params.\n *\n * @returns {Array}\n */\nfunction get_url_params() {\n\tvar vars = [], hash;\n\tvar hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');\n\tfor (var i = 0; i < hashes.length; i++) {\n\t\thash = hashes[i].split('=');\n\t\tvars[hash[0]] = hash[1];\n\t}\n\treturn vars;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/admin/admin-scripts.js","/**\n * Give Admin JS\n *\n * @package: Give\n * @subpackage: Assets/JS\n * @copyright: Copyright (c) 2016, WordImpress\n * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License\n */\n\n/**\n * Do not allow user to reload the page\n *\n * @since 1.8.14\n */\n\nimport {GiveWarningAlert, GiveErrorAlert, GiveConfirmModal} from '../plugins/modal';\n\nvar give_setting_edit = true;\n\njQuery.noConflict();\n(\n\tfunction ( $ ) {\n\n\t\t// On DOM Ready.\n\t\t$( function () {\n\t\t\tgive_import_donation_onload();\n\t\t} );\n\t}\n)( jQuery );\n\n/**\n * Run when user click on submit button.\n *\n * @since 1.8.17\n */\nfunction give_on_core_settings_import_start() {\n\tvar import_step = 'body.give_forms_page_give-tools .give-tools-import-tab #give-import-core-settings-form table.step-2';\n\tif ( jQuery( import_step ).length > 0 ) {\n\n\t\tvar $form = jQuery( 'form.tools-setting-page-import' );\n\t\tvar progress = $form.find( '.give-progress' );\n\n\t\tgive_setting_edit = true;\n\n\t\tjQuery.ajax( {\n\t\t\ttype: 'POST',\n\t\t\turl: ajaxurl,\n\t\t\tdata: {\n\t\t\t\taction: give_vars.core_settings_import,\n\t\t\t\tfields: $form.serialize()\n\t\t\t},\n\t\t\tdataType: 'json',\n\t\t\tsuccess: function ( response ) {\n\t\t\t\tgive_setting_edit = false;\n\t\t\t\tif ( true === response.success ) {\n\t\t\t\t\tjQuery( progress ).find( 'div' ).width( response.percentage + '%' );\n\t\t\t\t} else {\n\t\t\t\t\tnew GiveErrorAlert({\n\t\t\t\t\t\tmodalContent:{\n\t\t\t\t\t\t\ttitle: give_vars.import_failed,\n\t\t\t\t\t\t\tdesc: give_vars.error_message,\n\t\t\t\t\t\t\tcancelBtnTitle: give_vars.ok,\n\t\t\t\t\t\t}\n\t\t\t\t\t}).render();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\twindow.location = response.url;\n\t\t\t},\n\t\t\terror: function () {\n\t\t\t\tgive_setting_edit = false;\n\n\t\t\t\tnew GiveErrorAlert({\n\t\t\t\t\tmodalContent:{\n\t\t\t\t\t\ttitle: give_vars.import_failed,\n\t\t\t\t\t\tdesc: give_vars.error_message,\n\t\t\t\t\t\tcancelBtnTitle: give_vars.ok,\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Check if admin is on step 1 and file is invalid\n *\n * @since 2.1\n */\nfunction give_import_core_settings_json_is_valid() {\n\tvar import_step = 'body.give_forms_page_give-tools .give-tools-import-tab #give-import-core-settings-form table.step-1 .is_json_valid';\n\tif ( jQuery( import_step ).length > 0 ) {\n\t\twindow.location = jQuery( import_step ).val();\n\t}\n}\n\n/**\n * Check if admin is on step 3 where we start imporing Donation from CSV via AJAX\n *\n * @since 2.1\n */\nfunction give_start_importing_donations() {\n\tvar import_step = 'body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-3';\n\tif ( jQuery( import_step ).length > 0 ) {\n\t\tgive_on_donation_import_ajax();\n\t}\n}\n\n/**\n * Check if admin is on step 2 and CSV is invalid\n *\n * @since 2.1\n */\nfunction give_import_donation_csv_not_valid() {\n\tvar import_step = 'body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-2 .csv_not_valid';\n\tif ( jQuery( import_step ).length > 0 ) {\n\t\twindow.location = jQuery( import_step ).val();\n\t}\n}\n\n/**\n * Check if admin is on step 1 and csv is valid\n *\n * @since 2.1\n */\nfunction give_import_donation_valid_csv() {\n\tvar import_step = 'body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-1 .is_csv_valid';\n\tif ( jQuery( import_step ).length > 0 ) {\n\t\twindow.location = jQuery( import_step ).val();\n\t}\n}\n\n/**\n * Upload CSV ajax\n *\n * @since 1.8.13\n */\nfunction give_on_donation_import_ajax() {\n\tvar $form = jQuery( 'form.tools-setting-page-import' );\n\n\t/**\n\t * Do not allow user to reload the page\n\t *\n\t * @since 1.8.14\n\t */\n\tgive_setting_edit = true;\n\n\tvar progress = $form.find( '.give-progress' );\n\n\tvar total_ajax = jQuery( progress ).data( 'total_ajax' ),\n\t\tcurrent = jQuery( progress ).data( 'current' ),\n\t\tstart = jQuery( progress ).data( 'start' ),\n\t\tend = jQuery( progress ).data( 'end' ),\n\t\tnext = jQuery( progress ).data( 'next' ),\n\t\ttotal = jQuery( progress ).data( 'total' ),\n\t\tper_page = jQuery( progress ).data( 'per_page' );\n\n\tjQuery.ajax( {\n\t\ttype: 'POST',\n\t\turl: ajaxurl,\n\t\tdata: {\n\t\t\taction: give_vars.give_donation_import,\n\t\t\ttotal_ajax: total_ajax,\n\t\t\tcurrent: current,\n\t\t\tstart: start,\n\t\t\tend: end,\n\t\t\tnext: next,\n\t\t\ttotal: total,\n\t\t\tper_page: per_page,\n\t\t\tfields: $form.serialize()\n\t\t},\n\t\tdataType: 'json',\n\t\tsuccess: function ( response ) {\n\t\t\tjQuery( progress ).data( 'current', response.current );\n\t\t\tjQuery( progress ).find( 'div' ).width( response.percentage + '%' );\n\n\t\t\tif ( response.next == true ) {\n\t\t\t\tjQuery( progress ).data( 'start', response.start );\n\t\t\t\tjQuery( progress ).data( 'end', response.end );\n\n\t\t\t\tif ( response.last == true ) {\n\t\t\t\t\tjQuery( progress ).data( 'next', false );\n\t\t\t\t}\n\t\t\t\tgive_on_donation_import_ajax();\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * Now user is allow to reload the page.\n\t\t\t\t *\n\t\t\t\t * @since 1.8.14\n\t\t\t\t */\n\t\t\t\tgive_setting_edit = false;\n\t\t\t\twindow.location = response.url;\n\t\t\t}\n\t\t},\n\t\terror: function () {\n\t\t\t/**\n\t\t\t * Now user is allow to reload the page.\n\t\t\t *\n\t\t\t * @since 1.8.14\n\t\t\t */\n\t\t\tgive_setting_edit = false;\n\n\t\t\tnew GiveErrorAlert({\n\t\t\t\tmodalContent:{\n\t\t\t\t\ttitle: give_vars.import_failed,\n\t\t\t\t\tdesc: give_vars.error_message,\n\t\t\t\t\tcancelBtnTitle: give_vars.ok,\n\t\t\t\t}\n\t\t\t}).render();\n\t\t}\n\t} );\n}\n\n/**\n * Give Import donation run on load once page is load completed.\n */\nfunction give_import_donation_onload() {\n\twindow.onload = function () {\n\t\tgive_import_donation_required_fields_check();\n\t\tgive_import_donation_on_drop_down_change();\n\t\tgive_start_importing_donations();\n\t\tgive_import_donation_valid_csv();\n\t\tgive_import_donation_csv_not_valid();\n\t\tgive_on_core_settings_import_start();\n\t\tgive_import_core_settings_json_is_valid();\n\t};\n}\n\n/**\n * Give import donation on change of drop down and update the required fields.\n */\nfunction give_import_donation_on_drop_down_change() {\n\tvar fields = document.querySelector( '.give-tools-setting-page-import table.step-2 tbody select' );\n\tif ( fields !== 'undefined' && fields !== null ) {\n\t\tjQuery( '.give-tools-setting-page-import table.step-2 tbody' ).on( 'change', 'select', function () {\n\t\t\tgive_import_donation_required_fields_check();\n\t\t} );\n\t}\n}\n\n/**\n * Give Import Donations check required fields\n */\nfunction give_import_donation_required_fields_check() {\n\tvar required_fields = document.querySelector( '.give-tools-setting-page-import table.step-2 .give-import-donation-required-fields' );\n\tif ( required_fields !== 'undefined' && required_fields !== null ) {\n\t\tvar submit = true,\n\t\t\temail = false,\n\t\t\tfirst_name = false,\n\t\t\tamount = false,\n\t\t\tform = false;\n\n\t\tdocument.querySelectorAll( '.give-import-donation-required-fields li' ).forEach( function ( value ) {\n\t\t\tvalue.querySelector( '.dashicons' ).classList.remove( 'dashicons-yes' );\n\t\t\tvalue.querySelector( '.dashicons' ).classList.add( 'dashicons-no-alt' );\n\t\t} );\n\n\t\tvar select_fields = Array.from( document.querySelectorAll( 'table.step-2 tbody select' ) ).map( function ( field ) {\n\t\t\treturn field.value;\n\t\t} );\n\n\t\tif ( select_fields.includes( 'email' ) ) {\n\t\t\temail = true;\n\t\t\tdocument.querySelector( '.give-import-donation-required-email .dashicons' ).classList.remove( 'dashicons-no-alt' );\n\t\t\tdocument.querySelector( '.give-import-donation-required-email .dashicons' ).classList.add( 'dashicons-yes' );\n\t\t}\n\n\t\tif ( select_fields.includes( 'first_name' ) ) {\n\t\t\tfirst_name = true;\n\t\t\tdocument.querySelector( '.give-import-donation-required-first .dashicons' ).classList.remove( 'dashicons-no-alt' );\n\t\t\tdocument.querySelector( '.give-import-donation-required-first .dashicons' ).classList.add( 'dashicons-yes' );\n\t\t}\n\n\t\tif ( select_fields.includes( 'amount' ) ) {\n\t\t\tamount = true;\n\t\t\tdocument.querySelector( '.give-import-donation-required-amount .dashicons' ).classList.remove( 'dashicons-no-alt' );\n\t\t\tdocument.querySelector( '.give-import-donation-required-amount .dashicons' ).classList.add( 'dashicons-yes' );\n\t\t}\n\n\t\tif ( select_fields.includes( 'form_id' ) || select_fields.includes( 'form_title' ) ) {\n\t\t\tform = true;\n\t\t\tdocument.querySelector( '.give-import-donation-required-form .dashicons' ).classList.remove( 'dashicons-no-alt' );\n\t\t\tdocument.querySelector( '.give-import-donation-required-form .dashicons' ).classList.add( 'dashicons-yes' );\n\t\t}\n\n\t\tif ( email && first_name && amount && form ) {\n\t\t\tsubmit = false;\n\t\t}\n\n\t\tdocument
|
|