PageSourceSearch

https://www.purolite.com/fallback/.resources/purolite-webapp/resou…rap-modals~2026-08-04-18-22-54-000~cache.js

js purolite.com collected 2026-10-02 16:16:05 UTC 11,119 bytes, 358 lines download raw bytes

vendor: 5,233 bytes, lines 1-172
1/*!
2 * Bootstrap v3.3.5 (http://getbootstrap.com)
3 * Copyright 2011-2016 Twitter, Inc.
4 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 */
6
7/*!
8 * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=4482c9be89cea2c43a31c83a88faf13a)
9 * Config saved to config.json and https://gist.github.com/4482c9be89cea2c43a31c83a88faf13a
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] > 2)) {
18    throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
19  }
20}(jQuery);
21
22/* ========================================================================
23 * Bootstrap: modal.js v3.3.6
24 * http://getbootstrap.com/javascript/#modals
25 * ========================================================================
26 * Copyright 2011-2015 Twitter, Inc.
27 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
28 * ======================================================================== */
29
30
31+function ($) {
32  'use strict';
33
34  // MODAL CLASS DEFINITION
35  // ======================
36
37  var Modal = function (element, options) {
38    this.options             = options
39    this.$body               = $(document.body)
40    this.$element            = $(element)
41    this.$dialog             = this.$element.find('.modal-dialog')
42    this.$backdrop           = null
43    this.isShown             = null
44    this.originalBodyPad     = null
45    this.scrollbarWidth      = 0
46    this.ignoreBackdropClick = false
47
48    if (this.options.remote) {
49      this.$element
50        .find('.modal-content')
51        .load(this.options.remote, $.proxy(function () {
52          this.$element.trigger('loaded.bs.modal')
53        }, this))
54    }
55  }
56
57  Modal.VERSION  = '3.3.6'
58
59  Modal.TRANSITION_DURATION = 300
60  Modal.BACKDROP_TRANSITION_DURATION = 150
61
62  Modal.DEFAULTS = {
63    backdrop: true,
64    keyboard: true,
65    show: true
66  }
67
68  Modal.prototype.toggle = function (_relatedTarget) {
69    return this.isShown ? this.hide() : this.show(_relatedTarget)
70  }
71
72  Modal.prototype.show = function (_relatedTarget) {
73    var that = this
74    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
75
76    this.$element.trigger(e)
77
78    if (this.isShown || e.isDefaultPrevented()) return
79
80    this.isShown = true
81
82    this.checkScrollbar()
83    this.setScrollbar()
84    this.$body.addClass('modal-open')
85
86    this.escape()
87    this.resize()
88
89    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
90
91    this.$dialog.on('mousedown.dismiss.bs.modal', function () {
92      that.$element.one('mouseup.dismiss.bs.modal', function (e) {
93        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
94      })
95    })
96
97    this.backdrop(function () {
98      var transition = $.support.transition && that.$element.hasClass('fade')
99
100      if (!that.$element.parent().length) {
101        that.$element.appendTo(that.$body) // don't move modals dom position
102      }
103
104      that.$element
105        .show()
106        .scrollTop(0)
107
108      that.adjustDialog()
109
110      if (transition) {
111        that.$element[0].offsetWidth // force reflow
112      }
113
114      that.$element.addClass('in')
115
116      that.enforceFocus()
117
118      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
119
120      transition ?
121        that.$dialog // wait for modal to slide in
122          .one('bsTransitionEnd', function () {
123            that.$element.trigger('focus').trigger(e)
124          })
125          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
126        that.$element.trigger('focus').trigger(e)
127    })
128  }
129
130  Modal.prototype.hide = function (e) {
131    if (e) e.preventDefault()
132
133    e = $.Event('hide.bs.modal')
134
135    this.$element.trigger(e)
136
137    if (!this.isShown || e.isDefaultPrevented()) return
138
139    this.isShown = false
140
141    this.escape()
142    this.resize()
143
144    $(document).off('focusin.bs.modal')
145
146    this.$element
147      .removeClass('in')
148      .off('click.dismiss.bs.modal')
149      .off('mouseup.dismiss.bs.modal')
150
151    this.$dialog.off('mousedown.dismiss.bs.modal')
152
153    $.support.transition && this.$element.hasClass('fade') ?
154      this.$element
155        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
156        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
157      this.hideModal()
158  }
159
160  Modal.prototype.enforceFocus = function () {
161    $(document)
162      .off('focusin.bs.modal') // guard against infinite focus loop
163      .on('focusin.bs.modal', $.proxy(function (e) {
164        if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
165          this.$element.trigger('focus')
166        }
167      }, this))
168  }
169
170  Modal.prototype.escape = function () {
171    if (this.isShown && this.options.keyboard) {
172      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
vendor: 5,886 bytes, lines 173-358
173        e.which == 27 && this.hide()
174      }, this))
175    } else if (!this.isShown) {
176      this.$element.off('keydown.dismiss.bs.modal')
177    }
178  }
179
180  Modal.prototype.resize = function () {
181    if (this.isShown) {
182      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
183    } else {
184      $(window).off('resize.bs.modal')
185    }
186  }
187
188  Modal.prototype.hideModal = function () {
189    var that = this
190    this.$element.hide()
191    this.backdrop(function () {
192      that.$body.removeClass('modal-open')
193      that.resetAdjustments()
194      that.resetScrollbar()
195      that.$element.trigger('hidden.bs.modal')
196    })
197  }
198
199  Modal.prototype.removeBackdrop = function () {
200    this.$backdrop && this.$backdrop.remove()
201    this.$backdrop = null
202  }
203
204  Modal.prototype.backdrop = function (callback) {
205    var that = this
206    var animate = this.$element.hasClass('fade') ? 'fade' : ''
207
208    if (this.isShown && this.options.backdrop) {
209      var doAnimate = $.support.transition && animate
210
211      this.$backdrop = $(document.createElement('div'))
212        .addClass('modal-backdrop ' + animate)
213        .appendTo(this.$body)
214
215      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
216        if (this.ignoreBackdropClick) {
217          this.ignoreBackdropClick = false
218          return
219        }
220        if (e.target !== e.currentTarget) return
221        this.options.backdrop == 'static'
222          ? this.$element[0].focus()
223          : this.hide()
224      }, this))
225
226      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
227
228      this.$backdrop.addClass('in')
229
230      if (!callback) return
231
232      doAnimate ?
233        this.$backdrop
234          .one('bsTransitionEnd', callback)
235          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
236        callback()
237
238    } else if (!this.isShown && this.$backdrop) {
239      this.$backdrop.removeClass('in')
240
241      var callbackRemove = function () {
242        that.removeBackdrop()
243        callback && callback()
244      }
245      $.support.transition && this.$element.hasClass('fade') ?
246        this.$backdrop
247          .one('bsTransitionEnd', callbackRemove)
248          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
249        callbackRemove()
250
251    } else if (callback) {
252      callback()
253    }
254  }
255
256  // these following methods are used to handle overflowing modals
257
258  Modal.prototype.handleUpdate = function () {
259    this.adjustDialog()
260  }
261
262  Modal.prototype.adjustDialog = function () {
263    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
264
265    this.$element.css({
266      paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
267      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
268    })
269  }
270
271  Modal.prototype.resetAdjustments = function () {
272    this.$element.css({
273      paddingLeft: '',
274      paddingRight: ''
275    })
276  }
277
278  Modal.prototype.checkScrollbar = function () {
279    var fullWindowWidth = window.innerWidth
280    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
281      var documentElementRect = document.documentElement.getBoundingClientRect()
282      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
283    }
284    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
285    this.scrollbarWidth = this.measureScrollbar()
286  }
287
288  Modal.prototype.setScrollbar = function () {
289    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
290    this.originalBodyPad = document.body.style.paddingRight || ''
291    if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
292  }
293
294  Modal.prototype.resetScrollbar = function () {
295    this.$body.css('padding-right', this.originalBodyPad)
296  }
297
298  Modal.prototype.measureScrollbar = function () { // thx walsh
299    var scrollDiv = document.createElement('div')
300    scrollDiv.className = 'modal-scrollbar-measure'
301    this.$body.append(scrollDiv)
302    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
303    this.$body[0].removeChild(scrollDiv)
304    return scrollbarWidth
305  }
306
307
308  // MODAL PLUGIN DEFINITION
309  // =======================
310
311  function Plugin(option, _relatedTarget) {
312    return this.each(function () {
313      var $this   = $(this)
314      var data    = $this.data('bs.modal')
315      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
316
317      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
318      if (typeof option == 'string') data[option](_relatedTarget)
319      else if (options.show) data.show(_relatedTarget)
320    })
321  }
322
323  var old = $.fn.modal
324
325  $.fn.modal             = Plugin
326  $.fn.modal.Constructor = Modal
327
328
329  // MODAL NO CONFLICT
330  // =================
331
332  $.fn.modal.noConflict = function () {
333    $.fn.modal = old
334    return this
335  }
336
337
338  // MODAL DATA-API
339  // ==============
340
341  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
342    var $this   = $(this)
343    var href    = $this.attr('href')
344    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
345    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
346
347    if ($this.is('a')) e.preventDefault()
348
349    $target.one('show.bs.modal', function (showEvent) {
350      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
351      $target.one('hidden.bs.modal', function () {
352        $this.is(':visible') && $this.trigger('focus')
353      })
354    })
355    Plugin.call($target, option, this)
356  })
357
358}(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.