PageSourceSearch

https://sma.org/wp-content/plugins/manage-gravity-forms-stripe-subscriptions-pro/js/bootstrap.min.js?ver=68

js sma.org collected 2026-10-01 10:46:06 UTC 21,294 bytes, 723 lines download raw bytes

vendor: 4,198 bytes, lines 1-138
1/*!
2 * Generated using the Bootstrap Customizer (https://getbootstrap.com/docs/3.4/customize/)
3 */
4
5/*!
6 * Bootstrap v3.4.1 (https://getbootstrap.com/)
7 * Copyright 2011-2021 Twitter, Inc.
8 * Licensed under the MIT license
9 */
10
11if (typeof jQuery === 'undefined') {
12  throw new Error('Bootstrap\'s JavaScript requires jQuery')
13}
14+function ($) {
15  'use strict';
16  var version = $.fn.jquery.split(' ')[0].split('.')
17  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
18    throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
19  }
20}(jQuery);
21
22/* ========================================================================
23 * Bootstrap: button.js v3.4.1
24 * https://getbootstrap.com/docs/3.4/javascript/#buttons
25 * ========================================================================
26 * Copyright 2011-2019 Twitter, Inc.
27 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
28 * ======================================================================== */
29
30
31+function ($) {
32  'use strict';
33
34  // BUTTON PUBLIC CLASS DEFINITION
35  // ==============================
36
37  var Button = function (element, options) {
38    this.$element  = $(element)
39    this.options   = $.extend({}, Button.DEFAULTS, options)
40    this.isLoading = false
41  }
42
43  Button.VERSION  = '3.4.1'
44
45  Button.DEFAULTS = {
46    loadingText: 'loading...'
47  }
48
49  Button.prototype.setState = function (state) {
50    var d    = 'disabled'
51    var $el  = this.$element
52    var val  = $el.is('input') ? 'val' : 'html'
53    var data = $el.data()
54
55    state += 'Text'
56
57    if (data.resetText == null) $el.data('resetText', $el[val]())
58
59    // push to event loop to allow forms to submit
60    setTimeout($.proxy(function () {
61      $el[val](data[state] == null ? this.options[state] : data[state])
62
63      if (state == 'loadingText') {
64        this.isLoading = true
65        $el.addClass(d).attr(d, d).prop(d, true)
66      } else if (this.isLoading) {
67        this.isLoading = false
68        $el.removeClass(d).removeAttr(d).prop(d, false)
69      }
70    }, this), 0)
71  }
72
73  Button.prototype.toggle = function () {
74    var changed = true
75    var $parent = this.$element.closest('[data-toggle="buttons"]')
76
77    if ($parent.length) {
78      var $input = this.$element.find('input')
79      if ($input.prop('type') == 'radio') {
80        if ($input.prop('checked')) changed = false
81        $parent.find('.active').removeClass('active')
82        this.$element.addClass('active')
83      } else if ($input.prop('type') == 'checkbox') {
84        if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
85        this.$element.toggleClass('active')
86      }
87      $input.prop('checked', this.$element.hasClass('active'))
88      if (changed) $input.trigger('change')
89    } else {
90      this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
91      this.$element.toggleClass('active')
92    }
93  }
94
95
96  // BUTTON PLUGIN DEFINITION
97  // ========================
98
99  function Plugin(option) {
100    return this.each(function () {
101      var $this   = $(this)
102      var data    = $this.data('bs.button')
103      var options = typeof option == 'object' && option
104
105      if (!data) $this.data('bs.button', (data = new Button(this, options)))
106
107      if (option == 'toggle') data.toggle()
108      else if (option) data.setState(option)
109    })
110  }
111
112  var old = $.fn.button
113
114  $.fn.button             = Plugin
115  $.fn.button.Constructor = Button
116
117
118  // BUTTON NO CONFLICT
119  // ==================
120
121  $.fn.button.noConflict = function () {
122    $.fn.button = old
123    return this
124  }
125
126
127  // BUTTON DATA-API
128  // ===============
129
130  $(document)
131    .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
132      var $btn = $(e.target).closest('.btn')
133      Plugin.call($btn, 'toggle')
134      if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
135        // Prevent double click on radios, and the double selections (so cancellation) on checkboxes
136        e.preventDefault()
137        // The target component still receive the focus
138        if ($btn.is('input,button')) $btn.trigger('focus')
vendor: 5,744 bytes, lines 139-332
139        else $btn.find('input:visible,button:visible').first().trigger('focus')
140      }
141    })
142    .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
143      $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
144    })
145
146}(jQuery);
147
148/* ========================================================================
149 * Bootstrap: dropdown.js v3.4.1
150 * https://getbootstrap.com/docs/3.4/javascript/#dropdowns
151 * ========================================================================
152 * Copyright 2011-2019 Twitter, Inc.
153 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
154 * ======================================================================== */
155
156
157+function ($) {
158  'use strict';
159
160  // DROPDOWN CLASS DEFINITION
161  // =========================
162
163  var backdrop = '.dropdown-backdrop'
164  var toggle   = '[data-toggle="dropdown"]'
165  var Dropdown = function (element) {
166    $(element).on('click.bs.dropdown', this.toggle)
167  }
168
169  Dropdown.VERSION = '3.4.1'
170
171  function getParent($this) {
172    var selector = $this.attr('data-target')
173
174    if (!selector) {
175      selector = $this.attr('href')
176      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
177    }
178
179    var $parent = selector !== '#' ? $(document).find(selector) : null
180
181    return $parent && $parent.length ? $parent : $this.parent()
182  }
183
184  function clearMenus(e) {
185    if (e && e.which === 3) return
186    $(backdrop).remove()
187    $(toggle).each(function () {
188      var $this         = $(this)
189      var $parent       = getParent($this)
190      var relatedTarget = { relatedTarget: this }
191
192      if (!$parent.hasClass('open')) return
193
194      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
195
196      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
197
198      if (e.isDefaultPrevented()) return
199
200      $this.attr('aria-expanded', 'false')
201      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
202    })
203  }
204
205  Dropdown.prototype.toggle = function (e) {
206    var $this = $(this)
207
208    if ($this.is('.disabled, :disabled')) return
209
210    var $parent  = getParent($this)
211    var isActive = $parent.hasClass('open')
212
213    clearMenus()
214
215    if (!isActive) {
216      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
217        // if mobile we use a backdrop because click events don't delegate
218        $(document.createElement('div'))
219          .addClass('dropdown-backdrop')
220          .insertAfter($(this))
221          .on('click', clearMenus)
222      }
223
224      var relatedTarget = { relatedTarget: this }
225      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
226
227      if (e.isDefaultPrevented()) return
228
229      $this
230        .trigger('focus')
231        .attr('aria-expanded', 'true')
232
233      $parent
234        .toggleClass('open')
235        .trigger($.Event('shown.bs.dropdown', relatedTarget))
236    }
237
238    return false
239  }
240
241  Dropdown.prototype.keydown = function (e) {
242    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
243
244    var $this = $(this)
245
246    e.preventDefault()
247    e.stopPropagation()
248
249    if ($this.is('.disabled, :disabled')) return
250
251    var $parent  = getParent($this)
252    var isActive = $parent.hasClass('open')
253
254    if (!isActive && e.which != 27 || isActive && e.which == 27) {
255      if (e.which == 27) $parent.find(toggle).trigger('focus')
256      return $this.trigger('click')
257    }
258
259    var desc = ' li:not(.disabled):visible a'
260    var $items = $parent.find('.dropdown-menu' + desc)
261
262    if (!$items.length) return
263
264    var index = $items.index(e.target)
265
266    if (e.which == 38 && index > 0)                 index--         // up
267    if (e.which == 40 && index < $items.length - 1) index++         // down
268    if (!~index)                                    index = 0
269
270    $items.eq(index).trigger('focus')
271  }
272
273
274  // DROPDOWN PLUGIN DEFINITION
275  // ==========================
276
277  function Plugin(option) {
278    return this.each(function () {
279      var $this = $(this)
280      var data  = $this.data('bs.dropdown')
281
282      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
283      if (typeof option == 'string') data[option].call($this)
284    })
285  }
286
287  var old = $.fn.dropdown
288
289  $.fn.dropdown             = Plugin
290  $.fn.dropdown.Constructor = Dropdown
291
292
293  // DROPDOWN NO CONFLICT
294  // ====================
295
296  $.fn.dropdown.noConflict = function () {
297    $.fn.dropdown = old
298    return this
299  }
300
301
302  // APPLY TO STANDARD DROPDOWN ELEMENTS
303  // ===================================
304
305  $(document)
306    .on('click.bs.dropdown.data-api', clearMenus)
307    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
308    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
309    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
310    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
311
312}(jQuery);
313
314/* ========================================================================
315 * Bootstrap: modal.js v3.4.1
316 * https://getbootstrap.com/docs/3.4/javascript/#modals
317 * ========================================================================
318 * Copyright 2011-2019 Twitter, Inc.
319 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
320 * ======================================================================== */
321
322
323+function ($) {
324  'use strict';
325
326  // MODAL CLASS DEFINITION
327  // ======================
328
329  var Modal = function (element, options) {
330    this.options = options
331    this.$body = $(document.body)
332    this.$element = $(element)
vendor: 9,989 bytes, lines 333-676
333    this.$dialog = this.$element.find('.modal-dialog')
334    this.$backdrop = null
335    this.isShown = null
336    this.originalBodyPad = null
337    this.scrollbarWidth = 0
338    this.ignoreBackdropClick = false
339    this.fixedContent = '.navbar-fixed-top, .navbar-fixed-bottom'
340
341    if (this.options.remote) {
342      this.$element
343        .find('.modal-content')
344        .load(this.options.remote, $.proxy(function () {
345          this.$element.trigger('loaded.bs.modal')
346        }, this))
347    }
348  }
349
350  Modal.VERSION = '3.4.1'
351
352  Modal.TRANSITION_DURATION = 300
353  Modal.BACKDROP_TRANSITION_DURATION = 150
354
355  Modal.DEFAULTS = {
356    backdrop: true,
357    keyboard: true,
358    show: true
359  }
360
361  Modal.prototype.toggle = function (_relatedTarget) {
362    return this.isShown ? this.hide() : this.show(_relatedTarget)
363  }
364
365  Modal.prototype.show = function (_relatedTarget) {
366    var that = this
367    var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
368
369    this.$element.trigger(e)
370
371    if (this.isShown || e.isDefaultPrevented()) return
372
373    this.isShown = true
374
375    this.checkScrollbar()
376    this.setScrollbar()
377    this.$body.addClass('modal-open')
378
379    this.escape()
380    this.resize()
381
382    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
383
384    this.$dialog.on('mousedown.dismiss.bs.modal', function () {
385      that.$element.one('mouseup.dismiss.bs.modal', function (e) {
386        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
387      })
388    })
389
390    this.backdrop(function () {
391      var transition = $.support.transition && that.$element.hasClass('fade')
392
393      if (!that.$element.parent().length) {
394        that.$element.appendTo(that.$body) // don't move modals dom position
395      }
396
397      that.$element
398        .show()
399        .scrollTop(0)
400
401      that.adjustDialog()
402
403      if (transition) {
404        that.$element[0].offsetWidth // force reflow
405      }
406
407      that.$element.addClass('in')
408
409      that.enforceFocus()
410
411      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
412
413      transition ?
414        that.$dialog // wait for modal to slide in
415          .one('bsTransitionEnd', function () {
416            that.$element.trigger('focus').trigger(e)
417          })
418          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
419        that.$element.trigger('focus').trigger(e)
420    })
421  }
422
423  Modal.prototype.hide = function (e) {
424    if (e) e.preventDefault()
425
426    e = $.Event('hide.bs.modal')
427
428    this.$element.trigger(e)
429
430    if (!this.isShown || e.isDefaultPrevented()) return
431
432    this.isShown = false
433
434    this.escape()
435    this.resize()
436
437    $(document).off('focusin.bs.modal')
438
439    this.$element
440      .removeClass('in')
441      .off('click.dismiss.bs.modal')
442      .off('mouseup.dismiss.bs.modal')
443
444    this.$dialog.off('mousedown.dismiss.bs.modal')
445
446    $.support.transition && this.$element.hasClass('fade') ?
447      this.$element
448        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
449        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
450      this.hideModal()
451  }
452
453  Modal.prototype.enforceFocus = function () {
454    $(document)
455      .off('focusin.bs.modal') // guard against infinite focus loop
456      .on('focusin.bs.modal', $.proxy(function (e) {
457        if (document !== e.target &&
458          this.$element[0] !== e.target &&
459          !this.$element.has(e.target).length) {
460          this.$element.trigger('focus')
461        }
462      }, this))
463  }
464
465  Modal.prototype.escape = function () {
466    if (this.isShown && this.options.keyboard) {
467      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
468        e.which == 27 && this.hide()
469      }, this))
470    } else if (!this.isShown) {
471      this.$element.off('keydown.dismiss.bs.modal')
472    }
473  }
474
475  Modal.prototype.resize = function () {
476    if (this.isShown) {
477      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
478    } else {
479      $(window).off('resize.bs.modal')
480    }
481  }
482
483  Modal.prototype.hideModal = function () {
484    var that = this
485    this.$element.hide()
486    this.backdrop(function () {
487      that.$body.removeClass('modal-open')
488      that.resetAdjustments()
489      that.resetScrollbar()
490      that.$element.trigger('hidden.bs.modal')
491    })
492  }
493
494  Modal.prototype.removeBackdrop = function () {
495    this.$backdrop && this.$backdrop.remove()
496    this.$backdrop = null
497  }
498
499  Modal.prototype.backdrop = function (callback) {
500    var that = this
501    var animate = this.$element.hasClass('fade') ? 'fade' : ''
502
503    if (this.isShown && this.options.backdrop) {
504      var doAnimate = $.support.transition && animate
505
506      this.$backdrop = $(document.createElement('div'))
507        .addClass('modal-backdrop ' + animate)
508        .appendTo(this.$body)
509
510      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
511        if (this.ignoreBackdropClick) {
512          this.ignoreBackdropClick = false
513          return
514        }
515        if (e.target !== e.currentTarget) return
516        this.options.backdrop == 'static'
517          ? this.$element[0].focus()
518          : this.hide()
519      }, this))
520
521      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
522
523      this.$backdrop.addClass('in')
524
525      if (!callback) return
526
527      doAnimate ?
528        this.$backdrop
529          .one('bsTransitionEnd', callback)
530          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
531        callback()
532
533    } else if (!this.isShown && this.$backdrop) {
534      this.$backdrop.removeClass('in')
535
536      var callbackRemove = function () {
537        that.removeBackdrop()
538        callback && callback()
539      }
540      $.support.transition && this.$element.hasClass('fade') ?
541        this.$backdrop
542          .one('bsTransitionEnd', callbackRemove)
543          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
544        callbackRemove()
545
546    } else if (callback) {
547      callback()
548    }
549  }
550
551  // these following methods are used to handle overflowing modals
552
553  Modal.prototype.handleUpdate = function () {
554    this.adjustDialog()
555  }
556
557  Modal.prototype.adjustDialog = function () {
558    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
559
560    this.$element.css({
561      paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
562      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
563    })
564  }
565
566  Modal.prototype.resetAdjustments = function () {
567    this.$element.css({
568      paddingLeft: '',
569      paddingRight: ''
570    })
571  }
572
573  Modal.prototype.checkScrollbar = function () {
574    var fullWindowWidth = window.innerWidth
575    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
576      var documentElementRect = document.documentElement.getBoundingClientRect()
577      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
578    }
579    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
580    this.scrollbarWidth = this.measureScrollbar()
581  }
582
583  Modal.prototype.setScrollbar = function () {
584    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
585    this.originalBodyPad = document.body.style.paddingRight || ''
586    var scrollbarWidth = this.scrollbarWidth
587    if (this.bodyIsOverflowing) {
588      this.$body.css('padding-right', bodyPad + scrollbarWidth)
589      $(this.fixedContent).each(function (index, element) {
590        var actualPadding = element.style.paddingRight
591        var calculatedPadding = $(element).css('padding-right')
592        $(element)
593          .data('padding-right', actualPadding)
594          .css('padding-right', parseFloat(calculatedPadding) + scrollbarWidth + 'px')
595      })
596    }
597  }
598
599  Modal.prototype.resetScrollbar = function () {
600    this.$body.css('padding-right', this.originalBodyPad)
601    $(this.fixedContent).each(function (index, element) {
602      var padding = $(element).data('padding-right')
603      $(element).removeData('padding-right')
604      element.style.paddingRight = padding ? padding : ''
605    })
606  }
607
608  Modal.prototype.measureScrollbar = function () { // thx walsh
609    var scrollDiv = document.createElement('div')
610    scrollDiv.className = 'modal-scrollbar-measure'
611    this.$body.append(scrollDiv)
612    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
613    this.$body[0].removeChild(scrollDiv)
614    return scrollbarWidth
615  }
616
617
618  // MODAL PLUGIN DEFINITION
619  // =======================
620
621  function Plugin(option, _relatedTarget) {
622    return this.each(function () {
623      var $this = $(this)
624      var data = $this.data('bs.modal')
625      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
626
627      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
628      if (typeof option == 'string') data[option](_relatedTarget)
629      else if (options.show) data.show(_relatedTarget)
630    })
631  }
632
633  var old = $.fn.modal
634
635  $.fn.modal = Plugin
636  $.fn.modal.Constructor = Modal
637
638
639  // MODAL NO CONFLICT
640  // =================
641
642  $.fn.modal.noConflict = function () {
643    $.fn.modal = old
644    return this
645  }
646
647
648  // MODAL DATA-API
649  // ==============
650
651  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
652    var $this = $(this)
653    var href = $this.attr('href')
654    var target = $this.attr('data-target') ||
655      (href && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
656
657    var $target = $(document).find(target)
658    var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
659
660    if ($this.is('a')) e.preventDefault()
661
662    $target.one('show.bs.modal', function (showEvent) {
663      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
664      $target.one('hidden.bs.modal', function () {
665        $this.is(':visible') && $this.trigger('focus')
666      })
667    })
668    Plugin.call($target, option, this)
669  })
670
671}(jQuery);
672
673
674+function ($) {
675  'use strict';
676
vendor: 1,363 bytes, lines 677-723
677  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
678  // ============================================================
679
680  function transitionEnd() {
681    var el = document.createElement('bootstrap')
682
683    var transEndEventNames = {
684      WebkitTransition : 'webkitTransitionEnd',
685      MozTransition    : 'transitionend',
686      OTransition      : 'oTransitionEnd otransitionend',
687      transition       : 'transitionend'
688    }
689
690    for (var name in transEndEventNames) {
691      if (el.style[name] !== undefined) {
692        return { end: transEndEventNames[name] }
693      }
694    }
695
696    return false // explicit for ie8 (  ._.)
697  }
698
699  // http://blog.alexmaccaw.com/css-transitions
700  $.fn.emulateTransitionEnd = function (duration) {
701    var called = false
702    var $el = this
703    $(this).one('bsTransitionEnd', function () { called = true })
704    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
705    setTimeout(callback, duration)
706    return this
707  }
708
709  $(function () {
710    $.support.transition = transitionEnd()
711
712    if (!$.support.transition) return
713
714    $.event.special.bsTransitionEnd = {
715      bindType: $.support.transition.end,
716      delegateType: $.support.transition.end,
717      handle: function (e) {
718        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
719      }
720    }
721  })
722
723}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.