Give – Donation Plugin and Fundraising Platform - Version 2.2.5

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 Icon 128x128 Give – Donation Plugin and Fundraising Platform
Version 2.2.5
Comparing to
See all releases

Code changes from version 2.2.4 to 2.2.5

Files changed (1) hide show
  1. assets/dist/js/admin.js.map +0 -1
assets/dist/js/admin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///js/admin.js","webpack:///webpack/bootstrap 5e843595f24c874d514f","webpack:///external \"jQuery\"","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/accounting/accounting.js-exposed","webpack:///./node_modules/accounting/accounting.js","webpack:///./node_modules/magnific-popup/dist/jquery.magnific-popup.js","webpack:///./assets/src/js/plugins/give-hint.css.js","webpack:///./assets/src/js/plugins/give-api/api.js","webpack:///./assets/src/js/plugins/give-api/notice.js","webpack:///./assets/src/js/plugins/give-api/form.js","webpack:///./assets/src/js/plugins/dynamicListener.js","webpack:///./assets/src/js/plugins/modal.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/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":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE_0__","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","g","Function","eval","e","window","global","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","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","apply","$","mfp","_prevStatus","_document","_prevContentType","_wrapClasses","_currPopupType","MagnificPopup","_isJQ","_window","_mfpOn","f","ev","on","_getEl","className","appendTo","html","raw","el","document","createElement","innerHTML","appendChild","_mfpTrigger","data","triggerHandler","st","callbacks","charAt","toLowerCase","slice","_getCloseBtn","type","currTemplate","closeBtn","closeMarkup","tClose","_checkInstance","magnificPopup","instance","init","supportsTransitions","style","v","pop","constructor","appVersion","navigator","isLowIE","isIE8","all","addEventListener","isAndroid","test","isIOS","supportsTransition","probablyMobile","userAgent","popupsCache","open","isObj","items","toArray","index","item","parsed","isOpen","updateItemHTML","types","mainEl","eq","extend","fixedContentPos","modal","closeOnContentClick","closeOnBgClick","showCloseBtn","enableEscapeKey","bgOverlay","close","wrap","attr","_checkIfClose","target","container","contentContainer","preloader","tLoading","toUpperCase","closeBtnInside","template","values","close_replaceWith","append","alignTop","css","overflow","overflowY","overflowX","top","scrollTop","position","fixedBgPos","height","keyCode","updateSize","addClass","windowHeight","wH","windowStyles","_hasScrollBar","_getScrollbarSize","marginRight","isIE7","classesToadd","mainClass","_addClassToMFP","add","prependTo","body","_lastFocusedEl","activeElement","setTimeout","content","_setFocus","_onFocusIn","removalDelay","_close","classesToRemove","REMOVING_CLASS","detach","empty","_removeClassFromMFP","off","removeAttr","currItem","autoFocusLast","focus","prevHeight","winHeight","zoomLevel","documentElement","clientWidth","innerWidth","innerHeight","parseEl","markup","removeClass","newContent","appendContent","preloaded","prepend","find","tagName","src","hasClass","addGroup","options","eHandler","mfpEl","_openClick","eName","delegate","midClick","which","ctrlKey","metaKey","altKey","shiftKey","disableOn","isFunction","width","preventDefault","stopPropagation","updateStatus","status","text","stopImmediatePropagation","closeOnContent","closeOnBg","contains","cName","scrollHeight","_parseMarkup","arr","each","EVENT_NS","replaceWith","is","scrollbarSize","scrollDiv","cssText","offsetWidth","removeChild","proto","registerModule","push","fn","jqEl","itemOpts","arguments","_hiddenClass","_inlinePlaceholder","_lastInlineElement","_putInlineElementsBack","after","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","title","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","left","-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","next","prev","arrowLeft","arrowRight","click","_preloadTimeout","preloadNearbyImages","goTo","newIndex","preloadBefore","min","preloadAfter","_preloadItem","replaceSrc","ratio","initRetina","devicePixelRatio","retina","max-width","jQuery","giveHintCss","action","$this","label","$tooltip","outerHeight","outerWidth","ready","reset_qtip","tooltip","classes","icon_classes","label_length","grep","qtip_tooltips","__webpack_exports__","__WEBPACK_IMPORTED_MODULE_0__notice__","__WEBPACK_IMPORTED_MODULE_1__form__","Give","subHelperObjs","trigger","formatCurrency","price","args","$form","format_args","getGlobalVar","trim","form","getInfo","actual_price","decimal_amount","result","amount","decimal_index","Number","unFormatCurrency","decimal_separator","getParameterByName","location","href","exec","decodeURIComponent","str","giveGlobals","getGlobal","give_global_vars","give_vars","setCache","cache","getCache","formObj","__getCookie","cookie","parts","shift","notice","renderNotice","notice_code","$container","$notice","getNotice","insertBefore","show","error_code","notice_msg","formatted_amount","getMinimumAmount","getMaximumAmount","field","formatCreditCard","__initialize_cache","onload","__sendBackToForm","isFormExist","getElementsByName","disable","is_disable","prop","formatAmount","gateway","hasAttribute","setInfo","getGateway","getVariablePrices","formLevels","variable_prices","price_id","getPriceID","is_amount","current_amount","variable_price","getAmount","getNonce","nonce","resetNonce","post","give_form_id","response","resetAllNonce","createUserNonceField","give_form_hash","give_form_user_register_hash","done","autoSelectDonationLevel","blur","autoSetMultiLevel","$level","parents","level_amount","level_price_id","form_id","payment_mode","$form_wrapper","display_modal","display_button","display_reveal","level_id","level_field","give_open_form_modal","hide","slideDown","isValidDonationAmount","min_amount","max_amount","$item","$forms","card_number","card_cvc","card_expiry","payment","globalSope","getConditionalCallback","selector","callback","matches","Element","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","ownerDocument","querySelectorAll","addDynamicEventListener","rootElement","eventType","_possibleConstructorReturn","ReferenceError","_inherits","subClass","superClass","TypeError","create","writable","setPrototypeOf","__proto__","_classCallCheck","Constructor","GiveModal","GiveErrorAlert","GiveWarningAlert","GiveNoticeAlert","GiveSuccessAlert","GiveConfirmModal","GiveFormModal","__WEBPACK_IMPORTED_MODULE_0_magnific_popup__","__WEBPACK_IMPORTED_MODULE_1__dynamicListener_js__","_createClass","defineProperties","props","descriptor","protoProps","staticProps","Error","config","assign","triggerSelector","externalPlugin","modalWrapper","modalContent","setupTemplate","popupConfig","__setupClickEvent","desc","link","link_text","cancelBtnTitle","confirmBtnTitle","getTemplate","event","_GiveModal","_this","getPrototypeOf","_GiveModal2","_this2","_GiveModal3","_this3","_GiveModal4","_this4","_GiveModal5","_this5","successConfirm","_GiveModal6","_this6","__closePopup","__confirmPopup","__submitPopup","__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__plugins_give_api_api__","__WEBPACK_IMPORTED_MODULE_10__plugins_modal_js__","__WEBPACK_IMPORTED_MODULE_11__admin_forms__","__WEBPACK_IMPORTED_MODULE_12__admin_settings__","__WEBPACK_IMPORTED_MODULE_13__admin_export__","__WEBPACK_IMPORTED_MODULE_14__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","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","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","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","dropdown","search_field","search_results","search_no_results","search_choices","search_container","selected_item","set_tab_index","set_label_behavior","container_mouseup","search_results_mousewheel","close_field","form_field_label","tabIndex","removeData","search_field_disabled","toggleClass","results_reset","delta","originalEvent","deltaY","wheelDelta","detail","show_search_field_default","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","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","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","ajaxurl","show_field","states_label","states_found","default_state","Give_Selector_Cache","collection","refresh_cache","repeatable_fields","custom_settings","initialize","wrapper","row_count","row","filter","row_template","before_add","new_row","after_add","confirm_before_remove_row","confirm_before_remove_row_text","confirm","before_remove","after_remove","is_sortable","ui","sortable","sortable_options","handle","move","attributes","row_count_placeholder","default_settings","misc_cleanup","handle_default_radio","toggle_conditional_form_fields","goal_option","goal_format","goal_format_val","goal_option_val","defaultNameTitlePrefixChecked","titlePrefixChecked","handle_repeatable_row_ID","set_row_ids","count_repeatable_rows","row_counter","row_largest_number","row_number","row_id","$payment_gateways","currency_text","give_settings_currency","currency_sign","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","message","render","give_export_update_donation_form","fields","serialize","form_ids","output_give_donations_fields","standard_fields","standard_field_list","hidden_fields","hidden_field_list","alert","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","search","$current_tab_nav","query_params","get_url_params","is_current_nav_item","unshift","is_show_tabs","hash","vars","hashes","__WEBPACK_IMPORTED_MODULE_0__plugins_modal__","give_setting_edit","give_unformat_currency","dp","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","chosenText","lasteturn","$no_results_li","error_string","ajax_search_msg","no_results_msg","typingTimer","$search_field","lastKey","search_type","dataType","fail","console","GiveListDonation","deleteSingleDonation","resendSingleDonationReceipt","Give_Edit_Donation","edit_address","add_note","remove_note","new_donor","resend_receipt","variable_price_list","state_wrap","postData","payment_id","note","border_color","that","note_id","toggle","variable_prices_html_container","prices","$total_amount","Give_Settings","toggle_gateways","setting_change_country","toggle_options","main_setting_update_notice","verify_settings","saveButtonTriggered","changeAlert","detectSettingsChange","sequentialDonationIDPreview","radio","checked_cbs","checked","fieldValueEmail","fieldValueRecaptcha","field_value","$setting_message","slideUp","success_setting","failure_setting","notice_html","$notice_container","confirmationMessage","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","current_forms","min-width","submit","selection","has_errors","Give_Export","dismiss_message","submitButton","parent_notices","process_step","reset_form","error_message","success_message","percentage","reset","responseText","Give_Updates","$self","main_container","update_link","run_upload_container","progress_main_container","heading","progress_container","update_progress_counter","start_db_update","get_db_updates_info","fadeOut","run_db_update","always","keys","total_percentage","updates","ajax_error","update","Give_Upgrades","restartUpgrade","stopUpgrade","restartUpdater","handle_status_change","GiveDonor","onLoadPageNumber","unlockDonorFields","editDonor","add_email","removeUser","cancelEdit","delete_checked","addressesAction","bulkDeleteDonor","handleBulkActions","fadeIn","donorID","give_action","customer_id","_wpnonce","redirect","donor_note","add_donor_note_nonce","records_input","button","email","primary","$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","donorSelector","bulkDeleteList","currentAction","donors","paged","changedPage","selectBulkActionNotice","confirmActionNotice","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","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","$rows","$fields","stop","$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","donors_bulk_action","no_action_selected","donations_bulk_action","titles","single","debug","user_search","exclude","user_name","search_response","login","$poststuff","thousand_separator","thousand_separator_count","alphabet_count","price_string","thousand_separator_limit","tootltip_setting","default_amount","is_enabled","$setting_fields","give_on_core_settings_import_start","progress","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_import_donation_onload","give_import_donation_required_fields_check","give_import_donation_on_drop_down_change","querySelector","required_fields","first_name","forEach","classList","select_fields","includes","getElementById"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,WACA,kBAAAC,gBAAAC,IACAD,QAAA,UAAAJ,GACA,gBAAAC,SACAA,QAAA,KAAAD,EAAAG,QAAA,WAEAJ,EAAA,KAAAC,EAAAD,EAAA,SACC,mBAAAO,WAAAC,KAAA,SAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAV,OAGA,IAAAC,GAAAU,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAb,WAUA,OANAQ,GAAAE,GAAAI,KAAAb,EAAAD,QAAAC,IAAAD,QAAAS,GAGAR,EAAAY,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uD,cAAe,oDAAqDI,UAAUzoD,IAAK,mBAGxF0oD,EAAcC,SAAU,YAAeD,EAAcC,SAAU,iBACnEn4C,GAAO,EACP1W,SAASuuD,cAAe,kDAAmDI,UAAUx9C,OAAQ,oBAC7FnR,SAASuuD,cAAe,kDAAmDI,UAAUzoD,IAAK,kBAGtF+9C,GAASwK,GAAc13C,GAAUL,IACrC4pC,GAAS,GAGVtgD,SAAS8uD,eAAgB,wBAAyB3qC,SAAWm8B,GAhS/D,GAAApG,GAAAjiD,EAAA,IAkBIkiD,GAAoB,GAExB,SAAav7C,GAGXA,EAAG,WACFwvD,OAGCv5C","file":"js/admin.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"jQuery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"jQuery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Give\"] = factory(require(\"jQuery\"));\n\telse\n\t\troot[\"Give\"] = factory(root[\"jQuery\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"jQuery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"jQuery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Give\"] = factory(require(\"jQuery\"));\n\telse\n\t\troot[\"Give\"] = factory(root[\"jQuery\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn /******/ (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 = 25);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n/***/ }),\n/* 1 */\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/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"accounting\"] = __webpack_require__(3);\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 3 */\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/* 4 */\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__(0)], __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\">&#215;</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/* 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/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__notice__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__form__ = __webpack_require__(8);\n/* global accounting, give_global_vars, jQuery */\n\n\n\n/**\n * This API is under development.\n *\n * Currently used only for internal purpose.\n */\nvar Give = {\n\tinit: function init() {\n\t\tvar subHelperObjs = ['form'],\n\t\t counter = 0;\n\t\tjQuery(document).trigger('give:preInit');\n\n\t\t// Initialize all init methods of sub helper objects.\n\t\twhile (counter < subHelperObjs.length) {\n\t\t\tif (!!Give[subHelperObjs[counter]].init) {\n\t\t\t\tGive[subHelperObjs[counter]].init();\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\n\t\tjQuery(document).trigger('give:postInit');\n\t},\n\n\tfn: {\n\t\t/**\n * Format Currency\n *\n * Formats the currency with accounting.js\n *\n * @param {string} price\n * @param {object} args\n * @param {object} $form\n * @returns {*|string}\n */\n\t\tformatCurrency: function formatCurrency(price, args, $form) {\n\t\t\t// Global currency setting.\n\t\t\tvar format_args = {\n\t\t\t\tsymbol: '',\n\t\t\t\tdecimal: this.getGlobalVar('decimal_separator'),\n\t\t\t\tthousand: this.getGlobalVar('thousands_separator'),\n\t\t\t\tprecision: parseInt(this.getGlobalVar('number_decimals')),\n\t\t\t\tcurrency: this.getGlobalVar('currency')\n\t\t\t};\n\n\t\t\tprice = price.toString().trim();\n\t\t\t$form = 'undefined' === typeof $form ? {} : $form;\n\n\t\t\t// Form specific currency setting.\n\t\t\tif ($form.length) {\n\t\t\t\t//Set the custom amount input value format properly\n\t\t\t\tformat_args = {\n\t\t\t\t\tsymbol: '',\n\t\t\t\t\tdecimal: Give.form.fn.getInfo('decimal_separator', $form),\n\t\t\t\t\tthousand: Give.form.fn.getInfo('thousands_separator', $form),\n\t\t\t\t\tprecision: Give.form.fn.getInfo('number_decimals', $form),\n\t\t\t\t\tcurrency: Give.form.fn.getInfo('currency_code', $form)\n\t\t\t\t};\n\t\t\t}\n\n\t\t\targs = jQuery.extend(format_args, args);\n\n\t\t\t// Make sure precision is integer type\n\t\t\targs.precision = parseInt(args.precision);\n\n\t\t\tif ('INR' === args.currency) {\n\t\t\t\tvar actual_price = accounting.unformat(price, '.').toString(),\n\t\t\t\t decimal_amount = '',\n\t\t\t\t result = void 0,\n\t\t\t\t amount = void 0,\n\t\t\t\t decimal_index = actual_price.indexOf('.');\n\n\t\t\t\tif (-1 !== decimal_index) {\n\t\t\t\t\tif (args.precision) {\n\t\t\t\t\t\tdecimal_amount = Number(actual_price.substr(parseInt(decimal_index))).toFixed(args.precision).toString().substr(1);\n\t\t\t\t\t\tdecimal_amount = decimal_amount.length ? decimal_amount : '.0000000000'.substr(0, parseInt(decimal_index) + 1);\n\n\t\t\t\t\t\tif (args.precision + 1 > decimal_amount.length) {\n\t\t\t\t\t\t\tdecimal_amount = (decimal_amount + '000000000').substr(0, args.precision + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tactual_price = actual_price.substr(0, parseInt(decimal_index));\n\t\t\t\t}\n\n\t\t\t\t// Extract last 3 from amount\n\t\t\t\tresult = actual_price.substr(-3);\n\t\t\t\tamount = actual_price.substr(0, parseInt(actual_price.length) - 3);\n\n\t\t\t\t// Apply digits 2 by 2\n\t\t\t\twhile (amount.length > 0) {\n\t\t\t\t\tresult = amount.substr(-2) + args.thousand + result;\n\t\t\t\t\tamount = amount.substr(0, parseInt(amount.length) - 2);\n\t\t\t\t}\n\n\t\t\t\tif (decimal_amount.length) {\n\t\t\t\t\tresult = result + decimal_amount;\n\t\t\t\t}\n\n\t\t\t\tprice = result;\n\n\t\t\t\tif (undefined !== args.symbol && args.symbol.length) {\n\t\t\t\t\tif ('after' === args.position) {\n\t\t\t\t\t\tprice = price + args.symbol;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprice = args.symbol + price;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//Properly position symbol after if selected\n\t\t\t\tif ('after' === args.position) {\n\t\t\t\t\targs.format = '%v%s';\n\t\t\t\t}\n\n\t\t\t\tprice = accounting.formatMoney(price, args);\n\t\t\t}\n\n\t\t\treturn price;\n\t\t},\n\n\t\t/**\n * Unformat Currency\n *\n * @param price\n * @param {string} decimal_separator\n * @returns {number}\n */\n\t\tunFormatCurrency: function unFormatCurrency(price, decimal_separator) {\n\t\t\tif ('string' === typeof price) {\n\t\t\t\tvar regex = ',' === decimal_separator.trim() ? /[^0-9\\,-]+/g : /[^0-9\\.-]+/g;\n\n\t\t\t\tprice = price.replace(regex, '');\n\n\t\t\t\tif (0 === price.indexOf(decimal_separator)) {\n\t\t\t\t\tprice = price.substr(1);\n\t\t\t\t} else if (price.length - 1 === price.indexOf(decimal_separator)) {\n\t\t\t\t\tprice = price.slice(0, -1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn Math.abs(parseFloat(accounting.unformat(price, decimal_separator)));\n\t\t},\n\n\t\t/**\n * Get Parameter by Name\n *\n * @see: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript\n * @param name\n * @param url\n * @since 1.4.2\n * @returns {*}\n */\n\t\tgetParameterByName: function getParameterByName(name, url) {\n\t\t\tif (!url) {\n\t\t\t\turl = window.location.href;\n\t\t\t}\n\n\t\t\tname = name.replace(/[\\[\\]]/g, '\\\\$&');\n\n\t\t\tvar regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),\n\t\t\t results = regex.exec(url);\n\n\t\t\tif (!results) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (!results[2]) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn decodeURIComponent(results[2].replace(/\\+/g, ' '));\n\t\t},\n\n\t\t/**\n * Get information from global var\n *\n * @since 1.8.17\n * @param {string} str Variable in global param.\n *\n * @return {string}\n */\n\t\tgetGlobalVar: function getGlobalVar(str) {\n\t\t\tvar giveGlobals = this.getGlobal();\n\n\t\t\treturn 'undefined' === typeof giveGlobals[str] ? '' : giveGlobals[str];\n\t\t},\n\n\t\t/**\n * Get global param\n *\n * @since 2.2.4\n *\n * @return {object} WordPress localized global param.\n */\n\t\tgetGlobal: function getGlobal() {\n\t\t\treturn 'undefined' === typeof give_global_vars ? give_vars : give_global_vars;\n\t\t},\n\n\t\t/**\n * set cache\n *\n * @since 1.8.17\n *\n * @param {string} key\n * @param {string} value\n * @param {object} $form\n */\n\t\tsetCache: function setCache(key, value, $form) {\n\t\t\tif ($form.length) {\n\t\t\t\tGive.cache['form_' + Give.form.fn.getInfo('form-id', $form)][key] = value;\n\t\t\t} else {\n\t\t\t\tGive.cache[key] = value;\n\t\t\t}\n\t\t},\n\n\t\t/**\n * Get cache\n *\n * @since 1.8.17\n * @param key\n * @param $form\n * @return {string|*}\n */\n\t\tgetCache: function getCache(key, $form) {\n\t\t\tvar cache = void 0,\n\t\t\t formObj = Give.cache['form_' + Give.form.fn.getInfo('form-id', $form)];\n\n\t\t\tif ($form.length) {\n\t\t\t\tcache = 'undefined' !== typeof formObj ? formObj[key] : '';\n\t\t\t} else {\n\t\t\t\tcache = Give.cache[key];\n\t\t\t}\n\n\t\t\tcache = 'undefined' === typeof cache ? '' : cache;\n\n\t\t\treturn cache;\n\t\t},\n\n\t\t/**\n * Get cookie\n * Note: only for internal use\n *\n * @since 2.2.20\n * @private\n *\n * @param {string} name Cookie name\n * @return {string}\n */\n\t\t__getCookie: function __getCookie(name) {\n\t\t\tvar value = '; ' + document.cookie,\n\t\t\t parts = value.split('; ' + name + '=');\n\n\t\t\tvar cookie = '';\n\n\t\t\tif (2 === parts.length) {\n\t\t\t\tcookie = parts.pop().split(';').shift();\n\t\t\t}\n\n\t\t\treturn cookie;\n\t\t}\n\t},\n\n\t/**\n * This object key will be use to cache predicted data or donor activity.\n *\n * @since 1.8.17\n */\n\tcache: {}\n};\n\nGive.notice = __WEBPACK_IMPORTED_MODULE_0__notice__[\"a\" /* default */];\nGive.form = __WEBPACK_IMPORTED_MODULE_1__form__[\"a\" /* default */];\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Give);\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* globals Give, jQuery */\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\tfn: {\n\t\t/**\n * Render notice\n * @since 1.8.17\n *\n * @param {string} notice_code\n * @param {object} $container\n *\n * @return {string}\n */\n\t\trenderNotice: function renderNotice(notice_code, $container) {\n\t\t\tvar notice_html = '',\n\t\t\t $notice = void 0;\n\t\t\t$container = 'undefined' !== typeof $container ? $container : {};\n\n\t\t\tswitch (notice_code) {\n\t\t\t\tcase 'bad_minimum':\n\t\t\t\t\t$notice = jQuery('<div class=\"give_error give-invalid-minimum give-hidden\">' + this.getNotice(notice_code, $container) + '</div>');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'bad_maximum':\n\t\t\t\t\t$notice = jQuery('<div class=\"give_error give-invalid-maximum give-hidden\">' + this.getNotice(notice_code, $container) + '</div>');\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Return html if container did not find.\n\t\t\tif (!$container.length) {\n\t\t\t\treturn notice_html;\n\t\t\t}\n\n\t\t\t$notice.insertBefore($container.find('.give-total-wrap')).show();\n\t\t},\n\n\t\t/**\n * Get error notice\n *\n * @since 1.8.17\n * @param {string} error_code\n * @param {object} $form\n *\n * @return {*}\n */\n\t\tgetNotice: function getNotice(error_code, $form) {\n\t\t\t// Bailout.\n\t\t\tif (!error_code.length) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar notice, notice_msg, formatted_amount;\n\t\t\tnotice = notice_msg = formatted_amount = '';\n\n\t\t\tif ($form.length) {\n\t\t\t\tswitch (error_code) {\n\t\t\t\t\tcase 'bad_minimum':\n\t\t\t\t\t\tnotice_msg = Give.fn.getGlobalVar(error_code);\n\t\t\t\t\t\tformatted_amount = Give.form.fn.getMinimumAmount($form);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bad_maximum':\n\t\t\t\t\t\tnotice_msg = Give.fn.getGlobalVar(error_code);\n\t\t\t\t\t\tformatted_amount = Give.form.fn.getMaximumAmount($form);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($form.length && '' !== notice_msg) {\n\t\t\t\tnotice = notice_msg + ' ' + Give.fn.formatCurrency(formatted_amount, {\n\t\t\t\t\tsymbol: Give.form.fn.getInfo('currency_symbol', $form),\n\t\t\t\t\tposition: Give.form.fn.getInfo('currency_position', $form)\n\t\t\t\t}, $form);\n\t\t\t}\n\n\t\t\treturn notice;\n\t\t}\n\t}\n});\n\n/***/ }),\n/* 8 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* globals Give, jQuery */\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\tinit: function init() {\n\t\tthis.fn.field.formatCreditCard(jQuery('form.give-form'));\n\t\tthis.fn.__initialize_cache();\n\n\t\twindow.onload = function () {\n\t\t\tGive.form.fn.__sendBackToForm();\n\t\t};\n\t},\n\n\tfn: {\n\n\t\t/**\n * Check if donation form exist on page or not\n *\n * @since 2.2.2\n *\n * @return {boolean}\n */\n\t\tisFormExist: function isFormExist() {\n\t\t\treturn !!document.getElementsByName('give-form-hash').length;\n\t\t},\n\n\t\t/**\n * Disable donation form.\n *\n * @param {object} $form\n * @param {boolean} is_disable\n *\n * @return {*}\n */\n\t\tdisable: function disable($form, is_disable) {\n\t\t\tif (!$form.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$form.find('.give-submit').prop('disabled', is_disable);\n\t\t},\n\n\t\t/**\n * Get formatted amount\n *\n * @param {string/number} amount\n * @param {object} $form\n * @param {object} args\n */\n\t\tformatAmount: function formatAmount(amount, $form, args) {\n\t\t\t// Do not format amount if form did not exist.\n\t\t\tif (!$form.length) {\n\t\t\t\treturn amount;\n\t\t\t}\n\n\t\t\treturn Give.fn.formatCurrency(amount, args, $form);\n\t\t},\n\n\t\t/**\n * Get form information\n *\n * @since 1.8.17\n * @param {string} str\n * @param {object} $form\n *\n * @return {string}\n */\n\t\tgetInfo: function getInfo(str, $form) {\n\t\t\tvar data = '';\n\t\t\t$form = 'undefined' !== typeof $form ? $form : {};\n\n\t\t\t// Bailout.\n\t\t\tif (!str.length || !$form.length) {\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tswitch (str) {\n\t\t\t\tcase 'gateways':\n\t\t\t\t\tdata = [];\n\t\t\t\t\tjQuery.each($form.find('input[name=\"payment-mode\"]'), function (index, gateway) {\n\t\t\t\t\t\tgateway = !(gateway instanceof jQuery) ? jQuery(gateway) : gateway;\n\t\t\t\t\t\tdata.push(gateway.val().trim());\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'form-type':\n\t\t\t\t\tif ($form.hasClass('give-form-type-set')) {\n\t\t\t\t\t\tdata = 'set';\n\t\t\t\t\t} else if ($form.hasClass('give-form-type-multi')) {\n\t\t\t\t\t\tdata = 'multi';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'form-id':\n\t\t\t\t\tdata = $form.find('input[name=\"give-form-id\"]').val();\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tif ($form.get(0).hasAttribute('data-' + str)) {\n\t\t\t\t\t\tdata = $form.attr('data-' + str);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdata = $form.attr(str);\n\t\t\t\t\t}\n\n\t\t\t\t\t'undefined' !== typeof data ? data.trim() : data;\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\n\t\t/**\n * Set form information\n *\n * @since 1.8.17\n * @param {string} str\n * @param {string} val\n * @param {object} $form\n * @param {string} type\n *\n * @return {string|boolean}\n */\n\t\tsetInfo: function setInfo(type, val, $form, str) {\n\t\t\t// Bailout.\n\t\t\tif (!$form.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ttype = 'undefined' === typeof type ? 'data' : type;\n\n\t\t\tswitch (type) {\n\t\t\t\tcase 'nonce':\n\t\t\t\t\t$form.find('input[name=\"give-form-hash\"]').val(val);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Bailout.\n\t\t\tif ('undefined' !== typeof str && !str.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tswitch (type) {\n\t\t\t\tcase 'attr':\n\t\t\t\t\t$form.attr(str, val);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$form.data(str, val);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\t/**\n * Get formatted amount\n *\n * @since 1.8.17\n * @param {object} $form\n */\n\t\tgetGateway: function getGateway($form) {\n\t\t\tvar gateway = '';\n\n\t\t\tif (!$form.length) {\n\t\t\t\treturn gateway;\n\t\t\t}\n\n\t\t\tgateway = $form.find('input[name=\"payment-mode\"]:checked').val().trim();\n\n\t\t\treturn 'undefined' !== typeof gateway ? gateway : '';\n\t\t},\n\n\t\t/**\n * Get Price ID and levels for multi donation form\n *\n * @param {Object} $form Form jQuery object\n *\n * @returns {Object}\n */\n\t\tgetVariablePrices: function getVariablePrices($form) {\n\t\t\tvar variable_prices = [],\n\t\t\t formLevels;\n\n\t\t\t// check if correct form type is multi or not.\n\t\t\tif (!$form.length || !$form.hasClass('give-form-type-multi') || !(formLevels = $form.find('.give-donation-levels-wrap [data-price-id] '))) {\n\t\t\t\treturn variable_prices;\n\t\t\t}\n\n\t\t\tjQuery.each(formLevels, function (index, item) {\n\t\t\t\t// Get Jquery instance for item.\n\t\t\t\titem = !(item instanceof jQuery) ? jQuery(item) : item;\n\n\t\t\t\tvar decimal_separator = Give.form.fn.getInfo('decimal_separator', $form);\n\n\t\t\t\t// Add price id and amount to collector.\n\t\t\t\tvariable_prices.push({\n\t\t\t\t\tprice_id: item.data('price-id'),\n\t\t\t\t\tamount: Give.fn.unFormatCurrency(item.val(), decimal_separator)\n\t\t\t\t});\n\t\t\t});\n\n\t\t\treturn variable_prices;\n\t\t},\n\n\t\t/**\n * Get form price ID\n *\n * @since 1.8.17\n * @param {object} $form\n * @param {boolean} is_amount\n *\n * @return {string}\n */\n\t\tgetPriceID: function getPriceID($form, is_amount) {\n\n\t\t\tvar variable_prices = this.getVariablePrices($form),\n\t\t\t current_amount = Give.fn.unFormatCurrency($form.find('input[name=\"give-amount\"]').val(), this.getInfo('decimal_separator', $form)),\n\n\n\t\t\t/**\n * Flag Multi-levels for min. donation conditional.\n *\n * Note: Value of this variable will be:\n * a. -1 if no any level found.\n * b. [0-*] Any number from zero if donation level found.\n * c custom if donation level not found and donation amount is greater than the custom minimum amount.\n *\n * @type {number/string} Donation level ID.\n */\n\t\t\tprice_id = !!Give.fn.getCache('amount_' + current_amount, $form) ? Give.fn.getCache('amount_' + current_amount, $form) : -1;\n\n\t\t\t// Flag to decide on which param we want to find price_id\n\t\t\tis_amount = 'undefined' === typeof is_amount ? true : is_amount;\n\n\t\t\t// Find price id with amount in variable prices.\n\t\t\tif (variable_prices.length) {\n\n\t\t\t\t// Get recent selected price id for same amount.\n\t\t\t\tif (-1 === price_id) {\n\t\t\t\t\tif (is_amount) {\n\t\t\t\t\t\t// Find amount in donation levels.\n\t\t\t\t\t\tjQuery.each(variable_prices, function (index, variable_price) {\n\t\t\t\t\t\t\tif (variable_price.amount === current_amount) {\n\t\t\t\t\t\t\t\tprice_id = variable_price.price_id;\n\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});\n\n\t\t\t\t\t\t// Set level to custom.\n\t\t\t\t\t\tif (-1 === price_id && this.getMinimumAmount($form) <= current_amount && this.getMaximumAmount($form) >= current_amount && this.getMinimumAmount($form) <= current_amount) {\n\t\t\t\t\t\t\tprice_id = 'custom';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprice_id = jQuery('input[name=\"give-price-id\"]', $form).val();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn price_id;\n\t\t},\n\n\t\t/**\n * Get form minimum amount\n *\n * @since 1.8.17\n * @param {object} $form\n *\n * @return {string}\n */\n\t\tgetMinimumAmount: function getMinimumAmount($form) {\n\t\t\treturn $form.find('input[name=\"give-form-minimum\"]').val();\n\t\t},\n\n\t\t/**\n * Get form maximum amount\n *\n * @since 2.1\n * @param {object} $form\n *\n * @return {string}\n */\n\t\tgetMaximumAmount: function getMaximumAmount($form) {\n\t\t\treturn $form.find('input[name=\"give-form-maximum\"]').val();\n\t\t},\n\n\t\t/**\n * Get form amount\n *\n * @since 1.8.17\n * @param $form\n * @return {*}\n */\n\t\tgetAmount: function getAmount($form) {\n\t\t\t// Bailout\n\t\t\tif (!$form.length) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar amount = $form.find('input[name=\"give-amount\"]').val();\n\n\t\t\tif ('undefined' === typeof amount || !amount) {\n\t\t\t\tamount = 0;\n\t\t\t}\n\n\t\t\treturn Give.fn.unFormatCurrency(amount, this.getInfo('decimal_separator', $form));\n\t\t},\n\n\t\t/**\n * Get form security nonce\n *\n * @since 1.8.17\n * @param {object} $form\n * @return {string}\n */\n\t\tgetNonce: function getNonce($form) {\n\t\t\t// Bailout\n\t\t\tif (!$form.length) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tvar nonce = $form.find('input[name=\"give-form-hash\"]').val();\n\n\t\t\tif ('undefined' === typeof nonce || !nonce) {\n\t\t\t\tnonce = '';\n\t\t\t}\n\n\t\t\treturn nonce;\n\t\t},\n\n\t\t/**\n * Reset form nonce.\n *\n * @since 2.0\n *\n * @param {object} $form Donation form object.\n * @returns {boolean}\n */\n\t\tresetNonce: function resetNonce($form) {\n\t\t\t// Return false, if form is missing.\n\t\t\tif (!$form.length || !jQuery('input[name=\"give-form-hash\"]', $form).length) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tGive.form.fn.disable($form, true);\n\n\t\t\t//Post via AJAX to Give\n\t\t\tjQuery.post(Give.fn.getGlobalVar('ajaxurl'), {\n\t\t\t\taction: 'give_donation_form_nonce',\n\t\t\t\tgive_form_id: Give.form.fn.getInfo('form-id', $form)\n\t\t\t}, function (response) {\n\t\t\t\t// Update nonce field.\n\t\t\t\tGive.form.fn.setInfo('nonce', response.data, $form, '');\n\n\t\t\t\tGive.form.fn.disable($form, false);\n\t\t\t});\n\t\t},\n\n\t\t/**\n * Reset form all nonce.\n *\n * @since 2.2.0\n *\n * @param {object} $form Donation form object.\n * @returns {boolean}\n */\n\t\tresetAllNonce: function resetAllNonce($form) {\n\t\t\t// Return false, if form is missing.\n\t\t\tif (!$form.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tGive.form.fn.disable($form, true);\n\n\t\t\t//Post via AJAX to Give\n\t\t\tjQuery.post(Give.fn.getGlobalVar('ajaxurl'), {\n\t\t\t\taction: 'give_donation_form_reset_all_nonce',\n\t\t\t\tgive_form_id: Give.form.fn.getInfo('form-id', $form)\n\t\t\t}, function (response) {\n\t\t\t\t// Process only if get response successfully.\n\t\t\t\tif (!response.success) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar createUserNonceField = $form.find('input[name=\"give-form-user-register-hash\"]');\n\n\t\t\t\t// Update nonce field.\n\t\t\t\tGive.form.fn.setInfo('nonce', response.data.give_form_hash, $form, '');\n\n\t\t\t\t// Update create user nonce field.\n\t\t\t\tif (createUserNonceField.length) {\n\t\t\t\t\tcreateUserNonceField.val(response.data.give_form_user_register_hash);\n\t\t\t\t}\n\n\t\t\t\tGive.form.fn.disable($form, false);\n\n\t\t\t\t/**\n * Fire custom event handler when update all nonce of donation form\n *\n * @since 2.2.0\n * @access access\n */\n\t\t\t\tjQuery(document).trigger('give_reset_all_nonce', [response.data]);\n\t\t\t}).done(function () {\n\t\t\t\tGive.form.fn.disable($form, false);\n\t\t\t});\n\t\t},\n\n\t\t/**\n * Auto select donation level\n *\n * @since 1.8.17\n * @param {object} $form\n * @param {string} price_id\n *\n * @return {boolean}\n */\n\t\tautoSelectDonationLevel: function autoSelectDonationLevel($form, price_id) {\n\n\t\t\tif (!$form.length || 'multi' !== this.getInfo('form-type', $form)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tprice_id = 'undefined' === typeof price_id ? this.getPriceID($form, false) : price_id;\n\n\t\t\tswitch (true) {\n\n\t\t\t\t// Auto select radio button.\n\t\t\t\tcase !!$form.find('.give-radio-input').length:\n\t\t\t\t\t$form.find('.give-radio-input').prop('checked', false);\n\t\t\t\t\t$form.find('.give-radio-input[data-price-id=\"' + price_id + '\"]').prop('checked', true).addClass('give-default-level');\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Set focus to price id button.\n\t\t\t\tcase !!$form.find('button.give-donation-level-btn').length:\n\t\t\t\t\t$form.find('button.give-donation-level-btn').blur();\n\t\t\t\t\t$form.find('button.give-donation-level-btn[data-price-id=\"' + price_id + '\"]').focus().addClass('give-default-level');\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Auto select option.\n\t\t\t\tcase !!$form.find('select.give-select-level').length:\n\t\t\t\t\t$form.find('select.give-select-level option').prop('selected', false);\n\t\t\t\t\t$form.find('select.give-select-level option[data-price-id=\"' + price_id + '\"]').prop('selected', true).addClass('give-default-level');\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t},\n\n\t\t/**\n * Update level values\n *\n * Helper function: Sets the multi-select amount values\n *\n * @since 1.8.17\n * @param {object} $level\n * @returns {boolean}\n */\n\t\tautoSetMultiLevel: function autoSetMultiLevel($level) {\n\n\t\t\tvar $form = $level.parents('form'),\n\t\t\t level_amount = $level.val(),\n\t\t\t level_price_id = $level.data('price-id');\n\n\t\t\t// Check if price ID blank because of dropdown type\n\t\t\tif ('undefined' === typeof level_price_id) {\n\t\t\t\tlevel_price_id = $level.find('option:selected').data('price-id');\n\t\t\t}\n\n\t\t\t// Is this a custom amount selection?\n\t\t\tif ('custom' === level_price_id) {\n\t\t\t\t// It is, so focus on the custom amount input.\n\t\t\t\t$form.find('.give-amount-top').val('').focus();\n\t\t\t\treturn false; // Bounce out\n\t\t\t}\n\n\t\t\t// Update custom amount field\n\t\t\t$form.find('.give-amount-top').val(level_amount);\n\t\t\t$form.find('span.give-amount-top').text(level_amount);\n\n\t\t\tvar decimal_separator = Give.form.fn.getInfo('decimal_separator', $form);\n\n\t\t\t// Cache previous amount and set data amount.\n\t\t\tjQuery('.give-donation-amount .give-text-input', $form).attr('data-amount', Give.fn.unFormatCurrency($form.find('.give-final-total-amount').attr('data-total'), decimal_separator));\n\n\t\t\t// Manually trigger blur event with two params:\n\t\t\t// (a) form jquery object\n\t\t\t// (b) price id\n\t\t\t// (c) donation amount\n\t\t\t$form.find('.give-donation-amount .give-text-input').trigger('blur', [$form, level_amount, level_price_id]);\n\t\t},\n\n\t\t/**\n * Donor sent back to the form\n *\n * @since 1.8.17\n * @access private\n */\n\t\t__sendBackToForm: function __sendBackToForm() {\n\n\t\t\tvar form_id = Give.fn.getParameterByName('form-id'),\n\t\t\t payment_mode = Give.fn.getParameterByName('payment-mode');\n\n\t\t\t// Sanity check - only proceed if query strings in place.\n\t\t\tif (!form_id || !payment_mode) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar $form_wrapper = jQuery('body').find('#give-form-' + form_id + '-wrap'),\n\t\t\t $form = $form_wrapper.find('form.give-form'),\n\t\t\t display_modal = $form_wrapper.hasClass('give-display-modal'),\n\t\t\t display_button = $form_wrapper.hasClass('give-display-button'),\n\t\t\t display_reveal = $form_wrapper.hasClass('give-display-reveal');\n\n\t\t\t// Update payment mode radio so it's correctly checked.\n\t\t\t$form.find('#give-gateway-radio-list label').removeClass('give-gateway-option-selected');\n\t\t\t$form.find('input[name=payment-mode][value=' + payment_mode + ']').prop('checked', true).parent().addClass('give-gateway-option-selected');\n\n\t\t\t// Select the proper level for Multi-level forms.\n\t\t\t// It can either be a dropdown, buttons, or radio list. Default is buttons field type.\n\t\t\tvar level_id = Give.fn.getParameterByName('level-id'),\n\t\t\t level_field = $form.find('*[data-price-id=\"' + level_id + '\"]');\n\n\t\t\tif (level_field.length > 0) {\n\t\t\t\tthis.autoSetMultiLevel(level_field);\n\t\t\t}\n\n\t\t\tvar give_form_wrap = jQuery('.give-form-wrap'),\n\t\t\t is_form_grid = give_form_wrap.hasClass('give-form-grid-wrap');\n\n\t\t\tif (is_form_grid && 1 === jQuery('#give-modal-form-' + form_id).length) {\n\t\t\t\tjQuery.magnificPopup.open({\n\t\t\t\t\titems: {\n\t\t\t\t\t\ttype: 'inline',\n\t\t\t\t\t\tsrc: '#give-modal-form-' + form_id\n\t\t\t\t\t},\n\t\t\t\t\tfixedContentPos: true,\n\t\t\t\t\tfixedBgPos: true,\n\t\t\t\t\tcloseBtnInside: true,\n\t\t\t\t\tmidClick: true,\n\t\t\t\t\tremovalDelay: 300,\n\t\t\t\t\tmainClass: 'modal-fade-slide'\n\t\t\t\t});\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// This form is modal display so show the modal.\n\t\t\tif (display_modal || display_button) {\n\t\t\t\tgive_open_form_modal($form_wrapper, $form);\n\t\t\t} else if (display_reveal) {\n\t\t\t\t// This is a reveal form, show it.\n\t\t\t\t$form.find('.give-btn-reveal').hide();\n\t\t\t\t$form.find('#give-payment-mode-select, #give_purchase_form_wrap').slideDown();\n\t\t\t}\n\t\t},\n\n\t\t/**\n * Check if donation amount valid or not\n * @since 1.8.17\n *\n * @param {object} $form\n *\n * @return {boolean}\n */\n\t\tisValidDonationAmount: function isValidDonationAmount($form) {\n\n\t\t\t// Return true, if custom amount is not enabled.\n\t\t\tif ($form.find('input[name=\"give-form-minimum\"]').length <= 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tvar min_amount = this.getMinimumAmount($form),\n\t\t\t max_amount = this.getMaximumAmount($form),\n\t\t\t amount = this.getAmount($form),\n\t\t\t price_id = this.getPriceID($form, true);\n\n\t\t\t// Don't allow zero donation amounts.\n\t\t\t// https://github.com/WordImpress/Give/issues/3181\n\t\t\tif (0 === amount) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn -1 < amount && amount >= min_amount && amount <= max_amount || -1 !== price_id;\n\t\t},\n\n\t\t/**\n * Initialize cache.\n *\n * @since 1.8.17\n * @private\n */\n\t\t__initialize_cache: function __initialize_cache() {\n\t\t\tjQuery.each(jQuery('.give-form'), function (index, $item) {\n\t\t\t\t$item = $item instanceof jQuery ? $item : jQuery($item);\n\n\t\t\t\tGive.cache['form_' + Give.form.fn.getInfo('form-id', $item)] = [];\n\t\t\t});\n\t\t},\n\n\t\tfield: {\n\n\t\t\t/**\n * Format CC Fields\n *\n * Set variables and format cc fields.\n *\n * @since 1.2\n *\n * @param {object} $forms\n */\n\t\t\tformatCreditCard: function formatCreditCard($forms) {\n\t\t\t\t//Loop through forms on page and set CC validation\n\t\t\t\t$forms.each(function (index, form) {\n\t\t\t\t\tform = jQuery(form);\n\t\t\t\t\tvar card_number = form.find('.card-number'),\n\t\t\t\t\t card_cvc = form.find('.card-cvc'),\n\t\t\t\t\t card_expiry = form.find('.card-expiry');\n\n\t\t\t\t\t//Only validate if there is a card field\n\t\t\t\t\tif (card_number.length) {\n\t\t\t\t\t\tcard_number.payment('formatCardNumber');\n\t\t\t\t\t\tcard_cvc.payment('formatCardCVC');\n\t\t\t\t\t\tcard_expiry.payment('formatCardExpiry');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n});\n\n/***/ }),\n/* 9 */\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/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GiveModal\", function() { return GiveModal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GiveErrorAlert\", function() { return GiveErrorAlert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GiveWarningAlert\", function() { return GiveWarningAlert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GiveNoticeAlert\", function() { return GiveNoticeAlert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GiveSuccessAlert\", function() { return GiveSuccessAlert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GiveConfirmModal\", function() { return GiveConfirmModal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GiveFormModal\", function() { return GiveFormModal; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_magnific_popup__ = __webpack_require__(4);\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__(9);\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/* globals Give, jQuery */\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 * @return {string} Template HTML.\n */\n\n\t}, {\n\t\tkey: 'getTemplate',\n\t\tvalue: function getTemplate() {\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\\n\\t\\t\\t\\t\\t' + ('form' === this.config.type ? '<div class=\"spinner\"></div>' : '') + '\\n\\t\\t\\t\\t\\t' + ('form' === this.config.type ? '<a class=\"give-modal--additional-link\" href=\"' + this.config.modalContent.link + '\">' + this.config.modalContent.link_text + '</a>' : '') + '\\n\\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.fn.getGlobalVar('cancel') : Give.fn.getGlobalVar('close')) + '\\n\\t\\t\\t\\t\\t</button>\\n\\n\\t\\t\\t\\t\\t' + ('confirm' !== this.config.type && 'form' !== this.config.type ? '' : '<button class=\"give-button give-button--primary give-popup-' + this.config.type + '-button\">\\n\\n\\t\\t\\t\\t\\t\\t' + (this.config.modalContent.confirmBtnTitle ? this.config.modalContent.confirmBtnTitle : Give.fn.getGlobalVar('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.getTemplate();\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 * @param {object} event Event object.\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 * @return {object} GiveModal class object.\n */\n\t\tvalue: function render() {\n\t\t\tswitch (this.config.externalPlugin) {\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\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 * This class will handle Form modal\n *\n * @since 2.2.0\n */\n\n\nvar GiveFormModal = function (_GiveModal6) {\n\t_inherits(GiveFormModal, _GiveModal6);\n\n\tfunction GiveFormModal(obj) {\n\t\t_classCallCheck(this, GiveFormModal);\n\n\t\tobj.type = 'form';\n\n\t\tvar _this6 = _possibleConstructorReturn(this, (GiveFormModal.__proto__ || Object.getPrototypeOf(GiveFormModal)).call(this, obj));\n\n\t\tif ('undefined' !== typeof obj.modalWrapper && '' !== obj.modalWrapper) {\n\t\t\t_this6.config.classes.modalWrapper = obj.modalWrapper;\n\t\t}\n\n\t\t_this6.init();\n\t\treturn _this6;\n\t}\n\n\t/**\n * Submit button click event handler\n *\n * Note: only for internal purpose\n *\n * @since 2.2.0\n * @private\n */\n\n\n\t_createClass(GiveFormModal, null, [{\n\t\tkey: '__submitPopup',\n\t\tvalue: function __submitPopup() {\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}\n\t\t}\n\t}]);\n\n\treturn GiveFormModal;\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, {});\nwindow.addDynamicEventListener(document, 'click', '.give-popup-form-button', GiveFormModal.__submitPopup, {});\n\n\n\n/***/ }),\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */,\n/* 15 */,\n/* 16 */,\n/* 17 */,\n/* 18 */,\n/* 19 */,\n/* 20 */,\n/* 21 */,\n/* 22 */,\n/* 23 */,\n/* 24 */,\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(26);\nmodule.exports = __webpack_require__(27);\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 27 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fn\", function() { return fn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cache\", function() { return cache; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"modal\", function() { return modal; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_chosen_js__ = __webpack_require__(28);\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__(2);\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__(29);\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__(30);\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__(31);\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__(32);\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__(33);\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__(34);\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__plugins_give_api_api__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__plugins_modal_js__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__admin_forms__ = __webpack_require__(35);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__admin_forms___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11__admin_forms__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__admin_settings__ = __webpack_require__(36);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__admin_settings___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12__admin_settings__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__admin_export__ = __webpack_require__(37);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__admin_export___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13__admin_export__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__admin_widgets__ = __webpack_require__(38);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__admin_widgets___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14__admin_widgets__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__admin_scripts__ = __webpack_require__(39);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__admin_importer__ = __webpack_require__(40);\n// Plugins\n\n\n\n\n\n\n// Give plugins.\n\n\n\n\n\n\n\n\n// Give core.\n\n\n\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_9__plugins_give_api_api__[\"a\" /* default */].modal = __WEBPACK_IMPORTED_MODULE_10__plugins_modal_js__;\nvar init = __WEBPACK_IMPORTED_MODULE_9__plugins_give_api_api__[\"a\" /* default */].init,\n fn = __WEBPACK_IMPORTED_MODULE_9__plugins_give_api_api__[\"a\" /* default */].fn,\n cache = __WEBPACK_IMPORTED_MODULE_9__plugins_give_api_api__[\"a\" /* default */].cache,\n modal = __WEBPACK_IMPORTED_MODULE_9__plugins_give_api_api__[\"a\" /* default */].modal;\n\n\n/***/ }),\n/* 28 */\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'>\" + (this.escape_html(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 <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').first();\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 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 return this.container.on('click.chosen', function(evt) {\n evt.preventDefault();\n });\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 this.search_field.val(this.search_field.val());\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.container.addClass(\"chosen-container-single-nosearch\");\n } else {\n this.search_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 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 ti;\n if (this.form_field.tabIndex) {\n ti = this.form_field.tabIndex;\n this.form_field.tabIndex = -1;\n return this.search_field[0].tabIndex = ti;\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/* 29 */\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/* 30 */\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/* 31 */\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/* 32 */\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. Currently uses only for admin purpose.\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/* 33 */\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/* 34 */\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/* 35 */\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\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\n\t\t// Title Prefixes.\n\t\tvar defaultNameTitlePrefixChecked = $('input[name=\"_give_name_title_prefix\"]:checked').val();\n\t\tif ('required' === defaultNameTitlePrefixChecked || 'optional' === defaultNameTitlePrefixChecked) {\n\t\t\t$('.give-title-prefixes-wrap').show();\n\t\t}\n\n\t\t$('input[name=\"_give_name_title_prefix\"]').on('change', function () {\n\t\t\tvar titlePrefixChecked = $('input[name=\"_give_name_title_prefix\"]:checked').val();\n\n\t\t\tif ('required' === titlePrefixChecked || 'optional' === titlePrefixChecked) {\n\t\t\t\t$('.give-title-prefixes-wrap').show();\n\t\t\t} else {\n\t\t\t\t$('.give-title-prefixes-wrap').hide();\n\t\t\t}\n\t\t});\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/* 36 */\n/***/ (function(module, exports) {\n\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/* globals Give, jQuery */\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.fn.getGlobalVar('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 * Show/Hide Title Prefixes\n */\n\tif ('disabled' !== $('input[name=\"name_title_prefix\"]:checked').val()) {\n\t\t$('.give-title-prefixes-settings-wrap').show();\n\t}\n\n\t$('input[name=\"name_title_prefix\"]').on('change', function () {\n\t\tif ('disabled' !== $(this).val()) {\n\t\t\t$('.give-title-prefixes-settings-wrap').show();\n\t\t} else {\n\t\t\t$('.give-title-prefixes-settings-wrap').hide();\n\t\t}\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 Give.modal.GiveSuccessAlert({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('flush_success'),\n\t\t\t\t\t\tdesc: response.data.message,\n\t\t\t\t\t\tcancelBtnTitle: Give.fn.getGlobalVar('ok')\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t} else {\n\t\t\t\tnew Give.modal.GiveErrorAlert({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('flush_error'),\n\t\t\t\t\t\tdesc: response.data.message,\n\t\t\t\t\t\tcancelBtnTitle: Give.fn.getGlobalVar('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/* 37 */\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/* globals Give, jQuery */\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.fn.getGlobalVar('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/* 38 */\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\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/* 39 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__plugins_modal__ = __webpack_require__(10);\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/* globals Give, jQuery */\n\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(jQuery(this).closest('div.give-notice').attr('id'));\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 * @since 2.1.4 Added new param key which remove the multiple message array from URL.\n *\n * @param key string to remove from url in multiple notices.\n */\n\tvar give_remove_give_message = function give_remove_give_message(key) {\n\t\tvar parameter = 'give-message',\n\t\t url = document.location.href,\n\t\t urlparts = url.split('?'),\n\t\t key = undefined === key ? '' : key.replace('give-', '');\n\n\t\tif (urlparts.length >= 2) {\n\t\t\tvar urlBase = urlparts.shift();\n\t\t\tvar queryString = urlparts.join('?');\n\t\t\tvar prefix = encodeURIComponent(parameter) + '=';\n\n\t\t\tvar pars = queryString.split(/[&;]/g);\n\t\t\tfor (var i = pars.length; i-- > 0;) {\n\n\t\t\t\tif (pars[i].lastIndexOf(prefix, 0) !== -1 || '' !== key && pars[i].lastIndexOf('give-messages', 0) !== -1 && pars[i].match(key + '$')) {\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\t\tvar datepicker = $('.give_datepicker');\n\n\t\t// Date picker.\n\t\tif (datepicker.length > 0) {\n\t\t\tdatepicker.datepicker({\n\t\t\t\tdateFormat: Give.fn.getGlobalVar('date_format')\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\tif ($give_chosen_containers.hasClass('give-chosen-settings')) {\n\n\t\t\t// Do something to chosen used in metabox or admin settings.\n\t\t\t$give_chosen_containers.chosen({\n\t\t\t\tno_results_text: Give.fn.getGlobalVar('chosen_add_title_prefix') + ' ',\n\t\t\t\twidth: '30%'\n\t\t\t}).on('chosen:no_results', function (evt, data) {\n\n\t\t\t\t$(data.chosen.container).on('keydown', function (event) {\n\n\t\t\t\t\tvar chosenText = data.chosen.get_search_text();\n\n\t\t\t\t\tif (13 === event.keyCode && !jQuery(data.chosen.form_field).find('option[value=\"' + chosenText + '\"]').length) {\n\t\t\t\t\t\t$(data.chosen.form_field).append('<option value=\"' + chosenText + '\" selected>' + chosenText + '</option>').trigger('chosen:updated');\n\t\t\t\t\t\tdata.chosen.result_highlight = data.chosen.search_results.find('li.active-result').lasteturn;\n\t\t\t\t\t\tdata.chosen.result_select(evt);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t} else {\n\n\t\t\t// Add loader with each input field.\n\t\t\t$give_chosen_containers.on('chosen:ready', function () {\n\t\t\t\t$(this).next('.chosen-container').find('input.chosen-search-input').after('<span class=\"spinner\"></span>');\n\t\t\t});\n\n\t\t\t// Initiate chosen.\n\t\t\t$give_chosen_containers.chosen({\n\t\t\t\tinherit_select_classes: true,\n\t\t\t\tplaceholder_text_single: Give.fn.getGlobalVar('one_option'),\n\t\t\t\tplaceholder_text_multiple: Give.fn.getGlobalVar('one_or_more_option')\n\t\t\t});\n\n\t\t\t// No results returned from search trigger.\n\t\t\t$give_chosen_containers.on('chosen:no_results', function () {\n\t\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\t error_string = '';\n\n\t\t\t\tif ($container.hasClass('give-select-chosen-ajax') && $no_results_li.length) {\n\t\t\t\t\terror_string = Give.fn.getGlobal.chosen.ajax_search_msg.replace('{search_term}', '\"' + $('input', $container).val() + '\"');\n\t\t\t\t} else {\n\t\t\t\t\terror_string = Give.fn.getGlobal.chosen.no_results_msg.replace('{search_term}', '\"' + $('input', $container).val() + '\"');\n\t\t\t\t}\n\n\t\t\t\t$no_results_li.html(error_string);\n\n\t\t\t\t// Variables for setting up the typing timer.\n\t\t\t\tvar typingTimer; // Timer identifier.\n\t\t\t\tvar doneTypingInterval = 342; // Time in ms, Slow - 521ms, Moderate - 342ms, Fast - 300ms.\n\n\t\t\t\t// Replace options with search results.\n\t\t\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\t\t\tvar val = $(this).val(),\n\t\t\t\t\t $container = $(this).closest('.give-select-chosen'),\n\t\t\t\t\t select = $container.prev(),\n\t\t\t\t\t $search_field = $container.find('input[type=\"text\"]'),\n\t\t\t\t\t variations = $container.hasClass('variations'),\n\t\t\t\t\t lastKey = e.which,\n\t\t\t\t\t search_type = 'give_form_search',\n\t\t\t\t\t $this = this;\n\n\t\t\t\t\t// Detect if we have a defined search type, otherwise default to donation forms.\n\t\t\t\t\tif ($container.prev().data('search-type')) {\n\n\t\t\t\t\t\t// Don't trigger AJAX if this select has all options loaded.\n\t\t\t\t\t\tif ('no_ajax' === select.data('search-type')) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsearch_type = 'give_' + select.data('search-type') + '_search';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Don't fire if short or is a modifier key (shift, ctrl, apple command key, or arrow keys).\n\t\t\t\t\tif (val.length > 0 && val.length <= 3 || !search_type.length || 9 === lastKey || // Tab.\n\t\t\t\t\t13 === lastKey || // Enter.\n\t\t\t\t\t16 === lastKey || // Shift.\n\t\t\t\t\t17 === lastKey || // Ctrl.\n\t\t\t\t\t18 === lastKey || // Alt.\n\t\t\t\t\t19 === lastKey || // Pause, Break.\n\t\t\t\t\t20 === lastKey || // CapsLock.\n\t\t\t\t\t27 === lastKey || // Esc.\n\t\t\t\t\t33 === lastKey || // Page Up.\n\t\t\t\t\t34 === lastKey || // Page Down.\n\t\t\t\t\t35 === lastKey || // End.\n\t\t\t\t\t36 === lastKey || // Home.\n\t\t\t\t\t37 === lastKey || // Left arrow.\n\t\t\t\t\t38 === lastKey || // Up arrow.\n\t\t\t\t\t39 === lastKey || // Right arrow.\n\t\t\t\t\t40 === lastKey || // Down arrow.\n\t\t\t\t\t44 === lastKey || // PrntScrn.\n\t\t\t\t\t45 === lastKey || // Insert.\n\t\t\t\t\t144 === lastKey || // NumLock.\n\t\t\t\t\t145 === lastKey || // ScrollLock.\n\t\t\t\t\t91 === lastKey || // WIN Key (Start).\n\t\t\t\t\t93 === lastKey || // WIN Menu.\n\t\t\t\t\t224 === lastKey || // Command key.\n\t\t\t\t\t112 <= lastKey && 123 >= lastKey // F1 to F12 lastKey.\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\tclearTimeout(typingTimer);\n\t\t\t\t\t$container.addClass('give-select-chosen-ajax');\n\n\t\t\t\t\ttypingTimer = setTimeout(function () {\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\taction: search_type,\n\t\t\t\t\t\t\t\ts: val,\n\t\t\t\t\t\t\t\tfields: $($this).closest('form').serialize()\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tdataType: 'json',\n\t\t\t\t\t\t\tbeforeSend: function beforeSend() {\n\t\t\t\t\t\t\t\tselect.closest('ul.chosen-results').empty();\n\t\t\t\t\t\t\t\t$search_field.prop('disabled', true);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tsuccess: function success(data) {\n\n\t\t\t\t\t\t\t\t$container.removeClass('give-select-chosen-ajax');\n\n\t\t\t\t\t\t\t\t// Remove all options but those that are selected.\n\t\t\t\t\t\t\t\t$('option:not(:selected)', select).remove();\n\n\t\t\t\t\t\t\t\tif (data.length) {\n\t\t\t\t\t\t\t\t\t$.each(data, function (key, item) {\n\t\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\t\tif (!$('option[value=\"' + item.id + '\"]', select).length) {\n\t\t\t\t\t\t\t\t\t\t\tif (0 === val.length) {\n\t\t\t\t\t\t\t\t\t\t\t\tselect.append('<option value=\"' + item.id + '\">' + item.name + '</option>');\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\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\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\t// Trigger update event.\n\t\t\t\t\t\t\t\t\t$container.prev('select.give-select-chosen').trigger('chosen:updated');\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t// Trigger no result message event.\n\t\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\t}\n\n\t\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\t$search_field.prop('disabled', false);\n\t\t\t\t\t\t\t\t$search_field.val(val).focus();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).fail(function (response) {\n\t\t\t\t\t\t\tif (window.console && window.console.log) {\n\t\t\t\t\t\t\t\tconsole.log(response);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).done(function (response) {\n\t\t\t\t\t\t\t$search_field.prop('disabled', false);\n\t\t\t\t\t\t});\n\t\t\t\t\t}, doneTypingInterval);\n\t\t\t\t});\n\n\t\t\t\t$('.give-select-chosen .chosen-search input').each(function () {\n\t\t\t\t\tvar type = $(this).parent().parent().parent().prev('select.give-select-chosen').data('search-type');\n\t\t\t\t\tvar placeholder = '';\n\n\t\t\t\t\tif ('form' === type) {\n\t\t\t\t\t\tplaceholder = Give.fn.getGlobalVar('search_placeholder');\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttype = 'search_placeholder_' + type;\n\t\t\t\t\t\tif (Give.fn.getGlobalVar(type)) {\n\t\t\t\t\t\t\tplaceholder = Give.fn.getGlobalVar(type);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$(this).attr('placeholder', placeholder);\n\t\t\t\t});\n\t\t\t});\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\t};\n\n\t/**\n * Unformat Currency\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.fn.getGlobalVar('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.fn.getGlobalVar('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__[\"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.fn.getGlobalVar('confirm_delete_donation'),\n\t\t\t\t\tdesc: Give.fn.getGlobalVar('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__[\"GiveConfirmModal\"]({\n\t\t\t\ttriggerSelector: '.resend-single-donation-receipt',\n\t\t\t\tmodalContent: {\n\t\t\t\t\ttitle: Give.fn.getGlobalVar('confirm_resend'),\n\t\t\t\t\tdesc: Give.fn.getGlobalVar('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__[\"GiveConfirmModal\"]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('confirm_deletion'),\n\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('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\tvar that = this;\n\n\t\t\t\te.preventDefault();\n\n\t\t\t\tnew __WEBPACK_IMPORTED_MODULE_0__plugins_modal__[\"GiveConfirmModal\"]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('confirm_action'),\n\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('resend_receipt')\n\t\t\t\t\t},\n\t\t\t\t\tsuccessConfirm: function successConfirm() {\n\t\t\t\t\t\twindow.location.assign($(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\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.toggle_gateways();\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 * Disables the default gateway radio button if the\n * gateway is disabled.\n */\n\t\ttoggle_gateways: function toggle_gateways() {\n\t\t\tvar checkbox = $('.gateways-checkbox');\n\n\t\t\tcheckbox.on('click', function () {\n\n\t\t\t\t// Get the radio button object related to this checkbox.\n\t\t\t\tvar radio = $(this).prev('.gateways-radio');\n\n\t\t\t\t// Get the checked value of the current checbox.\n\t\t\t\tvar checked = this.checked;\n\n\t\t\t\t// Get all the checkbox that are checked.\n\t\t\t\tvar checked_cbs = $('.gateways-checkbox:checked');\n\n\t\t\t\t// Get the count of all the checked checkbox.\n\t\t\t\tvar count_cbs = checked_cbs.length;\n\n\t\t\t\t/**\n * If there is only one checked checkbox, then\n * make that gateway the default gateway.\n */\n\t\t\t\tif (1 === count_cbs) {\n\t\t\t\t\tchecked_cbs.prev('.gateways-radio').attr('checked', 'checked');\n\n\t\t\t\t\tif (this.checked) {\n\t\t\t\t\t\tradio.removeAttr('disabled');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tradio.attr('disabled', 'disabled');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (this.checked) {\n\t\t\t\t\t\tradio.removeAttr('disabled');\n\t\t\t\t\t\tradio.removeAttr('checked');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tradio.attr('disabled', 'disabled');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\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\t$('#base_state_chosen').remove();\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).addClass('give-select-chosen');\n\t\t\t\t\t\t$(':input[name=\"base_state\"]').chosen();\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.fn.getGlobalVar('matched_success_failure_page') + '</strong></p> <button type=\"button\" class=\"notice-dismiss\"><span class=\"screen-reader-text\">' + Give.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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\t// Start update by ajax if background update does not work.\n\t\t\t\t\tif (!Give.fn.getGlobalVar('ajax').length) {\n\t\t\t\t\t\twindow.setTimeout(Give_Updates.start_db_update, 1000);\n\t\t\t\t\t}\n\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.fn.getGlobalVar('db_update_confirmation_msg_button') + '</a> ' + Give.fn.getGlobalVar('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\tGive_Updates.start_db_update();\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\tstart_db_update: function start_db_update() {\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_run_db_updates',\n\t\t\t\t\trun_db_update: 1,\n\t\t\t\t\tnonce: Give.fn.getGlobalVar('db_update_nonce')\n\t\t\t\t},\n\t\t\t\tdataType: 'json',\n\t\t\t\tsuccess: function success(response) {}\n\t\t\t}).always(function () {\n\t\t\t\t// Start update by ajax if background update does not work.\n\t\t\t\tif (!Give.fn.getGlobalVar('ajax').length) {\n\t\t\t\t\twindow.setTimeout(Give_Updates.start_db_update, 1000);\n\t\t\t\t}\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.fn.getGlobal().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.fn.getGlobal().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__[\"GiveConfirmModal\"]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('confirm_action'),\n\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('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__[\"GiveConfirmModal\"]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('confirm_action'),\n\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('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__[\"GiveConfirmModal\"]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('confirm_action'),\n\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('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\t};\n\n\t/**\n * Admin Status Select Field Change\n *\n * @description: Handle status switching\n * @since: 1.0\n */\n\tvar 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\t\tonLoadPageNumber: '',\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\tGiveDonor.onLoadPageNumber = $('#current-page-selector').val();\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__[\"GiveErrorAlert\"]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('unlock_donor_fields_title'),\n\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('unlock_donor_fields_message'),\n\t\t\t\t\t\tcancelBtnTitle: Give.fn.getGlobalVar('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.fn.getGlobalVar('disconnect_user'))) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvar donorID = $('input[name=\"donor_info[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.fn.getGlobalVar('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.fn.getGlobalVar('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-bulk-delete .give-donor-delete-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-bulk-delete .give-donor-delete-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-bulk-delete .give-donor-delete-records', function () {\n\t\t\t\tif ($(this).is(':checked')) {\n\t\t\t\t\t$('#give-bulk-delete .give-donor-delete-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.fn.getGlobalVar('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 paged = $('#current-page-selector').val(),\n\t\t\t changedPage = GiveDonor.onLoadPageNumber !== paged,\n\t\t\t selectBulkActionNotice = Give.fn.getGlobalVar('donors_bulk_action.no_action_selected'),\n\t\t\t confirmActionNotice = Give.fn.getGlobalVar('donors_bulk_action.no_donor_selected');\n\n\t\t\t// Bailout.\n\t\t\tif (changedPage) {\n\t\t\t\treturn true;\n\t\t\t}\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__[\"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.fn.getGlobalVar('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__[\"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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobal().metabox_fields.media.button_title,\n\t\t\t\t\t\t\tbutton: { text: Give.fn.getGlobal().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.fn.getGlobal().metabox_fields.file.button_title,\n\t\t\t\t\t\t\tbutton: { text: Give.fn.getGlobal().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.fn.getGlobalVar('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// 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\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 = $('input[type=\"radio\"].give-field', $(item));\n\n\t\t\t\t\t\t\t\t\t\t// Preserve radio button values.\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\t$(this).attr('data-give-checked', $(this).is(':checked'));\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\t\t\t\t\t\t\t\t}\n\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// 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\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\t\t\t\t\t\t\t\t $container = $(this).closest('.give-repeatable-fields-section-wrapper');\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\twindow.setTimeout(function () {\n\t\t\t\t\t\t\t\t\t\t// Reset radio button values.\n\t\t\t\t\t\t\t\t\t\t$('input[data-give-checked]', $container).each(function (index, radio) {\n\t\t\t\t\t\t\t\t\t\t\tradio = $(radio);\n\t\t\t\t\t\t\t\t\t\t\tradio.prop('checked', 'true' === radio.attr('data-give-checked'));\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}, 100);\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\n\t\tonLoadPageNumber: '',\n\n\t\tinit: function init() {\n\t\t\tGivePaymentHistory.onLoadPageNumber = $('#current-page-selector').val();\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\t\t\t paged = $('#current-page-selector').val(),\n\t\t\t changedPage = GivePaymentHistory.onLoadPageNumber !== paged;\n\n\t\t\t// Bailout.\n\t\t\tif (changedPage) {\n\t\t\t\treturn true;\n\t\t\t}\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__[\"GiveWarningAlert\"]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: Give.fn.getGlobal().donors_bulk_action.no_action_selected.title,\n\t\t\t\t\t\tdesc: Give.fn.getGlobal().donors_bulk_action.no_action_selected.desc,\n\t\t\t\t\t\tcancelBtnTitle: Give.fn.getGlobalVar('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.fn.getGlobalVar('donations_bulk_action')).length) {\n\t\t\t\tfor (status in Give.fn.getGlobalVar('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.fn.getGlobal().donations_bulk_action[currentAction].zero.replace('{status}', currentActionLabel.replace('Set To ', '')) : Give.fn.getGlobal().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__[\"GiveWarningAlert\"]({\n\t\t\t\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\t\t\t\ttitle: Give.fn.getGlobal().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.fn.getGlobalVar('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.fn.getGlobal().donations_bulk_action[currentAction].multiple : Give.fn.getGlobal().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__[\"GiveConfirmModal\"]({\n\t\t\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('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.fn.getGlobalVar('thousands_separator'),\n\t\t decimal_separator = Give.fn.getGlobalVar('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.fn.getGlobalVar('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', { label: Give.fn.getGlobalVar('price_format_guide').trim() });\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/* 40 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__plugins_modal__ = __webpack_require__(10);\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/* globals Give, jQuery*/\n\n/**\n * Do not allow user to reload the page\n *\n * @since 1.8.14\n */\n\n\nvar give_setting_edit = true;\n\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.fn.getGlobalVar('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__[\"GiveErrorAlert\"]({\n\t\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('import_failed'),\n\t\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('error_message'),\n\t\t\t\t\t\t\tcancelBtnTitle: Give.fn.getGlobalVar('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__[\"GiveErrorAlert\"]({\n\t\t\t\t\tmodalContent: {\n\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('import_failed'),\n\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('error_message'),\n\t\t\t\t\t\tcancelBtnTitle: Give.fn.getGlobalVar('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.fn.getGlobalVar('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__[\"GiveErrorAlert\"]({\n\t\t\t\tmodalContent: {\n\t\t\t\t\ttitle: Give.fn.getGlobalVar('import_failed'),\n\t\t\t\t\tdesc: Give.fn.getGlobalVar('error_message'),\n\t\t\t\t\tcancelBtnTitle: Give.fn.getGlobalVar('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/******/ ]);\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 = 25);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 5e843595f24c874d514f","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1","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 = 1\n// module chunks = 0 1","module.exports = global[\"accounting\"] = require(\"-!./accounting.js\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/accounting/accounting.js-exposed\n// module id = 2\n// module chunks = 0 1","/*!\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 = 3\n// module chunks = 0 1","/*! 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\">&#215;</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 = 4\n// module chunks = 0 1","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","/* global accounting, give_global_vars, jQuery */\nimport GiveNotice from './notice';\nimport GiveForm from './form';\n\n/**\n * This API is under development.\n *\n * Currently used only for internal purpose.\n */\nlet Give = {\n\tinit: function() {\n\t\tlet subHelperObjs = [ 'form' ],\n\t\t\tcounter = 0;\n\t\tjQuery( document ).trigger( 'give:preInit' );\n\n\t\t// Initialize all init methods of sub helper objects.\n\t\twhile ( counter < subHelperObjs.length ) {\n\t\t\tif ( ! ! Give[ subHelperObjs[ counter ] ].init ) {\n\t\t\t\tGive[ subHelperObjs[ counter ] ].init();\n\t\t\t}\n\t\t\tcounter ++;\n\t\t}\n\n\t\tjQuery( document ).trigger( 'give:postInit' );\n\t},\n\n\tfn: {\n\t\t/**\n\t\t * Format Currency\n\t\t *\n\t\t * Formats the currency with accounting.js\n\t\t *\n\t\t * @param {string} price\n\t\t * @param {object} args\n\t\t * @param {object} $form\n\t\t * @returns {*|string}\n\t\t */\n\t\tformatCurrency: function( price, args, $form ) {\n\t\t\t// Global currency setting.\n\t\t\tlet format_args = {\n\t\t\t\tsymbol: '',\n\t\t\t\tdecimal: this.getGlobalVar( 'decimal_separator' ),\n\t\t\t\tthousand: this.getGlobalVar( 'thousands_separator' ),\n\t\t\t\tprecision: parseInt( this.getGlobalVar( 'number_decimals' ) ),\n\t\t\t\tcurrency: this.getGlobalVar( 'currency' )\n\t\t\t};\n\n\t\t\tprice = price.toString().trim();\n\t\t\t$form = 'undefined' === typeof $form ? {} : $form;\n\n\t\t\t// Form specific currency setting.\n\t\t\tif ( $form.length ) {\n\t\t\t\t//Set the custom amount input value format properly\n\t\t\t\tformat_args = {\n\t\t\t\t\tsymbol: '',\n\t\t\t\t\tdecimal: Give.form.fn.getInfo( 'decimal_separator', $form ),\n\t\t\t\t\tthousand: Give.form.fn.getInfo( 'thousands_separator', $form ),\n\t\t\t\t\tprecision: Give.form.fn.getInfo( 'number_decimals', $form ),\n\t\t\t\t\tcurrency: Give.form.fn.getInfo( 'currency_code', $form ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\targs = jQuery.extend( format_args, args );\n\n\t\t\t// Make sure precision is integer type\n\t\t\targs.precision = parseInt( args.precision );\n\n\t\t\tif ( 'INR' === args.currency ) {\n\t\t\t\tlet actual_price = accounting.unformat( price, '.' ).toString(),\n\t\t\t\t\tdecimal_amount = '',\n\t\t\t\t\tresult,\n\t\t\t\t\tamount,\n\t\t\t\t\tdecimal_index = actual_price.indexOf( '.' );\n\n\t\t\t\tif (-1 !== decimal_index) {\n\t\t\t\t\tif (args.precision) {\n\t\t\t\t\t\tdecimal_amount = Number( actual_price.substr( parseInt( decimal_index ) ) ).toFixed( args.precision ).toString().substr( 1 );\n\t\t\t\t\t\tdecimal_amount = decimal_amount.length ? decimal_amount : '.0000000000'.substr(0, parseInt(decimal_index) + 1);\n\n\t\t\t\t\t\tif (args.precision + 1 > decimal_amount.length) {\n\t\t\t\t\t\t\tdecimal_amount = (decimal_amount + '000000000').substr(0, args.precision + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tactual_price = actual_price.substr(0, parseInt(decimal_index));\n\t\t\t\t}\n\n\t\t\t\t// Extract last 3 from amount\n\t\t\t\tresult = actual_price.substr( - 3 );\n\t\t\t\tamount = actual_price.substr( 0, parseInt( actual_price.length ) - 3 );\n\n\t\t\t\t// Apply digits 2 by 2\n\t\t\t\twhile ( amount.length > 0 ) {\n\t\t\t\t\tresult = amount.substr( - 2 ) + args.thousand + result;\n\t\t\t\t\tamount = amount.substr( 0, parseInt( amount.length ) - 2 );\n\t\t\t\t}\n\n\t\t\t\tif ( decimal_amount.length ) {\n\t\t\t\t\tresult = result + decimal_amount;\n\t\t\t\t}\n\n\t\t\t\tprice = result;\n\n\t\t\t\tif ( undefined !== args.symbol && args.symbol.length ) {\n\t\t\t\t\tif ( 'after' === args.position ) {\n\t\t\t\t\t\tprice = price + args.symbol;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprice = args.symbol + price;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//Properly position symbol after if selected\n\t\t\t\tif ( 'after' === args.position ) {\n\t\t\t\t\targs.format = '%v%s';\n\t\t\t\t}\n\n\t\t\t\tprice = accounting.formatMoney( price, args );\n\t\t\t}\n\n\t\t\treturn price;\n\n\t\t},\n\n\t\t/**\n\t\t * Unformat Currency\n\t\t *\n\t\t * @param price\n\t\t * @param {string} decimal_separator\n\t\t * @returns {number}\n\t\t */\n\t\tunFormatCurrency: function( price, decimal_separator ) {\n\t\t\tif ( 'string' === typeof price ) {\n\t\t\t\tlet regex = ',' === decimal_separator.trim() ? /[^0-9\\,-]+/g : /[^0-9\\.-]+/g;\n\n\t\t\t\tprice = price.replace( regex, '' );\n\n\t\t\t\tif ( 0 === price.indexOf( decimal_separator ) ) {\n\t\t\t\t\tprice = price.substr( 1 );\n\t\t\t\t} else if ( (price.length - 1) === price.indexOf( decimal_separator ) ) {\n\t\t\t\t\tprice = price.slice( 0, - 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn Math.abs( parseFloat( accounting.unformat( price, decimal_separator ) ) );\n\t\t},\n\n\t\t/**\n\t\t * Get Parameter by Name\n\t\t *\n\t\t * @see: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript\n\t\t * @param name\n\t\t * @param url\n\t\t * @since 1.4.2\n\t\t * @returns {*}\n\t\t */\n\t\tgetParameterByName: function( name, url ) {\n\t\t\tif ( ! url ) {\n\t\t\t\turl = window.location.href;\n\t\t\t}\n\n\t\t\tname = name.replace( /[\\[\\]]/g, '\\\\$&' );\n\n\t\t\tlet regex = new RegExp( '[?&]' + name + '(=([^&#]*)|&|#|$)' ),\n\t\t\t\tresults = regex.exec( url );\n\n\t\t\tif ( ! results ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( ! results[ 2 ] ) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn decodeURIComponent( results[ 2 ].replace( /\\+/g, ' ' ) );\n\t\t},\n\n\t\t/**\n\t\t * Get information from global var\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @param {string} str Variable in global param.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tgetGlobalVar: function( str ) {\n\t\t\tconst giveGlobals = this.getGlobal();\n\n\t\t\treturn ( 'undefined' === typeof giveGlobals[ str ] ? '' : giveGlobals[ str ] );\n\t\t},\n\n\t\t/**\n\t\t * Get global param\n\t\t *\n\t\t * @since 2.2.4\n\t\t *\n\t\t * @return {object} WordPress localized global param.\n\t\t */\n\t\tgetGlobal: function() {\n\t\t\treturn ( 'undefined' === typeof give_global_vars ) ? give_vars : give_global_vars;\n\t\t},\n\n\t\t/**\n\t\t * set cache\n\t\t *\n\t\t * @since 1.8.17\n\t\t *\n\t\t * @param {string} key\n\t\t * @param {string} value\n\t\t * @param {object} $form\n\t\t */\n\t\tsetCache: function( key, value, $form ) {\n\t\t\tif ( $form.length ) {\n\t\t\t\tGive.cache[ 'form_' + Give.form.fn.getInfo( 'form-id', $form ) ][ key ] = value;\n\t\t\t} else {\n\t\t\t\tGive.cache[ key ] = value;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Get cache\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @param key\n\t\t * @param $form\n\t\t * @return {string|*}\n\t\t */\n\t\tgetCache: function( key, $form ) {\n\t\t\tlet cache,\n\t\t\t\tformObj = Give.cache[ 'form_' + Give.form.fn.getInfo( 'form-id', $form ) ];\n\n\t\t\tif ( $form.length ) {\n\t\t\t\tcache = 'undefined' !== typeof formObj ? formObj[ key ] : '';\n\t\t\t} else {\n\t\t\t\tcache = Give.cache[ key ];\n\t\t\t}\n\n\t\t\tcache = 'undefined' === typeof cache ? '' : cache;\n\n\t\t\treturn cache;\n\t\t},\n\n\t\t/**\n\t\t * Get cookie\n\t\t * Note: only for internal use\n\t\t *\n\t\t * @since 2.2.20\n\t\t * @private\n\t\t *\n\t\t * @param {string} name Cookie name\n\t\t * @return {string}\n\t\t */\n\t\t__getCookie: function( name ) {\n\t\t\tconst value = '; ' + document.cookie,\n\t\t\t\tparts = value.split( '; ' + name + '=' );\n\n\t\t\tlet cookie = '';\n\n\t\t\tif ( 2 === parts.length ) {\n\t\t\t\tcookie = parts.pop().split(';').shift();\n\t\t\t}\n\n\t\t\treturn cookie;\n\t\t},\n\t},\n\n\t/**\n\t * This object key will be use to cache predicted data or donor activity.\n\t *\n\t * @since 1.8.17\n\t */\n\tcache: {}\n};\n\nGive.notice = GiveNotice;\nGive.form = GiveForm;\n\nexport default Give;\n\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/plugins/give-api/api.js","/* globals Give, jQuery */\nexport default {\n\tfn: {\n\t\t/**\n\t\t * Render notice\n\t\t * @since 1.8.17\n\t\t *\n\t\t * @param {string} notice_code\n\t\t * @param {object} $container\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\trenderNotice: function( notice_code, $container ) {\n\t\t\tlet notice_html = '',\n\t\t\t\t$notice;\n\t\t\t$container = 'undefined' !== typeof $container ? $container : {};\n\n\t\t\tswitch ( notice_code ) {\n\t\t\t\tcase 'bad_minimum':\n\t\t\t\t\t$notice = jQuery(\n\t\t\t\t\t\t'<div class=\"give_error give-invalid-minimum give-hidden\">' +\n\t\t\t\t\t\tthis.getNotice( notice_code, $container ) +\n\t\t\t\t\t\t'</div>'\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'bad_maximum':\n\t\t\t\t\t$notice = jQuery(\n\t\t\t\t\t\t'<div class=\"give_error give-invalid-maximum give-hidden\">' +\n\t\t\t\t\t\tthis.getNotice( notice_code, $container ) +\n\t\t\t\t\t\t'</div>'\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Return html if container did not find.\n\t\t\tif ( ! $container.length ) {\n\t\t\t\treturn notice_html;\n\t\t\t}\n\n\t\t\t$notice.insertBefore( $container.find( '.give-total-wrap' ) ).show();\n\t\t},\n\n\t\t/**\n\t\t * Get error notice\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @param {string} error_code\n\t\t * @param {object} $form\n\t\t *\n\t\t * @return {*}\n\t\t */\n\t\tgetNotice: function( error_code, $form ) {\n\t\t\t// Bailout.\n\t\t\tif ( ! error_code.length ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar notice, notice_msg, formatted_amount;\n\t\t\tnotice = notice_msg = formatted_amount = '';\n\n\t\t\tif ( $form.length ) {\n\t\t\t\tswitch ( error_code ) {\n\t\t\t\t\tcase 'bad_minimum':\n\t\t\t\t\t\tnotice_msg = Give.fn.getGlobalVar( error_code );\n\t\t\t\t\t\tformatted_amount = Give.form.fn.getMinimumAmount( $form );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bad_maximum':\n\t\t\t\t\t\tnotice_msg = Give.fn.getGlobalVar( error_code );\n\t\t\t\t\t\tformatted_amount = Give.form.fn.getMaximumAmount( $form );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $form.length && '' !== notice_msg ) {\n\t\t\t\tnotice = notice_msg + ' ' + Give.fn.formatCurrency(\n\t\t\t\t\tformatted_amount,\n\t\t\t\t\t{\n\t\t\t\t\t\tsymbol: Give.form.fn.getInfo( 'currency_symbol', $form ),\n\t\t\t\t\t\tposition: Give.form.fn.getInfo( 'currency_position', $form )\n\t\t\t\t\t},\n\t\t\t\t\t$form\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn notice;\n\t\t}\n\t}\n};\n\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/plugins/give-api/notice.js","/* globals Give, jQuery */\nexport default {\n\tinit: function() {\n\t\tthis.fn.field.formatCreditCard( jQuery( 'form.give-form' ) );\n\t\tthis.fn.__initialize_cache();\n\n\t\twindow.onload = function() {\n\t\t\tGive.form.fn.__sendBackToForm();\n\t\t};\n\t},\n\n\tfn: {\n\n\t\t/**\n\t\t * Check if donation form exist on page or not\n\t\t *\n\t\t * @since 2.2.2\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisFormExist: function(){\n\t\t\treturn !! document.getElementsByName('give-form-hash').length;\n\t\t},\n\n\t\t/**\n\t\t * Disable donation form.\n\t\t *\n\t\t * @param {object} $form\n\t\t * @param {boolean} is_disable\n\t\t *\n\t\t * @return {*}\n\t\t */\n\t\tdisable: function( $form, is_disable ) {\n\t\t\tif ( ! $form.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$form.find( '.give-submit' ).prop( 'disabled', is_disable );\n\t\t},\n\n\t\t/**\n\t\t * Get formatted amount\n\t\t *\n\t\t * @param {string/number} amount\n\t\t * @param {object} $form\n\t\t * @param {object} args\n\t\t */\n\t\tformatAmount: function( amount, $form, args ) {\n\t\t\t// Do not format amount if form did not exist.\n\t\t\tif ( ! $form.length ) {\n\t\t\t\treturn amount;\n\t\t\t}\n\n\t\t\treturn Give.fn.formatCurrency( amount, args, $form );\n\t\t},\n\n\t\t/**\n\t\t * Get form information\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @param {string} str\n\t\t * @param {object} $form\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tgetInfo: function( str, $form ) {\n\t\t\tvar data = '';\n\t\t\t$form = 'undefined' !== typeof $form ? $form : {};\n\n\t\t\t// Bailout.\n\t\t\tif ( ! str.length || ! $form.length ) {\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tswitch ( str ) {\n\t\t\t\tcase 'gateways':\n\t\t\t\t\tdata = [];\n\t\t\t\t\tjQuery.each( $form.find( 'input[name=\"payment-mode\"]' ), function( index, gateway ) {\n\t\t\t\t\t\tgateway = ! (gateway instanceof jQuery) ? jQuery( gateway ) : gateway;\n\t\t\t\t\t\tdata.push( gateway.val().trim() );\n\t\t\t\t\t} );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'form-type':\n\t\t\t\t\tif ( $form.hasClass( 'give-form-type-set' ) ) {\n\t\t\t\t\t\tdata = 'set';\n\t\t\t\t\t} else if ( $form.hasClass( 'give-form-type-multi' ) ) {\n\t\t\t\t\t\tdata = 'multi';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'form-id':\n\t\t\t\t\tdata = $form.find( 'input[name=\"give-form-id\"]' ).val();\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tif ( $form.get( 0 ).hasAttribute( 'data-' + str ) ) {\n\t\t\t\t\t\tdata = $form.attr( 'data-' + str );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdata = $form.attr( str );\n\t\t\t\t\t}\n\n\t\t\t\t\t'undefined' !== typeof data ? data.trim() : data;\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\n\t\t/**\n\t\t * Set form information\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @param {string} str\n\t\t * @param {string} val\n\t\t * @param {object} $form\n\t\t * @param {string} type\n\t\t *\n\t\t * @return {string|boolean}\n\t\t */\n\t\tsetInfo: function( type, val, $form, str ) {\n\t\t\t// Bailout.\n\t\t\tif ( ! $form.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ttype = 'undefined' === typeof type ? 'data' : type;\n\n\t\t\tswitch ( type ) {\n\t\t\t\tcase 'nonce':\n\t\t\t\t\t$form.find( 'input[name=\"give-form-hash\"]' ).val( val );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Bailout.\n\t\t\tif ( 'undefined' !== typeof str && ! str.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tswitch ( type ) {\n\t\t\t\tcase 'attr':\n\t\t\t\t\t$form.attr( str, val );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$form.data( str, val );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\t/**\n\t\t * Get formatted amount\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @param {object} $form\n\t\t */\n\t\tgetGateway: function( $form ) {\n\t\t\tvar gateway = '';\n\n\t\t\tif ( ! $form.length ) {\n\t\t\t\treturn gateway;\n\t\t\t}\n\n\t\t\tgateway = $form.find( 'input[name=\"payment-mode\"]:checked' ).val().trim();\n\n\t\t\treturn 'undefined' !== typeof gateway ? gateway : '';\n\t\t},\n\n\t\t/**\n\t\t * Get Price ID and levels for multi donation form\n\t\t *\n\t\t * @param {Object} $form Form jQuery object\n\t\t *\n\t\t * @returns {Object}\n\t\t */\n\t\tgetVariablePrices: function( $form ) {\n\t\t\tvar variable_prices = [], formLevels;\n\n\t\t\t// check if correct form type is multi or not.\n\t\t\tif (\n\t\t\t\t! $form.length ||\n\t\t\t\t! $form.hasClass( 'give-form-type-multi' ) ||\n\t\t\t\t! (formLevels = $form.find( '.give-donation-levels-wrap [data-price-id] ' ))\n\t\t\t) {\n\t\t\t\treturn variable_prices;\n\t\t\t}\n\n\t\t\tjQuery.each( formLevels, function( index, item ) {\n\t\t\t\t// Get Jquery instance for item.\n\t\t\t\titem = ! (item instanceof jQuery) ? jQuery( item ) : item;\n\n\t\t\t\tvar decimal_separator = Give.form.fn.getInfo( 'decimal_separator', $form );\n\n\t\t\t\t// Add price id and amount to collector.\n\t\t\t\tvariable_prices.push( {\n\t\t\t\t\tprice_id: item.data( 'price-id' ),\n\t\t\t\t\tamount: Give.fn.unFormatCurrency( item.val(), decimal_separator )\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\treturn variable_prices;\n\t\t},\n\n\t\t/**\n\t\t * Get form price ID\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @param {object} $form\n\t\t * @param {boolean} is_amount\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tgetPriceID: function( $form, is_amount ) {\n\n\t\t\tvar variable_prices = this.getVariablePrices( $form ),\n\t\t\t\tcurrent_amount = Give.fn.unFormatCurrency(\n\t\t\t\t\t$form.find( 'input[name=\"give-amount\"]' ).val(),\n\t\t\t\t\tthis.getInfo( 'decimal_separator', $form )\n\t\t\t\t),\n\n\t\t\t\t/**\n\t\t\t\t * Flag Multi-levels for min. donation conditional.\n\t\t\t\t *\n\t\t\t\t * Note: Value of this variable will be:\n\t\t\t\t * a. -1 if no any level found.\n\t\t\t\t * b. [0-*] Any number from zero if donation level found.\n\t\t\t\t * c custom if donation level not found and donation amount is greater than the custom minimum amount.\n\t\t\t\t *\n\t\t\t\t * @type {number/string} Donation level ID.\n\t\t\t\t */\n\t\t\t\tprice_id = ! ! Give.fn.getCache( 'amount_' + current_amount, $form ) ? Give.fn.getCache( 'amount_' + current_amount, $form ) : - 1;\n\n\t\t\t// Flag to decide on which param we want to find price_id\n\t\t\tis_amount = 'undefined' === typeof is_amount ? true : is_amount;\n\n\t\t\t// Find price id with amount in variable prices.\n\t\t\tif ( variable_prices.length ) {\n\n\t\t\t\t// Get recent selected price id for same amount.\n\t\t\t\tif ( - 1 === price_id ) {\n\t\t\t\t\tif ( is_amount ) {\n\t\t\t\t\t\t// Find amount in donation levels.\n\t\t\t\t\t\tjQuery.each( variable_prices, function( index, variable_price ) {\n\t\t\t\t\t\t\tif ( variable_price.amount === current_amount ) {\n\t\t\t\t\t\t\t\tprice_id = variable_price.price_id;\n\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} );\n\n\t\t\t\t\t\t// Set level to custom.\n\t\t\t\t\t\tif ( - 1 === price_id && (this.getMinimumAmount( $form ) <= current_amount && (this.getMaximumAmount( $form ) >= current_amount) && this.getMinimumAmount( $form ) <= current_amount) ) {\n\t\t\t\t\t\t\tprice_id = 'custom';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprice_id = jQuery( 'input[name=\"give-price-id\"]', $form ).val();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn price_id;\n\t\t},\n\n\t\t/**\n\t\t * Get form minimum amount\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @param {object} $form\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tgetMinimumAmount: function( $form ) {\n\t\t\treturn $form.find( 'input[name=\"give-form-minimum\"]' ).val();\n\t\t},\n\n\t\t/**\n\t\t * Get form maximum amount\n\t\t *\n\t\t * @since 2.1\n\t\t * @param {object} $form\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tgetMaximumAmount: function( $form ) {\n\t\t\treturn $form.find( 'input[name=\"give-form-maximum\"]' ).val();\n\t\t},\n\n\t\t/**\n\t\t * Get form amount\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @param $form\n\t\t * @return {*}\n\t\t */\n\t\tgetAmount: function( $form ) {\n\t\t\t// Bailout\n\t\t\tif ( ! $form.length ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar amount = $form.find( 'input[name=\"give-amount\"]' ).val();\n\n\t\t\tif ( 'undefined' === typeof amount || ! amount ) {\n\t\t\t\tamount = 0;\n\t\t\t}\n\n\t\t\treturn Give.fn.unFormatCurrency( amount, this.getInfo( 'decimal_separator', $form ) );\n\t\t},\n\n\t\t/**\n\t\t * Get form security nonce\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @param {object} $form\n\t\t * @return {string}\n\t\t */\n\t\tgetNonce: function( $form ) {\n\t\t\t// Bailout\n\t\t\tif ( ! $form.length ) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tlet nonce = $form.find( 'input[name=\"give-form-hash\"]' ).val();\n\n\t\t\tif ( 'undefined' === typeof nonce || ! nonce ) {\n\t\t\t\tnonce = '';\n\t\t\t}\n\n\t\t\treturn nonce;\n\t\t},\n\n\t\t/**\n\t\t * Reset form nonce.\n\t\t *\n\t\t * @since 2.0\n\t\t *\n\t\t * @param {object} $form Donation form object.\n\t\t * @returns {boolean}\n\t\t */\n\t\tresetNonce: function( $form ) {\n\t\t\t// Return false, if form is missing.\n\t\t\tif ( ! $form.length || ! jQuery( 'input[name=\"give-form-hash\"]', $form ).length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tGive.form.fn.disable( $form, true );\n\n\t\t\t//Post via AJAX to Give\n\t\t\tjQuery.post( Give.fn.getGlobalVar('ajaxurl'), {\n\t\t\t\t\taction: 'give_donation_form_nonce',\n\t\t\t\t\tgive_form_id: Give.form.fn.getInfo( 'form-id', $form )\n\t\t\t\t},\n\t\t\t\tfunction( response ) {\n\t\t\t\t\t// Update nonce field.\n\t\t\t\t\tGive.form.fn.setInfo( 'nonce', response.data, $form, '' );\n\n\t\t\t\t\tGive.form.fn.disable( $form, false );\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Reset form all nonce.\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param {object} $form Donation form object.\n\t\t * @returns {boolean}\n\t\t */\n\t\tresetAllNonce: function( $form ) {\n\t\t\t// Return false, if form is missing.\n\t\t\tif ( ! $form.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tGive.form.fn.disable( $form, true );\n\n\t\t\t//Post via AJAX to Give\n\t\t\tjQuery.post( Give.fn.getGlobalVar('ajaxurl'), {\n\t\t\t\t\taction: 'give_donation_form_reset_all_nonce',\n\t\t\t\t\tgive_form_id: Give.form.fn.getInfo( 'form-id', $form )\n\t\t\t\t},\n\t\t\t\tfunction( response ) {\n\t\t\t\t\t// Process only if get response successfully.\n\t\t\t\t\tif( ! response.success ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst createUserNonceField = $form.find( 'input[name=\"give-form-user-register-hash\"]' );\n\n\t\t\t\t\t// Update nonce field.\n\t\t\t\t\tGive.form.fn.setInfo( 'nonce', response.data.give_form_hash, $form, '' );\n\n\t\t\t\t\t// Update create user nonce field.\n\t\t\t\t\tif( createUserNonceField.length ){\n\t\t\t\t\t\tcreateUserNonceField.val( response.data.give_form_user_register_hash );\n\t\t\t\t\t}\n\n\t\t\t\t\tGive.form.fn.disable( $form, false );\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Fire custom event handler when update all nonce of donation form\n\t\t\t\t\t *\n\t\t\t\t\t * @since 2.2.0\n\t\t\t\t\t * @access access\n\t\t\t\t\t */\n\t\t\t\t\tjQuery(document).trigger( 'give_reset_all_nonce', [response.data] );\n\t\t\t\t}\n\t\t\t).done(function(){\n\t\t\t\tGive.form.fn.disable( $form, false );\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Auto select donation level\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @param {object} $form\n\t\t * @param {string} price_id\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tautoSelectDonationLevel: function( $form, price_id ) {\n\n\t\t\tif ( ! $form.length || 'multi' !== this.getInfo( 'form-type', $form ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tprice_id = ('undefined' === typeof price_id) ? this.getPriceID( $form, false ) : price_id;\n\n\t\t\tswitch ( true ) {\n\n\t\t\t\t// Auto select radio button.\n\t\t\t\tcase (! ! $form.find( '.give-radio-input' ).length) :\n\t\t\t\t\t$form.find( '.give-radio-input' )\n\t\t\t\t\t\t.prop( 'checked', false );\n\t\t\t\t\t$form.find( '.give-radio-input[data-price-id=\"' + price_id + '\"]' )\n\t\t\t\t\t\t.prop( 'checked', true )\n\t\t\t\t\t\t.addClass( 'give-default-level' );\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Set focus to price id button.\n\t\t\t\tcase (! ! $form.find( 'button.give-donation-level-btn' ).length) :\n\t\t\t\t\t$form.find( 'button.give-donation-level-btn' )\n\t\t\t\t\t\t.blur();\n\t\t\t\t\t$form.find( 'button.give-donation-level-btn[data-price-id=\"' + price_id + '\"]' )\n\t\t\t\t\t\t.focus()\n\t\t\t\t\t\t.addClass( 'give-default-level' );\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Auto select option.\n\t\t\t\tcase (! ! $form.find( 'select.give-select-level' ).length) :\n\t\t\t\t\t$form.find( 'select.give-select-level option' )\n\t\t\t\t\t\t.prop( 'selected', false );\n\t\t\t\t\t$form.find( 'select.give-select-level option[data-price-id=\"' + price_id + '\"]' )\n\t\t\t\t\t\t.prop( 'selected', true )\n\t\t\t\t\t\t.addClass( 'give-default-level' );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Update level values\n\t\t *\n\t\t * Helper function: Sets the multi-select amount values\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @param {object} $level\n\t\t * @returns {boolean}\n\t\t */\n\t\tautoSetMultiLevel: function( $level ) {\n\n\t\t\tvar $form = $level.parents( 'form' ),\n\t\t\t\tlevel_amount = $level.val(),\n\t\t\t\tlevel_price_id = $level.data( 'price-id' );\n\n\t\t\t// Check if price ID blank because of dropdown type\n\t\t\tif ( 'undefined' === typeof level_price_id ) {\n\t\t\t\tlevel_price_id = $level.find( 'option:selected' ).data( 'price-id' );\n\t\t\t}\n\n\t\t\t// Is this a custom amount selection?\n\t\t\tif ( 'custom' === level_price_id ) {\n\t\t\t\t// It is, so focus on the custom amount input.\n\t\t\t\t$form.find( '.give-amount-top' ).val( '' ).focus();\n\t\t\t\treturn false; // Bounce out\n\t\t\t}\n\n\t\t\t// Update custom amount field\n\t\t\t$form.find( '.give-amount-top' ).val( level_amount );\n\t\t\t$form.find( 'span.give-amount-top' ).text( level_amount );\n\n\t\t\tvar decimal_separator = Give.form.fn.getInfo( 'decimal_separator', $form );\n\n\t\t\t// Cache previous amount and set data amount.\n\t\t\tjQuery( '.give-donation-amount .give-text-input', $form )\n\t\t\t\t.attr(\n\t\t\t\t\t'data-amount',\n\t\t\t\t\tGive.fn.unFormatCurrency(\n\t\t\t\t\t\t$form.find( '.give-final-total-amount' ).attr( 'data-total' ),\n\t\t\t\t\t\tdecimal_separator\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t// Manually trigger blur event with two params:\n\t\t\t// (a) form jquery object\n\t\t\t// (b) price id\n\t\t\t// (c) donation amount\n\t\t\t$form.find( '.give-donation-amount .give-text-input' )\n\t\t\t\t.trigger( 'blur', [ $form, level_amount, level_price_id ] );\n\t\t},\n\n\t\t/**\n\t\t * Donor sent back to the form\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @access private\n\t\t */\n\t\t__sendBackToForm: function() {\n\n\t\t\tlet form_id = Give.fn.getParameterByName( 'form-id' ),\n\t\t\t\tpayment_mode = Give.fn.getParameterByName( 'payment-mode' );\n\n\t\t\t// Sanity check - only proceed if query strings in place.\n\t\t\tif ( ! form_id || ! payment_mode ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tlet $form_wrapper = jQuery( 'body' ).find( '#give-form-' + form_id + '-wrap' ),\n\t\t\t\t$form = $form_wrapper.find( 'form.give-form' ),\n\t\t\t\tdisplay_modal = $form_wrapper.hasClass( 'give-display-modal' ),\n\t\t\t\tdisplay_button = $form_wrapper.hasClass( 'give-display-button' ),\n\t\t\t\tdisplay_reveal = $form_wrapper.hasClass( 'give-display-reveal' );\n\n\t\t\t// Update payment mode radio so it's correctly checked.\n\t\t\t$form.find( '#give-gateway-radio-list label' )\n\t\t\t\t.removeClass( 'give-gateway-option-selected' );\n\t\t\t$form.find( 'input[name=payment-mode][value=' + payment_mode + ']' )\n\t\t\t\t.prop( 'checked', true )\n\t\t\t\t.parent()\n\t\t\t\t.addClass( 'give-gateway-option-selected' );\n\n\t\t\t// Select the proper level for Multi-level forms.\n\t\t\t// It can either be a dropdown, buttons, or radio list. Default is buttons field type.\n\t\t\tlet level_id = Give.fn.getParameterByName( 'level-id' ),\n\t\t\t\tlevel_field = $form.find( '*[data-price-id=\"' + level_id + '\"]' );\n\n\t\t\tif ( level_field.length > 0 ) {\n\t\t\t\tthis.autoSetMultiLevel( level_field );\n\t\t\t}\n\n\t\t\tlet give_form_wrap = jQuery( '.give-form-wrap' ),\n\t\t\t\tis_form_grid = give_form_wrap.hasClass( 'give-form-grid-wrap' );\n\n\t\t\tif ( is_form_grid && 1 === jQuery( '#give-modal-form-' + form_id ).length ) {\n\t\t\t\tjQuery.magnificPopup.open( {\n\t\t\t\t\titems: {\n\t\t\t\t\t\ttype: 'inline',\n\t\t\t\t\t\tsrc: '#give-modal-form-' + form_id,\n\t\t\t\t\t},\n\t\t\t\t\tfixedContentPos: true,\n\t\t\t\t\tfixedBgPos: true,\n\t\t\t\t\tcloseBtnInside: true,\n\t\t\t\t\tmidClick: true,\n\t\t\t\t\tremovalDelay: 300,\n\t\t\t\t\tmainClass: 'modal-fade-slide',\n\t\t\t\t});\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// This form is modal display so show the modal.\n\t\t\tif ( display_modal || display_button ) {\n\t\t\t\tgive_open_form_modal( $form_wrapper, $form );\n\t\t\t} else if ( display_reveal ) {\n\t\t\t\t// This is a reveal form, show it.\n\t\t\t\t$form.find( '.give-btn-reveal' ).hide();\n\t\t\t\t$form.find( '#give-payment-mode-select, #give_purchase_form_wrap' ).slideDown();\n\t\t\t}\n\n\t\t},\n\n\t\t/**\n\t\t * Check if donation amount valid or not\n\t\t * @since 1.8.17\n\t\t *\n\t\t * @param {object} $form\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisValidDonationAmount: function( $form ) {\n\n\t\t\t// Return true, if custom amount is not enabled.\n\t\t\tif ( $form.find( 'input[name=\"give-form-minimum\"]' ).length <= 0 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tlet min_amount = this.getMinimumAmount( $form ),\n\t\t\t\tmax_amount = this.getMaximumAmount( $form ),\n\t\t\t\tamount = this.getAmount( $form ),\n\t\t\t\tprice_id = this.getPriceID( $form, true );\n\n\t\t\t// Don't allow zero donation amounts.\n\t\t\t// https://github.com/WordImpress/Give/issues/3181\n\t\t\tif( 0 === amount ) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t((- 1 < amount) && amount >= min_amount && amount <= max_amount)\n\t\t\t\t|| (- 1 !== price_id)\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Initialize cache.\n\t\t *\n\t\t * @since 1.8.17\n\t\t * @private\n\t\t */\n\t\t__initialize_cache: function() {\n\t\t\tjQuery.each( jQuery( '.give-form' ), function( index, $item ) {\n\t\t\t\t$item = $item instanceof jQuery ? $item : jQuery( $item );\n\n\t\t\t\tGive.cache[ 'form_' + Give.form.fn.getInfo( 'form-id', $item ) ] = [];\n\t\t\t} );\n\t\t},\n\n\t\tfield: {\n\n\t\t\t/**\n\t\t\t * Format CC Fields\n\t\t\t *\n\t\t\t * Set variables and format cc fields.\n\t\t\t *\n\t\t\t * @since 1.2\n\t\t\t *\n\t\t\t * @param {object} $forms\n\t\t\t */\n\t\t\tformatCreditCard: function( $forms ) {\n\t\t\t\t//Loop through forms on page and set CC validation\n\t\t\t\t$forms.each( function( index, form ) {\n\t\t\t\t\tform = jQuery( form );\n\t\t\t\t\tvar card_number = form.find( '.card-number' ),\n\t\t\t\t\t\tcard_cvc = form.find( '.card-cvc' ),\n\t\t\t\t\t\tcard_expiry = form.find( '.card-expiry' );\n\n\t\t\t\t\t//Only validate if there is a card field\n\t\t\t\t\tif ( card_number.length ) {\n\t\t\t\t\t\tcard_number.payment( 'formatCardNumber' );\n\t\t\t\t\t\tcard_cvc.payment( 'formatCardCVC' );\n\t\t\t\t\t\tcard_expiry.payment( 'formatCardExpiry' );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n};\n\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/plugins/give-api/form.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 * 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/* globals Give, jQuery */\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\t * @return {string} Template HTML.\n\t */\n\tgetTemplate() {\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\n\t\t\t\t\t${ ( 'form' === this.config.type ) ? '<div class=\"spinner\"></div>' : '' }\n\t\t\t\t\t${ ( 'form' === this.config.type ) ? `<a class=\"give-modal--additional-link\" href=\"${ this.config.modalContent.link }\">${ this.config.modalContent.link_text }</a>` : '' }\n\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.fn.getGlobalVar('cancel') : Give.fn.getGlobalVar('close') ) }\n\t\t\t\t\t</button>\n\n\t\t\t\t\t${ ( 'confirm' !== this.config.type && 'form' !== this.config.type ) ? '' : `<button class=\"give-button give-button--primary give-popup-${ this.config.type }-button\">\n\n\t\t\t\t\t\t${ this.config.modalContent.confirmBtnTitle ? this.config.modalContent.confirmBtnTitle : Give.fn.getGlobalVar('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.getTemplate();\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\t * @param {object} event Event object.\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\t * @return {object} GiveModal class object.\n\t */\n\trender() {\n\t\tswitch ( this.config.externalPlugin ) {\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 * 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 * 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\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 * This class will handle Form modal\n *\n * @since 2.2.0\n */\nclass GiveFormModal extends GiveModal {\n\tconstructor( obj ) {\n\t\tobj.type = 'form';\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 * Submit button click event handler\n\t *\n\t * Note: only for internal purpose\n\t *\n\t * @since 2.2.0\n\t * @private\n\t */\n\tstatic __submitPopup() {\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}\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, {} );\nwindow.addDynamicEventListener( document, 'click', '.give-popup-form-button', GiveFormModal.__submitPopup, {} );\n\nexport { GiveModal, GiveErrorAlert, GiveWarningAlert, GiveNoticeAlert, GiveSuccessAlert, GiveConfirmModal, GiveFormModal };\n\n\n\n// WEBPACK FOOTER //\n// ./assets/src/js/plugins/modal.js","// 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';\nimport GiveAPI from '../plugins/give-api/api';\n\nimport * as Modals from '../plugins/modal.js';\n\n// Give core.\nimport './admin-forms';\nimport './admin-settings';\nimport './admin-export';\nimport './admin-widgets';\nimport './admin-scripts';\nimport './admin-importer';\n\nGiveAPI.modal = Modals;\nexport const { init, fn, cache, modal } = GiveAPI;\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'>\" + (this.escape_html(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 <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').first();\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 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 return this.container.on('click.chosen', function(evt) {\n evt.preventDefault();\n });\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 this.search_field.val(this.search_field.val());\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.container.addClass(\"chosen-container-single-nosearch\");\n } else {\n this.search_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 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 ti;\n if (this.form_field.tabIndex) {\n ti = this.form_field.tabIndex;\n this.form_field.tabIndex = -1;\n return this.search_field[0].tabIndex = ti;\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 = 28\n// module chunks = 0","/* 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 = 29\n// module chunks = 0","/*\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 = 30\n// module chunks = 0","/* 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 = 31\n// module chunks = 0","/**\n * Note: This script is under development. We are using this inside core only and can be update in future. Currently uses only for admin purpose.\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\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\n\t\t// Title Prefixes.\n\t\tvar defaultNameTitlePrefixChecked = $( 'input[name=\"_give_name_title_prefix\"]:checked').val();\n\t\tif ( 'required' === defaultNameTitlePrefixChecked || 'optional' === defaultNameTitlePrefixChecked ) {\n\t\t\t$( '.give-title-prefixes-wrap' ).show();\n\t\t}\n\n\t\t$( 'input[name=\"_give_name_title_prefix\"]').on( 'change', function() {\n\t\t\tvar titlePrefixChecked = $( 'input[name=\"_give_name_title_prefix\"]:checked').val();\n\n\t\t\tif ( 'required' === titlePrefixChecked || 'optional' === titlePrefixChecked ) {\n\t\t\t\t$( '.give-title-prefixes-wrap' ).show();\n\t\t\t} else {\n\t\t\t\t$( '.give-title-prefixes-wrap' ).hide();\n\t\t\t}\n\t\t});\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 */\n\n/* globals Give, jQuery */\njQuery(document).ready(function ($) {\n\n\t/**\n\t * Sortable payment gateways.\n\t */\n\tlet $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\tlet give_settings_currency = '#give-mainform #currency';\n\tlet give_settings_position = '#give-mainform #currency_position';\n\t$( 'body' ).on( 'change', give_settings_currency, function () {\n\t\tlet 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.fn.getGlobalVar('currency_sign');\n\t\t}\n\n\t\tlet 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\tlet 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 * Show/Hide Title Prefixes\n\t */\n\tif ( 'disabled' !== $('input[name=\"name_title_prefix\"]:checked').val() ) {\n\t\t$( '.give-title-prefixes-settings-wrap' ).show();\n\t}\n\n\t$( 'input[name=\"name_title_prefix\"]' ).on( 'change', function() {\n\t\tif ( 'disabled' !== $(this).val() ) {\n\t\t\t$( '.give-title-prefixes-settings-wrap' ).show();\n\t\t} else {\n\t\t\t$( '.give-title-prefixes-settings-wrap' ).hide();\n\t\t}\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\tlet $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\tlet $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 Give.modal.GiveSuccessAlert({\n\t\t\t\t\tmodalContent:{\n\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('flush_success'),\n\t\t\t\t\t\tdesc: response.data.message,\n\t\t\t\t\t\tcancelBtnTitle: Give.fn.getGlobalVar('ok'),\n\t\t\t\t\t}\n\t\t\t\t}).render();\n\t\t\t} else {\n\t\t\t\tnew Give.modal.GiveErrorAlert({\n\t\t\t\t\tmodalContent:{\n\t\t\t\t\t\ttitle: Give.fn.getGlobalVar('flush_error'),\n\t\t\t\t\t\tdesc: response.data.message,\n\t\t\t\t\t\tcancelBtnTitle: Give.fn.getGlobalVar('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","/*!\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/* globals Give, jQuery */\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.fn.getGlobalVar('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\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\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 */\n/* globals Give, jQuery */\nimport {GiveWarningAlert, GiveErrorAlert, GiveConfirmModal} from '../plugins/modal';\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( jQuery( this ).closest( 'div.give-notice' ).attr( 'id' ) );\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 * @since 2.1.4 Added new param key which remove the multiple message array from URL.\n\t *\n\t * @param key string to remove from url in multiple notices.\n\t */\n\tvar give_remove_give_message = function ( key ) {\n\t\tvar parameter = 'give-message',\n\t\t\turl = document.location.href,\n\t\t\turlparts = url.split( '?' ),\n\t\t\tkey = (\n\t\t\t\tundefined === key\n\t\t\t) ? '' : key.replace( 'give-', '' );\n\n\t\tif ( urlparts.length >= 2 ) {\n\t\t\tvar urlBase = urlparts.shift();\n\t\t\tvar queryString = urlparts.join( '?' );\n\t\t\tvar prefix = encodeURIComponent( parameter ) + '=';\n\n\t\t\tvar pars = queryString.split( /[&;]/g );\n\t\t\tfor ( var i = pars.length; i -- > 0; ) {\n\n\t\t\t\tif ( pars[i].lastIndexOf( prefix, 0 ) !== - 1 || (\n\t\t\t\t\t\t'' !== key && pars[i].lastIndexOf( 'give-messages', 0 ) !== - 1 && pars[i].match( key + '$' )\n\t\t\t\t\t) ) {\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\t\tlet datepicker = $('.give_datepicker');\n\n\t\t// Date picker.\n\t\tif ( datepicker.length > 0) {\n\t\t\tdatepicker.datepicker({\n\t\t\t\tdateFormat: Give.fn.getGlobalVar('date_format')\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\tif ( $give_chosen_containers.hasClass( 'give-chosen-settings' ) ) {\n\n\t\t\t// Do something to chosen used in metabox or admin settings.\n\t\t\t$give_chosen_containers.chosen({\n\t\t\t\tno_results_text: Give.fn.getGlobalVar('chosen_add_title_prefix') + ' ',\n\t\t\t\twidth: '30%'\n\t\t\t}).on('chosen:no_results', function(evt, data){\n\n\t\t\t\t$( data.chosen.container ).on( 'keydown', function( event ) {\n\n\t\t\t\t\tvar chosenText = data.chosen.get_search_text();\n\n\t\t\t\t\tif(\n\t\t\t\t\t\t13 === event.keyCode &&\n\t\t\t\t\t\t! jQuery(data.chosen.form_field).find('option[value=\"' + chosenText + '\"]').length\n\t\t\t\t\t){\n\t\t\t\t\t\t$( data.chosen.form_field )\n\t\t\t\t\t\t\t.append( '<option value=\"' + chosenText + '\" selected>' + chosenText + '</option>' )\n\t\t\t\t\t\t\t.trigger('chosen:updated');\n\t\t\t\t\t\tdata.chosen.result_highlight = data.chosen.search_results.find('li.active-result').lasteturn;\n\t\t\t\t\t\tdata.chosen.result_select(evt);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t} else {\n\n\t\t\t// Add loader with each input field.\n\t\t\t$give_chosen_containers.on('chosen:ready', function () {\n\t\t\t\t$(this).next('.chosen-container')\n\t\t\t\t\t.find('input.chosen-search-input')\n\t\t\t\t\t.after('<span class=\"spinner\"></span>');\n\t\t\t});\n\n\t\t\t// Initiate chosen.\n\t\t\t$give_chosen_containers.chosen({\n\t\t\t\tinherit_select_classes: true,\n\t\t\t\tplaceholder_text_single: Give.fn.getGlobalVar('one_option'),\n\t\t\t\tplaceholder_text_multiple: Give.fn.getGlobalVar('one_or_more_option')\n\t\t\t});\n\n\t\t\t// No results returned from search trigger.\n\t\t\t$give_chosen_containers.on('chosen:no_results', function () {\n\t\t\t\tvar $container = $(this).next('.chosen-container'),\n\t\t\t\t\t$no_results_li = $container.find('li.no-results'),\n\t\t\t\t\terror_string = '';\n\n\t\t\t\tif ($container.hasClass('give-select-chosen-ajax') && $no_results_li.length) {\n\t\t\t\t\terror_string = Give.fn.getGlobal.chosen.ajax_search_msg.replace('{search_term}', '\"' + $('input', $container).val() + '\"');\n\t\t\t\t} else {\n\t\t\t\t\terror_string = Give.fn.getGlobal.chosen.no_results_msg.replace('{search_term}', '\"' + $('input', $container).val() + '\"');\n\t\t\t\t}\n\n\t\t\t\t$no_results_li.html(error_string);\n\n\t\t\t\t// Variables for setting up the typing timer.\n\t\t\t\tvar typingTimer; // Timer identifier.\n\t\t\t\tvar doneTypingInterval = 342; // Time in ms, Slow - 521ms, Moderate - 342ms, Fast - 300ms.\n\n\t\t\t\t// Replace options with search results.\n\t\t\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\t\t\tvar val = $(this).val(),\n\t\t\t\t\t\t$container = $(this).closest('.give-select-chosen'),\n\t\t\t\t\t\tselect = $container.prev(),\n\t\t\t\t\t\t$search_field = $container.find('input[type=\"text\"]'),\n\t\t\t\t\t\tvariations = $container.hasClass('variations'),\n\t\t\t\t\t\tlastKey = e.which,\n\t\t\t\t\t\tsearch_type = 'give_form_search',\n\t\t\t\t\t\t$this = this;\n\n\n\t\t\t\t\t// Detect if we have a defined search type, otherwise default to donation forms.\n\t\t\t\t\tif ($container.prev().data('search-type')) {\n\n\t\t\t\t\t\t// Don't trigger AJAX if this select has all options loaded.\n\t\t\t\t\t\tif ('no_ajax' === select.data('search-type')) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsearch_type = 'give_' + select.data('search-type') + '_search';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Don't fire if short or is a modifier key (shift, ctrl, apple command key, or arrow keys).\n\t\t\t\t\tif (\n\t\t\t\t\t\t( val.length > 0 && val.length <= 3 ) ||\n\t\t\t\t\t\t!search_type.length ||\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(9 === lastKey) || // Tab.\n\t\t\t\t\t\t\t(13 === lastKey) || // Enter.\n\t\t\t\t\t\t\t(16 === lastKey) || // Shift.\n\t\t\t\t\t\t\t(17 === lastKey) || // Ctrl.\n\t\t\t\t\t\t\t(18 === lastKey) || // Alt.\n\t\t\t\t\t\t\t(19 === lastKey) || // Pause, Break.\n\t\t\t\t\t\t\t(20 === lastKey) || // CapsLock.\n\t\t\t\t\t\t\t(27 === lastKey) || // Esc.\n\t\t\t\t\t\t\t(33 === lastKey) || // Page Up.\n\t\t\t\t\t\t\t(34 === lastKey) || // Page Down.\n\t\t\t\t\t\t\t(35 === lastKey) || // End.\n\t\t\t\t\t\t\t(36 === lastKey) || // Home.\n\t\t\t\t\t\t\t(37 === lastKey) || // Left arrow.\n\t\t\t\t\t\t\t(38 === lastKey) || // Up arrow.\n\t\t\t\t\t\t\t(39 === lastKey) || // Right arrow.\n\t\t\t\t\t\t\t(40 === lastKey) || // Down arrow.\n\t\t\t\t\t\t\t(44 === lastKey) || // PrntScrn.\n\t\t\t\t\t\t\t(45 === lastKey) || // Insert.\n\t\t\t\t\t\t\t(144 === lastKey) || // NumLock.\n\t\t\t\t\t\t\t(145 === lastKey) || // ScrollLock.\n\t\t\t\t\t\t\t(91 === lastKey) || // WIN Key (Start).\n\t\t\t\t\t\t\t(93 === lastKey) || // WIN Menu.\n\t\t\t\t\t\t\t(224 === lastKey) || // Command key.\n\t\t\t\t\t\t\t(112 <= lastKey && 123 >= lastKey) // F1 to F12 lastKey.\n\t\t\t\t\t\t)\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\tclearTimeout(typingTimer);\n\t\t\t\t\t$container.addClass('give-select-chosen-ajax');\n\n\t\t\t\t\ttypingTimer = setTimeout(\n\t\t\t\t\t\tfunction () {\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\turl: ajaxurl,\n\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\taction: search_type,\n\t\t\t\t\t\t\t\t\ts: val,\n\t\t\t\t\t\t\t\t\tfields: $( $this ).closest( 'form' ).serialize()\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdataType: 'json',\n\t\t\t\t\t\t\t\tbeforeSend: function () {\n\t\t\t\t\t\t\t\t\tselect.closest('ul.chosen-results').empty();\n\t\t\t\t\t\t\t\t\t$search_field.prop('disabled', true);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tsuccess: function (data) {\n\n\t\t\t\t\t\t\t\t\t$container.removeClass('give-select-chosen-ajax');\n\n\t\t\t\t\t\t\t\t\t// Remove all options but those that are selected.\n\t\t\t\t\t\t\t\t\t$('option:not(:selected)', select).remove();\n\n\t\t\t\t\t\t\t\t\tif (data.length) {\n\t\t\t\t\t\t\t\t\t\t$.each(data, function (key, item) {\n\t\t\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\t\t\tif (!$('option[value=\"' + item.id + '\"]', select).length) {\n\t\t\t\t\t\t\t\t\t\t\t\tif ( 0 === val.length ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tselect.append(`<option value=\"${item.id}\">${item.name}</option>`);\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\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\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\t// Trigger update event.\n\t\t\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\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Trigger no result message event.\n\t\t\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\t\t}\n\n\t\t\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\t\t$search_field.prop('disabled', false);\n\t\t\t\t\t\t\t\t\t$search_field.val(val).focus();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).fail(function (response) {\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(response);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).done(function (response) {\n\t\t\t\t\t\t\t\t$search_field.prop('disabled', false);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdoneTypingInterval\n\t\t\t\t\t);\n\t\t\t\t});\n\n\t\t\t\t$('.give-select-chosen .chosen-search input').each(function () {\n\t\t\t\t\tvar type = $(this).parent().parent().parent().prev('select.give-select-chosen').data('search-type');\n\t\t\t\t\tvar placeholder = '';\n\n\t\t\t\t\tif ('form' === type) {\n\t\t\t\t\t\tplaceholder = Give.fn.getGlobalVar('search_placeholder');\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttype = 'search_placeholder_' + type;\n\t\t\t\t\t\tif ( Give.fn.getGlobalVar(type) ) {\n\t\t\t\t\t\t\tplaceholder = Give.fn.getGlobalVar(type);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$(this).attr('placeholder', placeholder);\n\n\t\t\t\t});\n\n\t\t\t});\n\t\t}\n\n\n\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\n\n\t};\n\n\t/**\n\t * Unformat Currency\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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('confirm_delete_donation'),\n\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('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.fn.getGlobalVar('confirm_resend'),\n\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('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.fn.getGlobalVar('confirm_deletion'),\n\t\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('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\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.fn.getGlobalVar('confirm_action'),\n\t\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('resend_receipt'),\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( $( 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\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.toggle_gateways();\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\n\t\t/**\n\t\t * Disables the default gateway radio button if the\n\t\t * gateway is disabled.\n\t\t */\n\t\ttoggle_gateways: function() {\n\t\t\tlet checkbox = $( '.gateways-checkbox' );\n\n\t\t\tcheckbox.on( 'click', function() {\n\n\t\t\t\t// Get the radio button object related to this checkbox.\n\t\t\t\tlet radio = $( this ).prev( '.gateways-radio' );\n\n\t\t\t\t// Get the checked value of the current checbox.\n\t\t\t\tlet checked = this.checked;\n\n\t\t\t\t// Get all the checkbox that are checked.\n\t\t\t\tlet checked_cbs = $( '.gateways-checkbox:checked' );\n\n\t\t\t\t// Get the count of all the checked checkbox.\n\t\t\t\tlet count_cbs = checked_cbs.length;\n\n\t\t\t\t/**\n\t\t\t\t * If there is only one checked checkbox, then\n\t\t\t\t * make that gateway the default gateway.\n\t\t\t\t */\n\t\t\t\tif ( 1 === count_cbs ) {\n\t\t\t\t\tchecked_cbs\n\t\t\t\t\t\t.prev( '.gateways-radio' )\n\t\t\t\t\t\t.attr( 'checked', 'checked' );\n\n\t\t\t\t\tif ( this.checked ) {\n\t\t\t\t\t\tradio.removeAttr( 'disabled' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tradio.attr( 'disabled', 'disabled' );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( this.checked ) {\n\t\t\t\t\t\tradio.removeAttr( 'disabled' );\n\t\t\t\t\t\tradio.removeAttr( 'checked' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tradio.attr( 'disabled', 'disabled' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\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\t$( '#base_state_chosen' ).remove();\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 ).addClass( 'give-select-chosen' );\n\t\t\t\t\t\t$( ':input[name=\"base_state\"]' ).chosen();\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.fn.getGlobalVar('matched_success_failure_page') + '</strong></p> <button type=\"button\" class=\"notice-dismiss\"><span class=\"screen-reader-text\">' + Give.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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\t// Start update by ajax if background update does not work.\n\t\t\t\t\tif ( ! Give.fn.getGlobalVar('ajax').length ) {\n\t\t\t\t\t\twindow.setTimeout(Give_Updates.start_db_update, 1000);\n\t\t\t\t\t}\n\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.fn.getGlobalVar('db_update_confirmation_msg_button') + '</a> ' + Give.fn.getGlobalVar('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\tGive_Updates.start_db_update();\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\tstart_db_update: function start_db_update() {\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_run_db_updates',\n\t\t\t\t\trun_db_update: 1,\n\t\t\t\t\tnonce: Give.fn.getGlobalVar('db_update_nonce')\n\t\t\t\t},\n\t\t\t\tdataType: 'json',\n\t\t\t\tsuccess: function success(response) {}\n\t\t\t}).always(function(){\n\t\t\t\t// Start update by ajax if background update does not work.\n\t\t\t\tif ( ! Give.fn.getGlobalVar('ajax').length) {\n\t\t\t\t\twindow.setTimeout(Give_Updates.start_db_update, 1000);\n\t\t\t\t}\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.fn.getGlobal().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.fn.getGlobal().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.fn.getGlobalVar('confirm_action'),\n\t\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('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.fn.getGlobalVar('confirm_action'),\n\t\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('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.fn.getGlobalVar('confirm_action'),\n\t\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('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\t\tonLoadPageNumber: '',\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\tGiveDonor.onLoadPageNumber = $( '#current-page-selector' ).val();\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.fn.getGlobalVar('unlock_donor_fields_title'),\n\t\t\t\t\t\tdesc: Give.fn.getGlobalVar('unlock_donor_fields_message'),\n\t\t\t\t\t\tcancelBtnTitle: Give.fn.getGlobalVar('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.fn.getGlobalVar('disconnect_user'))) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvar donorID = $('input[name=\"donor_info[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.fn.getGlobalVar('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.fn.getGlobalVar('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-bulk-delete .give-donor-delete-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-bulk-delete .give-donor-delete-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-bulk-delete .give-donor-delete-records', function () {\n\t\t\t\tif ($(this).is(':checked')) {\n\t\t\t\t\t$('#give-bulk-delete .give-donor-delete-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.fn.getGlobalVar('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\tpaged = $( '#current-page-selector' ).val(),\n\t\t\t\tchangedPage = ( GiveDonor.onLoadPageNumber !== paged ),\n\t\t\t\tselectBulkActionNotice = Give.fn.getGlobalVar('donors_bulk_action.no_action_selected'),\n\t\t\t\tconfirmActionNotice = Give.fn.getGlobalVar('donors_bulk_action.no_donor_selected');\n\n\t\t\t// Bailout.\n\t\t\tif( changedPage ){\n\t\t\t\treturn true;\n\t\t\t}\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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobalVar('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.fn.getGlobal().metabox_fields.media.button_title,\n\t\t\t\t\t\t\tbutton: {text: Give.fn.getGlobal().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.fn.getGlobal().metabox_fields.file.button_title,\n\t\t\t\t\t\t\tbutton: {text: Give.fn.getGlobal().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.fn.getGlobalVar('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// 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\tlet $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\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\tlet $fields = $('input[type=\"radio\"].give-field', $(item));\n\n\t\t\t\t\t\t\t\t\t\t// Preserve radio button values.\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\t$(this).attr('data-give-checked', $(this).is(':checked') );\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\t\t\t\t\t\t\t\t}\n\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// 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\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\t\t\t\t\t\t\t\t\t$container = $(this).closest('.give-repeatable-fields-section-wrapper');\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\twindow.setTimeout( function () {\n\t\t\t\t\t\t\t\t\t\t// Reset radio button values.\n\t\t\t\t\t\t\t\t\t\t$( 'input[data-give-checked]', $container ).each( function ( index, radio ) {\n\t\t\t\t\t\t\t\t\t\t\tradio = $( radio );\n\t\t\t\t\t\t\t\t\t\t\tradio.prop( 'checked', 'true' === radio.attr( 'data-give-checked' ) )\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t}, 100 );\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_cou