summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/control40
-rw-r--r--debian/local/apache2/netdata.conf12
-rw-r--r--debian/missing-sources/bootstrap-3.3.7.js2377
-rw-r--r--debian/missing-sources/bootstrap-slider-10.0.0.js1874
-rw-r--r--debian/missing-sources/bootstrap-table-1.11.0.js3019
-rw-r--r--debian/missing-sources/bootstrap-table-export-1.11.0.js121
-rw-r--r--debian/missing-sources/bootstrap-theme-3.3.7.css587
-rw-r--r--debian/missing-sources/bootstrap-toggle-2.2.2.css83
-rw-r--r--debian/missing-sources/bootstrap-toggle-2.2.2.js180
-rw-r--r--debian/missing-sources/c3-0.4.18.css174
-rw-r--r--debian/missing-sources/c3-0.4.18.js9236
-rw-r--r--debian/missing-sources/clipboard-polyfill-be05dad.ts270
-rw-r--r--debian/missing-sources/d3-4.12.2.js17160
-rw-r--r--debian/missing-sources/dygraph-c91c859.js3482
-rw-r--r--debian/missing-sources/dygraph-smooth-plotter-c91c859.js140
-rw-r--r--debian/missing-sources/fontawesome-all-5.0.1.js3040
-rw-r--r--debian/missing-sources/gauge-1.3.2.coffee615
l---------debian/missing-sources/gauge-1.3.2.js1
-rw-r--r--debian/missing-sources/jquery-2.2.4.js9814
-rw-r--r--debian/missing-sources/jquery.easypiechart-97b5824.js364
-rw-r--r--debian/missing-sources/jquery.peity-3.2.0.js383
-rw-r--r--debian/missing-sources/jquery.sparkline-2.1.2.js3054
-rw-r--r--debian/missing-sources/lz-string-1.4.4.js501
-rw-r--r--debian/missing-sources/morris-0.5.1.css2
-rw-r--r--debian/missing-sources/morris-0.5.1.js1892
-rw-r--r--debian/missing-sources/pako-1.0.6.js6809
-rw-r--r--debian/missing-sources/perfect-scrollbar-0.6.15.js1552
-rw-r--r--debian/missing-sources/raphael-2.2.4.js8190
-rw-r--r--debian/missing-sources/tableExport-1.6.0.js1736
-rw-r--r--debian/netdata-apache2.apache21
-rw-r--r--debian/netdata-apache2.lintian-overrides2
-rwxr-xr-xdebian/netdata-apache2.postinst31
-rw-r--r--debian/netdata-web.README.Debian20
-rw-r--r--debian/netdata-web.install1
-rw-r--r--debian/netdata-web.links14
-rw-r--r--debian/netdata-web.lintian-overrides2
-rwxr-xr-xdebian/rules2
37 files changed, 1 insertions, 76780 deletions
diff --git a/debian/control b/debian/control
index cf7c35ca..4741684d 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,6 @@ Uploaders:
Build-Depends:
cmake,
debhelper-compat (= 13),
- dh-apache2,
libcap-dev,
libcups2-dev,
libelf-dev,
@@ -41,7 +40,6 @@ Architecture: all
Depends:
netdata-core,
netdata-plugins-bash,
- netdata-web,
${misc:Depends},
Recommends:
netdata-plugins-python,
@@ -56,27 +54,6 @@ Description: real-time performance monitoring (metapackage)
.
This package is a metapackage depending on the typical netdata components.
-Package: netdata-apache2
-Section: net
-Architecture: all
-Depends:
- apache2,
- netdata-core (>= ${source:Version}),
- netdata-web (>= ${source:Version}),
- ${misc:Depends},
-Enhances:
- netdata-core,
-Description: real-time performance monitoring (apache integration)
- Netdata is distributed, real-time, performance and health monitoring for
- systems and applications. It provides insights of everything happening on the
- systems it runs using interactive web dashboards.
- .
- Netdata includes its own embedded webserver, by default listening on localhost
- only. To make netdata available to other users, a dedicated webserver such as
- apache should be used (with authentication and encryption).
- .
- This package contains the integration for the apache HTTP server.
-
Package: netdata-core
Section: net
Architecture: linux-any
@@ -167,20 +144,3 @@ Description: real-time performance monitoring (python plugins)
systems it runs using interactive web dashboards.
.
This package contains the plugins using python.
-
-Package: netdata-web
-Section: net
-Architecture: all
-Depends:
- fonts-font-awesome,
- libjs-bootstrap,
- netdata-core (>= ${source:Version}),
- ${misc:Depends},
-Enhances:
- netdata-core,
-Description: real-time performance monitoring (web)
- Netdata is distributed, real-time, performance and health monitoring for
- systems and applications. It provides insights of everything happening on the
- systems it runs using interactive web dashboards.
- .
- This package contains the web frontend.
diff --git a/debian/local/apache2/netdata.conf b/debian/local/apache2/netdata.conf
deleted file mode 100644
index 10d65668..00000000
--- a/debian/local/apache2/netdata.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-<IfModule mod_proxy.c>
- ProxyRequests Off
- ProxyPreserveHost On
-
- ProxyPass /netdata http://127.0.0.1:19999 connectiontimeout=5 timeout=30 keepalive=on
- ProxyPassReverse /netdata http://127.0.0.1:19999
-</IfModule>
-
-<IfModule mod_rewrite.c>
- RewriteEngine On
- RewriteRule ^/netdata$ /netdata/ [L,R=301]
-</IfModule>
diff --git a/debian/missing-sources/bootstrap-3.3.7.js b/debian/missing-sources/bootstrap-3.3.7.js
deleted file mode 100644
index 8a2e99a5..00000000
--- a/debian/missing-sources/bootstrap-3.3.7.js
+++ /dev/null
@@ -1,2377 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under the MIT license
- */
-
-if (typeof jQuery === 'undefined') {
- throw new Error('Bootstrap\'s JavaScript requires jQuery')
-}
-
-+function ($) {
- 'use strict';
- var version = $.fn.jquery.split(' ')[0].split('.')
- if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
- throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
- }
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: transition.js v3.3.7
- * http://getbootstrap.com/javascript/#transitions
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
- // ============================================================
-
- function transitionEnd() {
- var el = document.createElement('bootstrap')
-
- var transEndEventNames = {
- WebkitTransition : 'webkitTransitionEnd',
- MozTransition : 'transitionend',
- OTransition : 'oTransitionEnd otransitionend',
- transition : 'transitionend'
- }
-
- for (var name in transEndEventNames) {
- if (el.style[name] !== undefined) {
- return { end: transEndEventNames[name] }
- }
- }
-
- return false // explicit for ie8 ( ._.)
- }
-
- // http://blog.alexmaccaw.com/css-transitions
- $.fn.emulateTransitionEnd = function (duration) {
- var called = false
- var $el = this
- $(this).one('bsTransitionEnd', function () { called = true })
- var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
- setTimeout(callback, duration)
- return this
- }
-
- $(function () {
- $.support.transition = transitionEnd()
-
- if (!$.support.transition) return
-
- $.event.special.bsTransitionEnd = {
- bindType: $.support.transition.end,
- delegateType: $.support.transition.end,
- handle: function (e) {
- if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
- }
- }
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: alert.js v3.3.7
- * http://getbootstrap.com/javascript/#alerts
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // ALERT CLASS DEFINITION
- // ======================
-
- var dismiss = '[data-dismiss="alert"]'
- var Alert = function (el) {
- $(el).on('click', dismiss, this.close)
- }
-
- Alert.VERSION = '3.3.7'
-
- Alert.TRANSITION_DURATION = 150
-
- Alert.prototype.close = function (e) {
- var $this = $(this)
- var selector = $this.attr('data-target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- var $parent = $(selector === '#' ? [] : selector)
-
- if (e) e.preventDefault()
-
- if (!$parent.length) {
- $parent = $this.closest('.alert')
- }
-
- $parent.trigger(e = $.Event('close.bs.alert'))
-
- if (e.isDefaultPrevented()) return
-
- $parent.removeClass('in')
-
- function removeElement() {
- // detach from parent, fire event then clean up data
- $parent.detach().trigger('closed.bs.alert').remove()
- }
-
- $.support.transition && $parent.hasClass('fade') ?
- $parent
- .one('bsTransitionEnd', removeElement)
- .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
- removeElement()
- }
-
-
- // ALERT PLUGIN DEFINITION
- // =======================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.alert')
-
- if (!data) $this.data('bs.alert', (data = new Alert(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- var old = $.fn.alert
-
- $.fn.alert = Plugin
- $.fn.alert.Constructor = Alert
-
-
- // ALERT NO CONFLICT
- // =================
-
- $.fn.alert.noConflict = function () {
- $.fn.alert = old
- return this
- }
-
-
- // ALERT DATA-API
- // ==============
-
- $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: button.js v3.3.7
- * http://getbootstrap.com/javascript/#buttons
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // BUTTON PUBLIC CLASS DEFINITION
- // ==============================
-
- var Button = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, Button.DEFAULTS, options)
- this.isLoading = false
- }
-
- Button.VERSION = '3.3.7'
-
- Button.DEFAULTS = {
- loadingText: 'loading...'
- }
-
- Button.prototype.setState = function (state) {
- var d = 'disabled'
- var $el = this.$element
- var val = $el.is('input') ? 'val' : 'html'
- var data = $el.data()
-
- state += 'Text'
-
- if (data.resetText == null) $el.data('resetText', $el[val]())
-
- // push to event loop to allow forms to submit
- setTimeout($.proxy(function () {
- $el[val](data[state] == null ? this.options[state] : data[state])
-
- if (state == 'loadingText') {
- this.isLoading = true
- $el.addClass(d).attr(d, d).prop(d, true)
- } else if (this.isLoading) {
- this.isLoading = false
- $el.removeClass(d).removeAttr(d).prop(d, false)
- }
- }, this), 0)
- }
-
- Button.prototype.toggle = function () {
- var changed = true
- var $parent = this.$element.closest('[data-toggle="buttons"]')
-
- if ($parent.length) {
- var $input = this.$element.find('input')
- if ($input.prop('type') == 'radio') {
- if ($input.prop('checked')) changed = false
- $parent.find('.active').removeClass('active')
- this.$element.addClass('active')
- } else if ($input.prop('type') == 'checkbox') {
- if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
- this.$element.toggleClass('active')
- }
- $input.prop('checked', this.$element.hasClass('active'))
- if (changed) $input.trigger('change')
- } else {
- this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
- this.$element.toggleClass('active')
- }
- }
-
-
- // BUTTON PLUGIN DEFINITION
- // ========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.button')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.button', (data = new Button(this, options)))
-
- if (option == 'toggle') data.toggle()
- else if (option) data.setState(option)
- })
- }
-
- var old = $.fn.button
-
- $.fn.button = Plugin
- $.fn.button.Constructor = Button
-
-
- // BUTTON NO CONFLICT
- // ==================
-
- $.fn.button.noConflict = function () {
- $.fn.button = old
- return this
- }
-
-
- // BUTTON DATA-API
- // ===============
-
- $(document)
- .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
- var $btn = $(e.target).closest('.btn')
- Plugin.call($btn, 'toggle')
- if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
- // Prevent double click on radios, and the double selections (so cancellation) on checkboxes
- e.preventDefault()
- // The target component still receive the focus
- if ($btn.is('input,button')) $btn.trigger('focus')
- else $btn.find('input:visible,button:visible').first().trigger('focus')
- }
- })
- .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
- $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: carousel.js v3.3.7
- * http://getbootstrap.com/javascript/#carousel
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // CAROUSEL CLASS DEFINITION
- // =========================
-
- var Carousel = function (element, options) {
- this.$element = $(element)
- this.$indicators = this.$element.find('.carousel-indicators')
- this.options = options
- this.paused = null
- this.sliding = null
- this.interval = null
- this.$active = null
- this.$items = null
-
- this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
-
- this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
- .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
- .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
- }
-
- Carousel.VERSION = '3.3.7'
-
- Carousel.TRANSITION_DURATION = 600
-
- Carousel.DEFAULTS = {
- interval: 5000,
- pause: 'hover',
- wrap: true,
- keyboard: true
- }
-
- Carousel.prototype.keydown = function (e) {
- if (/input|textarea/i.test(e.target.tagName)) return
- switch (e.which) {
- case 37: this.prev(); break
- case 39: this.next(); break
- default: return
- }
-
- e.preventDefault()
- }
-
- Carousel.prototype.cycle = function (e) {
- e || (this.paused = false)
-
- this.interval && clearInterval(this.interval)
-
- this.options.interval
- && !this.paused
- && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
-
- return this
- }
-
- Carousel.prototype.getItemIndex = function (item) {
- this.$items = item.parent().children('.item')
- return this.$items.index(item || this.$active)
- }
-
- Carousel.prototype.getItemForDirection = function (direction, active) {
- var activeIndex = this.getItemIndex(active)
- var willWrap = (direction == 'prev' && activeIndex === 0)
- || (direction == 'next' && activeIndex == (this.$items.length - 1))
- if (willWrap && !this.options.wrap) return active
- var delta = direction == 'prev' ? -1 : 1
- var itemIndex = (activeIndex + delta) % this.$items.length
- return this.$items.eq(itemIndex)
- }
-
- Carousel.prototype.to = function (pos) {
- var that = this
- var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
-
- if (pos > (this.$items.length - 1) || pos < 0) return
-
- if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
- if (activeIndex == pos) return this.pause().cycle()
-
- return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
- }
-
- Carousel.prototype.pause = function (e) {
- e || (this.paused = true)
-
- if (this.$element.find('.next, .prev').length && $.support.transition) {
- this.$element.trigger($.support.transition.end)
- this.cycle(true)
- }
-
- this.interval = clearInterval(this.interval)
-
- return this
- }
-
- Carousel.prototype.next = function () {
- if (this.sliding) return
- return this.slide('next')
- }
-
- Carousel.prototype.prev = function () {
- if (this.sliding) return
- return this.slide('prev')
- }
-
- Carousel.prototype.slide = function (type, next) {
- var $active = this.$element.find('.item.active')
- var $next = next || this.getItemForDirection(type, $active)
- var isCycling = this.interval
- var direction = type == 'next' ? 'left' : 'right'
- var that = this
-
- if ($next.hasClass('active')) return (this.sliding = false)
-
- var relatedTarget = $next[0]
- var slideEvent = $.Event('slide.bs.carousel', {
- relatedTarget: relatedTarget,
- direction: direction
- })
- this.$element.trigger(slideEvent)
- if (slideEvent.isDefaultPrevented()) return
-
- this.sliding = true
-
- isCycling && this.pause()
-
- if (this.$indicators.length) {
- this.$indicators.find('.active').removeClass('active')
- var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
- $nextIndicator && $nextIndicator.addClass('active')
- }
-
- var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
- if ($.support.transition && this.$element.hasClass('slide')) {
- $next.addClass(type)
- $next[0].offsetWidth // force reflow
- $active.addClass(direction)
- $next.addClass(direction)
- $active
- .one('bsTransitionEnd', function () {
- $next.removeClass([type, direction].join(' ')).addClass('active')
- $active.removeClass(['active', direction].join(' '))
- that.sliding = false
- setTimeout(function () {
- that.$element.trigger(slidEvent)
- }, 0)
- })
- .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
- } else {
- $active.removeClass('active')
- $next.addClass('active')
- this.sliding = false
- this.$element.trigger(slidEvent)
- }
-
- isCycling && this.cycle()
-
- return this
- }
-
-
- // CAROUSEL PLUGIN DEFINITION
- // ==========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.carousel')
- var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
- var action = typeof option == 'string' ? option : options.slide
-
- if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
- if (typeof option == 'number') data.to(option)
- else if (action) data[action]()
- else if (options.interval) data.pause().cycle()
- })
- }
-
- var old = $.fn.carousel
-
- $.fn.carousel = Plugin
- $.fn.carousel.Constructor = Carousel
-
-
- // CAROUSEL NO CONFLICT
- // ====================
-
- $.fn.carousel.noConflict = function () {
- $.fn.carousel = old
- return this
- }
-
-
- // CAROUSEL DATA-API
- // =================
-
- var clickHandler = function (e) {
- var href
- var $this = $(this)
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
- if (!$target.hasClass('carousel')) return
- var options = $.extend({}, $target.data(), $this.data())
- var slideIndex = $this.attr('data-slide-to')
- if (slideIndex) options.interval = false
-
- Plugin.call($target, options)
-
- if (slideIndex) {
- $target.data('bs.carousel').to(slideIndex)
- }
-
- e.preventDefault()
- }
-
- $(document)
- .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
- .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
-
- $(window).on('load', function () {
- $('[data-ride="carousel"]').each(function () {
- var $carousel = $(this)
- Plugin.call($carousel, $carousel.data())
- })
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: collapse.js v3.3.7
- * http://getbootstrap.com/javascript/#collapse
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-/* jshint latedef: false */
-
-+function ($) {
- 'use strict';
-
- // COLLAPSE PUBLIC CLASS DEFINITION
- // ================================
-
- var Collapse = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, Collapse.DEFAULTS, options)
- this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
- '[data-toggle="collapse"][data-target="#' + element.id + '"]')
- this.transitioning = null
-
- if (this.options.parent) {
- this.$parent = this.getParent()
- } else {
- this.addAriaAndCollapsedClass(this.$element, this.$trigger)
- }
-
- if (this.options.toggle) this.toggle()
- }
-
- Collapse.VERSION = '3.3.7'
-
- Collapse.TRANSITION_DURATION = 350
-
- Collapse.DEFAULTS = {
- toggle: true
- }
-
- Collapse.prototype.dimension = function () {
- var hasWidth = this.$element.hasClass('width')
- return hasWidth ? 'width' : 'height'
- }
-
- Collapse.prototype.show = function () {
- if (this.transitioning || this.$element.hasClass('in')) return
-
- var activesData
- var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
-
- if (actives && actives.length) {
- activesData = actives.data('bs.collapse')
- if (activesData && activesData.transitioning) return
- }
-
- var startEvent = $.Event('show.bs.collapse')
- this.$element.trigger(startEvent)
- if (startEvent.isDefaultPrevented()) return
-
- if (actives && actives.length) {
- Plugin.call(actives, 'hide')
- activesData || actives.data('bs.collapse', null)
- }
-
- var dimension = this.dimension()
-
- this.$element
- .removeClass('collapse')
- .addClass('collapsing')[dimension](0)
- .attr('aria-expanded', true)
-
- this.$trigger
- .removeClass('collapsed')
- .attr('aria-expanded', true)
-
- this.transitioning = 1
-
- var complete = function () {
- this.$element
- .removeClass('collapsing')
- .addClass('collapse in')[dimension]('')
- this.transitioning = 0
- this.$element
- .trigger('shown.bs.collapse')
- }
-
- if (!$.support.transition) return complete.call(this)
-
- var scrollSize = $.camelCase(['scroll', dimension].join('-'))
-
- this.$element
- .one('bsTransitionEnd', $.proxy(complete, this))
- .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
- }
-
- Collapse.prototype.hide = function () {
- if (this.transitioning || !this.$element.hasClass('in')) return
-
- var startEvent = $.Event('hide.bs.collapse')
- this.$element.trigger(startEvent)
- if (startEvent.isDefaultPrevented()) return
-
- var dimension = this.dimension()
-
- this.$element[dimension](this.$element[dimension]())[0].offsetHeight
-
- this.$element
- .addClass('collapsing')
- .removeClass('collapse in')
- .attr('aria-expanded', false)
-
- this.$trigger
- .addClass('collapsed')
- .attr('aria-expanded', false)
-
- this.transitioning = 1
-
- var complete = function () {
- this.transitioning = 0
- this.$element
- .removeClass('collapsing')
- .addClass('collapse')
- .trigger('hidden.bs.collapse')
- }
-
- if (!$.support.transition) return complete.call(this)
-
- this.$element
- [dimension](0)
- .one('bsTransitionEnd', $.proxy(complete, this))
- .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
- }
-
- Collapse.prototype.toggle = function () {
- this[this.$element.hasClass('in') ? 'hide' : 'show']()
- }
-
- Collapse.prototype.getParent = function () {
- return $(this.options.parent)
- .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
- .each($.proxy(function (i, element) {
- var $element = $(element)
- this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
- }, this))
- .end()
- }
-
- Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
- var isOpen = $element.hasClass('in')
-
- $element.attr('aria-expanded', isOpen)
- $trigger
- .toggleClass('collapsed', !isOpen)
- .attr('aria-expanded', isOpen)
- }
-
- function getTargetFromTrigger($trigger) {
- var href
- var target = $trigger.attr('data-target')
- || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
-
- return $(target)
- }
-
-
- // COLLAPSE PLUGIN DEFINITION
- // ==========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.collapse')
- var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
-
- if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
- if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.collapse
-
- $.fn.collapse = Plugin
- $.fn.collapse.Constructor = Collapse
-
-
- // COLLAPSE NO CONFLICT
- // ====================
-
- $.fn.collapse.noConflict = function () {
- $.fn.collapse = old
- return this
- }
-
-
- // COLLAPSE DATA-API
- // =================
-
- $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
- var $this = $(this)
-
- if (!$this.attr('data-target')) e.preventDefault()
-
- var $target = getTargetFromTrigger($this)
- var data = $target.data('bs.collapse')
- var option = data ? 'toggle' : $this.data()
-
- Plugin.call($target, option)
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: dropdown.js v3.3.7
- * http://getbootstrap.com/javascript/#dropdowns
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // DROPDOWN CLASS DEFINITION
- // =========================
-
- var backdrop = '.dropdown-backdrop'
- var toggle = '[data-toggle="dropdown"]'
- var Dropdown = function (element) {
- $(element).on('click.bs.dropdown', this.toggle)
- }
-
- Dropdown.VERSION = '3.3.7'
-
- function getParent($this) {
- var selector = $this.attr('data-target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- var $parent = selector && $(selector)
-
- return $parent && $parent.length ? $parent : $this.parent()
- }
-
- function clearMenus(e) {
- if (e && e.which === 3) return
- $(backdrop).remove()
- $(toggle).each(function () {
- var $this = $(this)
- var $parent = getParent($this)
- var relatedTarget = { relatedTarget: this }
-
- if (!$parent.hasClass('open')) return
-
- if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
-
- $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
-
- if (e.isDefaultPrevented()) return
-
- $this.attr('aria-expanded', 'false')
- $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
- })
- }
-
- Dropdown.prototype.toggle = function (e) {
- var $this = $(this)
-
- if ($this.is('.disabled, :disabled')) return
-
- var $parent = getParent($this)
- var isActive = $parent.hasClass('open')
-
- clearMenus()
-
- if (!isActive) {
- if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
- // if mobile we use a backdrop because click events don't delegate
- $(document.createElement('div'))
- .addClass('dropdown-backdrop')
- .insertAfter($(this))
- .on('click', clearMenus)
- }
-
- var relatedTarget = { relatedTarget: this }
- $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
-
- if (e.isDefaultPrevented()) return
-
- $this
- .trigger('focus')
- .attr('aria-expanded', 'true')
-
- $parent
- .toggleClass('open')
- .trigger($.Event('shown.bs.dropdown', relatedTarget))
- }
-
- return false
- }
-
- Dropdown.prototype.keydown = function (e) {
- if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
-
- var $this = $(this)
-
- e.preventDefault()
- e.stopPropagation()
-
- if ($this.is('.disabled, :disabled')) return
-
- var $parent = getParent($this)
- var isActive = $parent.hasClass('open')
-
- if (!isActive && e.which != 27 || isActive && e.which == 27) {
- if (e.which == 27) $parent.find(toggle).trigger('focus')
- return $this.trigger('click')
- }
-
- var desc = ' li:not(.disabled):visible a'
- var $items = $parent.find('.dropdown-menu' + desc)
-
- if (!$items.length) return
-
- var index = $items.index(e.target)
-
- if (e.which == 38 && index > 0) index-- // up
- if (e.which == 40 && index < $items.length - 1) index++ // down
- if (!~index) index = 0
-
- $items.eq(index).trigger('focus')
- }
-
-
- // DROPDOWN PLUGIN DEFINITION
- // ==========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.dropdown')
-
- if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- var old = $.fn.dropdown
-
- $.fn.dropdown = Plugin
- $.fn.dropdown.Constructor = Dropdown
-
-
- // DROPDOWN NO CONFLICT
- // ====================
-
- $.fn.dropdown.noConflict = function () {
- $.fn.dropdown = old
- return this
- }
-
-
- // APPLY TO STANDARD DROPDOWN ELEMENTS
- // ===================================
-
- $(document)
- .on('click.bs.dropdown.data-api', clearMenus)
- .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
- .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
- .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
- .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: modal.js v3.3.7
- * http://getbootstrap.com/javascript/#modals
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // MODAL CLASS DEFINITION
- // ======================
-
- var Modal = function (element, options) {
- this.options = options
- this.$body = $(document.body)
- this.$element = $(element)
- this.$dialog = this.$element.find('.modal-dialog')
- this.$backdrop = null
- this.isShown = null
- this.originalBodyPad = null
- this.scrollbarWidth = 0
- this.ignoreBackdropClick = false
-
- if (this.options.remote) {
- this.$element
- .find('.modal-content')
- .load(this.options.remote, $.proxy(function () {
- this.$element.trigger('loaded.bs.modal')
- }, this))
- }
- }
-
- Modal.VERSION = '3.3.7'
-
- Modal.TRANSITION_DURATION = 300
- Modal.BACKDROP_TRANSITION_DURATION = 150
-
- Modal.DEFAULTS = {
- backdrop: true,
- keyboard: true,
- show: true
- }
-
- Modal.prototype.toggle = function (_relatedTarget) {
- return this.isShown ? this.hide() : this.show(_relatedTarget)
- }
-
- Modal.prototype.show = function (_relatedTarget) {
- var that = this
- var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
-
- this.$element.trigger(e)
-
- if (this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = true
-
- this.checkScrollbar()
- this.setScrollbar()
- this.$body.addClass('modal-open')
-
- this.escape()
- this.resize()
-
- this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
-
- this.$dialog.on('mousedown.dismiss.bs.modal', function () {
- that.$element.one('mouseup.dismiss.bs.modal', function (e) {
- if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
- })
- })
-
- this.backdrop(function () {
- var transition = $.support.transition && that.$element.hasClass('fade')
-
- if (!that.$element.parent().length) {
- that.$element.appendTo(that.$body) // don't move modals dom position
- }
-
- that.$element
- .show()
- .scrollTop(0)
-
- that.adjustDialog()
-
- if (transition) {
- that.$element[0].offsetWidth // force reflow
- }
-
- that.$element.addClass('in')
-
- that.enforceFocus()
-
- var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
-
- transition ?
- that.$dialog // wait for modal to slide in
- .one('bsTransitionEnd', function () {
- that.$element.trigger('focus').trigger(e)
- })
- .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
- that.$element.trigger('focus').trigger(e)
- })
- }
-
- Modal.prototype.hide = function (e) {
- if (e) e.preventDefault()
-
- e = $.Event('hide.bs.modal')
-
- this.$element.trigger(e)
-
- if (!this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = false
-
- this.escape()
- this.resize()
-
- $(document).off('focusin.bs.modal')
-
- this.$element
- .removeClass('in')
- .off('click.dismiss.bs.modal')
- .off('mouseup.dismiss.bs.modal')
-
- this.$dialog.off('mousedown.dismiss.bs.modal')
-
- $.support.transition && this.$element.hasClass('fade') ?
- this.$element
- .one('bsTransitionEnd', $.proxy(this.hideModal, this))
- .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
- this.hideModal()
- }
-
- Modal.prototype.enforceFocus = function () {
- $(document)
- .off('focusin.bs.modal') // guard against infinite focus loop
- .on('focusin.bs.modal', $.proxy(function (e) {
- if (document !== e.target &&
- this.$element[0] !== e.target &&
- !this.$element.has(e.target).length) {
- this.$element.trigger('focus')
- }
- }, this))
- }
-
- Modal.prototype.escape = function () {
- if (this.isShown && this.options.keyboard) {
- this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
- e.which == 27 && this.hide()
- }, this))
- } else if (!this.isShown) {
- this.$element.off('keydown.dismiss.bs.modal')
- }
- }
-
- Modal.prototype.resize = function () {
- if (this.isShown) {
- $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
- } else {
- $(window).off('resize.bs.modal')
- }
- }
-
- Modal.prototype.hideModal = function () {
- var that = this
- this.$element.hide()
- this.backdrop(function () {
- that.$body.removeClass('modal-open')
- that.resetAdjustments()
- that.resetScrollbar()
- that.$element.trigger('hidden.bs.modal')
- })
- }
-
- Modal.prototype.removeBackdrop = function () {
- this.$backdrop && this.$backdrop.remove()
- this.$backdrop = null
- }
-
- Modal.prototype.backdrop = function (callback) {
- var that = this
- var animate = this.$element.hasClass('fade') ? 'fade' : ''
-
- if (this.isShown && this.options.backdrop) {
- var doAnimate = $.support.transition && animate
-
- this.$backdrop = $(document.createElement('div'))
- .addClass('modal-backdrop ' + animate)
- .appendTo(this.$body)
-
- this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
- if (this.ignoreBackdropClick) {
- this.ignoreBackdropClick = false
- return
- }
- if (e.target !== e.currentTarget) return
- this.options.backdrop == 'static'
- ? this.$element[0].focus()
- : this.hide()
- }, this))
-
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
-
- this.$backdrop.addClass('in')
-
- if (!callback) return
-
- doAnimate ?
- this.$backdrop
- .one('bsTransitionEnd', callback)
- .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
- callback()
-
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass('in')
-
- var callbackRemove = function () {
- that.removeBackdrop()
- callback && callback()
- }
- $.support.transition && this.$element.hasClass('fade') ?
- this.$backdrop
- .one('bsTransitionEnd', callbackRemove)
- .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
- callbackRemove()
-
- } else if (callback) {
- callback()
- }
- }
-
- // these following methods are used to handle overflowing modals
-
- Modal.prototype.handleUpdate = function () {
- this.adjustDialog()
- }
-
- Modal.prototype.adjustDialog = function () {
- var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
-
- this.$element.css({
- paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
- paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
- })
- }
-
- Modal.prototype.resetAdjustments = function () {
- this.$element.css({
- paddingLeft: '',
- paddingRight: ''
- })
- }
-
- Modal.prototype.checkScrollbar = function () {
- var fullWindowWidth = window.innerWidth
- if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
- var documentElementRect = document.documentElement.getBoundingClientRect()
- fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
- }
- this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
- this.scrollbarWidth = this.measureScrollbar()
- }
-
- Modal.prototype.setScrollbar = function () {
- var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
- this.originalBodyPad = document.body.style.paddingRight || ''
- if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
- }
-
- Modal.prototype.resetScrollbar = function () {
- this.$body.css('padding-right', this.originalBodyPad)
- }
-
- Modal.prototype.measureScrollbar = function () { // thx walsh
- var scrollDiv = document.createElement('div')
- scrollDiv.className = 'modal-scrollbar-measure'
- this.$body.append(scrollDiv)
- var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
- this.$body[0].removeChild(scrollDiv)
- return scrollbarWidth
- }
-
-
- // MODAL PLUGIN DEFINITION
- // =======================
-
- function Plugin(option, _relatedTarget) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.modal')
- var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
-
- if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
- if (typeof option == 'string') data[option](_relatedTarget)
- else if (options.show) data.show(_relatedTarget)
- })
- }
-
- var old = $.fn.modal
-
- $.fn.modal = Plugin
- $.fn.modal.Constructor = Modal
-
-
- // MODAL NO CONFLICT
- // =================
-
- $.fn.modal.noConflict = function () {
- $.fn.modal = old
- return this
- }
-
-
- // MODAL DATA-API
- // ==============
-
- $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
- var $this = $(this)
- var href = $this.attr('href')
- var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
- var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
-
- if ($this.is('a')) e.preventDefault()
-
- $target.one('show.bs.modal', function (showEvent) {
- if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
- $target.one('hidden.bs.modal', function () {
- $this.is(':visible') && $this.trigger('focus')
- })
- })
- Plugin.call($target, option, this)
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: tooltip.js v3.3.7
- * http://getbootstrap.com/javascript/#tooltip
- * Inspired by the original jQuery.tipsy by Jason Frame
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // TOOLTIP PUBLIC CLASS DEFINITION
- // ===============================
-
- var Tooltip = function (element, options) {
- this.type = null
- this.options = null
- this.enabled = null
- this.timeout = null
- this.hoverState = null
- this.$element = null
- this.inState = null
-
- this.init('tooltip', element, options)
- }
-
- Tooltip.VERSION = '3.3.7'
-
- Tooltip.TRANSITION_DURATION = 150
-
- Tooltip.DEFAULTS = {
- animation: true,
- placement: 'top',
- selector: false,
- template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
- trigger: 'hover focus',
- title: '',
- delay: 0,
- html: false,
- container: false,
- viewport: {
- selector: 'body',
- padding: 0
- }
- }
-
- Tooltip.prototype.init = function (type, element, options) {
- this.enabled = true
- this.type = type
- this.$element = $(element)
- this.options = this.getOptions(options)
- this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
- this.inState = { click: false, hover: false, focus: false }
-
- if (this.$element[0] instanceof document.constructor && !this.options.selector) {
- throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
- }
-
- var triggers = this.options.trigger.split(' ')
-
- for (var i = triggers.length; i--;) {
- var trigger = triggers[i]
-
- if (trigger == 'click') {
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
- } else if (trigger != 'manual') {
- var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
- var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
-
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
- }
- }
-
- this.options.selector ?
- (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
- this.fixTitle()
- }
-
- Tooltip.prototype.getDefaults = function () {
- return Tooltip.DEFAULTS
- }
-
- Tooltip.prototype.getOptions = function (options) {
- options = $.extend({}, this.getDefaults(), this.$element.data(), options)
-
- if (options.delay && typeof options.delay == 'number') {
- options.delay = {
- show: options.delay,
- hide: options.delay
- }
- }
-
- return options
- }
-
- Tooltip.prototype.getDelegateOptions = function () {
- var options = {}
- var defaults = this.getDefaults()
-
- this._options && $.each(this._options, function (key, value) {
- if (defaults[key] != value) options[key] = value
- })
-
- return options
- }
-
- Tooltip.prototype.enter = function (obj) {
- var self = obj instanceof this.constructor ?
- obj : $(obj.currentTarget).data('bs.' + this.type)
-
- if (!self) {
- self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
- $(obj.currentTarget).data('bs.' + this.type, self)
- }
-
- if (obj instanceof $.Event) {
- self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
- }
-
- if (self.tip().hasClass('in') || self.hoverState == 'in') {
- self.hoverState = 'in'
- return
- }
-
- clearTimeout(self.timeout)
-
- self.hoverState = 'in'
-
- if (!self.options.delay || !self.options.delay.show) return self.show()
-
- self.timeout = setTimeout(function () {
- if (self.hoverState == 'in') self.show()
- }, self.options.delay.show)
- }
-
- Tooltip.prototype.isInStateTrue = function () {
- for (var key in this.inState) {
- if (this.inState[key]) return true
- }
-
- return false
- }
-
- Tooltip.prototype.leave = function (obj) {
- var self = obj instanceof this.constructor ?
- obj : $(obj.currentTarget).data('bs.' + this.type)
-
- if (!self) {
- self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
- $(obj.currentTarget).data('bs.' + this.type, self)
- }
-
- if (obj instanceof $.Event) {
- self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
- }
-
- if (self.isInStateTrue()) return
-
- clearTimeout(self.timeout)
-
- self.hoverState = 'out'
-
- if (!self.options.delay || !self.options.delay.hide) return self.hide()
-
- self.timeout = setTimeout(function () {
- if (self.hoverState == 'out') self.hide()
- }, self.options.delay.hide)
- }
-
- Tooltip.prototype.show = function () {
- var e = $.Event('show.bs.' + this.type)
-
- if (this.hasContent() && this.enabled) {
- this.$element.trigger(e)
-
- var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
- if (e.isDefaultPrevented() || !inDom) return
- var that = this
-
- var $tip = this.tip()
-
- var tipId = this.getUID(this.type)
-
- this.setContent()
- $tip.attr('id', tipId)
- this.$element.attr('aria-describedby', tipId)
-
- if (this.options.animation) $tip.addClass('fade')
-
- var placement = typeof this.options.placement == 'function' ?
- this.options.placement.call(this, $tip[0], this.$element[0]) :
- this.options.placement
-
- var autoToken = /\s?auto?\s?/i
- var autoPlace = autoToken.test(placement)
- if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
-
- $tip
- .detach()
- .css({ top: 0, left: 0, display: 'block' })
- .addClass(placement)
- .data('bs.' + this.type, this)
-
- this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
- this.$element.trigger('inserted.bs.' + this.type)
-
- var pos = this.getPosition()
- var actualWidth = $tip[0].offsetWidth
- var actualHeight = $tip[0].offsetHeight
-
- if (autoPlace) {
- var orgPlacement = placement
- var viewportDim = this.getPosition(this.$viewport)
-
- placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
- placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
- placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
- placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
- placement
-
- $tip
- .removeClass(orgPlacement)
- .addClass(placement)
- }
-
- var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
-
- this.applyPlacement(calculatedOffset, placement)
-
- var complete = function () {
- var prevHoverState = that.hoverState
- that.$element.trigger('shown.bs.' + that.type)
- that.hoverState = null
-
- if (prevHoverState == 'out') that.leave(that)
- }
-
- $.support.transition && this.$tip.hasClass('fade') ?
- $tip
- .one('bsTransitionEnd', complete)
- .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
- complete()
- }
- }
-
- Tooltip.prototype.applyPlacement = function (offset, placement) {
- var $tip = this.tip()
- var width = $tip[0].offsetWidth
- var height = $tip[0].offsetHeight
-
- // manually read margins because getBoundingClientRect includes difference
- var marginTop = parseInt($tip.css('margin-top'), 10)
- var marginLeft = parseInt($tip.css('margin-left'), 10)
-
- // we must check for NaN for ie 8/9
- if (isNaN(marginTop)) marginTop = 0
- if (isNaN(marginLeft)) marginLeft = 0
-
- offset.top += marginTop
- offset.left += marginLeft
-
- // $.fn.offset doesn't round pixel values
- // so we use setOffset directly with our own function B-0
- $.offset.setOffset($tip[0], $.extend({
- using: function (props) {
- $tip.css({
- top: Math.round(props.top),
- left: Math.round(props.left)
- })
- }
- }, offset), 0)
-
- $tip.addClass('in')
-
- // check to see if placing tip in new offset caused the tip to resize itself
- var actualWidth = $tip[0].offsetWidth
- var actualHeight = $tip[0].offsetHeight
-
- if (placement == 'top' && actualHeight != height) {
- offset.top = offset.top + height - actualHeight
- }
-
- var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
-
- if (delta.left) offset.left += delta.left
- else offset.top += delta.top
-
- var isVertical = /top|bottom/.test(placement)
- var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
- var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
-
- $tip.offset(offset)
- this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
- }
-
- Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
- this.arrow()
- .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
- .css(isVertical ? 'top' : 'left', '')
- }
-
- Tooltip.prototype.setContent = function () {
- var $tip = this.tip()
- var title = this.getTitle()
-
- $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
- $tip.removeClass('fade in top bottom left right')
- }
-
- Tooltip.prototype.hide = function (callback) {
- var that = this
- var $tip = $(this.$tip)
- var e = $.Event('hide.bs.' + this.type)
-
- function complete() {
- if (that.hoverState != 'in') $tip.detach()
- if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
- that.$element
- .removeAttr('aria-describedby')
- .trigger('hidden.bs.' + that.type)
- }
- callback && callback()
- }
-
- this.$element.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- $tip.removeClass('in')
-
- $.support.transition && $tip.hasClass('fade') ?
- $tip
- .one('bsTransitionEnd', complete)
- .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
- complete()
-
- this.hoverState = null
-
- return this
- }
-
- Tooltip.prototype.fixTitle = function () {
- var $e = this.$element
- if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
- $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
- }
- }
-
- Tooltip.prototype.hasContent = function () {
- return this.getTitle()
- }
-
- Tooltip.prototype.getPosition = function ($element) {
- $element = $element || this.$element
-
- var el = $element[0]
- var isBody = el.tagName == 'BODY'
-
- var elRect = el.getBoundingClientRect()
- if (elRect.width == null) {
- // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
- elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
- }
- var isSvg = window.SVGElement && el instanceof window.SVGElement
- // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
- // See https://github.com/twbs/bootstrap/issues/20280
- var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
- var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
- var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
-
- return $.extend({}, elRect, scroll, outerDims, elOffset)
- }
-
- Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
- return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
- placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
- placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
- /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
-
- }
-
- Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
- var delta = { top: 0, left: 0 }
- if (!this.$viewport) return delta
-
- var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
- var viewportDimensions = this.getPosition(this.$viewport)
-
- if (/right|left/.test(placement)) {
- var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
- var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
- if (topEdgeOffset < viewportDimensions.top) { // top overflow
- delta.top = viewportDimensions.top - topEdgeOffset
- } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
- delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
- }
- } else {
- var leftEdgeOffset = pos.left - viewportPadding
- var rightEdgeOffset = pos.left + viewportPadding + actualWidth
- if (leftEdgeOffset < viewportDimensions.left) { // left overflow
- delta.left = viewportDimensions.left - leftEdgeOffset
- } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
- delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
- }
- }
-
- return delta
- }
-
- Tooltip.prototype.getTitle = function () {
- var title
- var $e = this.$element
- var o = this.options
-
- title = $e.attr('data-original-title')
- || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
-
- return title
- }
-
- Tooltip.prototype.getUID = function (prefix) {
- do prefix += ~~(Math.random() * 1000000)
- while (document.getElementById(prefix))
- return prefix
- }
-
- Tooltip.prototype.tip = function () {
- if (!this.$tip) {
- this.$tip = $(this.options.template)
- if (this.$tip.length != 1) {
- throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
- }
- }
- return this.$tip
- }
-
- Tooltip.prototype.arrow = function () {
- return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
- }
-
- Tooltip.prototype.enable = function () {
- this.enabled = true
- }
-
- Tooltip.prototype.disable = function () {
- this.enabled = false
- }
-
- Tooltip.prototype.toggleEnabled = function () {
- this.enabled = !this.enabled
- }
-
- Tooltip.prototype.toggle = function (e) {
- var self = this
- if (e) {
- self = $(e.currentTarget).data('bs.' + this.type)
- if (!self) {
- self = new this.constructor(e.currentTarget, this.getDelegateOptions())
- $(e.currentTarget).data('bs.' + this.type, self)
- }
- }
-
- if (e) {
- self.inState.click = !self.inState.click
- if (self.isInStateTrue()) self.enter(self)
- else self.leave(self)
- } else {
- self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
- }
- }
-
- Tooltip.prototype.destroy = function () {
- var that = this
- clearTimeout(this.timeout)
- this.hide(function () {
- that.$element.off('.' + that.type).removeData('bs.' + that.type)
- if (that.$tip) {
- that.$tip.detach()
- }
- that.$tip = null
- that.$arrow = null
- that.$viewport = null
- that.$element = null
- })
- }
-
-
- // TOOLTIP PLUGIN DEFINITION
- // =========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.tooltip')
- var options = typeof option == 'object' && option
-
- if (!data && /destroy|hide/.test(option)) return
- if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.tooltip
-
- $.fn.tooltip = Plugin
- $.fn.tooltip.Constructor = Tooltip
-
-
- // TOOLTIP NO CONFLICT
- // ===================
-
- $.fn.tooltip.noConflict = function () {
- $.fn.tooltip = old
- return this
- }
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: popover.js v3.3.7
- * http://getbootstrap.com/javascript/#popovers
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // POPOVER PUBLIC CLASS DEFINITION
- // ===============================
-
- var Popover = function (element, options) {
- this.init('popover', element, options)
- }
-
- if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
-
- Popover.VERSION = '3.3.7'
-
- Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
- placement: 'right',
- trigger: 'click',
- content: '',
- template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
- })
-
-
- // NOTE: POPOVER EXTENDS tooltip.js
- // ================================
-
- Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
-
- Popover.prototype.constructor = Popover
-
- Popover.prototype.getDefaults = function () {
- return Popover.DEFAULTS
- }
-
- Popover.prototype.setContent = function () {
- var $tip = this.tip()
- var title = this.getTitle()
- var content = this.getContent()
-
- $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
- $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
- this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
- ](content)
-
- $tip.removeClass('fade top bottom left right in')
-
- // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
- // this manually by checking the contents.
- if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
- }
-
- Popover.prototype.hasContent = function () {
- return this.getTitle() || this.getContent()
- }
-
- Popover.prototype.getContent = function () {
- var $e = this.$element
- var o = this.options
-
- return $e.attr('data-content')
- || (typeof o.content == 'function' ?
- o.content.call($e[0]) :
- o.content)
- }
-
- Popover.prototype.arrow = function () {
- return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
- }
-
-
- // POPOVER PLUGIN DEFINITION
- // =========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.popover')
- var options = typeof option == 'object' && option
-
- if (!data && /destroy|hide/.test(option)) return
- if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.popover
-
- $.fn.popover = Plugin
- $.fn.popover.Constructor = Popover
-
-
- // POPOVER NO CONFLICT
- // ===================
-
- $.fn.popover.noConflict = function () {
- $.fn.popover = old
- return this
- }
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: scrollspy.js v3.3.7
- * http://getbootstrap.com/javascript/#scrollspy
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // SCROLLSPY CLASS DEFINITION
- // ==========================
-
- function ScrollSpy(element, options) {
- this.$body = $(document.body)
- this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
- this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
- this.selector = (this.options.target || '') + ' .nav li > a'
- this.offsets = []
- this.targets = []
- this.activeTarget = null
- this.scrollHeight = 0
-
- this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
- this.refresh()
- this.process()
- }
-
- ScrollSpy.VERSION = '3.3.7'
-
- ScrollSpy.DEFAULTS = {
- offset: 10
- }
-
- ScrollSpy.prototype.getScrollHeight = function () {
- return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
- }
-
- ScrollSpy.prototype.refresh = function () {
- var that = this
- var offsetMethod = 'offset'
- var offsetBase = 0
-
- this.offsets = []
- this.targets = []
- this.scrollHeight = this.getScrollHeight()
-
- if (!$.isWindow(this.$scrollElement[0])) {
- offsetMethod = 'position'
- offsetBase = this.$scrollElement.scrollTop()
- }
-
- this.$body
- .find(this.selector)
- .map(function () {
- var $el = $(this)
- var href = $el.data('target') || $el.attr('href')
- var $href = /^#./.test(href) && $(href)
-
- return ($href
- && $href.length
- && $href.is(':visible')
- && [[$href[offsetMethod]().top + offsetBase, href]]) || null
- })
- .sort(function (a, b) { return a[0] - b[0] })
- .each(function () {
- that.offsets.push(this[0])
- that.targets.push(this[1])
- })
- }
-
- ScrollSpy.prototype.process = function () {
- var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
- var scrollHeight = this.getScrollHeight()
- var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
- var offsets = this.offsets
- var targets = this.targets
- var activeTarget = this.activeTarget
- var i
-
- if (this.scrollHeight != scrollHeight) {
- this.refresh()
- }
-
- if (scrollTop >= maxScroll) {
- return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
- }
-
- if (activeTarget && scrollTop < offsets[0]) {
- this.activeTarget = null
- return this.clear()
- }
-
- for (i = offsets.length; i--;) {
- activeTarget != targets[i]
- && scrollTop >= offsets[i]
- && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
- && this.activate(targets[i])
- }
- }
-
- ScrollSpy.prototype.activate = function (target) {
- this.activeTarget = target
-
- this.clear()
-
- var selector = this.selector +
- '[data-target="' + target + '"],' +
- this.selector + '[href="' + target + '"]'
-
- var active = $(selector)
- .parents('li')
- .addClass('active')
-
- if (active.parent('.dropdown-menu').length) {
- active = active
- .closest('li.dropdown')
- .addClass('active')
- }
-
- active.trigger('activate.bs.scrollspy')
- }
-
- ScrollSpy.prototype.clear = function () {
- $(this.selector)
- .parentsUntil(this.options.target, '.active')
- .removeClass('active')
- }
-
-
- // SCROLLSPY PLUGIN DEFINITION
- // ===========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.scrollspy')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.scrollspy
-
- $.fn.scrollspy = Plugin
- $.fn.scrollspy.Constructor = ScrollSpy
-
-
- // SCROLLSPY NO CONFLICT
- // =====================
-
- $.fn.scrollspy.noConflict = function () {
- $.fn.scrollspy = old
- return this
- }
-
-
- // SCROLLSPY DATA-API
- // ==================
-
- $(window).on('load.bs.scrollspy.data-api', function () {
- $('[data-spy="scroll"]').each(function () {
- var $spy = $(this)
- Plugin.call($spy, $spy.data())
- })
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: tab.js v3.3.7
- * http://getbootstrap.com/javascript/#tabs
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // TAB CLASS DEFINITION
- // ====================
-
- var Tab = function (element) {
- // jscs:disable requireDollarBeforejQueryAssignment
- this.element = $(element)
- // jscs:enable requireDollarBeforejQueryAssignment
- }
-
- Tab.VERSION = '3.3.7'
-
- Tab.TRANSITION_DURATION = 150
-
- Tab.prototype.show = function () {
- var $this = this.element
- var $ul = $this.closest('ul:not(.dropdown-menu)')
- var selector = $this.data('target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- if ($this.parent('li').hasClass('active')) return
-
- var $previous = $ul.find('.active:last a')
- var hideEvent = $.Event('hide.bs.tab', {
- relatedTarget: $this[0]
- })
- var showEvent = $.Event('show.bs.tab', {
- relatedTarget: $previous[0]
- })
-
- $previous.trigger(hideEvent)
- $this.trigger(showEvent)
-
- if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
-
- var $target = $(selector)
-
- this.activate($this.closest('li'), $ul)
- this.activate($target, $target.parent(), function () {
- $previous.trigger({
- type: 'hidden.bs.tab',
- relatedTarget: $this[0]
- })
- $this.trigger({
- type: 'shown.bs.tab',
- relatedTarget: $previous[0]
- })
- })
- }
-
- Tab.prototype.activate = function (element, container, callback) {
- var $active = container.find('> .active')
- var transition = callback
- && $.support.transition
- && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
-
- function next() {
- $active
- .removeClass('active')
- .find('> .dropdown-menu > .active')
- .removeClass('active')
- .end()
- .find('[data-toggle="tab"]')
- .attr('aria-expanded', false)
-
- element
- .addClass('active')
- .find('[data-toggle="tab"]')
- .attr('aria-expanded', true)
-
- if (transition) {
- element[0].offsetWidth // reflow for transition
- element.addClass('in')
- } else {
- element.removeClass('fade')
- }
-
- if (element.parent('.dropdown-menu').length) {
- element
- .closest('li.dropdown')
- .addClass('active')
- .end()
- .find('[data-toggle="tab"]')
- .attr('aria-expanded', true)
- }
-
- callback && callback()
- }
-
- $active.length && transition ?
- $active
- .one('bsTransitionEnd', next)
- .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
- next()
-
- $active.removeClass('in')
- }
-
-
- // TAB PLUGIN DEFINITION
- // =====================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.tab')
-
- if (!data) $this.data('bs.tab', (data = new Tab(this)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.tab
-
- $.fn.tab = Plugin
- $.fn.tab.Constructor = Tab
-
-
- // TAB NO CONFLICT
- // ===============
-
- $.fn.tab.noConflict = function () {
- $.fn.tab = old
- return this
- }
-
-
- // TAB DATA-API
- // ============
-
- var clickHandler = function (e) {
- e.preventDefault()
- Plugin.call($(this), 'show')
- }
-
- $(document)
- .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
- .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: affix.js v3.3.7
- * http://getbootstrap.com/javascript/#affix
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // AFFIX CLASS DEFINITION
- // ======================
-
- var Affix = function (element, options) {
- this.options = $.extend({}, Affix.DEFAULTS, options)
-
- this.$target = $(this.options.target)
- .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
- .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
-
- this.$element = $(element)
- this.affixed = null
- this.unpin = null
- this.pinnedOffset = null
-
- this.checkPosition()
- }
-
- Affix.VERSION = '3.3.7'
-
- Affix.RESET = 'affix affix-top affix-bottom'
-
- Affix.DEFAULTS = {
- offset: 0,
- target: window
- }
-
- Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
- var scrollTop = this.$target.scrollTop()
- var position = this.$element.offset()
- var targetHeight = this.$target.height()
-
- if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
-
- if (this.affixed == 'bottom') {
- if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
- return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
- }
-
- var initializing = this.affixed == null
- var colliderTop = initializing ? scrollTop : position.top
- var colliderHeight = initializing ? targetHeight : height
-
- if (offsetTop != null && scrollTop <= offsetTop) return 'top'
- if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
-
- return false
- }
-
- Affix.prototype.getPinnedOffset = function () {
- if (this.pinnedOffset) return this.pinnedOffset
- this.$element.removeClass(Affix.RESET).addClass('affix')
- var scrollTop = this.$target.scrollTop()
- var position = this.$element.offset()
- return (this.pinnedOffset = position.top - scrollTop)
- }
-
- Affix.prototype.checkPositionWithEventLoop = function () {
- setTimeout($.proxy(this.checkPosition, this), 1)
- }
-
- Affix.prototype.checkPosition = function () {
- if (!this.$element.is(':visible')) return
-
- var height = this.$element.height()
- var offset = this.options.offset
- var offsetTop = offset.top
- var offsetBottom = offset.bottom
- var scrollHeight = Math.max($(document).height(), $(document.body).height())
-
- if (typeof offset != 'object') offsetBottom = offsetTop = offset
- if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
-
- var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
-
- if (this.affixed != affix) {
- if (this.unpin != null) this.$element.css('top', '')
-
- var affixType = 'affix' + (affix ? '-' + affix : '')
- var e = $.Event(affixType + '.bs.affix')
-
- this.$element.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- this.affixed = affix
- this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
-
- this.$element
- .removeClass(Affix.RESET)
- .addClass(affixType)
- .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
- }
-
- if (affix == 'bottom') {
- this.$element.offset({
- top: scrollHeight - height - offsetBottom
- })
- }
- }
-
-
- // AFFIX PLUGIN DEFINITION
- // =======================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.affix')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.affix
-
- $.fn.affix = Plugin
- $.fn.affix.Constructor = Affix
-
-
- // AFFIX NO CONFLICT
- // =================
-
- $.fn.affix.noConflict = function () {
- $.fn.affix = old
- return this
- }
-
-
- // AFFIX DATA-API
- // ==============
-
- $(window).on('load', function () {
- $('[data-spy="affix"]').each(function () {
- var $spy = $(this)
- var data = $spy.data()
-
- data.offset = data.offset || {}
-
- if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
- if (data.offsetTop != null) data.offset.top = data.offsetTop
-
- Plugin.call($spy, data)
- })
- })
-
-}(jQuery);
diff --git a/debian/missing-sources/bootstrap-slider-10.0.0.js b/debian/missing-sources/bootstrap-slider-10.0.0.js
deleted file mode 100644
index f3f4f126..00000000
--- a/debian/missing-sources/bootstrap-slider-10.0.0.js
+++ /dev/null
@@ -1,1874 +0,0 @@
-/*! =======================================================
- VERSION 10.0.0
-========================================================= */
-"use strict";
-
-var _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; };
-
-/*! =========================================================
- * bootstrap-slider.js
- *
- * Maintainers:
- * Kyle Kemp
- * - Twitter: @seiyria
- * - Github: seiyria
- * Rohit Kalkur
- * - Twitter: @Rovolutionary
- * - Github: rovolution
- *
- * =========================================================
- *
- * bootstrap-slider is released under the MIT License
- * Copyright (c) 2017 Kyle Kemp, Rohit Kalkur, and contributors
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * ========================================================= */
-
-/**
- * Bridget makes jQuery widgets
- * v1.0.1
- * MIT license
- */
-var windowIsDefined = (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object";
-
-(function (factory) {
- if (typeof define === "function" && define.amd) {
- define(["jquery"], factory);
- } else if ((typeof module === "undefined" ? "undefined" : _typeof(module)) === "object" && module.exports) {
- var jQuery;
- try {
- jQuery = require("jquery");
- } catch (err) {
- jQuery = null;
- }
- module.exports = factory(jQuery);
- } else if (window) {
- window.Slider = factory(window.jQuery);
- }
-})(function ($) {
- // Constants
- var NAMESPACE_MAIN = 'slider';
- var NAMESPACE_ALTERNATE = 'bootstrapSlider';
-
- // Polyfill console methods
- if (windowIsDefined && !window.console) {
- window.console = {};
- }
- if (windowIsDefined && !window.console.log) {
- window.console.log = function () {};
- }
- if (windowIsDefined && !window.console.warn) {
- window.console.warn = function () {};
- }
-
- // Reference to Slider constructor
- var Slider;
-
- (function ($) {
-
- 'use strict';
-
- // -------------------------- utils -------------------------- //
-
- var slice = Array.prototype.slice;
-
- function noop() {}
-
- // -------------------------- definition -------------------------- //
-
- function defineBridget($) {
-
- // bail if no jQuery
- if (!$) {
- return;
- }
-
- // -------------------------- addOptionMethod -------------------------- //
-
- /**
- * adds option method -> $().plugin('option', {...})
- * @param {Function} PluginClass - constructor class
- */
- function addOptionMethod(PluginClass) {
- // don't overwrite original option method
- if (PluginClass.prototype.option) {
- return;
- }
-
- // option setter
- PluginClass.prototype.option = function (opts) {
- // bail out if not an object
- if (!$.isPlainObject(opts)) {
- return;
- }
- this.options = $.extend(true, this.options, opts);
- };
- }
-
- // -------------------------- plugin bridge -------------------------- //
-
- // helper function for logging errors
- // $.error breaks jQuery chaining
- var logError = typeof console === 'undefined' ? noop : function (message) {
- console.error(message);
- };
-
- /**
- * jQuery plugin bridge, access methods like $elem.plugin('method')
- * @param {String} namespace - plugin name
- * @param {Function} PluginClass - constructor class
- */
- function bridge(namespace, PluginClass) {
- // add to jQuery fn namespace
- $.fn[namespace] = function (options) {
- if (typeof options === 'string') {
- // call plugin method when first argument is a string
- // get arguments for method
- var args = slice.call(arguments, 1);
-
- for (var i = 0, len = this.length; i < len; i++) {
- var elem = this[i];
- var instance = $.data(elem, namespace);
- if (!instance) {
- logError("cannot call methods on " + namespace + " prior to initialization; " + "attempted to call '" + options + "'");
- continue;
- }
- if (!$.isFunction(instance[options]) || options.charAt(0) === '_') {
- logError("no such method '" + options + "' for " + namespace + " instance");
- continue;
- }
-
- // trigger method with arguments
- var returnValue = instance[options].apply(instance, args);
-
- // break look and return first value if provided
- if (returnValue !== undefined && returnValue !== instance) {
- return returnValue;
- }
- }
- // return this if no return value
- return this;
- } else {
- var objects = this.map(function () {
- var instance = $.data(this, namespace);
- if (instance) {
- // apply options & init
- instance.option(options);
- instance._init();
- } else {
- // initialize new instance
- instance = new PluginClass(this, options);
- $.data(this, namespace, instance);
- }
- return $(this);
- });
-
- if (!objects || objects.length > 1) {
- return objects;
- } else {
- return objects[0];
- }
- }
- };
- }
-
- // -------------------------- bridget -------------------------- //
-
- /**
- * converts a Prototypical class into a proper jQuery plugin
- * the class must have a ._init method
- * @param {String} namespace - plugin name, used in $().pluginName
- * @param {Function} PluginClass - constructor class
- */
- $.bridget = function (namespace, PluginClass) {
- addOptionMethod(PluginClass);
- bridge(namespace, PluginClass);
- };
-
- return $.bridget;
- }
-
- // get jquery from browser global
- defineBridget($);
- })($);
-
- /*************************************************
- BOOTSTRAP-SLIDER SOURCE CODE
- **************************************************/
-
- (function ($) {
-
- var ErrorMsgs = {
- formatInvalidInputErrorMsg: function formatInvalidInputErrorMsg(input) {
- return "Invalid input value '" + input + "' passed in";
- },
- callingContextNotSliderInstance: "Calling context element does not have instance of Slider bound to it. Check your code to make sure the JQuery object returned from the call to the slider() initializer is calling the method"
- };
-
- var SliderScale = {
- linear: {
- toValue: function toValue(percentage) {
- var rawValue = percentage / 100 * (this.options.max - this.options.min);
- var shouldAdjustWithBase = true;
- if (this.options.ticks_positions.length > 0) {
- var minv,
- maxv,
- minp,
- maxp = 0;
- for (var i = 1; i < this.options.ticks_positions.length; i++) {
- if (percentage <= this.options.ticks_positions[i]) {
- minv = this.options.ticks[i - 1];
- minp = this.options.ticks_positions[i - 1];
- maxv = this.options.ticks[i];
- maxp = this.options.ticks_positions[i];
-
- break;
- }
- }
- var partialPercentage = (percentage - minp) / (maxp - minp);
- rawValue = minv + partialPercentage * (maxv - minv);
- shouldAdjustWithBase = false;
- }
-
- var adjustment = shouldAdjustWithBase ? this.options.min : 0;
- var value = adjustment + Math.round(rawValue / this.options.step) * this.options.step;
- if (value < this.options.min) {
- return this.options.min;
- } else if (value > this.options.max) {
- return this.options.max;
- } else {
- return value;
- }
- },
- toPercentage: function toPercentage(value) {
- if (this.options.max === this.options.min) {
- return 0;
- }
-
- if (this.options.ticks_positions.length > 0) {
- var minv,
- maxv,
- minp,
- maxp = 0;
- for (var i = 0; i < this.options.ticks.length; i++) {
- if (value <= this.options.ticks[i]) {
- minv = i > 0 ? this.options.ticks[i - 1] : 0;
- minp = i > 0 ? this.options.ticks_positions[i - 1] : 0;
- maxv = this.options.ticks[i];
- maxp = this.options.ticks_positions[i];
-
- break;
- }
- }
- if (i > 0) {
- var partialPercentage = (value - minv) / (maxv - minv);
- return minp + partialPercentage * (maxp - minp);
- }
- }
-
- return 100 * (value - this.options.min) / (this.options.max - this.options.min);
- }
- },
-
- logarithmic: {
- /* Based on http://stackoverflow.com/questions/846221/logarithmic-slider */
- toValue: function toValue(percentage) {
- var min = this.options.min === 0 ? 0 : Math.log(this.options.min);
- var max = Math.log(this.options.max);
- var value = Math.exp(min + (max - min) * percentage / 100);
- if (Math.round(value) === this.options.max) {
- return this.options.max;
- }
- value = this.options.min + Math.round((value - this.options.min) / this.options.step) * this.options.step;
- /* Rounding to the nearest step could exceed the min or
- * max, so clip to those values. */
- if (value < this.options.min) {
- return this.options.min;
- } else if (value > this.options.max) {
- return this.options.max;
- } else {
- return value;
- }
- },
- toPercentage: function toPercentage(value) {
- if (this.options.max === this.options.min) {
- return 0;
- } else {
- var max = Math.log(this.options.max);
- var min = this.options.min === 0 ? 0 : Math.log(this.options.min);
- var v = value === 0 ? 0 : Math.log(value);
- return 100 * (v - min) / (max - min);
- }
- }
- }
- };
-
- /*************************************************
- CONSTRUCTOR
- **************************************************/
- Slider = function Slider(element, options) {
- createNewSlider.call(this, element, options);
- return this;
- };
-
- function createNewSlider(element, options) {
-
- /*
- The internal state object is used to store data about the current 'state' of slider.
- This includes values such as the `value`, `enabled`, etc...
- */
- this._state = {
- value: null,
- enabled: null,
- offset: null,
- size: null,
- percentage: null,
- inDrag: false,
- over: false
- };
-
- // The objects used to store the reference to the tick methods if ticks_tooltip is on
- this.ticksCallbackMap = {};
- this.handleCallbackMap = {};
-
- if (typeof element === "string") {
- this.element = document.querySelector(element);
- } else if (element instanceof HTMLElement) {
- this.element = element;
- }
-
- /*************************************************
- Process Options
- **************************************************/
- options = options ? options : {};
- var optionTypes = Object.keys(this.defaultOptions);
-
- for (var i = 0; i < optionTypes.length; i++) {
- var optName = optionTypes[i];
-
- // First check if an option was passed in via the constructor
- var val = options[optName];
- // If no data attrib, then check data atrributes
- val = typeof val !== 'undefined' ? val : getDataAttrib(this.element, optName);
- // Finally, if nothing was specified, use the defaults
- val = val !== null ? val : this.defaultOptions[optName];
-
- // Set all options on the instance of the Slider
- if (!this.options) {
- this.options = {};
- }
- this.options[optName] = val;
- }
-
- // Check options.rtl
- if (this.options.rtl === 'auto') {
- this.options.rtl = window.getComputedStyle(this.element).direction === 'rtl';
- }
-
- /*
- Validate `tooltip_position` against 'orientation`
- - if `tooltip_position` is incompatible with orientation, swith it to a default compatible with specified `orientation`
- -- default for "vertical" -> "right", "left" if rtl
- -- default for "horizontal" -> "top"
- */
- if (this.options.orientation === "vertical" && (this.options.tooltip_position === "top" || this.options.tooltip_position === "bottom")) {
- if (this.options.rtl) {
- this.options.tooltip_position = "left";
- } else {
- this.options.tooltip_position = "right";
- }
- } else if (this.options.orientation === "horizontal" && (this.options.tooltip_position === "left" || this.options.tooltip_position === "right")) {
-
- this.options.tooltip_position = "top";
- }
-
- function getDataAttrib(element, optName) {
- var dataName = "data-slider-" + optName.replace(/_/g, '-');
- var dataValString = element.getAttribute(dataName);
-
- try {
- return JSON.parse(dataValString);
- } catch (err) {
- return dataValString;
- }
- }
-
- /*************************************************
- Create Markup
- **************************************************/
-
- var origWidth = this.element.style.width;
- var updateSlider = false;
- var parent = this.element.parentNode;
- var sliderTrackSelection;
- var sliderTrackLow, sliderTrackHigh;
- var sliderMinHandle;
- var sliderMaxHandle;
-
- if (this.sliderElem) {
- updateSlider = true;
- } else {
- /* Create elements needed for slider */
- this.sliderElem = document.createElement("div");
- this.sliderElem.className = "slider";
-
- /* Create slider track elements */
- var sliderTrack = document.createElement("div");
- sliderTrack.className = "slider-track";
-
- sliderTrackLow = document.createElement("div");
- sliderTrackLow.className = "slider-track-low";
-
- sliderTrackSelection = document.createElement("div");
- sliderTrackSelection.className = "slider-selection";
-
- sliderTrackHigh = document.createElement("div");
- sliderTrackHigh.className = "slider-track-high";
-
- sliderMinHandle = document.createElement("div");
- sliderMinHandle.className = "slider-handle min-slider-handle";
- sliderMinHandle.setAttribute('role', 'slider');
- sliderMinHandle.setAttribute('aria-valuemin', this.options.min);
- sliderMinHandle.setAttribute('aria-valuemax', this.options.max);
-
- sliderMaxHandle = document.createElement("div");
- sliderMaxHandle.className = "slider-handle max-slider-handle";
- sliderMaxHandle.setAttribute('role', 'slider');
- sliderMaxHandle.setAttribute('aria-valuemin', this.options.min);
- sliderMaxHandle.setAttribute('aria-valuemax', this.options.max);
-
- sliderTrack.appendChild(sliderTrackLow);
- sliderTrack.appendChild(sliderTrackSelection);
- sliderTrack.appendChild(sliderTrackHigh);
-
- /* Create highlight range elements */
- this.rangeHighlightElements = [];
- var rangeHighlightsOpts = this.options.rangeHighlights;
- if (Array.isArray(rangeHighlightsOpts) && rangeHighlightsOpts.length > 0) {
- for (var j = 0; j < rangeHighlightsOpts.length; j++) {
- var rangeHighlightElement = document.createElement("div");
- var customClassString = rangeHighlightsOpts[j].class || "";
- rangeHighlightElement.className = "slider-rangeHighlight slider-selection " + customClassString;
- this.rangeHighlightElements.push(rangeHighlightElement);
- sliderTrack.appendChild(rangeHighlightElement);
- }
- }
-
- /* Add aria-labelledby to handle's */
- var isLabelledbyArray = Array.isArray(this.options.labelledby);
- if (isLabelledbyArray && this.options.labelledby[0]) {
- sliderMinHandle.setAttribute('aria-labelledby', this.options.labelledby[0]);
- }
- if (isLabelledbyArray && this.options.labelledby[1]) {
- sliderMaxHandle.setAttribute('aria-labelledby', this.options.labelledby[1]);
- }
- if (!isLabelledbyArray && this.options.labelledby) {
- sliderMinHandle.setAttribute('aria-labelledby', this.options.labelledby);
- sliderMaxHandle.setAttribute('aria-labelledby', this.options.labelledby);
- }
-
- /* Create ticks */
- this.ticks = [];
- if (Array.isArray(this.options.ticks) && this.options.ticks.length > 0) {
- this.ticksContainer = document.createElement('div');
- this.ticksContainer.className = 'slider-tick-container';
-
- for (i = 0; i < this.options.ticks.length; i++) {
- var tick = document.createElement('div');
- tick.className = 'slider-tick';
- if (this.options.ticks_tooltip) {
- var tickListenerReference = this._addTickListener();
- var enterCallback = tickListenerReference.addMouseEnter(this, tick, i);
- var leaveCallback = tickListenerReference.addMouseLeave(this, tick);
-
- this.ticksCallbackMap[i] = {
- mouseEnter: enterCallback,
- mouseLeave: leaveCallback
- };
- }
- this.ticks.push(tick);
- this.ticksContainer.appendChild(tick);
- }
-
- sliderTrackSelection.className += " tick-slider-selection";
- }
-
- this.tickLabels = [];
- if (Array.isArray(this.options.ticks_labels) && this.options.ticks_labels.length > 0) {
- this.tickLabelContainer = document.createElement('div');
- this.tickLabelContainer.className = 'slider-tick-label-container';
-
- for (i = 0; i < this.options.ticks_labels.length; i++) {
- var label = document.createElement('div');
- var noTickPositionsSpecified = this.options.ticks_positions.length === 0;
- var tickLabelsIndex = this.options.reversed && noTickPositionsSpecified ? this.options.ticks_labels.length - (i + 1) : i;
- label.className = 'slider-tick-label';
- label.innerHTML = this.options.ticks_labels[tickLabelsIndex];
-
- this.tickLabels.push(label);
- this.tickLabelContainer.appendChild(label);
- }
- }
-
- var createAndAppendTooltipSubElements = function createAndAppendTooltipSubElements(tooltipElem) {
- var arrow = document.createElement("div");
- arrow.className = "tooltip-arrow";
-
- var inner = document.createElement("div");
- inner.className = "tooltip-inner";
-
- tooltipElem.appendChild(arrow);
- tooltipElem.appendChild(inner);
- };
-
- /* Create tooltip elements */
- var sliderTooltip = document.createElement("div");
- sliderTooltip.className = "tooltip tooltip-main";
- sliderTooltip.setAttribute('role', 'presentation');
- createAndAppendTooltipSubElements(sliderTooltip);
-
- var sliderTooltipMin = document.createElement("div");
- sliderTooltipMin.className = "tooltip tooltip-min";
- sliderTooltipMin.setAttribute('role', 'presentation');
- createAndAppendTooltipSubElements(sliderTooltipMin);
-
- var sliderTooltipMax = document.createElement("div");
- sliderTooltipMax.className = "tooltip tooltip-max";
- sliderTooltipMax.setAttribute('role', 'presentation');
- createAndAppendTooltipSubElements(sliderTooltipMax);
-
- /* Append components to sliderElem */
- this.sliderElem.appendChild(sliderTrack);
- this.sliderElem.appendChild(sliderTooltip);
- this.sliderElem.appendChild(sliderTooltipMin);
- this.sliderElem.appendChild(sliderTooltipMax);
-
- if (this.tickLabelContainer) {
- this.sliderElem.appendChild(this.tickLabelContainer);
- }
- if (this.ticksContainer) {
- this.sliderElem.appendChild(this.ticksContainer);
- }
-
- this.sliderElem.appendChild(sliderMinHandle);
- this.sliderElem.appendChild(sliderMaxHandle);
-
- /* Append slider element to parent container, right before the original <input> element */
- parent.insertBefore(this.sliderElem, this.element);
-
- /* Hide original <input> element */
- this.element.style.display = "none";
- }
- /* If JQuery exists, cache JQ references */
- if ($) {
- this.$element = $(this.element);
- this.$sliderElem = $(this.sliderElem);
- }
-
- /*************************************************
- Setup
- **************************************************/
- this.eventToCallbackMap = {};
- this.sliderElem.id = this.options.id;
-
- this.touchCapable = 'ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch;
-
- this.touchX = 0;
- this.touchY = 0;
-
- this.tooltip = this.sliderElem.querySelector('.tooltip-main');
- this.tooltipInner = this.tooltip.querySelector('.tooltip-inner');
-
- this.tooltip_min = this.sliderElem.querySelector('.tooltip-min');
- this.tooltipInner_min = this.tooltip_min.querySelector('.tooltip-inner');
-
- this.tooltip_max = this.sliderElem.querySelector('.tooltip-max');
- this.tooltipInner_max = this.tooltip_max.querySelector('.tooltip-inner');
-
- if (SliderScale[this.options.scale]) {
- this.options.scale = SliderScale[this.options.scale];
- }
-
- if (updateSlider === true) {
- // Reset classes
- this._removeClass(this.sliderElem, 'slider-horizontal');
- this._removeClass(this.sliderElem, 'slider-vertical');
- this._removeClass(this.sliderElem, 'slider-rtl');
- this._removeClass(this.tooltip, 'hide');
- this._removeClass(this.tooltip_min, 'hide');
- this._removeClass(this.tooltip_max, 'hide');
-
- // Undo existing inline styles for track
- ["left", "right", "top", "width", "height"].forEach(function (prop) {
- this._removeProperty(this.trackLow, prop);
- this._removeProperty(this.trackSelection, prop);
- this._removeProperty(this.trackHigh, prop);
- }, this);
-
- // Undo inline styles on handles
- [this.handle1, this.handle2].forEach(function (handle) {
- this._removeProperty(handle, 'left');
- this._removeProperty(handle, 'right');
- this._removeProperty(handle, 'top');
- }, this);
-
- // Undo inline styles and classes on tooltips
- [this.tooltip, this.tooltip_min, this.tooltip_max].forEach(function (tooltip) {
- this._removeProperty(tooltip, 'left');
- this._removeProperty(tooltip, 'right');
- this._removeProperty(tooltip, 'top');
-
- this._removeClass(tooltip, 'right');
- this._removeClass(tooltip, 'left');
- this._removeClass(tooltip, 'top');
- }, this);
- }
-
- if (this.options.orientation === 'vertical') {
- this._addClass(this.sliderElem, 'slider-vertical');
- this.stylePos = 'top';
- this.mousePos = 'pageY';
- this.sizePos = 'offsetHeight';
- } else {
- this._addClass(this.sliderElem, 'slider-horizontal');
- this.sliderElem.style.width = origWidth;
- this.options.orientation = 'horizontal';
- if (this.options.rtl) {
- this.stylePos = 'right';
- } else {
- this.stylePos = 'left';
- }
- this.mousePos = 'pageX';
- this.sizePos = 'offsetWidth';
- }
- // specific rtl class
- if (this.options.rtl) {
- this._addClass(this.sliderElem, 'slider-rtl');
- }
- this._setTooltipPosition();
- /* In case ticks are specified, overwrite the min and max bounds */
- if (Array.isArray(this.options.ticks) && this.options.ticks.length > 0) {
- this.options.max = Math.max.apply(Math, this.options.ticks);
- this.options.min = Math.min.apply(Math, this.options.ticks);
- }
-
- if (Array.isArray(this.options.value)) {
- this.options.range = true;
- this._state.value = this.options.value;
- } else if (this.options.range) {
- // User wants a range, but value is not an array
- this._state.value = [this.options.value, this.options.max];
- } else {
- this._state.value = this.options.value;
- }
-
- this.trackLow = sliderTrackLow || this.trackLow;
- this.trackSelection = sliderTrackSelection || this.trackSelection;
- this.trackHigh = sliderTrackHigh || this.trackHigh;
-
- if (this.options.selection === 'none') {
- this._addClass(this.trackLow, 'hide');
- this._addClass(this.trackSelection, 'hide');
- this._addClass(this.trackHigh, 'hide');
- } else if (this.options.selection === 'after' || this.options.selection === 'before') {
- this._removeClass(this.trackLow, 'hide');
- this._removeClass(this.trackSelection, 'hide');
- this._removeClass(this.trackHigh, 'hide');
- }
-
- this.handle1 = sliderMinHandle || this.handle1;
- this.handle2 = sliderMaxHandle || this.handle2;
-
- if (updateSlider === true) {
- // Reset classes
- this._removeClass(this.handle1, 'round triangle');
- this._removeClass(this.handle2, 'round triangle hide');
-
- for (i = 0; i < this.ticks.length; i++) {
- this._removeClass(this.ticks[i], 'round triangle hide');
- }
- }
-
- var availableHandleModifiers = ['round', 'triangle', 'custom'];
- var isValidHandleType = availableHandleModifiers.indexOf(this.options.handle) !== -1;
- if (isValidHandleType) {
- this._addClass(this.handle1, this.options.handle);
- this._addClass(this.handle2, this.options.handle);
-
- for (i = 0; i < this.ticks.length; i++) {
- this._addClass(this.ticks[i], this.options.handle);
- }
- }
-
- this._state.offset = this._offset(this.sliderElem);
- this._state.size = this.sliderElem[this.sizePos];
- this.setValue(this._state.value);
-
- /******************************************
- Bind Event Listeners
- ******************************************/
-
- // Bind keyboard handlers
- this.handle1Keydown = this._keydown.bind(this, 0);
- this.handle1.addEventListener("keydown", this.handle1Keydown, false);
-
- this.handle2Keydown = this._keydown.bind(this, 1);
- this.handle2.addEventListener("keydown", this.handle2Keydown, false);
-
- this.mousedown = this._mousedown.bind(this);
- this.touchstart = this._touchstart.bind(this);
- this.touchmove = this._touchmove.bind(this);
-
- if (this.touchCapable) {
- // Test for passive event support
- var supportsPassive = false;
- try {
- var opts = Object.defineProperty({}, 'passive', {
- get: function get() {
- supportsPassive = true;
- }
- });
- window.addEventListener("test", null, opts);
- } catch (e) {}
- // Use our detect's results. passive applied if supported, capture will be false either way.
- var eventOptions = supportsPassive ? { passive: true } : false;
- // Bind touch handlers
- this.sliderElem.addEventListener("touchstart", this.touchstart, eventOptions);
- this.sliderElem.addEventListener("touchmove", this.touchmove, eventOptions);
- }
- this.sliderElem.addEventListener("mousedown", this.mousedown, false);
-
- // Bind window handlers
- this.resize = this._resize.bind(this);
- window.addEventListener("resize", this.resize, false);
-
- // Bind tooltip-related handlers
- if (this.options.tooltip === 'hide') {
- this._addClass(this.tooltip, 'hide');
- this._addClass(this.tooltip_min, 'hide');
- this._addClass(this.tooltip_max, 'hide');
- } else if (this.options.tooltip === 'always') {
- this._showTooltip();
- this._alwaysShowTooltip = true;
- } else {
- this.showTooltip = this._showTooltip.bind(this);
- this.hideTooltip = this._hideTooltip.bind(this);
-
- if (this.options.ticks_tooltip) {
- var callbackHandle = this._addTickListener();
- //create handle1 listeners and store references in map
- var mouseEnter = callbackHandle.addMouseEnter(this, this.handle1);
- var mouseLeave = callbackHandle.addMouseLeave(this, this.handle1);
- this.handleCallbackMap.handle1 = {
- mouseEnter: mouseEnter,
- mouseLeave: mouseLeave
- };
- //create handle2 listeners and store references in map
- mouseEnter = callbackHandle.addMouseEnter(this, this.handle2);
- mouseLeave = callbackHandle.addMouseLeave(this, this.handle2);
- this.handleCallbackMap.handle2 = {
- mouseEnter: mouseEnter,
- mouseLeave: mouseLeave
- };
- } else {
- this.sliderElem.addEventListener("mouseenter", this.showTooltip, false);
- this.sliderElem.addEventListener("mouseleave", this.hideTooltip, false);
- }
-
- this.handle1.addEventListener("focus", this.showTooltip, false);
- this.handle1.addEventListener("blur", this.hideTooltip, false);
-
- this.handle2.addEventListener("focus", this.showTooltip, false);
- this.handle2.addEventListener("blur", this.hideTooltip, false);
- }
-
- if (this.options.enabled) {
- this.enable();
- } else {
- this.disable();
- }
- }
-
- /*************************************************
- INSTANCE PROPERTIES/METHODS
- - Any methods bound to the prototype are considered
- part of the plugin's `public` interface
- **************************************************/
- Slider.prototype = {
- _init: function _init() {}, // NOTE: Must exist to support bridget
-
- constructor: Slider,
-
- defaultOptions: {
- id: "",
- min: 0,
- max: 10,
- step: 1,
- precision: 0,
- orientation: 'horizontal',
- value: 5,
- range: false,
- selection: 'before',
- tooltip: 'show',
- tooltip_split: false,
- handle: 'round',
- reversed: false,
- rtl: 'auto',
- enabled: true,
- formatter: function formatter(val) {
- if (Array.isArray(val)) {
- return val[0] + " : " + val[1];
- } else {
- return val;
- }
- },
- natural_arrow_keys: false,
- ticks: [],
- ticks_positions: [],
- ticks_labels: [],
- ticks_snap_bounds: 0,
- ticks_tooltip: false,
- scale: 'linear',
- focus: false,
- tooltip_position: null,
- labelledby: null,
- rangeHighlights: []
- },
-
- getElement: function getElement() {
- return this.sliderElem;
- },
-
- getValue: function getValue() {
- if (this.options.range) {
- return this._state.value;
- } else {
- return this._state.value[0];
- }
- },
-
- setValue: function setValue(val, triggerSlideEvent, triggerChangeEvent) {
- if (!val) {
- val = 0;
- }
- var oldValue = this.getValue();
- this._state.value = this._validateInputValue(val);
- var applyPrecision = this._applyPrecision.bind(this);
-
- if (this.options.range) {
- this._state.value[0] = applyPrecision(this._state.value[0]);
- this._state.value[1] = applyPrecision(this._state.value[1]);
-
- this._state.value[0] = Math.max(this.options.min, Math.min(this.options.max, this._state.value[0]));
- this._state.value[1] = Math.max(this.options.min, Math.min(this.options.max, this._state.value[1]));
- } else {
- this._state.value = applyPrecision(this._state.value);
- this._state.value = [Math.max(this.options.min, Math.min(this.options.max, this._state.value))];
- this._addClass(this.handle2, 'hide');
- if (this.options.selection === 'after') {
- this._state.value[1] = this.options.max;
- } else {
- this._state.value[1] = this.options.min;
- }
- }
-
- if (this.options.max > this.options.min) {
- this._state.percentage = [this._toPercentage(this._state.value[0]), this._toPercentage(this._state.value[1]), this.options.step * 100 / (this.options.max - this.options.min)];
- } else {
- this._state.percentage = [0, 0, 100];
- }
-
- this._layout();
- var newValue = this.options.range ? this._state.value : this._state.value[0];
-
- this._setDataVal(newValue);
- if (triggerSlideEvent === true) {
- this._trigger('slide', newValue);
- }
- if (oldValue !== newValue && triggerChangeEvent === true) {
- this._trigger('change', {
- oldValue: oldValue,
- newValue: newValue
- });
- }
-
- return this;
- },
-
- destroy: function destroy() {
- // Remove event handlers on slider elements
- this._removeSliderEventHandlers();
-
- // Remove the slider from the DOM
- this.sliderElem.parentNode.removeChild(this.sliderElem);
- /* Show original <input> element */
- this.element.style.display = "";
-
- // Clear out custom event bindings
- this._cleanUpEventCallbacksMap();
-
- // Remove data values
- this.element.removeAttribute("data");
-
- // Remove JQuery handlers/data
- if ($) {
- this._unbindJQueryEventHandlers();
- this.$element.removeData('slider');
- }
- },
-
- disable: function disable() {
- this._state.enabled = false;
- this.handle1.removeAttribute("tabindex");
- this.handle2.removeAttribute("tabindex");
- this._addClass(this.sliderElem, 'slider-disabled');
- this._trigger('slideDisabled');
-
- return this;
- },
-
- enable: function enable() {
- this._state.enabled = true;
- this.handle1.setAttribute("tabindex", 0);
- this.handle2.setAttribute("tabindex", 0);
- this._removeClass(this.sliderElem, 'slider-disabled');
- this._trigger('slideEnabled');
-
- return this;
- },
-
- toggle: function toggle() {
- if (this._state.enabled) {
- this.disable();
- } else {
- this.enable();
- }
- return this;
- },
-
- isEnabled: function isEnabled() {
- return this._state.enabled;
- },
-
- on: function on(evt, callback) {
- this._bindNonQueryEventHandler(evt, callback);
- return this;
- },
-
- off: function off(evt, callback) {
- if ($) {
- this.$element.off(evt, callback);
- this.$sliderElem.off(evt, callback);
- } else {
- this._unbindNonQueryEventHandler(evt, callback);
- }
- },
-
- getAttribute: function getAttribute(attribute) {
- if (attribute) {
- return this.options[attribute];
- } else {
- return this.options;
- }
- },
-
- setAttribute: function setAttribute(attribute, value) {
- this.options[attribute] = value;
- return this;
- },
-
- refresh: function refresh() {
- this._removeSliderEventHandlers();
- createNewSlider.call(this, this.element, this.options);
- if ($) {
- // Bind new instance of slider to the element
- $.data(this.element, 'slider', this);
- }
- return this;
- },
-
- relayout: function relayout() {
- this._resize();
- this._layout();
- return this;
- },
-
- /******************************+
- HELPERS
- - Any method that is not part of the public interface.
- - Place it underneath this comment block and write its signature like so:
- _fnName : function() {...}
- ********************************/
- _removeSliderEventHandlers: function _removeSliderEventHandlers() {
- // Remove keydown event listeners
- this.handle1.removeEventListener("keydown", this.handle1Keydown, false);
- this.handle2.removeEventListener("keydown", this.handle2Keydown, false);
-
- //remove the listeners from the ticks and handles if they had their own listeners
- if (this.options.ticks_tooltip) {
- var ticks = this.ticksContainer.getElementsByClassName('slider-tick');
- for (var i = 0; i < ticks.length; i++) {
- ticks[i].removeEventListener('mouseenter', this.ticksCallbackMap[i].mouseEnter, false);
- ticks[i].removeEventListener('mouseleave', this.ticksCallbackMap[i].mouseLeave, false);
- }
- this.handle1.removeEventListener('mouseenter', this.handleCallbackMap.handle1.mouseEnter, false);
- this.handle2.removeEventListener('mouseenter', this.handleCallbackMap.handle2.mouseEnter, false);
- this.handle1.removeEventListener('mouseleave', this.handleCallbackMap.handle1.mouseLeave, false);
- this.handle2.removeEventListener('mouseleave', this.handleCallbackMap.handle2.mouseLeave, false);
- }
-
- this.handleCallbackMap = null;
- this.ticksCallbackMap = null;
-
- if (this.showTooltip) {
- this.handle1.removeEventListener("focus", this.showTooltip, false);
- this.handle2.removeEventListener("focus", this.showTooltip, false);
- }
- if (this.hideTooltip) {
- this.handle1.removeEventListener("blur", this.hideTooltip, false);
- this.handle2.removeEventListener("blur", this.hideTooltip, false);
- }
-
- // Remove event listeners from sliderElem
- if (this.showTooltip) {
- this.sliderElem.removeEventListener("mouseenter", this.showTooltip, false);
- }
- if (this.hideTooltip) {
- this.sliderElem.removeEventListener("mouseleave", this.hideTooltip, false);
- }
- this.sliderElem.removeEventListener("touchstart", this.touchstart, false);
- this.sliderElem.removeEventListener("touchmove", this.touchmove, false);
- this.sliderElem.removeEventListener("mousedown", this.mousedown, false);
-
- // Remove window event listener
- window.removeEventListener("resize", this.resize, false);
- },
- _bindNonQueryEventHandler: function _bindNonQueryEventHandler(evt, callback) {
- if (this.eventToCallbackMap[evt] === undefined) {
- this.eventToCallbackMap[evt] = [];
- }
- this.eventToCallbackMap[evt].push(callback);
- },
- _unbindNonQueryEventHandler: function _unbindNonQueryEventHandler(evt, callback) {
- var callbacks = this.eventToCallbackMap[evt];
- if (callbacks !== undefined) {
- for (var i = 0; i < callbacks.length; i++) {
- if (callbacks[i] === callback) {
- callbacks.splice(i, 1);
- break;
- }
- }
- }
- },
- _cleanUpEventCallbacksMap: function _cleanUpEventCallbacksMap() {
- var eventNames = Object.keys(this.eventToCallbackMap);
- for (var i = 0; i < eventNames.length; i++) {
- var eventName = eventNames[i];
- delete this.eventToCallbackMap[eventName];
- }
- },
- _showTooltip: function _showTooltip() {
- if (this.options.tooltip_split === false) {
- this._addClass(this.tooltip, 'in');
- this.tooltip_min.style.display = 'none';
- this.tooltip_max.style.display = 'none';
- } else {
- this._addClass(this.tooltip_min, 'in');
- this._addClass(this.tooltip_max, 'in');
- this.tooltip.style.display = 'none';
- }
- this._state.over = true;
- },
- _hideTooltip: function _hideTooltip() {
- if (this._state.inDrag === false && this.alwaysShowTooltip !== true) {
- this._removeClass(this.tooltip, 'in');
- this._removeClass(this.tooltip_min, 'in');
- this._removeClass(this.tooltip_max, 'in');
- }
- this._state.over = false;
- },
- _setToolTipOnMouseOver: function _setToolTipOnMouseOver(tempState) {
- var formattedTooltipVal = this.options.formatter(!tempState ? this._state.value[0] : tempState.value[0]);
- var positionPercentages = !tempState ? getPositionPercentages(this._state, this.options.reversed) : getPositionPercentages(tempState, this.options.reversed);
- this._setText(this.tooltipInner, formattedTooltipVal);
-
- this.tooltip.style[this.stylePos] = positionPercentages[0] + "%";
-
- function getPositionPercentages(state, reversed) {
- if (reversed) {
- return [100 - state.percentage[0], this.options.range ? 100 - state.percentage[1] : state.percentage[1]];
- }
- return [state.percentage[0], state.percentage[1]];
- }
- },
- _addTickListener: function _addTickListener() {
- return {
- addMouseEnter: function addMouseEnter(reference, tick, index) {
- var enter = function enter() {
- var tempState = reference._state;
- var idString = index >= 0 ? index : this.attributes['aria-valuenow'].value;
- var hoverIndex = parseInt(idString, 10);
- tempState.value[0] = hoverIndex;
- tempState.percentage[0] = reference.options.ticks_positions[hoverIndex];
- reference._setToolTipOnMouseOver(tempState);
- reference._showTooltip();
- };
- tick.addEventListener("mouseenter", enter, false);
- return enter;
- },
- addMouseLeave: function addMouseLeave(reference, tick) {
- var leave = function leave() {
- reference._hideTooltip();
- };
- tick.addEventListener("mouseleave", leave, false);
- return leave;
- }
- };
- },
- _layout: function _layout() {
- var positionPercentages;
-
- if (this.options.reversed) {
- positionPercentages = [100 - this._state.percentage[0], this.options.range ? 100 - this._state.percentage[1] : this._state.percentage[1]];
- } else {
- positionPercentages = [this._state.percentage[0], this._state.percentage[1]];
- }
-
- this.handle1.style[this.stylePos] = positionPercentages[0] + "%";
- this.handle1.setAttribute('aria-valuenow', this._state.value[0]);
- if (isNaN(this.options.formatter(this._state.value[0]))) {
- this.handle1.setAttribute('aria-valuetext', this.options.formatter(this._state.value[0]));
- }
-
- this.handle2.style[this.stylePos] = positionPercentages[1] + "%";
- this.handle2.setAttribute('aria-valuenow', this._state.value[1]);
- if (isNaN(this.options.formatter(this._state.value[1]))) {
- this.handle2.setAttribute('aria-valuetext', this.options.formatter(this._state.value[1]));
- }
-
- /* Position highlight range elements */
- if (this.rangeHighlightElements.length > 0 && Array.isArray(this.options.rangeHighlights) && this.options.rangeHighlights.length > 0) {
- for (var _i = 0; _i < this.options.rangeHighlights.length; _i++) {
- var startPercent = this._toPercentage(this.options.rangeHighlights[_i].start);
- var endPercent = this._toPercentage(this.options.rangeHighlights[_i].end);
-
- if (this.options.reversed) {
- var sp = 100 - endPercent;
- endPercent = 100 - startPercent;
- startPercent = sp;
- }
-
- var currentRange = this._createHighlightRange(startPercent, endPercent);
-
- if (currentRange) {
- if (this.options.orientation === 'vertical') {
- this.rangeHighlightElements[_i].style.top = currentRange.start + "%";
- this.rangeHighlightElements[_i].style.height = currentRange.size + "%";
- } else {
- if (this.options.rtl) {
- this.rangeHighlightElements[_i].style.right = currentRange.start + "%";
- } else {
- this.rangeHighlightElements[_i].style.left = currentRange.start + "%";
- }
- this.rangeHighlightElements[_i].style.width = currentRange.size + "%";
- }
- } else {
- this.rangeHighlightElements[_i].style.display = "none";
- }
- }
- }
-
- /* Position ticks and labels */
- if (Array.isArray(this.options.ticks) && this.options.ticks.length > 0) {
-
- var styleSize = this.options.orientation === 'vertical' ? 'height' : 'width';
- var styleMargin;
- if (this.options.orientation === 'vertical') {
- styleMargin = 'marginTop';
- } else {
- if (this.options.rtl) {
- styleMargin = 'marginRight';
- } else {
- styleMargin = 'marginLeft';
- }
- }
- var labelSize = this._state.size / (this.options.ticks.length - 1);
-
- if (this.tickLabelContainer) {
- var extraMargin = 0;
- if (this.options.ticks_positions.length === 0) {
- if (this.options.orientation !== 'vertical') {
- this.tickLabelContainer.style[styleMargin] = -labelSize / 2 + "px";
- }
-
- extraMargin = this.tickLabelContainer.offsetHeight;
- } else {
- /* Chidren are position absolute, calculate height by finding the max offsetHeight of a child */
- for (i = 0; i < this.tickLabelContainer.childNodes.length; i++) {
- if (this.tickLabelContainer.childNodes[i].offsetHeight > extraMargin) {
- extraMargin = this.tickLabelContainer.childNodes[i].offsetHeight;
- }
- }
- }
- if (this.options.orientation === 'horizontal') {
- this.sliderElem.style.marginBottom = extraMargin + "px";
- }
- }
- for (var i = 0; i < this.options.ticks.length; i++) {
-
- var percentage = this.options.ticks_positions[i] || this._toPercentage(this.options.ticks[i]);
-
- if (this.options.reversed) {
- percentage = 100 - percentage;
- }
-
- this.ticks[i].style[this.stylePos] = percentage + "%";
-
- /* Set class labels to denote whether ticks are in the selection */
- this._removeClass(this.ticks[i], 'in-selection');
- if (!this.options.range) {
- if (this.options.selection === 'after' && percentage >= positionPercentages[0]) {
- this._addClass(this.ticks[i], 'in-selection');
- } else if (this.options.selection === 'before' && percentage <= positionPercentages[0]) {
- this._addClass(this.ticks[i], 'in-selection');
- }
- } else if (percentage >= positionPercentages[0] && percentage <= positionPercentages[1]) {
- this._addClass(this.ticks[i], 'in-selection');
- }
-
- if (this.tickLabels[i]) {
- this.tickLabels[i].style[styleSize] = labelSize + "px";
-
- if (this.options.orientation !== 'vertical' && this.options.ticks_positions[i] !== undefined) {
- this.tickLabels[i].style.position = 'absolute';
- this.tickLabels[i].style[this.stylePos] = percentage + "%";
- this.tickLabels[i].style[styleMargin] = -labelSize / 2 + 'px';
- } else if (this.options.orientation === 'vertical') {
- if (this.options.rtl) {
- this.tickLabels[i].style['marginRight'] = this.sliderElem.offsetWidth + "px";
- } else {
- this.tickLabels[i].style['marginLeft'] = this.sliderElem.offsetWidth + "px";
- }
- this.tickLabelContainer.style[styleMargin] = this.sliderElem.offsetWidth / 2 * -1 + 'px';
- }
- }
- }
- }
-
- var formattedTooltipVal;
-
- if (this.options.range) {
- formattedTooltipVal = this.options.formatter(this._state.value);
- this._setText(this.tooltipInner, formattedTooltipVal);
- this.tooltip.style[this.stylePos] = (positionPercentages[1] + positionPercentages[0]) / 2 + "%";
-
- var innerTooltipMinText = this.options.formatter(this._state.value[0]);
- this._setText(this.tooltipInner_min, innerTooltipMinText);
-
- var innerTooltipMaxText = this.options.formatter(this._state.value[1]);
- this._setText(this.tooltipInner_max, innerTooltipMaxText);
-
- this.tooltip_min.style[this.stylePos] = positionPercentages[0] + "%";
-
- this.tooltip_max.style[this.stylePos] = positionPercentages[1] + "%";
- } else {
- formattedTooltipVal = this.options.formatter(this._state.value[0]);
- this._setText(this.tooltipInner, formattedTooltipVal);
-
- this.tooltip.style[this.stylePos] = positionPercentages[0] + "%";
- }
-
- if (this.options.orientation === 'vertical') {
- this.trackLow.style.top = '0';
- this.trackLow.style.height = Math.min(positionPercentages[0], positionPercentages[1]) + '%';
-
- this.trackSelection.style.top = Math.min(positionPercentages[0], positionPercentages[1]) + '%';
- this.trackSelection.style.height = Math.abs(positionPercentages[0] - positionPercentages[1]) + '%';
-
- this.trackHigh.style.bottom = '0';
- this.trackHigh.style.height = 100 - Math.min(positionPercentages[0], positionPercentages[1]) - Math.abs(positionPercentages[0] - positionPercentages[1]) + '%';
- } else {
- if (this.stylePos === 'right') {
- this.trackLow.style.right = '0';
- } else {
- this.trackLow.style.left = '0';
- }
- this.trackLow.style.width = Math.min(positionPercentages[0], positionPercentages[1]) + '%';
-
- if (this.stylePos === 'right') {
- this.trackSelection.style.right = Math.min(positionPercentages[0], positionPercentages[1]) + '%';
- } else {
- this.trackSelection.style.left = Math.min(positionPercentages[0], positionPercentages[1]) + '%';
- }
- this.trackSelection.style.width = Math.abs(positionPercentages[0] - positionPercentages[1]) + '%';
-
- if (this.stylePos === 'right') {
- this.trackHigh.style.left = '0';
- } else {
- this.trackHigh.style.right = '0';
- }
- this.trackHigh.style.width = 100 - Math.min(positionPercentages[0], positionPercentages[1]) - Math.abs(positionPercentages[0] - positionPercentages[1]) + '%';
-
- var offset_min = this.tooltip_min.getBoundingClientRect();
- var offset_max = this.tooltip_max.getBoundingClientRect();
-
- if (this.options.tooltip_position === 'bottom') {
- if (offset_min.right > offset_max.left) {
- this._removeClass(this.tooltip_max, 'bottom');
- this._addClass(this.tooltip_max, 'top');
- this.tooltip_max.style.top = '';
- this.tooltip_max.style.bottom = 22 + 'px';
- } else {
- this._removeClass(this.tooltip_max, 'top');
- this._addClass(this.tooltip_max, 'bottom');
- this.tooltip_max.style.top = this.tooltip_min.style.top;
- this.tooltip_max.style.bottom = '';
- }
- } else {
- if (offset_min.right > offset_max.left) {
- this._removeClass(this.tooltip_max, 'top');
- this._addClass(this.tooltip_max, 'bottom');
- this.tooltip_max.style.top = 18 + 'px';
- } else {
- this._removeClass(this.tooltip_max, 'bottom');
- this._addClass(this.tooltip_max, 'top');
- this.tooltip_max.style.top = this.tooltip_min.style.top;
- }
- }
- }
- },
- _createHighlightRange: function _createHighlightRange(start, end) {
- if (this._isHighlightRange(start, end)) {
- if (start > end) {
- return { 'start': end, 'size': start - end };
- }
- return { 'start': start, 'size': end - start };
- }
- return null;
- },
- _isHighlightRange: function _isHighlightRange(start, end) {
- if (0 <= start && start <= 100 && 0 <= end && end <= 100) {
- return true;
- } else {
- return false;
- }
- },
- _resize: function _resize(ev) {
- /*jshint unused:false*/
- this._state.offset = this._offset(this.sliderElem);
- this._state.size = this.sliderElem[this.sizePos];
- this._layout();
- },
- _removeProperty: function _removeProperty(element, prop) {
- if (element.style.removeProperty) {
- element.style.removeProperty(prop);
- } else {
- element.style.removeAttribute(prop);
- }
- },
- _mousedown: function _mousedown(ev) {
- if (!this._state.enabled) {
- return false;
- }
-
- this._state.offset = this._offset(this.sliderElem);
- this._state.size = this.sliderElem[this.sizePos];
-
- var percentage = this._getPercentage(ev);
-
- if (this.options.range) {
- var diff1 = Math.abs(this._state.percentage[0] - percentage);
- var diff2 = Math.abs(this._state.percentage[1] - percentage);
- this._state.dragged = diff1 < diff2 ? 0 : 1;
- this._adjustPercentageForRangeSliders(percentage);
- } else {
- this._state.dragged = 0;
- }
-
- this._state.percentage[this._state.dragged] = percentage;
- this._layout();
-
- if (this.touchCapable) {
- document.removeEventListener("touchmove", this.mousemove, false);
- document.removeEventListener("touchend", this.mouseup, false);
- }
-
- if (this.mousemove) {
- document.removeEventListener("mousemove", this.mousemove, false);
- }
- if (this.mouseup) {
- document.removeEventListener("mouseup", this.mouseup, false);
- }
-
- this.mousemove = this._mousemove.bind(this);
- this.mouseup = this._mouseup.bind(this);
-
- if (this.touchCapable) {
- // Touch: Bind touch events:
- document.addEventListener("touchmove", this.mousemove, false);
- document.addEventListener("touchend", this.mouseup, false);
- }
- // Bind mouse events:
- document.addEventListener("mousemove", this.mousemove, false);
- document.addEventListener("mouseup", this.mouseup, false);
-
- this._state.inDrag = true;
- var newValue = this._calculateValue();
-
- this._trigger('slideStart', newValue);
-
- this._setDataVal(newValue);
- this.setValue(newValue, false, true);
-
- ev.returnValue = false;
-
- if (this.options.focus) {
- this._triggerFocusOnHandle(this._state.dragged);
- }
-
- return true;
- },
- _touchstart: function _touchstart(ev) {
- if (ev.changedTouches === undefined) {
- this._mousedown(ev);
- return;
- }
-
- var touch = ev.changedTouches[0];
- this.touchX = touch.pageX;
- this.touchY = touch.pageY;
- },
- _triggerFocusOnHandle: function _triggerFocusOnHandle(handleIdx) {
- if (handleIdx === 0) {
- this.handle1.focus();
- }
- if (handleIdx === 1) {
- this.handle2.focus();
- }
- },
- _keydown: function _keydown(handleIdx, ev) {
- if (!this._state.enabled) {
- return false;
- }
-
- var dir;
- switch (ev.keyCode) {
- case 37: // left
- case 40:
- // down
- dir = -1;
- break;
- case 39: // right
- case 38:
- // up
- dir = 1;
- break;
- }
- if (!dir) {
- return;
- }
-
- // use natural arrow keys instead of from min to max
- if (this.options.natural_arrow_keys) {
- var ifVerticalAndNotReversed = this.options.orientation === 'vertical' && !this.options.reversed;
- var ifHorizontalAndReversed = this.options.orientation === 'horizontal' && this.options.reversed; // @todo control with rtl
-
- if (ifVerticalAndNotReversed || ifHorizontalAndReversed) {
- dir = -dir;
- }
- }
-
- var val = this._state.value[handleIdx] + dir * this.options.step;
- var percentage = val / this.options.max * 100;
- this._state.keyCtrl = handleIdx;
- if (this.options.range) {
- this._adjustPercentageForRangeSliders(percentage);
- var val1 = !this._state.keyCtrl ? val : this._state.value[0];
- var val2 = this._state.keyCtrl ? val : this._state.value[1];
- val = [val1, val2];
- }
-
- this._trigger('slideStart', val);
- this._setDataVal(val);
- this.setValue(val, true, true);
-
- this._setDataVal(val);
- this._trigger('slideStop', val);
- this._layout();
-
- this._pauseEvent(ev);
- delete this._state.keyCtrl;
-
- return false;
- },
- _pauseEvent: function _pauseEvent(ev) {
- if (ev.stopPropagation) {
- ev.stopPropagation();
- }
- if (ev.preventDefault) {
- ev.preventDefault();
- }
- ev.cancelBubble = true;
- ev.returnValue = false;
- },
- _mousemove: function _mousemove(ev) {
- if (!this._state.enabled) {
- return false;
- }
-
- var percentage = this._getPercentage(ev);
- this._adjustPercentageForRangeSliders(percentage);
- this._state.percentage[this._state.dragged] = percentage;
- this._layout();
-
- var val = this._calculateValue(true);
- this.setValue(val, true, true);
-
- return false;
- },
- _touchmove: function _touchmove(ev) {
- if (ev.changedTouches === undefined) {
- return;
- }
-
- var touch = ev.changedTouches[0];
-
- var xDiff = touch.pageX - this.touchX;
- var yDiff = touch.pageY - this.touchY;
-
- if (!this._state.inDrag) {
- // Vertical Slider
- if (this.options.orientation === 'vertical' && xDiff <= 5 && xDiff >= -5 && (yDiff >= 15 || yDiff <= -15)) {
- this._mousedown(ev);
- }
- // Horizontal slider.
- else if (yDiff <= 5 && yDiff >= -5 && (xDiff >= 15 || xDiff <= -15)) {
- this._mousedown(ev);
- }
- }
- },
- _adjustPercentageForRangeSliders: function _adjustPercentageForRangeSliders(percentage) {
- if (this.options.range) {
- var precision = this._getNumDigitsAfterDecimalPlace(percentage);
- precision = precision ? precision - 1 : 0;
- var percentageWithAdjustedPrecision = this._applyToFixedAndParseFloat(percentage, precision);
- if (this._state.dragged === 0 && this._applyToFixedAndParseFloat(this._state.percentage[1], precision) < percentageWithAdjustedPrecision) {
- this._state.percentage[0] = this._state.percentage[1];
- this._state.dragged = 1;
- } else if (this._state.dragged === 1 && this._applyToFixedAndParseFloat(this._state.percentage[0], precision) > percentageWithAdjustedPrecision) {
- this._state.percentage[1] = this._state.percentage[0];
- this._state.dragged = 0;
- } else if (this._state.keyCtrl === 0 && this._state.value[1] / this.options.max * 100 < percentage) {
- this._state.percentage[0] = this._state.percentage[1];
- this._state.keyCtrl = 1;
- this.handle2.focus();
- } else if (this._state.keyCtrl === 1 && this._state.value[0] / this.options.max * 100 > percentage) {
- this._state.percentage[1] = this._state.percentage[0];
- this._state.keyCtrl = 0;
- this.handle1.focus();
- }
- }
- },
- _mouseup: function _mouseup() {
- if (!this._state.enabled) {
- return false;
- }
- if (this.touchCapable) {
- // Touch: Unbind touch event handlers:
- document.removeEventListener("touchmove", this.mousemove, false);
- document.removeEventListener("touchend", this.mouseup, false);
- }
- // Unbind mouse event handlers:
- document.removeEventListener("mousemove", this.mousemove, false);
- document.removeEventListener("mouseup", this.mouseup, false);
-
- this._state.inDrag = false;
- if (this._state.over === false) {
- this._hideTooltip();
- }
- var val = this._calculateValue(true);
-
- this._layout();
- this._setDataVal(val);
- this._trigger('slideStop', val);
-
- return false;
- },
- _calculateValue: function _calculateValue(snapToClosestTick) {
- var val;
- if (this.options.range) {
- val = [this.options.min, this.options.max];
- if (this._state.percentage[0] !== 0) {
- val[0] = this._toValue(this._state.percentage[0]);
- val[0] = this._applyPrecision(val[0]);
- }
- if (this._state.percentage[1] !== 100) {
- val[1] = this._toValue(this._state.percentage[1]);
- val[1] = this._applyPrecision(val[1]);
- }
- } else {
- val = this._toValue(this._state.percentage[0]);
- val = parseFloat(val);
- val = this._applyPrecision(val);
- }
-
- if (snapToClosestTick) {
- var min = [val, Infinity];
- for (var i = 0; i < this.options.ticks.length; i++) {
- var diff = Math.abs(this.options.ticks[i] - val);
- if (diff <= min[1]) {
- min = [this.options.ticks[i], diff];
- }
- }
- if (min[1] <= this.options.ticks_snap_bounds) {
- return min[0];
- }
- }
-
- return val;
- },
- _applyPrecision: function _applyPrecision(val) {
- var precision = this.options.precision || this._getNumDigitsAfterDecimalPlace(this.options.step);
- return this._applyToFixedAndParseFloat(val, precision);
- },
- _getNumDigitsAfterDecimalPlace: function _getNumDigitsAfterDecimalPlace(num) {
- var match = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
- if (!match) {
- return 0;
- }
- return Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0));
- },
- _applyToFixedAndParseFloat: function _applyToFixedAndParseFloat(num, toFixedInput) {
- var truncatedNum = num.toFixed(toFixedInput);
- return parseFloat(truncatedNum);
- },
- /*
- Credits to Mike Samuel for the following method!
- Source: http://stackoverflow.com/questions/10454518/javascript-how-to-retrieve-the-number-of-decimals-of-a-string-number
- */
- _getPercentage: function _getPercentage(ev) {
- if (this.touchCapable && (ev.type === 'touchstart' || ev.type === 'touchmove')) {
- ev = ev.touches[0];
- }
-
- var eventPosition = ev[this.mousePos];
- var sliderOffset = this._state.offset[this.stylePos];
- var distanceToSlide = eventPosition - sliderOffset;
- if (this.stylePos === 'right') {
- distanceToSlide = -distanceToSlide;
- }
- // Calculate what percent of the length the slider handle has slid
- var percentage = distanceToSlide / this._state.size * 100;
- percentage = Math.round(percentage / this._state.percentage[2]) * this._state.percentage[2];
- if (this.options.reversed) {
- percentage = 100 - percentage;
- }
-
- // Make sure the percent is within the bounds of the slider.
- // 0% corresponds to the 'min' value of the slide
- // 100% corresponds to the 'max' value of the slide
- return Math.max(0, Math.min(100, percentage));
- },
- _validateInputValue: function _validateInputValue(val) {
- if (!isNaN(+val)) {
- return +val;
- } else if (Array.isArray(val)) {
- this._validateArray(val);
- return val;
- } else {
- throw new Error(ErrorMsgs.formatInvalidInputErrorMsg(val));
- }
- },
- _validateArray: function _validateArray(val) {
- for (var i = 0; i < val.length; i++) {
- var input = val[i];
- if (typeof input !== 'number') {
- throw new Error(ErrorMsgs.formatInvalidInputErrorMsg(input));
- }
- }
- },
- _setDataVal: function _setDataVal(val) {
- this.element.setAttribute('data-value', val);
- this.element.setAttribute('value', val);
- this.element.value = val;
- },
- _trigger: function _trigger(evt, val) {
- val = val || val === 0 ? val : undefined;
-
- var callbackFnArray = this.eventToCallbackMap[evt];
- if (callbackFnArray && callbackFnArray.length) {
- for (var i = 0; i < callbackFnArray.length; i++) {
- var callbackFn = callbackFnArray[i];
- callbackFn(val);
- }
- }
-
- /* If JQuery exists, trigger JQuery events */
- if ($) {
- this._triggerJQueryEvent(evt, val);
- }
- },
- _triggerJQueryEvent: function _triggerJQueryEvent(evt, val) {
- var eventData = {
- type: evt,
- value: val
- };
- this.$element.trigger(eventData);
- this.$sliderElem.trigger(eventData);
- },
- _unbindJQueryEventHandlers: function _unbindJQueryEventHandlers() {
- this.$element.off();
- this.$sliderElem.off();
- },
- _setText: function _setText(element, text) {
- if (typeof element.textContent !== "undefined") {
- element.textContent = text;
- } else if (typeof element.innerText !== "undefined") {
- element.innerText = text;
- }
- },
- _removeClass: function _removeClass(element, classString) {
- var classes = classString.split(" ");
- var newClasses = element.className;
-
- for (var i = 0; i < classes.length; i++) {
- var classTag = classes[i];
- var regex = new RegExp("(?:\\s|^)" + classTag + "(?:\\s|$)");
- newClasses = newClasses.replace(regex, " ");
- }
-
- element.className = newClasses.trim();
- },
- _addClass: function _addClass(element, classString) {
- var classes = classString.split(" ");
- var newClasses = element.className;
-
- for (var i = 0; i < classes.length; i++) {
- var classTag = classes[i];
- var regex = new RegExp("(?:\\s|^)" + classTag + "(?:\\s|$)");
- var ifClassExists = regex.test(newClasses);
-
- if (!ifClassExists) {
- newClasses += " " + classTag;
- }
- }
-
- element.className = newClasses.trim();
- },
- _offsetLeft: function _offsetLeft(obj) {
- return obj.getBoundingClientRect().left;
- },
- _offsetRight: function _offsetRight(obj) {
- return obj.getBoundingClientRect().right;
- },
- _offsetTop: function _offsetTop(obj) {
- var offsetTop = obj.offsetTop;
- while ((obj = obj.offsetParent) && !isNaN(obj.offsetTop)) {
- offsetTop += obj.offsetTop;
- if (obj.tagName !== 'BODY') {
- offsetTop -= obj.scrollTop;
- }
- }
- return offsetTop;
- },
- _offset: function _offset(obj) {
- return {
- left: this._offsetLeft(obj),
- right: this._offsetRight(obj),
- top: this._offsetTop(obj)
- };
- },
- _css: function _css(elementRef, styleName, value) {
- if ($) {
- $.style(elementRef, styleName, value);
- } else {
- var style = styleName.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function (all, letter) {
- return letter.toUpperCase();
- });
- elementRef.style[style] = value;
- }
- },
- _toValue: function _toValue(percentage) {
- return this.options.scale.toValue.apply(this, [percentage]);
- },
- _toPercentage: function _toPercentage(value) {
- return this.options.scale.toPercentage.apply(this, [value]);
- },
- _setTooltipPosition: function _setTooltipPosition() {
- var tooltips = [this.tooltip, this.tooltip_min, this.tooltip_max];
- if (this.options.orientation === 'vertical') {
- var tooltipPos;
- if (this.options.tooltip_position) {
- tooltipPos = this.options.tooltip_position;
- } else {
- if (this.options.rtl) {
- tooltipPos = 'left';
- } else {
- tooltipPos = 'right';
- }
- }
- var oppositeSide = tooltipPos === 'left' ? 'right' : 'left';
- tooltips.forEach(function (tooltip) {
- this._addClass(tooltip, tooltipPos);
- tooltip.style[oppositeSide] = '100%';
- }.bind(this));
- } else if (this.options.tooltip_position === 'bottom') {
- tooltips.forEach(function (tooltip) {
- this._addClass(tooltip, 'bottom');
- tooltip.style.top = 22 + 'px';
- }.bind(this));
- } else {
- tooltips.forEach(function (tooltip) {
- this._addClass(tooltip, 'top');
- tooltip.style.top = -this.tooltip.outerHeight - 14 + 'px';
- }.bind(this));
- }
- }
- };
-
- /*********************************
- Attach to global namespace
- *********************************/
- if ($ && $.fn) {
- var autoRegisterNamespace = void 0;
-
- if (!$.fn.slider) {
- $.bridget(NAMESPACE_MAIN, Slider);
- autoRegisterNamespace = NAMESPACE_MAIN;
- } else {
- if (windowIsDefined) {
- window.console.warn("bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead.");
- }
- autoRegisterNamespace = NAMESPACE_ALTERNATE;
- }
- $.bridget(NAMESPACE_ALTERNATE, Slider);
-
- // Auto-Register data-provide="slider" Elements
- $(function () {
- $("input[data-provide=slider]")[autoRegisterNamespace]();
- });
- }
- })($);
-
- return Slider;
-});
diff --git a/debian/missing-sources/bootstrap-table-1.11.0.js b/debian/missing-sources/bootstrap-table-1.11.0.js
deleted file mode 100644
index cf9e61a2..00000000
--- a/debian/missing-sources/bootstrap-table-1.11.0.js
+++ /dev/null
@@ -1,3019 +0,0 @@
-/**
- * @author zhixin wen <wenzhixin2010@gmail.com>
- * version: 1.11.0
- * https://github.com/wenzhixin/bootstrap-table/
- */
-
-(function ($) {
- 'use strict';
-
- // TOOLS DEFINITION
- // ======================
-
- var cachedWidth = null;
-
- // it only does '%s', and return '' when arguments are undefined
- var sprintf = function (str) {
- var args = arguments,
- flag = true,
- i = 1;
-
- str = str.replace(/%s/g, function () {
- var arg = args[i++];
-
- if (typeof arg === 'undefined') {
- flag = false;
- return '';
- }
- return arg;
- });
- return flag ? str : '';
- };
-
- var getPropertyFromOther = function (list, from, to, value) {
- var result = '';
- $.each(list, function (i, item) {
- if (item[from] === value) {
- result = item[to];
- return false;
- }
- return true;
- });
- return result;
- };
-
- var getFieldIndex = function (columns, field) {
- var index = -1;
-
- $.each(columns, function (i, column) {
- if (column.field === field) {
- index = i;
- return false;
- }
- return true;
- });
- return index;
- };
-
- // http://jsfiddle.net/wenyi/47nz7ez9/3/
- var setFieldIndex = function (columns) {
- var i, j, k,
- totalCol = 0,
- flag = [];
-
- for (i = 0; i < columns[0].length; i++) {
- totalCol += columns[0][i].colspan || 1;
- }
-
- for (i = 0; i < columns.length; i++) {
- flag[i] = [];
- for (j = 0; j < totalCol; j++) {
- flag[i][j] = false;
- }
- }
-
- for (i = 0; i < columns.length; i++) {
- for (j = 0; j < columns[i].length; j++) {
- var r = columns[i][j],
- rowspan = r.rowspan || 1,
- colspan = r.colspan || 1,
- index = $.inArray(false, flag[i]);
-
- if (colspan === 1) {
- r.fieldIndex = index;
- // when field is undefined, use index instead
- if (typeof r.field === 'undefined') {
- r.field = index;
- }
- }
-
- for (k = 0; k < rowspan; k++) {
- flag[i + k][index] = true;
- }
- for (k = 0; k < colspan; k++) {
- flag[i][index + k] = true;
- }
- }
- }
- };
-
- var getScrollBarWidth = function () {
- if (cachedWidth === null) {
- var inner = $('<p/>').addClass('fixed-table-scroll-inner'),
- outer = $('<div/>').addClass('fixed-table-scroll-outer'),
- w1, w2;
-
- outer.append(inner);
- $('body').append(outer);
-
- w1 = inner[0].offsetWidth;
- outer.css('overflow', 'scroll');
- w2 = inner[0].offsetWidth;
-
- if (w1 === w2) {
- w2 = outer[0].clientWidth;
- }
-
- outer.remove();
- cachedWidth = w1 - w2;
- }
- return cachedWidth;
- };
-
- var calculateObjectValue = function (self, name, args, defaultValue) {
- var func = name;
-
- if (typeof name === 'string') {
- // support obj.func1.func2
- var names = name.split('.');
-
- if (names.length > 1) {
- func = window;
- $.each(names, function (i, f) {
- func = func[f];
- });
- } else {
- func = window[name];
- }
- }
- if (typeof func === 'object') {
- return func;
- }
- if (typeof func === 'function') {
- return func.apply(self, args);
- }
- if (!func && typeof name === 'string' && sprintf.apply(this, [name].concat(args))) {
- return sprintf.apply(this, [name].concat(args));
- }
- return defaultValue;
- };
-
- var compareObjects = function (objectA, objectB, compareLength) {
- // Create arrays of property names
- var objectAProperties = Object.getOwnPropertyNames(objectA),
- objectBProperties = Object.getOwnPropertyNames(objectB),
- propName = '';
-
- if (compareLength) {
- // If number of properties is different, objects are not equivalent
- if (objectAProperties.length !== objectBProperties.length) {
- return false;
- }
- }
-
- for (var i = 0; i < objectAProperties.length; i++) {
- propName = objectAProperties[i];
-
- // If the property is not in the object B properties, continue with the next property
- if ($.inArray(propName, objectBProperties) > -1) {
- // If values of same property are not equal, objects are not equivalent
- if (objectA[propName] !== objectB[propName]) {
- return false;
- }
- }
- }
-
- // If we made it this far, objects are considered equivalent
- return true;
- };
-
- var escapeHTML = function (text) {
- if (typeof text === 'string') {
- return text
- .replace(/&/g, '&amp;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;')
- .replace(/"/g, '&quot;')
- .replace(/'/g, '&#039;')
- .replace(/`/g, '&#x60;');
- }
- return text;
- };
-
- var getRealHeight = function ($el) {
- var height = 0;
- $el.children().each(function () {
- if (height < $(this).outerHeight(true)) {
- height = $(this).outerHeight(true);
- }
- });
- return height;
- };
-
- var getRealDataAttr = function (dataAttr) {
- for (var attr in dataAttr) {
- var auxAttr = attr.split(/(?=[A-Z])/).join('-').toLowerCase();
- if (auxAttr !== attr) {
- dataAttr[auxAttr] = dataAttr[attr];
- delete dataAttr[attr];
- }
- }
-
- return dataAttr;
- };
-
- var getItemField = function (item, field, escape) {
- var value = item;
-
- if (typeof field !== 'string' || item.hasOwnProperty(field)) {
- return escape ? escapeHTML(item[field]) : item[field];
- }
- var props = field.split('.');
- for (var p in props) {
- value = value && value[props[p]];
- }
- return escape ? escapeHTML(value) : value;
- };
-
- var isIEBrowser = function () {
- return !!(navigator.userAgent.indexOf("MSIE ") > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./));
- };
-
- var objectKeys = function () {
- // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
- if (!Object.keys) {
- Object.keys = (function() {
- var hasOwnProperty = Object.prototype.hasOwnProperty,
- hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),
- dontEnums = [
- 'toString',
- 'toLocaleString',
- 'valueOf',
- 'hasOwnProperty',
- 'isPrototypeOf',
- 'propertyIsEnumerable',
- 'constructor'
- ],
- dontEnumsLength = dontEnums.length;
-
- return function(obj) {
- if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {
- throw new TypeError('Object.keys called on non-object');
- }
-
- var result = [], prop, i;
-
- for (prop in obj) {
- if (hasOwnProperty.call(obj, prop)) {
- result.push(prop);
- }
- }
-
- if (hasDontEnumBug) {
- for (i = 0; i < dontEnumsLength; i++) {
- if (hasOwnProperty.call(obj, dontEnums[i])) {
- result.push(dontEnums[i]);
- }
- }
- }
- return result;
- };
- }());
- }
- };
-
- // BOOTSTRAP TABLE CLASS DEFINITION
- // ======================
-
- var BootstrapTable = function (el, options) {
- this.options = options;
- this.$el = $(el);
- this.$el_ = this.$el.clone();
- this.timeoutId_ = 0;
- this.timeoutFooter_ = 0;
-
- this.init();
- };
-
- BootstrapTable.DEFAULTS = {
- classes: 'table table-hover',
- locale: undefined,
- height: undefined,
- undefinedText: '-',
- sortName: undefined,
- sortOrder: 'asc',
- sortStable: false,
- striped: false,
- columns: [[]],
- data: [],
- dataField: 'rows',
- method: 'get',
- url: undefined,
- ajax: undefined,
- cache: true,
- contentType: 'application/json',
- dataType: 'json',
- ajaxOptions: {},
- queryParams: function (params) {
- return params;
- },
- queryParamsType: 'limit', // undefined
- responseHandler: function (res) {
- return res;
- },
- pagination: false,
- onlyInfoPagination: false,
- sidePagination: 'client', // client or server
- totalRows: 0, // server side need to set
- pageNumber: 1,
- pageSize: 10,
- pageList: [10, 25, 50, 100],
- paginationHAlign: 'right', //right, left
- paginationVAlign: 'bottom', //bottom, top, both
- paginationDetailHAlign: 'left', //right, left
- paginationPreText: '&lsaquo;',
- paginationNextText: '&rsaquo;',
- search: false,
- searchOnEnterKey: false,
- strictSearch: false,
- searchAlign: 'right',
- selectItemName: 'btSelectItem',
- showHeader: true,
- showFooter: false,
- showColumns: false,
- showPaginationSwitch: false,
- showRefresh: false,
- showToggle: false,
- buttonsAlign: 'right',
- smartDisplay: true,
- escape: false,
- minimumCountColumns: 1,
- idField: undefined,
- uniqueId: undefined,
- cardView: false,
- detailView: false,
- detailFormatter: function (index, row) {
- return '';
- },
- trimOnSearch: true,
- clickToSelect: false,
- singleSelect: false,
- toolbar: undefined,
- toolbarAlign: 'left',
- checkboxHeader: true,
- sortable: true,
- silentSort: true,
- maintainSelected: false,
- searchTimeOut: 500,
- searchText: '',
- iconSize: undefined,
- buttonsClass: 'default',
- iconsPrefix: 'glyphicon', // glyphicon of fa (font awesome)
- icons: {
- paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down',
- paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up',
- refresh: 'glyphicon-refresh icon-refresh',
- toggle: 'glyphicon-list-alt icon-list-alt',
- columns: 'glyphicon-th icon-th',
- detailOpen: 'glyphicon-plus icon-plus',
- detailClose: 'glyphicon-minus icon-minus'
- },
-
- customSearch: $.noop,
-
- customSort: $.noop,
-
- rowStyle: function (row, index) {
- return {};
- },
-
- rowAttributes: function (row, index) {
- return {};
- },
-
- footerStyle: function (row, index) {
- return {};
- },
-
- onAll: function (name, args) {
- return false;
- },
- onClickCell: function (field, value, row, $element) {
- return false;
- },
- onDblClickCell: function (field, value, row, $element) {
- return false;
- },
- onClickRow: function (item, $element) {
- return false;
- },
- onDblClickRow: function (item, $element) {
- return false;
- },
- onSort: function (name, order) {
- return false;
- },
- onCheck: function (row) {
- return false;
- },
- onUncheck: function (row) {
- return false;
- },
- onCheckAll: function (rows) {
- return false;
- },
- onUncheckAll: function (rows) {
- return false;
- },
- onCheckSome: function (rows) {
- return false;
- },
- onUncheckSome: function (rows) {
- return false;
- },
- onLoadSuccess: function (data) {
- return false;
- },
- onLoadError: function (status) {
- return false;
- },
- onColumnSwitch: function (field, checked) {
- return false;
- },
- onPageChange: function (number, size) {
- return false;
- },
- onSearch: function (text) {
- return false;
- },
- onToggle: function (cardView) {
- return false;
- },
- onPreBody: function (data) {
- return false;
- },
- onPostBody: function () {
- return false;
- },
- onPostHeader: function () {
- return false;
- },
- onExpandRow: function (index, row, $detail) {
- return false;
- },
- onCollapseRow: function (index, row) {
- return false;
- },
- onRefreshOptions: function (options) {
- return false;
- },
- onRefresh: function (params) {
- return false;
- },
- onResetView: function () {
- return false;
- }
- };
-
- BootstrapTable.LOCALES = {};
-
- BootstrapTable.LOCALES['en-US'] = BootstrapTable.LOCALES.en = {
- formatLoadingMessage: function () {
- return 'Loading, please wait...';
- },
- formatRecordsPerPage: function (pageNumber) {
- return sprintf('%s rows per page', pageNumber);
- },
- formatShowingRows: function (pageFrom, pageTo, totalRows) {
- return sprintf('Showing %s to %s of %s rows', pageFrom, pageTo, totalRows);
- },
- formatDetailPagination: function (totalRows) {
- return sprintf('Showing %s rows', totalRows);
- },
- formatSearch: function () {
- return 'Search';
- },
- formatNoMatches: function () {
- return 'No matching records found';
- },
- formatPaginationSwitch: function () {
- return 'Hide/Show pagination';
- },
- formatRefresh: function () {
- return 'Refresh';
- },
- formatToggle: function () {
- return 'Toggle';
- },
- formatColumns: function () {
- return 'Columns';
- },
- formatAllRows: function () {
- return 'All';
- }
- };
-
- $.extend(BootstrapTable.DEFAULTS, BootstrapTable.LOCALES['en-US']);
-
- BootstrapTable.COLUMN_DEFAULTS = {
- radio: false,
- checkbox: false,
- checkboxEnabled: true,
- field: undefined,
- title: undefined,
- titleTooltip: undefined,
- 'class': undefined,
- align: undefined, // left, right, center
- halign: undefined, // left, right, center
- falign: undefined, // left, right, center
- valign: undefined, // top, middle, bottom
- width: undefined,
- sortable: false,
- order: 'asc', // asc, desc
- visible: true,
- switchable: true,
- clickToSelect: true,
- formatter: undefined,
- footerFormatter: undefined,
- events: undefined,
- sorter: undefined,
- sortName: undefined,
- cellStyle: undefined,
- searchable: true,
- searchFormatter: true,
- cardVisible: true
- };
-
- BootstrapTable.EVENTS = {
- 'all.bs.table': 'onAll',
- 'click-cell.bs.table': 'onClickCell',
- 'dbl-click-cell.bs.table': 'onDblClickCell',
- 'click-row.bs.table': 'onClickRow',
- 'dbl-click-row.bs.table': 'onDblClickRow',
- 'sort.bs.table': 'onSort',
- 'check.bs.table': 'onCheck',
- 'uncheck.bs.table': 'onUncheck',
- 'check-all.bs.table': 'onCheckAll',
- 'uncheck-all.bs.table': 'onUncheckAll',
- 'check-some.bs.table': 'onCheckSome',
- 'uncheck-some.bs.table': 'onUncheckSome',
- 'load-success.bs.table': 'onLoadSuccess',
- 'load-error.bs.table': 'onLoadError',
- 'column-switch.bs.table': 'onColumnSwitch',
- 'page-change.bs.table': 'onPageChange',
- 'search.bs.table': 'onSearch',
- 'toggle.bs.table': 'onToggle',
- 'pre-body.bs.table': 'onPreBody',
- 'post-body.bs.table': 'onPostBody',
- 'post-header.bs.table': 'onPostHeader',
- 'expand-row.bs.table': 'onExpandRow',
- 'collapse-row.bs.table': 'onCollapseRow',
- 'refresh-options.bs.table': 'onRefreshOptions',
- 'reset-view.bs.table': 'onResetView',
- 'refresh.bs.table': 'onRefresh'
- };
-
- BootstrapTable.prototype.init = function () {
- this.initLocale();
- this.initContainer();
- this.initTable();
- this.initHeader();
- this.initData();
- this.initFooter();
- this.initToolbar();
- this.initPagination();
- this.initBody();
- this.initSearchText();
- this.initServer();
- };
-
- BootstrapTable.prototype.initLocale = function () {
- if (this.options.locale) {
- var parts = this.options.locale.split(/-|_/);
- parts[0].toLowerCase();
- if (parts[1]) parts[1].toUpperCase();
- if ($.fn.bootstrapTable.locales[this.options.locale]) {
- // locale as requested
- $.extend(this.options, $.fn.bootstrapTable.locales[this.options.locale]);
- } else if ($.fn.bootstrapTable.locales[parts.join('-')]) {
- // locale with sep set to - (in case original was specified with _)
- $.extend(this.options, $.fn.bootstrapTable.locales[parts.join('-')]);
- } else if ($.fn.bootstrapTable.locales[parts[0]]) {
- // short locale language code (i.e. 'en')
- $.extend(this.options, $.fn.bootstrapTable.locales[parts[0]]);
- }
- }
- };
-
- BootstrapTable.prototype.initContainer = function () {
- this.$container = $([
- '<div class="bootstrap-table">',
- '<div class="fixed-table-toolbar"></div>',
- this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
- '<div class="fixed-table-pagination" style="clear: both;"></div>' :
- '',
- '<div class="fixed-table-container">',
- '<div class="fixed-table-header"><table></table></div>',
- '<div class="fixed-table-body">',
- '<div class="fixed-table-loading">',
- this.options.formatLoadingMessage(),
- '</div>',
- '</div>',
- '<div class="fixed-table-footer"><table><tr></tr></table></div>',
- this.options.paginationVAlign === 'bottom' || this.options.paginationVAlign === 'both' ?
- '<div class="fixed-table-pagination"></div>' :
- '',
- '</div>',
- '</div>'
- ].join(''));
-
- this.$container.insertAfter(this.$el);
- this.$tableContainer = this.$container.find('.fixed-table-container');
- this.$tableHeader = this.$container.find('.fixed-table-header');
- this.$tableBody = this.$container.find('.fixed-table-body');
- this.$tableLoading = this.$container.find('.fixed-table-loading');
- this.$tableFooter = this.$container.find('.fixed-table-footer');
- this.$toolbar = this.$container.find('.fixed-table-toolbar');
- this.$pagination = this.$container.find('.fixed-table-pagination');
-
- this.$tableBody.append(this.$el);
- this.$container.after('<div class="clearfix"></div>');
-
- this.$el.addClass(this.options.classes);
- if (this.options.striped) {
- this.$el.addClass('table-striped');
- }
- if ($.inArray('table-no-bordered', this.options.classes.split(' ')) !== -1) {
- this.$tableContainer.addClass('table-no-bordered');
- }
- };
-
- BootstrapTable.prototype.initTable = function () {
- var that = this,
- columns = [],
- data = [];
-
- this.$header = this.$el.find('>thead');
- if (!this.$header.length) {
- this.$header = $('<thead></thead>').appendTo(this.$el);
- }
- this.$header.find('tr').each(function () {
- var column = [];
-
- $(this).find('th').each(function () {
- // Fix #2014 - getFieldIndex and elsewhere assume this is string, causes issues if not
- if (typeof $(this).data('field') !== 'undefined') {
- $(this).data('field', $(this).data('field') + '');
- }
- column.push($.extend({}, {
- title: $(this).html(),
- 'class': $(this).attr('class'),
- titleTooltip: $(this).attr('title'),
- rowspan: $(this).attr('rowspan') ? +$(this).attr('rowspan') : undefined,
- colspan: $(this).attr('colspan') ? +$(this).attr('colspan') : undefined
- }, $(this).data()));
- });
- columns.push(column);
- });
- if (!$.isArray(this.options.columns[0])) {
- this.options.columns = [this.options.columns];
- }
- this.options.columns = $.extend(true, [], columns, this.options.columns);
- this.columns = [];
-
- setFieldIndex(this.options.columns);
- $.each(this.options.columns, function (i, columns) {
- $.each(columns, function (j, column) {
- column = $.extend({}, BootstrapTable.COLUMN_DEFAULTS, column);
-
- if (typeof column.fieldIndex !== 'undefined') {
- that.columns[column.fieldIndex] = column;
- }
-
- that.options.columns[i][j] = column;
- });
- });
-
- // if options.data is setting, do not process tbody data
- if (this.options.data.length) {
- return;
- }
-
- var m = [];
- this.$el.find('>tbody>tr').each(function (y) {
- var row = {};
-
- // save tr's id, class and data-* attributes
- row._id = $(this).attr('id');
- row._class = $(this).attr('class');
- row._data = getRealDataAttr($(this).data());
-
- $(this).find('>td').each(function (x) {
- var $this = $(this),
- cspan = +$this.attr('colspan') || 1,
- rspan = +$this.attr('rowspan') || 1,
- tx, ty;
-
- for (; m[y] && m[y][x]; x++); //skip already occupied cells in current row
-
- for (tx = x; tx < x + cspan; tx++) { //mark matrix elements occupied by current cell with true
- for (ty = y; ty < y + rspan; ty++) {
- if (!m[ty]) { //fill missing rows
- m[ty] = [];
- }
- m[ty][tx] = true;
- }
- }
-
- var field = that.columns[x].field;
-
- row[field] = $(this).html();
- // save td's id, class and data-* attributes
- row['_' + field + '_id'] = $(this).attr('id');
- row['_' + field + '_class'] = $(this).attr('class');
- row['_' + field + '_rowspan'] = $(this).attr('rowspan');
- row['_' + field + '_colspan'] = $(this).attr('colspan');
- row['_' + field + '_title'] = $(this).attr('title');
- row['_' + field + '_data'] = getRealDataAttr($(this).data());
- });
- data.push(row);
- });
- this.options.data = data;
- if (data.length) this.fromHtml = true;
- };
-
- BootstrapTable.prototype.initHeader = function () {
- var that = this,
- visibleColumns = {},
- html = [];
-
- this.header = {
- fields: [],
- styles: [],
- classes: [],
- formatters: [],
- events: [],
- sorters: [],
- sortNames: [],
- cellStyles: [],
- searchables: []
- };
-
- $.each(this.options.columns, function (i, columns) {
- html.push('<tr>');
-
- if (i === 0 && !that.options.cardView && that.options.detailView) {
- html.push(sprintf('<th class="detail" rowspan="%s"><div class="fht-cell"></div></th>',
- that.options.columns.length));
- }
-
- $.each(columns, function (j, column) {
- var text = '',
- halign = '', // header align style
- align = '', // body align style
- style = '',
- class_ = sprintf(' class="%s"', column['class']),
- order = that.options.sortOrder || column.order,
- unitWidth = 'px',
- width = column.width;
-
- if (column.width !== undefined && (!that.options.cardView)) {
- if (typeof column.width === 'string') {
- if (column.width.indexOf('%') !== -1) {
- unitWidth = '%';
- }
- }
- }
- if (column.width && typeof column.width === 'string') {
- width = column.width.replace('%', '').replace('px', '');
- }
-
- halign = sprintf('text-align: %s; ', column.halign ? column.halign : column.align);
- align = sprintf('text-align: %s; ', column.align);
- style = sprintf('vertical-align: %s; ', column.valign);
- style += sprintf('width: %s; ', (column.checkbox || column.radio) && !width ?
- '36px' : (width ? width + unitWidth : undefined));
-
- if (typeof column.fieldIndex !== 'undefined') {
- that.header.fields[column.fieldIndex] = column.field;
- that.header.styles[column.fieldIndex] = align + style;
- that.header.classes[column.fieldIndex] = class_;
- that.header.formatters[column.fieldIndex] = column.formatter;
- that.header.events[column.fieldIndex] = column.events;
- that.header.sorters[column.fieldIndex] = column.sorter;
- that.header.sortNames[column.fieldIndex] = column.sortName;
- that.header.cellStyles[column.fieldIndex] = column.cellStyle;
- that.header.searchables[column.fieldIndex] = column.searchable;
-
- if (!column.visible) {
- return;
- }
-
- if (that.options.cardView && (!column.cardVisible)) {
- return;
- }
-
- visibleColumns[column.field] = column;
- }
-
- html.push('<th' + sprintf(' title="%s"', column.titleTooltip),
- column.checkbox || column.radio ?
- sprintf(' class="bs-checkbox %s"', column['class'] || '') :
- class_,
- sprintf(' style="%s"', halign + style),
- sprintf(' rowspan="%s"', column.rowspan),
- sprintf(' colspan="%s"', column.colspan),
- sprintf(' data-field="%s"', column.field),
- "tabindex='0'",
- '>');
-
- html.push(sprintf('<div class="th-inner %s">', that.options.sortable && column.sortable ?
- 'sortable both' : ''));
-
- text = column.title;
-
- if (column.checkbox) {
- if (!that.options.singleSelect && that.options.checkboxHeader) {
- text = '<input name="btSelectAll" type="checkbox" />';
- }
- that.header.stateField = column.field;
- }
- if (column.radio) {
- text = '';
- that.header.stateField = column.field;
- that.options.singleSelect = true;
- }
-
- html.push(text);
- html.push('</div>');
- html.push('<div class="fht-cell"></div>');
- html.push('</div>');
- html.push('</th>');
- });
- html.push('</tr>');
- });
-
- this.$header.html(html.join(''));
- this.$header.find('th[data-field]').each(function (i) {
- $(this).data(visibleColumns[$(this).data('field')]);
- });
- this.$container.off('click', '.th-inner').on('click', '.th-inner', function (event) {
- var target = $(this);
-
- if (that.options.detailView) {
- if (target.closest('.bootstrap-table')[0] !== that.$container[0])
- return false;
- }
-
- if (that.options.sortable && target.parent().data().sortable) {
- that.onSort(event);
- }
- });
-
- this.$header.children().children().off('keypress').on('keypress', function (event) {
- if (that.options.sortable && $(this).data().sortable) {
- var code = event.keyCode || event.which;
- if (code == 13) { //Enter keycode
- that.onSort(event);
- }
- }
- });
-
- $(window).off('resize.bootstrap-table');
- if (!this.options.showHeader || this.options.cardView) {
- this.$header.hide();
- this.$tableHeader.hide();
- this.$tableLoading.css('top', 0);
- } else {
- this.$header.show();
- this.$tableHeader.show();
- this.$tableLoading.css('top', this.$header.outerHeight() + 1);
- // Assign the correct sortable arrow
- this.getCaret();
- $(window).on('resize.bootstrap-table', $.proxy(this.resetWidth, this));
- }
-
- this.$selectAll = this.$header.find('[name="btSelectAll"]');
- this.$selectAll.off('click').on('click', function () {
- var checked = $(this).prop('checked');
- that[checked ? 'checkAll' : 'uncheckAll']();
- that.updateSelected();
- });
- };
-
- BootstrapTable.prototype.initFooter = function () {
- if (!this.options.showFooter || this.options.cardView) {
- this.$tableFooter.hide();
- } else {
- this.$tableFooter.show();
- }
- };
-
- /**
- * @param data
- * @param type: append / prepend
- */
- BootstrapTable.prototype.initData = function (data, type) {
- if (type === 'append') {
- this.data = this.data.concat(data);
- } else if (type === 'prepend') {
- this.data = [].concat(data).concat(this.data);
- } else {
- this.data = data || this.options.data;
- }
-
- // Fix #839 Records deleted when adding new row on filtered table
- if (type === 'append') {
- this.options.data = this.options.data.concat(data);
- } else if (type === 'prepend') {
- this.options.data = [].concat(data).concat(this.options.data);
- } else {
- this.options.data = this.data;
- }
-
- if (this.options.sidePagination === 'server') {
- return;
- }
- this.initSort();
- };
-
- BootstrapTable.prototype.initSort = function () {
- var that = this,
- name = this.options.sortName,
- order = this.options.sortOrder === 'desc' ? -1 : 1,
- index = $.inArray(this.options.sortName, this.header.fields);
-
- if (this.options.customSort !== $.noop) {
- this.options.customSort.apply(this, [this.options.sortName, this.options.sortOrder]);
- return;
- }
-
- if (index !== -1) {
- if (this.options.sortStable) {
- $.each(this.data, function (i, row) {
- if (!row.hasOwnProperty('_position')) row._position = i;
- });
- }
-
- this.data.sort(function (a, b) {
- if (that.header.sortNames[index]) {
- name = that.header.sortNames[index];
- }
- var aa = getItemField(a, name, that.options.escape),
- bb = getItemField(b, name, that.options.escape),
- value = calculateObjectValue(that.header, that.header.sorters[index], [aa, bb]);
-
- if (value !== undefined) {
- return order * value;
- }
-
- // Fix #161: undefined or null string sort bug.
- if (aa === undefined || aa === null) {
- aa = '';
- }
- if (bb === undefined || bb === null) {
- bb = '';
- }
-
- if (that.options.sortStable && aa === bb) {
- aa = a._position;
- bb = b._position;
- }
-
- // IF both values are numeric, do a numeric comparison
- if ($.isNumeric(aa) && $.isNumeric(bb)) {
- // Convert numerical values form string to float.
- aa = parseFloat(aa);
- bb = parseFloat(bb);
- if (aa < bb) {
- return order * -1;
- }
- return order;
- }
-
- if (aa === bb) {
- return 0;
- }
-
- // If value is not a string, convert to string
- if (typeof aa !== 'string') {
- aa = aa.toString();
- }
-
- if (aa.localeCompare(bb) === -1) {
- return order * -1;
- }
-
- return order;
- });
- }
- };
-
- BootstrapTable.prototype.onSort = function (event) {
- var $this = event.type === "keypress" ? $(event.currentTarget) : $(event.currentTarget).parent(),
- $this_ = this.$header.find('th').eq($this.index());
-
- this.$header.add(this.$header_).find('span.order').remove();
-
- if (this.options.sortName === $this.data('field')) {
- this.options.sortOrder = this.options.sortOrder === 'asc' ? 'desc' : 'asc';
- } else {
- this.options.sortName = $this.data('field');
- this.options.sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc';
- }
- this.trigger('sort', this.options.sortName, this.options.sortOrder);
-
- $this.add($this_).data('order', this.options.sortOrder);
-
- // Assign the correct sortable arrow
- this.getCaret();
-
- if (this.options.sidePagination === 'server') {
- this.initServer(this.options.silentSort);
- return;
- }
-
- this.initSort();
- this.initBody();
- };
-
- BootstrapTable.prototype.initToolbar = function () {
- var that = this,
- html = [],
- timeoutId = 0,
- $keepOpen,
- $search,
- switchableCount = 0;
-
- if (this.$toolbar.find('.bs-bars').children().length) {
- $('body').append($(this.options.toolbar));
- }
- this.$toolbar.html('');
-
- if (typeof this.options.toolbar === 'string' || typeof this.options.toolbar === 'object') {
- $(sprintf('<div class="bs-bars pull-%s"></div>', this.options.toolbarAlign))
- .appendTo(this.$toolbar)
- .append($(this.options.toolbar));
- }
-
- // showColumns, showToggle, showRefresh
- html = [sprintf('<div class="columns columns-%s btn-group pull-%s">',
- this.options.buttonsAlign, this.options.buttonsAlign)];
-
- if (typeof this.options.icons === 'string') {
- this.options.icons = calculateObjectValue(null, this.options.icons);
- }
-
- if (this.options.showPaginationSwitch) {
- html.push(sprintf('<button class="btn' +
- sprintf(' btn-%s', this.options.buttonsClass) +
- sprintf(' btn-%s', this.options.iconSize) +
- '" type="button" name="paginationSwitch" title="%s">',
- this.options.formatPaginationSwitch()),
- sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.paginationSwitchDown),
- '</button>');
- }
-
- if (this.options.showRefresh) {
- html.push(sprintf('<button class="btn' +
- sprintf(' btn-%s', this.options.buttonsClass) +
- sprintf(' btn-%s', this.options.iconSize) +
- '" type="button" name="refresh" title="%s">',
- this.options.formatRefresh()),
- sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.refresh),
- '</button>');
- }
-
- if (this.options.showToggle) {
- html.push(sprintf('<button class="btn' +
- sprintf(' btn-%s', this.options.buttonsClass) +
- sprintf(' btn-%s', this.options.iconSize) +
- '" type="button" name="toggle" title="%s">',
- this.options.formatToggle()),
- sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.toggle),
- '</button>');
- }
-
- if (this.options.showColumns) {
- html.push(sprintf('<div class="keep-open btn-group" title="%s">',
- this.options.formatColumns()),
- '<button type="button" class="btn' +
- sprintf(' btn-%s', this.options.buttonsClass) +
- sprintf(' btn-%s', this.options.iconSize) +
- ' dropdown-toggle" data-toggle="dropdown">',
- sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.columns),
- ' <span class="caret"></span>',
- '</button>',
- '<ul class="dropdown-menu" role="menu">');
-
- $.each(this.columns, function (i, column) {
- if (column.radio || column.checkbox) {
- return;
- }
-
- if (that.options.cardView && !column.cardVisible) {
- return;
- }
-
- var checked = column.visible ? ' checked="checked"' : '';
-
- if (column.switchable) {
- html.push(sprintf('<li>' +
- '<label><input type="checkbox" data-field="%s" value="%s"%s> %s</label>' +
- '</li>', column.field, i, checked, column.title));
- switchableCount++;
- }
- });
- html.push('</ul>',
- '</div>');
- }
-
- html.push('</div>');
-
- // Fix #188: this.showToolbar is for extensions
- if (this.showToolbar || html.length > 2) {
- this.$toolbar.append(html.join(''));
- }
-
- if (this.options.showPaginationSwitch) {
- this.$toolbar.find('button[name="paginationSwitch"]')
- .off('click').on('click', $.proxy(this.togglePagination, this));
- }
-
- if (this.options.showRefresh) {
- this.$toolbar.find('button[name="refresh"]')
- .off('click').on('click', $.proxy(this.refresh, this));
- }
-
- if (this.options.showToggle) {
- this.$toolbar.find('button[name="toggle"]')
- .off('click').on('click', function () {
- that.toggleView();
- });
- }
-
- if (this.options.showColumns) {
- $keepOpen = this.$toolbar.find('.keep-open');
-
- if (switchableCount <= this.options.minimumCountColumns) {
- $keepOpen.find('input').prop('disabled', true);
- }
-
- $keepOpen.find('li').off('click').on('click', function (event) {
- event.stopImmediatePropagation();
- });
- $keepOpen.find('input').off('click').on('click', function () {
- var $this = $(this);
-
- that.toggleColumn($(this).val(), $this.prop('checked'), false);
- that.trigger('column-switch', $(this).data('field'), $this.prop('checked'));
- });
- }
-
- if (this.options.search) {
- html = [];
- html.push(
- '<div class="pull-' + this.options.searchAlign + ' search">',
- sprintf('<input class="form-control' +
- sprintf(' input-%s', this.options.iconSize) +
- '" type="text" placeholder="%s">',
- this.options.formatSearch()),
- '</div>');
-
- this.$toolbar.append(html.join(''));
- $search = this.$toolbar.find('.search input');
- $search.off('keyup drop').on('keyup drop', function (event) {
- if (that.options.searchOnEnterKey && event.keyCode !== 13) {
- return;
- }
-
- if ($.inArray(event.keyCode, [37, 38, 39, 40]) > -1) {
- return;
- }
-
- clearTimeout(timeoutId); // doesn't matter if it's 0
- timeoutId = setTimeout(function () {
- that.onSearch(event);
- }, that.options.searchTimeOut);
- });
-
- if (isIEBrowser()) {
- $search.off('mouseup').on('mouseup', function (event) {
- clearTimeout(timeoutId); // doesn't matter if it's 0
- timeoutId = setTimeout(function () {
- that.onSearch(event);
- }, that.options.searchTimeOut);
- });
- }
- }
- };
-
- BootstrapTable.prototype.onSearch = function (event) {
- var text = $.trim($(event.currentTarget).val());
-
- // trim search input
- if (this.options.trimOnSearch && $(event.currentTarget).val() !== text) {
- $(event.currentTarget).val(text);
- }
-
- if (text === this.searchText) {
- return;
- }
- this.searchText = text;
- this.options.searchText = text;
-
- this.options.pageNumber = 1;
- this.initSearch();
- this.updatePagination();
- this.trigger('search', text);
- };
-
- BootstrapTable.prototype.initSearch = function () {
- var that = this;
-
- if (this.options.sidePagination !== 'server') {
- if (this.options.customSearch !== $.noop) {
- this.options.customSearch.apply(this, [this.searchText]);
- return;
- }
-
- var s = this.searchText && (this.options.escape ?
- escapeHTML(this.searchText) : this.searchText).toLowerCase();
- var f = $.isEmptyObject(this.filterColumns) ? null : this.filterColumns;
-
- // Check filter
- this.data = f ? $.grep(this.options.data, function (item, i) {
- for (var key in f) {
- if ($.isArray(f[key]) && $.inArray(item[key], f[key]) === -1 ||
- item[key] !== f[key]) {
- return false;
- }
- }
- return true;
- }) : this.options.data;
-
- this.data = s ? $.grep(this.data, function (item, i) {
- for (var j = 0; j < that.header.fields.length; j++) {
-
- if (!that.header.searchables[j]) {
- continue;
- }
-
- var key = $.isNumeric(that.header.fields[j]) ? parseInt(that.header.fields[j], 10) : that.header.fields[j];
- var column = that.columns[getFieldIndex(that.columns, key)];
- var value;
-
- if (typeof key === 'string') {
- value = item;
- var props = key.split('.');
- for (var prop_index = 0; prop_index < props.length; prop_index++) {
- value = value[props[prop_index]];
- }
-
- // Fix #142: respect searchForamtter boolean
- if (column && column.searchFormatter) {
- value = calculateObjectValue(column,
- that.header.formatters[j], [value, item, i], value);
- }
- } else {
- value = item[key];
- }
-
- if (typeof value === 'string' || typeof value === 'number') {
- if (that.options.strictSearch) {
- if ((value + '').toLowerCase() === s) {
- return true;
- }
- } else {
- if ((value + '').toLowerCase().indexOf(s) !== -1) {
- return true;
- }
- }
- }
- }
- return false;
- }) : this.data;
- }
- };
-
- BootstrapTable.prototype.initPagination = function () {
- if (!this.options.pagination) {
- this.$pagination.hide();
- return;
- } else {
- this.$pagination.show();
- }
-
- var that = this,
- html = [],
- $allSelected = false,
- i, from, to,
- $pageList,
- $first, $pre,
- $next, $last,
- $number,
- data = this.getData(),
- pageList = this.options.pageList;
-
- if (this.options.sidePagination !== 'server') {
- this.options.totalRows = data.length;
- }
-
- this.totalPages = 0;
- if (this.options.totalRows) {
- if (this.options.pageSize === this.options.formatAllRows()) {
- this.options.pageSize = this.options.totalRows;
- $allSelected = true;
- } else if (this.options.pageSize === this.options.totalRows) {
- // Fix #667 Table with pagination,
- // multiple pages and a search that matches to one page throws exception
- var pageLst = typeof this.options.pageList === 'string' ?
- this.options.pageList.replace('[', '').replace(']', '')
- .replace(/ /g, '').toLowerCase().split(',') : this.options.pageList;
- if ($.inArray(this.options.formatAllRows().toLowerCase(), pageLst) > -1) {
- $allSelected = true;
- }
- }
-
- this.totalPages = ~~((this.options.totalRows - 1) / this.options.pageSize) + 1;
-
- this.options.totalPages = this.totalPages;
- }
- if (this.totalPages > 0 && this.options.pageNumber > this.totalPages) {
- this.options.pageNumber = this.totalPages;
- }
-
- this.pageFrom = (this.options.pageNumber - 1) * this.options.pageSize + 1;
- this.pageTo = this.options.pageNumber * this.options.pageSize;
- if (this.pageTo > this.options.totalRows) {
- this.pageTo = this.options.totalRows;
- }
-
- html.push(
- '<div class="pull-' + this.options.paginationDetailHAlign + ' pagination-detail">',
- '<span class="pagination-info">',
- this.options.onlyInfoPagination ? this.options.formatDetailPagination(this.options.totalRows) :
- this.options.formatShowingRows(this.pageFrom, this.pageTo, this.options.totalRows),
- '</span>');
-
- if (!this.options.onlyInfoPagination) {
- html.push('<span class="page-list">');
-
- var pageNumber = [
- sprintf('<span class="btn-group %s">',
- this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
- 'dropdown' : 'dropup'),
- '<button type="button" class="btn' +
- sprintf(' btn-%s', this.options.buttonsClass) +
- sprintf(' btn-%s', this.options.iconSize) +
- ' dropdown-toggle" data-toggle="dropdown">',
- '<span class="page-size">',
- $allSelected ? this.options.formatAllRows() : this.options.pageSize,
- '</span>',
- ' <span class="caret"></span>',
- '</button>',
- '<ul class="dropdown-menu" role="menu">'
- ];
-
- if (typeof this.options.pageList === 'string') {
- var list = this.options.pageList.replace('[', '').replace(']', '')
- .replace(/ /g, '').split(',');
-
- pageList = [];
- $.each(list, function (i, value) {
- pageList.push(value.toUpperCase() === that.options.formatAllRows().toUpperCase() ?
- that.options.formatAllRows() : +value);
- });
- }
-
- $.each(pageList, function (i, page) {
- if (!that.options.smartDisplay || i === 0 || pageList[i - 1] <= that.options.totalRows) {
- var active;
- if ($allSelected) {
- active = page === that.options.formatAllRows() ? ' class="active"' : '';
- } else {
- active = page === that.options.pageSize ? ' class="active"' : '';
- }
- pageNumber.push(sprintf('<li%s><a href="javascript:void(0)">%s</a></li>', active, page));
- }
- });
- pageNumber.push('</ul></span>');
-
- html.push(this.options.formatRecordsPerPage(pageNumber.join('')));
- html.push('</span>');
-
- html.push('</div>',
- '<div class="pull-' + this.options.paginationHAlign + ' pagination">',
- '<ul class="pagination' + sprintf(' pagination-%s', this.options.iconSize) + '">',
- '<li class="page-pre"><a href="javascript:void(0)">' + this.options.paginationPreText + '</a></li>');
-
- if (this.totalPages < 5) {
- from = 1;
- to = this.totalPages;
- } else {
- from = this.options.pageNumber - 2;
- to = from + 4;
- if (from < 1) {
- from = 1;
- to = 5;
- }
- if (to > this.totalPages) {
- to = this.totalPages;
- from = to - 4;
- }
- }
-
- if (this.totalPages >= 6) {
- if (this.options.pageNumber >= 3) {
- html.push('<li class="page-first' + (1 === this.options.pageNumber ? ' active' : '') + '">',
- '<a href="javascript:void(0)">', 1, '</a>',
- '</li>');
-
- from++;
- }
-
- if (this.options.pageNumber >= 4) {
- if (this.options.pageNumber == 4 || this.totalPages == 6 || this.totalPages == 7) {
- from--;
- } else {
- html.push('<li class="page-first-separator disabled">',
- '<a href="javascript:void(0)">...</a>',
- '</li>');
- }
-
- to--;
- }
- }
-
- if (this.totalPages >= 7) {
- if (this.options.pageNumber >= (this.totalPages - 2)) {
- from--;
- }
- }
-
- if (this.totalPages == 6) {
- if (this.options.pageNumber >= (this.totalPages - 2)) {
- to++;
- }
- } else if (this.totalPages >= 7) {
- if (this.totalPages == 7 || this.options.pageNumber >= (this.totalPages - 3)) {
- to++;
- }
- }
-
- for (i = from; i <= to; i++) {
- html.push('<li class="page-number' + (i === this.options.pageNumber ? ' active' : '') + '">',
- '<a href="javascript:void(0)">', i, '</a>',
- '</li>');
- }
-
- if (this.totalPages >= 8) {
- if (this.options.pageNumber <= (this.totalPages - 4)) {
- html.push('<li class="page-last-separator disabled">',
- '<a href="javascript:void(0)">...</a>',
- '</li>');
- }
- }
-
- if (this.totalPages >= 6) {
- if (this.options.pageNumber <= (this.totalPages - 3)) {
- html.push('<li class="page-last' + (this.totalPages === this.options.pageNumber ? ' active' : '') + '">',
- '<a href="javascript:void(0)">', this.totalPages, '</a>',
- '</li>');
- }
- }
-
- html.push(
- '<li class="page-next"><a href="javascript:void(0)">' + this.options.paginationNextText + '</a></li>',
- '</ul>',
- '</div>');
- }
- this.$pagination.html(html.join(''));
-
- if (!this.options.onlyInfoPagination) {
- $pageList = this.$pagination.find('.page-list a');
- $first = this.$pagination.find('.page-first');
- $pre = this.$pagination.find('.page-pre');
- $next = this.$pagination.find('.page-next');
- $last = this.$pagination.find('.page-last');
- $number = this.$pagination.find('.page-number');
-
- if (this.options.smartDisplay) {
- if (this.totalPages <= 1) {
- this.$pagination.find('div.pagination').hide();
- }
- if (pageList.length < 2 || this.options.totalRows <= pageList[0]) {
- this.$pagination.find('span.page-list').hide();
- }
-
- // when data is empty, hide the pagination
- this.$pagination[this.getData().length ? 'show' : 'hide']();
- }
- if ($allSelected) {
- this.options.pageSize = this.options.formatAllRows();
- }
- $pageList.off('click').on('click', $.proxy(this.onPageListChange, this));
- $first.off('click').on('click', $.proxy(this.onPageFirst, this));
- $pre.off('click').on('click', $.proxy(this.onPagePre, this));
- $next.off('click').on('click', $.proxy(this.onPageNext, this));
- $last.off('click').on('click', $.proxy(this.onPageLast, this));
- $number.off('click').on('click', $.proxy(this.onPageNumber, this));
- }
- };
-
- BootstrapTable.prototype.updatePagination = function (event) {
- // Fix #171: IE disabled button can be clicked bug.
- if (event && $(event.currentTarget).hasClass('disabled')) {
- return;
- }
-
- if (!this.options.maintainSelected) {
- this.resetRows();
- }
-
- this.initPagination();
- if (this.options.sidePagination === 'server') {
- this.initServer();
- } else {
- this.initBody();
- }
-
- this.trigger('page-change', this.options.pageNumber, this.options.pageSize);
- };
-
- BootstrapTable.prototype.onPageListChange = function (event) {
- var $this = $(event.currentTarget);
-
- $this.parent().addClass('active').siblings().removeClass('active');
- this.options.pageSize = $this.text().toUpperCase() === this.options.formatAllRows().toUpperCase() ?
- this.options.formatAllRows() : +$this.text();
- this.$toolbar.find('.page-size').text(this.options.pageSize);
-
- this.updatePagination(event);
- };
-
- BootstrapTable.prototype.onPageFirst = function (event) {
- this.options.pageNumber = 1;
- this.updatePagination(event);
- };
-
- BootstrapTable.prototype.onPagePre = function (event) {
- if ((this.options.pageNumber - 1) === 0) {
- this.options.pageNumber = this.options.totalPages;
- } else {
- this.options.pageNumber--;
- }
- this.updatePagination(event);
- };
-
- BootstrapTable.prototype.onPageNext = function (event) {
- if ((this.options.pageNumber + 1) > this.options.totalPages) {
- this.options.pageNumber = 1;
- } else {
- this.options.pageNumber++;
- }
- this.updatePagination(event);
- };
-
- BootstrapTable.prototype.onPageLast = function (event) {
- this.options.pageNumber = this.totalPages;
- this.updatePagination(event);
- };
-
- BootstrapTable.prototype.onPageNumber = function (event) {
- if (this.options.pageNumber === +$(event.currentTarget).text()) {
- return;
- }
- this.options.pageNumber = +$(event.currentTarget).text();
- this.updatePagination(event);
- };
-
- BootstrapTable.prototype.initBody = function (fixedScroll) {
- var that = this,
- html = [],
- data = this.getData();
-
- this.trigger('pre-body', data);
-
- this.$body = this.$el.find('>tbody');
- if (!this.$body.length) {
- this.$body = $('<tbody></tbody>').appendTo(this.$el);
- }
-
- //Fix #389 Bootstrap-table-flatJSON is not working
-
- if (!this.options.pagination || this.options.sidePagination === 'server') {
- this.pageFrom = 1;
- this.pageTo = data.length;
- }
-
- for (var i = this.pageFrom - 1; i < this.pageTo; i++) {
- var key,
- item = data[i],
- style = {},
- csses = [],
- data_ = '',
- attributes = {},
- htmlAttributes = [];
-
- style = calculateObjectValue(this.options, this.options.rowStyle, [item, i], style);
-
- if (style && style.css) {
- for (key in style.css) {
- csses.push(key + ': ' + style.css[key]);
- }
- }
-
- attributes = calculateObjectValue(this.options,
- this.options.rowAttributes, [item, i], attributes);
-
- if (attributes) {
- for (key in attributes) {
- htmlAttributes.push(sprintf('%s="%s"', key, escapeHTML(attributes[key])));
- }
- }
-
- if (item._data && !$.isEmptyObject(item._data)) {
- $.each(item._data, function (k, v) {
- // ignore data-index
- if (k === 'index') {
- return;
- }
- data_ += sprintf(' data-%s="%s"', k, v);
- });
- }
-
- html.push('<tr',
- sprintf(' %s', htmlAttributes.join(' ')),
- sprintf(' id="%s"', $.isArray(item) ? undefined : item._id),
- sprintf(' class="%s"', style.classes || ($.isArray(item) ? undefined : item._class)),
- sprintf(' data-index="%s"', i),
- sprintf(' data-uniqueid="%s"', item[this.options.uniqueId]),
- sprintf('%s', data_),
- '>'
- );
-
- if (this.options.cardView) {
- html.push(sprintf('<td colspan="%s"><div class="card-views">', this.header.fields.length));
- }
-
- if (!this.options.cardView && this.options.detailView) {
- html.push('<td>',
- '<a class="detail-icon" href="javascript:">',
- sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.detailOpen),
- '</a>',
- '</td>');
- }
-
- $.each(this.header.fields, function (j, field) {
- var text = '',
- value = getItemField(item, field, that.options.escape),
- type = '',
- cellStyle = {},
- id_ = '',
- class_ = that.header.classes[j],
- data_ = '',
- rowspan_ = '',
- colspan_ = '',
- title_ = '',
- column = that.columns[j];
-
- if (that.fromHtml && typeof value === 'undefined') {
- return;
- }
-
- if (!column.visible) {
- return;
- }
-
- if (that.options.cardView && !column.cardVisible) {
- return;
- }
-
- style = sprintf('style="%s"', csses.concat(that.header.styles[j]).join('; '));
-
- // handle td's id and class
- if (item['_' + field + '_id']) {
- id_ = sprintf(' id="%s"', item['_' + field + '_id']);
- }
- if (item['_' + field + '_class']) {
- class_ = sprintf(' class="%s"', item['_' + field + '_class']);
- }
- if (item['_' + field + '_rowspan']) {
- rowspan_ = sprintf(' rowspan="%s"', item['_' + field + '_rowspan']);
- }
- if (item['_' + field + '_colspan']) {
- colspan_ = sprintf(' colspan="%s"', item['_' + field + '_colspan']);
- }
- if (item['_' + field + '_title']) {
- title_ = sprintf(' title="%s"', item['_' + field + '_title']);
- }
- cellStyle = calculateObjectValue(that.header,
- that.header.cellStyles[j], [value, item, i, field], cellStyle);
- if (cellStyle.classes) {
- class_ = sprintf(' class="%s"', cellStyle.classes);
- }
- if (cellStyle.css) {
- var csses_ = [];
- for (var key in cellStyle.css) {
- csses_.push(key + ': ' + cellStyle.css[key]);
- }
- style = sprintf('style="%s"', csses_.concat(that.header.styles[j]).join('; '));
- }
-
- value = calculateObjectValue(column,
- that.header.formatters[j], [value, item, i], value);
-
- if (item['_' + field + '_data'] && !$.isEmptyObject(item['_' + field + '_data'])) {
- $.each(item['_' + field + '_data'], function (k, v) {
- // ignore data-index
- if (k === 'index') {
- return;
- }
- data_ += sprintf(' data-%s="%s"', k, v);
- });
- }
-
- if (column.checkbox || column.radio) {
- type = column.checkbox ? 'checkbox' : type;
- type = column.radio ? 'radio' : type;
-
- text = [sprintf(that.options.cardView ?
- '<div class="card-view %s">' : '<td class="bs-checkbox %s">', column['class'] || ''),
- '<input' +
- sprintf(' data-index="%s"', i) +
- sprintf(' name="%s"', that.options.selectItemName) +
- sprintf(' type="%s"', type) +
- sprintf(' value="%s"', item[that.options.idField]) +
- sprintf(' checked="%s"', value === true ||
- (value && value.checked) ? 'checked' : undefined) +
- sprintf(' disabled="%s"', !column.checkboxEnabled ||
- (value && value.disabled) ? 'disabled' : undefined) +
- ' />',
- that.header.formatters[j] && typeof value === 'string' ? value : '',
- that.options.cardView ? '</div>' : '</td>'
- ].join('');
-
- item[that.header.stateField] = value === true || (value && value.checked);
- } else {
- value = typeof value === 'undefined' || value === null ?
- that.options.undefinedText : value;
-
- text = that.options.cardView ? ['<div class="card-view">',
- that.options.showHeader ? sprintf('<span class="title" %s>%s</span>', style,
- getPropertyFromOther(that.columns, 'field', 'title', field)) : '',
- sprintf('<span class="value">%s</span>', value),
- '</div>'
- ].join('') : [sprintf('<td%s %s %s %s %s %s %s>',
- id_, class_, style, data_, rowspan_, colspan_, title_),
- value,
- '</td>'
- ].join('');
-
- // Hide empty data on Card view when smartDisplay is set to true.
- if (that.options.cardView && that.options.smartDisplay && value === '') {
- // Should set a placeholder for event binding correct fieldIndex
- text = '<div class="card-view"></div>';
- }
- }
-
- html.push(text);
- });
-
- if (this.options.cardView) {
- html.push('</div></td>');
- }
-
- html.push('</tr>');
- }
-
- // show no records
- if (!html.length) {
- html.push('<tr class="no-records-found">',
- sprintf('<td colspan="%s">%s</td>',
- this.$header.find('th').length, this.options.formatNoMatches()),
- '</tr>');
- }
-
- this.$body.html(html.join(''));
-
- if (!fixedScroll) {
- this.scrollTo(0);
- }
-
- // click to select by column
- this.$body.find('> tr[data-index] > td').off('click dblclick').on('click dblclick', function (e) {
- var $td = $(this),
- $tr = $td.parent(),
- item = that.data[$tr.data('index')],
- index = $td[0].cellIndex,
- fields = that.getVisibleFields(),
- field = fields[that.options.detailView && !that.options.cardView ? index - 1 : index],
- column = that.columns[getFieldIndex(that.columns, field)],
- value = getItemField(item, field, that.options.escape);
-
- if ($td.find('.detail-icon').length) {
- return;
- }
-
- that.trigger(e.type === 'click' ? 'click-cell' : 'dbl-click-cell', field, value, item, $td);
- that.trigger(e.type === 'click' ? 'click-row' : 'dbl-click-row', item, $tr, field);
-
- // if click to select - then trigger the checkbox/radio click
- if (e.type === 'click' && that.options.clickToSelect && column.clickToSelect) {
- var $selectItem = $tr.find(sprintf('[name="%s"]', that.options.selectItemName));
- if ($selectItem.length) {
- $selectItem[0].click(); // #144: .trigger('click') bug
- }
- }
- });
-
- this.$body.find('> tr[data-index] > td > .detail-icon').off('click').on('click', function () {
- var $this = $(this),
- $tr = $this.parent().parent(),
- index = $tr.data('index'),
- row = data[index]; // Fix #980 Detail view, when searching, returns wrong row
-
- // remove and update
- if ($tr.next().is('tr.detail-view')) {
- $this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailOpen));
- $tr.next().remove();
- that.trigger('collapse-row', index, row);
- } else {
- $this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailClose));
- $tr.after(sprintf('<tr class="detail-view"><td colspan="%s"></td></tr>', $tr.find('td').length));
- var $element = $tr.next().find('td');
- var content = calculateObjectValue(that.options, that.options.detailFormatter, [index, row, $element], '');
- if($element.length === 1) {
- $element.append(content);
- }
- that.trigger('expand-row', index, row, $element);
- }
- that.resetView();
- });
-
- this.$selectItem = this.$body.find(sprintf('[name="%s"]', this.options.selectItemName));
- this.$selectItem.off('click').on('click', function (event) {
- event.stopImmediatePropagation();
-
- var $this = $(this),
- checked = $this.prop('checked'),
- row = that.data[$this.data('index')];
-
- if (that.options.maintainSelected && $(this).is(':radio')) {
- $.each(that.options.data, function (i, row) {
- row[that.header.stateField] = false;
- });
- }
-
- row[that.header.stateField] = checked;
-
- if (that.options.singleSelect) {
- that.$selectItem.not(this).each(function () {
- that.data[$(this).data('index')][that.header.stateField] = false;
- });
- that.$selectItem.filter(':checked').not(this).prop('checked', false);
- }
-
- that.updateSelected();
- that.trigger(checked ? 'check' : 'uncheck', row, $this);
- });
-
- $.each(this.header.events, function (i, events) {
- if (!events) {
- return;
- }
- // fix bug, if events is defined with namespace
- if (typeof events === 'string') {
- events = calculateObjectValue(null, events);
- }
-
- var field = that.header.fields[i],
- fieldIndex = $.inArray(field, that.getVisibleFields());
-
- if (that.options.detailView && !that.options.cardView) {
- fieldIndex += 1;
- }
-
- for (var key in events) {
- that.$body.find('>tr:not(.no-records-found)').each(function () {
- var $tr = $(this),
- $td = $tr.find(that.options.cardView ? '.card-view' : 'td').eq(fieldIndex),
- index = key.indexOf(' '),
- name = key.substring(0, index),
- el = key.substring(index + 1),
- func = events[key];
-
- $td.find(el).off(name).on(name, function (e) {
- var index = $tr.data('index'),
- row = that.data[index],
- value = row[field];
-
- func.apply(this, [e, value, row, index]);
- });
- });
- }
- });
-
- this.updateSelected();
- this.resetView();
-
- this.trigger('post-body', data);
- };
-
- BootstrapTable.prototype.initServer = function (silent, query, url) {
- var that = this,
- data = {},
- params = {
- searchText: this.searchText,
- sortName: this.options.sortName,
- sortOrder: this.options.sortOrder
- },
- request;
-
- if (this.options.pagination) {
- params.pageSize = this.options.pageSize === this.options.formatAllRows() ?
- this.options.totalRows : this.options.pageSize;
- params.pageNumber = this.options.pageNumber;
- }
-
- if (!(url || this.options.url) && !this.options.ajax) {
- return;
- }
-
- if (this.options.queryParamsType === 'limit') {
- params = {
- search: params.searchText,
- sort: params.sortName,
- order: params.sortOrder
- };
-
- if (this.options.pagination) {
- params.offset = this.options.pageSize === this.options.formatAllRows() ?
- 0 : this.options.pageSize * (this.options.pageNumber - 1);
- params.limit = this.options.pageSize === this.options.formatAllRows() ?
- this.options.totalRows : this.options.pageSize;
- }
- }
-
- if (!($.isEmptyObject(this.filterColumnsPartial))) {
- params.filter = JSON.stringify(this.filterColumnsPartial, null);
- }
-
- data = calculateObjectValue(this.options, this.options.queryParams, [params], data);
-
- $.extend(data, query || {});
-
- // false to stop request
- if (data === false) {
- return;
- }
-
- if (!silent) {
- this.$tableLoading.show();
- }
- request = $.extend({}, calculateObjectValue(null, this.options.ajaxOptions), {
- type: this.options.method,
- url: url || this.options.url,
- data: this.options.contentType === 'application/json' && this.options.method === 'post' ?
- JSON.stringify(data) : data,
- cache: this.options.cache,
- contentType: this.options.contentType,
- dataType: this.options.dataType,
- success: function (res) {
- res = calculateObjectValue(that.options, that.options.responseHandler, [res], res);
-
- that.load(res);
- that.trigger('load-success', res);
- if (!silent) that.$tableLoading.hide();
- },
- error: function (res) {
- that.trigger('load-error', res.status, res);
- if (!silent) that.$tableLoading.hide();
- }
- });
-
- if (this.options.ajax) {
- calculateObjectValue(this, this.options.ajax, [request], null);
- } else {
- if (this._xhr && this._xhr.readyState !== 4) {
- this._xhr.abort();
- }
- this._xhr = $.ajax(request);
- }
- };
-
- BootstrapTable.prototype.initSearchText = function () {
- if (this.options.search) {
- if (this.options.searchText !== '') {
- var $search = this.$toolbar.find('.search input');
- $search.val(this.options.searchText);
- this.onSearch({currentTarget: $search});
- }
- }
- };
-
- BootstrapTable.prototype.getCaret = function () {
- var that = this;
-
- $.each(this.$header.find('th'), function (i, th) {
- $(th).find('.sortable').removeClass('desc asc').addClass($(th).data('field') === that.options.sortName ? that.options.sortOrder : 'both');
- });
- };
-
- BootstrapTable.prototype.updateSelected = function () {
- var checkAll = this.$selectItem.filter(':enabled').length &&
- this.$selectItem.filter(':enabled').length ===
- this.$selectItem.filter(':enabled').filter(':checked').length;
-
- this.$selectAll.add(this.$selectAll_).prop('checked', checkAll);
-
- this.$selectItem.each(function () {
- $(this).closest('tr')[$(this).prop('checked') ? 'addClass' : 'removeClass']('selected');
- });
- };
-
- BootstrapTable.prototype.updateRows = function () {
- var that = this;
-
- this.$selectItem.each(function () {
- that.data[$(this).data('index')][that.header.stateField] = $(this).prop('checked');
- });
- };
-
- BootstrapTable.prototype.resetRows = function () {
- var that = this;
-
- $.each(this.data, function (i, row) {
- that.$selectAll.prop('checked', false);
- that.$selectItem.prop('checked', false);
- if (that.header.stateField) {
- row[that.header.stateField] = false;
- }
- });
- };
-
- BootstrapTable.prototype.trigger = function (name) {
- var args = Array.prototype.slice.call(arguments, 1);
-
- name += '.bs.table';
- this.options[BootstrapTable.EVENTS[name]].apply(this.options, args);
- this.$el.trigger($.Event(name), args);
-
- this.options.onAll(name, args);
- this.$el.trigger($.Event('all.bs.table'), [name, args]);
- };
-
- BootstrapTable.prototype.resetHeader = function () {
- // fix #61: the hidden table reset header bug.
- // fix bug: get $el.css('width') error sometime (height = 500)
- clearTimeout(this.timeoutId_);
- this.timeoutId_ = setTimeout($.proxy(this.fitHeader, this), this.$el.is(':hidden') ? 100 : 0);
- };
-
- BootstrapTable.prototype.fitHeader = function () {
- var that = this,
- fixedBody,
- scrollWidth,
- focused,
- focusedTemp;
-
- if (that.$el.is(':hidden')) {
- that.timeoutId_ = setTimeout($.proxy(that.fitHeader, that), 100);
- return;
- }
- fixedBody = this.$tableBody.get(0);
-
- scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth &&
- fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ?
- getScrollBarWidth() : 0;
-
- this.$el.css('margin-top', -this.$header.outerHeight());
-
- focused = $(':focus');
- if (focused.length > 0) {
- var $th = focused.parents('th');
- if ($th.length > 0) {
- var dataField = $th.attr('data-field');
- if (dataField !== undefined) {
- var $headerTh = this.$header.find("[data-field='" + dataField + "']");
- if ($headerTh.length > 0) {
- $headerTh.find(":input").addClass("focus-temp");
- }
- }
- }
- }
-
- this.$header_ = this.$header.clone(true, true);
- this.$selectAll_ = this.$header_.find('[name="btSelectAll"]');
- this.$tableHeader.css({
- 'margin-right': scrollWidth
- }).find('table').css('width', this.$el.outerWidth())
- .html('').attr('class', this.$el.attr('class'))
- .append(this.$header_);
-
-
- focusedTemp = $('.focus-temp:visible:eq(0)');
- if (focusedTemp.length > 0) {
- focusedTemp.focus();
- this.$header.find('.focus-temp').removeClass('focus-temp');
- }
-
- // fix bug: $.data() is not working as expected after $.append()
- this.$header.find('th[data-field]').each(function (i) {
- that.$header_.find(sprintf('th[data-field="%s"]', $(this).data('field'))).data($(this).data());
- });
-
- var visibleFields = this.getVisibleFields(),
- $ths = this.$header_.find('th');
-
- this.$body.find('>tr:first-child:not(.no-records-found) > *').each(function (i) {
- var $this = $(this),
- index = i;
-
- if (that.options.detailView && !that.options.cardView) {
- if (i === 0) {
- that.$header_.find('th.detail').find('.fht-cell').width($this.innerWidth());
- }
- index = i - 1;
- }
-
- var $th = that.$header_.find(sprintf('th[data-field="%s"]', visibleFields[index]));
- if ($th.length > 1) {
- $th = $($ths[$this[0].cellIndex]);
- }
-
- $th.find('.fht-cell').width($this.innerWidth());
- });
- // horizontal scroll event
- // TODO: it's probably better improving the layout than binding to scroll event
- this.$tableBody.off('scroll').on('scroll', function () {
- that.$tableHeader.scrollLeft($(this).scrollLeft());
-
- if (that.options.showFooter && !that.options.cardView) {
- that.$tableFooter.scrollLeft($(this).scrollLeft());
- }
- });
- that.trigger('post-header');
- };
-
- BootstrapTable.prototype.resetFooter = function () {
- var that = this,
- data = that.getData(),
- html = [];
-
- if (!this.options.showFooter || this.options.cardView) { //do nothing
- return;
- }
-
- if (!this.options.cardView && this.options.detailView) {
- html.push('<td><div class="th-inner">&nbsp;</div><div class="fht-cell"></div></td>');
- }
-
- $.each(this.columns, function (i, column) {
- var key,
- falign = '', // footer align style
- valign = '',
- csses = [],
- style = {},
- class_ = sprintf(' class="%s"', column['class']);
-
- if (!column.visible) {
- return;
- }
-
- if (that.options.cardView && (!column.cardVisible)) {
- return;
- }
-
- falign = sprintf('text-align: %s; ', column.falign ? column.falign : column.align);
- valign = sprintf('vertical-align: %s; ', column.valign);
-
- style = calculateObjectValue(null, that.options.footerStyle);
-
- if (style && style.css) {
- for (key in style.css) {
- csses.push(key + ': ' + style.css[key]);
- }
- }
-
- html.push('<td', class_, sprintf(' style="%s"', falign + valign + csses.concat().join('; ')), '>');
- html.push('<div class="th-inner">');
-
- html.push(calculateObjectValue(column, column.footerFormatter, [data], '&nbsp;') || '&nbsp;');
-
- html.push('</div>');
- html.push('<div class="fht-cell"></div>');
- html.push('</div>');
- html.push('</td>');
- });
-
- this.$tableFooter.find('tr').html(html.join(''));
- this.$tableFooter.show();
- clearTimeout(this.timeoutFooter_);
- this.timeoutFooter_ = setTimeout($.proxy(this.fitFooter, this),
- this.$el.is(':hidden') ? 100 : 0);
- };
-
- BootstrapTable.prototype.fitFooter = function () {
- var that = this,
- $footerTd,
- elWidth,
- scrollWidth;
-
- clearTimeout(this.timeoutFooter_);
- if (this.$el.is(':hidden')) {
- this.timeoutFooter_ = setTimeout($.proxy(this.fitFooter, this), 100);
- return;
- }
-
- elWidth = this.$el.css('width');
- scrollWidth = elWidth > this.$tableBody.width() ? getScrollBarWidth() : 0;
-
- this.$tableFooter.css({
- 'margin-right': scrollWidth
- }).find('table').css('width', elWidth)
- .attr('class', this.$el.attr('class'));
-
- $footerTd = this.$tableFooter.find('td');
-
- this.$body.find('>tr:first-child:not(.no-records-found) > *').each(function (i) {
- var $this = $(this);
-
- $footerTd.eq(i).find('.fht-cell').width($this.innerWidth());
- });
- };
-
- BootstrapTable.prototype.toggleColumn = function (index, checked, needUpdate) {
- if (index === -1) {
- return;
- }
- this.columns[index].visible = checked;
- this.initHeader();
- this.initSearch();
- this.initPagination();
- this.initBody();
-
- if (this.options.showColumns) {
- var $items = this.$toolbar.find('.keep-open input').prop('disabled', false);
-
- if (needUpdate) {
- $items.filter(sprintf('[value="%s"]', index)).prop('checked', checked);
- }
-
- if ($items.filter(':checked').length <= this.options.minimumCountColumns) {
- $items.filter(':checked').prop('disabled', true);
- }
- }
- };
-
- BootstrapTable.prototype.toggleRow = function (index, uniqueId, visible) {
- if (index === -1) {
- return;
- }
-
- this.$body.find(typeof index !== 'undefined' ?
- sprintf('tr[data-index="%s"]', index) :
- sprintf('tr[data-uniqueid="%s"]', uniqueId))
- [visible ? 'show' : 'hide']();
- };
-
- BootstrapTable.prototype.getVisibleFields = function () {
- var that = this,
- visibleFields = [];
-
- $.each(this.header.fields, function (j, field) {
- var column = that.columns[getFieldIndex(that.columns, field)];
-
- if (!column.visible) {
- return;
- }
- visibleFields.push(field);
- });
- return visibleFields;
- };
-
- // PUBLIC FUNCTION DEFINITION
- // =======================
-
- BootstrapTable.prototype.resetView = function (params) {
- var padding = 0;
-
- if (params && params.height) {
- this.options.height = params.height;
- }
-
- this.$selectAll.prop('checked', this.$selectItem.length > 0 &&
- this.$selectItem.length === this.$selectItem.filter(':checked').length);
-
- if (this.options.height) {
- var toolbarHeight = getRealHeight(this.$toolbar),
- paginationHeight = getRealHeight(this.$pagination),
- height = this.options.height - toolbarHeight - paginationHeight;
-
- this.$tableContainer.css('height', height + 'px');
- }
-
- if (this.options.cardView) {
- // remove the element css
- this.$el.css('margin-top', '0');
- this.$tableContainer.css('padding-bottom', '0');
- this.$tableFooter.hide();
- return;
- }
-
- if (this.options.showHeader && this.options.height) {
- this.$tableHeader.show();
- this.resetHeader();
- padding += this.$header.outerHeight();
- } else {
- this.$tableHeader.hide();
- this.trigger('post-header');
- }
-
- if (this.options.showFooter) {
- this.resetFooter();
- if (this.options.height) {
- padding += this.$tableFooter.outerHeight() + 1;
- }
- }
-
- // Assign the correct sortable arrow
- this.getCaret();
- this.$tableContainer.css('padding-bottom', padding + 'px');
- this.trigger('reset-view');
- };
-
- BootstrapTable.prototype.getData = function (useCurrentPage) {
- return (this.searchText || !$.isEmptyObject(this.filterColumns) || !$.isEmptyObject(this.filterColumnsPartial)) ?
- (useCurrentPage ? this.data.slice(this.pageFrom - 1, this.pageTo) : this.data) :
- (useCurrentPage ? this.options.data.slice(this.pageFrom - 1, this.pageTo) : this.options.data);
- };
-
- BootstrapTable.prototype.load = function (data) {
- var fixedScroll = false;
-
- // #431: support pagination
- if (this.options.sidePagination === 'server') {
- this.options.totalRows = data.total;
- fixedScroll = data.fixedScroll;
- data = data[this.options.dataField];
- } else if (!$.isArray(data)) { // support fixedScroll
- fixedScroll = data.fixedScroll;
- data = data.data;
- }
-
- this.initData(data);
- this.initSearch();
- this.initPagination();
- this.initBody(fixedScroll);
- };
-
- BootstrapTable.prototype.append = function (data) {
- this.initData(data, 'append');
- this.initSearch();
- this.initPagination();
- this.initSort();
- this.initBody(true);
- };
-
- BootstrapTable.prototype.prepend = function (data) {
- this.initData(data, 'prepend');
- this.initSearch();
- this.initPagination();
- this.initSort();
- this.initBody(true);
- };
-
- BootstrapTable.prototype.remove = function (params) {
- var len = this.options.data.length,
- i, row;
-
- if (!params.hasOwnProperty('field') || !params.hasOwnProperty('values')) {
- return;
- }
-
- for (i = len - 1; i >= 0; i--) {
- row = this.options.data[i];
-
- if (!row.hasOwnProperty(params.field)) {
- continue;
- }
- if ($.inArray(row[params.field], params.values) !== -1) {
- this.options.data.splice(i, 1);
- }
- }
-
- if (len === this.options.data.length) {
- return;
- }
-
- this.initSearch();
- this.initPagination();
- this.initSort();
- this.initBody(true);
- };
-
- BootstrapTable.prototype.removeAll = function () {
- if (this.options.data.length > 0) {
- this.options.data.splice(0, this.options.data.length);
- this.initSearch();
- this.initPagination();
- this.initBody(true);
- }
- };
-
- BootstrapTable.prototype.getRowByUniqueId = function (id) {
- var uniqueId = this.options.uniqueId,
- len = this.options.data.length,
- dataRow = null,
- i, row, rowUniqueId;
-
- for (i = len - 1; i >= 0; i--) {
- row = this.options.data[i];
-
- if (row.hasOwnProperty(uniqueId)) { // uniqueId is a column
- rowUniqueId = row[uniqueId];
- } else if(row._data.hasOwnProperty(uniqueId)) { // uniqueId is a row data property
- rowUniqueId = row._data[uniqueId];
- } else {
- continue;
- }
-
- if (typeof rowUniqueId === 'string') {
- id = id.toString();
- } else if (typeof rowUniqueId === 'number') {
- if ((Number(rowUniqueId) === rowUniqueId) && (rowUniqueId % 1 === 0)) {
- id = parseInt(id);
- } else if ((rowUniqueId === Number(rowUniqueId)) && (rowUniqueId !== 0)) {
- id = parseFloat(id);
- }
- }
-
- if (rowUniqueId === id) {
- dataRow = row;
- break;
- }
- }
-
- return dataRow;
- };
-
- BootstrapTable.prototype.removeByUniqueId = function (id) {
- var len = this.options.data.length,
- row = this.getRowByUniqueId(id);
-
- if (row) {
- this.options.data.splice(this.options.data.indexOf(row), 1);
- }
-
- if (len === this.options.data.length) {
- return;
- }
-
- this.initSearch();
- this.initPagination();
- this.initBody(true);
- };
-
- BootstrapTable.prototype.updateByUniqueId = function (params) {
- var that = this;
- var allParams = $.isArray(params) ? params : [ params ];
-
- $.each(allParams, function(i, params) {
- var rowId;
-
- if (!params.hasOwnProperty('id') || !params.hasOwnProperty('row')) {
- return;
- }
-
- rowId = $.inArray(that.getRowByUniqueId(params.id), that.options.data);
-
- if (rowId === -1) {
- return;
- }
- $.extend(that.options.data[rowId], params.row);
- });
-
- this.initSearch();
- this.initSort();
- this.initBody(true);
- };
-
- BootstrapTable.prototype.insertRow = function (params) {
- if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) {
- return;
- }
- this.data.splice(params.index, 0, params.row);
- this.initSearch();
- this.initPagination();
- this.initSort();
- this.initBody(true);
- };
-
- BootstrapTable.prototype.updateRow = function (params) {
- var that = this;
- var allParams = $.isArray(params) ? params : [ params ];
-
- $.each(allParams, function(i, params) {
- if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) {
- return;
- }
- $.extend(that.options.data[params.index], params.row);
- });
-
- this.initSearch();
- this.initSort();
- this.initBody(true);
- };
-
- BootstrapTable.prototype.showRow = function (params) {
- if (!params.hasOwnProperty('index') && !params.hasOwnProperty('uniqueId')) {
- return;
- }
- this.toggleRow(params.index, params.uniqueId, true);
- };
-
- BootstrapTable.prototype.hideRow = function (params) {
- if (!params.hasOwnProperty('index') && !params.hasOwnProperty('uniqueId')) {
- return;
- }
- this.toggleRow(params.index, params.uniqueId, false);
- };
-
- BootstrapTable.prototype.getRowsHidden = function (show) {
- var rows = $(this.$body[0]).children().filter(':hidden'),
- i = 0;
- if (show) {
- for (; i < rows.length; i++) {
- $(rows[i]).show();
- }
- }
- return rows;
- };
-
- BootstrapTable.prototype.mergeCells = function (options) {
- var row = options.index,
- col = $.inArray(options.field, this.getVisibleFields()),
- rowspan = options.rowspan || 1,
- colspan = options.colspan || 1,
- i, j,
- $tr = this.$body.find('>tr'),
- $td;
-
- if (this.options.detailView && !this.options.cardView) {
- col += 1;
- }
-
- $td = $tr.eq(row).find('>td').eq(col);
-
- if (row < 0 || col < 0 || row >= this.data.length) {
- return;
- }
-
- for (i = row; i < row + rowspan; i++) {
- for (j = col; j < col + colspan; j++) {
- $tr.eq(i).find('>td').eq(j).hide();
- }
- }
-
- $td.attr('rowspan', rowspan).attr('colspan', colspan).show();
- };
-
- BootstrapTable.prototype.updateCell = function (params) {
- if (!params.hasOwnProperty('index') ||
- !params.hasOwnProperty('field') ||
- !params.hasOwnProperty('value')) {
- return;
- }
- this.data[params.index][params.field] = params.value;
-
- if (params.reinit === false) {
- return;
- }
- this.initSort();
- this.initBody(true);
- };
-
- BootstrapTable.prototype.getOptions = function () {
- return this.options;
- };
-
- BootstrapTable.prototype.getSelections = function () {
- var that = this;
-
- return $.grep(this.options.data, function (row) {
- return row[that.header.stateField];
- });
- };
-
- BootstrapTable.prototype.getAllSelections = function () {
- var that = this;
-
- return $.grep(this.options.data, function (row) {
- return row[that.header.stateField];
- });
- };
-
- BootstrapTable.prototype.checkAll = function () {
- this.checkAll_(true);
- };
-
- BootstrapTable.prototype.uncheckAll = function () {
- this.checkAll_(false);
- };
-
- BootstrapTable.prototype.checkInvert = function () {
- var that = this;
- var rows = that.$selectItem.filter(':enabled');
- var checked = rows.filter(':checked');
- rows.each(function() {
- $(this).prop('checked', !$(this).prop('checked'));
- });
- that.updateRows();
- that.updateSelected();
- that.trigger('uncheck-some', checked);
- checked = that.getSelections();
- that.trigger('check-some', checked);
- };
-
- BootstrapTable.prototype.checkAll_ = function (checked) {
- var rows;
- if (!checked) {
- rows = this.getSelections();
- }
- this.$selectAll.add(this.$selectAll_).prop('checked', checked);
- this.$selectItem.filter(':enabled').prop('checked', checked);
- this.updateRows();
- if (checked) {
- rows = this.getSelections();
- }
- this.trigger(checked ? 'check-all' : 'uncheck-all', rows);
- };
-
- BootstrapTable.prototype.check = function (index) {
- this.check_(true, index);
- };
-
- BootstrapTable.prototype.uncheck = function (index) {
- this.check_(false, index);
- };
-
- BootstrapTable.prototype.check_ = function (checked, index) {
- var $el = this.$selectItem.filter(sprintf('[data-index="%s"]', index)).prop('checked', checked);
- this.data[index][this.header.stateField] = checked;
- this.updateSelected();
- this.trigger(checked ? 'check' : 'uncheck', this.data[index], $el);
- };
-
- BootstrapTable.prototype.checkBy = function (obj) {
- this.checkBy_(true, obj);
- };
-
- BootstrapTable.prototype.uncheckBy = function (obj) {
- this.checkBy_(false, obj);
- };
-
- BootstrapTable.prototype.checkBy_ = function (checked, obj) {
- if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) {
- return;
- }
-
- var that = this,
- rows = [];
- $.each(this.options.data, function (index, row) {
- if (!row.hasOwnProperty(obj.field)) {
- return false;
- }
- if ($.inArray(row[obj.field], obj.values) !== -1) {
- var $el = that.$selectItem.filter(':enabled')
- .filter(sprintf('[data-index="%s"]', index)).prop('checked', checked);
- row[that.header.stateField] = checked;
- rows.push(row);
- that.trigger(checked ? 'check' : 'uncheck', row, $el);
- }
- });
- this.updateSelected();
- this.trigger(checked ? 'check-some' : 'uncheck-some', rows);
- };
-
- BootstrapTable.prototype.destroy = function () {
- this.$el.insertBefore(this.$container);
- $(this.options.toolbar).insertBefore(this.$el);
- this.$container.next().remove();
- this.$container.remove();
- this.$el.html(this.$el_.html())
- .css('margin-top', '0')
- .attr('class', this.$el_.attr('class') || ''); // reset the class
- };
-
- BootstrapTable.prototype.showLoading = function () {
- this.$tableLoading.show();
- };
-
- BootstrapTable.prototype.hideLoading = function () {
- this.$tableLoading.hide();
- };
-
- BootstrapTable.prototype.togglePagination = function () {
- this.options.pagination = !this.options.pagination;
- var button = this.$toolbar.find('button[name="paginationSwitch"] i');
- if (this.options.pagination) {
- button.attr("class", this.options.iconsPrefix + " " + this.options.icons.paginationSwitchDown);
- } else {
- button.attr("class", this.options.iconsPrefix + " " + this.options.icons.paginationSwitchUp);
- }
- this.updatePagination();
- };
-
- BootstrapTable.prototype.refresh = function (params) {
- if (params && params.url) {
- this.options.pageNumber = 1;
- }
- this.initServer(params && params.silent,
- params && params.query, params && params.url);
- this.trigger('refresh', params);
- };
-
- BootstrapTable.prototype.resetWidth = function () {
- if (this.options.showHeader && this.options.height) {
- this.fitHeader();
- }
- if (this.options.showFooter) {
- this.fitFooter();
- }
- };
-
- BootstrapTable.prototype.showColumn = function (field) {
- this.toggleColumn(getFieldIndex(this.columns, field), true, true);
- };
-
- BootstrapTable.prototype.hideColumn = function (field) {
- this.toggleColumn(getFieldIndex(this.columns, field), false, true);
- };
-
- BootstrapTable.prototype.getHiddenColumns = function () {
- return $.grep(this.columns, function (column) {
- return !column.visible;
- });
- };
-
- BootstrapTable.prototype.getVisibleColumns = function () {
- return $.grep(this.columns, function (column) {
- return column.visible;
- });
- };
-
- BootstrapTable.prototype.toggleAllColumns = function (visible) {
- $.each(this.columns, function (i, column) {
- this.columns[i].visible = visible;
- });
-
- this.initHeader();
- this.initSearch();
- this.initPagination();
- this.initBody();
- if (this.options.showColumns) {
- var $items = this.$toolbar.find('.keep-open input').prop('disabled', false);
-
- if ($items.filter(':checked').length <= this.options.minimumCountColumns) {
- $items.filter(':checked').prop('disabled', true);
- }
- }
- };
-
- BootstrapTable.prototype.showAllColumns = function () {
- this.toggleAllColumns(true);
- };
-
- BootstrapTable.prototype.hideAllColumns = function () {
- this.toggleAllColumns(false);
- };
-
- BootstrapTable.prototype.filterBy = function (columns) {
- this.filterColumns = $.isEmptyObject(columns) ? {} : columns;
- this.options.pageNumber = 1;
- this.initSearch();
- this.updatePagination();
- };
-
- BootstrapTable.prototype.scrollTo = function (value) {
- if (typeof value === 'string') {
- value = value === 'bottom' ? this.$tableBody[0].scrollHeight : 0;
- }
- if (typeof value === 'number') {
- this.$tableBody.scrollTop(value);
- }
- if (typeof value === 'undefined') {
- return this.$tableBody.scrollTop();
- }
- };
-
- BootstrapTable.prototype.getScrollPosition = function () {
- return this.scrollTo();
- };
-
- BootstrapTable.prototype.selectPage = function (page) {
- if (page > 0 && page <= this.options.totalPages) {
- this.options.pageNumber = page;
- this.updatePagination();
- }
- };
-
- BootstrapTable.prototype.prevPage = function () {
- if (this.options.pageNumber > 1) {
- this.options.pageNumber--;
- this.updatePagination();
- }
- };
-
- BootstrapTable.prototype.nextPage = function () {
- if (this.options.pageNumber < this.options.totalPages) {
- this.options.pageNumber++;
- this.updatePagination();
- }
- };
-
- BootstrapTable.prototype.toggleView = function () {
- this.options.cardView = !this.options.cardView;
- this.initHeader();
- // Fixed remove toolbar when click cardView button.
- //that.initToolbar();
- this.initBody();
- this.trigger('toggle', this.options.cardView);
- };
-
- BootstrapTable.prototype.refreshOptions = function (options) {
- //If the objects are equivalent then avoid the call of destroy / init methods
- if (compareObjects(this.options, options, true)) {
- return;
- }
- this.options = $.extend(this.options, options);
- this.trigger('refresh-options', this.options);
- this.destroy();
- this.init();
- };
-
- BootstrapTable.prototype.resetSearch = function (text) {
- var $search = this.$toolbar.find('.search input');
- $search.val(text || '');
- this.onSearch({currentTarget: $search});
- };
-
- BootstrapTable.prototype.expandRow_ = function (expand, index) {
- var $tr = this.$body.find(sprintf('> tr[data-index="%s"]', index));
- if ($tr.next().is('tr.detail-view') === (expand ? false : true)) {
- $tr.find('> td > .detail-icon').click();
- }
- };
-
- BootstrapTable.prototype.expandRow = function (index) {
- this.expandRow_(true, index);
- };
-
- BootstrapTable.prototype.collapseRow = function (index) {
- this.expandRow_(false, index);
- };
-
- BootstrapTable.prototype.expandAllRows = function (isSubTable) {
- if (isSubTable) {
- var $tr = this.$body.find(sprintf('> tr[data-index="%s"]', 0)),
- that = this,
- detailIcon = null,
- executeInterval = false,
- idInterval = -1;
-
- if (!$tr.next().is('tr.detail-view')) {
- $tr.find('> td > .detail-icon').click();
- executeInterval = true;
- } else if (!$tr.next().next().is('tr.detail-view')) {
- $tr.next().find(".detail-icon").click();
- executeInterval = true;
- }
-
- if (executeInterval) {
- try {
- idInterval = setInterval(function () {
- detailIcon = that.$body.find("tr.detail-view").last().find(".detail-icon");
- if (detailIcon.length > 0) {
- detailIcon.click();
- } else {
- clearInterval(idInterval);
- }
- }, 1);
- } catch (ex) {
- clearInterval(idInterval);
- }
- }
- } else {
- var trs = this.$body.children();
- for (var i = 0; i < trs.length; i++) {
- this.expandRow_(true, $(trs[i]).data("index"));
- }
- }
- };
-
- BootstrapTable.prototype.collapseAllRows = function (isSubTable) {
- if (isSubTable) {
- this.expandRow_(false, 0);
- } else {
- var trs = this.$body.children();
- for (var i = 0; i < trs.length; i++) {
- this.expandRow_(false, $(trs[i]).data("index"));
- }
- }
- };
-
- BootstrapTable.prototype.updateFormatText = function (name, text) {
- if (this.options[sprintf('format%s', name)]) {
- if (typeof text === 'string') {
- this.options[sprintf('format%s', name)] = function () {
- return text;
- };
- } else if (typeof text === 'function') {
- this.options[sprintf('format%s', name)] = text;
- }
- }
- this.initToolbar();
- this.initPagination();
- this.initBody();
- };
-
- // BOOTSTRAP TABLE PLUGIN DEFINITION
- // =======================
-
- var allowedMethods = [
- 'getOptions',
- 'getSelections', 'getAllSelections', 'getData',
- 'load', 'append', 'prepend', 'remove', 'removeAll',
- 'insertRow', 'updateRow', 'updateCell', 'updateByUniqueId', 'removeByUniqueId',
- 'getRowByUniqueId', 'showRow', 'hideRow', 'getRowsHidden',
- 'mergeCells',
- 'checkAll', 'uncheckAll', 'checkInvert',
- 'check', 'uncheck',
- 'checkBy', 'uncheckBy',
- 'refresh',
- 'resetView',
- 'resetWidth',
- 'destroy',
- 'showLoading', 'hideLoading',
- 'showColumn', 'hideColumn', 'getHiddenColumns', 'getVisibleColumns',
- 'showAllColumns', 'hideAllColumns',
- 'filterBy',
- 'scrollTo',
- 'getScrollPosition',
- 'selectPage', 'prevPage', 'nextPage',
- 'togglePagination',
- 'toggleView',
- 'refreshOptions',
- 'resetSearch',
- 'expandRow', 'collapseRow', 'expandAllRows', 'collapseAllRows',
- 'updateFormatText'
- ];
-
- $.fn.bootstrapTable = function (option) {
- var value,
- args = Array.prototype.slice.call(arguments, 1);
-
- this.each(function () {
- var $this = $(this),
- data = $this.data('bootstrap.table'),
- options = $.extend({}, BootstrapTable.DEFAULTS, $this.data(),
- typeof option === 'object' && option);
-
- if (typeof option === 'string') {
- if ($.inArray(option, allowedMethods) < 0) {
- throw new Error("Unknown method: " + option);
- }
-
- if (!data) {
- return;
- }
-
- value = data[option].apply(data, args);
-
- if (option === 'destroy') {
- $this.removeData('bootstrap.table');
- }
- }
-
- if (!data) {
- $this.data('bootstrap.table', (data = new BootstrapTable(this, options)));
- }
- });
-
- return typeof value === 'undefined' ? this : value;
- };
-
- $.fn.bootstrapTable.Constructor = BootstrapTable;
- $.fn.bootstrapTable.defaults = BootstrapTable.DEFAULTS;
- $.fn.bootstrapTable.columnDefaults = BootstrapTable.COLUMN_DEFAULTS;
- $.fn.bootstrapTable.locales = BootstrapTable.LOCALES;
- $.fn.bootstrapTable.methods = allowedMethods;
- $.fn.bootstrapTable.utils = {
- sprintf: sprintf,
- getFieldIndex: getFieldIndex,
- compareObjects: compareObjects,
- calculateObjectValue: calculateObjectValue,
- getItemField: getItemField,
- objectKeys: objectKeys,
- isIEBrowser: isIEBrowser
- };
-
- // BOOTSTRAP TABLE INIT
- // =======================
-
- $(function () {
- $('[data-toggle="table"]').bootstrapTable();
- });
-})(jQuery);
diff --git a/debian/missing-sources/bootstrap-table-export-1.11.0.js b/debian/missing-sources/bootstrap-table-export-1.11.0.js
deleted file mode 100644
index 98b8f323..00000000
--- a/debian/missing-sources/bootstrap-table-export-1.11.0.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * @author zhixin wen <wenzhixin2010@gmail.com>
- * extensions: https://github.com/kayalshri/tableExport.jquery.plugin
- */
-
-(function ($) {
- 'use strict';
- var sprintf = $.fn.bootstrapTable.utils.sprintf;
-
- var TYPE_NAME = {
- json: 'JSON',
- xml: 'XML',
- png: 'PNG',
- csv: 'CSV',
- txt: 'TXT',
- sql: 'SQL',
- doc: 'MS-Word',
- excel: 'MS-Excel',
- powerpoint: 'MS-Powerpoint',
- pdf: 'PDF'
- };
-
- $.extend($.fn.bootstrapTable.defaults, {
- showExport: false,
- exportDataType: 'basic', // basic, all, selected
- // 'json', 'xml', 'png', 'csv', 'txt', 'sql', 'doc', 'excel', 'powerpoint', 'pdf'
- exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'],
- exportOptions: {}
- });
-
- $.extend($.fn.bootstrapTable.defaults.icons, {
- export: 'glyphicon-export icon-share'
- });
-
- $.extend($.fn.bootstrapTable.locales, {
- formatExport: function () {
- return 'Export data';
- }
- });
- $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
-
- var BootstrapTable = $.fn.bootstrapTable.Constructor,
- _initToolbar = BootstrapTable.prototype.initToolbar;
-
- BootstrapTable.prototype.initToolbar = function () {
- this.showToolbar = this.options.showExport;
-
- _initToolbar.apply(this, Array.prototype.slice.apply(arguments));
-
- if (this.options.showExport) {
- var that = this,
- $btnGroup = this.$toolbar.find('>.btn-group'),
- $export = $btnGroup.find('div.export');
-
- if (!$export.length) {
- $export = $([
- '<div class="export btn-group">',
- '<button class="btn' +
- sprintf(' btn-%s', this.options.buttonsClass) +
- sprintf(' btn-%s', this.options.iconSize) +
- ' dropdown-toggle" ' +
- 'title="' + this.options.formatExport() + '" ' +
- 'data-toggle="dropdown" type="button">',
- sprintf('<i class="%s %s"></i> ', this.options.iconsPrefix, this.options.icons.export),
- '<span class="caret"></span>',
- '</button>',
- '<ul class="dropdown-menu" role="menu">',
- '</ul>',
- '</div>'].join('')).appendTo($btnGroup);
-
- var $menu = $export.find('.dropdown-menu'),
- exportTypes = this.options.exportTypes;
-
- if (typeof this.options.exportTypes === 'string') {
- var types = this.options.exportTypes.slice(1, -1).replace(/ /g, '').split(',');
-
- exportTypes = [];
- $.each(types, function (i, value) {
- exportTypes.push(value.slice(1, -1));
- });
- }
- $.each(exportTypes, function (i, type) {
- if (TYPE_NAME.hasOwnProperty(type)) {
- $menu.append(['<li data-type="' + type + '">',
- '<a href="javascript:void(0)">',
- TYPE_NAME[type],
- '</a>',
- '</li>'].join(''));
- }
- });
-
- $menu.find('li').click(function () {
- var type = $(this).data('type'),
- doExport = function () {
- that.$el.tableExport($.extend({}, that.options.exportOptions, {
- type: type,
- escape: false
- }));
- };
-
- if (that.options.exportDataType === 'all' && that.options.pagination) {
- that.$el.one(that.options.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table', function () {
- doExport();
- that.togglePagination();
- });
- that.togglePagination();
- } else if (that.options.exportDataType === 'selected') {
- var data = that.getData(),
- selectedData = that.getAllSelections();
-
- that.load(selectedData);
- doExport();
- that.load(data);
- } else {
- doExport();
- }
- });
- }
- }
- };
-})(jQuery);
diff --git a/debian/missing-sources/bootstrap-theme-3.3.7.css b/debian/missing-sources/bootstrap-theme-3.3.7.css
deleted file mode 100644
index 31d88826..00000000
--- a/debian/missing-sources/bootstrap-theme-3.3.7.css
+++ /dev/null
@@ -1,587 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-.btn-default,
-.btn-primary,
-.btn-success,
-.btn-info,
-.btn-warning,
-.btn-danger {
- text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
-}
-.btn-default:active,
-.btn-primary:active,
-.btn-success:active,
-.btn-info:active,
-.btn-warning:active,
-.btn-danger:active,
-.btn-default.active,
-.btn-primary.active,
-.btn-success.active,
-.btn-info.active,
-.btn-warning.active,
-.btn-danger.active {
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
-}
-.btn-default.disabled,
-.btn-primary.disabled,
-.btn-success.disabled,
-.btn-info.disabled,
-.btn-warning.disabled,
-.btn-danger.disabled,
-.btn-default[disabled],
-.btn-primary[disabled],
-.btn-success[disabled],
-.btn-info[disabled],
-.btn-warning[disabled],
-.btn-danger[disabled],
-fieldset[disabled] .btn-default,
-fieldset[disabled] .btn-primary,
-fieldset[disabled] .btn-success,
-fieldset[disabled] .btn-info,
-fieldset[disabled] .btn-warning,
-fieldset[disabled] .btn-danger {
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-.btn-default .badge,
-.btn-primary .badge,
-.btn-success .badge,
-.btn-info .badge,
-.btn-warning .badge,
-.btn-danger .badge {
- text-shadow: none;
-}
-.btn:active,
-.btn.active {
- background-image: none;
-}
-.btn-default {
- text-shadow: 0 1px 0 #fff;
- background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
- background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
- background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #dbdbdb;
- border-color: #ccc;
-}
-.btn-default:hover,
-.btn-default:focus {
- background-color: #e0e0e0;
- background-position: 0 -15px;
-}
-.btn-default:active,
-.btn-default.active {
- background-color: #e0e0e0;
- border-color: #dbdbdb;
-}
-.btn-default.disabled,
-.btn-default[disabled],
-fieldset[disabled] .btn-default,
-.btn-default.disabled:hover,
-.btn-default[disabled]:hover,
-fieldset[disabled] .btn-default:hover,
-.btn-default.disabled:focus,
-.btn-default[disabled]:focus,
-fieldset[disabled] .btn-default:focus,
-.btn-default.disabled.focus,
-.btn-default[disabled].focus,
-fieldset[disabled] .btn-default.focus,
-.btn-default.disabled:active,
-.btn-default[disabled]:active,
-fieldset[disabled] .btn-default:active,
-.btn-default.disabled.active,
-.btn-default[disabled].active,
-fieldset[disabled] .btn-default.active {
- background-color: #e0e0e0;
- background-image: none;
-}
-.btn-primary {
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
- background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #245580;
-}
-.btn-primary:hover,
-.btn-primary:focus {
- background-color: #265a88;
- background-position: 0 -15px;
-}
-.btn-primary:active,
-.btn-primary.active {
- background-color: #265a88;
- border-color: #245580;
-}
-.btn-primary.disabled,
-.btn-primary[disabled],
-fieldset[disabled] .btn-primary,
-.btn-primary.disabled:hover,
-.btn-primary[disabled]:hover,
-fieldset[disabled] .btn-primary:hover,
-.btn-primary.disabled:focus,
-.btn-primary[disabled]:focus,
-fieldset[disabled] .btn-primary:focus,
-.btn-primary.disabled.focus,
-.btn-primary[disabled].focus,
-fieldset[disabled] .btn-primary.focus,
-.btn-primary.disabled:active,
-.btn-primary[disabled]:active,
-fieldset[disabled] .btn-primary:active,
-.btn-primary.disabled.active,
-.btn-primary[disabled].active,
-fieldset[disabled] .btn-primary.active {
- background-color: #265a88;
- background-image: none;
-}
-.btn-success {
- background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
- background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
- background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #3e8f3e;
-}
-.btn-success:hover,
-.btn-success:focus {
- background-color: #419641;
- background-position: 0 -15px;
-}
-.btn-success:active,
-.btn-success.active {
- background-color: #419641;
- border-color: #3e8f3e;
-}
-.btn-success.disabled,
-.btn-success[disabled],
-fieldset[disabled] .btn-success,
-.btn-success.disabled:hover,
-.btn-success[disabled]:hover,
-fieldset[disabled] .btn-success:hover,
-.btn-success.disabled:focus,
-.btn-success[disabled]:focus,
-fieldset[disabled] .btn-success:focus,
-.btn-success.disabled.focus,
-.btn-success[disabled].focus,
-fieldset[disabled] .btn-success.focus,
-.btn-success.disabled:active,
-.btn-success[disabled]:active,
-fieldset[disabled] .btn-success:active,
-.btn-success.disabled.active,
-.btn-success[disabled].active,
-fieldset[disabled] .btn-success.active {
- background-color: #419641;
- background-image: none;
-}
-.btn-info {
- background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
- background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
- background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #28a4c9;
-}
-.btn-info:hover,
-.btn-info:focus {
- background-color: #2aabd2;
- background-position: 0 -15px;
-}
-.btn-info:active,
-.btn-info.active {
- background-color: #2aabd2;
- border-color: #28a4c9;
-}
-.btn-info.disabled,
-.btn-info[disabled],
-fieldset[disabled] .btn-info,
-.btn-info.disabled:hover,
-.btn-info[disabled]:hover,
-fieldset[disabled] .btn-info:hover,
-.btn-info.disabled:focus,
-.btn-info[disabled]:focus,
-fieldset[disabled] .btn-info:focus,
-.btn-info.disabled.focus,
-.btn-info[disabled].focus,
-fieldset[disabled] .btn-info.focus,
-.btn-info.disabled:active,
-.btn-info[disabled]:active,
-fieldset[disabled] .btn-info:active,
-.btn-info.disabled.active,
-.btn-info[disabled].active,
-fieldset[disabled] .btn-info.active {
- background-color: #2aabd2;
- background-image: none;
-}
-.btn-warning {
- background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
- background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
- background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #e38d13;
-}
-.btn-warning:hover,
-.btn-warning:focus {
- background-color: #eb9316;
- background-position: 0 -15px;
-}
-.btn-warning:active,
-.btn-warning.active {
- background-color: #eb9316;
- border-color: #e38d13;
-}
-.btn-warning.disabled,
-.btn-warning[disabled],
-fieldset[disabled] .btn-warning,
-.btn-warning.disabled:hover,
-.btn-warning[disabled]:hover,
-fieldset[disabled] .btn-warning:hover,
-.btn-warning.disabled:focus,
-.btn-warning[disabled]:focus,
-fieldset[disabled] .btn-warning:focus,
-.btn-warning.disabled.focus,
-.btn-warning[disabled].focus,
-fieldset[disabled] .btn-warning.focus,
-.btn-warning.disabled:active,
-.btn-warning[disabled]:active,
-fieldset[disabled] .btn-warning:active,
-.btn-warning.disabled.active,
-.btn-warning[disabled].active,
-fieldset[disabled] .btn-warning.active {
- background-color: #eb9316;
- background-image: none;
-}
-.btn-danger {
- background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
- background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
- background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #b92c28;
-}
-.btn-danger:hover,
-.btn-danger:focus {
- background-color: #c12e2a;
- background-position: 0 -15px;
-}
-.btn-danger:active,
-.btn-danger.active {
- background-color: #c12e2a;
- border-color: #b92c28;
-}
-.btn-danger.disabled,
-.btn-danger[disabled],
-fieldset[disabled] .btn-danger,
-.btn-danger.disabled:hover,
-.btn-danger[disabled]:hover,
-fieldset[disabled] .btn-danger:hover,
-.btn-danger.disabled:focus,
-.btn-danger[disabled]:focus,
-fieldset[disabled] .btn-danger:focus,
-.btn-danger.disabled.focus,
-.btn-danger[disabled].focus,
-fieldset[disabled] .btn-danger.focus,
-.btn-danger.disabled:active,
-.btn-danger[disabled]:active,
-fieldset[disabled] .btn-danger:active,
-.btn-danger.disabled.active,
-.btn-danger[disabled].active,
-fieldset[disabled] .btn-danger.active {
- background-color: #c12e2a;
- background-image: none;
-}
-.thumbnail,
-.img-thumbnail {
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
- box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
-}
-.dropdown-menu > li > a:hover,
-.dropdown-menu > li > a:focus {
- background-color: #e8e8e8;
- background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
- background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
- background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
- background-repeat: repeat-x;
-}
-.dropdown-menu > .active > a,
-.dropdown-menu > .active > a:hover,
-.dropdown-menu > .active > a:focus {
- background-color: #2e6da4;
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
- background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
- background-repeat: repeat-x;
-}
-.navbar-default {
- background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
- background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
- background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
-}
-.navbar-default .navbar-nav > .open > a,
-.navbar-default .navbar-nav > .active > a {
- background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
- background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
- background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
- background-repeat: repeat-x;
- -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
- box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
-}
-.navbar-brand,
-.navbar-nav > li > a {
- text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
-}
-.navbar-inverse {
- background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
- background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
- background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-radius: 4px;
-}
-.navbar-inverse .navbar-nav > .open > a,
-.navbar-inverse .navbar-nav > .active > a {
- background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
- background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
- background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
- background-repeat: repeat-x;
- -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
- box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
-}
-.navbar-inverse .navbar-brand,
-.navbar-inverse .navbar-nav > li > a {
- text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
-}
-.navbar-static-top,
-.navbar-fixed-top,
-.navbar-fixed-bottom {
- border-radius: 0;
-}
-@media (max-width: 767px) {
- .navbar .navbar-nav .open .dropdown-menu > .active > a,
- .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
- .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
- color: #fff;
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
- background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
- background-repeat: repeat-x;
- }
-}
-.alert {
- text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
-}
-.alert-success {
- background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
- background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
- background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
- background-repeat: repeat-x;
- border-color: #b2dba1;
-}
-.alert-info {
- background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
- background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
- background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
- background-repeat: repeat-x;
- border-color: #9acfea;
-}
-.alert-warning {
- background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
- background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
- background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
- background-repeat: repeat-x;
- border-color: #f5e79e;
-}
-.alert-danger {
- background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
- background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
- background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
- background-repeat: repeat-x;
- border-color: #dca7a7;
-}
-.progress {
- background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
- background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
- background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar {
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
- background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-success {
- background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
- background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
- background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-info {
- background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
- background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
- background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-warning {
- background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
- background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
- background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-danger {
- background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
- background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
- background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-striped {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-}
-.list-group {
- border-radius: 4px;
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
- box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
-}
-.list-group-item.active,
-.list-group-item.active:hover,
-.list-group-item.active:focus {
- text-shadow: 0 -1px 0 #286090;
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
- background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
- background-repeat: repeat-x;
- border-color: #2b669a;
-}
-.list-group-item.active .badge,
-.list-group-item.active:hover .badge,
-.list-group-item.active:focus .badge {
- text-shadow: none;
-}
-.panel {
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
- box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
-}
-.panel-default > .panel-heading {
- background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
- background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
- background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-primary > .panel-heading {
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
- background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-success > .panel-heading {
- background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
- background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
- background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-info > .panel-heading {
- background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
- background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
- background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-warning > .panel-heading {
- background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
- background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
- background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-danger > .panel-heading {
- background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
- background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
- background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
- background-repeat: repeat-x;
-}
-.well {
- background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
- background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
- background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
- background-repeat: repeat-x;
- border-color: #dcdcdc;
- -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
- box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
-}
-/*# sourceMappingURL=bootstrap-theme.css.map */
diff --git a/debian/missing-sources/bootstrap-toggle-2.2.2.css b/debian/missing-sources/bootstrap-toggle-2.2.2.css
deleted file mode 100644
index 057d08b3..00000000
--- a/debian/missing-sources/bootstrap-toggle-2.2.2.css
+++ /dev/null
@@ -1,83 +0,0 @@
-/*! ========================================================================
- * Bootstrap Toggle: bootstrap-toggle.css v2.2.0
- * http://www.bootstraptoggle.com
- * ========================================================================
- * Copyright 2014 Min Hur, The New York Times Company
- * Licensed under MIT
- * ======================================================================== */
-
-
-.checkbox label .toggle,
-.checkbox-inline .toggle {
- margin-left: -20px;
- margin-right: 5px;
-}
-
-.toggle {
- position: relative;
- overflow: hidden;
-}
-.toggle input[type="checkbox"] {
- display: none;
-}
-.toggle-group {
- position: absolute;
- width: 200%;
- top: 0;
- bottom: 0;
- left: 0;
- transition: left 0.35s;
- -webkit-transition: left 0.35s;
- -moz-user-select: none;
- -webkit-user-select: none;
-}
-.toggle.off .toggle-group {
- left: -100%;
-}
-.toggle-on {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 50%;
- margin: 0;
- border: 0;
- border-radius: 0;
-}
-.toggle-off {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 50%;
- right: 0;
- margin: 0;
- border: 0;
- border-radius: 0;
-}
-.toggle-handle {
- position: relative;
- margin: 0 auto;
- padding-top: 0px;
- padding-bottom: 0px;
- height: 100%;
- width: 0px;
- border-width: 0 1px;
-}
-
-.toggle.btn { min-width: 59px; min-height: 34px; }
-.toggle-on.btn { padding-right: 24px; }
-.toggle-off.btn { padding-left: 24px; }
-
-.toggle.btn-lg { min-width: 79px; min-height: 45px; }
-.toggle-on.btn-lg { padding-right: 31px; }
-.toggle-off.btn-lg { padding-left: 31px; }
-.toggle-handle.btn-lg { width: 40px; }
-
-.toggle.btn-sm { min-width: 50px; min-height: 30px;}
-.toggle-on.btn-sm { padding-right: 20px; }
-.toggle-off.btn-sm { padding-left: 20px; }
-
-.toggle.btn-xs { min-width: 35px; min-height: 22px;}
-.toggle-on.btn-xs { padding-right: 12px; }
-.toggle-off.btn-xs { padding-left: 12px; }
-
diff --git a/debian/missing-sources/bootstrap-toggle-2.2.2.js b/debian/missing-sources/bootstrap-toggle-2.2.2.js
deleted file mode 100644
index 533914ed..00000000
--- a/debian/missing-sources/bootstrap-toggle-2.2.2.js
+++ /dev/null
@@ -1,180 +0,0 @@
-/*! ========================================================================
- * Bootstrap Toggle: bootstrap-toggle.js v2.2.0
- * http://www.bootstraptoggle.com
- * ========================================================================
- * Copyright 2014 Min Hur, The New York Times Company
- * Licensed under MIT
- * ======================================================================== */
-
-
- +function ($) {
- 'use strict';
-
- // TOGGLE PUBLIC CLASS DEFINITION
- // ==============================
-
- var Toggle = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, this.defaults(), options)
- this.render()
- }
-
- Toggle.VERSION = '2.2.0'
-
- Toggle.DEFAULTS = {
- on: 'On',
- off: 'Off',
- onstyle: 'primary',
- offstyle: 'default',
- size: 'normal',
- style: '',
- width: null,
- height: null
- }
-
- Toggle.prototype.defaults = function() {
- return {
- on: this.$element.attr('data-on') || Toggle.DEFAULTS.on,
- off: this.$element.attr('data-off') || Toggle.DEFAULTS.off,
- onstyle: this.$element.attr('data-onstyle') || Toggle.DEFAULTS.onstyle,
- offstyle: this.$element.attr('data-offstyle') || Toggle.DEFAULTS.offstyle,
- size: this.$element.attr('data-size') || Toggle.DEFAULTS.size,
- style: this.$element.attr('data-style') || Toggle.DEFAULTS.style,
- width: this.$element.attr('data-width') || Toggle.DEFAULTS.width,
- height: this.$element.attr('data-height') || Toggle.DEFAULTS.height
- }
- }
-
- Toggle.prototype.render = function () {
- this._onstyle = 'btn-' + this.options.onstyle
- this._offstyle = 'btn-' + this.options.offstyle
- var size = this.options.size === 'large' ? 'btn-lg'
- : this.options.size === 'small' ? 'btn-sm'
- : this.options.size === 'mini' ? 'btn-xs'
- : ''
- var $toggleOn = $('<label class="btn">').html(this.options.on)
- .addClass(this._onstyle + ' ' + size)
- var $toggleOff = $('<label class="btn">').html(this.options.off)
- .addClass(this._offstyle + ' ' + size + ' active')
- var $toggleHandle = $('<span class="toggle-handle btn btn-default">')
- .addClass(size)
- var $toggleGroup = $('<div class="toggle-group">')
- .append($toggleOn, $toggleOff, $toggleHandle)
- var $toggle = $('<div class="toggle btn" data-toggle="toggle">')
- .addClass( this.$element.prop('checked') ? this._onstyle : this._offstyle+' off' )
- .addClass(size).addClass(this.options.style)
-
- this.$element.wrap($toggle)
- $.extend(this, {
- $toggle: this.$element.parent(),
- $toggleOn: $toggleOn,
- $toggleOff: $toggleOff,
- $toggleGroup: $toggleGroup
- })
- this.$toggle.append($toggleGroup)
-
- var width = this.options.width || Math.max($toggleOn.outerWidth(), $toggleOff.outerWidth())+($toggleHandle.outerWidth()/2)
- var height = this.options.height || Math.max($toggleOn.outerHeight(), $toggleOff.outerHeight())
- $toggleOn.addClass('toggle-on')
- $toggleOff.addClass('toggle-off')
- this.$toggle.css({ width: width, height: height })
- if (this.options.height) {
- $toggleOn.css('line-height', $toggleOn.height() + 'px')
- $toggleOff.css('line-height', $toggleOff.height() + 'px')
- }
- this.update(true)
- this.trigger(true)
- }
-
- Toggle.prototype.toggle = function () {
- if (this.$element.prop('checked')) this.off()
- else this.on()
- }
-
- Toggle.prototype.on = function (silent) {
- if (this.$element.prop('disabled')) return false
- this.$toggle.removeClass(this._offstyle + ' off').addClass(this._onstyle)
- this.$element.prop('checked', true)
- if (!silent) this.trigger()
- }
-
- Toggle.prototype.off = function (silent) {
- if (this.$element.prop('disabled')) return false
- this.$toggle.removeClass(this._onstyle).addClass(this._offstyle + ' off')
- this.$element.prop('checked', false)
- if (!silent) this.trigger()
- }
-
- Toggle.prototype.enable = function () {
- this.$toggle.removeAttr('disabled')
- this.$element.prop('disabled', false)
- }
-
- Toggle.prototype.disable = function () {
- this.$toggle.attr('disabled', 'disabled')
- this.$element.prop('disabled', true)
- }
-
- Toggle.prototype.update = function (silent) {
- if (this.$element.prop('disabled')) this.disable()
- else this.enable()
- if (this.$element.prop('checked')) this.on(silent)
- else this.off(silent)
- }
-
- Toggle.prototype.trigger = function (silent) {
- this.$element.off('change.bs.toggle')
- if (!silent) this.$element.change()
- this.$element.on('change.bs.toggle', $.proxy(function() {
- this.update()
- }, this))
- }
-
- Toggle.prototype.destroy = function() {
- this.$element.off('change.bs.toggle')
- this.$toggleGroup.remove()
- this.$element.removeData('bs.toggle')
- this.$element.unwrap()
- }
-
- // TOGGLE PLUGIN DEFINITION
- // ========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.toggle')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.toggle', (data = new Toggle(this, options)))
- if (typeof option == 'string' && data[option]) data[option]()
- })
- }
-
- var old = $.fn.bootstrapToggle
-
- $.fn.bootstrapToggle = Plugin
- $.fn.bootstrapToggle.Constructor = Toggle
-
- // TOGGLE NO CONFLICT
- // ==================
-
- $.fn.toggle.noConflict = function () {
- $.fn.bootstrapToggle = old
- return this
- }
-
- // TOGGLE DATA-API
- // ===============
-
- $(function() {
- $('input[type=checkbox][data-toggle^=toggle]').bootstrapToggle()
- })
-
- $(document).on('click.bs.toggle', 'div[data-toggle^=toggle]', function(e) {
- var $checkbox = $(this).find('input[type=checkbox]')
- $checkbox.bootstrapToggle('toggle')
- e.preventDefault()
- })
-
-}(jQuery);
diff --git a/debian/missing-sources/c3-0.4.18.css b/debian/missing-sources/c3-0.4.18.css
deleted file mode 100644
index 89969eea..00000000
--- a/debian/missing-sources/c3-0.4.18.css
+++ /dev/null
@@ -1,174 +0,0 @@
-/*-- Chart --*/
-.c3 svg {
- font: 10px sans-serif;
- -webkit-tap-highlight-color: transparent; }
-
-.c3 path, .c3 line {
- fill: none;
- stroke: #000; }
-
-.c3 text {
- -webkit-user-select: none;
- -moz-user-select: none;
- user-select: none; }
-
-.c3-legend-item-tile,
-.c3-xgrid-focus,
-.c3-ygrid,
-.c3-event-rect,
-.c3-bars path {
- shape-rendering: crispEdges; }
-
-.c3-chart-arc path {
- stroke: #fff; }
-
-.c3-chart-arc text {
- fill: #fff;
- font-size: 13px; }
-
-/*-- Axis --*/
-/*-- Grid --*/
-.c3-grid line {
- stroke: #aaa; }
-
-.c3-grid text {
- fill: #aaa; }
-
-.c3-xgrid, .c3-ygrid {
- stroke-dasharray: 3 3; }
-
-/*-- Text on Chart --*/
-.c3-text.c3-empty {
- fill: #808080;
- font-size: 2em; }
-
-/*-- Line --*/
-.c3-line {
- stroke-width: 1px; }
-
-/*-- Point --*/
-.c3-circle._expanded_ {
- stroke-width: 1px;
- stroke: white; }
-
-.c3-selected-circle {
- fill: white;
- stroke-width: 2px; }
-
-/*-- Bar --*/
-.c3-bar {
- stroke-width: 0; }
-
-.c3-bar._expanded_ {
- fill-opacity: 1;
- fill-opacity: 0.75; }
-
-/*-- Focus --*/
-.c3-target.c3-focused {
- opacity: 1; }
-
-.c3-target.c3-focused path.c3-line, .c3-target.c3-focused path.c3-step {
- stroke-width: 2px; }
-
-.c3-target.c3-defocused {
- opacity: 0.3 !important; }
-
-/*-- Region --*/
-.c3-region {
- fill: steelblue;
- fill-opacity: .1; }
-
-/*-- Brush --*/
-.c3-brush .extent {
- fill-opacity: .1; }
-
-/*-- Select - Drag --*/
-/*-- Legend --*/
-.c3-legend-item {
- font-size: 12px; }
-
-.c3-legend-item-hidden {
- opacity: 0.15; }
-
-.c3-legend-background {
- opacity: 0.75;
- fill: white;
- stroke: lightgray;
- stroke-width: 1; }
-
-/*-- Title --*/
-.c3-title {
- font: 14px sans-serif; }
-
-/*-- Tooltip --*/
-.c3-tooltip-container {
- z-index: 10; }
-
-.c3-tooltip {
- border-collapse: collapse;
- border-spacing: 0;
- background-color: #fff;
- empty-cells: show;
- -webkit-box-shadow: 7px 7px 12px -9px #777777;
- -moz-box-shadow: 7px 7px 12px -9px #777777;
- box-shadow: 7px 7px 12px -9px #777777;
- opacity: 0.9; }
-
-.c3-tooltip tr {
- border: 1px solid #CCC; }
-
-.c3-tooltip th {
- background-color: #aaa;
- font-size: 14px;
- padding: 2px 5px;
- text-align: left;
- color: #FFF; }
-
-.c3-tooltip td {
- font-size: 13px;
- padding: 3px 6px;
- background-color: #fff;
- border-left: 1px dotted #999; }
-
-.c3-tooltip td > span {
- display: inline-block;
- width: 10px;
- height: 10px;
- margin-right: 6px; }
-
-.c3-tooltip td.value {
- text-align: right; }
-
-/*-- Area --*/
-.c3-area {
- stroke-width: 0;
- opacity: 0.2; }
-
-/*-- Arc --*/
-.c3-chart-arcs-title {
- dominant-baseline: middle;
- font-size: 1.3em; }
-
-.c3-chart-arcs .c3-chart-arcs-background {
- fill: #e0e0e0;
- stroke: none; }
-
-.c3-chart-arcs .c3-chart-arcs-gauge-unit {
- fill: #000;
- font-size: 16px; }
-
-.c3-chart-arcs .c3-chart-arcs-gauge-max {
- fill: #777; }
-
-.c3-chart-arcs .c3-chart-arcs-gauge-min {
- fill: #777; }
-
-.c3-chart-arc .c3-gauge-value {
- fill: #000;
- /* font-size: 28px !important;*/ }
-
-.c3-chart-arc.c3-target g path {
- opacity: 1; }
-
-.c3-chart-arc.c3-target.c3-focused g path {
- opacity: 1; }
diff --git a/debian/missing-sources/c3-0.4.18.js b/debian/missing-sources/c3-0.4.18.js
deleted file mode 100644
index d607b177..00000000
--- a/debian/missing-sources/c3-0.4.18.js
+++ /dev/null
@@ -1,9236 +0,0 @@
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
- typeof define === 'function' && define.amd ? define(factory) :
- (global.c3 = factory());
-}(this, (function () { 'use strict';
-
-var CLASS = {
- target: 'c3-target',
- chart: 'c3-chart',
- chartLine: 'c3-chart-line',
- chartLines: 'c3-chart-lines',
- chartBar: 'c3-chart-bar',
- chartBars: 'c3-chart-bars',
- chartText: 'c3-chart-text',
- chartTexts: 'c3-chart-texts',
- chartArc: 'c3-chart-arc',
- chartArcs: 'c3-chart-arcs',
- chartArcsTitle: 'c3-chart-arcs-title',
- chartArcsBackground: 'c3-chart-arcs-background',
- chartArcsGaugeUnit: 'c3-chart-arcs-gauge-unit',
- chartArcsGaugeMax: 'c3-chart-arcs-gauge-max',
- chartArcsGaugeMin: 'c3-chart-arcs-gauge-min',
- selectedCircle: 'c3-selected-circle',
- selectedCircles: 'c3-selected-circles',
- eventRect: 'c3-event-rect',
- eventRects: 'c3-event-rects',
- eventRectsSingle: 'c3-event-rects-single',
- eventRectsMultiple: 'c3-event-rects-multiple',
- zoomRect: 'c3-zoom-rect',
- brush: 'c3-brush',
- focused: 'c3-focused',
- defocused: 'c3-defocused',
- region: 'c3-region',
- regions: 'c3-regions',
- title: 'c3-title',
- tooltipContainer: 'c3-tooltip-container',
- tooltip: 'c3-tooltip',
- tooltipName: 'c3-tooltip-name',
- shape: 'c3-shape',
- shapes: 'c3-shapes',
- line: 'c3-line',
- lines: 'c3-lines',
- bar: 'c3-bar',
- bars: 'c3-bars',
- circle: 'c3-circle',
- circles: 'c3-circles',
- arc: 'c3-arc',
- arcs: 'c3-arcs',
- area: 'c3-area',
- areas: 'c3-areas',
- empty: 'c3-empty',
- text: 'c3-text',
- texts: 'c3-texts',
- gaugeValue: 'c3-gauge-value',
- grid: 'c3-grid',
- gridLines: 'c3-grid-lines',
- xgrid: 'c3-xgrid',
- xgrids: 'c3-xgrids',
- xgridLine: 'c3-xgrid-line',
- xgridLines: 'c3-xgrid-lines',
- xgridFocus: 'c3-xgrid-focus',
- ygrid: 'c3-ygrid',
- ygrids: 'c3-ygrids',
- ygridLine: 'c3-ygrid-line',
- ygridLines: 'c3-ygrid-lines',
- axis: 'c3-axis',
- axisX: 'c3-axis-x',
- axisXLabel: 'c3-axis-x-label',
- axisY: 'c3-axis-y',
- axisYLabel: 'c3-axis-y-label',
- axisY2: 'c3-axis-y2',
- axisY2Label: 'c3-axis-y2-label',
- legendBackground: 'c3-legend-background',
- legendItem: 'c3-legend-item',
- legendItemEvent: 'c3-legend-item-event',
- legendItemTile: 'c3-legend-item-tile',
- legendItemHidden: 'c3-legend-item-hidden',
- legendItemFocused: 'c3-legend-item-focused',
- dragarea: 'c3-dragarea',
- EXPANDED: '_expanded_',
- SELECTED: '_selected_',
- INCLUDED: '_included_'
-};
-
-var _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;
-};
-
-
-
-
-
-
-
-
-
-
-
-var classCallCheck = function (instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
-};
-
-
-
-
-
-
-
-
-
-
-
-var inherits = function (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;
-};
-
-
-
-
-
-
-
-
-
-
-
-var possibleConstructorReturn = function (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;
-};
-
-var isValue = function isValue(v) {
- return v || v === 0;
-};
-var isFunction = function isFunction(o) {
- return typeof o === 'function';
-};
-var isArray = function isArray(o) {
- return Array.isArray(o);
-};
-var isString = function isString(o) {
- return typeof o === 'string';
-};
-var isUndefined = function isUndefined(v) {
- return typeof v === 'undefined';
-};
-var isDefined = function isDefined(v) {
- return typeof v !== 'undefined';
-};
-var ceil10 = function ceil10(v) {
- return Math.ceil(v / 10) * 10;
-};
-var asHalfPixel = function asHalfPixel(n) {
- return Math.ceil(n) + 0.5;
-};
-var diffDomain = function diffDomain(d) {
- return d[1] - d[0];
-};
-var isEmpty = function isEmpty(o) {
- return typeof o === 'undefined' || o === null || isString(o) && o.length === 0 || (typeof o === 'undefined' ? 'undefined' : _typeof(o)) === 'object' && Object.keys(o).length === 0;
-};
-var notEmpty = function notEmpty(o) {
- return !c3_chart_internal_fn.isEmpty(o);
-};
-var getOption = function getOption(options, key, defaultValue) {
- return isDefined(options[key]) ? options[key] : defaultValue;
-};
-var hasValue = function hasValue(dict, value) {
- var found = false;
- Object.keys(dict).forEach(function (key) {
- if (dict[key] === value) {
- found = true;
- }
- });
- return found;
-};
-var sanitise = function sanitise(str) {
- return typeof str === 'string' ? str.replace(/</g, '&lt;').replace(/>/g, '&gt;') : str;
-};
-var getPathBox = function getPathBox(path) {
- var box = path.getBoundingClientRect(),
- items = [path.pathSegList.getItem(0), path.pathSegList.getItem(1)],
- minX = items[0].x,
- minY = Math.min(items[0].y, items[1].y);
- return { x: minX, y: minY, width: box.width, height: box.height };
-};
-
-var c3_axis_fn;
-var c3_axis_internal_fn;
-
-function AxisInternal(component, params) {
- var internal = this;
- internal.component = component;
- internal.params = params || {};
-
- internal.d3 = component.d3;
- internal.scale = internal.d3.scale.linear();
- internal.range;
- internal.orient = "bottom";
- internal.innerTickSize = 6;
- internal.outerTickSize = this.params.withOuterTick ? 6 : 0;
- internal.tickPadding = 3;
- internal.tickValues = null;
- internal.tickFormat;
- internal.tickArguments;
-
- internal.tickOffset = 0;
- internal.tickCulling = true;
- internal.tickCentered;
- internal.tickTextCharSize;
- internal.tickTextRotate = internal.params.tickTextRotate;
- internal.tickLength;
-
- internal.axis = internal.generateAxis();
-}
-c3_axis_internal_fn = AxisInternal.prototype;
-
-c3_axis_internal_fn.axisX = function (selection, x, tickOffset) {
- selection.attr("transform", function (d) {
- return "translate(" + Math.ceil(x(d) + tickOffset) + ", 0)";
- });
-};
-c3_axis_internal_fn.axisY = function (selection, y) {
- selection.attr("transform", function (d) {
- return "translate(0," + Math.ceil(y(d)) + ")";
- });
-};
-c3_axis_internal_fn.scaleExtent = function (domain) {
- var start = domain[0],
- stop = domain[domain.length - 1];
- return start < stop ? [start, stop] : [stop, start];
-};
-c3_axis_internal_fn.generateTicks = function (scale) {
- var internal = this;
- var i,
- domain,
- ticks = [];
- if (scale.ticks) {
- return scale.ticks.apply(scale, internal.tickArguments);
- }
- domain = scale.domain();
- for (i = Math.ceil(domain[0]); i < domain[1]; i++) {
- ticks.push(i);
- }
- if (ticks.length > 0 && ticks[0] > 0) {
- ticks.unshift(ticks[0] - (ticks[1] - ticks[0]));
- }
- return ticks;
-};
-c3_axis_internal_fn.copyScale = function () {
- var internal = this;
- var newScale = internal.scale.copy(),
- domain;
- if (internal.params.isCategory) {
- domain = internal.scale.domain();
- newScale.domain([domain[0], domain[1] - 1]);
- }
- return newScale;
-};
-c3_axis_internal_fn.textFormatted = function (v) {
- var internal = this,
- formatted = internal.tickFormat ? internal.tickFormat(v) : v;
- return typeof formatted !== 'undefined' ? formatted : '';
-};
-c3_axis_internal_fn.updateRange = function () {
- var internal = this;
- internal.range = internal.scale.rangeExtent ? internal.scale.rangeExtent() : internal.scaleExtent(internal.scale.range());
- return internal.range;
-};
-c3_axis_internal_fn.updateTickTextCharSize = function (tick) {
- var internal = this;
- if (internal.tickTextCharSize) {
- return internal.tickTextCharSize;
- }
- var size = {
- h: 11.5,
- w: 5.5
- };
- tick.select('text').text(function (d) {
- return internal.textFormatted(d);
- }).each(function (d) {
- var box = this.getBoundingClientRect(),
- text = internal.textFormatted(d),
- h = box.height,
- w = text ? box.width / text.length : undefined;
- if (h && w) {
- size.h = h;
- size.w = w;
- }
- }).text('');
- internal.tickTextCharSize = size;
- return size;
-};
-c3_axis_internal_fn.transitionise = function (selection) {
- return this.params.withoutTransition ? selection : this.d3.transition(selection);
-};
-c3_axis_internal_fn.isVertical = function () {
- return this.orient === 'left' || this.orient === 'right';
-};
-c3_axis_internal_fn.tspanData = function (d, i, ticks, scale) {
- var internal = this;
- var splitted = internal.params.tickMultiline ? internal.splitTickText(d, ticks, scale) : [].concat(internal.textFormatted(d));
- return splitted.map(function (s) {
- return { index: i, splitted: s, length: splitted.length };
- });
-};
-c3_axis_internal_fn.splitTickText = function (d, ticks, scale) {
- var internal = this,
- tickText = internal.textFormatted(d),
- maxWidth = internal.params.tickWidth,
- subtext,
- spaceIndex,
- textWidth,
- splitted = [];
-
- if (Object.prototype.toString.call(tickText) === "[object Array]") {
- return tickText;
- }
-
- if (!maxWidth || maxWidth <= 0) {
- maxWidth = internal.isVertical() ? 95 : internal.params.isCategory ? Math.ceil(scale(ticks[1]) - scale(ticks[0])) - 12 : 110;
- }
-
- function split(splitted, text) {
- spaceIndex = undefined;
- for (var i = 1; i < text.length; i++) {
- if (text.charAt(i) === ' ') {
- spaceIndex = i;
- }
- subtext = text.substr(0, i + 1);
- textWidth = internal.tickTextCharSize.w * subtext.length;
- // if text width gets over tick width, split by space index or crrent index
- if (maxWidth < textWidth) {
- return split(splitted.concat(text.substr(0, spaceIndex ? spaceIndex : i)), text.slice(spaceIndex ? spaceIndex + 1 : i));
- }
- }
- return splitted.concat(text);
- }
-
- return split(splitted, tickText + "");
-};
-c3_axis_internal_fn.updateTickLength = function () {
- var internal = this;
- internal.tickLength = Math.max(internal.innerTickSize, 0) + internal.tickPadding;
-};
-c3_axis_internal_fn.lineY2 = function (d) {
- var internal = this,
- tickPosition = internal.scale(d) + (internal.tickCentered ? 0 : internal.tickOffset);
- return internal.range[0] < tickPosition && tickPosition < internal.range[1] ? internal.innerTickSize : 0;
-};
-c3_axis_internal_fn.textY = function () {
- var internal = this,
- rotate = internal.tickTextRotate;
- return rotate ? 11.5 - 2.5 * (rotate / 15) * (rotate > 0 ? 1 : -1) : internal.tickLength;
-};
-c3_axis_internal_fn.textTransform = function () {
- var internal = this,
- rotate = internal.tickTextRotate;
- return rotate ? "rotate(" + rotate + ")" : "";
-};
-c3_axis_internal_fn.textTextAnchor = function () {
- var internal = this,
- rotate = internal.tickTextRotate;
- return rotate ? rotate > 0 ? "start" : "end" : "middle";
-};
-c3_axis_internal_fn.tspanDx = function () {
- var internal = this,
- rotate = internal.tickTextRotate;
- return rotate ? 8 * Math.sin(Math.PI * (rotate / 180)) : 0;
-};
-c3_axis_internal_fn.tspanDy = function (d, i) {
- var internal = this,
- dy = internal.tickTextCharSize.h;
- if (i === 0) {
- if (internal.isVertical()) {
- dy = -((d.length - 1) * (internal.tickTextCharSize.h / 2) - 3);
- } else {
- dy = ".71em";
- }
- }
- return dy;
-};
-
-c3_axis_internal_fn.generateAxis = function () {
- var internal = this,
- d3 = internal.d3,
- params = internal.params;
- function axis(g) {
- g.each(function () {
- var g = axis.g = d3.select(this);
-
- var scale0 = this.__chart__ || internal.scale,
- scale1 = this.__chart__ = internal.copyScale();
-
- var ticks = internal.tickValues ? internal.tickValues : internal.generateTicks(scale1),
- tick = g.selectAll(".tick").data(ticks, scale1),
- tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick").style("opacity", 1e-6),
-
- // MEMO: No exit transition. The reason is this transition affects max tick width calculation because old tick will be included in the ticks.
- tickExit = tick.exit().remove(),
- tickUpdate = internal.transitionise(tick).style("opacity", 1),
- tickTransform,
- tickX,
- tickY;
-
- if (params.isCategory) {
- internal.tickOffset = Math.ceil((scale1(1) - scale1(0)) / 2);
- tickX = internal.tickCentered ? 0 : internal.tickOffset;
- tickY = internal.tickCentered ? internal.tickOffset : 0;
- } else {
- internal.tickOffset = tickX = 0;
- }
-
- tickEnter.append("line");
- tickEnter.append("text");
-
- internal.updateRange();
- internal.updateTickLength();
- internal.updateTickTextCharSize(g.select('.tick'));
-
- var lineUpdate = tickUpdate.select("line"),
- textUpdate = tickUpdate.select("text"),
- tspanUpdate = tick.select("text").selectAll('tspan').data(function (d, i) {
- return internal.tspanData(d, i, ticks, scale1);
- });
-
- tspanUpdate.enter().append('tspan');
- tspanUpdate.exit().remove();
- tspanUpdate.text(function (d) {
- return d.splitted;
- });
-
- var path = g.selectAll(".domain").data([0]),
- pathUpdate = (path.enter().append("path").attr("class", "domain"), internal.transitionise(path));
-
- // TODO: each attr should be one function and change its behavior by internal.orient, probably
- switch (internal.orient) {
- case "bottom":
- {
- tickTransform = internal.axisX;
- lineUpdate.attr("x1", tickX).attr("x2", tickX).attr("y2", function (d, i) {
- return internal.lineY2(d, i);
- });
- textUpdate.attr("x", 0).attr("y", function (d, i) {
- return internal.textY(d, i);
- }).attr("transform", function (d, i) {
- return internal.textTransform(d, i);
- }).style("text-anchor", function (d, i) {
- return internal.textTextAnchor(d, i);
- });
- tspanUpdate.attr('x', 0).attr("dy", function (d, i) {
- return internal.tspanDy(d, i);
- }).attr('dx', function (d, i) {
- return internal.tspanDx(d, i);
- });
- pathUpdate.attr("d", "M" + internal.range[0] + "," + internal.outerTickSize + "V0H" + internal.range[1] + "V" + internal.outerTickSize);
- break;
- }
- case "top":
- {
- // TODO: rotated tick text
- tickTransform = internal.axisX;
- lineUpdate.attr("x2", 0).attr("y2", -internal.innerTickSize);
- textUpdate.attr("x", 0).attr("y", -internal.tickLength).style("text-anchor", "middle");
- tspanUpdate.attr('x', 0).attr("dy", "0em");
- pathUpdate.attr("d", "M" + internal.range[0] + "," + -internal.outerTickSize + "V0H" + internal.range[1] + "V" + -internal.outerTickSize);
- break;
- }
- case "left":
- {
- tickTransform = internal.axisY;
- lineUpdate.attr("x2", -internal.innerTickSize).attr("y1", tickY).attr("y2", tickY);
- textUpdate.attr("x", -internal.tickLength).attr("y", internal.tickOffset).style("text-anchor", "end");
- tspanUpdate.attr('x', -internal.tickLength).attr("dy", function (d, i) {
- return internal.tspanDy(d, i);
- });
- pathUpdate.attr("d", "M" + -internal.outerTickSize + "," + internal.range[0] + "H0V" + internal.range[1] + "H" + -internal.outerTickSize);
- break;
- }
- case "right":
- {
- tickTransform = internal.axisY;
- lineUpdate.attr("x2", internal.innerTickSize).attr("y2", 0);
- textUpdate.attr("x", internal.tickLength).attr("y", 0).style("text-anchor", "start");
- tspanUpdate.attr('x', internal.tickLength).attr("dy", function (d, i) {
- return internal.tspanDy(d, i);
- });
- pathUpdate.attr("d", "M" + internal.outerTickSize + "," + internal.range[0] + "H0V" + internal.range[1] + "H" + internal.outerTickSize);
- break;
- }
- }
- if (scale1.rangeBand) {
- var x = scale1,
- dx = x.rangeBand() / 2;
- scale0 = scale1 = function scale1(d) {
- return x(d) + dx;
- };
- } else if (scale0.rangeBand) {
- scale0 = scale1;
- } else {
- tickExit.call(tickTransform, scale1, internal.tickOffset);
- }
- tickEnter.call(tickTransform, scale0, internal.tickOffset);
- tickUpdate.call(tickTransform, scale1, internal.tickOffset);
- });
- }
- axis.scale = function (x) {
- if (!arguments.length) {
- return internal.scale;
- }
- internal.scale = x;
- return axis;
- };
- axis.orient = function (x) {
- if (!arguments.length) {
- return internal.orient;
- }
- internal.orient = x in { top: 1, right: 1, bottom: 1, left: 1 } ? x + "" : "bottom";
- return axis;
- };
- axis.tickFormat = function (format) {
- if (!arguments.length) {
- return internal.tickFormat;
- }
- internal.tickFormat = format;
- return axis;
- };
- axis.tickCentered = function (isCentered) {
- if (!arguments.length) {
- return internal.tickCentered;
- }
- internal.tickCentered = isCentered;
- return axis;
- };
- axis.tickOffset = function () {
- return internal.tickOffset;
- };
- axis.tickInterval = function () {
- var interval, length;
- if (params.isCategory) {
- interval = internal.tickOffset * 2;
- } else {
- length = axis.g.select('path.domain').node().getTotalLength() - internal.outerTickSize * 2;
- interval = length / axis.g.selectAll('line').size();
- }
- return interval === Infinity ? 0 : interval;
- };
- axis.ticks = function () {
- if (!arguments.length) {
- return internal.tickArguments;
- }
- internal.tickArguments = arguments;
- return axis;
- };
- axis.tickCulling = function (culling) {
- if (!arguments.length) {
- return internal.tickCulling;
- }
- internal.tickCulling = culling;
- return axis;
- };
- axis.tickValues = function (x) {
- if (typeof x === 'function') {
- internal.tickValues = function () {
- return x(internal.scale.domain());
- };
- } else {
- if (!arguments.length) {
- return internal.tickValues;
- }
- internal.tickValues = x;
- }
- return axis;
- };
- return axis;
-};
-
-var Axis = function (_Component) {
- inherits(Axis, _Component);
-
- function Axis(owner) {
- classCallCheck(this, Axis);
-
- var fn = {
- fn: c3_axis_fn,
- internal: {
- fn: c3_axis_internal_fn
- }
- };
-
- var _this = possibleConstructorReturn(this, (Axis.__proto__ || Object.getPrototypeOf(Axis)).call(this, owner, 'axis', fn));
-
- _this.d3 = owner.d3;
- _this.internal = AxisInternal;
- return _this;
- }
-
- return Axis;
-}(Component);
-
-c3_axis_fn = Axis.prototype;
-
-c3_axis_fn.init = function init() {
- var $$ = this.owner,
- config = $$.config,
- main = $$.main;
- $$.axes.x = main.append("g").attr("class", CLASS.axis + ' ' + CLASS.axisX).attr("clip-path", $$.clipPathForXAxis).attr("transform", $$.getTranslate('x')).style("visibility", config.axis_x_show ? 'visible' : 'hidden');
- $$.axes.x.append("text").attr("class", CLASS.axisXLabel).attr("transform", config.axis_rotated ? "rotate(-90)" : "").style("text-anchor", this.textAnchorForXAxisLabel.bind(this));
- $$.axes.y = main.append("g").attr("class", CLASS.axis + ' ' + CLASS.axisY).attr("clip-path", config.axis_y_inner ? "" : $$.clipPathForYAxis).attr("transform", $$.getTranslate('y')).style("visibility", config.axis_y_show ? 'visible' : 'hidden');
- $$.axes.y.append("text").attr("class", CLASS.axisYLabel).attr("transform", config.axis_rotated ? "" : "rotate(-90)").style("text-anchor", this.textAnchorForYAxisLabel.bind(this));
-
- $$.axes.y2 = main.append("g").attr("class", CLASS.axis + ' ' + CLASS.axisY2
- // clip-path?
- ).attr("transform", $$.getTranslate('y2')).style("visibility", config.axis_y2_show ? 'visible' : 'hidden');
- $$.axes.y2.append("text").attr("class", CLASS.axisY2Label).attr("transform", config.axis_rotated ? "" : "rotate(-90)").style("text-anchor", this.textAnchorForY2AxisLabel.bind(this));
-};
-c3_axis_fn.getXAxis = function getXAxis(scale, orient, tickFormat, tickValues, withOuterTick, withoutTransition, withoutRotateTickText) {
- var $$ = this.owner,
- config = $$.config,
- axisParams = {
- isCategory: $$.isCategorized(),
- withOuterTick: withOuterTick,
- tickMultiline: config.axis_x_tick_multiline,
- tickWidth: config.axis_x_tick_width,
- tickTextRotate: withoutRotateTickText ? 0 : config.axis_x_tick_rotate,
- withoutTransition: withoutTransition
- },
- axis = new this.internal(this, axisParams).axis.scale(scale).orient(orient);
-
- if ($$.isTimeSeries() && tickValues && typeof tickValues !== "function") {
- tickValues = tickValues.map(function (v) {
- return $$.parseDate(v);
- });
- }
-
- // Set tick
- axis.tickFormat(tickFormat).tickValues(tickValues);
- if ($$.isCategorized()) {
- axis.tickCentered(config.axis_x_tick_centered);
- if (isEmpty(config.axis_x_tick_culling)) {
- config.axis_x_tick_culling = false;
- }
- }
-
- return axis;
-};
-c3_axis_fn.updateXAxisTickValues = function updateXAxisTickValues(targets, axis) {
- var $$ = this.owner,
- config = $$.config,
- tickValues;
- if (config.axis_x_tick_fit || config.axis_x_tick_count) {
- tickValues = this.generateTickValues($$.mapTargetsToUniqueXs(targets), config.axis_x_tick_count, $$.isTimeSeries());
- }
- if (axis) {
- axis.tickValues(tickValues);
- } else {
- $$.xAxis.tickValues(tickValues);
- $$.subXAxis.tickValues(tickValues);
- }
- return tickValues;
-};
-c3_axis_fn.getYAxis = function getYAxis(scale, orient, tickFormat, tickValues, withOuterTick, withoutTransition, withoutRotateTickText) {
- var $$ = this.owner,
- config = $$.config,
- axisParams = {
- withOuterTick: withOuterTick,
- withoutTransition: withoutTransition,
- tickTextRotate: withoutRotateTickText ? 0 : config.axis_y_tick_rotate
- },
- axis = new this.internal(this, axisParams).axis.scale(scale).orient(orient).tickFormat(tickFormat);
- if ($$.isTimeSeriesY()) {
- axis.ticks($$.d3.time[config.axis_y_tick_time_value], config.axis_y_tick_time_interval);
- } else {
- axis.tickValues(tickValues);
- }
- return axis;
-};
-c3_axis_fn.getId = function getId(id) {
- var config = this.owner.config;
- return id in config.data_axes ? config.data_axes[id] : 'y';
-};
-c3_axis_fn.getXAxisTickFormat = function getXAxisTickFormat() {
- var $$ = this.owner,
- config = $$.config,
- format = $$.isTimeSeries() ? $$.defaultAxisTimeFormat : $$.isCategorized() ? $$.categoryName : function (v) {
- return v < 0 ? v.toFixed(0) : v;
- };
- if (config.axis_x_tick_format) {
- if (isFunction(config.axis_x_tick_format)) {
- format = config.axis_x_tick_format;
- } else if ($$.isTimeSeries()) {
- format = function format(date) {
- return date ? $$.axisTimeFormat(config.axis_x_tick_format)(date) : "";
- };
- }
- }
- return isFunction(format) ? function (v) {
- return format.call($$, v);
- } : format;
-};
-c3_axis_fn.getTickValues = function getTickValues(tickValues, axis) {
- return tickValues ? tickValues : axis ? axis.tickValues() : undefined;
-};
-c3_axis_fn.getXAxisTickValues = function getXAxisTickValues() {
- return this.getTickValues(this.owner.config.axis_x_tick_values, this.owner.xAxis);
-};
-c3_axis_fn.getYAxisTickValues = function getYAxisTickValues() {
- return this.getTickValues(this.owner.config.axis_y_tick_values, this.owner.yAxis);
-};
-c3_axis_fn.getY2AxisTickValues = function getY2AxisTickValues() {
- return this.getTickValues(this.owner.config.axis_y2_tick_values, this.owner.y2Axis);
-};
-c3_axis_fn.getLabelOptionByAxisId = function getLabelOptionByAxisId(axisId) {
- var $$ = this.owner,
- config = $$.config,
- option;
- if (axisId === 'y') {
- option = config.axis_y_label;
- } else if (axisId === 'y2') {
- option = config.axis_y2_label;
- } else if (axisId === 'x') {
- option = config.axis_x_label;
- }
- return option;
-};
-c3_axis_fn.getLabelText = function getLabelText(axisId) {
- var option = this.getLabelOptionByAxisId(axisId);
- return isString(option) ? option : option ? option.text : null;
-};
-c3_axis_fn.setLabelText = function setLabelText(axisId, text) {
- var $$ = this.owner,
- config = $$.config,
- option = this.getLabelOptionByAxisId(axisId);
- if (isString(option)) {
- if (axisId === 'y') {
- config.axis_y_label = text;
- } else if (axisId === 'y2') {
- config.axis_y2_label = text;
- } else if (axisId === 'x') {
- config.axis_x_label = text;
- }
- } else if (option) {
- option.text = text;
- }
-};
-c3_axis_fn.getLabelPosition = function getLabelPosition(axisId, defaultPosition) {
- var option = this.getLabelOptionByAxisId(axisId),
- position = option && (typeof option === 'undefined' ? 'undefined' : _typeof(option)) === 'object' && option.position ? option.position : defaultPosition;
- return {
- isInner: position.indexOf('inner') >= 0,
- isOuter: position.indexOf('outer') >= 0,
- isLeft: position.indexOf('left') >= 0,
- isCenter: position.indexOf('center') >= 0,
- isRight: position.indexOf('right') >= 0,
- isTop: position.indexOf('top') >= 0,
- isMiddle: position.indexOf('middle') >= 0,
- isBottom: position.indexOf('bottom') >= 0
- };
-};
-c3_axis_fn.getXAxisLabelPosition = function getXAxisLabelPosition() {
- return this.getLabelPosition('x', this.owner.config.axis_rotated ? 'inner-top' : 'inner-right');
-};
-c3_axis_fn.getYAxisLabelPosition = function getYAxisLabelPosition() {
- return this.getLabelPosition('y', this.owner.config.axis_rotated ? 'inner-right' : 'inner-top');
-};
-c3_axis_fn.getY2AxisLabelPosition = function getY2AxisLabelPosition() {
- return this.getLabelPosition('y2', this.owner.config.axis_rotated ? 'inner-right' : 'inner-top');
-};
-c3_axis_fn.getLabelPositionById = function getLabelPositionById(id) {
- return id === 'y2' ? this.getY2AxisLabelPosition() : id === 'y' ? this.getYAxisLabelPosition() : this.getXAxisLabelPosition();
-};
-c3_axis_fn.textForXAxisLabel = function textForXAxisLabel() {
- return this.getLabelText('x');
-};
-c3_axis_fn.textForYAxisLabel = function textForYAxisLabel() {
- return this.getLabelText('y');
-};
-c3_axis_fn.textForY2AxisLabel = function textForY2AxisLabel() {
- return this.getLabelText('y2');
-};
-c3_axis_fn.xForAxisLabel = function xForAxisLabel(forHorizontal, position) {
- var $$ = this.owner;
- if (forHorizontal) {
- return position.isLeft ? 0 : position.isCenter ? $$.width / 2 : $$.width;
- } else {
- return position.isBottom ? -$$.height : position.isMiddle ? -$$.height / 2 : 0;
- }
-};
-c3_axis_fn.dxForAxisLabel = function dxForAxisLabel(forHorizontal, position) {
- if (forHorizontal) {
- return position.isLeft ? "0.5em" : position.isRight ? "-0.5em" : "0";
- } else {
- return position.isTop ? "-0.5em" : position.isBottom ? "0.5em" : "0";
- }
-};
-c3_axis_fn.textAnchorForAxisLabel = function textAnchorForAxisLabel(forHorizontal, position) {
- if (forHorizontal) {
- return position.isLeft ? 'start' : position.isCenter ? 'middle' : 'end';
- } else {
- return position.isBottom ? 'start' : position.isMiddle ? 'middle' : 'end';
- }
-};
-c3_axis_fn.xForXAxisLabel = function xForXAxisLabel() {
- return this.xForAxisLabel(!this.owner.config.axis_rotated, this.getXAxisLabelPosition());
-};
-c3_axis_fn.xForYAxisLabel = function xForYAxisLabel() {
- return this.xForAxisLabel(this.owner.config.axis_rotated, this.getYAxisLabelPosition());
-};
-c3_axis_fn.xForY2AxisLabel = function xForY2AxisLabel() {
- return this.xForAxisLabel(this.owner.config.axis_rotated, this.getY2AxisLabelPosition());
-};
-c3_axis_fn.dxForXAxisLabel = function dxForXAxisLabel() {
- return this.dxForAxisLabel(!this.owner.config.axis_rotated, this.getXAxisLabelPosition());
-};
-c3_axis_fn.dxForYAxisLabel = function dxForYAxisLabel() {
- return this.dxForAxisLabel(this.owner.config.axis_rotated, this.getYAxisLabelPosition());
-};
-c3_axis_fn.dxForY2AxisLabel = function dxForY2AxisLabel() {
- return this.dxForAxisLabel(this.owner.config.axis_rotated, this.getY2AxisLabelPosition());
-};
-c3_axis_fn.dyForXAxisLabel = function dyForXAxisLabel() {
- var $$ = this.owner,
- config = $$.config,
- position = this.getXAxisLabelPosition();
- if (config.axis_rotated) {
- return position.isInner ? "1.2em" : -25 - this.getMaxTickWidth('x');
- } else {
- return position.isInner ? "-0.5em" : config.axis_x_height ? config.axis_x_height - 10 : "3em";
- }
-};
-c3_axis_fn.dyForYAxisLabel = function dyForYAxisLabel() {
- var $$ = this.owner,
- position = this.getYAxisLabelPosition();
- if ($$.config.axis_rotated) {
- return position.isInner ? "-0.5em" : "3em";
- } else {
- return position.isInner ? "1.2em" : -10 - ($$.config.axis_y_inner ? 0 : this.getMaxTickWidth('y') + 10);
- }
-};
-c3_axis_fn.dyForY2AxisLabel = function dyForY2AxisLabel() {
- var $$ = this.owner,
- position = this.getY2AxisLabelPosition();
- if ($$.config.axis_rotated) {
- return position.isInner ? "1.2em" : "-2.2em";
- } else {
- return position.isInner ? "-0.5em" : 15 + ($$.config.axis_y2_inner ? 0 : this.getMaxTickWidth('y2') + 15);
- }
-};
-c3_axis_fn.textAnchorForXAxisLabel = function textAnchorForXAxisLabel() {
- var $$ = this.owner;
- return this.textAnchorForAxisLabel(!$$.config.axis_rotated, this.getXAxisLabelPosition());
-};
-c3_axis_fn.textAnchorForYAxisLabel = function textAnchorForYAxisLabel() {
- var $$ = this.owner;
- return this.textAnchorForAxisLabel($$.config.axis_rotated, this.getYAxisLabelPosition());
-};
-c3_axis_fn.textAnchorForY2AxisLabel = function textAnchorForY2AxisLabel() {
- var $$ = this.owner;
- return this.textAnchorForAxisLabel($$.config.axis_rotated, this.getY2AxisLabelPosition());
-};
-c3_axis_fn.getMaxTickWidth = function getMaxTickWidth(id, withoutRecompute) {
- var $$ = this.owner,
- config = $$.config,
- maxWidth = 0,
- targetsToShow,
- scale,
- axis,
- dummy,
- svg;
- if (withoutRecompute && $$.currentMaxTickWidths[id]) {
- return $$.currentMaxTickWidths[id];
- }
- if ($$.svg) {
- targetsToShow = $$.filterTargetsToShow($$.data.targets);
- if (id === 'y') {
- scale = $$.y.copy().domain($$.getYDomain(targetsToShow, 'y'));
- axis = this.getYAxis(scale, $$.yOrient, config.axis_y_tick_format, $$.yAxisTickValues, false, true, true);
- } else if (id === 'y2') {
- scale = $$.y2.copy().domain($$.getYDomain(targetsToShow, 'y2'));
- axis = this.getYAxis(scale, $$.y2Orient, config.axis_y2_tick_format, $$.y2AxisTickValues, false, true, true);
- } else {
- scale = $$.x.copy().domain($$.getXDomain(targetsToShow));
- axis = this.getXAxis(scale, $$.xOrient, $$.xAxisTickFormat, $$.xAxisTickValues, false, true, true);
- this.updateXAxisTickValues(targetsToShow, axis);
- }
- dummy = $$.d3.select('body').append('div').classed('c3', true);
- svg = dummy.append("svg").style('visibility', 'hidden').style('position', 'fixed').style('top', 0).style('left', 0), svg.append('g').call(axis).each(function () {
- $$.d3.select(this).selectAll('text').each(function () {
- var box = this.getBoundingClientRect();
- if (maxWidth < box.width) {
- maxWidth = box.width;
- }
- });
- dummy.remove();
- });
- }
- $$.currentMaxTickWidths[id] = maxWidth <= 0 ? $$.currentMaxTickWidths[id] : maxWidth;
- return $$.currentMaxTickWidths[id];
-};
-
-c3_axis_fn.updateLabels = function updateLabels(withTransition) {
- var $$ = this.owner;
- var axisXLabel = $$.main.select('.' + CLASS.axisX + ' .' + CLASS.axisXLabel),
- axisYLabel = $$.main.select('.' + CLASS.axisY + ' .' + CLASS.axisYLabel),
- axisY2Label = $$.main.select('.' + CLASS.axisY2 + ' .' + CLASS.axisY2Label);
- (withTransition ? axisXLabel.transition() : axisXLabel).attr("x", this.xForXAxisLabel.bind(this)).attr("dx", this.dxForXAxisLabel.bind(this)).attr("dy", this.dyForXAxisLabel.bind(this)).text(this.textForXAxisLabel.bind(this));
- (withTransition ? axisYLabel.transition() : axisYLabel).attr("x", this.xForYAxisLabel.bind(this)).attr("dx", this.dxForYAxisLabel.bind(this)).attr("dy", this.dyForYAxisLabel.bind(this)).text(this.textForYAxisLabel.bind(this));
- (withTransition ? axisY2Label.transition() : axisY2Label).attr("x", this.xForY2AxisLabel.bind(this)).attr("dx", this.dxForY2AxisLabel.bind(this)).attr("dy", this.dyForY2AxisLabel.bind(this)).text(this.textForY2AxisLabel.bind(this));
-};
-c3_axis_fn.getPadding = function getPadding(padding, key, defaultValue, domainLength) {
- var p = typeof padding === 'number' ? padding : padding[key];
- if (!isValue(p)) {
- return defaultValue;
- }
- if (padding.unit === 'ratio') {
- return padding[key] * domainLength;
- }
- // assume padding is pixels if unit is not specified
- return this.convertPixelsToAxisPadding(p, domainLength);
-};
-c3_axis_fn.convertPixelsToAxisPadding = function convertPixelsToAxisPadding(pixels, domainLength) {
- var $$ = this.owner,
- length = $$.config.axis_rotated ? $$.width : $$.height;
- return domainLength * (pixels / length);
-};
-c3_axis_fn.generateTickValues = function generateTickValues(values, tickCount, forTimeSeries) {
- var tickValues = values,
- targetCount,
- start,
- end,
- count,
- interval,
- i,
- tickValue;
- if (tickCount) {
- targetCount = isFunction(tickCount) ? tickCount() : tickCount;
- // compute ticks according to tickCount
- if (targetCount === 1) {
- tickValues = [values[0]];
- } else if (targetCount === 2) {
- tickValues = [values[0], values[values.length - 1]];
- } else if (targetCount > 2) {
- count = targetCount - 2;
- start = values[0];
- end = values[values.length - 1];
- interval = (end - start) / (count + 1);
- // re-construct unique values
- tickValues = [start];
- for (i = 0; i < count; i++) {
- tickValue = +start + interval * (i + 1);
- tickValues.push(forTimeSeries ? new Date(tickValue) : tickValue);
- }
- tickValues.push(end);
- }
- }
- if (!forTimeSeries) {
- tickValues = tickValues.sort(function (a, b) {
- return a - b;
- });
- }
- return tickValues;
-};
-c3_axis_fn.generateTransitions = function generateTransitions(duration) {
- var $$ = this.owner,
- axes = $$.axes;
- return {
- axisX: duration ? axes.x.transition().duration(duration) : axes.x,
- axisY: duration ? axes.y.transition().duration(duration) : axes.y,
- axisY2: duration ? axes.y2.transition().duration(duration) : axes.y2,
- axisSubX: duration ? axes.subx.transition().duration(duration) : axes.subx
- };
-};
-c3_axis_fn.redraw = function redraw(transitions, isHidden) {
- var $$ = this.owner;
- $$.axes.x.style("opacity", isHidden ? 0 : 1);
- $$.axes.y.style("opacity", isHidden ? 0 : 1);
- $$.axes.y2.style("opacity", isHidden ? 0 : 1);
- $$.axes.subx.style("opacity", isHidden ? 0 : 1);
- transitions.axisX.call($$.xAxis);
- transitions.axisY.call($$.yAxis);
- transitions.axisY2.call($$.y2Axis);
- transitions.axisSubX.call($$.subXAxis);
-};
-
-var c3$1 = { version: "0.4.18" };
-
-var c3_chart_fn;
-var c3_chart_internal_fn;
-
-function Component(owner, componentKey, fn) {
- this.owner = owner;
- c3$1.chart.internal[componentKey] = fn;
-}
-
-function Chart(config) {
- var $$ = this.internal = new ChartInternal(this);
- $$.loadConfig(config);
-
- $$.beforeInit(config);
- $$.init();
- $$.afterInit(config);
-
- // bind "this" to nested API
- (function bindThis(fn, target, argThis) {
- Object.keys(fn).forEach(function (key) {
- target[key] = fn[key].bind(argThis);
- if (Object.keys(fn[key]).length > 0) {
- bindThis(fn[key], target[key], argThis);
- }
- });
- })(c3_chart_fn, this, this);
-}
-
-function ChartInternal(api) {
- var $$ = this;
- $$.d3 = window.d3 ? window.d3 : typeof require !== 'undefined' ? require("d3") : undefined;
- $$.api = api;
- $$.config = $$.getDefaultConfig();
- $$.data = {};
- $$.cache = {};
- $$.axes = {};
-}
-
-c3$1.generate = function (config) {
- return new Chart(config);
-};
-
-c3$1.chart = {
- fn: Chart.prototype,
- internal: {
- fn: ChartInternal.prototype
- }
-};
-c3_chart_fn = c3$1.chart.fn;
-c3_chart_internal_fn = c3$1.chart.internal.fn;
-
-c3_chart_internal_fn.beforeInit = function () {
- // can do something
-};
-c3_chart_internal_fn.afterInit = function () {
- // can do something
-};
-c3_chart_internal_fn.init = function () {
- var $$ = this,
- config = $$.config;
-
- $$.initParams();
-
- if (config.data_url) {
- $$.convertUrlToData(config.data_url, config.data_mimeType, config.data_headers, config.data_keys, $$.initWithData);
- } else if (config.data_json) {
- $$.initWithData($$.convertJsonToData(config.data_json, config.data_keys));
- } else if (config.data_rows) {
- $$.initWithData($$.convertRowsToData(config.data_rows));
- } else if (config.data_columns) {
- $$.initWithData($$.convertColumnsToData(config.data_columns));
- } else {
- throw Error('url or json or rows or columns is required.');
- }
-};
-
-c3_chart_internal_fn.initParams = function () {
- var $$ = this,
- d3 = $$.d3,
- config = $$.config;
-
- // MEMO: clipId needs to be unique because it conflicts when multiple charts exist
- $$.clipId = "c3-" + +new Date() + '-clip', $$.clipIdForXAxis = $$.clipId + '-xaxis', $$.clipIdForYAxis = $$.clipId + '-yaxis', $$.clipIdForGrid = $$.clipId + '-grid', $$.clipIdForSubchart = $$.clipId + '-subchart', $$.clipPath = $$.getClipPath($$.clipId), $$.clipPathForXAxis = $$.getClipPath($$.clipIdForXAxis), $$.clipPathForYAxis = $$.getClipPath($$.clipIdForYAxis);
- $$.clipPathForGrid = $$.getClipPath($$.clipIdForGrid), $$.clipPathForSubchart = $$.getClipPath($$.clipIdForSubchart), $$.dragStart = null;
- $$.dragging = false;
- $$.flowing = false;
- $$.cancelClick = false;
- $$.mouseover = false;
- $$.transiting = false;
-
- $$.color = $$.generateColor();
- $$.levelColor = $$.generateLevelColor();
-
- $$.dataTimeFormat = config.data_xLocaltime ? d3.time.format : d3.time.format.utc;
- $$.axisTimeFormat = config.axis_x_localtime ? d3.time.format : d3.time.format.utc;
- $$.defaultAxisTimeFormat = $$.axisTimeFormat.multi([[".%L", function (d) {
- return d.getMilliseconds();
- }], [":%S", function (d) {
- return d.getSeconds();
- }], ["%I:%M", function (d) {
- return d.getMinutes();
- }], ["%I %p", function (d) {
- return d.getHours();
- }], ["%-m/%-d", function (d) {
- return d.getDay() && d.getDate() !== 1;
- }], ["%-m/%-d", function (d) {
- return d.getDate() !== 1;
- }], ["%-m/%-d", function (d) {
- return d.getMonth();
- }], ["%Y/%-m/%-d", function () {
- return true;
- }]]);
-
- $$.hiddenTargetIds = [];
- $$.hiddenLegendIds = [];
- $$.focusedTargetIds = [];
- $$.defocusedTargetIds = [];
-
- $$.xOrient = config.axis_rotated ? "left" : "bottom";
- $$.yOrient = config.axis_rotated ? config.axis_y_inner ? "top" : "bottom" : config.axis_y_inner ? "right" : "left";
- $$.y2Orient = config.axis_rotated ? config.axis_y2_inner ? "bottom" : "top" : config.axis_y2_inner ? "left" : "right";
- $$.subXOrient = config.axis_rotated ? "left" : "bottom";
-
- $$.isLegendRight = config.legend_position === 'right';
- $$.isLegendInset = config.legend_position === 'inset';
- $$.isLegendTop = config.legend_inset_anchor === 'top-left' || config.legend_inset_anchor === 'top-right';
- $$.isLegendLeft = config.legend_inset_anchor === 'top-left' || config.legend_inset_anchor === 'bottom-left';
- $$.legendStep = 0;
- $$.legendItemWidth = 0;
- $$.legendItemHeight = 0;
-
- $$.currentMaxTickWidths = {
- x: 0,
- y: 0,
- y2: 0
- };
-
- $$.rotated_padding_left = 30;
- $$.rotated_padding_right = config.axis_rotated && !config.axis_x_show ? 0 : 30;
- $$.rotated_padding_top = 5;
-
- $$.withoutFadeIn = {};
-
- $$.intervalForObserveInserted = undefined;
-
- $$.axes.subx = d3.selectAll([]); // needs when excluding subchart.js
-};
-
-c3_chart_internal_fn.initChartElements = function () {
- if (this.initBar) {
- this.initBar();
- }
- if (this.initLine) {
- this.initLine();
- }
- if (this.initArc) {
- this.initArc();
- }
- if (this.initGauge) {
- this.initGauge();
- }
- if (this.initText) {
- this.initText();
- }
-};
-
-c3_chart_internal_fn.initWithData = function (data) {
- var $$ = this,
- d3 = $$.d3,
- config = $$.config;
- var defs,
- main,
- binding = true;
-
- $$.axis = new Axis($$);
-
- if ($$.initPie) {
- $$.initPie();
- }
- if ($$.initBrush) {
- $$.initBrush();
- }
- if ($$.initZoom) {
- $$.initZoom();
- }
-
- if (!config.bindto) {
- $$.selectChart = d3.selectAll([]);
- } else if (typeof config.bindto.node === 'function') {
- $$.selectChart = config.bindto;
- } else {
- $$.selectChart = d3.select(config.bindto);
- }
- if ($$.selectChart.empty()) {
- $$.selectChart = d3.select(document.createElement('div')).style('opacity', 0);
- $$.observeInserted($$.selectChart);
- binding = false;
- }
- $$.selectChart.html("").classed("c3", true);
-
- // Init data as targets
- $$.data.xs = {};
- $$.data.targets = $$.convertDataToTargets(data);
-
- if (config.data_filter) {
- $$.data.targets = $$.data.targets.filter(config.data_filter);
- }
-
- // Set targets to hide if needed
- if (config.data_hide) {
- $$.addHiddenTargetIds(config.data_hide === true ? $$.mapToIds($$.data.targets) : config.data_hide);
- }
- if (config.legend_hide) {
- $$.addHiddenLegendIds(config.legend_hide === true ? $$.mapToIds($$.data.targets) : config.legend_hide);
- }
-
- // when gauge, hide legend // TODO: fix
- if ($$.hasType('gauge')) {
- config.legend_show = false;
- }
-
- // Init sizes and scales
- $$.updateSizes();
- $$.updateScales();
-
- // Set domains for each scale
- $$.x.domain(d3.extent($$.getXDomain($$.data.targets)));
- $$.y.domain($$.getYDomain($$.data.targets, 'y'));
- $$.y2.domain($$.getYDomain($$.data.targets, 'y2'));
- $$.subX.domain($$.x.domain());
- $$.subY.domain($$.y.domain());
- $$.subY2.domain($$.y2.domain());
-
- // Save original x domain for zoom update
- $$.orgXDomain = $$.x.domain();
-
- // Set initialized scales to brush and zoom
- if ($$.brush) {
- $$.brush.scale($$.subX);
- }
- if (config.zoom_enabled) {
- $$.zoom.scale($$.x);
- }
-
- /*-- Basic Elements --*/
-
- // Define svgs
- $$.svg = $$.selectChart.append("svg").style("overflow", "hidden").on('mouseenter', function () {
- return config.onmouseover.call($$);
- }).on('mouseleave', function () {
- return config.onmouseout.call($$);
- });
-
- if ($$.config.svg_classname) {
- $$.svg.attr('class', $$.config.svg_classname);
- }
-
- // Define defs
- defs = $$.svg.append("defs");
- $$.clipChart = $$.appendClip(defs, $$.clipId);
- $$.clipXAxis = $$.appendClip(defs, $$.clipIdForXAxis);
- $$.clipYAxis = $$.appendClip(defs, $$.clipIdForYAxis);
- $$.clipGrid = $$.appendClip(defs, $$.clipIdForGrid);
- $$.clipSubchart = $$.appendClip(defs, $$.clipIdForSubchart);
- $$.updateSvgSize();
-
- // Define regions
- main = $$.main = $$.svg.append("g").attr("transform", $$.getTranslate('main'));
-
- if ($$.initSubchart) {
- $$.initSubchart();
- }
- if ($$.initTooltip) {
- $$.initTooltip();
- }
- if ($$.initLegend) {
- $$.initLegend();
- }
- if ($$.initTitle) {
- $$.initTitle();
- }
-
- /*-- Main Region --*/
-
- // text when empty
- main.append("text").attr("class", CLASS.text + ' ' + CLASS.empty).attr("text-anchor", "middle" // horizontal centering of text at x position in all browsers.
- ).attr("dominant-baseline", "middle"); // vertical centering of text at y position in all browsers, except IE.
-
- // Regions
- $$.initRegion();
-
- // Grids
- $$.initGrid();
-
- // Define g for chart area
- main.append('g').attr("clip-path", $$.clipPath).attr('class', CLASS.chart);
-
- // Grid lines
- if (config.grid_lines_front) {
- $$.initGridLines();
- }
-
- // Cover whole with rects for events
- $$.initEventRect();
-
- // Define g for chart
- $$.initChartElements();
-
- // if zoom privileged, insert rect to forefront
- // TODO: is this needed?
- main.insert('rect', config.zoom_privileged ? null : 'g.' + CLASS.regions).attr('class', CLASS.zoomRect).attr('width', $$.width).attr('height', $$.height).style('opacity', 0).on("dblclick.zoom", null);
-
- // Set default extent if defined
- if (config.axis_x_extent) {
- $$.brush.extent($$.getDefaultExtent());
- }
-
- // Add Axis
- $$.axis.init();
-
- // Set targets
- $$.updateTargets($$.data.targets);
-
- // Draw with targets
- if (binding) {
- $$.updateDimension();
- $$.config.oninit.call($$);
- $$.redraw({
- withTransition: false,
- withTransform: true,
- withUpdateXDomain: true,
- withUpdateOrgXDomain: true,
- withTransitionForAxis: false
- });
- }
-
- // Bind resize event
- $$.bindResize();
-
- // export element of the chart
- $$.api.element = $$.selectChart.node();
-};
-
-c3_chart_internal_fn.smoothLines = function (el, type) {
- var $$ = this;
- if (type === 'grid') {
- el.each(function () {
- var g = $$.d3.select(this),
- x1 = g.attr('x1'),
- x2 = g.attr('x2'),
- y1 = g.attr('y1'),
- y2 = g.attr('y2');
- g.attr({
- 'x1': Math.ceil(x1),
- 'x2': Math.ceil(x2),
- 'y1': Math.ceil(y1),
- 'y2': Math.ceil(y2)
- });
- });
- }
-};
-
-c3_chart_internal_fn.updateSizes = function () {
- var $$ = this,
- config = $$.config;
- var legendHeight = $$.legend ? $$.getLegendHeight() : 0,
- legendWidth = $$.legend ? $$.getLegendWidth() : 0,
- legendHeightForBottom = $$.isLegendRight || $$.isLegendInset ? 0 : legendHeight,
- hasArc = $$.hasArcType(),
- xAxisHeight = config.axis_rotated || hasArc ? 0 : $$.getHorizontalAxisHeight('x'),
- subchartHeight = config.subchart_show && !hasArc ? config.subchart_size_height + xAxisHeight : 0;
-
- $$.currentWidth = $$.getCurrentWidth();
- $$.currentHeight = $$.getCurrentHeight();
-
- // for main
- $$.margin = config.axis_rotated ? {
- top: $$.getHorizontalAxisHeight('y2') + $$.getCurrentPaddingTop(),
- right: hasArc ? 0 : $$.getCurrentPaddingRight(),
- bottom: $$.getHorizontalAxisHeight('y') + legendHeightForBottom + $$.getCurrentPaddingBottom(),
- left: subchartHeight + (hasArc ? 0 : $$.getCurrentPaddingLeft())
- } : {
- top: 4 + $$.getCurrentPaddingTop(), // for top tick text
- right: hasArc ? 0 : $$.getCurrentPaddingRight(),
- bottom: xAxisHeight + subchartHeight + legendHeightForBottom + $$.getCurrentPaddingBottom(),
- left: hasArc ? 0 : $$.getCurrentPaddingLeft()
- };
-
- // for subchart
- $$.margin2 = config.axis_rotated ? {
- top: $$.margin.top,
- right: NaN,
- bottom: 20 + legendHeightForBottom,
- left: $$.rotated_padding_left
- } : {
- top: $$.currentHeight - subchartHeight - legendHeightForBottom,
- right: NaN,
- bottom: xAxisHeight + legendHeightForBottom,
- left: $$.margin.left
- };
-
- // for legend
- $$.margin3 = {
- top: 0,
- right: NaN,
- bottom: 0,
- left: 0
- };
- if ($$.updateSizeForLegend) {
- $$.updateSizeForLegend(legendHeight, legendWidth);
- }
-
- $$.width = $$.currentWidth - $$.margin.left - $$.margin.right;
- $$.height = $$.currentHeight - $$.margin.top - $$.margin.bottom;
- if ($$.width < 0) {
- $$.width = 0;
- }
- if ($$.height < 0) {
- $$.height = 0;
- }
-
- $$.width2 = config.axis_rotated ? $$.margin.left - $$.rotated_padding_left - $$.rotated_padding_right : $$.width;
- $$.height2 = config.axis_rotated ? $$.height : $$.currentHeight - $$.margin2.top - $$.margin2.bottom;
- if ($$.width2 < 0) {
- $$.width2 = 0;
- }
- if ($$.height2 < 0) {
- $$.height2 = 0;
- }
-
- // for arc
- $$.arcWidth = $$.width - ($$.isLegendRight ? legendWidth + 10 : 0);
- $$.arcHeight = $$.height - ($$.isLegendRight ? 0 : 10);
- if ($$.hasType('gauge') && !config.gauge_fullCircle) {
- $$.arcHeight += $$.height - $$.getGaugeLabelHeight();
- }
- if ($$.updateRadius) {
- $$.updateRadius();
- }
-
- if ($$.isLegendRight && hasArc) {
- $$.margin3.left = $$.arcWidth / 2 + $$.radiusExpanded * 1.1;
- }
-};
-
-c3_chart_internal_fn.updateTargets = function (targets) {
- var $$ = this;
-
- /*-- Main --*/
-
- //-- Text --//
- $$.updateTargetsForText(targets);
-
- //-- Bar --//
- $$.updateTargetsForBar(targets);
-
- //-- Line --//
- $$.updateTargetsForLine(targets);
-
- //-- Arc --//
- if ($$.hasArcType() && $$.updateTargetsForArc) {
- $$.updateTargetsForArc(targets);
- }
-
- /*-- Sub --*/
-
- if ($$.updateTargetsForSubchart) {
- $$.updateTargetsForSubchart(targets);
- }
-
- // Fade-in each chart
- $$.showTargets();
-};
-c3_chart_internal_fn.showTargets = function () {
- var $$ = this;
- $$.svg.selectAll('.' + CLASS.target).filter(function (d) {
- return $$.isTargetToShow(d.id);
- }).transition().duration($$.config.transition_duration).style("opacity", 1);
-};
-
-c3_chart_internal_fn.redraw = function (options, transitions) {
- var $$ = this,
- main = $$.main,
- d3 = $$.d3,
- config = $$.config;
- var areaIndices = $$.getShapeIndices($$.isAreaType),
- barIndices = $$.getShapeIndices($$.isBarType),
- lineIndices = $$.getShapeIndices($$.isLineType);
- var withY, withSubchart, withTransition, withTransitionForExit, withTransitionForAxis, withTransform, withUpdateXDomain, withUpdateOrgXDomain, withTrimXDomain, withLegend, withEventRect, withDimension, withUpdateXAxis;
- var hideAxis = $$.hasArcType();
- var drawArea, drawBar, drawLine, xForText, yForText;
- var duration, durationForExit, durationForAxis;
- var waitForDraw, flow;
- var targetsToShow = $$.filterTargetsToShow($$.data.targets),
- tickValues,
- i,
- intervalForCulling,
- xDomainForZoom;
- var xv = $$.xv.bind($$),
- cx,
- cy;
-
- options = options || {};
- withY = getOption(options, "withY", true);
- withSubchart = getOption(options, "withSubchart", true);
- withTransition = getOption(options, "withTransition", true);
- withTransform = getOption(options, "withTransform", false);
- withUpdateXDomain = getOption(options, "withUpdateXDomain", false);
- withUpdateOrgXDomain = getOption(options, "withUpdateOrgXDomain", false);
- withTrimXDomain = getOption(options, "withTrimXDomain", true);
- withUpdateXAxis = getOption(options, "withUpdateXAxis", withUpdateXDomain);
- withLegend = getOption(options, "withLegend", false);
- withEventRect = getOption(options, "withEventRect", true);
- withDimension = getOption(options, "withDimension", true);
- withTransitionForExit = getOption(options, "withTransitionForExit", withTransition);
- withTransitionForAxis = getOption(options, "withTransitionForAxis", withTransition);
-
- duration = withTransition ? config.transition_duration : 0;
- durationForExit = withTransitionForExit ? duration : 0;
- durationForAxis = withTransitionForAxis ? duration : 0;
-
- transitions = transitions || $$.axis.generateTransitions(durationForAxis);
-
- // update legend and transform each g
- if (withLegend && config.legend_show) {
- $$.updateLegend($$.mapToIds($$.data.targets), options, transitions);
- } else if (withDimension) {
- // need to update dimension (e.g. axis.y.tick.values) because y tick values should change
- // no need to update axis in it because they will be updated in redraw()
- $$.updateDimension(true);
- }
-
- // MEMO: needed for grids calculation
- if ($$.isCategorized() && targetsToShow.length === 0) {
- $$.x.domain([0, $$.axes.x.selectAll('.tick').size()]);
- }
-
- if (targetsToShow.length) {
- $$.updateXDomain(targetsToShow, withUpdateXDomain, withUpdateOrgXDomain, withTrimXDomain);
- if (!config.axis_x_tick_values) {
- tickValues = $$.axis.updateXAxisTickValues(targetsToShow);
- }
- } else {
- $$.xAxis.tickValues([]);
- $$.subXAxis.tickValues([]);
- }
-
- if (config.zoom_rescale && !options.flow) {
- xDomainForZoom = $$.x.orgDomain();
- }
-
- $$.y.domain($$.getYDomain(targetsToShow, 'y', xDomainForZoom));
- $$.y2.domain($$.getYDomain(targetsToShow, 'y2', xDomainForZoom));
-
- if (!config.axis_y_tick_values && config.axis_y_tick_count) {
- $$.yAxis.tickValues($$.axis.generateTickValues($$.y.domain(), config.axis_y_tick_count));
- }
- if (!config.axis_y2_tick_values && config.axis_y2_tick_count) {
- $$.y2Axis.tickValues($$.axis.generateTickValues($$.y2.domain(), config.axis_y2_tick_count));
- }
-
- // axes
- $$.axis.redraw(transitions, hideAxis);
-
- // Update axis label
- $$.axis.updateLabels(withTransition);
-
- // show/hide if manual culling needed
- if ((withUpdateXDomain || withUpdateXAxis) && targetsToShow.length) {
- if (config.axis_x_tick_culling && tickValues) {
- for (i = 1; i < tickValues.length; i++) {
- if (tickValues.length / i < config.axis_x_tick_culling_max) {
- intervalForCulling = i;
- break;
- }
- }
- $$.svg.selectAll('.' + CLASS.axisX + ' .tick text').each(function (e) {
- var index = tickValues.indexOf(e);
- if (index >= 0) {
- d3.select(this).style('display', index % intervalForCulling ? 'none' : 'block');
- }
- });
- } else {
- $$.svg.selectAll('.' + CLASS.axisX + ' .tick text').style('display', 'block');
- }
- }
-
- // setup drawer - MEMO: these must be called after axis updated
- drawArea = $$.generateDrawArea ? $$.generateDrawArea(areaIndices, false) : undefined;
- drawBar = $$.generateDrawBar ? $$.generateDrawBar(barIndices) : undefined;
- drawLine = $$.generateDrawLine ? $$.generateDrawLine(lineIndices, false) : undefined;
- xForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, true);
- yForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, false);
-
- // Update sub domain
- if (withY) {
- $$.subY.domain($$.getYDomain(targetsToShow, 'y'));
- $$.subY2.domain($$.getYDomain(targetsToShow, 'y2'));
- }
-
- // xgrid focus
- $$.updateXgridFocus();
-
- // Data empty label positioning and text.
- main.select("text." + CLASS.text + '.' + CLASS.empty).attr("x", $$.width / 2).attr("y", $$.height / 2).text(config.data_empty_label_text).transition().style('opacity', targetsToShow.length ? 0 : 1);
-
- // grid
- $$.updateGrid(duration);
-
- // rect for regions
- $$.updateRegion(duration);
-
- // bars
- $$.updateBar(durationForExit);
-
- // lines, areas and cricles
- $$.updateLine(durationForExit);
- $$.updateArea(durationForExit);
- $$.updateCircle();
-
- // text
- if ($$.hasDataLabel()) {
- $$.updateText(durationForExit);
- }
-
- // title
- if ($$.redrawTitle) {
- $$.redrawTitle();
- }
-
- // arc
- if ($$.redrawArc) {
- $$.redrawArc(duration, durationForExit, withTransform);
- }
-
- // subchart
- if ($$.redrawSubchart) {
- $$.redrawSubchart(withSubchart, transitions, duration, durationForExit, areaIndices, barIndices, lineIndices);
- }
-
- // circles for select
- main.selectAll('.' + CLASS.selectedCircles).filter($$.isBarType.bind($$)).selectAll('circle').remove();
-
- // event rects will redrawn when flow called
- if (config.interaction_enabled && !options.flow && withEventRect) {
- $$.redrawEventRect();
- if ($$.updateZoom) {
- $$.updateZoom();
- }
- }
-
- // update circleY based on updated parameters
- $$.updateCircleY();
-
- // generate circle x/y functions depending on updated params
- cx = ($$.config.axis_rotated ? $$.circleY : $$.circleX).bind($$);
- cy = ($$.config.axis_rotated ? $$.circleX : $$.circleY).bind($$);
-
- if (options.flow) {
- flow = $$.generateFlow({
- targets: targetsToShow,
- flow: options.flow,
- duration: options.flow.duration,
- drawBar: drawBar,
- drawLine: drawLine,
- drawArea: drawArea,
- cx: cx,
- cy: cy,
- xv: xv,
- xForText: xForText,
- yForText: yForText
- });
- }
-
- if ((duration || flow) && $$.isTabVisible()) {
- // Only use transition if tab visible. See #938.
- // transition should be derived from one transition
- d3.transition().duration(duration).each(function () {
- var transitionsToWait = [];
-
- // redraw and gather transitions
- [$$.redrawBar(drawBar, true), $$.redrawLine(drawLine, true), $$.redrawArea(drawArea, true), $$.redrawCircle(cx, cy, true), $$.redrawText(xForText, yForText, options.flow, true), $$.redrawRegion(true), $$.redrawGrid(true)].forEach(function (transitions) {
- transitions.forEach(function (transition) {
- transitionsToWait.push(transition);
- });
- });
-
- // Wait for end of transitions to call flow and onrendered callback
- waitForDraw = $$.generateWait();
- transitionsToWait.forEach(function (t) {
- waitForDraw.add(t);
- });
- }).call(waitForDraw, function () {
- if (flow) {
- flow();
- }
- if (config.onrendered) {
- config.onrendered.call($$);
- }
- });
- } else {
- $$.redrawBar(drawBar);
- $$.redrawLine(drawLine);
- $$.redrawArea(drawArea);
- $$.redrawCircle(cx, cy);
- $$.redrawText(xForText, yForText, options.flow);
- $$.redrawRegion();
- $$.redrawGrid();
- if (config.onrendered) {
- config.onrendered.call($$);
- }
- }
-
- // update fadein condition
- $$.mapToIds($$.data.targets).forEach(function (id) {
- $$.withoutFadeIn[id] = true;
- });
-};
-
-c3_chart_internal_fn.updateAndRedraw = function (options) {
- var $$ = this,
- config = $$.config,
- transitions;
- options = options || {};
- // same with redraw
- options.withTransition = getOption(options, "withTransition", true);
- options.withTransform = getOption(options, "withTransform", false);
- options.withLegend = getOption(options, "withLegend", false);
- // NOT same with redraw
- options.withUpdateXDomain = true;
- options.withUpdateOrgXDomain = true;
- options.withTransitionForExit = false;
- options.withTransitionForTransform = getOption(options, "withTransitionForTransform", options.withTransition);
- // MEMO: this needs to be called before updateLegend and it means this ALWAYS needs to be called)
- $$.updateSizes();
- // MEMO: called in updateLegend in redraw if withLegend
- if (!(options.withLegend && config.legend_show)) {
- transitions = $$.axis.generateTransitions(options.withTransitionForAxis ? config.transition_duration : 0);
- // Update scales
- $$.updateScales();
- $$.updateSvgSize();
- // Update g positions
- $$.transformAll(options.withTransitionForTransform, transitions);
- }
- // Draw with new sizes & scales
- $$.redraw(options, transitions);
-};
-c3_chart_internal_fn.redrawWithoutRescale = function () {
- this.redraw({
- withY: false,
- withSubchart: false,
- withEventRect: false,
- withTransitionForAxis: false
- });
-};
-
-c3_chart_internal_fn.isTimeSeries = function () {
- return this.config.axis_x_type === 'timeseries';
-};
-c3_chart_internal_fn.isCategorized = function () {
- return this.config.axis_x_type.indexOf('categor') >= 0;
-};
-c3_chart_internal_fn.isCustomX = function () {
- var $$ = this,
- config = $$.config;
- return !$$.isTimeSeries() && (config.data_x || notEmpty(config.data_xs));
-};
-
-c3_chart_internal_fn.isTimeSeriesY = function () {
- return this.config.axis_y_type === 'timeseries';
-};
-
-c3_chart_internal_fn.getTranslate = function (target) {
- var $$ = this,
- config = $$.config,
- x,
- y;
- if (target === 'main') {
- x = asHalfPixel($$.margin.left);
- y = asHalfPixel($$.margin.top);
- } else if (target === 'context') {
- x = asHalfPixel($$.margin2.left);
- y = asHalfPixel($$.margin2.top);
- } else if (target === 'legend') {
- x = $$.margin3.left;
- y = $$.margin3.top;
- } else if (target === 'x') {
- x = 0;
- y = config.axis_rotated ? 0 : $$.height;
- } else if (target === 'y') {
- x = 0;
- y = config.axis_rotated ? $$.height : 0;
- } else if (target === 'y2') {
- x = config.axis_rotated ? 0 : $$.width;
- y = config.axis_rotated ? 1 : 0;
- } else if (target === 'subx') {
- x = 0;
- y = config.axis_rotated ? 0 : $$.height2;
- } else if (target === 'arc') {
- x = $$.arcWidth / 2;
- y = $$.arcHeight / 2;
- }
- return "translate(" + x + "," + y + ")";
-};
-c3_chart_internal_fn.initialOpacity = function (d) {
- return d.value !== null && this.withoutFadeIn[d.id] ? 1 : 0;
-};
-c3_chart_internal_fn.initialOpacityForCircle = function (d) {
- return d.value !== null && this.withoutFadeIn[d.id] ? this.opacityForCircle(d) : 0;
-};
-c3_chart_internal_fn.opacityForCircle = function (d) {
- var isPointShouldBeShown = isFunction(this.config.point_show) ? this.config.point_show(d) : this.config.point_show;
- var opacity = isPointShouldBeShown ? 1 : 0;
- return isValue(d.value) ? this.isScatterType(d) ? 0.5 : opacity : 0;
-};
-c3_chart_internal_fn.opacityForText = function () {
- return this.hasDataLabel() ? 1 : 0;
-};
-c3_chart_internal_fn.xx = function (d) {
- return d ? this.x(d.x) : null;
-};
-c3_chart_internal_fn.xv = function (d) {
- var $$ = this,
- value = d.value;
- if ($$.isTimeSeries()) {
- value = $$.parseDate(d.value);
- } else if ($$.isCategorized() && typeof d.value === 'string') {
- value = $$.config.axis_x_categories.indexOf(d.value);
- }
- return Math.ceil($$.x(value));
-};
-c3_chart_internal_fn.yv = function (d) {
- var $$ = this,
- yScale = d.axis && d.axis === 'y2' ? $$.y2 : $$.y;
- return Math.ceil(yScale(d.value));
-};
-c3_chart_internal_fn.subxx = function (d) {
- return d ? this.subX(d.x) : null;
-};
-
-c3_chart_internal_fn.transformMain = function (withTransition, transitions) {
- var $$ = this,
- xAxis,
- yAxis,
- y2Axis;
- if (transitions && transitions.axisX) {
- xAxis = transitions.axisX;
- } else {
- xAxis = $$.main.select('.' + CLASS.axisX);
- if (withTransition) {
- xAxis = xAxis.transition();
- }
- }
- if (transitions && transitions.axisY) {
- yAxis = transitions.axisY;
- } else {
- yAxis = $$.main.select('.' + CLASS.axisY);
- if (withTransition) {
- yAxis = yAxis.transition();
- }
- }
- if (transitions && transitions.axisY2) {
- y2Axis = transitions.axisY2;
- } else {
- y2Axis = $$.main.select('.' + CLASS.axisY2);
- if (withTransition) {
- y2Axis = y2Axis.transition();
- }
- }
- (withTransition ? $$.main.transition() : $$.main).attr("transform", $$.getTranslate('main'));
- xAxis.attr("transform", $$.getTranslate('x'));
- yAxis.attr("transform", $$.getTranslate('y'));
- y2Axis.attr("transform", $$.getTranslate('y2'));
- $$.main.select('.' + CLASS.chartArcs).attr("transform", $$.getTranslate('arc'));
-};
-c3_chart_internal_fn.transformAll = function (withTransition, transitions) {
- var $$ = this;
- $$.transformMain(withTransition, transitions);
- if ($$.config.subchart_show) {
- $$.transformContext(withTransition, transitions);
- }
- if ($$.legend) {
- $$.transformLegend(withTransition);
- }
-};
-
-c3_chart_internal_fn.updateSvgSize = function () {
- var $$ = this,
- brush = $$.svg.select(".c3-brush .background");
- $$.svg.attr('width', $$.currentWidth).attr('height', $$.currentHeight);
- $$.svg.selectAll(['#' + $$.clipId, '#' + $$.clipIdForGrid]).select('rect').attr('width', $$.width).attr('height', $$.height);
- $$.svg.select('#' + $$.clipIdForXAxis).select('rect').attr('x', $$.getXAxisClipX.bind($$)).attr('y', $$.getXAxisClipY.bind($$)).attr('width', $$.getXAxisClipWidth.bind($$)).attr('height', $$.getXAxisClipHeight.bind($$));
- $$.svg.select('#' + $$.clipIdForYAxis).select('rect').attr('x', $$.getYAxisClipX.bind($$)).attr('y', $$.getYAxisClipY.bind($$)).attr('width', $$.getYAxisClipWidth.bind($$)).attr('height', $$.getYAxisClipHeight.bind($$));
- $$.svg.select('#' + $$.clipIdForSubchart).select('rect').attr('width', $$.width).attr('height', brush.size() ? brush.attr('height') : 0);
- $$.svg.select('.' + CLASS.zoomRect).attr('width', $$.width).attr('height', $$.height);
- // MEMO: parent div's height will be bigger than svg when <!DOCTYPE html>
- $$.selectChart.style('max-height', $$.currentHeight + "px");
-};
-
-c3_chart_internal_fn.updateDimension = function (withoutAxis) {
- var $$ = this;
- if (!withoutAxis) {
- if ($$.config.axis_rotated) {
- $$.axes.x.call($$.xAxis);
- $$.axes.subx.call($$.subXAxis);
- } else {
- $$.axes.y.call($$.yAxis);
- $$.axes.y2.call($$.y2Axis);
- }
- }
- $$.updateSizes();
- $$.updateScales();
- $$.updateSvgSize();
- $$.transformAll(false);
-};
-
-c3_chart_internal_fn.observeInserted = function (selection) {
- var $$ = this,
- observer;
- if (typeof MutationObserver === 'undefined') {
- window.console.error("MutationObserver not defined.");
- return;
- }
- observer = new MutationObserver(function (mutations) {
- mutations.forEach(function (mutation) {
- if (mutation.type === 'childList' && mutation.previousSibling) {
- observer.disconnect();
- // need to wait for completion of load because size calculation requires the actual sizes determined after that completion
- $$.intervalForObserveInserted = window.setInterval(function () {
- // parentNode will NOT be null when completed
- if (selection.node().parentNode) {
- window.clearInterval($$.intervalForObserveInserted);
- $$.updateDimension();
- if ($$.brush) {
- $$.brush.update();
- }
- $$.config.oninit.call($$);
- $$.redraw({
- withTransform: true,
- withUpdateXDomain: true,
- withUpdateOrgXDomain: true,
- withTransition: false,
- withTransitionForTransform: false,
- withLegend: true
- });
- selection.transition().style('opacity', 1);
- }
- }, 10);
- }
- });
- });
- observer.observe(selection.node(), { attributes: true, childList: true, characterData: true });
-};
-
-c3_chart_internal_fn.bindResize = function () {
- var $$ = this,
- config = $$.config;
-
- $$.resizeFunction = $$.generateResize();
-
- $$.resizeFunction.add(function () {
- config.onresize.call($$);
- });
- if (config.resize_auto) {
- $$.resizeFunction.add(function () {
- if ($$.resizeTimeout !== undefined) {
- window.clearTimeout($$.resizeTimeout);
- }
- $$.resizeTimeout = window.setTimeout(function () {
- delete $$.resizeTimeout;
- $$.api.flush();
- }, 100);
- });
- }
- $$.resizeFunction.add(function () {
- config.onresized.call($$);
- });
-
- if (window.attachEvent) {
- window.attachEvent('onresize', $$.resizeFunction);
- } else if (window.addEventListener) {
- window.addEventListener('resize', $$.resizeFunction, false);
- } else {
- // fallback to this, if this is a very old browser
- var wrapper = window.onresize;
- if (!wrapper) {
- // create a wrapper that will call all charts
- wrapper = $$.generateResize();
- } else if (!wrapper.add || !wrapper.remove) {
- // there is already a handler registered, make sure we call it too
- wrapper = $$.generateResize();
- wrapper.add(window.onresize);
- }
- // add this graph to the wrapper, we will be removed if the user calls destroy
- wrapper.add($$.resizeFunction);
- window.onresize = wrapper;
- }
-};
-
-c3_chart_internal_fn.generateResize = function () {
- var resizeFunctions = [];
- function callResizeFunctions() {
- resizeFunctions.forEach(function (f) {
- f();
- });
- }
- callResizeFunctions.add = function (f) {
- resizeFunctions.push(f);
- };
- callResizeFunctions.remove = function (f) {
- for (var i = 0; i < resizeFunctions.length; i++) {
- if (resizeFunctions[i] === f) {
- resizeFunctions.splice(i, 1);
- break;
- }
- }
- };
- return callResizeFunctions;
-};
-
-c3_chart_internal_fn.endall = function (transition, callback) {
- var n = 0;
- transition.each(function () {
- ++n;
- }).each("end", function () {
- if (! --n) {
- callback.apply(this, arguments);
- }
- });
-};
-c3_chart_internal_fn.generateWait = function () {
- var transitionsToWait = [],
- f = function f(transition, callback) {
- var timer = setInterval(function () {
- var done = 0;
- transitionsToWait.forEach(function (t) {
- if (t.empty()) {
- done += 1;
- return;
- }
- try {
- t.transition();
- } catch (e) {
- done += 1;
- }
- });
- if (done === transitionsToWait.length) {
- clearInterval(timer);
- if (callback) {
- callback();
- }
- }
- }, 10);
- };
- f.add = function (transition) {
- transitionsToWait.push(transition);
- };
- return f;
-};
-
-c3_chart_internal_fn.parseDate = function (date) {
- var $$ = this,
- parsedDate;
- if (date instanceof Date) {
- parsedDate = date;
- } else if (typeof date === 'string') {
- parsedDate = $$.dataTimeFormat($$.config.data_xFormat).parse(date);
- } else if ((typeof date === 'undefined' ? 'undefined' : _typeof(date)) === 'object') {
- parsedDate = new Date(+date);
- } else if (typeof date === 'number' && !isNaN(date)) {
- parsedDate = new Date(+date);
- }
- if (!parsedDate || isNaN(+parsedDate)) {
- window.console.error("Failed to parse x '" + date + "' to Date object");
- }
- return parsedDate;
-};
-
-c3_chart_internal_fn.isTabVisible = function () {
- var hidden;
- if (typeof document.hidden !== "undefined") {
- // Opera 12.10 and Firefox 18 and later support
- hidden = "hidden";
- } else if (typeof document.mozHidden !== "undefined") {
- hidden = "mozHidden";
- } else if (typeof document.msHidden !== "undefined") {
- hidden = "msHidden";
- } else if (typeof document.webkitHidden !== "undefined") {
- hidden = "webkitHidden";
- }
-
- return document[hidden] ? false : true;
-};
-
-c3_chart_internal_fn.isValue = isValue;
-c3_chart_internal_fn.isFunction = isFunction;
-c3_chart_internal_fn.isString = isString;
-c3_chart_internal_fn.isUndefined = isUndefined;
-c3_chart_internal_fn.isDefined = isDefined;
-c3_chart_internal_fn.ceil10 = ceil10;
-c3_chart_internal_fn.asHalfPixel = asHalfPixel;
-c3_chart_internal_fn.diffDomain = diffDomain;
-c3_chart_internal_fn.isEmpty = isEmpty;
-c3_chart_internal_fn.notEmpty = notEmpty;
-c3_chart_internal_fn.notEmpty = notEmpty;
-c3_chart_internal_fn.getOption = getOption;
-c3_chart_internal_fn.hasValue = hasValue;
-c3_chart_internal_fn.sanitise = sanitise;
-c3_chart_internal_fn.getPathBox = getPathBox;
-c3_chart_internal_fn.CLASS = CLASS;
-
-/* jshint ignore:start */
-
-// PhantomJS doesn't have support for Function.prototype.bind, which has caused confusion. Use
-// this polyfill to avoid the confusion.
-// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Polyfill
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function (oThis) {
- if (typeof this !== 'function') {
- // closest thing possible to the ECMAScript 5
- // internal IsCallable function
- throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
- }
-
- var aArgs = Array.prototype.slice.call(arguments, 1),
- fToBind = this,
- fNOP = function fNOP() {},
- fBound = function fBound() {
- return fToBind.apply(this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
- };
-
- fNOP.prototype = this.prototype;
- fBound.prototype = new fNOP();
-
- return fBound;
- };
-}
-
-// SVGPathSeg API polyfill
-// https://github.com/progers/pathseg
-//
-// This is a drop-in replacement for the SVGPathSeg and SVGPathSegList APIs that were removed from
-// SVG2 (https://lists.w3.org/Archives/Public/www-svg/2015Jun/0044.html), including the latest spec
-// changes which were implemented in Firefox 43 and Chrome 46.
-
-(function () {
- "use strict";
-
- if (!("SVGPathSeg" in window)) {
- // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGPathSeg
- window.SVGPathSeg = function (type, typeAsLetter, owningPathSegList) {
- this.pathSegType = type;
- this.pathSegTypeAsLetter = typeAsLetter;
- this._owningPathSegList = owningPathSegList;
- };
-
- window.SVGPathSeg.prototype.classname = "SVGPathSeg";
-
- window.SVGPathSeg.PATHSEG_UNKNOWN = 0;
- window.SVGPathSeg.PATHSEG_CLOSEPATH = 1;
- window.SVGPathSeg.PATHSEG_MOVETO_ABS = 2;
- window.SVGPathSeg.PATHSEG_MOVETO_REL = 3;
- window.SVGPathSeg.PATHSEG_LINETO_ABS = 4;
- window.SVGPathSeg.PATHSEG_LINETO_REL = 5;
- window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS = 6;
- window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL = 7;
- window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS = 8;
- window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL = 9;
- window.SVGPathSeg.PATHSEG_ARC_ABS = 10;
- window.SVGPathSeg.PATHSEG_ARC_REL = 11;
- window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS = 12;
- window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL = 13;
- window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS = 14;
- window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL = 15;
- window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
- window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
- window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
- window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
-
- // Notify owning PathSegList on any changes so they can be synchronized back to the path element.
- window.SVGPathSeg.prototype._segmentChanged = function () {
- if (this._owningPathSegList) this._owningPathSegList.segmentChanged(this);
- };
-
- window.SVGPathSegClosePath = function (owningPathSegList) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CLOSEPATH, "z", owningPathSegList);
- };
- window.SVGPathSegClosePath.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegClosePath.prototype.toString = function () {
- return "[object SVGPathSegClosePath]";
- };
- window.SVGPathSegClosePath.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter;
- };
- window.SVGPathSegClosePath.prototype.clone = function () {
- return new window.SVGPathSegClosePath(undefined);
- };
-
- window.SVGPathSegMovetoAbs = function (owningPathSegList, x, y) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_ABS, "M", owningPathSegList);
- this._x = x;
- this._y = y;
- };
- window.SVGPathSegMovetoAbs.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegMovetoAbs.prototype.toString = function () {
- return "[object SVGPathSegMovetoAbs]";
- };
- window.SVGPathSegMovetoAbs.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x + " " + this._y;
- };
- window.SVGPathSegMovetoAbs.prototype.clone = function () {
- return new window.SVGPathSegMovetoAbs(undefined, this._x, this._y);
- };
- Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegMovetoRel = function (owningPathSegList, x, y) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_REL, "m", owningPathSegList);
- this._x = x;
- this._y = y;
- };
- window.SVGPathSegMovetoRel.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegMovetoRel.prototype.toString = function () {
- return "[object SVGPathSegMovetoRel]";
- };
- window.SVGPathSegMovetoRel.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x + " " + this._y;
- };
- window.SVGPathSegMovetoRel.prototype.clone = function () {
- return new window.SVGPathSegMovetoRel(undefined, this._x, this._y);
- };
- Object.defineProperty(window.SVGPathSegMovetoRel.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegMovetoRel.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegLinetoAbs = function (owningPathSegList, x, y) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_ABS, "L", owningPathSegList);
- this._x = x;
- this._y = y;
- };
- window.SVGPathSegLinetoAbs.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegLinetoAbs.prototype.toString = function () {
- return "[object SVGPathSegLinetoAbs]";
- };
- window.SVGPathSegLinetoAbs.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x + " " + this._y;
- };
- window.SVGPathSegLinetoAbs.prototype.clone = function () {
- return new window.SVGPathSegLinetoAbs(undefined, this._x, this._y);
- };
- Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegLinetoRel = function (owningPathSegList, x, y) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_REL, "l", owningPathSegList);
- this._x = x;
- this._y = y;
- };
- window.SVGPathSegLinetoRel.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegLinetoRel.prototype.toString = function () {
- return "[object SVGPathSegLinetoRel]";
- };
- window.SVGPathSegLinetoRel.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x + " " + this._y;
- };
- window.SVGPathSegLinetoRel.prototype.clone = function () {
- return new window.SVGPathSegLinetoRel(undefined, this._x, this._y);
- };
- Object.defineProperty(window.SVGPathSegLinetoRel.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegLinetoRel.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegCurvetoCubicAbs = function (owningPathSegList, x, y, x1, y1, x2, y2) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS, "C", owningPathSegList);
- this._x = x;
- this._y = y;
- this._x1 = x1;
- this._y1 = y1;
- this._x2 = x2;
- this._y2 = y2;
- };
- window.SVGPathSegCurvetoCubicAbs.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegCurvetoCubicAbs.prototype.toString = function () {
- return "[object SVGPathSegCurvetoCubicAbs]";
- };
- window.SVGPathSegCurvetoCubicAbs.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x1 + " " + this._y1 + " " + this._x2 + " " + this._y2 + " " + this._x + " " + this._y;
- };
- window.SVGPathSegCurvetoCubicAbs.prototype.clone = function () {
- return new window.SVGPathSegCurvetoCubicAbs(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2);
- };
- Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x1", { get: function get() {
- return this._x1;
- }, set: function set(x1) {
- this._x1 = x1;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y1", { get: function get() {
- return this._y1;
- }, set: function set(y1) {
- this._y1 = y1;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x2", { get: function get() {
- return this._x2;
- }, set: function set(x2) {
- this._x2 = x2;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y2", { get: function get() {
- return this._y2;
- }, set: function set(y2) {
- this._y2 = y2;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegCurvetoCubicRel = function (owningPathSegList, x, y, x1, y1, x2, y2) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL, "c", owningPathSegList);
- this._x = x;
- this._y = y;
- this._x1 = x1;
- this._y1 = y1;
- this._x2 = x2;
- this._y2 = y2;
- };
- window.SVGPathSegCurvetoCubicRel.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegCurvetoCubicRel.prototype.toString = function () {
- return "[object SVGPathSegCurvetoCubicRel]";
- };
- window.SVGPathSegCurvetoCubicRel.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x1 + " " + this._y1 + " " + this._x2 + " " + this._y2 + " " + this._x + " " + this._y;
- };
- window.SVGPathSegCurvetoCubicRel.prototype.clone = function () {
- return new window.SVGPathSegCurvetoCubicRel(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2);
- };
- Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x1", { get: function get() {
- return this._x1;
- }, set: function set(x1) {
- this._x1 = x1;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y1", { get: function get() {
- return this._y1;
- }, set: function set(y1) {
- this._y1 = y1;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x2", { get: function get() {
- return this._x2;
- }, set: function set(x2) {
- this._x2 = x2;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y2", { get: function get() {
- return this._y2;
- }, set: function set(y2) {
- this._y2 = y2;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegCurvetoQuadraticAbs = function (owningPathSegList, x, y, x1, y1) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS, "Q", owningPathSegList);
- this._x = x;
- this._y = y;
- this._x1 = x1;
- this._y1 = y1;
- };
- window.SVGPathSegCurvetoQuadraticAbs.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegCurvetoQuadraticAbs.prototype.toString = function () {
- return "[object SVGPathSegCurvetoQuadraticAbs]";
- };
- window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x1 + " " + this._y1 + " " + this._x + " " + this._y;
- };
- window.SVGPathSegCurvetoQuadraticAbs.prototype.clone = function () {
- return new window.SVGPathSegCurvetoQuadraticAbs(undefined, this._x, this._y, this._x1, this._y1);
- };
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "x1", { get: function get() {
- return this._x1;
- }, set: function set(x1) {
- this._x1 = x1;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "y1", { get: function get() {
- return this._y1;
- }, set: function set(y1) {
- this._y1 = y1;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegCurvetoQuadraticRel = function (owningPathSegList, x, y, x1, y1) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL, "q", owningPathSegList);
- this._x = x;
- this._y = y;
- this._x1 = x1;
- this._y1 = y1;
- };
- window.SVGPathSegCurvetoQuadraticRel.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegCurvetoQuadraticRel.prototype.toString = function () {
- return "[object SVGPathSegCurvetoQuadraticRel]";
- };
- window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x1 + " " + this._y1 + " " + this._x + " " + this._y;
- };
- window.SVGPathSegCurvetoQuadraticRel.prototype.clone = function () {
- return new window.SVGPathSegCurvetoQuadraticRel(undefined, this._x, this._y, this._x1, this._y1);
- };
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "x1", { get: function get() {
- return this._x1;
- }, set: function set(x1) {
- this._x1 = x1;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "y1", { get: function get() {
- return this._y1;
- }, set: function set(y1) {
- this._y1 = y1;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegArcAbs = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_ABS, "A", owningPathSegList);
- this._x = x;
- this._y = y;
- this._r1 = r1;
- this._r2 = r2;
- this._angle = angle;
- this._largeArcFlag = largeArcFlag;
- this._sweepFlag = sweepFlag;
- };
- window.SVGPathSegArcAbs.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegArcAbs.prototype.toString = function () {
- return "[object SVGPathSegArcAbs]";
- };
- window.SVGPathSegArcAbs.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._r1 + " " + this._r2 + " " + this._angle + " " + (this._largeArcFlag ? "1" : "0") + " " + (this._sweepFlag ? "1" : "0") + " " + this._x + " " + this._y;
- };
- window.SVGPathSegArcAbs.prototype.clone = function () {
- return new window.SVGPathSegArcAbs(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag);
- };
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "r1", { get: function get() {
- return this._r1;
- }, set: function set(r1) {
- this._r1 = r1;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "r2", { get: function get() {
- return this._r2;
- }, set: function set(r2) {
- this._r2 = r2;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "angle", { get: function get() {
- return this._angle;
- }, set: function set(angle) {
- this._angle = angle;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "largeArcFlag", { get: function get() {
- return this._largeArcFlag;
- }, set: function set(largeArcFlag) {
- this._largeArcFlag = largeArcFlag;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegArcAbs.prototype, "sweepFlag", { get: function get() {
- return this._sweepFlag;
- }, set: function set(sweepFlag) {
- this._sweepFlag = sweepFlag;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegArcRel = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_REL, "a", owningPathSegList);
- this._x = x;
- this._y = y;
- this._r1 = r1;
- this._r2 = r2;
- this._angle = angle;
- this._largeArcFlag = largeArcFlag;
- this._sweepFlag = sweepFlag;
- };
- window.SVGPathSegArcRel.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegArcRel.prototype.toString = function () {
- return "[object SVGPathSegArcRel]";
- };
- window.SVGPathSegArcRel.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._r1 + " " + this._r2 + " " + this._angle + " " + (this._largeArcFlag ? "1" : "0") + " " + (this._sweepFlag ? "1" : "0") + " " + this._x + " " + this._y;
- };
- window.SVGPathSegArcRel.prototype.clone = function () {
- return new window.SVGPathSegArcRel(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag);
- };
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "r1", { get: function get() {
- return this._r1;
- }, set: function set(r1) {
- this._r1 = r1;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "r2", { get: function get() {
- return this._r2;
- }, set: function set(r2) {
- this._r2 = r2;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "angle", { get: function get() {
- return this._angle;
- }, set: function set(angle) {
- this._angle = angle;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "largeArcFlag", { get: function get() {
- return this._largeArcFlag;
- }, set: function set(largeArcFlag) {
- this._largeArcFlag = largeArcFlag;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegArcRel.prototype, "sweepFlag", { get: function get() {
- return this._sweepFlag;
- }, set: function set(sweepFlag) {
- this._sweepFlag = sweepFlag;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegLinetoHorizontalAbs = function (owningPathSegList, x) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS, "H", owningPathSegList);
- this._x = x;
- };
- window.SVGPathSegLinetoHorizontalAbs.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegLinetoHorizontalAbs.prototype.toString = function () {
- return "[object SVGPathSegLinetoHorizontalAbs]";
- };
- window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x;
- };
- window.SVGPathSegLinetoHorizontalAbs.prototype.clone = function () {
- return new window.SVGPathSegLinetoHorizontalAbs(undefined, this._x);
- };
- Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegLinetoHorizontalRel = function (owningPathSegList, x) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL, "h", owningPathSegList);
- this._x = x;
- };
- window.SVGPathSegLinetoHorizontalRel.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegLinetoHorizontalRel.prototype.toString = function () {
- return "[object SVGPathSegLinetoHorizontalRel]";
- };
- window.SVGPathSegLinetoHorizontalRel.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x;
- };
- window.SVGPathSegLinetoHorizontalRel.prototype.clone = function () {
- return new window.SVGPathSegLinetoHorizontalRel(undefined, this._x);
- };
- Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegLinetoVerticalAbs = function (owningPathSegList, y) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS, "V", owningPathSegList);
- this._y = y;
- };
- window.SVGPathSegLinetoVerticalAbs.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegLinetoVerticalAbs.prototype.toString = function () {
- return "[object SVGPathSegLinetoVerticalAbs]";
- };
- window.SVGPathSegLinetoVerticalAbs.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._y;
- };
- window.SVGPathSegLinetoVerticalAbs.prototype.clone = function () {
- return new window.SVGPathSegLinetoVerticalAbs(undefined, this._y);
- };
- Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegLinetoVerticalRel = function (owningPathSegList, y) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL, "v", owningPathSegList);
- this._y = y;
- };
- window.SVGPathSegLinetoVerticalRel.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegLinetoVerticalRel.prototype.toString = function () {
- return "[object SVGPathSegLinetoVerticalRel]";
- };
- window.SVGPathSegLinetoVerticalRel.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._y;
- };
- window.SVGPathSegLinetoVerticalRel.prototype.clone = function () {
- return new window.SVGPathSegLinetoVerticalRel(undefined, this._y);
- };
- Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegCurvetoCubicSmoothAbs = function (owningPathSegList, x, y, x2, y2) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, "S", owningPathSegList);
- this._x = x;
- this._y = y;
- this._x2 = x2;
- this._y2 = y2;
- };
- window.SVGPathSegCurvetoCubicSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString = function () {
- return "[object SVGPathSegCurvetoCubicSmoothAbs]";
- };
- window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x2 + " " + this._y2 + " " + this._x + " " + this._y;
- };
- window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone = function () {
- return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, this._x, this._y, this._x2, this._y2);
- };
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "x2", { get: function get() {
- return this._x2;
- }, set: function set(x2) {
- this._x2 = x2;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "y2", { get: function get() {
- return this._y2;
- }, set: function set(y2) {
- this._y2 = y2;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegCurvetoCubicSmoothRel = function (owningPathSegList, x, y, x2, y2) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL, "s", owningPathSegList);
- this._x = x;
- this._y = y;
- this._x2 = x2;
- this._y2 = y2;
- };
- window.SVGPathSegCurvetoCubicSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString = function () {
- return "[object SVGPathSegCurvetoCubicSmoothRel]";
- };
- window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x2 + " " + this._y2 + " " + this._x + " " + this._y;
- };
- window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone = function () {
- return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, this._x, this._y, this._x2, this._y2);
- };
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "x2", { get: function get() {
- return this._x2;
- }, set: function set(x2) {
- this._x2 = x2;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "y2", { get: function get() {
- return this._y2;
- }, set: function set(y2) {
- this._y2 = y2;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegCurvetoQuadraticSmoothAbs = function (owningPathSegList, x, y) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, "T", owningPathSegList);
- this._x = x;
- this._y = y;
- };
- window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString = function () {
- return "[object SVGPathSegCurvetoQuadraticSmoothAbs]";
- };
- window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x + " " + this._y;
- };
- window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone = function () {
- return new window.SVGPathSegCurvetoQuadraticSmoothAbs(undefined, this._x, this._y);
- };
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
-
- window.SVGPathSegCurvetoQuadraticSmoothRel = function (owningPathSegList, x, y) {
- window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, "t", owningPathSegList);
- this._x = x;
- this._y = y;
- };
- window.SVGPathSegCurvetoQuadraticSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype);
- window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString = function () {
- return "[object SVGPathSegCurvetoQuadraticSmoothRel]";
- };
- window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString = function () {
- return this.pathSegTypeAsLetter + " " + this._x + " " + this._y;
- };
- window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone = function () {
- return new window.SVGPathSegCurvetoQuadraticSmoothRel(undefined, this._x, this._y);
- };
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, "x", { get: function get() {
- return this._x;
- }, set: function set(x) {
- this._x = x;this._segmentChanged();
- }, enumerable: true });
- Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, "y", { get: function get() {
- return this._y;
- }, set: function set(y) {
- this._y = y;this._segmentChanged();
- }, enumerable: true });
-
- // Add createSVGPathSeg* functions to window.SVGPathElement.
- // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-Interfacewindow.SVGPathElement.
- window.SVGPathElement.prototype.createSVGPathSegClosePath = function () {
- return new window.SVGPathSegClosePath(undefined);
- };
- window.SVGPathElement.prototype.createSVGPathSegMovetoAbs = function (x, y) {
- return new window.SVGPathSegMovetoAbs(undefined, x, y);
- };
- window.SVGPathElement.prototype.createSVGPathSegMovetoRel = function (x, y) {
- return new window.SVGPathSegMovetoRel(undefined, x, y);
- };
- window.SVGPathElement.prototype.createSVGPathSegLinetoAbs = function (x, y) {
- return new window.SVGPathSegLinetoAbs(undefined, x, y);
- };
- window.SVGPathElement.prototype.createSVGPathSegLinetoRel = function (x, y) {
- return new window.SVGPathSegLinetoRel(undefined, x, y);
- };
- window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs = function (x, y, x1, y1, x2, y2) {
- return new window.SVGPathSegCurvetoCubicAbs(undefined, x, y, x1, y1, x2, y2);
- };
- window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel = function (x, y, x1, y1, x2, y2) {
- return new window.SVGPathSegCurvetoCubicRel(undefined, x, y, x1, y1, x2, y2);
- };
- window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs = function (x, y, x1, y1) {
- return new window.SVGPathSegCurvetoQuadraticAbs(undefined, x, y, x1, y1);
- };
- window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel = function (x, y, x1, y1) {
- return new window.SVGPathSegCurvetoQuadraticRel(undefined, x, y, x1, y1);
- };
- window.SVGPathElement.prototype.createSVGPathSegArcAbs = function (x, y, r1, r2, angle, largeArcFlag, sweepFlag) {
- return new window.SVGPathSegArcAbs(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag);
- };
- window.SVGPathElement.prototype.createSVGPathSegArcRel = function (x, y, r1, r2, angle, largeArcFlag, sweepFlag) {
- return new window.SVGPathSegArcRel(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag);
- };
- window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs = function (x) {
- return new window.SVGPathSegLinetoHorizontalAbs(undefined, x);
- };
- window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel = function (x) {
- return new window.SVGPathSegLinetoHorizontalRel(undefined, x);
- };
- window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs = function (y) {
- return new window.SVGPathSegLinetoVerticalAbs(undefined, y);
- };
- window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel = function (y) {
- return new window.SVGPathSegLinetoVerticalRel(undefined, y);
- };
- window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs = function (x, y, x2, y2) {
- return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, x, y, x2, y2);
- };
- window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel = function (x, y, x2, y2) {
- return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, x, y, x2, y2);
- };
- window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs = function (x, y) {
- return new window.SVGPathSegCurvetoQuadraticSmoothAbs(undefined, x, y);
- };
- window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel = function (x, y) {
- return new window.SVGPathSegCurvetoQuadraticSmoothRel(undefined, x, y);
- };
-
- if (!("getPathSegAtLength" in window.SVGPathElement.prototype)) {
- // Add getPathSegAtLength to SVGPathElement.
- // Spec: https://www.w3.org/TR/SVG11/single-page.html#paths-__svg__SVGPathElement__getPathSegAtLength
- // This polyfill requires SVGPathElement.getTotalLength to implement the distance-along-a-path algorithm.
- window.SVGPathElement.prototype.getPathSegAtLength = function (distance) {
- if (distance === undefined || !isFinite(distance)) throw "Invalid arguments.";
-
- var measurementElement = document.createElementNS("http://www.w3.org/2000/svg", "path");
- measurementElement.setAttribute("d", this.getAttribute("d"));
- var lastPathSegment = measurementElement.pathSegList.numberOfItems - 1;
-
- // If the path is empty, return 0.
- if (lastPathSegment <= 0) return 0;
-
- do {
- measurementElement.pathSegList.removeItem(lastPathSegment);
- if (distance > measurementElement.getTotalLength()) break;
- lastPathSegment--;
- } while (lastPathSegment > 0);
- return lastPathSegment;
- };
- }
- }
-
- if (!("SVGPathSegList" in window)) {
- // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGPathSegList
- window.SVGPathSegList = function (pathElement) {
- this._pathElement = pathElement;
- this._list = this._parsePath(this._pathElement.getAttribute("d"));
-
- // Use a MutationObserver to catch changes to the path's "d" attribute.
- this._mutationObserverConfig = { "attributes": true, "attributeFilter": ["d"] };
- this._pathElementMutationObserver = new MutationObserver(this._updateListFromPathMutations.bind(this));
- this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);
- };
-
- window.SVGPathSegList.prototype.classname = "SVGPathSegList";
-
- Object.defineProperty(window.SVGPathSegList.prototype, "numberOfItems", {
- get: function get() {
- this._checkPathSynchronizedToList();
- return this._list.length;
- },
- enumerable: true
- });
-
- // Add the pathSegList accessors to window.SVGPathElement.
- // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGAnimatedPathData
- Object.defineProperty(window.SVGPathElement.prototype, "pathSegList", {
- get: function get() {
- if (!this._pathSegList) this._pathSegList = new window.SVGPathSegList(this);
- return this._pathSegList;
- },
- enumerable: true
- });
- // FIXME: The following are not implemented and simply return window.SVGPathElement.pathSegList.
- Object.defineProperty(window.SVGPathElement.prototype, "normalizedPathSegList", { get: function get() {
- return this.pathSegList;
- }, enumerable: true });
- Object.defineProperty(window.SVGPathElement.prototype, "animatedPathSegList", { get: function get() {
- return this.pathSegList;
- }, enumerable: true });
- Object.defineProperty(window.SVGPathElement.prototype, "animatedNormalizedPathSegList", { get: function get() {
- return this.pathSegList;
- }, enumerable: true });
-
- // Process any pending mutations to the path element and update the list as needed.
- // This should be the first call of all public functions and is needed because
- // MutationObservers are not synchronous so we can have pending asynchronous mutations.
- window.SVGPathSegList.prototype._checkPathSynchronizedToList = function () {
- this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords());
- };
-
- window.SVGPathSegList.prototype._updateListFromPathMutations = function (mutationRecords) {
- if (!this._pathElement) return;
- var hasPathMutations = false;
- mutationRecords.forEach(function (record) {
- if (record.attributeName == "d") hasPathMutations = true;
- });
- if (hasPathMutations) this._list = this._parsePath(this._pathElement.getAttribute("d"));
- };
-
- // Serialize the list and update the path's 'd' attribute.
- window.SVGPathSegList.prototype._writeListToPath = function () {
- this._pathElementMutationObserver.disconnect();
- this._pathElement.setAttribute("d", window.SVGPathSegList._pathSegArrayAsString(this._list));
- this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);
- };
-
- // When a path segment changes the list needs to be synchronized back to the path element.
- window.SVGPathSegList.prototype.segmentChanged = function (pathSeg) {
- this._writeListToPath();
- };
-
- window.SVGPathSegList.prototype.clear = function () {
- this._checkPathSynchronizedToList();
-
- this._list.forEach(function (pathSeg) {
- pathSeg._owningPathSegList = null;
- });
- this._list = [];
- this._writeListToPath();
- };
-
- window.SVGPathSegList.prototype.initialize = function (newItem) {
- this._checkPathSynchronizedToList();
-
- this._list = [newItem];
- newItem._owningPathSegList = this;
- this._writeListToPath();
- return newItem;
- };
-
- window.SVGPathSegList.prototype._checkValidIndex = function (index) {
- if (isNaN(index) || index < 0 || index >= this.numberOfItems) throw "INDEX_SIZE_ERR";
- };
-
- window.SVGPathSegList.prototype.getItem = function (index) {
- this._checkPathSynchronizedToList();
-
- this._checkValidIndex(index);
- return this._list[index];
- };
-
- window.SVGPathSegList.prototype.insertItemBefore = function (newItem, index) {
- this._checkPathSynchronizedToList();
-
- // Spec: If the index is greater than or equal to numberOfItems, then the new item is appended to the end of the list.
- if (index > this.numberOfItems) index = this.numberOfItems;
- if (newItem._owningPathSegList) {
- // SVG2 spec says to make a copy.
- newItem = newItem.clone();
- }
- this._list.splice(index, 0, newItem);
- newItem._owningPathSegList = this;
- this._writeListToPath();
- return newItem;
- };
-
- window.SVGPathSegList.prototype.replaceItem = function (newItem, index) {
- this._checkPathSynchronizedToList();
-
- if (newItem._owningPathSegList) {
- // SVG2 spec says to make a copy.
- newItem = newItem.clone();
- }
- this._checkValidIndex(index);
- this._list[index] = newItem;
- newItem._owningPathSegList = this;
- this._writeListToPath();
- return newItem;
- };
-
- window.SVGPathSegList.prototype.removeItem = function (index) {
- this._checkPathSynchronizedToList();
-
- this._checkValidIndex(index);
- var item = this._list[index];
- this._list.splice(index, 1);
- this._writeListToPath();
- return item;
- };
-
- window.SVGPathSegList.prototype.appendItem = function (newItem) {
- this._checkPathSynchronizedToList();
-
- if (newItem._owningPathSegList) {
- // SVG2 spec says to make a copy.
- newItem = newItem.clone();
- }
- this._list.push(newItem);
- newItem._owningPathSegList = this;
- // TODO: Optimize this to just append to the existing attribute.
- this._writeListToPath();
- return newItem;
- };
-
- window.SVGPathSegList._pathSegArrayAsString = function (pathSegArray) {
- var string = "";
- var first = true;
- pathSegArray.forEach(function (pathSeg) {
- if (first) {
- first = false;
- string += pathSeg._asPathString();
- } else {
- string += " " + pathSeg._asPathString();
- }
- });
- return string;
- };
-
- // This closely follows SVGPathParser::parsePath from Source/core/svg/SVGPathParser.cpp.
- window.SVGPathSegList.prototype._parsePath = function (string) {
- if (!string || string.length == 0) return [];
-
- var owningPathSegList = this;
-
- var Builder = function Builder() {
- this.pathSegList = [];
- };
-
- Builder.prototype.appendSegment = function (pathSeg) {
- this.pathSegList.push(pathSeg);
- };
-
- var Source = function Source(string) {
- this._string = string;
- this._currentIndex = 0;
- this._endIndex = this._string.length;
- this._previousCommand = window.SVGPathSeg.PATHSEG_UNKNOWN;
-
- this._skipOptionalSpaces();
- };
-
- Source.prototype._isCurrentSpace = function () {
- var character = this._string[this._currentIndex];
- return character <= " " && (character == " " || character == "\n" || character == "\t" || character == "\r" || character == "\f");
- };
-
- Source.prototype._skipOptionalSpaces = function () {
- while (this._currentIndex < this._endIndex && this._isCurrentSpace()) {
- this._currentIndex++;
- }return this._currentIndex < this._endIndex;
- };
-
- Source.prototype._skipOptionalSpacesOrDelimiter = function () {
- if (this._currentIndex < this._endIndex && !this._isCurrentSpace() && this._string.charAt(this._currentIndex) != ",") return false;
- if (this._skipOptionalSpaces()) {
- if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == ",") {
- this._currentIndex++;
- this._skipOptionalSpaces();
- }
- }
- return this._currentIndex < this._endIndex;
- };
-
- Source.prototype.hasMoreData = function () {
- return this._currentIndex < this._endIndex;
- };
-
- Source.prototype.peekSegmentType = function () {
- var lookahead = this._string[this._currentIndex];
- return this._pathSegTypeFromChar(lookahead);
- };
-
- Source.prototype._pathSegTypeFromChar = function (lookahead) {
- switch (lookahead) {
- case "Z":
- case "z":
- return window.SVGPathSeg.PATHSEG_CLOSEPATH;
- case "M":
- return window.SVGPathSeg.PATHSEG_MOVETO_ABS;
- case "m":
- return window.SVGPathSeg.PATHSEG_MOVETO_REL;
- case "L":
- return window.SVGPathSeg.PATHSEG_LINETO_ABS;
- case "l":
- return window.SVGPathSeg.PATHSEG_LINETO_REL;
- case "C":
- return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;
- case "c":
- return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;
- case "Q":
- return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;
- case "q":
- return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;
- case "A":
- return window.SVGPathSeg.PATHSEG_ARC_ABS;
- case "a":
- return window.SVGPathSeg.PATHSEG_ARC_REL;
- case "H":
- return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;
- case "h":
- return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;
- case "V":
- return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;
- case "v":
- return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;
- case "S":
- return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;
- case "s":
- return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;
- case "T":
- return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;
- case "t":
- return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;
- default:
- return window.SVGPathSeg.PATHSEG_UNKNOWN;
- }
- };
-
- Source.prototype._nextCommandHelper = function (lookahead, previousCommand) {
- // Check for remaining coordinates in the current command.
- if ((lookahead == "+" || lookahead == "-" || lookahead == "." || lookahead >= "0" && lookahead <= "9") && previousCommand != window.SVGPathSeg.PATHSEG_CLOSEPATH) {
- if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_ABS) return window.SVGPathSeg.PATHSEG_LINETO_ABS;
- if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_REL) return window.SVGPathSeg.PATHSEG_LINETO_REL;
- return previousCommand;
- }
- return window.SVGPathSeg.PATHSEG_UNKNOWN;
- };
-
- Source.prototype.initialCommandIsMoveTo = function () {
- // If the path is empty it is still valid, so return true.
- if (!this.hasMoreData()) return true;
- var command = this.peekSegmentType();
- // Path must start with moveTo.
- return command == window.SVGPathSeg.PATHSEG_MOVETO_ABS || command == window.SVGPathSeg.PATHSEG_MOVETO_REL;
- };
-
- // Parse a number from an SVG path. This very closely follows genericParseNumber(...) from Source/core/svg/SVGParserUtilities.cpp.
- // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-PathDataBNF
- Source.prototype._parseNumber = function () {
- var exponent = 0;
- var integer = 0;
- var frac = 1;
- var decimal = 0;
- var sign = 1;
- var expsign = 1;
-
- var startIndex = this._currentIndex;
-
- this._skipOptionalSpaces();
-
- // Read the sign.
- if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == "+") this._currentIndex++;else if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == "-") {
- this._currentIndex++;
- sign = -1;
- }
-
- if (this._currentIndex == this._endIndex || (this._string.charAt(this._currentIndex) < "0" || this._string.charAt(this._currentIndex) > "9") && this._string.charAt(this._currentIndex) != ".")
- // The first character of a number must be one of [0-9+-.].
- return undefined;
-
- // Read the integer part, build right-to-left.
- var startIntPartIndex = this._currentIndex;
- while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= "0" && this._string.charAt(this._currentIndex) <= "9") {
- this._currentIndex++;
- } // Advance to first non-digit.
-
- if (this._currentIndex != startIntPartIndex) {
- var scanIntPartIndex = this._currentIndex - 1;
- var multiplier = 1;
- while (scanIntPartIndex >= startIntPartIndex) {
- integer += multiplier * (this._string.charAt(scanIntPartIndex--) - "0");
- multiplier *= 10;
- }
- }
-
- // Read the decimals.
- if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == ".") {
- this._currentIndex++;
-
- // There must be a least one digit following the .
- if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < "0" || this._string.charAt(this._currentIndex) > "9") return undefined;
- while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= "0" && this._string.charAt(this._currentIndex) <= "9") {
- frac *= 10;
- decimal += (this._string.charAt(this._currentIndex) - "0") / frac;
- this._currentIndex += 1;
- }
- }
-
- // Read the exponent part.
- if (this._currentIndex != startIndex && this._currentIndex + 1 < this._endIndex && (this._string.charAt(this._currentIndex) == "e" || this._string.charAt(this._currentIndex) == "E") && this._string.charAt(this._currentIndex + 1) != "x" && this._string.charAt(this._currentIndex + 1) != "m") {
- this._currentIndex++;
-
- // Read the sign of the exponent.
- if (this._string.charAt(this._currentIndex) == "+") {
- this._currentIndex++;
- } else if (this._string.charAt(this._currentIndex) == "-") {
- this._currentIndex++;
- expsign = -1;
- }
-
- // There must be an exponent.
- if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < "0" || this._string.charAt(this._currentIndex) > "9") return undefined;
-
- while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= "0" && this._string.charAt(this._currentIndex) <= "9") {
- exponent *= 10;
- exponent += this._string.charAt(this._currentIndex) - "0";
- this._currentIndex++;
- }
- }
-
- var number = integer + decimal;
- number *= sign;
-
- if (exponent) number *= Math.pow(10, expsign * exponent);
-
- if (startIndex == this._currentIndex) return undefined;
-
- this._skipOptionalSpacesOrDelimiter();
-
- return number;
- };
-
- Source.prototype._parseArcFlag = function () {
- if (this._currentIndex >= this._endIndex) return undefined;
- var flag = false;
- var flagChar = this._string.charAt(this._currentIndex++);
- if (flagChar == "0") flag = false;else if (flagChar == "1") flag = true;else return undefined;
-
- this._skipOptionalSpacesOrDelimiter();
- return flag;
- };
-
- Source.prototype.parseSegment = function () {
- var lookahead = this._string[this._currentIndex];
- var command = this._pathSegTypeFromChar(lookahead);
- if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) {
- // Possibly an implicit command. Not allowed if this is the first command.
- if (this._previousCommand == window.SVGPathSeg.PATHSEG_UNKNOWN) return null;
- command = this._nextCommandHelper(lookahead, this._previousCommand);
- if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) return null;
- } else {
- this._currentIndex++;
- }
-
- this._previousCommand = command;
-
- switch (command) {
- case window.SVGPathSeg.PATHSEG_MOVETO_REL:
- return new window.SVGPathSegMovetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());
- case window.SVGPathSeg.PATHSEG_MOVETO_ABS:
- return new window.SVGPathSegMovetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());
- case window.SVGPathSeg.PATHSEG_LINETO_REL:
- return new window.SVGPathSegLinetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());
- case window.SVGPathSeg.PATHSEG_LINETO_ABS:
- return new window.SVGPathSegLinetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());
- case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:
- return new window.SVGPathSegLinetoHorizontalRel(owningPathSegList, this._parseNumber());
- case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:
- return new window.SVGPathSegLinetoHorizontalAbs(owningPathSegList, this._parseNumber());
- case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:
- return new window.SVGPathSegLinetoVerticalRel(owningPathSegList, this._parseNumber());
- case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:
- return new window.SVGPathSegLinetoVerticalAbs(owningPathSegList, this._parseNumber());
- case window.SVGPathSeg.PATHSEG_CLOSEPATH:
- this._skipOptionalSpaces();
- return new window.SVGPathSegClosePath(owningPathSegList);
- case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:
- var points = { x1: this._parseNumber(), y1: this._parseNumber(), x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() };
- return new window.SVGPathSegCurvetoCubicRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);
- case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:
- var points = { x1: this._parseNumber(), y1: this._parseNumber(), x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() };
- return new window.SVGPathSegCurvetoCubicAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);
- case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
- var points = { x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() };
- return new window.SVGPathSegCurvetoCubicSmoothRel(owningPathSegList, points.x, points.y, points.x2, points.y2);
- case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
- var points = { x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() };
- return new window.SVGPathSegCurvetoCubicSmoothAbs(owningPathSegList, points.x, points.y, points.x2, points.y2);
- case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:
- var points = { x1: this._parseNumber(), y1: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() };
- return new window.SVGPathSegCurvetoQuadraticRel(owningPathSegList, points.x, points.y, points.x1, points.y1);
- case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:
- var points = { x1: this._parseNumber(), y1: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() };
- return new window.SVGPathSegCurvetoQuadraticAbs(owningPathSegList, points.x, points.y, points.x1, points.y1);
- case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
- return new window.SVGPathSegCurvetoQuadraticSmoothRel(owningPathSegList, this._parseNumber(), this._parseNumber());
- case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
- return new window.SVGPathSegCurvetoQuadraticSmoothAbs(owningPathSegList, this._parseNumber(), this._parseNumber());
- case window.SVGPathSeg.PATHSEG_ARC_REL:
- var points = { x1: this._parseNumber(), y1: this._parseNumber(), arcAngle: this._parseNumber(), arcLarge: this._parseArcFlag(), arcSweep: this._parseArcFlag(), x: this._parseNumber(), y: this._parseNumber() };
- return new window.SVGPathSegArcRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);
- case window.SVGPathSeg.PATHSEG_ARC_ABS:
- var points = { x1: this._parseNumber(), y1: this._parseNumber(), arcAngle: this._parseNumber(), arcLarge: this._parseArcFlag(), arcSweep: this._parseArcFlag(), x: this._parseNumber(), y: this._parseNumber() };
- return new window.SVGPathSegArcAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);
- default:
- throw "Unknown path seg type.";
- }
- };
-
- var builder = new Builder();
- var source = new Source(string);
-
- if (!source.initialCommandIsMoveTo()) return [];
- while (source.hasMoreData()) {
- var pathSeg = source.parseSegment();
- if (!pathSeg) return [];
- builder.appendSegment(pathSeg);
- }
-
- return builder.pathSegList;
- };
- }
-})();
-
-/* jshint ignore:end */
-
-c3_chart_fn.axis = function () {};
-c3_chart_fn.axis.labels = function (labels) {
- var $$ = this.internal;
- if (arguments.length) {
- Object.keys(labels).forEach(function (axisId) {
- $$.axis.setLabelText(axisId, labels[axisId]);
- });
- $$.axis.updateLabels();
- }
- // TODO: return some values?
-};
-c3_chart_fn.axis.max = function (max) {
- var $$ = this.internal,
- config = $$.config;
- if (arguments.length) {
- if ((typeof max === 'undefined' ? 'undefined' : _typeof(max)) === 'object') {
- if (isValue(max.x)) {
- config.axis_x_max = max.x;
- }
- if (isValue(max.y)) {
- config.axis_y_max = max.y;
- }
- if (isValue(max.y2)) {
- config.axis_y2_max = max.y2;
- }
- } else {
- config.axis_y_max = config.axis_y2_max = max;
- }
- $$.redraw({ withUpdateOrgXDomain: true, withUpdateXDomain: true });
- } else {
- return {
- x: config.axis_x_max,
- y: config.axis_y_max,
- y2: config.axis_y2_max
- };
- }
-};
-c3_chart_fn.axis.min = function (min) {
- var $$ = this.internal,
- config = $$.config;
- if (arguments.length) {
- if ((typeof min === 'undefined' ? 'undefined' : _typeof(min)) === 'object') {
- if (isValue(min.x)) {
- config.axis_x_min = min.x;
- }
- if (isValue(min.y)) {
- config.axis_y_min = min.y;
- }
- if (isValue(min.y2)) {
- config.axis_y2_min = min.y2;
- }
- } else {
- config.axis_y_min = config.axis_y2_min = min;
- }
- $$.redraw({ withUpdateOrgXDomain: true, withUpdateXDomain: true });
- } else {
- return {
- x: config.axis_x_min,
- y: config.axis_y_min,
- y2: config.axis_y2_min
- };
- }
-};
-c3_chart_fn.axis.range = function (range) {
- if (arguments.length) {
- if (isDefined(range.max)) {
- this.axis.max(range.max);
- }
- if (isDefined(range.min)) {
- this.axis.min(range.min);
- }
- } else {
- return {
- max: this.axis.max(),
- min: this.axis.min()
- };
- }
-};
-
-c3_chart_fn.category = function (i, category) {
- var $$ = this.internal,
- config = $$.config;
- if (arguments.length > 1) {
- config.axis_x_categories[i] = category;
- $$.redraw();
- }
- return config.axis_x_categories[i];
-};
-c3_chart_fn.categories = function (categories) {
- var $$ = this.internal,
- config = $$.config;
- if (!arguments.length) {
- return config.axis_x_categories;
- }
- config.axis_x_categories = categories;
- $$.redraw();
- return config.axis_x_categories;
-};
-
-c3_chart_fn.resize = function (size) {
- var $$ = this.internal,
- config = $$.config;
- config.size_width = size ? size.width : null;
- config.size_height = size ? size.height : null;
- this.flush();
-};
-
-c3_chart_fn.flush = function () {
- var $$ = this.internal;
- $$.updateAndRedraw({ withLegend: true, withTransition: false, withTransitionForTransform: false });
-};
-
-c3_chart_fn.destroy = function () {
- var $$ = this.internal;
-
- window.clearInterval($$.intervalForObserveInserted);
-
- if ($$.resizeTimeout !== undefined) {
- window.clearTimeout($$.resizeTimeout);
- }
-
- if (window.detachEvent) {
- window.detachEvent('onresize', $$.resizeFunction);
- } else if (window.removeEventListener) {
- window.removeEventListener('resize', $$.resizeFunction);
- } else {
- var wrapper = window.onresize;
- // check if no one else removed our wrapper and remove our resizeFunction from it
- if (wrapper && wrapper.add && wrapper.remove) {
- wrapper.remove($$.resizeFunction);
- }
- }
-
- $$.selectChart.classed('c3', false).html("");
-
- // MEMO: this is needed because the reference of some elements will not be released, then memory leak will happen.
- Object.keys($$).forEach(function (key) {
- $$[key] = null;
- });
-
- return null;
-};
-
-// TODO: fix
-c3_chart_fn.color = function (id) {
- var $$ = this.internal;
- return $$.color(id); // more patterns
-};
-
-c3_chart_fn.data = function (targetIds) {
- var targets = this.internal.data.targets;
- return typeof targetIds === 'undefined' ? targets : targets.filter(function (t) {
- return [].concat(targetIds).indexOf(t.id) >= 0;
- });
-};
-c3_chart_fn.data.shown = function (targetIds) {
- return this.internal.filterTargetsToShow(this.data(targetIds));
-};
-c3_chart_fn.data.values = function (targetId) {
- var targets,
- values = null;
- if (targetId) {
- targets = this.data(targetId);
- values = targets[0] ? targets[0].values.map(function (d) {
- return d.value;
- }) : null;
- }
- return values;
-};
-c3_chart_fn.data.names = function (names) {
- this.internal.clearLegendItemTextBoxCache();
- return this.internal.updateDataAttributes('names', names);
-};
-c3_chart_fn.data.colors = function (colors) {
- return this.internal.updateDataAttributes('colors', colors);
-};
-c3_chart_fn.data.axes = function (axes) {
- return this.internal.updateDataAttributes('axes', axes);
-};
-
-c3_chart_fn.flow = function (args) {
- var $$ = this.internal,
- targets,
- data,
- notfoundIds = [],
- orgDataCount = $$.getMaxDataCount(),
- dataCount,
- domain,
- baseTarget,
- baseValue,
- length = 0,
- tail = 0,
- diff,
- to;
-
- if (args.json) {
- data = $$.convertJsonToData(args.json, args.keys);
- } else if (args.rows) {
- data = $$.convertRowsToData(args.rows);
- } else if (args.columns) {
- data = $$.convertColumnsToData(args.columns);
- } else {
- return;
- }
- targets = $$.convertDataToTargets(data, true);
-
- // Update/Add data
- $$.data.targets.forEach(function (t) {
- var found = false,
- i,
- j;
- for (i = 0; i < targets.length; i++) {
- if (t.id === targets[i].id) {
- found = true;
-
- if (t.values[t.values.length - 1]) {
- tail = t.values[t.values.length - 1].index + 1;
- }
- length = targets[i].values.length;
-
- for (j = 0; j < length; j++) {
- targets[i].values[j].index = tail + j;
- if (!$$.isTimeSeries()) {
- targets[i].values[j].x = tail + j;
- }
- }
- t.values = t.values.concat(targets[i].values);
-
- targets.splice(i, 1);
- break;
- }
- }
- if (!found) {
- notfoundIds.push(t.id);
- }
- });
-
- // Append null for not found targets
- $$.data.targets.forEach(function (t) {
- var i, j;
- for (i = 0; i < notfoundIds.length; i++) {
- if (t.id === notfoundIds[i]) {
- tail = t.values[t.values.length - 1].index + 1;
- for (j = 0; j < length; j++) {
- t.values.push({
- id: t.id,
- index: tail + j,
- x: $$.isTimeSeries() ? $$.getOtherTargetX(tail + j) : tail + j,
- value: null
- });
- }
- }
- }
- });
-
- // Generate null values for new target
- if ($$.data.targets.length) {
- targets.forEach(function (t) {
- var i,
- missing = [];
- for (i = $$.data.targets[0].values[0].index; i < tail; i++) {
- missing.push({
- id: t.id,
- index: i,
- x: $$.isTimeSeries() ? $$.getOtherTargetX(i) : i,
- value: null
- });
- }
- t.values.forEach(function (v) {
- v.index += tail;
- if (!$$.isTimeSeries()) {
- v.x += tail;
- }
- });
- t.values = missing.concat(t.values);
- });
- }
- $$.data.targets = $$.data.targets.concat(targets); // add remained
-
- // check data count because behavior needs to change when it's only one
- dataCount = $$.getMaxDataCount();
- baseTarget = $$.data.targets[0];
- baseValue = baseTarget.values[0];
-
- // Update length to flow if needed
- if (isDefined(args.to)) {
- length = 0;
- to = $$.isTimeSeries() ? $$.parseDate(args.to) : args.to;
- baseTarget.values.forEach(function (v) {
- if (v.x < to) {
- length++;
- }
- });
- } else if (isDefined(args.length)) {
- length = args.length;
- }
-
- // If only one data, update the domain to flow from left edge of the chart
- if (!orgDataCount) {
- if ($$.isTimeSeries()) {
- if (baseTarget.values.length > 1) {
- diff = baseTarget.values[baseTarget.values.length - 1].x - baseValue.x;
- } else {
- diff = baseValue.x - $$.getXDomain($$.data.targets)[0];
- }
- } else {
- diff = 1;
- }
- domain = [baseValue.x - diff, baseValue.x];
- $$.updateXDomain(null, true, true, false, domain);
- } else if (orgDataCount === 1) {
- if ($$.isTimeSeries()) {
- diff = (baseTarget.values[baseTarget.values.length - 1].x - baseValue.x) / 2;
- domain = [new Date(+baseValue.x - diff), new Date(+baseValue.x + diff)];
- $$.updateXDomain(null, true, true, false, domain);
- }
- }
-
- // Set targets
- $$.updateTargets($$.data.targets);
-
- // Redraw with new targets
- $$.redraw({
- flow: {
- index: baseValue.index,
- length: length,
- duration: isValue(args.duration) ? args.duration : $$.config.transition_duration,
- done: args.done,
- orgDataCount: orgDataCount
- },
- withLegend: true,
- withTransition: orgDataCount > 1,
- withTrimXDomain: false,
- withUpdateXAxis: true
- });
-};
-
-c3_chart_internal_fn.generateFlow = function (args) {
- var $$ = this,
- config = $$.config,
- d3 = $$.d3;
-
- return function () {
- var targets = args.targets,
- flow = args.flow,
- drawBar = args.drawBar,
- drawLine = args.drawLine,
- drawArea = args.drawArea,
- cx = args.cx,
- cy = args.cy,
- xv = args.xv,
- xForText = args.xForText,
- yForText = args.yForText,
- duration = args.duration;
-
- var translateX,
- scaleX = 1,
- transform,
- flowIndex = flow.index,
- flowLength = flow.length,
- flowStart = $$.getValueOnIndex($$.data.targets[0].values, flowIndex),
- flowEnd = $$.getValueOnIndex($$.data.targets[0].values, flowIndex + flowLength),
- orgDomain = $$.x.domain(),
- domain,
- durationForFlow = flow.duration || duration,
- done = flow.done || function () {},
- wait = $$.generateWait();
-
- var xgrid = $$.xgrid || d3.selectAll([]),
- xgridLines = $$.xgridLines || d3.selectAll([]),
- mainRegion = $$.mainRegion || d3.selectAll([]),
- mainText = $$.mainText || d3.selectAll([]),
- mainBar = $$.mainBar || d3.selectAll([]),
- mainLine = $$.mainLine || d3.selectAll([]),
- mainArea = $$.mainArea || d3.selectAll([]),
- mainCircle = $$.mainCircle || d3.selectAll([]);
-
- // set flag
- $$.flowing = true;
-
- // remove head data after rendered
- $$.data.targets.forEach(function (d) {
- d.values.splice(0, flowLength);
- });
-
- // update x domain to generate axis elements for flow
- domain = $$.updateXDomain(targets, true, true);
- // update elements related to x scale
- if ($$.updateXGrid) {
- $$.updateXGrid(true);
- }
-
- // generate transform to flow
- if (!flow.orgDataCount) {
- // if empty
- if ($$.data.targets[0].values.length !== 1) {
- translateX = $$.x(orgDomain[0]) - $$.x(domain[0]);
- } else {
- if ($$.isTimeSeries()) {
- flowStart = $$.getValueOnIndex($$.data.targets[0].values, 0);
- flowEnd = $$.getValueOnIndex($$.data.targets[0].values, $$.data.targets[0].values.length - 1);
- translateX = $$.x(flowStart.x) - $$.x(flowEnd.x);
- } else {
- translateX = diffDomain(domain) / 2;
- }
- }
- } else if (flow.orgDataCount === 1 || (flowStart && flowStart.x) === (flowEnd && flowEnd.x)) {
- translateX = $$.x(orgDomain[0]) - $$.x(domain[0]);
- } else {
- if ($$.isTimeSeries()) {
- translateX = $$.x(orgDomain[0]) - $$.x(domain[0]);
- } else {
- translateX = $$.x(flowStart.x) - $$.x(flowEnd.x);
- }
- }
- scaleX = diffDomain(orgDomain) / diffDomain(domain);
- transform = 'translate(' + translateX + ',0) scale(' + scaleX + ',1)';
-
- $$.hideXGridFocus();
-
- d3.transition().ease('linear').duration(durationForFlow).each(function () {
- wait.add($$.axes.x.transition().call($$.xAxis));
- wait.add(mainBar.transition().attr('transform', transform));
- wait.add(mainLine.transition().attr('transform', transform));
- wait.add(mainArea.transition().attr('transform', transform));
- wait.add(mainCircle.transition().attr('transform', transform));
- wait.add(mainText.transition().attr('transform', transform));
- wait.add(mainRegion.filter($$.isRegionOnX).transition().attr('transform', transform));
- wait.add(xgrid.transition().attr('transform', transform));
- wait.add(xgridLines.transition().attr('transform', transform));
- }).call(wait, function () {
- var i,
- shapes = [],
- texts = [],
- eventRects = [];
-
- // remove flowed elements
- if (flowLength) {
- for (i = 0; i < flowLength; i++) {
- shapes.push('.' + CLASS.shape + '-' + (flowIndex + i));
- texts.push('.' + CLASS.text + '-' + (flowIndex + i));
- eventRects.push('.' + CLASS.eventRect + '-' + (flowIndex + i));
- }
- $$.svg.selectAll('.' + CLASS.shapes).selectAll(shapes).remove();
- $$.svg.selectAll('.' + CLASS.texts).selectAll(texts).remove();
- $$.svg.selectAll('.' + CLASS.eventRects).selectAll(eventRects).remove();
- $$.svg.select('.' + CLASS.xgrid).remove();
- }
-
- // draw again for removing flowed elements and reverting attr
- xgrid.attr('transform', null).attr($$.xgridAttr);
- xgridLines.attr('transform', null);
- xgridLines.select('line').attr("x1", config.axis_rotated ? 0 : xv).attr("x2", config.axis_rotated ? $$.width : xv);
- xgridLines.select('text').attr("x", config.axis_rotated ? $$.width : 0).attr("y", xv);
- mainBar.attr('transform', null).attr("d", drawBar);
- mainLine.attr('transform', null).attr("d", drawLine);
- mainArea.attr('transform', null).attr("d", drawArea);
- mainCircle.attr('transform', null).attr("cx", cx).attr("cy", cy);
- mainText.attr('transform', null).attr('x', xForText).attr('y', yForText).style('fill-opacity', $$.opacityForText.bind($$));
- mainRegion.attr('transform', null);
- mainRegion.select('rect').filter($$.isRegionOnX).attr("x", $$.regionX.bind($$)).attr("width", $$.regionWidth.bind($$));
-
- if (config.interaction_enabled) {
- $$.redrawEventRect();
- }
-
- // callback for end of flow
- done();
-
- $$.flowing = false;
- });
- };
-};
-
-c3_chart_fn.focus = function (targetIds) {
- var $$ = this.internal,
- candidates;
-
- targetIds = $$.mapToTargetIds(targetIds);
- candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))), this.revert();
- this.defocus();
- candidates.classed(CLASS.focused, true).classed(CLASS.defocused, false);
- if ($$.hasArcType()) {
- $$.expandArc(targetIds);
- }
- $$.toggleFocusLegend(targetIds, true);
-
- $$.focusedTargetIds = targetIds;
- $$.defocusedTargetIds = $$.defocusedTargetIds.filter(function (id) {
- return targetIds.indexOf(id) < 0;
- });
-};
-
-c3_chart_fn.defocus = function (targetIds) {
- var $$ = this.internal,
- candidates;
-
- targetIds = $$.mapToTargetIds(targetIds);
- candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))), candidates.classed(CLASS.focused, false).classed(CLASS.defocused, true);
- if ($$.hasArcType()) {
- $$.unexpandArc(targetIds);
- }
- $$.toggleFocusLegend(targetIds, false);
-
- $$.focusedTargetIds = $$.focusedTargetIds.filter(function (id) {
- return targetIds.indexOf(id) < 0;
- });
- $$.defocusedTargetIds = targetIds;
-};
-
-c3_chart_fn.revert = function (targetIds) {
- var $$ = this.internal,
- candidates;
-
- targetIds = $$.mapToTargetIds(targetIds);
- candidates = $$.svg.selectAll($$.selectorTargets(targetIds)); // should be for all targets
-
- candidates.classed(CLASS.focused, false).classed(CLASS.defocused, false);
- if ($$.hasArcType()) {
- $$.unexpandArc(targetIds);
- }
- if ($$.config.legend_show) {
- $$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));
- $$.legend.selectAll($$.selectorLegends(targetIds)).filter(function () {
- return $$.d3.select(this).classed(CLASS.legendItemFocused);
- }).classed(CLASS.legendItemFocused, false);
- }
-
- $$.focusedTargetIds = [];
- $$.defocusedTargetIds = [];
-};
-
-c3_chart_fn.xgrids = function (grids) {
- var $$ = this.internal,
- config = $$.config;
- if (!grids) {
- return config.grid_x_lines;
- }
- config.grid_x_lines = grids;
- $$.redrawWithoutRescale();
- return config.grid_x_lines;
-};
-c3_chart_fn.xgrids.add = function (grids) {
- var $$ = this.internal;
- return this.xgrids($$.config.grid_x_lines.concat(grids ? grids : []));
-};
-c3_chart_fn.xgrids.remove = function (params) {
- // TODO: multiple
- var $$ = this.internal;
- $$.removeGridLines(params, true);
-};
-
-c3_chart_fn.ygrids = function (grids) {
- var $$ = this.internal,
- config = $$.config;
- if (!grids) {
- return config.grid_y_lines;
- }
- config.grid_y_lines = grids;
- $$.redrawWithoutRescale();
- return config.grid_y_lines;
-};
-c3_chart_fn.ygrids.add = function (grids) {
- var $$ = this.internal;
- return this.ygrids($$.config.grid_y_lines.concat(grids ? grids : []));
-};
-c3_chart_fn.ygrids.remove = function (params) {
- // TODO: multiple
- var $$ = this.internal;
- $$.removeGridLines(params, false);
-};
-
-c3_chart_fn.groups = function (groups) {
- var $$ = this.internal,
- config = $$.config;
- if (isUndefined(groups)) {
- return config.data_groups;
- }
- config.data_groups = groups;
- $$.redraw();
- return config.data_groups;
-};
-
-c3_chart_fn.legend = function () {};
-c3_chart_fn.legend.show = function (targetIds) {
- var $$ = this.internal;
- $$.showLegend($$.mapToTargetIds(targetIds));
- $$.updateAndRedraw({ withLegend: true });
-};
-c3_chart_fn.legend.hide = function (targetIds) {
- var $$ = this.internal;
- $$.hideLegend($$.mapToTargetIds(targetIds));
- $$.updateAndRedraw({ withLegend: true });
-};
-
-c3_chart_fn.load = function (args) {
- var $$ = this.internal,
- config = $$.config;
- // update xs if specified
- if (args.xs) {
- $$.addXs(args.xs);
- }
- // update names if exists
- if ('names' in args) {
- c3_chart_fn.data.names.bind(this)(args.names);
- }
- // update classes if exists
- if ('classes' in args) {
- Object.keys(args.classes).forEach(function (id) {
- config.data_classes[id] = args.classes[id];
- });
- }
- // update categories if exists
- if ('categories' in args && $$.isCategorized()) {
- config.axis_x_categories = args.categories;
- }
- // update axes if exists
- if ('axes' in args) {
- Object.keys(args.axes).forEach(function (id) {
- config.data_axes[id] = args.axes[id];
- });
- }
- // update colors if exists
- if ('colors' in args) {
- Object.keys(args.colors).forEach(function (id) {
- config.data_colors[id] = args.colors[id];
- });
- }
- // use cache if exists
- if ('cacheIds' in args && $$.hasCaches(args.cacheIds)) {
- $$.load($$.getCaches(args.cacheIds), args.done);
- return;
- }
- // unload if needed
- if ('unload' in args) {
- // TODO: do not unload if target will load (included in url/rows/columns)
- $$.unload($$.mapToTargetIds(typeof args.unload === 'boolean' && args.unload ? null : args.unload), function () {
- $$.loadFromArgs(args);
- });
- } else {
- $$.loadFromArgs(args);
- }
-};
-
-c3_chart_fn.unload = function (args) {
- var $$ = this.internal;
- args = args || {};
- if (args instanceof Array) {
- args = { ids: args };
- } else if (typeof args === 'string') {
- args = { ids: [args] };
- }
- $$.unload($$.mapToTargetIds(args.ids), function () {
- $$.redraw({ withUpdateOrgXDomain: true, withUpdateXDomain: true, withLegend: true });
- if (args.done) {
- args.done();
- }
- });
-};
-
-c3_chart_fn.regions = function (regions) {
- var $$ = this.internal,
- config = $$.config;
- if (!regions) {
- return config.regions;
- }
- config.regions = regions;
- $$.redrawWithoutRescale();
- return config.regions;
-};
-c3_chart_fn.regions.add = function (regions) {
- var $$ = this.internal,
- config = $$.config;
- if (!regions) {
- return config.regions;
- }
- config.regions = config.regions.concat(regions);
- $$.redrawWithoutRescale();
- return config.regions;
-};
-c3_chart_fn.regions.remove = function (options) {
- var $$ = this.internal,
- config = $$.config,
- duration,
- classes,
- regions;
-
- options = options || {};
- duration = $$.getOption(options, "duration", config.transition_duration);
- classes = $$.getOption(options, "classes", [CLASS.region]);
-
- regions = $$.main.select('.' + CLASS.regions).selectAll(classes.map(function (c) {
- return '.' + c;
- }));
- (duration ? regions.transition().duration(duration) : regions).style('opacity', 0).remove();
-
- config.regions = config.regions.filter(function (region) {
- var found = false;
- if (!region['class']) {
- return true;
- }
- region['class'].split(' ').forEach(function (c) {
- if (classes.indexOf(c) >= 0) {
- found = true;
- }
- });
- return !found;
- });
-
- return config.regions;
-};
-
-c3_chart_fn.selected = function (targetId) {
- var $$ = this.internal,
- d3 = $$.d3;
- return d3.merge($$.main.selectAll('.' + CLASS.shapes + $$.getTargetSelectorSuffix(targetId)).selectAll('.' + CLASS.shape).filter(function () {
- return d3.select(this).classed(CLASS.SELECTED);
- }).map(function (d) {
- return d.map(function (d) {
- var data = d.__data__;return data.data ? data.data : data;
- });
- }));
-};
-c3_chart_fn.select = function (ids, indices, resetOther) {
- var $$ = this.internal,
- d3 = $$.d3,
- config = $$.config;
- if (!config.data_selection_enabled) {
- return;
- }
- $$.main.selectAll('.' + CLASS.shapes).selectAll('.' + CLASS.shape).each(function (d, i) {
- var shape = d3.select(this),
- id = d.data ? d.data.id : d.id,
- toggle = $$.getToggle(this, d).bind($$),
- isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,
- isTargetIndex = !indices || indices.indexOf(i) >= 0,
- isSelected = shape.classed(CLASS.SELECTED);
- // line/area selection not supported yet
- if (shape.classed(CLASS.line) || shape.classed(CLASS.area)) {
- return;
- }
- if (isTargetId && isTargetIndex) {
- if (config.data_selection_isselectable(d) && !isSelected) {
- toggle(true, shape.classed(CLASS.SELECTED, true), d, i);
- }
- } else if (isDefined(resetOther) && resetOther) {
- if (isSelected) {
- toggle(false, shape.classed(CLASS.SELECTED, false), d, i);
- }
- }
- });
-};
-c3_chart_fn.unselect = function (ids, indices) {
- var $$ = this.internal,
- d3 = $$.d3,
- config = $$.config;
- if (!config.data_selection_enabled) {
- return;
- }
- $$.main.selectAll('.' + CLASS.shapes).selectAll('.' + CLASS.shape).each(function (d, i) {
- var shape = d3.select(this),
- id = d.data ? d.data.id : d.id,
- toggle = $$.getToggle(this, d).bind($$),
- isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,
- isTargetIndex = !indices || indices.indexOf(i) >= 0,
- isSelected = shape.classed(CLASS.SELECTED);
- // line/area selection not supported yet
- if (shape.classed(CLASS.line) || shape.classed(CLASS.area)) {
- return;
- }
- if (isTargetId && isTargetIndex) {
- if (config.data_selection_isselectable(d)) {
- if (isSelected) {
- toggle(false, shape.classed(CLASS.SELECTED, false), d, i);
- }
- }
- }
- });
-};
-
-c3_chart_fn.show = function (targetIds, options) {
- var $$ = this.internal,
- targets;
-
- targetIds = $$.mapToTargetIds(targetIds);
- options = options || {};
-
- $$.removeHiddenTargetIds(targetIds);
- targets = $$.svg.selectAll($$.selectorTargets(targetIds));
-
- targets.transition().style('opacity', 1, 'important').call($$.endall, function () {
- targets.style('opacity', null).style('opacity', 1);
- });
-
- if (options.withLegend) {
- $$.showLegend(targetIds);
- }
-
- $$.redraw({ withUpdateOrgXDomain: true, withUpdateXDomain: true, withLegend: true });
-};
-
-c3_chart_fn.hide = function (targetIds, options) {
- var $$ = this.internal,
- targets;
-
- targetIds = $$.mapToTargetIds(targetIds);
- options = options || {};
-
- $$.addHiddenTargetIds(targetIds);
- targets = $$.svg.selectAll($$.selectorTargets(targetIds));
-
- targets.transition().style('opacity', 0, 'important').call($$.endall, function () {
- targets.style('opacity', null).style('opacity', 0);
- });
-
- if (options.withLegend) {
- $$.hideLegend(targetIds);
- }
-
- $$.redraw({ withUpdateOrgXDomain: true, withUpdateXDomain: true, withLegend: true });
-};
-
-c3_chart_fn.toggle = function (targetIds, options) {
- var that = this,
- $$ = this.internal;
- $$.mapToTargetIds(targetIds).forEach(function (targetId) {
- $$.isTargetToShow(targetId) ? that.hide(targetId, options) : that.show(targetId, options);
- });
-};
-
-c3_chart_fn.tooltip = function () {};
-c3_chart_fn.tooltip.show = function (args) {
- var $$ = this.internal,
- index,
- mouse;
-
- // determine mouse position on the chart
- if (args.mouse) {
- mouse = args.mouse;
- }
-
- // determine focus data
- if (args.data) {
- if ($$.isMultipleX()) {
- // if multiple xs, target point will be determined by mouse
- mouse = [$$.x(args.data.x), $$.getYScale(args.data.id)(args.data.value)];
- index = null;
- } else {
- // TODO: when tooltip_grouped = false
- index = isValue(args.data.index) ? args.data.index : $$.getIndexByX(args.data.x);
- }
- } else if (typeof args.x !== 'undefined') {
- index = $$.getIndexByX(args.x);
- } else if (typeof args.index !== 'undefined') {
- index = args.index;
- }
-
- // emulate mouse events to show
- $$.dispatchEvent('mouseover', index, mouse);
- $$.dispatchEvent('mousemove', index, mouse);
-
- $$.config.tooltip_onshow.call($$, args.data);
-};
-c3_chart_fn.tooltip.hide = function () {
- // TODO: get target data by checking the state of focus
- this.internal.dispatchEvent('mouseout', 0);
-
- this.internal.config.tooltip_onhide.call(this);
-};
-
-c3_chart_fn.transform = function (type, targetIds) {
- var $$ = this.internal,
- options = ['pie', 'donut'].indexOf(type) >= 0 ? { withTransform: true } : null;
- $$.transformTo(targetIds, type, options);
-};
-
-c3_chart_internal_fn.transformTo = function (targetIds, type, optionsForRedraw) {
- var $$ = this,
- withTransitionForAxis = !$$.hasArcType(),
- options = optionsForRedraw || { withTransitionForAxis: withTransitionForAxis };
- options.withTransitionForTransform = false;
- $$.transiting = false;
- $$.setTargetType(targetIds, type);
- $$.updateTargets($$.data.targets); // this is needed when transforming to arc
- $$.updateAndRedraw(options);
-};
-
-c3_chart_fn.x = function (x) {
- var $$ = this.internal;
- if (arguments.length) {
- $$.updateTargetX($$.data.targets, x);
- $$.redraw({ withUpdateOrgXDomain: true, withUpdateXDomain: true });
- }
- return $$.data.xs;
-};
-c3_chart_fn.xs = function (xs) {
- var $$ = this.internal;
- if (arguments.length) {
- $$.updateTargetXs($$.data.targets, xs);
- $$.redraw({ withUpdateOrgXDomain: true, withUpdateXDomain: true });
- }
- return $$.data.xs;
-};
-
-c3_chart_fn.zoom = function (domain) {
- var $$ = this.internal;
- if (domain) {
- if ($$.isTimeSeries()) {
- domain = domain.map(function (x) {
- return $$.parseDate(x);
- });
- }
- $$.brush.extent(domain);
- $$.redraw({ withUpdateXDomain: true, withY: $$.config.zoom_rescale });
- $$.config.zoom_onzoom.call(this, $$.x.orgDomain());
- }
- return $$.brush.extent();
-};
-c3_chart_fn.zoom.enable = function (enabled) {
- var $$ = this.internal;
- $$.config.zoom_enabled = enabled;
- $$.updateAndRedraw();
-};
-c3_chart_fn.unzoom = function () {
- var $$ = this.internal;
- $$.brush.clear().update();
- $$.redraw({ withUpdateXDomain: true });
-};
-
-c3_chart_fn.zoom.max = function (max) {
- var $$ = this.internal,
- config = $$.config,
- d3 = $$.d3;
- if (max === 0 || max) {
- config.zoom_x_max = d3.max([$$.orgXDomain[1], max]);
- } else {
- return config.zoom_x_max;
- }
-};
-
-c3_chart_fn.zoom.min = function (min) {
- var $$ = this.internal,
- config = $$.config,
- d3 = $$.d3;
- if (min === 0 || min) {
- config.zoom_x_min = d3.min([$$.orgXDomain[0], min]);
- } else {
- return config.zoom_x_min;
- }
-};
-
-c3_chart_fn.zoom.range = function (range) {
- if (arguments.length) {
- if (isDefined(range.max)) {
- this.domain.max(range.max);
- }
- if (isDefined(range.min)) {
- this.domain.min(range.min);
- }
- } else {
- return {
- max: this.domain.max(),
- min: this.domain.min()
- };
- }
-};
-
-c3_chart_internal_fn.initPie = function () {
- var $$ = this,
- d3 = $$.d3;
- $$.pie = d3.layout.pie().value(function (d) {
- return d.values.reduce(function (a, b) {
- return a + b.value;
- }, 0);
- });
- $$.pie.sort($$.getOrderFunction() || null);
-};
-
-c3_chart_internal_fn.updateRadius = function () {
- var $$ = this,
- config = $$.config,
- w = config.gauge_width || config.donut_width;
- $$.radiusExpanded = Math.min($$.arcWidth, $$.arcHeight) / 2;
- $$.radius = $$.radiusExpanded * 0.95;
- $$.innerRadiusRatio = w ? ($$.radius - w) / $$.radius : 0.6;
- $$.innerRadius = $$.hasType('donut') || $$.hasType('gauge') ? $$.radius * $$.innerRadiusRatio : 0;
-};
-
-c3_chart_internal_fn.updateArc = function () {
- var $$ = this;
- $$.svgArc = $$.getSvgArc();
- $$.svgArcExpanded = $$.getSvgArcExpanded();
- $$.svgArcExpandedSub = $$.getSvgArcExpanded(0.98);
-};
-
-c3_chart_internal_fn.updateAngle = function (d) {
- var $$ = this,
- config = $$.config,
- found = false,
- index = 0,
- gMin,
- gMax,
- gTic,
- gValue;
-
- if (!config) {
- return null;
- }
-
- $$.pie($$.filterTargetsToShow($$.data.targets)).forEach(function (t) {
- if (!found && t.data.id === d.data.id) {
- found = true;
- d = t;
- d.index = index;
- }
- index++;
- });
- if (isNaN(d.startAngle)) {
- d.startAngle = 0;
- }
- if (isNaN(d.endAngle)) {
- d.endAngle = d.startAngle;
- }
- if ($$.isGaugeType(d.data)) {
- gMin = config.gauge_min;
- gMax = config.gauge_max;
- gTic = Math.PI * (config.gauge_fullCircle ? 2 : 1) / (gMax - gMin);
- gValue = d.value < gMin ? 0 : d.value < gMax ? d.value - gMin : gMax - gMin;
- d.startAngle = config.gauge_startingAngle;
- d.endAngle = d.startAngle + gTic * gValue;
- }
- return found ? d : null;
-};
-
-c3_chart_internal_fn.getSvgArc = function () {
- var $$ = this,
- arc = $$.d3.svg.arc().outerRadius($$.radius).innerRadius($$.innerRadius),
- newArc = function newArc(d, withoutUpdate) {
- var updated;
- if (withoutUpdate) {
- return arc(d);
- } // for interpolate
- updated = $$.updateAngle(d);
- return updated ? arc(updated) : "M 0 0";
- };
- // TODO: extends all function
- newArc.centroid = arc.centroid;
- return newArc;
-};
-
-c3_chart_internal_fn.getSvgArcExpanded = function (rate) {
- var $$ = this,
- arc = $$.d3.svg.arc().outerRadius($$.radiusExpanded * (rate ? rate : 1)).innerRadius($$.innerRadius);
- return function (d) {
- var updated = $$.updateAngle(d);
- return updated ? arc(updated) : "M 0 0";
- };
-};
-
-c3_chart_internal_fn.getArc = function (d, withoutUpdate, force) {
- return force || this.isArcType(d.data) ? this.svgArc(d, withoutUpdate) : "M 0 0";
-};
-
-c3_chart_internal_fn.transformForArcLabel = function (d) {
- var $$ = this,
- config = $$.config,
- updated = $$.updateAngle(d),
- c,
- x,
- y,
- h,
- ratio,
- translate = "";
- if (updated && !$$.hasType('gauge')) {
- c = this.svgArc.centroid(updated);
- x = isNaN(c[0]) ? 0 : c[0];
- y = isNaN(c[1]) ? 0 : c[1];
- h = Math.sqrt(x * x + y * y);
- if ($$.hasType('donut') && config.donut_label_ratio) {
- ratio = isFunction(config.donut_label_ratio) ? config.donut_label_ratio(d, $$.radius, h) : config.donut_label_ratio;
- } else if ($$.hasType('pie') && config.pie_label_ratio) {
- ratio = isFunction(config.pie_label_ratio) ? config.pie_label_ratio(d, $$.radius, h) : config.pie_label_ratio;
- } else {
- ratio = $$.radius && h ? (36 / $$.radius > 0.375 ? 1.175 - 36 / $$.radius : 0.8) * $$.radius / h : 0;
- }
- translate = "translate(" + x * ratio + ',' + y * ratio + ")";
- }
- return translate;
-};
-
-c3_chart_internal_fn.getArcRatio = function (d) {
- var $$ = this,
- config = $$.config,
- whole = Math.PI * ($$.hasType('gauge') && !config.gauge_fullCircle ? 1 : 2);
- return d ? (d.endAngle - d.startAngle) / whole : null;
-};
-
-c3_chart_internal_fn.convertToArcData = function (d) {
- return this.addName({
- id: d.data.id,
- value: d.value,
- ratio: this.getArcRatio(d),
- index: d.index
- });
-};
-
-c3_chart_internal_fn.textForArcLabel = function (d) {
- var $$ = this,
- updated,
- value,
- ratio,
- id,
- format;
- if (!$$.shouldShowArcLabel()) {
- return "";
- }
- updated = $$.updateAngle(d);
- value = updated ? updated.value : null;
- ratio = $$.getArcRatio(updated);
- id = d.data.id;
- if (!$$.hasType('gauge') && !$$.meetsArcLabelThreshold(ratio)) {
- return "";
- }
- format = $$.getArcLabelFormat();
- return format ? format(value, ratio, id) : $$.defaultArcValueFormat(value, ratio);
-};
-
-c3_chart_internal_fn.textForGaugeMinMax = function (value, isMax) {
- var $$ = this,
- format = $$.getGaugeLabelExtents();
-
- return format ? format(value, isMax) : value;
-};
-
-c3_chart_internal_fn.expandArc = function (targetIds) {
- var $$ = this,
- interval;
-
- // MEMO: avoid to cancel transition
- if ($$.transiting) {
- interval = window.setInterval(function () {
- if (!$$.transiting) {
- window.clearInterval(interval);
- if ($$.legend.selectAll('.c3-legend-item-focused').size() > 0) {
- $$.expandArc(targetIds);
- }
- }
- }, 10);
- return;
- }
-
- targetIds = $$.mapToTargetIds(targetIds);
-
- $$.svg.selectAll($$.selectorTargets(targetIds, '.' + CLASS.chartArc)).each(function (d) {
- if (!$$.shouldExpand(d.data.id)) {
- return;
- }
- $$.d3.select(this).selectAll('path').transition().duration($$.expandDuration(d.data.id)).attr("d", $$.svgArcExpanded).transition().duration($$.expandDuration(d.data.id) * 2).attr("d", $$.svgArcExpandedSub).each(function (d) {
- if ($$.isDonutType(d.data)) {
- // callback here
- }
- });
- });
-};
-
-c3_chart_internal_fn.unexpandArc = function (targetIds) {
- var $$ = this;
-
- if ($$.transiting) {
- return;
- }
-
- targetIds = $$.mapToTargetIds(targetIds);
-
- $$.svg.selectAll($$.selectorTargets(targetIds, '.' + CLASS.chartArc)).selectAll('path').transition().duration(function (d) {
- return $$.expandDuration(d.data.id);
- }).attr("d", $$.svgArc);
- $$.svg.selectAll('.' + CLASS.arc);
-};
-
-c3_chart_internal_fn.expandDuration = function (id) {
- var $$ = this,
- config = $$.config;
-
- if ($$.isDonutType(id)) {
- return config.donut_expand_duration;
- } else if ($$.isGaugeType(id)) {
- return config.gauge_expand_duration;
- } else if ($$.isPieType(id)) {
- return config.pie_expand_duration;
- } else {
- return 50;
- }
-};
-
-c3_chart_internal_fn.shouldExpand = function (id) {
- var $$ = this,
- config = $$.config;
- return $$.isDonutType(id) && config.donut_expand || $$.isGaugeType(id) && config.gauge_expand || $$.isPieType(id) && config.pie_expand;
-};
-
-c3_chart_internal_fn.shouldShowArcLabel = function () {
- var $$ = this,
- config = $$.config,
- shouldShow = true;
- if ($$.hasType('donut')) {
- shouldShow = config.donut_label_show;
- } else if ($$.hasType('pie')) {
- shouldShow = config.pie_label_show;
- }
- // when gauge, always true
- return shouldShow;
-};
-
-c3_chart_internal_fn.meetsArcLabelThreshold = function (ratio) {
- var $$ = this,
- config = $$.config,
- threshold = $$.hasType('donut') ? config.donut_label_threshold : config.pie_label_threshold;
- return ratio >= threshold;
-};
-
-c3_chart_internal_fn.getArcLabelFormat = function () {
- var $$ = this,
- config = $$.config,
- format = config.pie_label_format;
- if ($$.hasType('gauge')) {
- format = config.gauge_label_format;
- } else if ($$.hasType('donut')) {
- format = config.donut_label_format;
- }
- return format;
-};
-
-c3_chart_internal_fn.getGaugeLabelExtents = function () {
- var $$ = this,
- config = $$.config;
- return config.gauge_label_extents;
-};
-
-c3_chart_internal_fn.getArcTitle = function () {
- var $$ = this;
- return $$.hasType('donut') ? $$.config.donut_title : "";
-};
-
-c3_chart_internal_fn.updateTargetsForArc = function (targets) {
- var $$ = this,
- main = $$.main,
- mainPieUpdate,
- mainPieEnter,
- classChartArc = $$.classChartArc.bind($$),
- classArcs = $$.classArcs.bind($$),
- classFocus = $$.classFocus.bind($$);
- mainPieUpdate = main.select('.' + CLASS.chartArcs).selectAll('.' + CLASS.chartArc).data($$.pie(targets)).attr("class", function (d) {
- return classChartArc(d) + classFocus(d.data);
- });
- mainPieEnter = mainPieUpdate.enter().append("g").attr("class", classChartArc);
- mainPieEnter.append('g').attr('class', classArcs);
- mainPieEnter.append("text").attr("dy", $$.hasType('gauge') ? "-.1em" : ".35em").style("opacity", 0).style("text-anchor", "middle").style("pointer-events", "none");
- // MEMO: can not keep same color..., but not bad to update color in redraw
- //mainPieUpdate.exit().remove();
-};
-
-c3_chart_internal_fn.initArc = function () {
- var $$ = this;
- $$.arcs = $$.main.select('.' + CLASS.chart).append("g").attr("class", CLASS.chartArcs).attr("transform", $$.getTranslate('arc'));
- $$.arcs.append('text').attr('class', CLASS.chartArcsTitle).style("text-anchor", "middle").text($$.getArcTitle());
-};
-
-c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransform) {
- var $$ = this,
- d3 = $$.d3,
- config = $$.config,
- main = $$.main,
- mainArc;
- mainArc = main.selectAll('.' + CLASS.arcs).selectAll('.' + CLASS.arc).data($$.arcData.bind($$));
- mainArc.enter().append('path').attr("class", $$.classArc.bind($$)).style("fill", function (d) {
- return $$.color(d.data);
- }).style("cursor", function (d) {
- return config.interaction_enabled && config.data_selection_isselectable(d) ? "pointer" : null;
- }).each(function (d) {
- if ($$.isGaugeType(d.data)) {
- d.startAngle = d.endAngle = config.gauge_startingAngle;
- }
- this._current = d;
- });
- mainArc.attr("transform", function (d) {
- return !$$.isGaugeType(d.data) && withTransform ? "scale(0)" : "";
- }).on('mouseover', config.interaction_enabled ? function (d) {
- var updated, arcData;
- if ($$.transiting) {
- // skip while transiting
- return;
- }
- updated = $$.updateAngle(d);
- if (updated) {
- arcData = $$.convertToArcData(updated);
- // transitions
- $$.expandArc(updated.data.id);
- $$.api.focus(updated.data.id);
- $$.toggleFocusLegend(updated.data.id, true);
- $$.config.data_onmouseover(arcData, this);
- }
- } : null).on('mousemove', config.interaction_enabled ? function (d) {
- var updated = $$.updateAngle(d),
- arcData,
- selectedData;
- if (updated) {
- arcData = $$.convertToArcData(updated), selectedData = [arcData];
- $$.showTooltip(selectedData, this);
- }
- } : null).on('mouseout', config.interaction_enabled ? function (d) {
- var updated, arcData;
- if ($$.transiting) {
- // skip while transiting
- return;
- }
- updated = $$.updateAngle(d);
- if (updated) {
- arcData = $$.convertToArcData(updated);
- // transitions
- $$.unexpandArc(updated.data.id);
- $$.api.revert();
- $$.revertLegend();
- $$.hideTooltip();
- $$.config.data_onmouseout(arcData, this);
- }
- } : null).on('click', config.interaction_enabled ? function (d, i) {
- var updated = $$.updateAngle(d),
- arcData;
- if (updated) {
- arcData = $$.convertToArcData(updated);
- if ($$.toggleShape) {
- $$.toggleShape(this, arcData, i);
- }
- $$.config.data_onclick.call($$.api, arcData, this);
- }
- } : null).each(function () {
- $$.transiting = true;
- }).transition().duration(duration).attrTween("d", function (d) {
- var updated = $$.updateAngle(d),
- interpolate;
- if (!updated) {
- return function () {
- return "M 0 0";
- };
- }
- // if (this._current === d) {
- // this._current = {
- // startAngle: Math.PI*2,
- // endAngle: Math.PI*2,
- // };
- // }
- if (isNaN(this._current.startAngle)) {
- this._current.startAngle = 0;
- }
- if (isNaN(this._current.endAngle)) {
- this._current.endAngle = this._current.startAngle;
- }
- interpolate = d3.interpolate(this._current, updated);
- this._current = interpolate(0);
- return function (t) {
- var interpolated = interpolate(t);
- interpolated.data = d.data; // data.id will be updated by interporator
- return $$.getArc(interpolated, true);
- };
- }).attr("transform", withTransform ? "scale(1)" : "").style("fill", function (d) {
- return $$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data.id);
- } // Where gauge reading color would receive customization.
- ).call($$.endall, function () {
- $$.transiting = false;
- });
- mainArc.exit().transition().duration(durationForExit).style('opacity', 0).remove();
- main.selectAll('.' + CLASS.chartArc).select('text').style("opacity", 0).attr('class', function (d) {
- return $$.isGaugeType(d.data) ? CLASS.gaugeValue : '';
- }).text($$.textForArcLabel.bind($$)).attr("transform", $$.transformForArcLabel.bind($$)).style('font-size', function (d) {
- return $$.isGaugeType(d.data) ? Math.round($$.radius / 5) + 'px' : '';
- }).transition().duration(duration).style("opacity", function (d) {
- return $$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? 1 : 0;
- });
- main.select('.' + CLASS.chartArcsTitle).style("opacity", $$.hasType('donut') || $$.hasType('gauge') ? 1 : 0);
-
- if ($$.hasType('gauge')) {
- $$.arcs.select('.' + CLASS.chartArcsBackground).attr("d", function () {
- var d = {
- data: [{ value: config.gauge_max }],
- startAngle: config.gauge_startingAngle,
- endAngle: -1 * config.gauge_startingAngle
- };
- return $$.getArc(d, true, true);
- });
- $$.arcs.select('.' + CLASS.chartArcsGaugeUnit).attr("dy", ".75em").text(config.gauge_label_show ? config.gauge_units : '');
- $$.arcs.select('.' + CLASS.chartArcsGaugeMin).attr("dx", -1 * ($$.innerRadius + ($$.radius - $$.innerRadius) / (config.gauge_fullCircle ? 1 : 2)) + "px").attr("dy", "1.2em").text(config.gauge_label_show ? $$.textForGaugeMinMax(config.gauge_min, false) : '');
- $$.arcs.select('.' + CLASS.chartArcsGaugeMax).attr("dx", $$.innerRadius + ($$.radius - $$.innerRadius) / (config.gauge_fullCircle ? 1 : 2) + "px").attr("dy", "1.2em").text(config.gauge_label_show ? $$.textForGaugeMinMax(config.gauge_max, true) : '');
- }
-};
-c3_chart_internal_fn.initGauge = function () {
- var arcs = this.arcs;
- if (this.hasType('gauge')) {
- arcs.append('path').attr("class", CLASS.chartArcsBackground);
- arcs.append("text").attr("class", CLASS.chartArcsGaugeUnit).style("text-anchor", "middle").style("pointer-events", "none");
- arcs.append("text").attr("class", CLASS.chartArcsGaugeMin).style("text-anchor", "middle").style("pointer-events", "none");
- arcs.append("text").attr("class", CLASS.chartArcsGaugeMax).style("text-anchor", "middle").style("pointer-events", "none");
- }
-};
-c3_chart_internal_fn.getGaugeLabelHeight = function () {
- return this.config.gauge_label_show ? 20 : 0;
-};
-
-c3_chart_internal_fn.hasCaches = function (ids) {
- for (var i = 0; i < ids.length; i++) {
- if (!(ids[i] in this.cache)) {
- return false;
- }
- }
- return true;
-};
-c3_chart_internal_fn.addCache = function (id, target) {
- this.cache[id] = this.cloneTarget(target);
-};
-c3_chart_internal_fn.getCaches = function (ids) {
- var targets = [],
- i;
- for (i = 0; i < ids.length; i++) {
- if (ids[i] in this.cache) {
- targets.push(this.cloneTarget(this.cache[ids[i]]));
- }
- }
- return targets;
-};
-
-c3_chart_internal_fn.categoryName = function (i) {
- var config = this.config;
- return i < config.axis_x_categories.length ? config.axis_x_categories[i] : i;
-};
-
-c3_chart_internal_fn.generateClass = function (prefix, targetId) {
- return " " + prefix + " " + prefix + this.getTargetSelectorSuffix(targetId);
-};
-c3_chart_internal_fn.classText = function (d) {
- return this.generateClass(CLASS.text, d.index);
-};
-c3_chart_internal_fn.classTexts = function (d) {
- return this.generateClass(CLASS.texts, d.id);
-};
-c3_chart_internal_fn.classShape = function (d) {
- return this.generateClass(CLASS.shape, d.index);
-};
-c3_chart_internal_fn.classShapes = function (d) {
- return this.generateClass(CLASS.shapes, d.id);
-};
-c3_chart_internal_fn.classLine = function (d) {
- return this.classShape(d) + this.generateClass(CLASS.line, d.id);
-};
-c3_chart_internal_fn.classLines = function (d) {
- return this.classShapes(d) + this.generateClass(CLASS.lines, d.id);
-};
-c3_chart_internal_fn.classCircle = function (d) {
- return this.classShape(d) + this.generateClass(CLASS.circle, d.index);
-};
-c3_chart_internal_fn.classCircles = function (d) {
- return this.classShapes(d) + this.generateClass(CLASS.circles, d.id);
-};
-c3_chart_internal_fn.classBar = function (d) {
- return this.classShape(d) + this.generateClass(CLASS.bar, d.index);
-};
-c3_chart_internal_fn.classBars = function (d) {
- return this.classShapes(d) + this.generateClass(CLASS.bars, d.id);
-};
-c3_chart_internal_fn.classArc = function (d) {
- return this.classShape(d.data) + this.generateClass(CLASS.arc, d.data.id);
-};
-c3_chart_internal_fn.classArcs = function (d) {
- return this.classShapes(d.data) + this.generateClass(CLASS.arcs, d.data.id);
-};
-c3_chart_internal_fn.classArea = function (d) {
- return this.classShape(d) + this.generateClass(CLASS.area, d.id);
-};
-c3_chart_internal_fn.classAreas = function (d) {
- return this.classShapes(d) + this.generateClass(CLASS.areas, d.id);
-};
-c3_chart_internal_fn.classRegion = function (d, i) {
- return this.generateClass(CLASS.region, i) + ' ' + ('class' in d ? d['class'] : '');
-};
-c3_chart_internal_fn.classEvent = function (d) {
- return this.generateClass(CLASS.eventRect, d.index);
-};
-c3_chart_internal_fn.classTarget = function (id) {
- var $$ = this;
- var additionalClassSuffix = $$.config.data_classes[id],
- additionalClass = '';
- if (additionalClassSuffix) {
- additionalClass = ' ' + CLASS.target + '-' + additionalClassSuffix;
- }
- return $$.generateClass(CLASS.target, id) + additionalClass;
-};
-c3_chart_internal_fn.classFocus = function (d) {
- return this.classFocused(d) + this.classDefocused(d);
-};
-c3_chart_internal_fn.classFocused = function (d) {
- return ' ' + (this.focusedTargetIds.indexOf(d.id) >= 0 ? CLASS.focused : '');
-};
-c3_chart_internal_fn.classDefocused = function (d) {
- return ' ' + (this.defocusedTargetIds.indexOf(d.id) >= 0 ? CLASS.defocused : '');
-};
-c3_chart_internal_fn.classChartText = function (d) {
- return CLASS.chartText + this.classTarget(d.id);
-};
-c3_chart_internal_fn.classChartLine = function (d) {
- return CLASS.chartLine + this.classTarget(d.id);
-};
-c3_chart_internal_fn.classChartBar = function (d) {
- return CLASS.chartBar + this.classTarget(d.id);
-};
-c3_chart_internal_fn.classChartArc = function (d) {
- return CLASS.chartArc + this.classTarget(d.data.id);
-};
-c3_chart_internal_fn.getTargetSelectorSuffix = function (targetId) {
- return targetId || targetId === 0 ? ('-' + targetId).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g, '-') : '';
-};
-c3_chart_internal_fn.selectorTarget = function (id, prefix) {
- return (prefix || '') + '.' + CLASS.target + this.getTargetSelectorSuffix(id);
-};
-c3_chart_internal_fn.selectorTargets = function (ids, prefix) {
- var $$ = this;
- ids = ids || [];
- return ids.length ? ids.map(function (id) {
- return $$.selectorTarget(id, prefix);
- }) : null;
-};
-c3_chart_internal_fn.selectorLegend = function (id) {
- return '.' + CLASS.legendItem + this.getTargetSelectorSuffix(id);
-};
-c3_chart_internal_fn.selectorLegends = function (ids) {
- var $$ = this;
- return ids && ids.length ? ids.map(function (id) {
- return $$.selectorLegend(id);
- }) : null;
-};
-
-c3_chart_internal_fn.getClipPath = function (id) {
- var isIE9 = window.navigator.appVersion.toLowerCase().indexOf("msie 9.") >= 0;
- return "url(" + (isIE9 ? "" : document.URL.split('#')[0]) + "#" + id + ")";
-};
-c3_chart_internal_fn.appendClip = function (parent, id) {
- return parent.append("clipPath").attr("id", id).append("rect");
-};
-c3_chart_internal_fn.getAxisClipX = function (forHorizontal) {
- // axis line width + padding for left
- var left = Math.max(30, this.margin.left);
- return forHorizontal ? -(1 + left) : -(left - 1);
-};
-c3_chart_internal_fn.getAxisClipY = function (forHorizontal) {
- return forHorizontal ? -20 : -this.margin.top;
-};
-c3_chart_internal_fn.getXAxisClipX = function () {
- var $$ = this;
- return $$.getAxisClipX(!$$.config.axis_rotated);
-};
-c3_chart_internal_fn.getXAxisClipY = function () {
- var $$ = this;
- return $$.getAxisClipY(!$$.config.axis_rotated);
-};
-c3_chart_internal_fn.getYAxisClipX = function () {
- var $$ = this;
- return $$.config.axis_y_inner ? -1 : $$.getAxisClipX($$.config.axis_rotated);
-};
-c3_chart_internal_fn.getYAxisClipY = function () {
- var $$ = this;
- return $$.getAxisClipY($$.config.axis_rotated);
-};
-c3_chart_internal_fn.getAxisClipWidth = function (forHorizontal) {
- var $$ = this,
- left = Math.max(30, $$.margin.left),
- right = Math.max(30, $$.margin.right);
- // width + axis line width + padding for left/right
- return forHorizontal ? $$.width + 2 + left + right : $$.margin.left + 20;
-};
-c3_chart_internal_fn.getAxisClipHeight = function (forHorizontal) {
- // less than 20 is not enough to show the axis label 'outer' without legend
- return (forHorizontal ? this.margin.bottom : this.margin.top + this.height) + 20;
-};
-c3_chart_internal_fn.getXAxisClipWidth = function () {
- var $$ = this;
- return $$.getAxisClipWidth(!$$.config.axis_rotated);
-};
-c3_chart_internal_fn.getXAxisClipHeight = function () {
- var $$ = this;
- return $$.getAxisClipHeight(!$$.config.axis_rotated);
-};
-c3_chart_internal_fn.getYAxisClipWidth = function () {
- var $$ = this;
- return $$.getAxisClipWidth($$.config.axis_rotated) + ($$.config.axis_y_inner ? 20 : 0);
-};
-c3_chart_internal_fn.getYAxisClipHeight = function () {
- var $$ = this;
- return $$.getAxisClipHeight($$.config.axis_rotated);
-};
-
-c3_chart_internal_fn.generateColor = function () {
- var $$ = this,
- config = $$.config,
- d3 = $$.d3,
- colors = config.data_colors,
- pattern = notEmpty(config.color_pattern) ? config.color_pattern : d3.scale.category10().range(),
- callback = config.data_color,
- ids = [];
-
- return function (d) {
- var id = d.id || d.data && d.data.id || d,
- color;
-
- // if callback function is provided
- if (colors[id] instanceof Function) {
- color = colors[id](d);
- }
- // if specified, choose that color
- else if (colors[id]) {
- color = colors[id];
- }
- // if not specified, choose from pattern
- else {
- if (ids.indexOf(id) < 0) {
- ids.push(id);
- }
- color = pattern[ids.indexOf(id) % pattern.length];
- colors[id] = color;
- }
- return callback instanceof Function ? callback(color, d) : color;
- };
-};
-c3_chart_internal_fn.generateLevelColor = function () {
- var $$ = this,
- config = $$.config,
- colors = config.color_pattern,
- threshold = config.color_threshold,
- asValue = threshold.unit === 'value',
- values = threshold.values && threshold.values.length ? threshold.values : [],
- max = threshold.max || 100;
- return notEmpty(config.color_threshold) ? function (value) {
- var i,
- v,
- color = colors[colors.length - 1];
- for (i = 0; i < values.length; i++) {
- v = asValue ? value : value * 100 / max;
- if (v < values[i]) {
- color = colors[i];
- break;
- }
- }
- return color;
- } : null;
-};
-
-c3_chart_internal_fn.getDefaultConfig = function () {
- var config = {
- bindto: '#chart',
- svg_classname: undefined,
- size_width: undefined,
- size_height: undefined,
- padding_left: undefined,
- padding_right: undefined,
- padding_top: undefined,
- padding_bottom: undefined,
- resize_auto: true,
- zoom_enabled: false,
- zoom_extent: undefined,
- zoom_privileged: false,
- zoom_rescale: false,
- zoom_onzoom: function zoom_onzoom() {},
- zoom_onzoomstart: function zoom_onzoomstart() {},
- zoom_onzoomend: function zoom_onzoomend() {},
- zoom_x_min: undefined,
- zoom_x_max: undefined,
- interaction_brighten: true,
- interaction_enabled: true,
- onmouseover: function onmouseover() {},
- onmouseout: function onmouseout() {},
- onresize: function onresize() {},
- onresized: function onresized() {},
- oninit: function oninit() {},
- onrendered: function onrendered() {},
- transition_duration: 350,
- data_x: undefined,
- data_xs: {},
- data_xFormat: '%Y-%m-%d',
- data_xLocaltime: true,
- data_xSort: true,
- data_idConverter: function data_idConverter(id) {
- return id;
- },
- data_names: {},
- data_classes: {},
- data_groups: [],
- data_axes: {},
- data_type: undefined,
- data_types: {},
- data_labels: {},
- data_order: 'desc',
- data_regions: {},
- data_color: undefined,
- data_colors: {},
- data_hide: false,
- data_filter: undefined,
- data_selection_enabled: false,
- data_selection_grouped: false,
- data_selection_isselectable: function data_selection_isselectable() {
- return true;
- },
- data_selection_multiple: true,
- data_selection_draggable: false,
- data_onclick: function data_onclick() {},
- data_onmouseover: function data_onmouseover() {},
- data_onmouseout: function data_onmouseout() {},
- data_onselected: function data_onselected() {},
- data_onunselected: function data_onunselected() {},
- data_url: undefined,
- data_headers: undefined,
- data_json: undefined,
- data_rows: undefined,
- data_columns: undefined,
- data_mimeType: undefined,
- data_keys: undefined,
- // configuration for no plot-able data supplied.
- data_empty_label_text: "",
- // subchart
- subchart_show: false,
- subchart_size_height: 60,
- subchart_axis_x_show: true,
- subchart_onbrush: function subchart_onbrush() {},
- // color
- color_pattern: [],
- color_threshold: {},
- // legend
- legend_show: true,
- legend_hide: false,
- legend_position: 'bottom',
- legend_inset_anchor: 'top-left',
- legend_inset_x: 10,
- legend_inset_y: 0,
- legend_inset_step: undefined,
- legend_item_onclick: undefined,
- legend_item_onmouseover: undefined,
- legend_item_onmouseout: undefined,
- legend_equally: false,
- legend_padding: 0,
- legend_item_tile_width: 10,
- legend_item_tile_height: 10,
- // axis
- axis_rotated: false,
- axis_x_show: true,
- axis_x_type: 'indexed',
- axis_x_localtime: true,
- axis_x_categories: [],
- axis_x_tick_centered: false,
- axis_x_tick_format: undefined,
- axis_x_tick_culling: {},
- axis_x_tick_culling_max: 10,
- axis_x_tick_count: undefined,
- axis_x_tick_fit: true,
- axis_x_tick_values: null,
- axis_x_tick_rotate: 0,
- axis_x_tick_outer: true,
- axis_x_tick_multiline: true,
- axis_x_tick_width: null,
- axis_x_max: undefined,
- axis_x_min: undefined,
- axis_x_padding: {},
- axis_x_height: undefined,
- axis_x_extent: undefined,
- axis_x_label: {},
- axis_y_show: true,
- axis_y_type: undefined,
- axis_y_max: undefined,
- axis_y_min: undefined,
- axis_y_inverted: false,
- axis_y_center: undefined,
- axis_y_inner: undefined,
- axis_y_label: {},
- axis_y_tick_format: undefined,
- axis_y_tick_outer: true,
- axis_y_tick_values: null,
- axis_y_tick_rotate: 0,
- axis_y_tick_count: undefined,
- axis_y_tick_time_value: undefined,
- axis_y_tick_time_interval: undefined,
- axis_y_padding: {},
- axis_y_default: undefined,
- axis_y2_show: false,
- axis_y2_max: undefined,
- axis_y2_min: undefined,
- axis_y2_inverted: false,
- axis_y2_center: undefined,
- axis_y2_inner: undefined,
- axis_y2_label: {},
- axis_y2_tick_format: undefined,
- axis_y2_tick_outer: true,
- axis_y2_tick_values: null,
- axis_y2_tick_count: undefined,
- axis_y2_padding: {},
- axis_y2_default: undefined,
- // grid
- grid_x_show: false,
- grid_x_type: 'tick',
- grid_x_lines: [],
- grid_y_show: false,
- // not used
- // grid_y_type: 'tick',
- grid_y_lines: [],
- grid_y_ticks: 10,
- grid_focus_show: true,
- grid_lines_front: true,
- // point - point of each data
- point_show: true,
- point_r: 2.5,
- point_sensitivity: 10,
- point_focus_expand_enabled: true,
- point_focus_expand_r: undefined,
- point_select_r: undefined,
- // line
- line_connectNull: false,
- line_step_type: 'step',
- // bar
- bar_width: undefined,
- bar_width_ratio: 0.6,
- bar_width_max: undefined,
- bar_zerobased: true,
- bar_space: 0,
- // area
- area_zerobased: true,
- area_above: false,
- // pie
- pie_label_show: true,
- pie_label_format: undefined,
- pie_label_threshold: 0.05,
- pie_label_ratio: undefined,
- pie_expand: {},
- pie_expand_duration: 50,
- // gauge
- gauge_fullCircle: false,
- gauge_label_show: true,
- gauge_label_format: undefined,
- gauge_min: 0,
- gauge_max: 100,
- gauge_startingAngle: -1 * Math.PI / 2,
- gauge_label_extents: undefined,
- gauge_units: undefined,
- gauge_width: undefined,
- gauge_expand: {},
- gauge_expand_duration: 50,
- // donut
- donut_label_show: true,
- donut_label_format: undefined,
- donut_label_threshold: 0.05,
- donut_label_ratio: undefined,
- donut_width: undefined,
- donut_title: "",
- donut_expand: {},
- donut_expand_duration: 50,
- // spline
- spline_interpolation_type: 'cardinal',
- // region - region to change style
- regions: [],
- // tooltip - show when mouseover on each data
- tooltip_show: true,
- tooltip_grouped: true,
- tooltip_order: undefined,
- tooltip_format_title: undefined,
- tooltip_format_name: undefined,
- tooltip_format_value: undefined,
- tooltip_position: undefined,
- tooltip_contents: function tooltip_contents(d, defaultTitleFormat, defaultValueFormat, color) {
- return this.getTooltipContent ? this.getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) : '';
- },
- tooltip_init_show: false,
- tooltip_init_x: 0,
- tooltip_init_position: { top: '0px', left: '50px' },
- tooltip_onshow: function tooltip_onshow() {},
- tooltip_onhide: function tooltip_onhide() {},
- // title
- title_text: undefined,
- title_padding: {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0
- },
- title_position: 'top-center'
- };
-
- Object.keys(this.additionalConfig).forEach(function (key) {
- config[key] = this.additionalConfig[key];
- }, this);
-
- return config;
-};
-c3_chart_internal_fn.additionalConfig = {};
-
-c3_chart_internal_fn.loadConfig = function (config) {
- var this_config = this.config,
- target,
- keys,
- read;
- function find() {
- var key = keys.shift();
- // console.log("key =>", key, ", target =>", target);
- if (key && target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && key in target) {
- target = target[key];
- return find();
- } else if (!key) {
- return target;
- } else {
- return undefined;
- }
- }
- Object.keys(this_config).forEach(function (key) {
- target = config;
- keys = key.split('_');
- read = find();
- // console.log("CONFIG : ", key, read);
- if (isDefined(read)) {
- this_config[key] = read;
- }
- });
-};
-
-c3_chart_internal_fn.convertUrlToData = function (url, mimeType, headers, keys, done) {
- var $$ = this,
- type = mimeType ? mimeType : 'csv';
- var req = $$.d3.xhr(url);
- if (headers) {
- Object.keys(headers).forEach(function (header) {
- req.header(header, headers[header]);
- });
- }
- req.get(function (error, data) {
- var d;
- var dataResponse = data.response || data.responseText; // Fixes IE9 XHR issue; see #1345
- if (!data) {
- throw new Error(error.responseURL + ' ' + error.status + ' (' + error.statusText + ')');
- }
- if (type === 'json') {
- d = $$.convertJsonToData(JSON.parse(dataResponse), keys);
- } else if (type === 'tsv') {
- d = $$.convertTsvToData(dataResponse);
- } else {
- d = $$.convertCsvToData(dataResponse);
- }
- done.call($$, d);
- });
-};
-c3_chart_internal_fn.convertXsvToData = function (xsv, parser) {
- var rows = parser.parseRows(xsv),
- d;
- if (rows.length === 1) {
- d = [{}];
- rows[0].forEach(function (id) {
- d[0][id] = null;
- });
- } else {
- d = parser.parse(xsv);
- }
- return d;
-};
-c3_chart_internal_fn.convertCsvToData = function (csv) {
- return this.convertXsvToData(csv, this.d3.csv);
-};
-c3_chart_internal_fn.convertTsvToData = function (tsv) {
- return this.convertXsvToData(tsv, this.d3.tsv);
-};
-c3_chart_internal_fn.convertJsonToData = function (json, keys) {
- var $$ = this,
- new_rows = [],
- targetKeys,
- data;
- if (keys) {
- // when keys specified, json would be an array that includes objects
- if (keys.x) {
- targetKeys = keys.value.concat(keys.x);
- $$.config.data_x = keys.x;
- } else {
- targetKeys = keys.value;
- }
- new_rows.push(targetKeys);
- json.forEach(function (o) {
- var new_row = [];
- targetKeys.forEach(function (key) {
- // convert undefined to null because undefined data will be removed in convertDataToTargets()
- var v = $$.findValueInJson(o, key);
- if (isUndefined(v)) {
- v = null;
- }
- new_row.push(v);
- });
- new_rows.push(new_row);
- });
- data = $$.convertRowsToData(new_rows);
- } else {
- Object.keys(json).forEach(function (key) {
- new_rows.push([key].concat(json[key]));
- });
- data = $$.convertColumnsToData(new_rows);
- }
- return data;
-};
-c3_chart_internal_fn.findValueInJson = function (object, path) {
- path = path.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties (replace [] with .)
- path = path.replace(/^\./, ''); // strip a leading dot
- var pathArray = path.split('.');
- for (var i = 0; i < pathArray.length; ++i) {
- var k = pathArray[i];
- if (k in object) {
- object = object[k];
- } else {
- return;
- }
- }
- return object;
-};
-
-/**
- * Converts the rows to normalized data.
- * @param {any[][]} rows The row data
- * @return {Object[]}
- */
-c3_chart_internal_fn.convertRowsToData = function (rows) {
- var newRows = [];
- var keys = rows[0];
-
- for (var i = 1; i < rows.length; i++) {
- var newRow = {};
- for (var j = 0; j < rows[i].length; j++) {
- if (isUndefined(rows[i][j])) {
- throw new Error("Source data is missing a component at (" + i + "," + j + ")!");
- }
- newRow[keys[j]] = rows[i][j];
- }
- newRows.push(newRow);
- }
- return newRows;
-};
-
-/**
- * Converts the columns to normalized data.
- * @param {any[][]} columns The column data
- * @return {Object[]}
- */
-c3_chart_internal_fn.convertColumnsToData = function (columns) {
- var newRows = [];
-
- for (var i = 0; i < columns.length; i++) {
- var key = columns[i][0];
- for (var j = 1; j < columns[i].length; j++) {
- if (isUndefined(newRows[j - 1])) {
- newRows[j - 1] = {};
- }
- if (isUndefined(columns[i][j])) {
- throw new Error("Source data is missing a component at (" + i + "," + j + ")!");
- }
- newRows[j - 1][key] = columns[i][j];
- }
- }
-
- return newRows;
-};
-
-c3_chart_internal_fn.convertDataToTargets = function (data, appendXs) {
- var $$ = this,
- config = $$.config,
- ids = $$.d3.keys(data[0]).filter($$.isNotX, $$),
- xs = $$.d3.keys(data[0]).filter($$.isX, $$),
- targets;
-
- // save x for update data by load when custom x and c3.x API
- ids.forEach(function (id) {
- var xKey = $$.getXKey(id);
-
- if ($$.isCustomX() || $$.isTimeSeries()) {
- // if included in input data
- if (xs.indexOf(xKey) >= 0) {
- $$.data.xs[id] = (appendXs && $$.data.xs[id] ? $$.data.xs[id] : []).concat(data.map(function (d) {
- return d[xKey];
- }).filter(isValue).map(function (rawX, i) {
- return $$.generateTargetX(rawX, id, i);
- }));
- }
- // if not included in input data, find from preloaded data of other id's x
- else if (config.data_x) {
- $$.data.xs[id] = $$.getOtherTargetXs();
- }
- // if not included in input data, find from preloaded data
- else if (notEmpty(config.data_xs)) {
- $$.data.xs[id] = $$.getXValuesOfXKey(xKey, $$.data.targets);
- }
- // MEMO: if no x included, use same x of current will be used
- } else {
- $$.data.xs[id] = data.map(function (d, i) {
- return i;
- });
- }
- });
-
- // check x is defined
- ids.forEach(function (id) {
- if (!$$.data.xs[id]) {
- throw new Error('x is not defined for id = "' + id + '".');
- }
- });
-
- // convert to target
- targets = ids.map(function (id, index) {
- var convertedId = config.data_idConverter(id);
- return {
- id: convertedId,
- id_org: id,
- values: data.map(function (d, i) {
- var xKey = $$.getXKey(id),
- rawX = d[xKey],
- value = d[id] !== null && !isNaN(d[id]) ? +d[id] : null,
- x;
- // use x as categories if custom x and categorized
- if ($$.isCustomX() && $$.isCategorized() && !isUndefined(rawX)) {
- if (index === 0 && i === 0) {
- config.axis_x_categories = [];
- }
- x = config.axis_x_categories.indexOf(rawX);
- if (x === -1) {
- x = config.axis_x_categories.length;
- config.axis_x_categories.push(rawX);
- }
- } else {
- x = $$.generateTargetX(rawX, id, i);
- }
- // mark as x = undefined if value is undefined and filter to remove after mapped
- if (isUndefined(d[id]) || $$.data.xs[id].length <= i) {
- x = undefined;
- }
- return { x: x, value: value, id: convertedId };
- }).filter(function (v) {
- return isDefined(v.x);
- })
- };
- });
-
- // finish targets
- targets.forEach(function (t) {
- var i;
- // sort values by its x
- if (config.data_xSort) {
- t.values = t.values.sort(function (v1, v2) {
- var x1 = v1.x || v1.x === 0 ? v1.x : Infinity,
- x2 = v2.x || v2.x === 0 ? v2.x : Infinity;
- return x1 - x2;
- });
- }
- // indexing each value
- i = 0;
- t.values.forEach(function (v) {
- v.index = i++;
- });
- // this needs to be sorted because its index and value.index is identical
- $$.data.xs[t.id].sort(function (v1, v2) {
- return v1 - v2;
- });
- });
-
- // cache information about values
- $$.hasNegativeValue = $$.hasNegativeValueInTargets(targets);
- $$.hasPositiveValue = $$.hasPositiveValueInTargets(targets);
-
- // set target types
- if (config.data_type) {
- $$.setTargetType($$.mapToIds(targets).filter(function (id) {
- return !(id in config.data_types);
- }), config.data_type);
- }
-
- // cache as original id keyed
- targets.forEach(function (d) {
- $$.addCache(d.id_org, d);
- });
-
- return targets;
-};
-
-c3_chart_internal_fn.isX = function (key) {
- var $$ = this,
- config = $$.config;
- return config.data_x && key === config.data_x || notEmpty(config.data_xs) && hasValue(config.data_xs, key);
-};
-c3_chart_internal_fn.isNotX = function (key) {
- return !this.isX(key);
-};
-c3_chart_internal_fn.getXKey = function (id) {
- var $$ = this,
- config = $$.config;
- return config.data_x ? config.data_x : notEmpty(config.data_xs) ? config.data_xs[id] : null;
-};
-c3_chart_internal_fn.getXValuesOfXKey = function (key, targets) {
- var $$ = this,
- xValues,
- ids = targets && notEmpty(targets) ? $$.mapToIds(targets) : [];
- ids.forEach(function (id) {
- if ($$.getXKey(id) === key) {
- xValues = $$.data.xs[id];
- }
- });
- return xValues;
-};
-c3_chart_internal_fn.getIndexByX = function (x) {
- var $$ = this,
- data = $$.filterByX($$.data.targets, x);
- return data.length ? data[0].index : null;
-};
-c3_chart_internal_fn.getXValue = function (id, i) {
- var $$ = this;
- return id in $$.data.xs && $$.data.xs[id] && isValue($$.data.xs[id][i]) ? $$.data.xs[id][i] : i;
-};
-c3_chart_internal_fn.getOtherTargetXs = function () {
- var $$ = this,
- idsForX = Object.keys($$.data.xs);
- return idsForX.length ? $$.data.xs[idsForX[0]] : null;
-};
-c3_chart_internal_fn.getOtherTargetX = function (index) {
- var xs = this.getOtherTargetXs();
- return xs && index < xs.length ? xs[index] : null;
-};
-c3_chart_internal_fn.addXs = function (xs) {
- var $$ = this;
- Object.keys(xs).forEach(function (id) {
- $$.config.data_xs[id] = xs[id];
- });
-};
-c3_chart_internal_fn.hasMultipleX = function (xs) {
- return this.d3.set(Object.keys(xs).map(function (id) {
- return xs[id];
- })).size() > 1;
-};
-c3_chart_internal_fn.isMultipleX = function () {
- return notEmpty(this.config.data_xs) || !this.config.data_xSort || this.hasType('scatter');
-};
-c3_chart_internal_fn.addName = function (data) {
- var $$ = this,
- name;
- if (data) {
- name = $$.config.data_names[data.id];
- data.name = name !== undefined ? name : data.id;
- }
- return data;
-};
-c3_chart_internal_fn.getValueOnIndex = function (values, index) {
- var valueOnIndex = values.filter(function (v) {
- return v.index === index;
- });
- return valueOnIndex.length ? valueOnIndex[0] : null;
-};
-c3_chart_internal_fn.updateTargetX = function (targets, x) {
- var $$ = this;
- targets.forEach(function (t) {
- t.values.forEach(function (v, i) {
- v.x = $$.generateTargetX(x[i], t.id, i);
- });
- $$.data.xs[t.id] = x;
- });
-};
-c3_chart_internal_fn.updateTargetXs = function (targets, xs) {
- var $$ = this;
- targets.forEach(function (t) {
- if (xs[t.id]) {
- $$.updateTargetX([t], xs[t.id]);
- }
- });
-};
-c3_chart_internal_fn.generateTargetX = function (rawX, id, index) {
- var $$ = this,
- x;
- if ($$.isTimeSeries()) {
- x = rawX ? $$.parseDate(rawX) : $$.parseDate($$.getXValue(id, index));
- } else if ($$.isCustomX() && !$$.isCategorized()) {
- x = isValue(rawX) ? +rawX : $$.getXValue(id, index);
- } else {
- x = index;
- }
- return x;
-};
-c3_chart_internal_fn.cloneTarget = function (target) {
- return {
- id: target.id,
- id_org: target.id_org,
- values: target.values.map(function (d) {
- return { x: d.x, value: d.value, id: d.id };
- })
- };
-};
-c3_chart_internal_fn.updateXs = function () {
- var $$ = this;
- if ($$.data.targets.length) {
- $$.xs = [];
- $$.data.targets[0].values.forEach(function (v) {
- $$.xs[v.index] = v.x;
- });
- }
-};
-c3_chart_internal_fn.getPrevX = function (i) {
- var x = this.xs[i - 1];
- return typeof x !== 'undefined' ? x : null;
-};
-c3_chart_internal_fn.getNextX = function (i) {
- var x = this.xs[i + 1];
- return typeof x !== 'undefined' ? x : null;
-};
-c3_chart_internal_fn.getMaxDataCount = function () {
- var $$ = this;
- return $$.d3.max($$.data.targets, function (t) {
- return t.values.length;
- });
-};
-c3_chart_internal_fn.getMaxDataCountTarget = function (targets) {
- var length = targets.length,
- max = 0,
- maxTarget;
- if (length > 1) {
- targets.forEach(function (t) {
- if (t.values.length > max) {
- maxTarget = t;
- max = t.values.length;
- }
- });
- } else {
- maxTarget = length ? targets[0] : null;
- }
- return maxTarget;
-};
-c3_chart_internal_fn.getEdgeX = function (targets) {
- var $$ = this;
- return !targets.length ? [0, 0] : [$$.d3.min(targets, function (t) {
- return t.values[0].x;
- }), $$.d3.max(targets, function (t) {
- return t.values[t.values.length - 1].x;
- })];
-};
-c3_chart_internal_fn.mapToIds = function (targets) {
- return targets.map(function (d) {
- return d.id;
- });
-};
-c3_chart_internal_fn.mapToTargetIds = function (ids) {
- var $$ = this;
- return ids ? [].concat(ids) : $$.mapToIds($$.data.targets);
-};
-c3_chart_internal_fn.hasTarget = function (targets, id) {
- var ids = this.mapToIds(targets),
- i;
- for (i = 0; i < ids.length; i++) {
- if (ids[i] === id) {
- return true;
- }
- }
- return false;
-};
-c3_chart_internal_fn.isTargetToShow = function (targetId) {
- return this.hiddenTargetIds.indexOf(targetId) < 0;
-};
-c3_chart_internal_fn.isLegendToShow = function (targetId) {
- return this.hiddenLegendIds.indexOf(targetId) < 0;
-};
-c3_chart_internal_fn.filterTargetsToShow = function (targets) {
- var $$ = this;
- return targets.filter(function (t) {
- return $$.isTargetToShow(t.id);
- });
-};
-c3_chart_internal_fn.mapTargetsToUniqueXs = function (targets) {
- var $$ = this;
- var xs = $$.d3.set($$.d3.merge(targets.map(function (t) {
- return t.values.map(function (v) {
- return +v.x;
- });
- }))).values();
- xs = $$.isTimeSeries() ? xs.map(function (x) {
- return new Date(+x);
- }) : xs.map(function (x) {
- return +x;
- });
- return xs.sort(function (a, b) {
- return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
- });
-};
-c3_chart_internal_fn.addHiddenTargetIds = function (targetIds) {
- targetIds = targetIds instanceof Array ? targetIds : new Array(targetIds);
- for (var i = 0; i < targetIds.length; i++) {
- if (this.hiddenTargetIds.indexOf(targetIds[i]) < 0) {
- this.hiddenTargetIds = this.hiddenTargetIds.concat(targetIds[i]);
- }
- }
-};
-c3_chart_internal_fn.removeHiddenTargetIds = function (targetIds) {
- this.hiddenTargetIds = this.hiddenTargetIds.filter(function (id) {
- return targetIds.indexOf(id) < 0;
- });
-};
-c3_chart_internal_fn.addHiddenLegendIds = function (targetIds) {
- targetIds = targetIds instanceof Array ? targetIds : new Array(targetIds);
- for (var i = 0; i < targetIds.length; i++) {
- if (this.hiddenLegendIds.indexOf(targetIds[i]) < 0) {
- this.hiddenLegendIds = this.hiddenLegendIds.concat(targetIds[i]);
- }
- }
-};
-c3_chart_internal_fn.removeHiddenLegendIds = function (targetIds) {
- this.hiddenLegendIds = this.hiddenLegendIds.filter(function (id) {
- return targetIds.indexOf(id) < 0;
- });
-};
-c3_chart_internal_fn.getValuesAsIdKeyed = function (targets) {
- var ys = {};
- targets.forEach(function (t) {
- ys[t.id] = [];
- t.values.forEach(function (v) {
- ys[t.id].push(v.value);
- });
- });
- return ys;
-};
-c3_chart_internal_fn.checkValueInTargets = function (targets, checker) {
- var ids = Object.keys(targets),
- i,
- j,
- values;
- for (i = 0; i < ids.length; i++) {
- values = targets[ids[i]].values;
- for (j = 0; j < values.length; j++) {
- if (checker(values[j].value)) {
- return true;
- }
- }
- }
- return false;
-};
-c3_chart_internal_fn.hasNegativeValueInTargets = function (targets) {
- return this.checkValueInTargets(targets, function (v) {
- return v < 0;
- });
-};
-c3_chart_internal_fn.hasPositiveValueInTargets = function (targets) {
- return this.checkValueInTargets(targets, function (v) {
- return v > 0;
- });
-};
-c3_chart_internal_fn.isOrderDesc = function () {
- var config = this.config;
- return typeof config.data_order === 'string' && config.data_order.toLowerCase() === 'desc';
-};
-c3_chart_internal_fn.isOrderAsc = function () {
- var config = this.config;
- return typeof config.data_order === 'string' && config.data_order.toLowerCase() === 'asc';
-};
-c3_chart_internal_fn.getOrderFunction = function () {
- var $$ = this,
- config = $$.config,
- orderAsc = $$.isOrderAsc(),
- orderDesc = $$.isOrderDesc();
- if (orderAsc || orderDesc) {
- return function (t1, t2) {
- var reducer = function reducer(p, c) {
- return p + Math.abs(c.value);
- };
- var t1Sum = t1.values.reduce(reducer, 0),
- t2Sum = t2.values.reduce(reducer, 0);
- return orderDesc ? t2Sum - t1Sum : t1Sum - t2Sum;
- };
- } else if (isFunction(config.data_order)) {
- return config.data_order;
- } else if (isArray(config.data_order)) {
- var order = config.data_order;
- return function (t1, t2) {
- return order.indexOf(t1.id) - order.indexOf(t2.id);
- };
- }
-};
-c3_chart_internal_fn.orderTargets = function (targets) {
- var fct = this.getOrderFunction();
- if (fct) {
- targets.sort(fct);
- if (this.isOrderAsc() || this.isOrderDesc()) {
- targets.reverse();
- }
- }
- return targets;
-};
-c3_chart_internal_fn.filterByX = function (targets, x) {
- return this.d3.merge(targets.map(function (t) {
- return t.values;
- })).filter(function (v) {
- return v.x - x === 0;
- });
-};
-c3_chart_internal_fn.filterRemoveNull = function (data) {
- return data.filter(function (d) {
- return isValue(d.value);
- });
-};
-c3_chart_internal_fn.filterByXDomain = function (targets, xDomain) {
- return targets.map(function (t) {
- return {
- id: t.id,
- id_org: t.id_org,
- values: t.values.filter(function (v) {
- return xDomain[0] <= v.x && v.x <= xDomain[1];
- })
- };
- });
-};
-c3_chart_internal_fn.hasDataLabel = function () {
- var config = this.config;
- if (typeof config.data_labels === 'boolean' && config.data_labels) {
- return true;
- } else if (_typeof(config.data_labels) === 'object' && notEmpty(config.data_labels)) {
- return true;
- }
- return false;
-};
-c3_chart_internal_fn.getDataLabelLength = function (min, max, key) {
- var $$ = this,
- lengths = [0, 0],
- paddingCoef = 1.3;
- $$.selectChart.select('svg').selectAll('.dummy').data([min, max]).enter().append('text').text(function (d) {
- return $$.dataLabelFormat(d.id)(d);
- }).each(function (d, i) {
- lengths[i] = this.getBoundingClientRect()[key] * paddingCoef;
- }).remove();
- return lengths;
-};
-c3_chart_internal_fn.isNoneArc = function (d) {
- return this.hasTarget(this.data.targets, d.id);
-}, c3_chart_internal_fn.isArc = function (d) {
- return 'data' in d && this.hasTarget(this.data.targets, d.data.id);
-};
-c3_chart_internal_fn.findSameXOfValues = function (values, index) {
- var i,
- targetX = values[index].x,
- sames = [];
- for (i = index - 1; i >= 0; i--) {
- if (targetX !== values[i].x) {
- break;
- }
- sames.push(values[i]);
- }
- for (i = index; i < values.length; i++) {
- if (targetX !== values[i].x) {
- break;
- }
- sames.push(values[i]);
- }
- return sames;
-};
-
-c3_chart_internal_fn.findClosestFromTargets = function (targets, pos) {
- var $$ = this,
- candidates;
-
- // map to array of closest points of each target
- candidates = targets.map(function (target) {
- return $$.findClosest(target.values, pos);
- });
-
- // decide closest point and return
- return $$.findClosest(candidates, pos);
-};
-c3_chart_internal_fn.findClosest = function (values, pos) {
- var $$ = this,
- minDist = $$.config.point_sensitivity,
- closest;
-
- // find mouseovering bar
- values.filter(function (v) {
- return v && $$.isBarType(v.id);
- }).forEach(function (v) {
- var shape = $$.main.select('.' + CLASS.bars + $$.getTargetSelectorSuffix(v.id) + ' .' + CLASS.bar + '-' + v.index).node();
- if (!closest && $$.isWithinBar(shape)) {
- closest = v;
- }
- });
-
- // find closest point from non-bar
- values.filter(function (v) {
- return v && !$$.isBarType(v.id);
- }).forEach(function (v) {
- var d = $$.dist(v, pos);
- if (d < minDist) {
- minDist = d;
- closest = v;
- }
- });
-
- return closest;
-};
-c3_chart_internal_fn.dist = function (data, pos) {
- var $$ = this,
- config = $$.config,
- xIndex = config.axis_rotated ? 1 : 0,
- yIndex = config.axis_rotated ? 0 : 1,
- y = $$.circleY(data, data.index),
- x = $$.x(data.x);
- return Math.sqrt(Math.pow(x - pos[xIndex], 2) + Math.pow(y - pos[yIndex], 2));
-};
-c3_chart_internal_fn.convertValuesToStep = function (values) {
- var converted = [].concat(values),
- i;
-
- if (!this.isCategorized()) {
- return values;
- }
-
- for (i = values.length + 1; 0 < i; i--) {
- converted[i] = converted[i - 1];
- }
-
- converted[0] = {
- x: converted[0].x - 1,
- value: converted[0].value,
- id: converted[0].id
- };
- converted[values.length + 1] = {
- x: converted[values.length].x + 1,
- value: converted[values.length].value,
- id: converted[values.length].id
- };
-
- return converted;
-};
-c3_chart_internal_fn.updateDataAttributes = function (name, attrs) {
- var $$ = this,
- config = $$.config,
- current = config['data_' + name];
- if (typeof attrs === 'undefined') {
- return current;
- }
- Object.keys(attrs).forEach(function (id) {
- current[id] = attrs[id];
- });
- $$.redraw({ withLegend: true });
- return current;
-};
-
-c3_chart_internal_fn.load = function (targets, args) {
- var $$ = this;
- if (targets) {
- // filter loading targets if needed
- if (args.filter) {
- targets = targets.filter(args.filter);
- }
- // set type if args.types || args.type specified
- if (args.type || args.types) {
- targets.forEach(function (t) {
- var type = args.types && args.types[t.id] ? args.types[t.id] : args.type;
- $$.setTargetType(t.id, type);
- });
- }
- // Update/Add data
- $$.data.targets.forEach(function (d) {
- for (var i = 0; i < targets.length; i++) {
- if (d.id === targets[i].id) {
- d.values = targets[i].values;
- targets.splice(i, 1);
- break;
- }
- }
- });
- $$.data.targets = $$.data.targets.concat(targets); // add remained
- }
-
- // Set targets
- $$.updateTargets($$.data.targets);
-
- // Redraw with new targets
- $$.redraw({ withUpdateOrgXDomain: true, withUpdateXDomain: true, withLegend: true });
-
- if (args.done) {
- args.done();
- }
-};
-c3_chart_internal_fn.loadFromArgs = function (args) {
- var $$ = this;
- if (args.data) {
- $$.load($$.convertDataToTargets(args.data), args);
- } else if (args.url) {
- $$.convertUrlToData(args.url, args.mimeType, args.headers, args.keys, function (data) {
- $$.load($$.convertDataToTargets(data), args);
- });
- } else if (args.json) {
- $$.load($$.convertDataToTargets($$.convertJsonToData(args.json, args.keys)), args);
- } else if (args.rows) {
- $$.load($$.convertDataToTargets($$.convertRowsToData(args.rows)), args);
- } else if (args.columns) {
- $$.load($$.convertDataToTargets($$.convertColumnsToData(args.columns)), args);
- } else {
- $$.load(null, args);
- }
-};
-c3_chart_internal_fn.unload = function (targetIds, done) {
- var $$ = this;
- if (!done) {
- done = function done() {};
- }
- // filter existing target
- targetIds = targetIds.filter(function (id) {
- return $$.hasTarget($$.data.targets, id);
- });
- // If no target, call done and return
- if (!targetIds || targetIds.length === 0) {
- done();
- return;
- }
- $$.svg.selectAll(targetIds.map(function (id) {
- return $$.selectorTarget(id);
- })).transition().style('opacity', 0).remove().call($$.endall, done);
- targetIds.forEach(function (id) {
- // Reset fadein for future load
- $$.withoutFadeIn[id] = false;
- // Remove target's elements
- if ($$.legend) {
- $$.legend.selectAll('.' + CLASS.legendItem + $$.getTargetSelectorSuffix(id)).remove();
- }
- // Remove target
- $$.data.targets = $$.data.targets.filter(function (t) {
- return t.id !== id;
- });
- });
-};
-
-c3_chart_internal_fn.getYDomainMin = function (targets) {
- var $$ = this,
- config = $$.config,
- ids = $$.mapToIds(targets),
- ys = $$.getValuesAsIdKeyed(targets),
- j,
- k,
- baseId,
- idsInGroup,
- id,
- hasNegativeValue;
- if (config.data_groups.length > 0) {
- hasNegativeValue = $$.hasNegativeValueInTargets(targets);
- for (j = 0; j < config.data_groups.length; j++) {
- // Determine baseId
- idsInGroup = config.data_groups[j].filter(function (id) {
- return ids.indexOf(id) >= 0;
- });
- if (idsInGroup.length === 0) {
- continue;
- }
- baseId = idsInGroup[0];
- // Consider negative values
- if (hasNegativeValue && ys[baseId]) {
- ys[baseId].forEach(function (v, i) {
- ys[baseId][i] = v < 0 ? v : 0;
- });
- }
- // Compute min
- for (k = 1; k < idsInGroup.length; k++) {
- id = idsInGroup[k];
- if (!ys[id]) {
- continue;
- }
- ys[id].forEach(function (v, i) {
- if ($$.axis.getId(id) === $$.axis.getId(baseId) && ys[baseId] && !(hasNegativeValue && +v > 0)) {
- ys[baseId][i] += +v;
- }
- });
- }
- }
- }
- return $$.d3.min(Object.keys(ys).map(function (key) {
- return $$.d3.min(ys[key]);
- }));
-};
-c3_chart_internal_fn.getYDomainMax = function (targets) {
- var $$ = this,
- config = $$.config,
- ids = $$.mapToIds(targets),
- ys = $$.getValuesAsIdKeyed(targets),
- j,
- k,
- baseId,
- idsInGroup,
- id,
- hasPositiveValue;
- if (config.data_groups.length > 0) {
- hasPositiveValue = $$.hasPositiveValueInTargets(targets);
- for (j = 0; j < config.data_groups.length; j++) {
- // Determine baseId
- idsInGroup = config.data_groups[j].filter(function (id) {
- return ids.indexOf(id) >= 0;
- });
- if (idsInGroup.length === 0) {
- continue;
- }
- baseId = idsInGroup[0];
- // Consider positive values
- if (hasPositiveValue && ys[baseId]) {
- ys[baseId].forEach(function (v, i) {
- ys[baseId][i] = v > 0 ? v : 0;
- });
- }
- // Compute max
- for (k = 1; k < idsInGroup.length; k++) {
- id = idsInGroup[k];
- if (!ys[id]) {
- continue;
- }
- ys[id].forEach(function (v, i) {
- if ($$.axis.getId(id) === $$.axis.getId(baseId) && ys[baseId] && !(hasPositiveValue && +v < 0)) {
- ys[baseId][i] += +v;
- }
- });
- }
- }
- }
- return $$.d3.max(Object.keys(ys).map(function (key) {
- return $$.d3.max(ys[key]);
- }));
-};
-c3_chart_internal_fn.getYDomain = function (targets, axisId, xDomain) {
- var $$ = this,
- config = $$.config,
- targetsByAxisId = targets.filter(function (t) {
- return $$.axis.getId(t.id) === axisId;
- }),
- yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId,
- yMin = axisId === 'y2' ? config.axis_y2_min : config.axis_y_min,
- yMax = axisId === 'y2' ? config.axis_y2_max : config.axis_y_max,
- yDomainMin = $$.getYDomainMin(yTargets),
- yDomainMax = $$.getYDomainMax(yTargets),
- domain,
- domainLength,
- padding,
- padding_top,
- padding_bottom,
- center = axisId === 'y2' ? config.axis_y2_center : config.axis_y_center,
- yDomainAbs,
- lengths,
- diff,
- ratio,
- isAllPositive,
- isAllNegative,
- isZeroBased = $$.hasType('bar', yTargets) && config.bar_zerobased || $$.hasType('area', yTargets) && config.area_zerobased,
- isInverted = axisId === 'y2' ? config.axis_y2_inverted : config.axis_y_inverted,
- showHorizontalDataLabel = $$.hasDataLabel() && config.axis_rotated,
- showVerticalDataLabel = $$.hasDataLabel() && !config.axis_rotated;
-
- // MEMO: avoid inverting domain unexpectedly
- yDomainMin = isValue(yMin) ? yMin : isValue(yMax) ? yDomainMin < yMax ? yDomainMin : yMax - 10 : yDomainMin;
- yDomainMax = isValue(yMax) ? yMax : isValue(yMin) ? yMin < yDomainMax ? yDomainMax : yMin + 10 : yDomainMax;
-
- if (yTargets.length === 0) {
- // use current domain if target of axisId is none
- return axisId === 'y2' ? $$.y2.domain() : $$.y.domain();
- }
- if (isNaN(yDomainMin)) {
- // set minimum to zero when not number
- yDomainMin = 0;
- }
- if (isNaN(yDomainMax)) {
- // set maximum to have same value as yDomainMin
- yDomainMax = yDomainMin;
- }
- if (yDomainMin === yDomainMax) {
- yDomainMin < 0 ? yDomainMax = 0 : yDomainMin = 0;
- }
- isAllPositive = yDomainMin >= 0 && yDomainMax >= 0;
- isAllNegative = yDomainMin <= 0 && yDomainMax <= 0;
-
- // Cancel zerobased if axis_*_min / axis_*_max specified
- if (isValue(yMin) && isAllPositive || isValue(yMax) && isAllNegative) {
- isZeroBased = false;
- }
-
- // Bar/Area chart should be 0-based if all positive|negative
- if (isZeroBased) {
- if (isAllPositive) {
- yDomainMin = 0;
- }
- if (isAllNegative) {
- yDomainMax = 0;
- }
- }
-
- domainLength = Math.abs(yDomainMax - yDomainMin);
- padding = padding_top = padding_bottom = domainLength * 0.1;
-
- if (typeof center !== 'undefined') {
- yDomainAbs = Math.max(Math.abs(yDomainMin), Math.abs(yDomainMax));
- yDomainMax = center + yDomainAbs;
- yDomainMin = center - yDomainAbs;
- }
- // add padding for data label
- if (showHorizontalDataLabel) {
- lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, 'width');
- diff = diffDomain($$.y.range());
- ratio = [lengths[0] / diff, lengths[1] / diff];
- padding_top += domainLength * (ratio[1] / (1 - ratio[0] - ratio[1]));
- padding_bottom += domainLength * (ratio[0] / (1 - ratio[0] - ratio[1]));
- } else if (showVerticalDataLabel) {
- lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, 'height');
- padding_top += $$.axis.convertPixelsToAxisPadding(lengths[1], domainLength);
- padding_bottom += $$.axis.convertPixelsToAxisPadding(lengths[0], domainLength);
- }
- if (axisId === 'y' && notEmpty(config.axis_y_padding)) {
- padding_top = $$.axis.getPadding(config.axis_y_padding, 'top', padding_top, domainLength);
- padding_bottom = $$.axis.getPadding(config.axis_y_padding, 'bottom', padding_bottom, domainLength);
- }
- if (axisId === 'y2' && notEmpty(config.axis_y2_padding)) {
- padding_top = $$.axis.getPadding(config.axis_y2_padding, 'top', padding_top, domainLength);
- padding_bottom = $$.axis.getPadding(config.axis_y2_padding, 'bottom', padding_bottom, domainLength);
- }
- // Bar/Area chart should be 0-based if all positive|negative
- if (isZeroBased) {
- if (isAllPositive) {
- padding_bottom = yDomainMin;
- }
- if (isAllNegative) {
- padding_top = -yDomainMax;
- }
- }
- domain = [yDomainMin - padding_bottom, yDomainMax + padding_top];
- return isInverted ? domain.reverse() : domain;
-};
-c3_chart_internal_fn.getXDomainMin = function (targets) {
- var $$ = this,
- config = $$.config;
- return isDefined(config.axis_x_min) ? $$.isTimeSeries() ? this.parseDate(config.axis_x_min) : config.axis_x_min : $$.d3.min(targets, function (t) {
- return $$.d3.min(t.values, function (v) {
- return v.x;
- });
- });
-};
-c3_chart_internal_fn.getXDomainMax = function (targets) {
- var $$ = this,
- config = $$.config;
- return isDefined(config.axis_x_max) ? $$.isTimeSeries() ? this.parseDate(config.axis_x_max) : config.axis_x_max : $$.d3.max(targets, function (t) {
- return $$.d3.max(t.values, function (v) {
- return v.x;
- });
- });
-};
-c3_chart_internal_fn.getXDomainPadding = function (domain) {
- var $$ = this,
- config = $$.config,
- diff = domain[1] - domain[0],
- maxDataCount,
- padding,
- paddingLeft,
- paddingRight;
- if ($$.isCategorized()) {
- padding = 0;
- } else if ($$.hasType('bar')) {
- maxDataCount = $$.getMaxDataCount();
- padding = maxDataCount > 1 ? diff / (maxDataCount - 1) / 2 : 0.5;
- } else {
- padding = diff * 0.01;
- }
- if (_typeof(config.axis_x_padding) === 'object' && notEmpty(config.axis_x_padding)) {
- paddingLeft = isValue(config.axis_x_padding.left) ? config.axis_x_padding.left : padding;
- paddingRight = isValue(config.axis_x_padding.right) ? config.axis_x_padding.right : padding;
- } else if (typeof config.axis_x_padding === 'number') {
- paddingLeft = paddingRight = config.axis_x_padding;
- } else {
- paddingLeft = paddingRight = padding;
- }
- return { left: paddingLeft, right: paddingRight };
-};
-c3_chart_internal_fn.getXDomain = function (targets) {
- var $$ = this,
- xDomain = [$$.getXDomainMin(targets), $$.getXDomainMax(targets)],
- firstX = xDomain[0],
- lastX = xDomain[1],
- padding = $$.getXDomainPadding(xDomain),
- min = 0,
- max = 0;
- // show center of x domain if min and max are the same
- if (firstX - lastX === 0 && !$$.isCategorized()) {
- if ($$.isTimeSeries()) {
- firstX = new Date(firstX.getTime() * 0.5);
- lastX = new Date(lastX.getTime() * 1.5);
- } else {
- firstX = firstX === 0 ? 1 : firstX * 0.5;
- lastX = lastX === 0 ? -1 : lastX * 1.5;
- }
- }
- if (firstX || firstX === 0) {
- min = $$.isTimeSeries() ? new Date(firstX.getTime() - padding.left) : firstX - padding.left;
- }
- if (lastX || lastX === 0) {
- max = $$.isTimeSeries() ? new Date(lastX.getTime() + padding.right) : lastX + padding.right;
- }
- return [min, max];
-};
-c3_chart_internal_fn.updateXDomain = function (targets, withUpdateXDomain, withUpdateOrgXDomain, withTrim, domain) {
- var $$ = this,
- config = $$.config;
-
- if (withUpdateOrgXDomain) {
- $$.x.domain(domain ? domain : $$.d3.extent($$.getXDomain(targets)));
- $$.orgXDomain = $$.x.domain();
- if (config.zoom_enabled) {
- $$.zoom.scale($$.x).updateScaleExtent();
- }
- $$.subX.domain($$.x.domain());
- if ($$.brush) {
- $$.brush.scale($$.subX);
- }
- }
- if (withUpdateXDomain) {
- $$.x.domain(domain ? domain : !$$.brush || $$.brush.empty() ? $$.orgXDomain : $$.brush.extent());
- if (config.zoom_enabled) {
- $$.zoom.scale($$.x).updateScaleExtent();
- }
- }
-
- // Trim domain when too big by zoom mousemove event
- if (withTrim) {
- $$.x.domain($$.trimXDomain($$.x.orgDomain()));
- }
-
- return $$.x.domain();
-};
-c3_chart_internal_fn.trimXDomain = function (domain) {
- var zoomDomain = this.getZoomDomain(),
- min = zoomDomain[0],
- max = zoomDomain[1];
- if (domain[0] <= min) {
- domain[1] = +domain[1] + (min - domain[0]);
- domain[0] = min;
- }
- if (max <= domain[1]) {
- domain[0] = +domain[0] - (domain[1] - max);
- domain[1] = max;
- }
- return domain;
-};
-
-c3_chart_internal_fn.drag = function (mouse) {
- var $$ = this,
- config = $$.config,
- main = $$.main,
- d3 = $$.d3;
- var sx, sy, mx, my, minX, maxX, minY, maxY;
-
- if ($$.hasArcType()) {
- return;
- }
- if (!config.data_selection_enabled) {
- return;
- } // do nothing if not selectable
- if (config.zoom_enabled && !$$.zoom.altDomain) {
- return;
- } // skip if zoomable because of conflict drag dehavior
- if (!config.data_selection_multiple) {
- return;
- } // skip when single selection because drag is used for multiple selection
-
- sx = $$.dragStart[0];
- sy = $$.dragStart[1];
- mx = mouse[0];
- my = mouse[1];
- minX = Math.min(sx, mx);
- maxX = Math.max(sx, mx);
- minY = config.data_selection_grouped ? $$.margin.top : Math.min(sy, my);
- maxY = config.data_selection_grouped ? $$.height : Math.max(sy, my);
-
- main.select('.' + CLASS.dragarea).attr('x', minX).attr('y', minY).attr('width', maxX - minX).attr('height', maxY - minY);
- // TODO: binary search when multiple xs
- main.selectAll('.' + CLASS.shapes).selectAll('.' + CLASS.shape).filter(function (d) {
- return config.data_selection_isselectable(d);
- }).each(function (d, i) {
- var shape = d3.select(this),
- isSelected = shape.classed(CLASS.SELECTED),
- isIncluded = shape.classed(CLASS.INCLUDED),
- _x,
- _y,
- _w,
- _h,
- toggle,
- isWithin = false,
- box;
- if (shape.classed(CLASS.circle)) {
- _x = shape.attr("cx") * 1;
- _y = shape.attr("cy") * 1;
- toggle = $$.togglePoint;
- isWithin = minX < _x && _x < maxX && minY < _y && _y < maxY;
- } else if (shape.classed(CLASS.bar)) {
- box = getPathBox(this);
- _x = box.x;
- _y = box.y;
- _w = box.width;
- _h = box.height;
- toggle = $$.togglePath;
- isWithin = !(maxX < _x || _x + _w < minX) && !(maxY < _y || _y + _h < minY);
- } else {
- // line/area selection not supported yet
- return;
- }
- if (isWithin ^ isIncluded) {
- shape.classed(CLASS.INCLUDED, !isIncluded);
- // TODO: included/unincluded callback here
- shape.classed(CLASS.SELECTED, !isSelected);
- toggle.call($$, !isSelected, shape, d, i);
- }
- });
-};
-
-c3_chart_internal_fn.dragstart = function (mouse) {
- var $$ = this,
- config = $$.config;
- if ($$.hasArcType()) {
- return;
- }
- if (!config.data_selection_enabled) {
- return;
- } // do nothing if not selectable
- $$.dragStart = mouse;
- $$.main.select('.' + CLASS.chart).append('rect').attr('class', CLASS.dragarea).style('opacity', 0.1);
- $$.dragging = true;
-};
-
-c3_chart_internal_fn.dragend = function () {
- var $$ = this,
- config = $$.config;
- if ($$.hasArcType()) {
- return;
- }
- if (!config.data_selection_enabled) {
- return;
- } // do nothing if not selectable
- $$.main.select('.' + CLASS.dragarea).transition().duration(100).style('opacity', 0).remove();
- $$.main.selectAll('.' + CLASS.shape).classed(CLASS.INCLUDED, false);
- $$.dragging = false;
-};
-
-c3_chart_internal_fn.getYFormat = function (forArc) {
- var $$ = this,
- formatForY = forArc && !$$.hasType('gauge') ? $$.defaultArcValueFormat : $$.yFormat,
- formatForY2 = forArc && !$$.hasType('gauge') ? $$.defaultArcValueFormat : $$.y2Format;
- return function (v, ratio, id) {
- var format = $$.axis.getId(id) === 'y2' ? formatForY2 : formatForY;
- return format.call($$, v, ratio);
- };
-};
-c3_chart_internal_fn.yFormat = function (v) {
- var $$ = this,
- config = $$.config,
- format = config.axis_y_tick_format ? config.axis_y_tick_format : $$.defaultValueFormat;
- return format(v);
-};
-c3_chart_internal_fn.y2Format = function (v) {
- var $$ = this,
- config = $$.config,
- format = config.axis_y2_tick_format ? config.axis_y2_tick_format : $$.defaultValueFormat;
- return format(v);
-};
-c3_chart_internal_fn.defaultValueFormat = function (v) {
- return isValue(v) ? +v : "";
-};
-c3_chart_internal_fn.defaultArcValueFormat = function (v, ratio) {
- return (ratio * 100).toFixed(1) + '%';
-};
-c3_chart_internal_fn.dataLabelFormat = function (targetId) {
- var $$ = this,
- data_labels = $$.config.data_labels,
- format,
- defaultFormat = function defaultFormat(v) {
- return isValue(v) ? +v : "";
- };
- // find format according to axis id
- if (typeof data_labels.format === 'function') {
- format = data_labels.format;
- } else if (_typeof(data_labels.format) === 'object') {
- if (data_labels.format[targetId]) {
- format = data_labels.format[targetId] === true ? defaultFormat : data_labels.format[targetId];
- } else {
- format = function format() {
- return '';
- };
- }
- } else {
- format = defaultFormat;
- }
- return format;
-};
-
-c3_chart_internal_fn.initGrid = function () {
- var $$ = this,
- config = $$.config,
- d3 = $$.d3;
- $$.grid = $$.main.append('g').attr("clip-path", $$.clipPathForGrid).attr('class', CLASS.grid);
- if (config.grid_x_show) {
- $$.grid.append("g").attr("class", CLASS.xgrids);
- }
- if (config.grid_y_show) {
- $$.grid.append('g').attr('class', CLASS.ygrids);
- }
- if (config.grid_focus_show) {
- $$.grid.append('g').attr("class", CLASS.xgridFocus).append('line').attr('class', CLASS.xgridFocus);
- }
- $$.xgrid = d3.selectAll([]);
- if (!config.grid_lines_front) {
- $$.initGridLines();
- }
-};
-c3_chart_internal_fn.initGridLines = function () {
- var $$ = this,
- d3 = $$.d3;
- $$.gridLines = $$.main.append('g').attr("clip-path", $$.clipPathForGrid).attr('class', CLASS.grid + ' ' + CLASS.gridLines);
- $$.gridLines.append('g').attr("class", CLASS.xgridLines);
- $$.gridLines.append('g').attr('class', CLASS.ygridLines);
- $$.xgridLines = d3.selectAll([]);
-};
-c3_chart_internal_fn.updateXGrid = function (withoutUpdate) {
- var $$ = this,
- config = $$.config,
- d3 = $$.d3,
- xgridData = $$.generateGridData(config.grid_x_type, $$.x),
- tickOffset = $$.isCategorized() ? $$.xAxis.tickOffset() : 0;
-
- $$.xgridAttr = config.axis_rotated ? {
- 'x1': 0,
- 'x2': $$.width,
- 'y1': function y1(d) {
- return $$.x(d) - tickOffset;
- },
- 'y2': function y2(d) {
- return $$.x(d) - tickOffset;
- }
- } : {
- 'x1': function x1(d) {
- return $$.x(d) + tickOffset;
- },
- 'x2': function x2(d) {
- return $$.x(d) + tickOffset;
- },
- 'y1': 0,
- 'y2': $$.height
- };
-
- $$.xgrid = $$.main.select('.' + CLASS.xgrids).selectAll('.' + CLASS.xgrid).data(xgridData);
- $$.xgrid.enter().append('line').attr("class", CLASS.xgrid);
- if (!withoutUpdate) {
- $$.xgrid.attr($$.xgridAttr).style("opacity", function () {
- return +d3.select(this).attr(config.axis_rotated ? 'y1' : 'x1') === (config.axis_rotated ? $$.height : 0) ? 0 : 1;
- });
- }
- $$.xgrid.exit().remove();
-};
-
-c3_chart_internal_fn.updateYGrid = function () {
- var $$ = this,
- config = $$.config,
- gridValues = $$.yAxis.tickValues() || $$.y.ticks(config.grid_y_ticks);
- $$.ygrid = $$.main.select('.' + CLASS.ygrids).selectAll('.' + CLASS.ygrid).data(gridValues);
- $$.ygrid.enter().append('line').attr('class', CLASS.ygrid);
- $$.ygrid.attr("x1", config.axis_rotated ? $$.y : 0).attr("x2", config.axis_rotated ? $$.y : $$.width).attr("y1", config.axis_rotated ? 0 : $$.y).attr("y2", config.axis_rotated ? $$.height : $$.y);
- $$.ygrid.exit().remove();
- $$.smoothLines($$.ygrid, 'grid');
-};
-
-c3_chart_internal_fn.gridTextAnchor = function (d) {
- return d.position ? d.position : "end";
-};
-c3_chart_internal_fn.gridTextDx = function (d) {
- return d.position === 'start' ? 4 : d.position === 'middle' ? 0 : -4;
-};
-c3_chart_internal_fn.xGridTextX = function (d) {
- return d.position === 'start' ? -this.height : d.position === 'middle' ? -this.height / 2 : 0;
-};
-c3_chart_internal_fn.yGridTextX = function (d) {
- return d.position === 'start' ? 0 : d.position === 'middle' ? this.width / 2 : this.width;
-};
-c3_chart_internal_fn.updateGrid = function (duration) {
- var $$ = this,
- main = $$.main,
- config = $$.config,
- xgridLine,
- ygridLine,
- yv;
-
- // hide if arc type
- $$.grid.style('visibility', $$.hasArcType() ? 'hidden' : 'visible');
-
- main.select('line.' + CLASS.xgridFocus).style("visibility", "hidden");
- if (config.grid_x_show) {
- $$.updateXGrid();
- }
- $$.xgridLines = main.select('.' + CLASS.xgridLines).selectAll('.' + CLASS.xgridLine).data(config.grid_x_lines);
- // enter
- xgridLine = $$.xgridLines.enter().append('g').attr("class", function (d) {
- return CLASS.xgridLine + (d['class'] ? ' ' + d['class'] : '');
- });
- xgridLine.append('line').style("opacity", 0);
- xgridLine.append('text').attr("text-anchor", $$.gridTextAnchor).attr("transform", config.axis_rotated ? "" : "rotate(-90)").attr('dx', $$.gridTextDx).attr('dy', -5).style("opacity", 0);
- // udpate
- // done in d3.transition() of the end of this function
- // exit
- $$.xgridLines.exit().transition().duration(duration).style("opacity", 0).remove();
-
- // Y-Grid
- if (config.grid_y_show) {
- $$.updateYGrid();
- }
- $$.ygridLines = main.select('.' + CLASS.ygridLines).selectAll('.' + CLASS.ygridLine).data(config.grid_y_lines);
- // enter
- ygridLine = $$.ygridLines.enter().append('g').attr("class", function (d) {
- return CLASS.ygridLine + (d['class'] ? ' ' + d['class'] : '');
- });
- ygridLine.append('line').style("opacity", 0);
- ygridLine.append('text').attr("text-anchor", $$.gridTextAnchor).attr("transform", config.axis_rotated ? "rotate(-90)" : "").attr('dx', $$.gridTextDx).attr('dy', -5).style("opacity", 0);
- // update
- yv = $$.yv.bind($$);
- $$.ygridLines.select('line').transition().duration(duration).attr("x1", config.axis_rotated ? yv : 0).attr("x2", config.axis_rotated ? yv : $$.width).attr("y1", config.axis_rotated ? 0 : yv).attr("y2", config.axis_rotated ? $$.height : yv).style("opacity", 1);
- $$.ygridLines.select('text').transition().duration(duration).attr("x", config.axis_rotated ? $$.xGridTextX.bind($$) : $$.yGridTextX.bind($$)).attr("y", yv).text(function (d) {
- return d.text;
- }).style("opacity", 1);
- // exit
- $$.ygridLines.exit().transition().duration(duration).style("opacity", 0).remove();
-};
-c3_chart_internal_fn.redrawGrid = function (withTransition) {
- var $$ = this,
- config = $$.config,
- xv = $$.xv.bind($$),
- lines = $$.xgridLines.select('line'),
- texts = $$.xgridLines.select('text');
- return [(withTransition ? lines.transition() : lines).attr("x1", config.axis_rotated ? 0 : xv).attr("x2", config.axis_rotated ? $$.width : xv).attr("y1", config.axis_rotated ? xv : 0).attr("y2", config.axis_rotated ? xv : $$.height).style("opacity", 1), (withTransition ? texts.transition() : texts).attr("x", config.axis_rotated ? $$.yGridTextX.bind($$) : $$.xGridTextX.bind($$)).attr("y", xv).text(function (d) {
- return d.text;
- }).style("opacity", 1)];
-};
-c3_chart_internal_fn.showXGridFocus = function (selectedData) {
- var $$ = this,
- config = $$.config,
- dataToShow = selectedData.filter(function (d) {
- return d && isValue(d.value);
- }),
- focusEl = $$.main.selectAll('line.' + CLASS.xgridFocus),
- xx = $$.xx.bind($$);
- if (!config.tooltip_show) {
- return;
- }
- // Hide when scatter plot exists
- if ($$.hasType('scatter') || $$.hasArcType()) {
- return;
- }
- focusEl.style("visibility", "visible").data([dataToShow[0]]).attr(config.axis_rotated ? 'y1' : 'x1', xx).attr(config.axis_rotated ? 'y2' : 'x2', xx);
- $$.smoothLines(focusEl, 'grid');
-};
-c3_chart_internal_fn.hideXGridFocus = function () {
- this.main.select('line.' + CLASS.xgridFocus).style("visibility", "hidden");
-};
-c3_chart_internal_fn.updateXgridFocus = function () {
- var $$ = this,
- config = $$.config;
- $$.main.select('line.' + CLASS.xgridFocus).attr("x1", config.axis_rotated ? 0 : -10).attr("x2", config.axis_rotated ? $$.width : -10).attr("y1", config.axis_rotated ? -10 : 0).attr("y2", config.axis_rotated ? -10 : $$.height);
-};
-c3_chart_internal_fn.generateGridData = function (type, scale) {
- var $$ = this,
- gridData = [],
- xDomain,
- firstYear,
- lastYear,
- i,
- tickNum = $$.main.select("." + CLASS.axisX).selectAll('.tick').size();
- if (type === 'year') {
- xDomain = $$.getXDomain();
- firstYear = xDomain[0].getFullYear();
- lastYear = xDomain[1].getFullYear();
- for (i = firstYear; i <= lastYear; i++) {
- gridData.push(new Date(i + '-01-01 00:00:00'));
- }
- } else {
- gridData = scale.ticks(10);
- if (gridData.length > tickNum) {
- // use only int
- gridData = gridData.filter(function (d) {
- return ("" + d).indexOf('.') < 0;
- });
- }
- }
- return gridData;
-};
-c3_chart_internal_fn.getGridFilterToRemove = function (params) {
- return params ? function (line) {
- var found = false;
- [].concat(params).forEach(function (param) {
- if ('value' in param && line.value === param.value || 'class' in param && line['class'] === param['class']) {
- found = true;
- }
- });
- return found;
- } : function () {
- return true;
- };
-};
-c3_chart_internal_fn.removeGridLines = function (params, forX) {
- var $$ = this,
- config = $$.config,
- toRemove = $$.getGridFilterToRemove(params),
- toShow = function toShow(line) {
- return !toRemove(line);
- },
- classLines = forX ? CLASS.xgridLines : CLASS.ygridLines,
- classLine = forX ? CLASS.xgridLine : CLASS.ygridLine;
- $$.main.select('.' + classLines).selectAll('.' + classLine).filter(toRemove).transition().duration(config.transition_duration).style('opacity', 0).remove();
- if (forX) {
- config.grid_x_lines = config.grid_x_lines.filter(toShow);
- } else {
- config.grid_y_lines = config.grid_y_lines.filter(toShow);
- }
-};
-
-c3_chart_internal_fn.initEventRect = function () {
- var $$ = this;
- $$.main.select('.' + CLASS.chart).append("g").attr("class", CLASS.eventRects).style('fill-opacity', 0);
-};
-c3_chart_internal_fn.redrawEventRect = function () {
- var $$ = this,
- config = $$.config,
- eventRectUpdate,
- maxDataCountTarget,
- isMultipleX = $$.isMultipleX();
-
- // rects for mouseover
- var eventRects = $$.main.select('.' + CLASS.eventRects).style('cursor', config.zoom_enabled ? config.axis_rotated ? 'ns-resize' : 'ew-resize' : null).classed(CLASS.eventRectsMultiple, isMultipleX).classed(CLASS.eventRectsSingle, !isMultipleX);
-
- // clear old rects
- eventRects.selectAll('.' + CLASS.eventRect).remove();
-
- // open as public variable
- $$.eventRect = eventRects.selectAll('.' + CLASS.eventRect);
-
- if (isMultipleX) {
- eventRectUpdate = $$.eventRect.data([0]);
- // enter : only one rect will be added
- $$.generateEventRectsForMultipleXs(eventRectUpdate.enter());
- // update
- $$.updateEventRect(eventRectUpdate);
- // exit : not needed because always only one rect exists
- } else {
- // Set data and update $$.eventRect
- maxDataCountTarget = $$.getMaxDataCountTarget($$.data.targets);
- eventRects.datum(maxDataCountTarget ? maxDataCountTarget.values : []);
- $$.eventRect = eventRects.selectAll('.' + CLASS.eventRect);
- eventRectUpdate = $$.eventRect.data(function (d) {
- return d;
- });
- // enter
- $$.generateEventRectsForSingleX(eventRectUpdate.enter());
- // update
- $$.updateEventRect(eventRectUpdate);
- // exit
- eventRectUpdate.exit().remove();
- }
-};
-c3_chart_internal_fn.updateEventRect = function (eventRectUpdate) {
- var $$ = this,
- config = $$.config,
- x,
- y,
- w,
- h,
- rectW,
- rectX;
-
- // set update selection if null
- eventRectUpdate = eventRectUpdate || $$.eventRect.data(function (d) {
- return d;
- });
-
- if ($$.isMultipleX()) {
- // TODO: rotated not supported yet
- x = 0;
- y = 0;
- w = $$.width;
- h = $$.height;
- } else {
- if (($$.isCustomX() || $$.isTimeSeries()) && !$$.isCategorized()) {
-
- // update index for x that is used by prevX and nextX
- $$.updateXs();
-
- rectW = function rectW(d) {
- var prevX = $$.getPrevX(d.index),
- nextX = $$.getNextX(d.index);
-
- // if there this is a single data point make the eventRect full width (or height)
- if (prevX === null && nextX === null) {
- return config.axis_rotated ? $$.height : $$.width;
- }
-
- if (prevX === null) {
- prevX = $$.x.domain()[0];
- }
- if (nextX === null) {
- nextX = $$.x.domain()[1];
- }
-
- return Math.max(0, ($$.x(nextX) - $$.x(prevX)) / 2);
- };
- rectX = function rectX(d) {
- var prevX = $$.getPrevX(d.index),
- nextX = $$.getNextX(d.index),
- thisX = $$.data.xs[d.id][d.index];
-
- // if there this is a single data point position the eventRect at 0
- if (prevX === null && nextX === null) {
- return 0;
- }
-
- if (prevX === null) {
- prevX = $$.x.domain()[0];
- }
-
- return ($$.x(thisX) + $$.x(prevX)) / 2;
- };
- } else {
- rectW = $$.getEventRectWidth();
- rectX = function rectX(d) {
- return $$.x(d.x) - rectW / 2;
- };
- }
- x = config.axis_rotated ? 0 : rectX;
- y = config.axis_rotated ? rectX : 0;
- w = config.axis_rotated ? $$.width : rectW;
- h = config.axis_rotated ? rectW : $$.height;
- }
-
- eventRectUpdate.attr('class', $$.classEvent.bind($$)).attr("x", x).attr("y", y).attr("width", w).attr("height", h);
-};
-c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {
- var $$ = this,
- d3 = $$.d3,
- config = $$.config;
- eventRectEnter.append("rect").attr("class", $$.classEvent.bind($$)).style("cursor", config.data_selection_enabled && config.data_selection_grouped ? "pointer" : null).on('mouseover', function (d) {
- var index = d.index;
-
- if ($$.dragging || $$.flowing) {
- return;
- } // do nothing while dragging/flowing
- if ($$.hasArcType()) {
- return;
- }
-
- // Expand shapes for selection
- if (config.point_focus_expand_enabled) {
- $$.expandCircles(index, null, true);
- }
- $$.expandBars(index, null, true);
-
- // Call event handler
- $$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) {
- config.data_onmouseover.call($$.api, d);
- });
- }).on('mouseout', function (d) {
- var index = d.index;
- if (!$$.config) {
- return;
- } // chart is destroyed
- if ($$.hasArcType()) {
- return;
- }
- $$.hideXGridFocus();
- $$.hideTooltip();
- // Undo expanded shapes
- $$.unexpandCircles();
- $$.unexpandBars();
- // Call event handler
- $$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) {
- config.data_onmouseout.call($$.api, d);
- });
- }).on('mousemove', function (d) {
- var selectedData,
- index = d.index,
- eventRect = $$.svg.select('.' + CLASS.eventRect + '-' + index);
-
- if ($$.dragging || $$.flowing) {
- return;
- } // do nothing while dragging/flowing
- if ($$.hasArcType()) {
- return;
- }
-
- if ($$.isStepType(d) && $$.config.line_step_type === 'step-after' && d3.mouse(this)[0] < $$.x($$.getXValue(d.id, index))) {
- index -= 1;
- }
-
- // Show tooltip
- selectedData = $$.filterTargetsToShow($$.data.targets).map(function (t) {
- return $$.addName($$.getValueOnIndex(t.values, index));
- });
-
- if (config.tooltip_grouped) {
- $$.showTooltip(selectedData, this);
- $$.showXGridFocus(selectedData);
- }
-
- if (config.tooltip_grouped && (!config.data_selection_enabled || config.data_selection_grouped)) {
- return;
- }
-
- $$.main.selectAll('.' + CLASS.shape + '-' + index).each(function () {
- d3.select(this).classed(CLASS.EXPANDED, true);
- if (config.data_selection_enabled) {
- eventRect.style('cursor', config.data_selection_grouped ? 'pointer' : null);
- }
- if (!config.tooltip_grouped) {
- $$.hideXGridFocus();
- $$.hideTooltip();
- if (!config.data_selection_grouped) {
- $$.unexpandCircles(index);
- $$.unexpandBars(index);
- }
- }
- }).filter(function (d) {
- return $$.isWithinShape(this, d);
- }).each(function (d) {
- if (config.data_selection_enabled && (config.data_selection_grouped || config.data_selection_isselectable(d))) {
- eventRect.style('cursor', 'pointer');
- }
- if (!config.tooltip_grouped) {
- $$.showTooltip([d], this);
- $$.showXGridFocus([d]);
- if (config.point_focus_expand_enabled) {
- $$.expandCircles(index, d.id, true);
- }
- $$.expandBars(index, d.id, true);
- }
- });
- }).on('click', function (d) {
- var index = d.index;
- if ($$.hasArcType() || !$$.toggleShape) {
- return;
- }
- if ($$.cancelClick) {
- $$.cancelClick = false;
- return;
- }
- if ($$.isStepType(d) && config.line_step_type === 'step-after' && d3.mouse(this)[0] < $$.x($$.getXValue(d.id, index))) {
- index -= 1;
- }
- $$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) {
- if (config.data_selection_grouped || $$.isWithinShape(this, d)) {
- $$.toggleShape(this, d, index);
- $$.config.data_onclick.call($$.api, d, this);
- }
- });
- }).call(config.data_selection_draggable && $$.drag ? d3.behavior.drag().origin(Object).on('drag', function () {
- $$.drag(d3.mouse(this));
- }).on('dragstart', function () {
- $$.dragstart(d3.mouse(this));
- }).on('dragend', function () {
- $$.dragend();
- }) : function () {});
-};
-
-c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter) {
- var $$ = this,
- d3 = $$.d3,
- config = $$.config;
-
- function mouseout() {
- $$.svg.select('.' + CLASS.eventRect).style('cursor', null);
- $$.hideXGridFocus();
- $$.hideTooltip();
- $$.unexpandCircles();
- $$.unexpandBars();
- }
-
- eventRectEnter.append('rect').attr('x', 0).attr('y', 0).attr('width', $$.width).attr('height', $$.height).attr('class', CLASS.eventRect).on('mouseout', function () {
- if (!$$.config) {
- return;
- } // chart is destroyed
- if ($$.hasArcType()) {
- return;
- }
- mouseout();
- }).on('mousemove', function () {
- var targetsToShow = $$.filterTargetsToShow($$.data.targets);
- var mouse, closest, sameXData, selectedData;
-
- if ($$.dragging) {
- return;
- } // do nothing when dragging
- if ($$.hasArcType(targetsToShow)) {
- return;
- }
-
- mouse = d3.mouse(this);
- closest = $$.findClosestFromTargets(targetsToShow, mouse);
-
- if ($$.mouseover && (!closest || closest.id !== $$.mouseover.id)) {
- config.data_onmouseout.call($$.api, $$.mouseover);
- $$.mouseover = undefined;
- }
-
- if (!closest) {
- mouseout();
- return;
- }
-
- if ($$.isScatterType(closest) || !config.tooltip_grouped) {
- sameXData = [closest];
- } else {
- sameXData = $$.filterByX(targetsToShow, closest.x);
- }
-
- // show tooltip when cursor is close to some point
- selectedData = sameXData.map(function (d) {
- return $$.addName(d);
- });
- $$.showTooltip(selectedData, this);
-
- // expand points
- if (config.point_focus_expand_enabled) {
- $$.expandCircles(closest.index, closest.id, true);
- }
- $$.expandBars(closest.index, closest.id, true);
-
- // Show xgrid focus line
- $$.showXGridFocus(selectedData);
-
- // Show cursor as pointer if point is close to mouse position
- if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
- $$.svg.select('.' + CLASS.eventRect).style('cursor', 'pointer');
- if (!$$.mouseover) {
- config.data_onmouseover.call($$.api, closest);
- $$.mouseover = closest;
- }
- }
- }).on('click', function () {
- var targetsToShow = $$.filterTargetsToShow($$.data.targets);
- var mouse, closest;
- if ($$.hasArcType(targetsToShow)) {
- return;
- }
-
- mouse = d3.mouse(this);
- closest = $$.findClosestFromTargets(targetsToShow, mouse);
- if (!closest) {
- return;
- }
- // select if selection enabled
- if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
- $$.main.selectAll('.' + CLASS.shapes + $$.getTargetSelectorSuffix(closest.id)).selectAll('.' + CLASS.shape + '-' + closest.index).each(function () {
- if (config.data_selection_grouped || $$.isWithinShape(this, closest)) {
- $$.toggleShape(this, closest, closest.index);
- $$.config.data_onclick.call($$.api, closest, this);
- }
- });
- }
- }).call(config.data_selection_draggable && $$.drag ? d3.behavior.drag().origin(Object).on('drag', function () {
- $$.drag(d3.mouse(this));
- }).on('dragstart', function () {
- $$.dragstart(d3.mouse(this));
- }).on('dragend', function () {
- $$.dragend();
- }) : function () {});
-};
-c3_chart_internal_fn.dispatchEvent = function (type, index, mouse) {
- var $$ = this,
- selector = '.' + CLASS.eventRect + (!$$.isMultipleX() ? '-' + index : ''),
- eventRect = $$.main.select(selector).node(),
- box = eventRect.getBoundingClientRect(),
- x = box.left + (mouse ? mouse[0] : 0),
- y = box.top + (mouse ? mouse[1] : 0),
- event = document.createEvent("MouseEvents");
-
- event.initMouseEvent(type, true, true, window, 0, x, y, x, y, false, false, false, false, 0, null);
- eventRect.dispatchEvent(event);
-};
-
-c3_chart_internal_fn.initLegend = function () {
- var $$ = this;
- $$.legendItemTextBox = {};
- $$.legendHasRendered = false;
- $$.legend = $$.svg.append("g").attr("transform", $$.getTranslate('legend'));
- if (!$$.config.legend_show) {
- $$.legend.style('visibility', 'hidden');
- $$.hiddenLegendIds = $$.mapToIds($$.data.targets);
- return;
- }
- // MEMO: call here to update legend box and tranlate for all
- // MEMO: translate will be upated by this, so transform not needed in updateLegend()
- $$.updateLegendWithDefaults();
-};
-c3_chart_internal_fn.updateLegendWithDefaults = function () {
- var $$ = this;
- $$.updateLegend($$.mapToIds($$.data.targets), { withTransform: false, withTransitionForTransform: false, withTransition: false });
-};
-c3_chart_internal_fn.updateSizeForLegend = function (legendHeight, legendWidth) {
- var $$ = this,
- config = $$.config,
- insetLegendPosition = {
- top: $$.isLegendTop ? $$.getCurrentPaddingTop() + config.legend_inset_y + 5.5 : $$.currentHeight - legendHeight - $$.getCurrentPaddingBottom() - config.legend_inset_y,
- left: $$.isLegendLeft ? $$.getCurrentPaddingLeft() + config.legend_inset_x + 0.5 : $$.currentWidth - legendWidth - $$.getCurrentPaddingRight() - config.legend_inset_x + 0.5
- };
-
- $$.margin3 = {
- top: $$.isLegendRight ? 0 : $$.isLegendInset ? insetLegendPosition.top : $$.currentHeight - legendHeight,
- right: NaN,
- bottom: 0,
- left: $$.isLegendRight ? $$.currentWidth - legendWidth : $$.isLegendInset ? insetLegendPosition.left : 0
- };
-};
-c3_chart_internal_fn.transformLegend = function (withTransition) {
- var $$ = this;
- (withTransition ? $$.legend.transition() : $$.legend).attr("transform", $$.getTranslate('legend'));
-};
-c3_chart_internal_fn.updateLegendStep = function (step) {
- this.legendStep = step;
-};
-c3_chart_internal_fn.updateLegendItemWidth = function (w) {
- this.legendItemWidth = w;
-};
-c3_chart_internal_fn.updateLegendItemHeight = function (h) {
- this.legendItemHeight = h;
-};
-c3_chart_internal_fn.getLegendWidth = function () {
- var $$ = this;
- return $$.config.legend_show ? $$.isLegendRight || $$.isLegendInset ? $$.legendItemWidth * ($$.legendStep + 1) : $$.currentWidth : 0;
-};
-c3_chart_internal_fn.getLegendHeight = function () {
- var $$ = this,
- h = 0;
- if ($$.config.legend_show) {
- if ($$.isLegendRight) {
- h = $$.currentHeight;
- } else {
- h = Math.max(20, $$.legendItemHeight) * ($$.legendStep + 1);
- }
- }
- return h;
-};
-c3_chart_internal_fn.opacityForLegend = function (legendItem) {
- return legendItem.classed(CLASS.legendItemHidden) ? null : 1;
-};
-c3_chart_internal_fn.opacityForUnfocusedLegend = function (legendItem) {
- return legendItem.classed(CLASS.legendItemHidden) ? null : 0.3;
-};
-c3_chart_internal_fn.toggleFocusLegend = function (targetIds, focus) {
- var $$ = this;
- targetIds = $$.mapToTargetIds(targetIds);
- $$.legend.selectAll('.' + CLASS.legendItem).filter(function (id) {
- return targetIds.indexOf(id) >= 0;
- }).classed(CLASS.legendItemFocused, focus).transition().duration(100).style('opacity', function () {
- var opacity = focus ? $$.opacityForLegend : $$.opacityForUnfocusedLegend;
- return opacity.call($$, $$.d3.select(this));
- });
-};
-c3_chart_internal_fn.revertLegend = function () {
- var $$ = this,
- d3 = $$.d3;
- $$.legend.selectAll('.' + CLASS.legendItem).classed(CLASS.legendItemFocused, false).transition().duration(100).style('opacity', function () {
- return $$.opacityForLegend(d3.select(this));
- });
-};
-c3_chart_internal_fn.showLegend = function (targetIds) {
- var $$ = this,
- config = $$.config;
- if (!config.legend_show) {
- config.legend_show = true;
- $$.legend.style('visibility', 'visible');
- if (!$$.legendHasRendered) {
- $$.updateLegendWithDefaults();
- }
- }
- $$.removeHiddenLegendIds(targetIds);
- $$.legend.selectAll($$.selectorLegends(targetIds)).style('visibility', 'visible').transition().style('opacity', function () {
- return $$.opacityForLegend($$.d3.select(this));
- });
-};
-c3_chart_internal_fn.hideLegend = function (targetIds) {
- var $$ = this,
- config = $$.config;
- if (config.legend_show && isEmpty(targetIds)) {
- config.legend_show = false;
- $$.legend.style('visibility', 'hidden');
- }
- $$.addHiddenLegendIds(targetIds);
- $$.legend.selectAll($$.selectorLegends(targetIds)).style('opacity', 0).style('visibility', 'hidden');
-};
-c3_chart_internal_fn.clearLegendItemTextBoxCache = function () {
- this.legendItemTextBox = {};
-};
-c3_chart_internal_fn.updateLegend = function (targetIds, options, transitions) {
- var $$ = this,
- config = $$.config;
- var xForLegend, xForLegendText, xForLegendRect, yForLegend, yForLegendText, yForLegendRect, x1ForLegendTile, x2ForLegendTile, yForLegendTile;
- var paddingTop = 4,
- paddingRight = 10,
- maxWidth = 0,
- maxHeight = 0,
- posMin = 10,
- tileWidth = config.legend_item_tile_width + 5;
- var l,
- totalLength = 0,
- offsets = {},
- widths = {},
- heights = {},
- margins = [0],
- steps = {},
- step = 0;
- var withTransition, withTransitionForTransform;
- var texts, rects, tiles, background;
-
- // Skip elements when their name is set to null
- targetIds = targetIds.filter(function (id) {
- return !isDefined(config.data_names[id]) || config.data_names[id] !== null;
- });
-
- options = options || {};
- withTransition = getOption(options, "withTransition", true);
- withTransitionForTransform = getOption(options, "withTransitionForTransform", true);
-
- function getTextBox(textElement, id) {
- if (!$$.legendItemTextBox[id]) {
- $$.legendItemTextBox[id] = $$.getTextRect(textElement.textContent, CLASS.legendItem, textElement);
- }
- return $$.legendItemTextBox[id];
- }
-
- function updatePositions(textElement, id, index) {
- var reset = index === 0,
- isLast = index === targetIds.length - 1,
- box = getTextBox(textElement, id),
- itemWidth = box.width + tileWidth + (isLast && !($$.isLegendRight || $$.isLegendInset) ? 0 : paddingRight) + config.legend_padding,
- itemHeight = box.height + paddingTop,
- itemLength = $$.isLegendRight || $$.isLegendInset ? itemHeight : itemWidth,
- areaLength = $$.isLegendRight || $$.isLegendInset ? $$.getLegendHeight() : $$.getLegendWidth(),
- margin,
- maxLength;
-
- // MEMO: care about condifion of step, totalLength
- function updateValues(id, withoutStep) {
- if (!withoutStep) {
- margin = (areaLength - totalLength - itemLength) / 2;
- if (margin < posMin) {
- margin = (areaLength - itemLength) / 2;
- totalLength = 0;
- step++;
- }
- }
- steps[id] = step;
- margins[step] = $$.isLegendInset ? 10 : margin;
- offsets[id] = totalLength;
- totalLength += itemLength;
- }
-
- if (reset) {
- totalLength = 0;
- step = 0;
- maxWidth = 0;
- maxHeight = 0;
- }
-
- if (config.legend_show && !$$.isLegendToShow(id)) {
- widths[id] = heights[id] = steps[id] = offsets[id] = 0;
- return;
- }
-
- widths[id] = itemWidth;
- heights[id] = itemHeight;
-
- if (!maxWidth || itemWidth >= maxWidth) {
- maxWidth = itemWidth;
- }
- if (!maxHeight || itemHeight >= maxHeight) {
- maxHeight = itemHeight;
- }
- maxLength = $$.isLegendRight || $$.isLegendInset ? maxHeight : maxWidth;
-
- if (config.legend_equally) {
- Object.keys(widths).forEach(function (id) {
- widths[id] = maxWidth;
- });
- Object.keys(heights).forEach(function (id) {
- heights[id] = maxHeight;
- });
- margin = (areaLength - maxLength * targetIds.length) / 2;
- if (margin < posMin) {
- totalLength = 0;
- step = 0;
- targetIds.forEach(function (id) {
- updateValues(id);
- });
- } else {
- updateValues(id, true);
- }
- } else {
- updateValues(id);
- }
- }
-
- if ($$.isLegendInset) {
- step = config.legend_inset_step ? config.legend_inset_step : targetIds.length;
- $$.updateLegendStep(step);
- }
-
- if ($$.isLegendRight) {
- xForLegend = function xForLegend(id) {
- return maxWidth * steps[id];
- };
- yForLegend = function yForLegend(id) {
- return margins[steps[id]] + offsets[id];
- };
- } else if ($$.isLegendInset) {
- xForLegend = function xForLegend(id) {
- return maxWidth * steps[id] + 10;
- };
- yForLegend = function yForLegend(id) {
- return margins[steps[id]] + offsets[id];
- };
- } else {
- xForLegend = function xForLegend(id) {
- return margins[steps[id]] + offsets[id];
- };
- yForLegend = function yForLegend(id) {
- return maxHeight * steps[id];
- };
- }
- xForLegendText = function xForLegendText(id, i) {
- return xForLegend(id, i) + 4 + config.legend_item_tile_width;
- };
- yForLegendText = function yForLegendText(id, i) {
- return yForLegend(id, i) + 9;
- };
- xForLegendRect = function xForLegendRect(id, i) {
- return xForLegend(id, i);
- };
- yForLegendRect = function yForLegendRect(id, i) {
- return yForLegend(id, i) - 5;
- };
- x1ForLegendTile = function x1ForLegendTile(id, i) {
- return xForLegend(id, i) - 2;
- };
- x2ForLegendTile = function x2ForLegendTile(id, i) {
- return xForLegend(id, i) - 2 + config.legend_item_tile_width;
- };
- yForLegendTile = function yForLegendTile(id, i) {
- return yForLegend(id, i) + 4;
- };
-
- // Define g for legend area
- l = $$.legend.selectAll('.' + CLASS.legendItem).data(targetIds).enter().append('g').attr('class', function (id) {
- return $$.generateClass(CLASS.legendItem, id);
- }).style('visibility', function (id) {
- return $$.isLegendToShow(id) ? 'visible' : 'hidden';
- }).style('cursor', 'pointer').on('click', function (id) {
- if (config.legend_item_onclick) {
- config.legend_item_onclick.call($$, id);
- } else {
- if ($$.d3.event.altKey) {
- $$.api.hide();
- $$.api.show(id);
- } else {
- $$.api.toggle(id);
- $$.isTargetToShow(id) ? $$.api.focus(id) : $$.api.revert();
- }
- }
- }).on('mouseover', function (id) {
- if (config.legend_item_onmouseover) {
- config.legend_item_onmouseover.call($$, id);
- } else {
- $$.d3.select(this).classed(CLASS.legendItemFocused, true);
- if (!$$.transiting && $$.isTargetToShow(id)) {
- $$.api.focus(id);
- }
- }
- }).on('mouseout', function (id) {
- if (config.legend_item_onmouseout) {
- config.legend_item_onmouseout.call($$, id);
- } else {
- $$.d3.select(this).classed(CLASS.legendItemFocused, false);
- $$.api.revert();
- }
- });
- l.append('text').text(function (id) {
- return isDefined(config.data_names[id]) ? config.data_names[id] : id;
- }).each(function (id, i) {
- updatePositions(this, id, i);
- }).style("pointer-events", "none").attr('x', $$.isLegendRight || $$.isLegendInset ? xForLegendText : -200).attr('y', $$.isLegendRight || $$.isLegendInset ? -200 : yForLegendText);
- l.append('rect').attr("class", CLASS.legendItemEvent).style('fill-opacity', 0).attr('x', $$.isLegendRight || $$.isLegendInset ? xForLegendRect : -200).attr('y', $$.isLegendRight || $$.isLegendInset ? -200 : yForLegendRect);
- l.append('line').attr('class', CLASS.legendItemTile).style('stroke', $$.color).style("pointer-events", "none").attr('x1', $$.isLegendRight || $$.isLegendInset ? x1ForLegendTile : -200).attr('y1', $$.isLegendRight || $$.isLegendInset ? -200 : yForLegendTile).attr('x2', $$.isLegendRight || $$.isLegendInset ? x2ForLegendTile : -200).attr('y2', $$.isLegendRight || $$.isLegendInset ? -200 : yForLegendTile).attr('stroke-width', config.legend_item_tile_height);
-
- // Set background for inset legend
- background = $$.legend.select('.' + CLASS.legendBackground + ' rect');
- if ($$.isLegendInset && maxWidth > 0 && background.size() === 0) {
- background = $$.legend.insert('g', '.' + CLASS.legendItem).attr("class", CLASS.legendBackground).append('rect');
- }
-
- texts = $$.legend.selectAll('text').data(targetIds).text(function (id) {
- return isDefined(config.data_names[id]) ? config.data_names[id] : id;
- } // MEMO: needed for update
- ).each(function (id, i) {
- updatePositions(this, id, i);
- });
- (withTransition ? texts.transition() : texts).attr('x', xForLegendText).attr('y', yForLegendText);
-
- rects = $$.legend.selectAll('rect.' + CLASS.legendItemEvent).data(targetIds);
- (withTransition ? rects.transition() : rects).attr('width', function (id) {
- return widths[id];
- }).attr('height', function (id) {
- return heights[id];
- }).attr('x', xForLegendRect).attr('y', yForLegendRect);
-
- tiles = $$.legend.selectAll('line.' + CLASS.legendItemTile).data(targetIds);
- (withTransition ? tiles.transition() : tiles).style('stroke', $$.color).attr('x1', x1ForLegendTile).attr('y1', yForLegendTile).attr('x2', x2ForLegendTile).attr('y2', yForLegendTile);
-
- if (background) {
- (withTransition ? background.transition() : background).attr('height', $$.getLegendHeight() - 12).attr('width', maxWidth * (step + 1) + 10);
- }
-
- // toggle legend state
- $$.legend.selectAll('.' + CLASS.legendItem).classed(CLASS.legendItemHidden, function (id) {
- return !$$.isTargetToShow(id);
- });
-
- // Update all to reflect change of legend
- $$.updateLegendItemWidth(maxWidth);
- $$.updateLegendItemHeight(maxHeight);
- $$.updateLegendStep(step);
- // Update size and scale
- $$.updateSizes();
- $$.updateScales();
- $$.updateSvgSize();
- // Update g positions
- $$.transformAll(withTransitionForTransform, transitions);
- $$.legendHasRendered = true;
-};
-
-c3_chart_internal_fn.initRegion = function () {
- var $$ = this;
- $$.region = $$.main.append('g').attr("clip-path", $$.clipPath).attr("class", CLASS.regions);
-};
-c3_chart_internal_fn.updateRegion = function (duration) {
- var $$ = this,
- config = $$.config;
-
- // hide if arc type
- $$.region.style('visibility', $$.hasArcType() ? 'hidden' : 'visible');
-
- $$.mainRegion = $$.main.select('.' + CLASS.regions).selectAll('.' + CLASS.region).data(config.regions);
- $$.mainRegion.enter().append('g').append('rect').style("fill-opacity", 0);
- $$.mainRegion.attr('class', $$.classRegion.bind($$));
- $$.mainRegion.exit().transition().duration(duration).style("opacity", 0).remove();
-};
-c3_chart_internal_fn.redrawRegion = function (withTransition) {
- var $$ = this,
- regions = $$.mainRegion.selectAll('rect').each(function () {
- // data is binded to g and it's not transferred to rect (child node) automatically,
- // then data of each rect has to be updated manually.
- // TODO: there should be more efficient way to solve this?
- var parentData = $$.d3.select(this.parentNode).datum();
- $$.d3.select(this).datum(parentData);
- }),
- x = $$.regionX.bind($$),
- y = $$.regionY.bind($$),
- w = $$.regionWidth.bind($$),
- h = $$.regionHeight.bind($$);
- return [(withTransition ? regions.transition() : regions).attr("x", x).attr("y", y).attr("width", w).attr("height", h).style("fill-opacity", function (d) {
- return isValue(d.opacity) ? d.opacity : 0.1;
- })];
-};
-c3_chart_internal_fn.regionX = function (d) {
- var $$ = this,
- config = $$.config,
- xPos,
- yScale = d.axis === 'y' ? $$.y : $$.y2;
- if (d.axis === 'y' || d.axis === 'y2') {
- xPos = config.axis_rotated ? 'start' in d ? yScale(d.start) : 0 : 0;
- } else {
- xPos = config.axis_rotated ? 0 : 'start' in d ? $$.x($$.isTimeSeries() ? $$.parseDate(d.start) : d.start) : 0;
- }
- return xPos;
-};
-c3_chart_internal_fn.regionY = function (d) {
- var $$ = this,
- config = $$.config,
- yPos,
- yScale = d.axis === 'y' ? $$.y : $$.y2;
- if (d.axis === 'y' || d.axis === 'y2') {
- yPos = config.axis_rotated ? 0 : 'end' in d ? yScale(d.end) : 0;
- } else {
- yPos = config.axis_rotated ? 'start' in d ? $$.x($$.isTimeSeries() ? $$.parseDate(d.start) : d.start) : 0 : 0;
- }
- return yPos;
-};
-c3_chart_internal_fn.regionWidth = function (d) {
- var $$ = this,
- config = $$.config,
- start = $$.regionX(d),
- end,
- yScale = d.axis === 'y' ? $$.y : $$.y2;
- if (d.axis === 'y' || d.axis === 'y2') {
- end = config.axis_rotated ? 'end' in d ? yScale(d.end) : $$.width : $$.width;
- } else {
- end = config.axis_rotated ? $$.width : 'end' in d ? $$.x($$.isTimeSeries() ? $$.parseDate(d.end) : d.end) : $$.width;
- }
- return end < start ? 0 : end - start;
-};
-c3_chart_internal_fn.regionHeight = function (d) {
- var $$ = this,
- config = $$.config,
- start = this.regionY(d),
- end,
- yScale = d.axis === 'y' ? $$.y : $$.y2;
- if (d.axis === 'y' || d.axis === 'y2') {
- end = config.axis_rotated ? $$.height : 'start' in d ? yScale(d.start) : $$.height;
- } else {
- end = config.axis_rotated ? 'end' in d ? $$.x($$.isTimeSeries() ? $$.parseDate(d.end) : d.end) : $$.height : $$.height;
- }
- return end < start ? 0 : end - start;
-};
-c3_chart_internal_fn.isRegionOnX = function (d) {
- return !d.axis || d.axis === 'x';
-};
-
-c3_chart_internal_fn.getScale = function (min, max, forTimeseries) {
- return (forTimeseries ? this.d3.time.scale() : this.d3.scale.linear()).range([min, max]);
-};
-c3_chart_internal_fn.getX = function (min, max, domain, offset) {
- var $$ = this,
- scale = $$.getScale(min, max, $$.isTimeSeries()),
- _scale = domain ? scale.domain(domain) : scale,
- key;
- // Define customized scale if categorized axis
- if ($$.isCategorized()) {
- offset = offset || function () {
- return 0;
- };
- scale = function scale(d, raw) {
- var v = _scale(d) + offset(d);
- return raw ? v : Math.ceil(v);
- };
- } else {
- scale = function scale(d, raw) {
- var v = _scale(d);
- return raw ? v : Math.ceil(v);
- };
- }
- // define functions
- for (key in _scale) {
- scale[key] = _scale[key];
- }
- scale.orgDomain = function () {
- return _scale.domain();
- };
- // define custom domain() for categorized axis
- if ($$.isCategorized()) {
- scale.domain = function (domain) {
- if (!arguments.length) {
- domain = this.orgDomain();
- return [domain[0], domain[1] + 1];
- }
- _scale.domain(domain);
- return scale;
- };
- }
- return scale;
-};
-c3_chart_internal_fn.getY = function (min, max, domain) {
- var scale = this.getScale(min, max, this.isTimeSeriesY());
- if (domain) {
- scale.domain(domain);
- }
- return scale;
-};
-c3_chart_internal_fn.getYScale = function (id) {
- return this.axis.getId(id) === 'y2' ? this.y2 : this.y;
-};
-c3_chart_internal_fn.getSubYScale = function (id) {
- return this.axis.getId(id) === 'y2' ? this.subY2 : this.subY;
-};
-c3_chart_internal_fn.updateScales = function () {
- var $$ = this,
- config = $$.config,
- forInit = !$$.x;
- // update edges
- $$.xMin = config.axis_rotated ? 1 : 0;
- $$.xMax = config.axis_rotated ? $$.height : $$.width;
- $$.yMin = config.axis_rotated ? 0 : $$.height;
- $$.yMax = config.axis_rotated ? $$.width : 1;
- $$.subXMin = $$.xMin;
- $$.subXMax = $$.xMax;
- $$.subYMin = config.axis_rotated ? 0 : $$.height2;
- $$.subYMax = config.axis_rotated ? $$.width2 : 1;
- // update scales
- $$.x = $$.getX($$.xMin, $$.xMax, forInit ? undefined : $$.x.orgDomain(), function () {
- return $$.xAxis.tickOffset();
- });
- $$.y = $$.getY($$.yMin, $$.yMax, forInit ? config.axis_y_default : $$.y.domain());
- $$.y2 = $$.getY($$.yMin, $$.yMax, forInit ? config.axis_y2_default : $$.y2.domain());
- $$.subX = $$.getX($$.xMin, $$.xMax, $$.orgXDomain, function (d) {
- return d % 1 ? 0 : $$.subXAxis.tickOffset();
- });
- $$.subY = $$.getY($$.subYMin, $$.subYMax, forInit ? config.axis_y_default : $$.subY.domain());
- $$.subY2 = $$.getY($$.subYMin, $$.subYMax, forInit ? config.axis_y2_default : $$.subY2.domain());
- // update axes
- $$.xAxisTickFormat = $$.axis.getXAxisTickFormat();
- $$.xAxisTickValues = $$.axis.getXAxisTickValues();
- $$.yAxisTickValues = $$.axis.getYAxisTickValues();
- $$.y2AxisTickValues = $$.axis.getY2AxisTickValues();
-
- $$.xAxis = $$.axis.getXAxis($$.x, $$.xOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer);
- $$.subXAxis = $$.axis.getXAxis($$.subX, $$.subXOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer);
- $$.yAxis = $$.axis.getYAxis($$.y, $$.yOrient, config.axis_y_tick_format, $$.yAxisTickValues, config.axis_y_tick_outer);
- $$.y2Axis = $$.axis.getYAxis($$.y2, $$.y2Orient, config.axis_y2_tick_format, $$.y2AxisTickValues, config.axis_y2_tick_outer);
-
- // Set initialized scales to brush and zoom
- if (!forInit) {
- if ($$.brush) {
- $$.brush.scale($$.subX);
- }
- if (config.zoom_enabled) {
- $$.zoom.scale($$.x);
- }
- }
- // update for arc
- if ($$.updateArc) {
- $$.updateArc();
- }
-};
-
-c3_chart_internal_fn.selectPoint = function (target, d, i) {
- var $$ = this,
- config = $$.config,
- cx = (config.axis_rotated ? $$.circleY : $$.circleX).bind($$),
- cy = (config.axis_rotated ? $$.circleX : $$.circleY).bind($$),
- r = $$.pointSelectR.bind($$);
- config.data_onselected.call($$.api, d, target.node());
- // add selected-circle on low layer g
- $$.main.select('.' + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll('.' + CLASS.selectedCircle + '-' + i).data([d]).enter().append('circle').attr("class", function () {
- return $$.generateClass(CLASS.selectedCircle, i);
- }).attr("cx", cx).attr("cy", cy).attr("stroke", function () {
- return $$.color(d);
- }).attr("r", function (d) {
- return $$.pointSelectR(d) * 1.4;
- }).transition().duration(100).attr("r", r);
-};
-c3_chart_internal_fn.unselectPoint = function (target, d, i) {
- var $$ = this;
- $$.config.data_onunselected.call($$.api, d, target.node());
- // remove selected-circle from low layer g
- $$.main.select('.' + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll('.' + CLASS.selectedCircle + '-' + i).transition().duration(100).attr('r', 0).remove();
-};
-c3_chart_internal_fn.togglePoint = function (selected, target, d, i) {
- selected ? this.selectPoint(target, d, i) : this.unselectPoint(target, d, i);
-};
-c3_chart_internal_fn.selectPath = function (target, d) {
- var $$ = this;
- $$.config.data_onselected.call($$, d, target.node());
- if ($$.config.interaction_brighten) {
- target.transition().duration(100).style("fill", function () {
- return $$.d3.rgb($$.color(d)).brighter(0.75);
- });
- }
-};
-c3_chart_internal_fn.unselectPath = function (target, d) {
- var $$ = this;
- $$.config.data_onunselected.call($$, d, target.node());
- if ($$.config.interaction_brighten) {
- target.transition().duration(100).style("fill", function () {
- return $$.color(d);
- });
- }
-};
-c3_chart_internal_fn.togglePath = function (selected, target, d, i) {
- selected ? this.selectPath(target, d, i) : this.unselectPath(target, d, i);
-};
-c3_chart_internal_fn.getToggle = function (that, d) {
- var $$ = this,
- toggle;
- if (that.nodeName === 'circle') {
- if ($$.isStepType(d)) {
- // circle is hidden in step chart, so treat as within the click area
- toggle = function toggle() {}; // TODO: how to select step chart?
- } else {
- toggle = $$.togglePoint;
- }
- } else if (that.nodeName === 'path') {
- toggle = $$.togglePath;
- }
- return toggle;
-};
-c3_chart_internal_fn.toggleShape = function (that, d, i) {
- var $$ = this,
- d3 = $$.d3,
- config = $$.config,
- shape = d3.select(that),
- isSelected = shape.classed(CLASS.SELECTED),
- toggle = $$.getToggle(that, d).bind($$);
-
- if (config.data_selection_enabled && config.data_selection_isselectable(d)) {
- if (!config.data_selection_multiple) {
- $$.main.selectAll('.' + CLASS.shapes + (config.data_selection_grouped ? $$.getTargetSelectorSuffix(d.id) : "")).selectAll('.' + CLASS.shape).each(function (d, i) {
- var shape = d3.select(this);
- if (shape.classed(CLASS.SELECTED)) {
- toggle(false, shape.classed(CLASS.SELECTED, false), d, i);
- }
- });
- }
- shape.classed(CLASS.SELECTED, !isSelected);
- toggle(!isSelected, shape, d, i);
- }
-};
-
-c3_chart_internal_fn.initBar = function () {
- var $$ = this;
- $$.main.select('.' + CLASS.chart).append("g").attr("class", CLASS.chartBars);
-};
-c3_chart_internal_fn.updateTargetsForBar = function (targets) {
- var $$ = this,
- config = $$.config,
- mainBarUpdate,
- mainBarEnter,
- classChartBar = $$.classChartBar.bind($$),
- classBars = $$.classBars.bind($$),
- classFocus = $$.classFocus.bind($$);
- mainBarUpdate = $$.main.select('.' + CLASS.chartBars).selectAll('.' + CLASS.chartBar).data(targets).attr('class', function (d) {
- return classChartBar(d) + classFocus(d);
- });
- mainBarEnter = mainBarUpdate.enter().append('g').attr('class', classChartBar).style("pointer-events", "none");
- // Bars for each data
- mainBarEnter.append('g').attr("class", classBars).style("cursor", function (d) {
- return config.data_selection_isselectable(d) ? "pointer" : null;
- });
-};
-c3_chart_internal_fn.updateBar = function (durationForExit) {
- var $$ = this,
- barData = $$.barData.bind($$),
- classBar = $$.classBar.bind($$),
- initialOpacity = $$.initialOpacity.bind($$),
- color = function color(d) {
- return $$.color(d.id);
- };
- $$.mainBar = $$.main.selectAll('.' + CLASS.bars).selectAll('.' + CLASS.bar).data(barData);
- $$.mainBar.enter().append('path').attr("class", classBar).style("stroke", color).style("fill", color);
- $$.mainBar.style("opacity", initialOpacity);
- $$.mainBar.exit().transition().duration(durationForExit).remove();
-};
-c3_chart_internal_fn.redrawBar = function (drawBar, withTransition) {
- return [(withTransition ? this.mainBar.transition(Math.random().toString()) : this.mainBar).attr('d', drawBar).style("stroke", this.color).style("fill", this.color).style("opacity", 1)];
-};
-c3_chart_internal_fn.getBarW = function (axis, barTargetsNum) {
- var $$ = this,
- config = $$.config,
- w = typeof config.bar_width === 'number' ? config.bar_width : barTargetsNum ? axis.tickInterval() * config.bar_width_ratio / barTargetsNum : 0;
- return config.bar_width_max && w > config.bar_width_max ? config.bar_width_max : w;
-};
-c3_chart_internal_fn.getBars = function (i, id) {
- var $$ = this;
- return (id ? $$.main.selectAll('.' + CLASS.bars + $$.getTargetSelectorSuffix(id)) : $$.main).selectAll('.' + CLASS.bar + (isValue(i) ? '-' + i : ''));
-};
-c3_chart_internal_fn.expandBars = function (i, id, reset) {
- var $$ = this;
- if (reset) {
- $$.unexpandBars();
- }
- $$.getBars(i, id).classed(CLASS.EXPANDED, true);
-};
-c3_chart_internal_fn.unexpandBars = function (i) {
- var $$ = this;
- $$.getBars(i).classed(CLASS.EXPANDED, false);
-};
-c3_chart_internal_fn.generateDrawBar = function (barIndices, isSub) {
- var $$ = this,
- config = $$.config,
- getPoints = $$.generateGetBarPoints(barIndices, isSub);
- return function (d, i) {
- // 4 points that make a bar
- var points = getPoints(d, i);
-
- // switch points if axis is rotated, not applicable for sub chart
- var indexX = config.axis_rotated ? 1 : 0;
- var indexY = config.axis_rotated ? 0 : 1;
-
- var path = 'M ' + points[0][indexX] + ',' + points[0][indexY] + ' ' + 'L' + points[1][indexX] + ',' + points[1][indexY] + ' ' + 'L' + points[2][indexX] + ',' + points[2][indexY] + ' ' + 'L' + points[3][indexX] + ',' + points[3][indexY] + ' ' + 'z';
-
- return path;
- };
-};
-c3_chart_internal_fn.generateGetBarPoints = function (barIndices, isSub) {
- var $$ = this,
- axis = isSub ? $$.subXAxis : $$.xAxis,
- barTargetsNum = barIndices.__max__ + 1,
- barW = $$.getBarW(axis, barTargetsNum),
- barX = $$.getShapeX(barW, barTargetsNum, barIndices, !!isSub),
- barY = $$.getShapeY(!!isSub),
- barOffset = $$.getShapeOffset($$.isBarType, barIndices, !!isSub),
- barSpaceOffset = barW * ($$.config.bar_space / 2),
- yScale = isSub ? $$.getSubYScale : $$.getYScale;
- return function (d, i) {
- var y0 = yScale.call($$, d.id)(0),
- offset = barOffset(d, i) || y0,
- // offset is for stacked bar chart
- posX = barX(d),
- posY = barY(d);
- // fix posY not to overflow opposite quadrant
- if ($$.config.axis_rotated) {
- if (0 < d.value && posY < y0 || d.value < 0 && y0 < posY) {
- posY = y0;
- }
- }
- // 4 points that make a bar
- return [[posX + barSpaceOffset, offset], [posX + barSpaceOffset, posY - (y0 - offset)], [posX + barW - barSpaceOffset, posY - (y0 - offset)], [posX + barW - barSpaceOffset, offset]];
- };
-};
-c3_chart_internal_fn.isWithinBar = function (that) {
- var mouse = this.d3.mouse(that),
- box = that.getBoundingClientRect(),
- seg0 = that.pathSegList.getItem(0),
- seg1 = that.pathSegList.getItem(1),
- x = Math.min(seg0.x, seg1.x),
- y = Math.min(seg0.y, seg1.y),
- w = box.width,
- h = box.height,
- offset = 2,
- sx = x - offset,
- ex = x + w + offset,
- sy = y + h + offset,
- ey = y - offset;
- return sx < mouse[0] && mouse[0] < ex && ey < mouse[1] && mouse[1] < sy;
-};
-
-c3_chart_internal_fn.getShapeIndices = function (typeFilter) {
- var $$ = this,
- config = $$.config,
- indices = {},
- i = 0,
- j,
- k;
- $$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)).forEach(function (d) {
- for (j = 0; j < config.data_groups.length; j++) {
- if (config.data_groups[j].indexOf(d.id) < 0) {
- continue;
- }
- for (k = 0; k < config.data_groups[j].length; k++) {
- if (config.data_groups[j][k] in indices) {
- indices[d.id] = indices[config.data_groups[j][k]];
- break;
- }
- }
- }
- if (isUndefined(indices[d.id])) {
- indices[d.id] = i++;
- }
- });
- indices.__max__ = i - 1;
- return indices;
-};
-c3_chart_internal_fn.getShapeX = function (offset, targetsNum, indices, isSub) {
- var $$ = this,
- scale = isSub ? $$.subX : $$.x;
- return function (d) {
- var index = d.id in indices ? indices[d.id] : 0;
- return d.x || d.x === 0 ? scale(d.x) - offset * (targetsNum / 2 - index) : 0;
- };
-};
-c3_chart_internal_fn.getShapeY = function (isSub) {
- var $$ = this;
- return function (d) {
- var scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id);
- return scale(d.value);
- };
-};
-c3_chart_internal_fn.getShapeOffset = function (typeFilter, indices, isSub) {
- var $$ = this,
- targets = $$.orderTargets($$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$))),
- targetIds = targets.map(function (t) {
- return t.id;
- });
- return function (d, i) {
- var scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id),
- y0 = scale(0),
- offset = y0;
- targets.forEach(function (t) {
- var values = $$.isStepType(d) ? $$.convertValuesToStep(t.values) : t.values;
- if (t.id === d.id || indices[t.id] !== indices[d.id]) {
- return;
- }
- if (targetIds.indexOf(t.id) < targetIds.indexOf(d.id)) {
- // check if the x values line up
- if (typeof values[i] === 'undefined' || +values[i].x !== +d.x) {
- // "+" for timeseries
- // if not, try to find the value that does line up
- i = -1;
- values.forEach(function (v, j) {
- if (v.x === d.x) {
- i = j;
- }
- });
- }
- if (i in values && values[i].value * d.value >= 0) {
- offset += scale(values[i].value) - y0;
- }
- }
- });
- return offset;
- };
-};
-c3_chart_internal_fn.isWithinShape = function (that, d) {
- var $$ = this,
- shape = $$.d3.select(that),
- isWithin;
- if (!$$.isTargetToShow(d.id)) {
- isWithin = false;
- } else if (that.nodeName === 'circle') {
- isWithin = $$.isStepType(d) ? $$.isWithinStep(that, $$.getYScale(d.id)(d.value)) : $$.isWithinCircle(that, $$.pointSelectR(d) * 1.5);
- } else if (that.nodeName === 'path') {
- isWithin = shape.classed(CLASS.bar) ? $$.isWithinBar(that) : true;
- }
- return isWithin;
-};
-
-c3_chart_internal_fn.getInterpolate = function (d) {
- var $$ = this,
- interpolation = $$.isInterpolationType($$.config.spline_interpolation_type) ? $$.config.spline_interpolation_type : 'cardinal';
- return $$.isSplineType(d) ? interpolation : $$.isStepType(d) ? $$.config.line_step_type : "linear";
-};
-
-c3_chart_internal_fn.initLine = function () {
- var $$ = this;
- $$.main.select('.' + CLASS.chart).append("g").attr("class", CLASS.chartLines);
-};
-c3_chart_internal_fn.updateTargetsForLine = function (targets) {
- var $$ = this,
- config = $$.config,
- mainLineUpdate,
- mainLineEnter,
- classChartLine = $$.classChartLine.bind($$),
- classLines = $$.classLines.bind($$),
- classAreas = $$.classAreas.bind($$),
- classCircles = $$.classCircles.bind($$),
- classFocus = $$.classFocus.bind($$);
- mainLineUpdate = $$.main.select('.' + CLASS.chartLines).selectAll('.' + CLASS.chartLine).data(targets).attr('class', function (d) {
- return classChartLine(d) + classFocus(d);
- });
- mainLineEnter = mainLineUpdate.enter().append('g').attr('class', classChartLine).style('opacity', 0).style("pointer-events", "none");
- // Lines for each data
- mainLineEnter.append('g').attr("class", classLines);
- // Areas
- mainLineEnter.append('g').attr('class', classAreas);
- // Circles for each data point on lines
- mainLineEnter.append('g').attr("class", function (d) {
- return $$.generateClass(CLASS.selectedCircles, d.id);
- });
- mainLineEnter.append('g').attr("class", classCircles).style("cursor", function (d) {
- return config.data_selection_isselectable(d) ? "pointer" : null;
- });
- // Update date for selected circles
- targets.forEach(function (t) {
- $$.main.selectAll('.' + CLASS.selectedCircles + $$.getTargetSelectorSuffix(t.id)).selectAll('.' + CLASS.selectedCircle).each(function (d) {
- d.value = t.values[d.index].value;
- });
- });
- // MEMO: can not keep same color...
- //mainLineUpdate.exit().remove();
-};
-c3_chart_internal_fn.updateLine = function (durationForExit) {
- var $$ = this;
- $$.mainLine = $$.main.selectAll('.' + CLASS.lines).selectAll('.' + CLASS.line).data($$.lineData.bind($$));
- $$.mainLine.enter().append('path').attr('class', $$.classLine.bind($$)).style("stroke", $$.color);
- $$.mainLine.style("opacity", $$.initialOpacity.bind($$)).style('shape-rendering', function (d) {
- return $$.isStepType(d) ? 'crispEdges' : '';
- }).attr('transform', null);
- $$.mainLine.exit().transition().duration(durationForExit).style('opacity', 0).remove();
-};
-c3_chart_internal_fn.redrawLine = function (drawLine, withTransition) {
- return [(withTransition ? this.mainLine.transition(Math.random().toString()) : this.mainLine).attr("d", drawLine).style("stroke", this.color).style("opacity", 1)];
-};
-c3_chart_internal_fn.generateDrawLine = function (lineIndices, isSub) {
- var $$ = this,
- config = $$.config,
- line = $$.d3.svg.line(),
- getPoints = $$.generateGetLinePoints(lineIndices, isSub),
- yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale,
- xValue = function xValue(d) {
- return (isSub ? $$.subxx : $$.xx).call($$, d);
- },
- yValue = function yValue(d, i) {
- return config.data_groups.length > 0 ? getPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)(d.value);
- };
-
- line = config.axis_rotated ? line.x(yValue).y(xValue) : line.x(xValue).y(yValue);
- if (!config.line_connectNull) {
- line = line.defined(function (d) {
- return d.value != null;
- });
- }
- return function (d) {
- var values = config.line_connectNull ? $$.filterRemoveNull(d.values) : d.values,
- x = isSub ? $$.x : $$.subX,
- y = yScaleGetter.call($$, d.id),
- x0 = 0,
- y0 = 0,
- path;
- if ($$.isLineType(d)) {
- if (config.data_regions[d.id]) {
- path = $$.lineWithRegions(values, x, y, config.data_regions[d.id]);
- } else {
- if ($$.isStepType(d)) {
- values = $$.convertValuesToStep(values);
- }
- path = line.interpolate($$.getInterpolate(d))(values);
- }
- } else {
- if (values[0]) {
- x0 = x(values[0].x);
- y0 = y(values[0].value);
- }
- path = config.axis_rotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0;
- }
- return path ? path : "M 0 0";
- };
-};
-c3_chart_internal_fn.generateGetLinePoints = function (lineIndices, isSub) {
- // partial duplication of generateGetBarPoints
- var $$ = this,
- config = $$.config,
- lineTargetsNum = lineIndices.__max__ + 1,
- x = $$.getShapeX(0, lineTargetsNum, lineIndices, !!isSub),
- y = $$.getShapeY(!!isSub),
- lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, !!isSub),
- yScale = isSub ? $$.getSubYScale : $$.getYScale;
- return function (d, i) {
- var y0 = yScale.call($$, d.id)(0),
- offset = lineOffset(d, i) || y0,
- // offset is for stacked area chart
- posX = x(d),
- posY = y(d);
- // fix posY not to overflow opposite quadrant
- if (config.axis_rotated) {
- if (0 < d.value && posY < y0 || d.value < 0 && y0 < posY) {
- posY = y0;
- }
- }
- // 1 point that marks the line position
- return [[posX, posY - (y0 - offset)], [posX, posY - (y0 - offset)], // needed for compatibility
- [posX, posY - (y0 - offset)], // needed for compatibility
- [posX, posY - (y0 - offset)] // needed for compatibility
- ];
- };
-};
-
-c3_chart_internal_fn.lineWithRegions = function (d, x, y, _regions) {
- var $$ = this,
- config = $$.config,
- prev = -1,
- i,
- j,
- s = "M",
- sWithRegion,
- xp,
- yp,
- dx,
- dy,
- dd,
- diff,
- diffx2,
- xOffset = $$.isCategorized() ? 0.5 : 0,
- xValue,
- yValue,
- regions = [];
-
- function isWithinRegions(x, regions) {
- var i;
- for (i = 0; i < regions.length; i++) {
- if (regions[i].start < x && x <= regions[i].end) {
- return true;
- }
- }
- return false;
- }
-
- // Check start/end of regions
- if (isDefined(_regions)) {
- for (i = 0; i < _regions.length; i++) {
- regions[i] = {};
- if (isUndefined(_regions[i].start)) {
- regions[i].start = d[0].x;
- } else {
- regions[i].start = $$.isTimeSeries() ? $$.parseDate(_regions[i].start) : _regions[i].start;
- }
- if (isUndefined(_regions[i].end)) {
- regions[i].end = d[d.length - 1].x;
- } else {
- regions[i].end = $$.isTimeSeries() ? $$.parseDate(_regions[i].end) : _regions[i].end;
- }
- }
- }
-
- // Set scales
- xValue = config.axis_rotated ? function (d) {
- return y(d.value);
- } : function (d) {
- return x(d.x);
- };
- yValue = config.axis_rotated ? function (d) {
- return x(d.x);
- } : function (d) {
- return y(d.value);
- };
-
- // Define svg generator function for region
- function generateM(points) {
- return 'M' + points[0][0] + ' ' + points[0][1] + ' ' + points[1][0] + ' ' + points[1][1];
- }
- if ($$.isTimeSeries()) {
- sWithRegion = function sWithRegion(d0, d1, j, diff) {
- var x0 = d0.x.getTime(),
- x_diff = d1.x - d0.x,
- xv0 = new Date(x0 + x_diff * j),
- xv1 = new Date(x0 + x_diff * (j + diff)),
- points;
- if (config.axis_rotated) {
- points = [[y(yp(j)), x(xv0)], [y(yp(j + diff)), x(xv1)]];
- } else {
- points = [[x(xv0), y(yp(j))], [x(xv1), y(yp(j + diff))]];
- }
- return generateM(points);
- };
- } else {
- sWithRegion = function sWithRegion(d0, d1, j, diff) {
- var points;
- if (config.axis_rotated) {
- points = [[y(yp(j), true), x(xp(j))], [y(yp(j + diff), true), x(xp(j + diff))]];
- } else {
- points = [[x(xp(j), true), y(yp(j))], [x(xp(j + diff), true), y(yp(j + diff))]];
- }
- return generateM(points);
- };
- }
-
- // Generate
- for (i = 0; i < d.length; i++) {
-
- // Draw as normal
- if (isUndefined(regions) || !isWithinRegions(d[i].x, regions)) {
- s += " " + xValue(d[i]) + " " + yValue(d[i]);
- }
- // Draw with region // TODO: Fix for horizotal charts
- else {
- xp = $$.getScale(d[i - 1].x + xOffset, d[i].x + xOffset, $$.isTimeSeries());
- yp = $$.getScale(d[i - 1].value, d[i].value);
-
- dx = x(d[i].x) - x(d[i - 1].x);
- dy = y(d[i].value) - y(d[i - 1].value);
- dd = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));
- diff = 2 / dd;
- diffx2 = diff * 2;
-
- for (j = diff; j <= 1; j += diffx2) {
- s += sWithRegion(d[i - 1], d[i], j, diff);
- }
- }
- prev = d[i].x;
- }
-
- return s;
-};
-
-c3_chart_internal_fn.updateArea = function (durationForExit) {
- var $$ = this,
- d3 = $$.d3;
- $$.mainArea = $$.main.selectAll('.' + CLASS.areas).selectAll('.' + CLASS.area).data($$.lineData.bind($$));
- $$.mainArea.enter().append('path').attr("class", $$.classArea.bind($$)).style("fill", $$.color).style("opacity", function () {
- $$.orgAreaOpacity = +d3.select(this).style('opacity');return 0;
- });
- $$.mainArea.style("opacity", $$.orgAreaOpacity);
- $$.mainArea.exit().transition().duration(durationForExit).style('opacity', 0).remove();
-};
-c3_chart_internal_fn.redrawArea = function (drawArea, withTransition) {
- return [(withTransition ? this.mainArea.transition(Math.random().toString()) : this.mainArea).attr("d", drawArea).style("fill", this.color).style("opacity", this.orgAreaOpacity)];
-};
-c3_chart_internal_fn.generateDrawArea = function (areaIndices, isSub) {
- var $$ = this,
- config = $$.config,
- area = $$.d3.svg.area(),
- getPoints = $$.generateGetAreaPoints(areaIndices, isSub),
- yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale,
- xValue = function xValue(d) {
- return (isSub ? $$.subxx : $$.xx).call($$, d);
- },
- value0 = function value0(d, i) {
- return config.data_groups.length > 0 ? getPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)($$.getAreaBaseValue(d.id));
- },
- value1 = function value1(d, i) {
- return config.data_groups.length > 0 ? getPoints(d, i)[1][1] : yScaleGetter.call($$, d.id)(d.value);
- };
-
- area = config.axis_rotated ? area.x0(value0).x1(value1).y(xValue) : area.x(xValue).y0(config.area_above ? 0 : value0).y1(value1);
- if (!config.line_connectNull) {
- area = area.defined(function (d) {
- return d.value !== null;
- });
- }
-
- return function (d) {
- var values = config.line_connectNull ? $$.filterRemoveNull(d.values) : d.values,
- x0 = 0,
- y0 = 0,
- path;
- if ($$.isAreaType(d)) {
- if ($$.isStepType(d)) {
- values = $$.convertValuesToStep(values);
- }
- path = area.interpolate($$.getInterpolate(d))(values);
- } else {
- if (values[0]) {
- x0 = $$.x(values[0].x);
- y0 = $$.getYScale(d.id)(values[0].value);
- }
- path = config.axis_rotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0;
- }
- return path ? path : "M 0 0";
- };
-};
-c3_chart_internal_fn.getAreaBaseValue = function () {
- return 0;
-};
-c3_chart_internal_fn.generateGetAreaPoints = function (areaIndices, isSub) {
- // partial duplication of generateGetBarPoints
- var $$ = this,
- config = $$.config,
- areaTargetsNum = areaIndices.__max__ + 1,
- x = $$.getShapeX(0, areaTargetsNum, areaIndices, !!isSub),
- y = $$.getShapeY(!!isSub),
- areaOffset = $$.getShapeOffset($$.isAreaType, areaIndices, !!isSub),
- yScale = isSub ? $$.getSubYScale : $$.getYScale;
- return function (d, i) {
- var y0 = yScale.call($$, d.id)(0),
- offset = areaOffset(d, i) || y0,
- // offset is for stacked area chart
- posX = x(d),
- posY = y(d);
- // fix posY not to overflow opposite quadrant
- if (config.axis_rotated) {
- if (0 < d.value && posY < y0 || d.value < 0 && y0 < posY) {
- posY = y0;
- }
- }
- // 1 point that marks the area position
- return [[posX, offset], [posX, posY - (y0 - offset)], [posX, posY - (y0 - offset)], // needed for compatibility
- [posX, offset] // needed for compatibility
- ];
- };
-};
-
-c3_chart_internal_fn.updateCircle = function () {
- var $$ = this;
- $$.mainCircle = $$.main.selectAll('.' + CLASS.circles).selectAll('.' + CLASS.circle).data($$.lineOrScatterData.bind($$));
- $$.mainCircle.enter().append("circle").attr("class", $$.classCircle.bind($$)).attr("r", $$.pointR.bind($$)).style("fill", $$.color);
- $$.mainCircle.style("opacity", $$.initialOpacityForCircle.bind($$));
- $$.mainCircle.exit().remove();
-};
-c3_chart_internal_fn.redrawCircle = function (cx, cy, withTransition) {
- var selectedCircles = this.main.selectAll('.' + CLASS.selectedCircle);
- return [(withTransition ? this.mainCircle.transition(Math.random().toString()) : this.mainCircle).style('opacity', this.opacityForCircle.bind(this)).style("fill", this.color).attr("cx", cx).attr("cy", cy), (withTransition ? selectedCircles.transition(Math.random().toString()) : selectedCircles).attr("cx", cx).attr("cy", cy)];
-};
-c3_chart_internal_fn.circleX = function (d) {
- return d.x || d.x === 0 ? this.x(d.x) : null;
-};
-c3_chart_internal_fn.updateCircleY = function () {
- var $$ = this,
- lineIndices,
- getPoints;
- if ($$.config.data_groups.length > 0) {
- lineIndices = $$.getShapeIndices($$.isLineType), getPoints = $$.generateGetLinePoints(lineIndices);
- $$.circleY = function (d, i) {
- return getPoints(d, i)[0][1];
- };
- } else {
- $$.circleY = function (d) {
- return $$.getYScale(d.id)(d.value);
- };
- }
-};
-c3_chart_internal_fn.getCircles = function (i, id) {
- var $$ = this;
- return (id ? $$.main.selectAll('.' + CLASS.circles + $$.getTargetSelectorSuffix(id)) : $$.main).selectAll('.' + CLASS.circle + (isValue(i) ? '-' + i : ''));
-};
-c3_chart_internal_fn.expandCircles = function (i, id, reset) {
- var $$ = this,
- r = $$.pointExpandedR.bind($$);
- if (reset) {
- $$.unexpandCircles();
- }
- $$.getCircles(i, id).classed(CLASS.EXPANDED, true).attr('r', r);
-};
-c3_chart_internal_fn.unexpandCircles = function (i) {
- var $$ = this,
- r = $$.pointR.bind($$);
- $$.getCircles(i).filter(function () {
- return $$.d3.select(this).classed(CLASS.EXPANDED);
- }).classed(CLASS.EXPANDED, false).attr('r', r);
-};
-c3_chart_internal_fn.pointR = function (d) {
- var $$ = this,
- config = $$.config;
- return $$.isStepType(d) ? 0 : isFunction(config.point_r) ? config.point_r(d) : config.point_r;
-};
-c3_chart_internal_fn.pointExpandedR = function (d) {
- var $$ = this,
- config = $$.config;
- if (config.point_focus_expand_enabled) {
- return isFunction(config.point_focus_expand_r) ? config.point_focus_expand_r(d) : config.point_focus_expand_r ? config.point_focus_expand_r : $$.pointR(d) * 1.75;
- } else {
- return $$.pointR(d);
- }
-};
-c3_chart_internal_fn.pointSelectR = function (d) {
- var $$ = this,
- config = $$.config;
- return isFunction(config.point_select_r) ? config.point_select_r(d) : config.point_select_r ? config.point_select_r : $$.pointR(d) * 4;
-};
-c3_chart_internal_fn.isWithinCircle = function (that, r) {
- var d3 = this.d3,
- mouse = d3.mouse(that),
- d3_this = d3.select(that),
- cx = +d3_this.attr("cx"),
- cy = +d3_this.attr("cy");
- return Math.sqrt(Math.pow(cx - mouse[0], 2) + Math.pow(cy - mouse[1], 2)) < r;
-};
-c3_chart_internal_fn.isWithinStep = function (that, y) {
- return Math.abs(y - this.d3.mouse(that)[1]) < 30;
-};
-
-c3_chart_internal_fn.getCurrentWidth = function () {
- var $$ = this,
- config = $$.config;
- return config.size_width ? config.size_width : $$.getParentWidth();
-};
-c3_chart_internal_fn.getCurrentHeight = function () {
- var $$ = this,
- config = $$.config,
- h = config.size_height ? config.size_height : $$.getParentHeight();
- return h > 0 ? h : 320 / ($$.hasType('gauge') && !config.gauge_fullCircle ? 2 : 1);
-};
-c3_chart_internal_fn.getCurrentPaddingTop = function () {
- var $$ = this,
- config = $$.config,
- padding = isValue(config.padding_top) ? config.padding_top : 0;
- if ($$.title && $$.title.node()) {
- padding += $$.getTitlePadding();
- }
- return padding;
-};
-c3_chart_internal_fn.getCurrentPaddingBottom = function () {
- var config = this.config;
- return isValue(config.padding_bottom) ? config.padding_bottom : 0;
-};
-c3_chart_internal_fn.getCurrentPaddingLeft = function (withoutRecompute) {
- var $$ = this,
- config = $$.config;
- if (isValue(config.padding_left)) {
- return config.padding_left;
- } else if (config.axis_rotated) {
- return !config.axis_x_show ? 1 : Math.max(ceil10($$.getAxisWidthByAxisId('x', withoutRecompute)), 40);
- } else if (!config.axis_y_show || config.axis_y_inner) {
- // && !config.axis_rotated
- return $$.axis.getYAxisLabelPosition().isOuter ? 30 : 1;
- } else {
- return ceil10($$.getAxisWidthByAxisId('y', withoutRecompute));
- }
-};
-c3_chart_internal_fn.getCurrentPaddingRight = function () {
- var $$ = this,
- config = $$.config,
- defaultPadding = 10,
- legendWidthOnRight = $$.isLegendRight ? $$.getLegendWidth() + 20 : 0;
- if (isValue(config.padding_right)) {
- return config.padding_right + 1; // 1 is needed not to hide tick line
- } else if (config.axis_rotated) {
- return defaultPadding + legendWidthOnRight;
- } else if (!config.axis_y2_show || config.axis_y2_inner) {
- // && !config.axis_rotated
- return 2 + legendWidthOnRight + ($$.axis.getY2AxisLabelPosition().isOuter ? 20 : 0);
- } else {
- return ceil10($$.getAxisWidthByAxisId('y2')) + legendWidthOnRight;
- }
-};
-
-c3_chart_internal_fn.getParentRectValue = function (key) {
- var parent = this.selectChart.node(),
- v;
- while (parent && parent.tagName !== 'BODY') {
- try {
- v = parent.getBoundingClientRect()[key];
- } catch (e) {
- if (key === 'width') {
- // In IE in certain cases getBoundingClientRect
- // will cause an "unspecified error"
- v = parent.offsetWidth;
- }
- }
- if (v) {
- break;
- }
- parent = parent.parentNode;
- }
- return v;
-};
-c3_chart_internal_fn.getParentWidth = function () {
- return this.getParentRectValue('width');
-};
-c3_chart_internal_fn.getParentHeight = function () {
- var h = this.selectChart.style('height');
- return h.indexOf('px') > 0 ? +h.replace('px', '') : 0;
-};
-
-c3_chart_internal_fn.getSvgLeft = function (withoutRecompute) {
- var $$ = this,
- config = $$.config,
- hasLeftAxisRect = config.axis_rotated || !config.axis_rotated && !config.axis_y_inner,
- leftAxisClass = config.axis_rotated ? CLASS.axisX : CLASS.axisY,
- leftAxis = $$.main.select('.' + leftAxisClass).node(),
- svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : { right: 0 },
- chartRect = $$.selectChart.node().getBoundingClientRect(),
- hasArc = $$.hasArcType(),
- svgLeft = svgRect.right - chartRect.left - (hasArc ? 0 : $$.getCurrentPaddingLeft(withoutRecompute));
- return svgLeft > 0 ? svgLeft : 0;
-};
-
-c3_chart_internal_fn.getAxisWidthByAxisId = function (id, withoutRecompute) {
- var $$ = this,
- position = $$.axis.getLabelPositionById(id);
- return $$.axis.getMaxTickWidth(id, withoutRecompute) + (position.isInner ? 20 : 40);
-};
-c3_chart_internal_fn.getHorizontalAxisHeight = function (axisId) {
- var $$ = this,
- config = $$.config,
- h = 30;
- if (axisId === 'x' && !config.axis_x_show) {
- return 8;
- }
- if (axisId === 'x' && config.axis_x_height) {
- return config.axis_x_height;
- }
- if (axisId === 'y' && !config.axis_y_show) {
- return config.legend_show && !$$.isLegendRight && !$$.isLegendInset ? 10 : 1;
- }
- if (axisId === 'y2' && !config.axis_y2_show) {
- return $$.rotated_padding_top;
- }
- // Calculate x axis height when tick rotated
- if (axisId === 'x' && !config.axis_rotated && config.axis_x_tick_rotate) {
- h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_x_tick_rotate) / 180);
- }
- // Calculate y axis height when tick rotated
- if (axisId === 'y' && config.axis_rotated && config.axis_y_tick_rotate) {
- h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_y_tick_rotate) / 180);
- }
- return h + ($$.axis.getLabelPositionById(axisId).isInner ? 0 : 10) + (axisId === 'y2' ? -10 : 0);
-};
-
-c3_chart_internal_fn.getEventRectWidth = function () {
- return Math.max(0, this.xAxis.tickInterval());
-};
-
-c3_chart_internal_fn.initBrush = function () {
- var $$ = this,
- d3 = $$.d3;
- $$.brush = d3.svg.brush().on("brush", function () {
- $$.redrawForBrush();
- });
- $$.brush.update = function () {
- if ($$.context) {
- $$.context.select('.' + CLASS.brush).call(this);
- }
- return this;
- };
- $$.brush.scale = function (scale) {
- return $$.config.axis_rotated ? this.y(scale) : this.x(scale);
- };
-};
-c3_chart_internal_fn.initSubchart = function () {
- var $$ = this,
- config = $$.config,
- context = $$.context = $$.svg.append("g").attr("transform", $$.getTranslate('context')),
- visibility = config.subchart_show ? 'visible' : 'hidden';
-
- context.style('visibility', visibility);
-
- // Define g for chart area
- context.append('g').attr("clip-path", $$.clipPathForSubchart).attr('class', CLASS.chart);
-
- // Define g for bar chart area
- context.select('.' + CLASS.chart).append("g").attr("class", CLASS.chartBars);
-
- // Define g for line chart area
- context.select('.' + CLASS.chart).append("g").attr("class", CLASS.chartLines);
-
- // Add extent rect for Brush
- context.append("g").attr("clip-path", $$.clipPath).attr("class", CLASS.brush).call($$.brush);
-
- // ATTENTION: This must be called AFTER chart added
- // Add Axis
- $$.axes.subx = context.append("g").attr("class", CLASS.axisX).attr("transform", $$.getTranslate('subx')).attr("clip-path", config.axis_rotated ? "" : $$.clipPathForXAxis).style("visibility", config.subchart_axis_x_show ? visibility : 'hidden');
-};
-c3_chart_internal_fn.updateTargetsForSubchart = function (targets) {
- var $$ = this,
- context = $$.context,
- config = $$.config,
- contextLineEnter,
- contextLineUpdate,
- contextBarEnter,
- contextBarUpdate,
- classChartBar = $$.classChartBar.bind($$),
- classBars = $$.classBars.bind($$),
- classChartLine = $$.classChartLine.bind($$),
- classLines = $$.classLines.bind($$),
- classAreas = $$.classAreas.bind($$);
-
- if (config.subchart_show) {
- //-- Bar --//
- contextBarUpdate = context.select('.' + CLASS.chartBars).selectAll('.' + CLASS.chartBar).data(targets).attr('class', classChartBar);
- contextBarEnter = contextBarUpdate.enter().append('g').style('opacity', 0).attr('class', classChartBar);
- // Bars for each data
- contextBarEnter.append('g').attr("class", classBars);
-
- //-- Line --//
- contextLineUpdate = context.select('.' + CLASS.chartLines).selectAll('.' + CLASS.chartLine).data(targets).attr('class', classChartLine);
- contextLineEnter = contextLineUpdate.enter().append('g').style('opacity', 0).attr('class', classChartLine);
- // Lines for each data
- contextLineEnter.append("g").attr("class", classLines);
- // Area
- contextLineEnter.append("g").attr("class", classAreas);
-
- //-- Brush --//
- context.selectAll('.' + CLASS.brush + ' rect').attr(config.axis_rotated ? "width" : "height", config.axis_rotated ? $$.width2 : $$.height2);
- }
-};
-c3_chart_internal_fn.updateBarForSubchart = function (durationForExit) {
- var $$ = this;
- $$.contextBar = $$.context.selectAll('.' + CLASS.bars).selectAll('.' + CLASS.bar).data($$.barData.bind($$));
- $$.contextBar.enter().append('path').attr("class", $$.classBar.bind($$)).style("stroke", 'none').style("fill", $$.color);
- $$.contextBar.style("opacity", $$.initialOpacity.bind($$));
- $$.contextBar.exit().transition().duration(durationForExit).style('opacity', 0).remove();
-};
-c3_chart_internal_fn.redrawBarForSubchart = function (drawBarOnSub, withTransition, duration) {
- (withTransition ? this.contextBar.transition(Math.random().toString()).duration(duration) : this.contextBar).attr('d', drawBarOnSub).style('opacity', 1);
-};
-c3_chart_internal_fn.updateLineForSubchart = function (durationForExit) {
- var $$ = this;
- $$.contextLine = $$.context.selectAll('.' + CLASS.lines).selectAll('.' + CLASS.line).data($$.lineData.bind($$));
- $$.contextLine.enter().append('path').attr('class', $$.classLine.bind($$)).style('stroke', $$.color);
- $$.contextLine.style("opacity", $$.initialOpacity.bind($$));
- $$.contextLine.exit().transition().duration(durationForExit).style('opacity', 0).remove();
-};
-c3_chart_internal_fn.redrawLineForSubchart = function (drawLineOnSub, withTransition, duration) {
- (withTransition ? this.contextLine.transition(Math.random().toString()).duration(duration) : this.contextLine).attr("d", drawLineOnSub).style('opacity', 1);
-};
-c3_chart_internal_fn.updateAreaForSubchart = function (durationForExit) {
- var $$ = this,
- d3 = $$.d3;
- $$.contextArea = $$.context.selectAll('.' + CLASS.areas).selectAll('.' + CLASS.area).data($$.lineData.bind($$));
- $$.contextArea.enter().append('path').attr("class", $$.classArea.bind($$)).style("fill", $$.color).style("opacity", function () {
- $$.orgAreaOpacity = +d3.select(this).style('opacity');return 0;
- });
- $$.contextArea.style("opacity", 0);
- $$.contextArea.exit().transition().duration(durationForExit).style('opacity', 0).remove();
-};
-c3_chart_internal_fn.redrawAreaForSubchart = function (drawAreaOnSub, withTransition, duration) {
- (withTransition ? this.contextArea.transition(Math.random().toString()).duration(duration) : this.contextArea).attr("d", drawAreaOnSub).style("fill", this.color).style("opacity", this.orgAreaOpacity);
-};
-c3_chart_internal_fn.redrawSubchart = function (withSubchart, transitions, duration, durationForExit, areaIndices, barIndices, lineIndices) {
- var $$ = this,
- d3 = $$.d3,
- config = $$.config,
- drawAreaOnSub,
- drawBarOnSub,
- drawLineOnSub;
-
- $$.context.style('visibility', config.subchart_show ? 'visible' : 'hidden');
-
- // subchart
- if (config.subchart_show) {
- // reflect main chart to extent on subchart if zoomed
- if (d3.event && d3.event.type === 'zoom') {
- $$.brush.extent($$.x.orgDomain()).update();
- }
- // update subchart elements if needed
- if (withSubchart) {
-
- // extent rect
- if (!$$.brush.empty()) {
- $$.brush.extent($$.x.orgDomain()).update();
- }
- // setup drawer - MEMO: this must be called after axis updated
- drawAreaOnSub = $$.generateDrawArea(areaIndices, true);
- drawBarOnSub = $$.generateDrawBar(barIndices, true);
- drawLineOnSub = $$.generateDrawLine(lineIndices, true);
-
- $$.updateBarForSubchart(duration);
- $$.updateLineForSubchart(duration);
- $$.updateAreaForSubchart(duration);
-
- $$.redrawBarForSubchart(drawBarOnSub, duration, duration);
- $$.redrawLineForSubchart(drawLineOnSub, duration, duration);
- $$.redrawAreaForSubchart(drawAreaOnSub, duration, duration);
- }
- }
-};
-c3_chart_internal_fn.redrawForBrush = function () {
- var $$ = this,
- x = $$.x;
- $$.redraw({
- withTransition: false,
- withY: $$.config.zoom_rescale,
- withSubchart: false,
- withUpdateXDomain: true,
- withDimension: false
- });
- $$.config.subchart_onbrush.call($$.api, x.orgDomain());
-};
-c3_chart_internal_fn.transformContext = function (withTransition, transitions) {
- var $$ = this,
- subXAxis;
- if (transitions && transitions.axisSubX) {
- subXAxis = transitions.axisSubX;
- } else {
- subXAxis = $$.context.select('.' + CLASS.axisX);
- if (withTransition) {
- subXAxis = subXAxis.transition();
- }
- }
- $$.context.attr("transform", $$.getTranslate('context'));
- subXAxis.attr("transform", $$.getTranslate('subx'));
-};
-c3_chart_internal_fn.getDefaultExtent = function () {
- var $$ = this,
- config = $$.config,
- extent = isFunction(config.axis_x_extent) ? config.axis_x_extent($$.getXDomain($$.data.targets)) : config.axis_x_extent;
- if ($$.isTimeSeries()) {
- extent = [$$.parseDate(extent[0]), $$.parseDate(extent[1])];
- }
- return extent;
-};
-
-c3_chart_internal_fn.initText = function () {
- var $$ = this;
- $$.main.select('.' + CLASS.chart).append("g").attr("class", CLASS.chartTexts);
- $$.mainText = $$.d3.selectAll([]);
-};
-c3_chart_internal_fn.updateTargetsForText = function (targets) {
- var $$ = this,
- mainTextUpdate,
- mainTextEnter,
- classChartText = $$.classChartText.bind($$),
- classTexts = $$.classTexts.bind($$),
- classFocus = $$.classFocus.bind($$);
- mainTextUpdate = $$.main.select('.' + CLASS.chartTexts).selectAll('.' + CLASS.chartText).data(targets).attr('class', function (d) {
- return classChartText(d) + classFocus(d);
- });
- mainTextEnter = mainTextUpdate.enter().append('g').attr('class', classChartText).style('opacity', 0).style("pointer-events", "none");
- mainTextEnter.append('g').attr('class', classTexts);
-};
-c3_chart_internal_fn.updateText = function (durationForExit) {
- var $$ = this,
- config = $$.config,
- barOrLineData = $$.barOrLineData.bind($$),
- classText = $$.classText.bind($$);
- $$.mainText = $$.main.selectAll('.' + CLASS.texts).selectAll('.' + CLASS.text).data(barOrLineData);
- $$.mainText.enter().append('text').attr("class", classText).attr('text-anchor', function (d) {
- return config.axis_rotated ? d.value < 0 ? 'end' : 'start' : 'middle';
- }).style("stroke", 'none').style("fill", function (d) {
- return $$.color(d);
- }).style("fill-opacity", 0);
- $$.mainText.text(function (d, i, j) {
- return $$.dataLabelFormat(d.id)(d.value, d.id, i, j);
- });
- $$.mainText.exit().transition().duration(durationForExit).style('fill-opacity', 0).remove();
-};
-c3_chart_internal_fn.redrawText = function (xForText, yForText, forFlow, withTransition) {
- return [(withTransition ? this.mainText.transition() : this.mainText).attr('x', xForText).attr('y', yForText).style("fill", this.color).style("fill-opacity", forFlow ? 0 : this.opacityForText.bind(this))];
-};
-c3_chart_internal_fn.getTextRect = function (text, cls, element) {
- var dummy = this.d3.select('body').append('div').classed('c3', true),
- svg = dummy.append("svg").style('visibility', 'hidden').style('position', 'fixed').style('top', 0).style('left', 0),
- font = this.d3.select(element).style('font'),
- rect;
- svg.selectAll('.dummy').data([text]).enter().append('text').classed(cls ? cls : "", true).style('font', font).text(text).each(function () {
- rect = this.getBoundingClientRect();
- });
- dummy.remove();
- return rect;
-};
-c3_chart_internal_fn.generateXYForText = function (areaIndices, barIndices, lineIndices, forX) {
- var $$ = this,
- getAreaPoints = $$.generateGetAreaPoints(areaIndices, false),
- getBarPoints = $$.generateGetBarPoints(barIndices, false),
- getLinePoints = $$.generateGetLinePoints(lineIndices, false),
- getter = forX ? $$.getXForText : $$.getYForText;
- return function (d, i) {
- var getPoints = $$.isAreaType(d) ? getAreaPoints : $$.isBarType(d) ? getBarPoints : getLinePoints;
- return getter.call($$, getPoints(d, i), d, this);
- };
-};
-c3_chart_internal_fn.getXForText = function (points, d, textElement) {
- var $$ = this,
- box = textElement.getBoundingClientRect(),
- xPos,
- padding;
- if ($$.config.axis_rotated) {
- padding = $$.isBarType(d) ? 4 : 6;
- xPos = points[2][1] + padding * (d.value < 0 ? -1 : 1);
- } else {
- xPos = $$.hasType('bar') ? (points[2][0] + points[0][0]) / 2 : points[0][0];
- }
- // show labels regardless of the domain if value is null
- if (d.value === null) {
- if (xPos > $$.width) {
- xPos = $$.width - box.width;
- } else if (xPos < 0) {
- xPos = 4;
- }
- }
- return xPos;
-};
-c3_chart_internal_fn.getYForText = function (points, d, textElement) {
- var $$ = this,
- box = textElement.getBoundingClientRect(),
- yPos;
- if ($$.config.axis_rotated) {
- yPos = (points[0][0] + points[2][0] + box.height * 0.6) / 2;
- } else {
- yPos = points[2][1];
- if (d.value < 0 || d.value === 0 && !$$.hasPositiveValue) {
- yPos += box.height;
- if ($$.isBarType(d) && $$.isSafari()) {
- yPos -= 3;
- } else if (!$$.isBarType(d) && $$.isChrome()) {
- yPos += 3;
- }
- } else {
- yPos += $$.isBarType(d) ? -3 : -6;
- }
- }
- // show labels regardless of the domain if value is null
- if (d.value === null && !$$.config.axis_rotated) {
- if (yPos < box.height) {
- yPos = box.height;
- } else if (yPos > this.height) {
- yPos = this.height - 4;
- }
- }
- return yPos;
-};
-
-c3_chart_internal_fn.initTitle = function () {
- var $$ = this;
- $$.title = $$.svg.append("text").text($$.config.title_text).attr("class", $$.CLASS.title);
-};
-c3_chart_internal_fn.redrawTitle = function () {
- var $$ = this;
- $$.title.attr("x", $$.xForTitle.bind($$)).attr("y", $$.yForTitle.bind($$));
-};
-c3_chart_internal_fn.xForTitle = function () {
- var $$ = this,
- config = $$.config,
- position = config.title_position || 'left',
- x;
- if (position.indexOf('right') >= 0) {
- x = $$.currentWidth - $$.getTextRect($$.title.node().textContent, $$.CLASS.title, $$.title.node()).width - config.title_padding.right;
- } else if (position.indexOf('center') >= 0) {
- x = ($$.currentWidth - $$.getTextRect($$.title.node().textContent, $$.CLASS.title, $$.title.node()).width) / 2;
- } else {
- // left
- x = config.title_padding.left;
- }
- return x;
-};
-c3_chart_internal_fn.yForTitle = function () {
- var $$ = this;
- return $$.config.title_padding.top + $$.getTextRect($$.title.node().textContent, $$.CLASS.title, $$.title.node()).height;
-};
-c3_chart_internal_fn.getTitlePadding = function () {
- var $$ = this;
- return $$.yForTitle() + $$.config.title_padding.bottom;
-};
-
-c3_chart_internal_fn.initTooltip = function () {
- var $$ = this,
- config = $$.config,
- i;
- $$.tooltip = $$.selectChart.style("position", "relative").append("div").attr('class', CLASS.tooltipContainer).style("position", "absolute").style("pointer-events", "none").style("display", "none");
- // Show tooltip if needed
- if (config.tooltip_init_show) {
- if ($$.isTimeSeries() && isString(config.tooltip_init_x)) {
- config.tooltip_init_x = $$.parseDate(config.tooltip_init_x);
- for (i = 0; i < $$.data.targets[0].values.length; i++) {
- if ($$.data.targets[0].values[i].x - config.tooltip_init_x === 0) {
- break;
- }
- }
- config.tooltip_init_x = i;
- }
- $$.tooltip.html(config.tooltip_contents.call($$, $$.data.targets.map(function (d) {
- return $$.addName(d.values[config.tooltip_init_x]);
- }), $$.axis.getXAxisTickFormat(), $$.getYFormat($$.hasArcType()), $$.color));
- $$.tooltip.style("top", config.tooltip_init_position.top).style("left", config.tooltip_init_position.left).style("display", "block");
- }
-};
-c3_chart_internal_fn.getTooltipSortFunction = function () {
- var $$ = this,
- config = $$.config;
-
- if (config.data_groups.length === 0 || config.tooltip_order !== undefined) {
- // if data are not grouped or if an order is specified
- // for the tooltip values we sort them by their values
-
- var order = config.tooltip_order;
- if (order === undefined) {
- order = config.data_order;
- }
-
- var valueOf = function valueOf(obj) {
- return obj ? obj.value : null;
- };
-
- // if data are not grouped, we sort them by their value
- if (isString(order) && order.toLowerCase() === 'asc') {
- return function (a, b) {
- return valueOf(a) - valueOf(b);
- };
- } else if (isString(order) && order.toLowerCase() === 'desc') {
- return function (a, b) {
- return valueOf(b) - valueOf(a);
- };
- } else if (isFunction(order)) {
-
- // if the function is from data_order we need
- // to wrap the returned function in order to format
- // the sorted value to the expected format
-
- var sortFunction = order;
-
- if (config.tooltip_order === undefined) {
- sortFunction = function sortFunction(a, b) {
- return order(a ? {
- id: a.id,
- values: [a]
- } : null, b ? {
- id: b.id,
- values: [b]
- } : null);
- };
- }
-
- return sortFunction;
- } else if (isArray(order)) {
- return function (a, b) {
- return order.indexOf(a.id) - order.indexOf(b.id);
- };
- }
- } else {
- // if data are grouped, we follow the order of grouped targets
- var ids = $$.orderTargets($$.data.targets).map(function (i) {
- return i.id;
- });
-
- // if it was either asc or desc we need to invert the order
- // returned by orderTargets
- if ($$.isOrderAsc() || $$.isOrderDesc()) {
- ids = ids.reverse();
- }
-
- return function (a, b) {
- return ids.indexOf(a.id) - ids.indexOf(b.id);
- };
- }
-};
-c3_chart_internal_fn.getTooltipContent = function (d, defaultTitleFormat, defaultValueFormat, color) {
- var $$ = this,
- config = $$.config,
- titleFormat = config.tooltip_format_title || defaultTitleFormat,
- nameFormat = config.tooltip_format_name || function (name) {
- return name;
- },
- valueFormat = config.tooltip_format_value || defaultValueFormat,
- text,
- i,
- title,
- value,
- name,
- bgcolor;
-
- var tooltipSortFunction = this.getTooltipSortFunction();
- if (tooltipSortFunction) {
- d.sort(tooltipSortFunction);
- }
-
- for (i = 0; i < d.length; i++) {
- if (!(d[i] && (d[i].value || d[i].value === 0))) {
- continue;
- }
-
- if (!text) {
- title = sanitise(titleFormat ? titleFormat(d[i].x) : d[i].x);
- text = "<table class='" + $$.CLASS.tooltip + "'>" + (title || title === 0 ? "<tr><th colspan='2'>" + title + "</th></tr>" : "");
- }
-
- value = sanitise(valueFormat(d[i].value, d[i].ratio, d[i].id, d[i].index, d));
- if (value !== undefined) {
- // Skip elements when their name is set to null
- if (d[i].name === null) {
- continue;
- }
- name = sanitise(nameFormat(d[i].name, d[i].ratio, d[i].id, d[i].index));
- bgcolor = $$.levelColor ? $$.levelColor(d[i].value) : color(d[i].id);
-
- text += "<tr class='" + $$.CLASS.tooltipName + "-" + $$.getTargetSelectorSuffix(d[i].id) + "'>";
- text += "<td class='name'><span style='background-color:" + bgcolor + "'></span>" + name + "</td>";
- text += "<td class='value'>" + value + "</td>";
- text += "</tr>";
- }
- }
- return text + "</table>";
-};
-c3_chart_internal_fn.tooltipPosition = function (dataToShow, tWidth, tHeight, element) {
- var $$ = this,
- config = $$.config,
- d3 = $$.d3;
- var svgLeft, tooltipLeft, tooltipRight, tooltipTop, chartRight;
- var forArc = $$.hasArcType(),
- mouse = d3.mouse(element);
- // Determin tooltip position
- if (forArc) {
- tooltipLeft = ($$.width - ($$.isLegendRight ? $$.getLegendWidth() : 0)) / 2 + mouse[0];
- tooltipTop = $$.height / 2 + mouse[1] + 20;
- } else {
- svgLeft = $$.getSvgLeft(true);
- if (config.axis_rotated) {
- tooltipLeft = svgLeft + mouse[0] + 100;
- tooltipRight = tooltipLeft + tWidth;
- chartRight = $$.currentWidth - $$.getCurrentPaddingRight();
- tooltipTop = $$.x(dataToShow[0].x) + 20;
- } else {
- tooltipLeft = svgLeft + $$.getCurrentPaddingLeft(true) + $$.x(dataToShow[0].x) + 20;
- tooltipRight = tooltipLeft + tWidth;
- chartRight = svgLeft + $$.currentWidth - $$.getCurrentPaddingRight();
- tooltipTop = mouse[1] + 15;
- }
-
- if (tooltipRight > chartRight) {
- // 20 is needed for Firefox to keep tooltip width
- tooltipLeft -= tooltipRight - chartRight + 20;
- }
- if (tooltipTop + tHeight > $$.currentHeight) {
- tooltipTop -= tHeight + 30;
- }
- }
- if (tooltipTop < 0) {
- tooltipTop = 0;
- }
- return { top: tooltipTop, left: tooltipLeft };
-};
-c3_chart_internal_fn.showTooltip = function (selectedData, element) {
- var $$ = this,
- config = $$.config;
- var tWidth, tHeight, position;
- var forArc = $$.hasArcType(),
- dataToShow = selectedData.filter(function (d) {
- return d && isValue(d.value);
- }),
- positionFunction = config.tooltip_position || c3_chart_internal_fn.tooltipPosition;
- if (dataToShow.length === 0 || !config.tooltip_show) {
- return;
- }
- $$.tooltip.html(config.tooltip_contents.call($$, selectedData, $$.axis.getXAxisTickFormat(), $$.getYFormat(forArc), $$.color)).style("display", "block");
-
- // Get tooltip dimensions
- tWidth = $$.tooltip.property('offsetWidth');
- tHeight = $$.tooltip.property('offsetHeight');
-
- position = positionFunction.call(this, dataToShow, tWidth, tHeight, element);
- // Set tooltip
- $$.tooltip.style("top", position.top + "px").style("left", position.left + 'px');
-};
-c3_chart_internal_fn.hideTooltip = function () {
- this.tooltip.style("display", "none");
-};
-
-c3_chart_internal_fn.setTargetType = function (targetIds, type) {
- var $$ = this,
- config = $$.config;
- $$.mapToTargetIds(targetIds).forEach(function (id) {
- $$.withoutFadeIn[id] = type === config.data_types[id];
- config.data_types[id] = type;
- });
- if (!targetIds) {
- config.data_type = type;
- }
-};
-c3_chart_internal_fn.hasType = function (type, targets) {
- var $$ = this,
- types = $$.config.data_types,
- has = false;
- targets = targets || $$.data.targets;
- if (targets && targets.length) {
- targets.forEach(function (target) {
- var t = types[target.id];
- if (t && t.indexOf(type) >= 0 || !t && type === 'line') {
- has = true;
- }
- });
- } else if (Object.keys(types).length) {
- Object.keys(types).forEach(function (id) {
- if (types[id] === type) {
- has = true;
- }
- });
- } else {
- has = $$.config.data_type === type;
- }
- return has;
-};
-c3_chart_internal_fn.hasArcType = function (targets) {
- return this.hasType('pie', targets) || this.hasType('donut', targets) || this.hasType('gauge', targets);
-};
-c3_chart_internal_fn.isLineType = function (d) {
- var config = this.config,
- id = isString(d) ? d : d.id;
- return !config.data_types[id] || ['line', 'spline', 'area', 'area-spline', 'step', 'area-step'].indexOf(config.data_types[id]) >= 0;
-};
-c3_chart_internal_fn.isStepType = function (d) {
- var id = isString(d) ? d : d.id;
- return ['step', 'area-step'].indexOf(this.config.data_types[id]) >= 0;
-};
-c3_chart_internal_fn.isSplineType = function (d) {
- var id = isString(d) ? d : d.id;
- return ['spline', 'area-spline'].indexOf(this.config.data_types[id]) >= 0;
-};
-c3_chart_internal_fn.isAreaType = function (d) {
- var id = isString(d) ? d : d.id;
- return ['area', 'area-spline', 'area-step'].indexOf(this.config.data_types[id]) >= 0;
-};
-c3_chart_internal_fn.isBarType = function (d) {
- var id = isString(d) ? d : d.id;
- return this.config.data_types[id] === 'bar';
-};
-c3_chart_internal_fn.isScatterType = function (d) {
- var id = isString(d) ? d : d.id;
- return this.config.data_types[id] === 'scatter';
-};
-c3_chart_internal_fn.isPieType = function (d) {
- var id = isString(d) ? d : d.id;
- return this.config.data_types[id] === 'pie';
-};
-c3_chart_internal_fn.isGaugeType = function (d) {
- var id = isString(d) ? d : d.id;
- return this.config.data_types[id] === 'gauge';
-};
-c3_chart_internal_fn.isDonutType = function (d) {
- var id = isString(d) ? d : d.id;
- return this.config.data_types[id] === 'donut';
-};
-c3_chart_internal_fn.isArcType = function (d) {
- return this.isPieType(d) || this.isDonutType(d) || this.isGaugeType(d);
-};
-c3_chart_internal_fn.lineData = function (d) {
- return this.isLineType(d) ? [d] : [];
-};
-c3_chart_internal_fn.arcData = function (d) {
- return this.isArcType(d.data) ? [d] : [];
-};
-/* not used
- function scatterData(d) {
- return isScatterType(d) ? d.values : [];
- }
- */
-c3_chart_internal_fn.barData = function (d) {
- return this.isBarType(d) ? d.values : [];
-};
-c3_chart_internal_fn.lineOrScatterData = function (d) {
- return this.isLineType(d) || this.isScatterType(d) ? d.values : [];
-};
-c3_chart_internal_fn.barOrLineData = function (d) {
- return this.isBarType(d) || this.isLineType(d) ? d.values : [];
-};
-c3_chart_internal_fn.isInterpolationType = function (type) {
- return ['linear', 'linear-closed', 'basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'monotone'].indexOf(type) >= 0;
-};
-
-c3_chart_internal_fn.isSafari = function () {
- var ua = window.navigator.userAgent;
- return ua.indexOf('Safari') >= 0 && ua.indexOf('Chrome') < 0;
-};
-c3_chart_internal_fn.isChrome = function () {
- var ua = window.navigator.userAgent;
- return ua.indexOf('Chrome') >= 0;
-};
-
-c3_chart_internal_fn.initZoom = function () {
- var $$ = this,
- d3 = $$.d3,
- config = $$.config,
- startEvent;
-
- $$.zoom = d3.behavior.zoom().on("zoomstart", function () {
- startEvent = d3.event.sourceEvent;
- $$.zoom.altDomain = d3.event.sourceEvent.altKey ? $$.x.orgDomain() : null;
- config.zoom_onzoomstart.call($$.api, d3.event.sourceEvent);
- }).on("zoom", function () {
- $$.redrawForZoom.call($$);
- }).on('zoomend', function () {
- var event = d3.event.sourceEvent;
- // if click, do nothing. otherwise, click interaction will be canceled.
- if (event && startEvent.clientX === event.clientX && startEvent.clientY === event.clientY) {
- return;
- }
- $$.redrawEventRect();
- $$.updateZoom();
- config.zoom_onzoomend.call($$.api, $$.x.orgDomain());
- });
- $$.zoom.scale = function (scale) {
- return config.axis_rotated ? this.y(scale) : this.x(scale);
- };
- $$.zoom.orgScaleExtent = function () {
- var extent = config.zoom_extent ? config.zoom_extent : [1, 10];
- return [extent[0], Math.max($$.getMaxDataCount() / extent[1], extent[1])];
- };
- $$.zoom.updateScaleExtent = function () {
- var ratio = diffDomain($$.x.orgDomain()) / diffDomain($$.getZoomDomain()),
- extent = this.orgScaleExtent();
- this.scaleExtent([extent[0] * ratio, extent[1] * ratio]);
- return this;
- };
-};
-c3_chart_internal_fn.getZoomDomain = function () {
- var $$ = this,
- config = $$.config,
- d3 = $$.d3,
- min = d3.min([$$.orgXDomain[0], config.zoom_x_min]),
- max = d3.max([$$.orgXDomain[1], config.zoom_x_max]);
- return [min, max];
-};
-c3_chart_internal_fn.updateZoom = function () {
- var $$ = this,
- z = $$.config.zoom_enabled ? $$.zoom : function () {};
- $$.main.select('.' + CLASS.zoomRect).call(z).on("dblclick.zoom", null);
- $$.main.selectAll('.' + CLASS.eventRect).call(z).on("dblclick.zoom", null);
-};
-c3_chart_internal_fn.redrawForZoom = function () {
- var $$ = this,
- d3 = $$.d3,
- config = $$.config,
- zoom = $$.zoom,
- x = $$.x;
- if (!config.zoom_enabled) {
- return;
- }
- if ($$.filterTargetsToShow($$.data.targets).length === 0) {
- return;
- }
- if (d3.event.sourceEvent.type === 'mousemove' && zoom.altDomain) {
- x.domain(zoom.altDomain);
- zoom.scale(x).updateScaleExtent();
- return;
- }
- if ($$.isCategorized() && x.orgDomain()[0] === $$.orgXDomain[0]) {
- x.domain([$$.orgXDomain[0] - 1e-10, x.orgDomain()[1]]);
- }
- $$.redraw({
- withTransition: false,
- withY: config.zoom_rescale,
- withSubchart: false,
- withEventRect: false,
- withDimension: false
- });
- if (d3.event.sourceEvent.type === 'mousemove') {
- $$.cancelClick = true;
- }
- config.zoom_onzoom.call($$.api, x.orgDomain());
-};
-
-return c3$1;
-
-})));
diff --git a/debian/missing-sources/clipboard-polyfill-be05dad.ts b/debian/missing-sources/clipboard-polyfill-be05dad.ts
deleted file mode 100644
index 602cadb1..00000000
--- a/debian/missing-sources/clipboard-polyfill-be05dad.ts
+++ /dev/null
@@ -1,270 +0,0 @@
-import {Promise} from "es6-promise";
-import {DT, suppressDTWarnings} from "./DT";
-
-// Debug log strings should be short, since they are copmiled into the production build.
-// TODO: Compile debug logging code out of production builds?
-var debugLog: (s: string) => void = function(s: string) {};
-var showWarnings = true;
-var warn = (console.warn || console.log).bind(console, "[clipboard-polyfill]");
-
-var TEXT_PLAIN = "text/plain";
-
-export default class ClipboardPolyfill {
- public static readonly DT = DT;
-
- public static setDebugLog(f: (s: string) => void): void {
- debugLog = f;
- }
-
- public static suppressWarnings() {
- showWarnings = false;
- suppressDTWarnings();
- }
-
- public static write(data: DT): Promise<void> {
- if (showWarnings && !data.getData(TEXT_PLAIN)) {
- warn("clipboard.write() was called without a "+
- "`text/plain` data type. On some platforms, this may result in an "+
- "empty clipboard. Call clipboard.suppressWarnings() "+
- "to suppress this warning.");
- }
-
- return new Promise<void>((resolve, reject) => {
- // Internet Explorer
- if (seemToBeInIE()) {
- if (writeIE(data)) {
- resolve()
- } else {
- reject(new Error("Copying failed, possibly because the user rejected it."));
- }
- return;
- }
-
- var tracker = execCopy(data);
- if (tracker.success) {
- debugLog("regular execCopy worked");
- resolve();
- return;
- }
-
- // Success detection on Edge is not possible, due to bugs in all 4
- // detection mechanisms we could try to use. Assume success.
- if (navigator.userAgent.indexOf("Edge") > -1) {
- debugLog("UA \"Edge\" => assuming success");
- resolve();
- return;
- }
-
- // Fallback 1 for desktop Safari.
- tracker = copyUsingTempSelection(document.body, data);
- if (tracker.success) {
- debugLog("copyUsingTempSelection worked");
- resolve();
- return;
- }
-
- // Fallback 2 for desktop Safari.
- tracker = copyUsingTempElem(data);
- if (tracker.success) {
- debugLog("copyUsingTempElem worked");
- resolve();
- return;
- }
-
- // Fallback for iOS Safari.
- var text = data.getData(TEXT_PLAIN);
- if (text !== undefined && copyTextUsingDOM(text)) {
- debugLog("copyTextUsingDOM worked");
- resolve();
- return;
- }
-
- reject(new Error("Copy command failed."));
- });
- }
-
- public static writeText(s: string): Promise<void> {
- var dt = new DT();
- dt.setData(TEXT_PLAIN, s);
- return this.write(dt);
- }
-
- public static read(): Promise<DT> {
- return new Promise((resolve, reject) => {
- if (seemToBeInIE()) {
- readIE().then(
- (s: string) => resolve(DTFromText(s)),
- reject
- );
- return;
- }
- // TODO: Attempt to read using async clipboard API.
- reject("Read is not supported in your browser.")
- });
- }
-
- public static readText(): Promise<string> {
- if (seemToBeInIE()) {
- return readIE();
- }
- return new Promise((resolve, reject) => {
- // TODO: Attempt to read using async clipboard API.
- reject("Read is not supported in your browser.")
- });
- }
-}
-
-/******** Implementations ********/
-
-class FallbackTracker {
- public success: boolean = false;
-}
-
-function copyListener(tracker: FallbackTracker, data: DT, e: ClipboardEvent): void {
- debugLog("listener called");
- tracker.success = true;
- data.forEach((value: string, key: string) => {
- e.clipboardData.setData(key, value);
- if (key === TEXT_PLAIN && e.clipboardData.getData(key) != value) {
- debugLog("setting text/plain failed");
- tracker.success = false;
- }
- });
- e.preventDefault();
-}
-
-function execCopy(data: DT): FallbackTracker {
- var tracker = new FallbackTracker();
- var listener = copyListener.bind(this, tracker, data);
-
- document.addEventListener("copy", listener);
- try {
- // We ignore the return value, since FallbackTracker tells us whether the
- // listener was called. It seems that checking the return value here gives
- // us no extra information in any browser.
- document.execCommand("copy");
- } finally {
- document.removeEventListener("copy", listener);
- }
- return tracker;
-}
-
-// Create a temporary DOM element to select, so that `execCommand()` is not
-// rejected.
-function copyUsingTempSelection(e: HTMLElement, data: DT): FallbackTracker {
- selectionSet(e);
- var tracker = execCopy(data);
- selectionClear();
- return tracker;
-}
-
-// Create a temporary DOM element to select, so that `execCommand()` is not
-// rejected.
-function copyUsingTempElem(data: DT): FallbackTracker {
- var tempElem = document.createElement("div");
- // Place some text in the elem so that Safari has something to select.
- tempElem.textContent = "temporary element";
- document.body.appendChild(tempElem);
-
- var tracker = copyUsingTempSelection(tempElem, data);
-
- document.body.removeChild(tempElem);
- return tracker;
-}
-
-// Uses shadow DOM.
-function copyTextUsingDOM(str: string): boolean {
- debugLog("copyTextUsingDOM");
-
- var tempElem = document.createElement("div");
- // Use shadow DOM if available.
- var spanParent: Node = tempElem;
- if (tempElem.attachShadow) {
- debugLog("Using shadow DOM.");
- spanParent = tempElem.attachShadow({mode: "open"});
- }
-
- var span = document.createElement("span");
- span.innerText = str;
- // span.style.whiteSpace = "pre-wrap"; // TODO: Use `innerText` above instead?
-
- spanParent.appendChild(span);
- document.body.appendChild(tempElem);
- selectionSet(span);
-
- var result = document.execCommand("copy");
-
- selectionClear();
- document.body.removeChild(tempElem);
-
- return result;
-}
-
-/******** Selection ********/
-
-function selectionSet(elem: Element): void {
- var sel = document.getSelection();
- var range = document.createRange();
- range.selectNodeContents(elem);
- sel.removeAllRanges();
- sel.addRange(range);
-}
-
-function selectionClear(): void {
- var sel = document.getSelection();
- sel.removeAllRanges();
-}
-
-/******** Convenience ********/
-
-function DTFromText(s: string): DT {
- var dt = new DT();
- dt.setData(TEXT_PLAIN, s);
- return dt;
-}
-
-/******** Internet Explorer ********/
-
-interface IEWindow extends Window {
- clipboardData: {
- setData: (key: string, value: string) => boolean;
- // Always results in a string: https://msdn.microsoft.com/en-us/library/ms536436(v=vs.85).aspx
- getData: (key: string) => string;
- }
-}
-
-function seemToBeInIE(): boolean {
- return typeof ClipboardEvent === "undefined" &&
- typeof (window as IEWindow).clipboardData !== "undefined" &&
- typeof (window as IEWindow).clipboardData.setData !== "undefined";
-}
-
-function writeIE(data: DT): boolean {
- // IE supports text or URL, but not HTML: https://msdn.microsoft.com/en-us/library/ms536744(v=vs.85).aspx
- // TODO: Write URLs to `text/uri-list`? https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Recommended_drag_types
- var text = data.getData(TEXT_PLAIN);
- if (text !== undefined) {
- return (window as IEWindow).clipboardData.setData("Text", text);
- }
-
- throw ("No `text/plain` value was specified.");
-}
-
-// Returns "" if the read failed, e.g. because the user rejected the permission.
-function readIE(): Promise<string> {
- return new Promise((resolve, reject) => {
- var text = (window as IEWindow).clipboardData.getData("Text");
- if (text === "") {
- reject(new Error("Empty clipboard or could not read plain text from clipboard"));
- } else {
- resolve(text);
- }
- })
-}
-
-/******** Expose `clipboard` on the global object in browser. ********/
-
-// TODO: Figure out how to expose ClipboardPolyfill as self.clipboard using
-// WebPack?
-declare var module: any;
-module.exports = ClipboardPolyfill;
diff --git a/debian/missing-sources/d3-4.12.2.js b/debian/missing-sources/d3-4.12.2.js
deleted file mode 100644
index bd06c10f..00000000
--- a/debian/missing-sources/d3-4.12.2.js
+++ /dev/null
@@ -1,17160 +0,0 @@
-// https://d3js.org Version 4.12.2. Copyright 2017 Mike Bostock.
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
- (factory((global.d3 = global.d3 || {})));
-}(this, (function (exports) { 'use strict';
-
-var version = "4.12.2";
-
-function ascending(a, b) {
- return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
-}
-
-function bisector(compare) {
- if (compare.length === 1) compare = ascendingComparator(compare);
- return {
- left: function(a, x, lo, hi) {
- if (lo == null) lo = 0;
- if (hi == null) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (compare(a[mid], x) < 0) lo = mid + 1;
- else hi = mid;
- }
- return lo;
- },
- right: function(a, x, lo, hi) {
- if (lo == null) lo = 0;
- if (hi == null) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (compare(a[mid], x) > 0) hi = mid;
- else lo = mid + 1;
- }
- return lo;
- }
- };
-}
-
-function ascendingComparator(f) {
- return function(d, x) {
- return ascending(f(d), x);
- };
-}
-
-var ascendingBisect = bisector(ascending);
-var bisectRight = ascendingBisect.right;
-var bisectLeft = ascendingBisect.left;
-
-function pairs(array, f) {
- if (f == null) f = pair;
- var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n);
- while (i < n) pairs[i] = f(p, p = array[++i]);
- return pairs;
-}
-
-function pair(a, b) {
- return [a, b];
-}
-
-function cross(values0, values1, reduce) {
- var n0 = values0.length,
- n1 = values1.length,
- values = new Array(n0 * n1),
- i0,
- i1,
- i,
- value0;
-
- if (reduce == null) reduce = pair;
-
- for (i0 = i = 0; i0 < n0; ++i0) {
- for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) {
- values[i] = reduce(value0, values1[i1]);
- }
- }
-
- return values;
-}
-
-function descending(a, b) {
- return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
-}
-
-function number(x) {
- return x === null ? NaN : +x;
-}
-
-function variance(values, valueof) {
- var n = values.length,
- m = 0,
- i = -1,
- mean = 0,
- value,
- delta,
- sum = 0;
-
- if (valueof == null) {
- while (++i < n) {
- if (!isNaN(value = number(values[i]))) {
- delta = value - mean;
- mean += delta / ++m;
- sum += delta * (value - mean);
- }
- }
- }
-
- else {
- while (++i < n) {
- if (!isNaN(value = number(valueof(values[i], i, values)))) {
- delta = value - mean;
- mean += delta / ++m;
- sum += delta * (value - mean);
- }
- }
- }
-
- if (m > 1) return sum / (m - 1);
-}
-
-function deviation(array, f) {
- var v = variance(array, f);
- return v ? Math.sqrt(v) : v;
-}
-
-function extent(values, valueof) {
- var n = values.length,
- i = -1,
- value,
- min,
- max;
-
- if (valueof == null) {
- while (++i < n) { // Find the first comparable value.
- if ((value = values[i]) != null && value >= value) {
- min = max = value;
- while (++i < n) { // Compare the remaining values.
- if ((value = values[i]) != null) {
- if (min > value) min = value;
- if (max < value) max = value;
- }
- }
- }
- }
- }
-
- else {
- while (++i < n) { // Find the first comparable value.
- if ((value = valueof(values[i], i, values)) != null && value >= value) {
- min = max = value;
- while (++i < n) { // Compare the remaining values.
- if ((value = valueof(values[i], i, values)) != null) {
- if (min > value) min = value;
- if (max < value) max = value;
- }
- }
- }
- }
- }
-
- return [min, max];
-}
-
-var array = Array.prototype;
-
-var slice = array.slice;
-var map = array.map;
-
-function constant(x) {
- return function() {
- return x;
- };
-}
-
-function identity(x) {
- return x;
-}
-
-function sequence(start, stop, step) {
- start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
-
- var i = -1,
- n = Math.max(0, Math.ceil((stop - start) / step)) | 0,
- range = new Array(n);
-
- while (++i < n) {
- range[i] = start + i * step;
- }
-
- return range;
-}
-
-var e10 = Math.sqrt(50);
-var e5 = Math.sqrt(10);
-var e2 = Math.sqrt(2);
-
-function ticks(start, stop, count) {
- var reverse,
- i = -1,
- n,
- ticks,
- step;
-
- stop = +stop, start = +start, count = +count;
- if (start === stop && count > 0) return [start];
- if (reverse = stop < start) n = start, start = stop, stop = n;
- if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
-
- if (step > 0) {
- start = Math.ceil(start / step);
- stop = Math.floor(stop / step);
- ticks = new Array(n = Math.ceil(stop - start + 1));
- while (++i < n) ticks[i] = (start + i) * step;
- } else {
- start = Math.floor(start * step);
- stop = Math.ceil(stop * step);
- ticks = new Array(n = Math.ceil(start - stop + 1));
- while (++i < n) ticks[i] = (start - i) / step;
- }
-
- if (reverse) ticks.reverse();
-
- return ticks;
-}
-
-function tickIncrement(start, stop, count) {
- var step = (stop - start) / Math.max(0, count),
- power = Math.floor(Math.log(step) / Math.LN10),
- error = step / Math.pow(10, power);
- return power >= 0
- ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
- : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
-}
-
-function tickStep(start, stop, count) {
- var step0 = Math.abs(stop - start) / Math.max(0, count),
- step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
- error = step0 / step1;
- if (error >= e10) step1 *= 10;
- else if (error >= e5) step1 *= 5;
- else if (error >= e2) step1 *= 2;
- return stop < start ? -step1 : step1;
-}
-
-function sturges(values) {
- return Math.ceil(Math.log(values.length) / Math.LN2) + 1;
-}
-
-function histogram() {
- var value = identity,
- domain = extent,
- threshold = sturges;
-
- function histogram(data) {
- var i,
- n = data.length,
- x,
- values = new Array(n);
-
- for (i = 0; i < n; ++i) {
- values[i] = value(data[i], i, data);
- }
-
- var xz = domain(values),
- x0 = xz[0],
- x1 = xz[1],
- tz = threshold(values, x0, x1);
-
- // Convert number of thresholds into uniform thresholds.
- if (!Array.isArray(tz)) {
- tz = tickStep(x0, x1, tz);
- tz = sequence(Math.ceil(x0 / tz) * tz, Math.floor(x1 / tz) * tz, tz); // exclusive
- }
-
- // Remove any thresholds outside the domain.
- var m = tz.length;
- while (tz[0] <= x0) tz.shift(), --m;
- while (tz[m - 1] > x1) tz.pop(), --m;
-
- var bins = new Array(m + 1),
- bin;
-
- // Initialize bins.
- for (i = 0; i <= m; ++i) {
- bin = bins[i] = [];
- bin.x0 = i > 0 ? tz[i - 1] : x0;
- bin.x1 = i < m ? tz[i] : x1;
- }
-
- // Assign data to bins by value, ignoring any outside the domain.
- for (i = 0; i < n; ++i) {
- x = values[i];
- if (x0 <= x && x <= x1) {
- bins[bisectRight(tz, x, 0, m)].push(data[i]);
- }
- }
-
- return bins;
- }
-
- histogram.value = function(_) {
- return arguments.length ? (value = typeof _ === "function" ? _ : constant(_), histogram) : value;
- };
-
- histogram.domain = function(_) {
- return arguments.length ? (domain = typeof _ === "function" ? _ : constant([_[0], _[1]]), histogram) : domain;
- };
-
- histogram.thresholds = function(_) {
- return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold;
- };
-
- return histogram;
-}
-
-function threshold(values, p, valueof) {
- if (valueof == null) valueof = number;
- if (!(n = values.length)) return;
- if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);
- if (p >= 1) return +valueof(values[n - 1], n - 1, values);
- var n,
- i = (n - 1) * p,
- i0 = Math.floor(i),
- value0 = +valueof(values[i0], i0, values),
- value1 = +valueof(values[i0 + 1], i0 + 1, values);
- return value0 + (value1 - value0) * (i - i0);
-}
-
-function freedmanDiaconis(values, min, max) {
- values = map.call(values, number).sort(ascending);
- return Math.ceil((max - min) / (2 * (threshold(values, 0.75) - threshold(values, 0.25)) * Math.pow(values.length, -1 / 3)));
-}
-
-function scott(values, min, max) {
- return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(values.length, -1 / 3)));
-}
-
-function max(values, valueof) {
- var n = values.length,
- i = -1,
- value,
- max;
-
- if (valueof == null) {
- while (++i < n) { // Find the first comparable value.
- if ((value = values[i]) != null && value >= value) {
- max = value;
- while (++i < n) { // Compare the remaining values.
- if ((value = values[i]) != null && value > max) {
- max = value;
- }
- }
- }
- }
- }
-
- else {
- while (++i < n) { // Find the first comparable value.
- if ((value = valueof(values[i], i, values)) != null && value >= value) {
- max = value;
- while (++i < n) { // Compare the remaining values.
- if ((value = valueof(values[i], i, values)) != null && value > max) {
- max = value;
- }
- }
- }
- }
- }
-
- return max;
-}
-
-function mean(values, valueof) {
- var n = values.length,
- m = n,
- i = -1,
- value,
- sum = 0;
-
- if (valueof == null) {
- while (++i < n) {
- if (!isNaN(value = number(values[i]))) sum += value;
- else --m;
- }
- }
-
- else {
- while (++i < n) {
- if (!isNaN(value = number(valueof(values[i], i, values)))) sum += value;
- else --m;
- }
- }
-
- if (m) return sum / m;
-}
-
-function median(values, valueof) {
- var n = values.length,
- i = -1,
- value,
- numbers = [];
-
- if (valueof == null) {
- while (++i < n) {
- if (!isNaN(value = number(values[i]))) {
- numbers.push(value);
- }
- }
- }
-
- else {
- while (++i < n) {
- if (!isNaN(value = number(valueof(values[i], i, values)))) {
- numbers.push(value);
- }
- }
- }
-
- return threshold(numbers.sort(ascending), 0.5);
-}
-
-function merge(arrays) {
- var n = arrays.length,
- m,
- i = -1,
- j = 0,
- merged,
- array;
-
- while (++i < n) j += arrays[i].length;
- merged = new Array(j);
-
- while (--n >= 0) {
- array = arrays[n];
- m = array.length;
- while (--m >= 0) {
- merged[--j] = array[m];
- }
- }
-
- return merged;
-}
-
-function min(values, valueof) {
- var n = values.length,
- i = -1,
- value,
- min;
-
- if (valueof == null) {
- while (++i < n) { // Find the first comparable value.
- if ((value = values[i]) != null && value >= value) {
- min = value;
- while (++i < n) { // Compare the remaining values.
- if ((value = values[i]) != null && min > value) {
- min = value;
- }
- }
- }
- }
- }
-
- else {
- while (++i < n) { // Find the first comparable value.
- if ((value = valueof(values[i], i, values)) != null && value >= value) {
- min = value;
- while (++i < n) { // Compare the remaining values.
- if ((value = valueof(values[i], i, values)) != null && min > value) {
- min = value;
- }
- }
- }
- }
- }
-
- return min;
-}
-
-function permute(array, indexes) {
- var i = indexes.length, permutes = new Array(i);
- while (i--) permutes[i] = array[indexes[i]];
- return permutes;
-}
-
-function scan(values, compare) {
- if (!(n = values.length)) return;
- var n,
- i = 0,
- j = 0,
- xi,
- xj = values[j];
-
- if (compare == null) compare = ascending;
-
- while (++i < n) {
- if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) {
- xj = xi, j = i;
- }
- }
-
- if (compare(xj, xj) === 0) return j;
-}
-
-function shuffle(array, i0, i1) {
- var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0),
- t,
- i;
-
- while (m) {
- i = Math.random() * m-- | 0;
- t = array[m + i0];
- array[m + i0] = array[i + i0];
- array[i + i0] = t;
- }
-
- return array;
-}
-
-function sum(values, valueof) {
- var n = values.length,
- i = -1,
- value,
- sum = 0;
-
- if (valueof == null) {
- while (++i < n) {
- if (value = +values[i]) sum += value; // Note: zero and null are equivalent.
- }
- }
-
- else {
- while (++i < n) {
- if (value = +valueof(values[i], i, values)) sum += value;
- }
- }
-
- return sum;
-}
-
-function transpose(matrix) {
- if (!(n = matrix.length)) return [];
- for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) {
- for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {
- row[j] = matrix[j][i];
- }
- }
- return transpose;
-}
-
-function length(d) {
- return d.length;
-}
-
-function zip() {
- return transpose(arguments);
-}
-
-var slice$1 = Array.prototype.slice;
-
-function identity$1(x) {
- return x;
-}
-
-var top = 1;
-var right = 2;
-var bottom = 3;
-var left = 4;
-var epsilon = 1e-6;
-
-function translateX(x) {
- return "translate(" + (x + 0.5) + ",0)";
-}
-
-function translateY(y) {
- return "translate(0," + (y + 0.5) + ")";
-}
-
-function number$1(scale) {
- return function(d) {
- return +scale(d);
- };
-}
-
-function center(scale) {
- var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset.
- if (scale.round()) offset = Math.round(offset);
- return function(d) {
- return +scale(d) + offset;
- };
-}
-
-function entering() {
- return !this.__axis;
-}
-
-function axis(orient, scale) {
- var tickArguments = [],
- tickValues = null,
- tickFormat = null,
- tickSizeInner = 6,
- tickSizeOuter = 6,
- tickPadding = 3,
- k = orient === top || orient === left ? -1 : 1,
- x = orient === left || orient === right ? "x" : "y",
- transform = orient === top || orient === bottom ? translateX : translateY;
-
- function axis(context) {
- var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,
- format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity$1) : tickFormat,
- spacing = Math.max(tickSizeInner, 0) + tickPadding,
- range = scale.range(),
- range0 = +range[0] + 0.5,
- range1 = +range[range.length - 1] + 0.5,
- position = (scale.bandwidth ? center : number$1)(scale.copy()),
- selection = context.selection ? context.selection() : context,
- path = selection.selectAll(".domain").data([null]),
- tick = selection.selectAll(".tick").data(values, scale).order(),
- tickExit = tick.exit(),
- tickEnter = tick.enter().append("g").attr("class", "tick"),
- line = tick.select("line"),
- text = tick.select("text");
-
- path = path.merge(path.enter().insert("path", ".tick")
- .attr("class", "domain")
- .attr("stroke", "#000"));
-
- tick = tick.merge(tickEnter);
-
- line = line.merge(tickEnter.append("line")
- .attr("stroke", "#000")
- .attr(x + "2", k * tickSizeInner));
-
- text = text.merge(tickEnter.append("text")
- .attr("fill", "#000")
- .attr(x, k * spacing)
- .attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em"));
-
- if (context !== selection) {
- path = path.transition(context);
- tick = tick.transition(context);
- line = line.transition(context);
- text = text.transition(context);
-
- tickExit = tickExit.transition(context)
- .attr("opacity", epsilon)
- .attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute("transform"); });
-
- tickEnter
- .attr("opacity", epsilon)
- .attr("transform", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); });
- }
-
- tickExit.remove();
-
- path
- .attr("d", orient === left || orient == right
- ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter
- : "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter);
-
- tick
- .attr("opacity", 1)
- .attr("transform", function(d) { return transform(position(d)); });
-
- line
- .attr(x + "2", k * tickSizeInner);
-
- text
- .attr(x, k * spacing)
- .text(format);
-
- selection.filter(entering)
- .attr("fill", "none")
- .attr("font-size", 10)
- .attr("font-family", "sans-serif")
- .attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle");
-
- selection
- .each(function() { this.__axis = position; });
- }
-
- axis.scale = function(_) {
- return arguments.length ? (scale = _, axis) : scale;
- };
-
- axis.ticks = function() {
- return tickArguments = slice$1.call(arguments), axis;
- };
-
- axis.tickArguments = function(_) {
- return arguments.length ? (tickArguments = _ == null ? [] : slice$1.call(_), axis) : tickArguments.slice();
- };
-
- axis.tickValues = function(_) {
- return arguments.length ? (tickValues = _ == null ? null : slice$1.call(_), axis) : tickValues && tickValues.slice();
- };
-
- axis.tickFormat = function(_) {
- return arguments.length ? (tickFormat = _, axis) : tickFormat;
- };
-
- axis.tickSize = function(_) {
- return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;
- };
-
- axis.tickSizeInner = function(_) {
- return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;
- };
-
- axis.tickSizeOuter = function(_) {
- return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;
- };
-
- axis.tickPadding = function(_) {
- return arguments.length ? (tickPadding = +_, axis) : tickPadding;
- };
-
- return axis;
-}
-
-function axisTop(scale) {
- return axis(top, scale);
-}
-
-function axisRight(scale) {
- return axis(right, scale);
-}
-
-function axisBottom(scale) {
- return axis(bottom, scale);
-}
-
-function axisLeft(scale) {
- return axis(left, scale);
-}
-
-var noop = {value: function() {}};
-
-function dispatch() {
- for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
- if (!(t = arguments[i] + "") || (t in _)) throw new Error("illegal type: " + t);
- _[t] = [];
- }
- return new Dispatch(_);
-}
-
-function Dispatch(_) {
- this._ = _;
-}
-
-function parseTypenames(typenames, types) {
- return typenames.trim().split(/^|\s+/).map(function(t) {
- var name = "", i = t.indexOf(".");
- if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
- if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
- return {type: t, name: name};
- });
-}
-
-Dispatch.prototype = dispatch.prototype = {
- constructor: Dispatch,
- on: function(typename, callback) {
- var _ = this._,
- T = parseTypenames(typename + "", _),
- t,
- i = -1,
- n = T.length;
-
- // If no callback was specified, return the callback of the given type and name.
- if (arguments.length < 2) {
- while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;
- return;
- }
-
- // If a type was specified, set the callback for the given type and name.
- // Otherwise, if a null callback was specified, remove callbacks of the given name.
- if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
- while (++i < n) {
- if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);
- else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);
- }
-
- return this;
- },
- copy: function() {
- var copy = {}, _ = this._;
- for (var t in _) copy[t] = _[t].slice();
- return new Dispatch(copy);
- },
- call: function(type, that) {
- if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
- if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
- for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
- },
- apply: function(type, that, args) {
- if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
- for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
- }
-};
-
-function get(type, name) {
- for (var i = 0, n = type.length, c; i < n; ++i) {
- if ((c = type[i]).name === name) {
- return c.value;
- }
- }
-}
-
-function set(type, name, callback) {
- for (var i = 0, n = type.length; i < n; ++i) {
- if (type[i].name === name) {
- type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));
- break;
- }
- }
- if (callback != null) type.push({name: name, value: callback});
- return type;
-}
-
-var xhtml = "http://www.w3.org/1999/xhtml";
-
-var namespaces = {
- svg: "http://www.w3.org/2000/svg",
- xhtml: xhtml,
- xlink: "http://www.w3.org/1999/xlink",
- xml: "http://www.w3.org/XML/1998/namespace",
- xmlns: "http://www.w3.org/2000/xmlns/"
-};
-
-function namespace(name) {
- var prefix = name += "", i = prefix.indexOf(":");
- if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
- return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name;
-}
-
-function creatorInherit(name) {
- return function() {
- var document = this.ownerDocument,
- uri = this.namespaceURI;
- return uri === xhtml && document.documentElement.namespaceURI === xhtml
- ? document.createElement(name)
- : document.createElementNS(uri, name);
- };
-}
-
-function creatorFixed(fullname) {
- return function() {
- return this.ownerDocument.createElementNS(fullname.space, fullname.local);
- };
-}
-
-function creator(name) {
- var fullname = namespace(name);
- return (fullname.local
- ? creatorFixed
- : creatorInherit)(fullname);
-}
-
-var nextId = 0;
-
-function local$1() {
- return new Local;
-}
-
-function Local() {
- this._ = "@" + (++nextId).toString(36);
-}
-
-Local.prototype = local$1.prototype = {
- constructor: Local,
- get: function(node) {
- var id = this._;
- while (!(id in node)) if (!(node = node.parentNode)) return;
- return node[id];
- },
- set: function(node, value) {
- return node[this._] = value;
- },
- remove: function(node) {
- return this._ in node && delete node[this._];
- },
- toString: function() {
- return this._;
- }
-};
-
-var matcher = function(selector) {
- return function() {
- return this.matches(selector);
- };
-};
-
-if (typeof document !== "undefined") {
- var element = document.documentElement;
- if (!element.matches) {
- var vendorMatches = element.webkitMatchesSelector
- || element.msMatchesSelector
- || element.mozMatchesSelector
- || element.oMatchesSelector;
- matcher = function(selector) {
- return function() {
- return vendorMatches.call(this, selector);
- };
- };
- }
-}
-
-var matcher$1 = matcher;
-
-var filterEvents = {};
-
-exports.event = null;
-
-if (typeof document !== "undefined") {
- var element$1 = document.documentElement;
- if (!("onmouseenter" in element$1)) {
- filterEvents = {mouseenter: "mouseover", mouseleave: "mouseout"};
- }
-}
-
-function filterContextListener(listener, index, group) {
- listener = contextListener(listener, index, group);
- return function(event) {
- var related = event.relatedTarget;
- if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {
- listener.call(this, event);
- }
- };
-}
-
-function contextListener(listener, index, group) {
- return function(event1) {
- var event0 = exports.event; // Events can be reentrant (e.g., focus).
- exports.event = event1;
- try {
- listener.call(this, this.__data__, index, group);
- } finally {
- exports.event = event0;
- }
- };
-}
-
-function parseTypenames$1(typenames) {
- return typenames.trim().split(/^|\s+/).map(function(t) {
- var name = "", i = t.indexOf(".");
- if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
- return {type: t, name: name};
- });
-}
-
-function onRemove(typename) {
- return function() {
- var on = this.__on;
- if (!on) return;
- for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
- if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
- this.removeEventListener(o.type, o.listener, o.capture);
- } else {
- on[++i] = o;
- }
- }
- if (++i) on.length = i;
- else delete this.__on;
- };
-}
-
-function onAdd(typename, value, capture) {
- var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;
- return function(d, i, group) {
- var on = this.__on, o, listener = wrap(value, i, group);
- if (on) for (var j = 0, m = on.length; j < m; ++j) {
- if ((o = on[j]).type === typename.type && o.name === typename.name) {
- this.removeEventListener(o.type, o.listener, o.capture);
- this.addEventListener(o.type, o.listener = listener, o.capture = capture);
- o.value = value;
- return;
- }
- }
- this.addEventListener(typename.type, listener, capture);
- o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};
- if (!on) this.__on = [o];
- else on.push(o);
- };
-}
-
-function selection_on(typename, value, capture) {
- var typenames = parseTypenames$1(typename + ""), i, n = typenames.length, t;
-
- if (arguments.length < 2) {
- var on = this.node().__on;
- if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
- for (i = 0, o = on[j]; i < n; ++i) {
- if ((t = typenames[i]).type === o.type && t.name === o.name) {
- return o.value;
- }
- }
- }
- return;
- }
-
- on = value ? onAdd : onRemove;
- if (capture == null) capture = false;
- for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));
- return this;
-}
-
-function customEvent(event1, listener, that, args) {
- var event0 = exports.event;
- event1.sourceEvent = exports.event;
- exports.event = event1;
- try {
- return listener.apply(that, args);
- } finally {
- exports.event = event0;
- }
-}
-
-function sourceEvent() {
- var current = exports.event, source;
- while (source = current.sourceEvent) current = source;
- return current;
-}
-
-function point(node, event) {
- var svg = node.ownerSVGElement || node;
-
- if (svg.createSVGPoint) {
- var point = svg.createSVGPoint();
- point.x = event.clientX, point.y = event.clientY;
- point = point.matrixTransform(node.getScreenCTM().inverse());
- return [point.x, point.y];
- }
-
- var rect = node.getBoundingClientRect();
- return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
-}
-
-function mouse(node) {
- var event = sourceEvent();
- if (event.changedTouches) event = event.changedTouches[0];
- return point(node, event);
-}
-
-function none() {}
-
-function selector(selector) {
- return selector == null ? none : function() {
- return this.querySelector(selector);
- };
-}
-
-function selection_select(select) {
- if (typeof select !== "function") select = selector(select);
-
- for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
- if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
- if ("__data__" in node) subnode.__data__ = node.__data__;
- subgroup[i] = subnode;
- }
- }
- }
-
- return new Selection(subgroups, this._parents);
-}
-
-function empty$1() {
- return [];
-}
-
-function selectorAll(selector) {
- return selector == null ? empty$1 : function() {
- return this.querySelectorAll(selector);
- };
-}
-
-function selection_selectAll(select) {
- if (typeof select !== "function") select = selectorAll(select);
-
- for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
- if (node = group[i]) {
- subgroups.push(select.call(node, node.__data__, i, group));
- parents.push(node);
- }
- }
- }
-
- return new Selection(subgroups, parents);
-}
-
-function selection_filter(match) {
- if (typeof match !== "function") match = matcher$1(match);
-
- for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
- if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
- subgroup.push(node);
- }
- }
- }
-
- return new Selection(subgroups, this._parents);
-}
-
-function sparse(update) {
- return new Array(update.length);
-}
-
-function selection_enter() {
- return new Selection(this._enter || this._groups.map(sparse), this._parents);
-}
-
-function EnterNode(parent, datum) {
- this.ownerDocument = parent.ownerDocument;
- this.namespaceURI = parent.namespaceURI;
- this._next = null;
- this._parent = parent;
- this.__data__ = datum;
-}
-
-EnterNode.prototype = {
- constructor: EnterNode,
- appendChild: function(child) { return this._parent.insertBefore(child, this._next); },
- insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },
- querySelector: function(selector) { return this._parent.querySelector(selector); },
- querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }
-};
-
-function constant$1(x) {
- return function() {
- return x;
- };
-}
-
-var keyPrefix = "$"; // Protect against keys like “__proto__”.
-
-function bindIndex(parent, group, enter, update, exit, data) {
- var i = 0,
- node,
- groupLength = group.length,
- dataLength = data.length;
-
- // Put any non-null nodes that fit into update.
- // Put any null nodes into enter.
- // Put any remaining data into enter.
- for (; i < dataLength; ++i) {
- if (node = group[i]) {
- node.__data__ = data[i];
- update[i] = node;
- } else {
- enter[i] = new EnterNode(parent, data[i]);
- }
- }
-
- // Put any non-null nodes that don’t fit into exit.
- for (; i < groupLength; ++i) {
- if (node = group[i]) {
- exit[i] = node;
- }
- }
-}
-
-function bindKey(parent, group, enter, update, exit, data, key) {
- var i,
- node,
- nodeByKeyValue = {},
- groupLength = group.length,
- dataLength = data.length,
- keyValues = new Array(groupLength),
- keyValue;
-
- // Compute the key for each node.
- // If multiple nodes have the same key, the duplicates are added to exit.
- for (i = 0; i < groupLength; ++i) {
- if (node = group[i]) {
- keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);
- if (keyValue in nodeByKeyValue) {
- exit[i] = node;
- } else {
- nodeByKeyValue[keyValue] = node;
- }
- }
- }
-
- // Compute the key for each datum.
- // If there a node associated with this key, join and add it to update.
- // If there is not (or the key is a duplicate), add it to enter.
- for (i = 0; i < dataLength; ++i) {
- keyValue = keyPrefix + key.call(parent, data[i], i, data);
- if (node = nodeByKeyValue[keyValue]) {
- update[i] = node;
- node.__data__ = data[i];
- nodeByKeyValue[keyValue] = null;
- } else {
- enter[i] = new EnterNode(parent, data[i]);
- }
- }
-
- // Add any remaining nodes that were not bound to data to exit.
- for (i = 0; i < groupLength; ++i) {
- if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {
- exit[i] = node;
- }
- }
-}
-
-function selection_data(value, key) {
- if (!value) {
- data = new Array(this.size()), j = -1;
- this.each(function(d) { data[++j] = d; });
- return data;
- }
-
- var bind = key ? bindKey : bindIndex,
- parents = this._parents,
- groups = this._groups;
-
- if (typeof value !== "function") value = constant$1(value);
-
- for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
- var parent = parents[j],
- group = groups[j],
- groupLength = group.length,
- data = value.call(parent, parent && parent.__data__, j, parents),
- dataLength = data.length,
- enterGroup = enter[j] = new Array(dataLength),
- updateGroup = update[j] = new Array(dataLength),
- exitGroup = exit[j] = new Array(groupLength);
-
- bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
-
- // Now connect the enter nodes to their following update node, such that
- // appendChild can insert the materialized enter node before this node,
- // rather than at the end of the parent node.
- for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
- if (previous = enterGroup[i0]) {
- if (i0 >= i1) i1 = i0 + 1;
- while (!(next = updateGroup[i1]) && ++i1 < dataLength);
- previous._next = next || null;
- }
- }
- }
-
- update = new Selection(update, parents);
- update._enter = enter;
- update._exit = exit;
- return update;
-}
-
-function selection_exit() {
- return new Selection(this._exit || this._groups.map(sparse), this._parents);
-}
-
-function selection_merge(selection$$1) {
-
- for (var groups0 = this._groups, groups1 = selection$$1._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
- for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
- if (node = group0[i] || group1[i]) {
- merge[i] = node;
- }
- }
- }
-
- for (; j < m0; ++j) {
- merges[j] = groups0[j];
- }
-
- return new Selection(merges, this._parents);
-}
-
-function selection_order() {
-
- for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {
- for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {
- if (node = group[i]) {
- if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);
- next = node;
- }
- }
- }
-
- return this;
-}
-
-function selection_sort(compare) {
- if (!compare) compare = ascending$1;
-
- function compareNode(a, b) {
- return a && b ? compare(a.__data__, b.__data__) : !a - !b;
- }
-
- for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
- for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
- if (node = group[i]) {
- sortgroup[i] = node;
- }
- }
- sortgroup.sort(compareNode);
- }
-
- return new Selection(sortgroups, this._parents).order();
-}
-
-function ascending$1(a, b) {
- return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
-}
-
-function selection_call() {
- var callback = arguments[0];
- arguments[0] = this;
- callback.apply(null, arguments);
- return this;
-}
-
-function selection_nodes() {
- var nodes = new Array(this.size()), i = -1;
- this.each(function() { nodes[++i] = this; });
- return nodes;
-}
-
-function selection_node() {
-
- for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
- for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
- var node = group[i];
- if (node) return node;
- }
- }
-
- return null;
-}
-
-function selection_size() {
- var size = 0;
- this.each(function() { ++size; });
- return size;
-}
-
-function selection_empty() {
- return !this.node();
-}
-
-function selection_each(callback) {
-
- for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
- for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
- if (node = group[i]) callback.call(node, node.__data__, i, group);
- }
- }
-
- return this;
-}
-
-function attrRemove(name) {
- return function() {
- this.removeAttribute(name);
- };
-}
-
-function attrRemoveNS(fullname) {
- return function() {
- this.removeAttributeNS(fullname.space, fullname.local);
- };
-}
-
-function attrConstant(name, value) {
- return function() {
- this.setAttribute(name, value);
- };
-}
-
-function attrConstantNS(fullname, value) {
- return function() {
- this.setAttributeNS(fullname.space, fullname.local, value);
- };
-}
-
-function attrFunction(name, value) {
- return function() {
- var v = value.apply(this, arguments);
- if (v == null) this.removeAttribute(name);
- else this.setAttribute(name, v);
- };
-}
-
-function attrFunctionNS(fullname, value) {
- return function() {
- var v = value.apply(this, arguments);
- if (v == null) this.removeAttributeNS(fullname.space, fullname.local);
- else this.setAttributeNS(fullname.space, fullname.local, v);
- };
-}
-
-function selection_attr(name, value) {
- var fullname = namespace(name);
-
- if (arguments.length < 2) {
- var node = this.node();
- return fullname.local
- ? node.getAttributeNS(fullname.space, fullname.local)
- : node.getAttribute(fullname);
- }
-
- return this.each((value == null
- ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function"
- ? (fullname.local ? attrFunctionNS : attrFunction)
- : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));
-}
-
-function defaultView(node) {
- return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node
- || (node.document && node) // node is a Window
- || node.defaultView; // node is a Document
-}
-
-function styleRemove(name) {
- return function() {
- this.style.removeProperty(name);
- };
-}
-
-function styleConstant(name, value, priority) {
- return function() {
- this.style.setProperty(name, value, priority);
- };
-}
-
-function styleFunction(name, value, priority) {
- return function() {
- var v = value.apply(this, arguments);
- if (v == null) this.style.removeProperty(name);
- else this.style.setProperty(name, v, priority);
- };
-}
-
-function selection_style(name, value, priority) {
- return arguments.length > 1
- ? this.each((value == null
- ? styleRemove : typeof value === "function"
- ? styleFunction
- : styleConstant)(name, value, priority == null ? "" : priority))
- : styleValue(this.node(), name);
-}
-
-function styleValue(node, name) {
- return node.style.getPropertyValue(name)
- || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);
-}
-
-function propertyRemove(name) {
- return function() {
- delete this[name];
- };
-}
-
-function propertyConstant(name, value) {
- return function() {
- this[name] = value;
- };
-}
-
-function propertyFunction(name, value) {
- return function() {
- var v = value.apply(this, arguments);
- if (v == null) delete this[name];
- else this[name] = v;
- };
-}
-
-function selection_property(name, value) {
- return arguments.length > 1
- ? this.each((value == null
- ? propertyRemove : typeof value === "function"
- ? propertyFunction
- : propertyConstant)(name, value))
- : this.node()[name];
-}
-
-function classArray(string) {
- return string.trim().split(/^|\s+/);
-}
-
-function classList(node) {
- return node.classList || new ClassList(node);
-}
-
-function ClassList(node) {
- this._node = node;
- this._names = classArray(node.getAttribute("class") || "");
-}
-
-ClassList.prototype = {
- add: function(name) {
- var i = this._names.indexOf(name);
- if (i < 0) {
- this._names.push(name);
- this._node.setAttribute("class", this._names.join(" "));
- }
- },
- remove: function(name) {
- var i = this._names.indexOf(name);
- if (i >= 0) {
- this._names.splice(i, 1);
- this._node.setAttribute("class", this._names.join(" "));
- }
- },
- contains: function(name) {
- return this._names.indexOf(name) >= 0;
- }
-};
-
-function classedAdd(node, names) {
- var list = classList(node), i = -1, n = names.length;
- while (++i < n) list.add(names[i]);
-}
-
-function classedRemove(node, names) {
- var list = classList(node), i = -1, n = names.length;
- while (++i < n) list.remove(names[i]);
-}
-
-function classedTrue(names) {
- return function() {
- classedAdd(this, names);
- };
-}
-
-function classedFalse(names) {
- return function() {
- classedRemove(this, names);
- };
-}
-
-function classedFunction(names, value) {
- return function() {
- (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
- };
-}
-
-function selection_classed(name, value) {
- var names = classArray(name + "");
-
- if (arguments.length < 2) {
- var list = classList(this.node()), i = -1, n = names.length;
- while (++i < n) if (!list.contains(names[i])) return false;
- return true;
- }
-
- return this.each((typeof value === "function"
- ? classedFunction : value
- ? classedTrue
- : classedFalse)(names, value));
-}
-
-function textRemove() {
- this.textContent = "";
-}
-
-function textConstant(value) {
- return function() {
- this.textContent = value;
- };
-}
-
-function textFunction(value) {
- return function() {
- var v = value.apply(this, arguments);
- this.textContent = v == null ? "" : v;
- };
-}
-
-function selection_text(value) {
- return arguments.length
- ? this.each(value == null
- ? textRemove : (typeof value === "function"
- ? textFunction
- : textConstant)(value))
- : this.node().textContent;
-}
-
-function htmlRemove() {
- this.innerHTML = "";
-}
-
-function htmlConstant(value) {
- return function() {
- this.innerHTML = value;
- };
-}
-
-function htmlFunction(value) {
- return function() {
- var v = value.apply(this, arguments);
- this.innerHTML = v == null ? "" : v;
- };
-}
-
-function selection_html(value) {
- return arguments.length
- ? this.each(value == null
- ? htmlRemove : (typeof value === "function"
- ? htmlFunction
- : htmlConstant)(value))
- : this.node().innerHTML;
-}
-
-function raise() {
- if (this.nextSibling) this.parentNode.appendChild(this);
-}
-
-function selection_raise() {
- return this.each(raise);
-}
-
-function lower() {
- if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
-}
-
-function selection_lower() {
- return this.each(lower);
-}
-
-function selection_append(name) {
- var create = typeof name === "function" ? name : creator(name);
- return this.select(function() {
- return this.appendChild(create.apply(this, arguments));
- });
-}
-
-function constantNull() {
- return null;
-}
-
-function selection_insert(name, before) {
- var create = typeof name === "function" ? name : creator(name),
- select = before == null ? constantNull : typeof before === "function" ? before : selector(before);
- return this.select(function() {
- return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);
- });
-}
-
-function remove() {
- var parent = this.parentNode;
- if (parent) parent.removeChild(this);
-}
-
-function selection_remove() {
- return this.each(remove);
-}
-
-function selection_datum(value) {
- return arguments.length
- ? this.property("__data__", value)
- : this.node().__data__;
-}
-
-function dispatchEvent(node, type, params) {
- var window = defaultView(node),
- event = window.CustomEvent;
-
- if (typeof event === "function") {
- event = new event(type, params);
- } else {
- event = window.document.createEvent("Event");
- if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;
- else event.initEvent(type, false, false);
- }
-
- node.dispatchEvent(event);
-}
-
-function dispatchConstant(type, params) {
- return function() {
- return dispatchEvent(this, type, params);
- };
-}
-
-function dispatchFunction(type, params) {
- return function() {
- return dispatchEvent(this, type, params.apply(this, arguments));
- };
-}
-
-function selection_dispatch(type, params) {
- return this.each((typeof params === "function"
- ? dispatchFunction
- : dispatchConstant)(type, params));
-}
-
-var root = [null];
-
-function Selection(groups, parents) {
- this._groups = groups;
- this._parents = parents;
-}
-
-function selection() {
- return new Selection([[document.documentElement]], root);
-}
-
-Selection.prototype = selection.prototype = {
- constructor: Selection,
- select: selection_select,
- selectAll: selection_selectAll,
- filter: selection_filter,
- data: selection_data,
- enter: selection_enter,
- exit: selection_exit,
- merge: selection_merge,
- order: selection_order,
- sort: selection_sort,
- call: selection_call,
- nodes: selection_nodes,
- node: selection_node,
- size: selection_size,
- empty: selection_empty,
- each: selection_each,
- attr: selection_attr,
- style: selection_style,
- property: selection_property,
- classed: selection_classed,
- text: selection_text,
- html: selection_html,
- raise: selection_raise,
- lower: selection_lower,
- append: selection_append,
- insert: selection_insert,
- remove: selection_remove,
- datum: selection_datum,
- on: selection_on,
- dispatch: selection_dispatch
-};
-
-function select(selector) {
- return typeof selector === "string"
- ? new Selection([[document.querySelector(selector)]], [document.documentElement])
- : new Selection([[selector]], root);
-}
-
-function selectAll(selector) {
- return typeof selector === "string"
- ? new Selection([document.querySelectorAll(selector)], [document.documentElement])
- : new Selection([selector == null ? [] : selector], root);
-}
-
-function touch(node, touches, identifier) {
- if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches;
-
- for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {
- if ((touch = touches[i]).identifier === identifier) {
- return point(node, touch);
- }
- }
-
- return null;
-}
-
-function touches(node, touches) {
- if (touches == null) touches = sourceEvent().touches;
-
- for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) {
- points[i] = point(node, touches[i]);
- }
-
- return points;
-}
-
-function nopropagation() {
- exports.event.stopImmediatePropagation();
-}
-
-function noevent() {
- exports.event.preventDefault();
- exports.event.stopImmediatePropagation();
-}
-
-function dragDisable(view) {
- var root = view.document.documentElement,
- selection = select(view).on("dragstart.drag", noevent, true);
- if ("onselectstart" in root) {
- selection.on("selectstart.drag", noevent, true);
- } else {
- root.__noselect = root.style.MozUserSelect;
- root.style.MozUserSelect = "none";
- }
-}
-
-function yesdrag(view, noclick) {
- var root = view.document.documentElement,
- selection = select(view).on("dragstart.drag", null);
- if (noclick) {
- selection.on("click.drag", noevent, true);
- setTimeout(function() { selection.on("click.drag", null); }, 0);
- }
- if ("onselectstart" in root) {
- selection.on("selectstart.drag", null);
- } else {
- root.style.MozUserSelect = root.__noselect;
- delete root.__noselect;
- }
-}
-
-function constant$2(x) {
- return function() {
- return x;
- };
-}
-
-function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) {
- this.target = target;
- this.type = type;
- this.subject = subject;
- this.identifier = id;
- this.active = active;
- this.x = x;
- this.y = y;
- this.dx = dx;
- this.dy = dy;
- this._ = dispatch;
-}
-
-DragEvent.prototype.on = function() {
- var value = this._.on.apply(this._, arguments);
- return value === this._ ? this : value;
-};
-
-// Ignore right-click, since that should open the context menu.
-function defaultFilter$1() {
- return !exports.event.button;
-}
-
-function defaultContainer() {
- return this.parentNode;
-}
-
-function defaultSubject(d) {
- return d == null ? {x: exports.event.x, y: exports.event.y} : d;
-}
-
-function defaultTouchable() {
- return "ontouchstart" in this;
-}
-
-function drag() {
- var filter = defaultFilter$1,
- container = defaultContainer,
- subject = defaultSubject,
- touchable = defaultTouchable,
- gestures = {},
- listeners = dispatch("start", "drag", "end"),
- active = 0,
- mousedownx,
- mousedowny,
- mousemoving,
- touchending,
- clickDistance2 = 0;
-
- function drag(selection) {
- selection
- .on("mousedown.drag", mousedowned)
- .filter(touchable)
- .on("touchstart.drag", touchstarted)
- .on("touchmove.drag", touchmoved)
- .on("touchend.drag touchcancel.drag", touchended)
- .style("touch-action", "none")
- .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
- }
-
- function mousedowned() {
- if (touchending || !filter.apply(this, arguments)) return;
- var gesture = beforestart("mouse", container.apply(this, arguments), mouse, this, arguments);
- if (!gesture) return;
- select(exports.event.view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true);
- dragDisable(exports.event.view);
- nopropagation();
- mousemoving = false;
- mousedownx = exports.event.clientX;
- mousedowny = exports.event.clientY;
- gesture("start");
- }
-
- function mousemoved() {
- noevent();
- if (!mousemoving) {
- var dx = exports.event.clientX - mousedownx, dy = exports.event.clientY - mousedowny;
- mousemoving = dx * dx + dy * dy > clickDistance2;
- }
- gestures.mouse("drag");
- }
-
- function mouseupped() {
- select(exports.event.view).on("mousemove.drag mouseup.drag", null);
- yesdrag(exports.event.view, mousemoving);
- noevent();
- gestures.mouse("end");
- }
-
- function touchstarted() {
- if (!filter.apply(this, arguments)) return;
- var touches = exports.event.changedTouches,
- c = container.apply(this, arguments),
- n = touches.length, i, gesture;
-
- for (i = 0; i < n; ++i) {
- if (gesture = beforestart(touches[i].identifier, c, touch, this, arguments)) {
- nopropagation();
- gesture("start");
- }
- }
- }
-
- function touchmoved() {
- var touches = exports.event.changedTouches,
- n = touches.length, i, gesture;
-
- for (i = 0; i < n; ++i) {
- if (gesture = gestures[touches[i].identifier]) {
- noevent();
- gesture("drag");
- }
- }
- }
-
- function touchended() {
- var touches = exports.event.changedTouches,
- n = touches.length, i, gesture;
-
- if (touchending) clearTimeout(touchending);
- touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!
- for (i = 0; i < n; ++i) {
- if (gesture = gestures[touches[i].identifier]) {
- nopropagation();
- gesture("end");
- }
- }
- }
-
- function beforestart(id, container, point, that, args) {
- var p = point(container, id), s, dx, dy,
- sublisteners = listeners.copy();
-
- if (!customEvent(new DragEvent(drag, "beforestart", s, id, active, p[0], p[1], 0, 0, sublisteners), function() {
- if ((exports.event.subject = s = subject.apply(that, args)) == null) return false;
- dx = s.x - p[0] || 0;
- dy = s.y - p[1] || 0;
- return true;
- })) return;
-
- return function gesture(type) {
- var p0 = p, n;
- switch (type) {
- case "start": gestures[id] = gesture, n = active++; break;
- case "end": delete gestures[id], --active; // nobreak
- case "drag": p = point(container, id), n = active; break;
- }
- customEvent(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);
- };
- }
-
- drag.filter = function(_) {
- return arguments.length ? (filter = typeof _ === "function" ? _ : constant$2(!!_), drag) : filter;
- };
-
- drag.container = function(_) {
- return arguments.length ? (container = typeof _ === "function" ? _ : constant$2(_), drag) : container;
- };
-
- drag.subject = function(_) {
- return arguments.length ? (subject = typeof _ === "function" ? _ : constant$2(_), drag) : subject;
- };
-
- drag.touchable = function(_) {
- return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$2(!!_), drag) : touchable;
- };
-
- drag.on = function() {
- var value = listeners.on.apply(listeners, arguments);
- return value === listeners ? drag : value;
- };
-
- drag.clickDistance = function(_) {
- return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);
- };
-
- return drag;
-}
-
-function define(constructor, factory, prototype) {
- constructor.prototype = factory.prototype = prototype;
- prototype.constructor = constructor;
-}
-
-function extend(parent, definition) {
- var prototype = Object.create(parent.prototype);
- for (var key in definition) prototype[key] = definition[key];
- return prototype;
-}
-
-function Color() {}
-
-var darker = 0.7;
-var brighter = 1 / darker;
-
-var reI = "\\s*([+-]?\\d+)\\s*";
-var reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*";
-var reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*";
-var reHex3 = /^#([0-9a-f]{3})$/;
-var reHex6 = /^#([0-9a-f]{6})$/;
-var reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$");
-var reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$");
-var reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$");
-var reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$");
-var reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$");
-var reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
-
-var named = {
- aliceblue: 0xf0f8ff,
- antiquewhite: 0xfaebd7,
- aqua: 0x00ffff,
- aquamarine: 0x7fffd4,
- azure: 0xf0ffff,
- beige: 0xf5f5dc,
- bisque: 0xffe4c4,
- black: 0x000000,
- blanchedalmond: 0xffebcd,
- blue: 0x0000ff,
- blueviolet: 0x8a2be2,
- brown: 0xa52a2a,
- burlywood: 0xdeb887,
- cadetblue: 0x5f9ea0,
- chartreuse: 0x7fff00,
- chocolate: 0xd2691e,
- coral: 0xff7f50,
- cornflowerblue: 0x6495ed,
- cornsilk: 0xfff8dc,
- crimson: 0xdc143c,
- cyan: 0x00ffff,
- darkblue: 0x00008b,
- darkcyan: 0x008b8b,
- darkgoldenrod: 0xb8860b,
- darkgray: 0xa9a9a9,
- darkgreen: 0x006400,
- darkgrey: 0xa9a9a9,
- darkkhaki: 0xbdb76b,
- darkmagenta: 0x8b008b,
- darkolivegreen: 0x556b2f,
- darkorange: 0xff8c00,
- darkorchid: 0x9932cc,
- darkred: 0x8b0000,
- darksalmon: 0xe9967a,
- darkseagreen: 0x8fbc8f,
- darkslateblue: 0x483d8b,
- darkslategray: 0x2f4f4f,
- darkslategrey: 0x2f4f4f,
- darkturquoise: 0x00ced1,
- darkviolet: 0x9400d3,
- deeppink: 0xff1493,
- deepskyblue: 0x00bfff,
- dimgray: 0x696969,
- dimgrey: 0x696969,
- dodgerblue: 0x1e90ff,
- firebrick: 0xb22222,
- floralwhite: 0xfffaf0,
- forestgreen: 0x228b22,
- fuchsia: 0xff00ff,
- gainsboro: 0xdcdcdc,
- ghostwhite: 0xf8f8ff,
- gold: 0xffd700,
- goldenrod: 0xdaa520,
- gray: 0x808080,
- green: 0x008000,
- greenyellow: 0xadff2f,
- grey: 0x808080,
- honeydew: 0xf0fff0,
- hotpink: 0xff69b4,
- indianred: 0xcd5c5c,
- indigo: 0x4b0082,
- ivory: 0xfffff0,
- khaki: 0xf0e68c,
- lavender: 0xe6e6fa,
- lavenderblush: 0xfff0f5,
- lawngreen: 0x7cfc00,
- lemonchiffon: 0xfffacd,
- lightblue: 0xadd8e6,
- lightcoral: 0xf08080,
- lightcyan: 0xe0ffff,
- lightgoldenrodyellow: 0xfafad2,
- lightgray: 0xd3d3d3,
- lightgreen: 0x90ee90,
- lightgrey: 0xd3d3d3,
- lightpink: 0xffb6c1,
- lightsalmon: 0xffa07a,
- lightseagreen: 0x20b2aa,
- lightskyblue: 0x87cefa,
- lightslategray: 0x778899,
- lightslategrey: 0x778899,
- lightsteelblue: 0xb0c4de,
- lightyellow: 0xffffe0,
- lime: 0x00ff00,
- limegreen: 0x32cd32,
- linen: 0xfaf0e6,
- magenta: 0xff00ff,
- maroon: 0x800000,
- mediumaquamarine: 0x66cdaa,
- mediumblue: 0x0000cd,
- mediumorchid: 0xba55d3,
- mediumpurple: 0x9370db,
- mediumseagreen: 0x3cb371,
- mediumslateblue: 0x7b68ee,
- mediumspringgreen: 0x00fa9a,
- mediumturquoise: 0x48d1cc,
- mediumvioletred: 0xc71585,
- midnightblue: 0x191970,
- mintcream: 0xf5fffa,
- mistyrose: 0xffe4e1,
- moccasin: 0xffe4b5,
- navajowhite: 0xffdead,
- navy: 0x000080,
- oldlace: 0xfdf5e6,
- olive: 0x808000,
- olivedrab: 0x6b8e23,
- orange: 0xffa500,
- orangered: 0xff4500,
- orchid: 0xda70d6,
- palegoldenrod: 0xeee8aa,
- palegreen: 0x98fb98,
- paleturquoise: 0xafeeee,
- palevioletred: 0xdb7093,
- papayawhip: 0xffefd5,
- peachpuff: 0xffdab9,
- peru: 0xcd853f,
- pink: 0xffc0cb,
- plum: 0xdda0dd,
- powderblue: 0xb0e0e6,
- purple: 0x800080,
- rebeccapurple: 0x663399,
- red: 0xff0000,
- rosybrown: 0xbc8f8f,
- royalblue: 0x4169e1,
- saddlebrown: 0x8b4513,
- salmon: 0xfa8072,
- sandybrown: 0xf4a460,
- seagreen: 0x2e8b57,
- seashell: 0xfff5ee,
- sienna: 0xa0522d,
- silver: 0xc0c0c0,
- skyblue: 0x87ceeb,
- slateblue: 0x6a5acd,
- slategray: 0x708090,
- slategrey: 0x708090,
- snow: 0xfffafa,
- springgreen: 0x00ff7f,
- steelblue: 0x4682b4,
- tan: 0xd2b48c,
- teal: 0x008080,
- thistle: 0xd8bfd8,
- tomato: 0xff6347,
- turquoise: 0x40e0d0,
- violet: 0xee82ee,
- wheat: 0xf5deb3,
- white: 0xffffff,
- whitesmoke: 0xf5f5f5,
- yellow: 0xffff00,
- yellowgreen: 0x9acd32
-};
-
-define(Color, color, {
- displayable: function() {
- return this.rgb().displayable();
- },
- toString: function() {
- return this.rgb() + "";
- }
-});
-
-function color(format) {
- var m;
- format = (format + "").trim().toLowerCase();
- return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00
- : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000
- : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
- : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
- : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
- : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
- : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
- : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
- : named.hasOwnProperty(format) ? rgbn(named[format])
- : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
- : null;
-}
-
-function rgbn(n) {
- return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
-}
-
-function rgba(r, g, b, a) {
- if (a <= 0) r = g = b = NaN;
- return new Rgb(r, g, b, a);
-}
-
-function rgbConvert(o) {
- if (!(o instanceof Color)) o = color(o);
- if (!o) return new Rgb;
- o = o.rgb();
- return new Rgb(o.r, o.g, o.b, o.opacity);
-}
-
-function rgb(r, g, b, opacity) {
- return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
-}
-
-function Rgb(r, g, b, opacity) {
- this.r = +r;
- this.g = +g;
- this.b = +b;
- this.opacity = +opacity;
-}
-
-define(Rgb, rgb, extend(Color, {
- brighter: function(k) {
- k = k == null ? brighter : Math.pow(brighter, k);
- return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
- },
- darker: function(k) {
- k = k == null ? darker : Math.pow(darker, k);
- return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
- },
- rgb: function() {
- return this;
- },
- displayable: function() {
- return (0 <= this.r && this.r <= 255)
- && (0 <= this.g && this.g <= 255)
- && (0 <= this.b && this.b <= 255)
- && (0 <= this.opacity && this.opacity <= 1);
- },
- toString: function() {
- var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
- return (a === 1 ? "rgb(" : "rgba(")
- + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
- + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
- + Math.max(0, Math.min(255, Math.round(this.b) || 0))
- + (a === 1 ? ")" : ", " + a + ")");
- }
-}));
-
-function hsla(h, s, l, a) {
- if (a <= 0) h = s = l = NaN;
- else if (l <= 0 || l >= 1) h = s = NaN;
- else if (s <= 0) h = NaN;
- return new Hsl(h, s, l, a);
-}
-
-function hslConvert(o) {
- if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
- if (!(o instanceof Color)) o = color(o);
- if (!o) return new Hsl;
- if (o instanceof Hsl) return o;
- o = o.rgb();
- var r = o.r / 255,
- g = o.g / 255,
- b = o.b / 255,
- min = Math.min(r, g, b),
- max = Math.max(r, g, b),
- h = NaN,
- s = max - min,
- l = (max + min) / 2;
- if (s) {
- if (r === max) h = (g - b) / s + (g < b) * 6;
- else if (g === max) h = (b - r) / s + 2;
- else h = (r - g) / s + 4;
- s /= l < 0.5 ? max + min : 2 - max - min;
- h *= 60;
- } else {
- s = l > 0 && l < 1 ? 0 : h;
- }
- return new Hsl(h, s, l, o.opacity);
-}
-
-function hsl(h, s, l, opacity) {
- return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
-}
-
-function Hsl(h, s, l, opacity) {
- this.h = +h;
- this.s = +s;
- this.l = +l;
- this.opacity = +opacity;
-}
-
-define(Hsl, hsl, extend(Color, {
- brighter: function(k) {
- k = k == null ? brighter : Math.pow(brighter, k);
- return new Hsl(this.h, this.s, this.l * k, this.opacity);
- },
- darker: function(k) {
- k = k == null ? darker : Math.pow(darker, k);
- return new Hsl(this.h, this.s, this.l * k, this.opacity);
- },
- rgb: function() {
- var h = this.h % 360 + (this.h < 0) * 360,
- s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
- l = this.l,
- m2 = l + (l < 0.5 ? l : 1 - l) * s,
- m1 = 2 * l - m2;
- return new Rgb(
- hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
- hsl2rgb(h, m1, m2),
- hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
- this.opacity
- );
- },
- displayable: function() {
- return (0 <= this.s && this.s <= 1 || isNaN(this.s))
- && (0 <= this.l && this.l <= 1)
- && (0 <= this.opacity && this.opacity <= 1);
- }
-}));
-
-/* From FvD 13.37, CSS Color Module Level 3 */
-function hsl2rgb(h, m1, m2) {
- return (h < 60 ? m1 + (m2 - m1) * h / 60
- : h < 180 ? m2
- : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
- : m1) * 255;
-}
-
-var deg2rad = Math.PI / 180;
-var rad2deg = 180 / Math.PI;
-
-var Kn = 18;
-var Xn = 0.950470;
-var Yn = 1;
-var Zn = 1.088830;
-var t0 = 4 / 29;
-var t1 = 6 / 29;
-var t2 = 3 * t1 * t1;
-var t3 = t1 * t1 * t1;
-
-function labConvert(o) {
- if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
- if (o instanceof Hcl) {
- var h = o.h * deg2rad;
- return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
- }
- if (!(o instanceof Rgb)) o = rgbConvert(o);
- var b = rgb2xyz(o.r),
- a = rgb2xyz(o.g),
- l = rgb2xyz(o.b),
- x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),
- y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),
- z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);
- return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
-}
-
-function lab(l, a, b, opacity) {
- return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
-}
-
-function Lab(l, a, b, opacity) {
- this.l = +l;
- this.a = +a;
- this.b = +b;
- this.opacity = +opacity;
-}
-
-define(Lab, lab, extend(Color, {
- brighter: function(k) {
- return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b, this.opacity);
- },
- darker: function(k) {
- return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b, this.opacity);
- },
- rgb: function() {
- var y = (this.l + 16) / 116,
- x = isNaN(this.a) ? y : y + this.a / 500,
- z = isNaN(this.b) ? y : y - this.b / 200;
- y = Yn * lab2xyz(y);
- x = Xn * lab2xyz(x);
- z = Zn * lab2xyz(z);
- return new Rgb(
- xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB
- xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),
- xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z),
- this.opacity
- );
- }
-}));
-
-function xyz2lab(t) {
- return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
-}
-
-function lab2xyz(t) {
- return t > t1 ? t * t * t : t2 * (t - t0);
-}
-
-function xyz2rgb(x) {
- return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
-}
-
-function rgb2xyz(x) {
- return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
-}
-
-function hclConvert(o) {
- if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
- if (!(o instanceof Lab)) o = labConvert(o);
- var h = Math.atan2(o.b, o.a) * rad2deg;
- return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
-}
-
-function hcl(h, c, l, opacity) {
- return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
-}
-
-function Hcl(h, c, l, opacity) {
- this.h = +h;
- this.c = +c;
- this.l = +l;
- this.opacity = +opacity;
-}
-
-define(Hcl, hcl, extend(Color, {
- brighter: function(k) {
- return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k), this.opacity);
- },
- darker: function(k) {
- return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k), this.opacity);
- },
- rgb: function() {
- return labConvert(this).rgb();
- }
-}));
-
-var A = -0.14861;
-var B = +1.78277;
-var C = -0.29227;
-var D = -0.90649;
-var E = +1.97294;
-var ED = E * D;
-var EB = E * B;
-var BC_DA = B * C - D * A;
-
-function cubehelixConvert(o) {
- if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
- if (!(o instanceof Rgb)) o = rgbConvert(o);
- var r = o.r / 255,
- g = o.g / 255,
- b = o.b / 255,
- l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
- bl = b - l,
- k = (E * (g - l) - C * bl) / D,
- s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
- h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;
- return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
-}
-
-function cubehelix(h, s, l, opacity) {
- return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
-}
-
-function Cubehelix(h, s, l, opacity) {
- this.h = +h;
- this.s = +s;
- this.l = +l;
- this.opacity = +opacity;
-}
-
-define(Cubehelix, cubehelix, extend(Color, {
- brighter: function(k) {
- k = k == null ? brighter : Math.pow(brighter, k);
- return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
- },
- darker: function(k) {
- k = k == null ? darker : Math.pow(darker, k);
- return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
- },
- rgb: function() {
- var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,
- l = +this.l,
- a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
- cosh = Math.cos(h),
- sinh = Math.sin(h);
- return new Rgb(
- 255 * (l + a * (A * cosh + B * sinh)),
- 255 * (l + a * (C * cosh + D * sinh)),
- 255 * (l + a * (E * cosh)),
- this.opacity
- );
- }
-}));
-
-function basis(t1, v0, v1, v2, v3) {
- var t2 = t1 * t1, t3 = t2 * t1;
- return ((1 - 3 * t1 + 3 * t2 - t3) * v0
- + (4 - 6 * t2 + 3 * t3) * v1
- + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2
- + t3 * v3) / 6;
-}
-
-function basis$1(values) {
- var n = values.length - 1;
- return function(t) {
- var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),
- v1 = values[i],
- v2 = values[i + 1],
- v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,
- v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
- return basis((t - i / n) * n, v0, v1, v2, v3);
- };
-}
-
-function basisClosed(values) {
- var n = values.length;
- return function(t) {
- var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),
- v0 = values[(i + n - 1) % n],
- v1 = values[i % n],
- v2 = values[(i + 1) % n],
- v3 = values[(i + 2) % n];
- return basis((t - i / n) * n, v0, v1, v2, v3);
- };
-}
-
-function constant$3(x) {
- return function() {
- return x;
- };
-}
-
-function linear(a, d) {
- return function(t) {
- return a + t * d;
- };
-}
-
-function exponential(a, b, y) {
- return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {
- return Math.pow(a + t * b, y);
- };
-}
-
-function hue(a, b) {
- var d = b - a;
- return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant$3(isNaN(a) ? b : a);
-}
-
-function gamma(y) {
- return (y = +y) === 1 ? nogamma : function(a, b) {
- return b - a ? exponential(a, b, y) : constant$3(isNaN(a) ? b : a);
- };
-}
-
-function nogamma(a, b) {
- var d = b - a;
- return d ? linear(a, d) : constant$3(isNaN(a) ? b : a);
-}
-
-var interpolateRgb = (function rgbGamma(y) {
- var color$$1 = gamma(y);
-
- function rgb$$1(start, end) {
- var r = color$$1((start = rgb(start)).r, (end = rgb(end)).r),
- g = color$$1(start.g, end.g),
- b = color$$1(start.b, end.b),
- opacity = nogamma(start.opacity, end.opacity);
- return function(t) {
- start.r = r(t);
- start.g = g(t);
- start.b = b(t);
- start.opacity = opacity(t);
- return start + "";
- };
- }
-
- rgb$$1.gamma = rgbGamma;
-
- return rgb$$1;
-})(1);
-
-function rgbSpline(spline) {
- return function(colors) {
- var n = colors.length,
- r = new Array(n),
- g = new Array(n),
- b = new Array(n),
- i, color$$1;
- for (i = 0; i < n; ++i) {
- color$$1 = rgb(colors[i]);
- r[i] = color$$1.r || 0;
- g[i] = color$$1.g || 0;
- b[i] = color$$1.b || 0;
- }
- r = spline(r);
- g = spline(g);
- b = spline(b);
- color$$1.opacity = 1;
- return function(t) {
- color$$1.r = r(t);
- color$$1.g = g(t);
- color$$1.b = b(t);
- return color$$1 + "";
- };
- };
-}
-
-var rgbBasis = rgbSpline(basis$1);
-var rgbBasisClosed = rgbSpline(basisClosed);
-
-function array$1(a, b) {
- var nb = b ? b.length : 0,
- na = a ? Math.min(nb, a.length) : 0,
- x = new Array(na),
- c = new Array(nb),
- i;
-
- for (i = 0; i < na; ++i) x[i] = interpolateValue(a[i], b[i]);
- for (; i < nb; ++i) c[i] = b[i];
-
- return function(t) {
- for (i = 0; i < na; ++i) c[i] = x[i](t);
- return c;
- };
-}
-
-function date(a, b) {
- var d = new Date;
- return a = +a, b -= a, function(t) {
- return d.setTime(a + b * t), d;
- };
-}
-
-function reinterpolate(a, b) {
- return a = +a, b -= a, function(t) {
- return a + b * t;
- };
-}
-
-function object(a, b) {
- var i = {},
- c = {},
- k;
-
- if (a === null || typeof a !== "object") a = {};
- if (b === null || typeof b !== "object") b = {};
-
- for (k in b) {
- if (k in a) {
- i[k] = interpolateValue(a[k], b[k]);
- } else {
- c[k] = b[k];
- }
- }
-
- return function(t) {
- for (k in i) c[k] = i[k](t);
- return c;
- };
-}
-
-var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
-var reB = new RegExp(reA.source, "g");
-
-function zero(b) {
- return function() {
- return b;
- };
-}
-
-function one(b) {
- return function(t) {
- return b(t) + "";
- };
-}
-
-function interpolateString(a, b) {
- var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b
- am, // current match in a
- bm, // current match in b
- bs, // string preceding current number in b, if any
- i = -1, // index in s
- s = [], // string constants and placeholders
- q = []; // number interpolators
-
- // Coerce inputs to strings.
- a = a + "", b = b + "";
-
- // Interpolate pairs of numbers in a & b.
- while ((am = reA.exec(a))
- && (bm = reB.exec(b))) {
- if ((bs = bm.index) > bi) { // a string precedes the next number in b
- bs = b.slice(bi, bs);
- if (s[i]) s[i] += bs; // coalesce with previous string
- else s[++i] = bs;
- }
- if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match
- if (s[i]) s[i] += bm; // coalesce with previous string
- else s[++i] = bm;
- } else { // interpolate non-matching numbers
- s[++i] = null;
- q.push({i: i, x: reinterpolate(am, bm)});
- }
- bi = reB.lastIndex;
- }
-
- // Add remains of b.
- if (bi < b.length) {
- bs = b.slice(bi);
- if (s[i]) s[i] += bs; // coalesce with previous string
- else s[++i] = bs;
- }
-
- // Special optimization for only a single match.
- // Otherwise, interpolate each of the numbers and rejoin the string.
- return s.length < 2 ? (q[0]
- ? one(q[0].x)
- : zero(b))
- : (b = q.length, function(t) {
- for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- });
-}
-
-function interpolateValue(a, b) {
- var t = typeof b, c;
- return b == null || t === "boolean" ? constant$3(b)
- : (t === "number" ? reinterpolate
- : t === "string" ? ((c = color(b)) ? (b = c, interpolateRgb) : interpolateString)
- : b instanceof color ? interpolateRgb
- : b instanceof Date ? date
- : Array.isArray(b) ? array$1
- : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object
- : reinterpolate)(a, b);
-}
-
-function interpolateRound(a, b) {
- return a = +a, b -= a, function(t) {
- return Math.round(a + b * t);
- };
-}
-
-var degrees = 180 / Math.PI;
-
-var identity$2 = {
- translateX: 0,
- translateY: 0,
- rotate: 0,
- skewX: 0,
- scaleX: 1,
- scaleY: 1
-};
-
-function decompose(a, b, c, d, e, f) {
- var scaleX, scaleY, skewX;
- if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
- if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
- if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
- if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
- return {
- translateX: e,
- translateY: f,
- rotate: Math.atan2(b, a) * degrees,
- skewX: Math.atan(skewX) * degrees,
- scaleX: scaleX,
- scaleY: scaleY
- };
-}
-
-var cssNode;
-var cssRoot;
-var cssView;
-var svgNode;
-
-function parseCss(value) {
- if (value === "none") return identity$2;
- if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView;
- cssNode.style.transform = value;
- value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform");
- cssRoot.removeChild(cssNode);
- value = value.slice(7, -1).split(",");
- return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);
-}
-
-function parseSvg(value) {
- if (value == null) return identity$2;
- if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
- svgNode.setAttribute("transform", value);
- if (!(value = svgNode.transform.baseVal.consolidate())) return identity$2;
- value = value.matrix;
- return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
-}
-
-function interpolateTransform(parse, pxComma, pxParen, degParen) {
-
- function pop(s) {
- return s.length ? s.pop() + " " : "";
- }
-
- function translate(xa, ya, xb, yb, s, q) {
- if (xa !== xb || ya !== yb) {
- var i = s.push("translate(", null, pxComma, null, pxParen);
- q.push({i: i - 4, x: reinterpolate(xa, xb)}, {i: i - 2, x: reinterpolate(ya, yb)});
- } else if (xb || yb) {
- s.push("translate(" + xb + pxComma + yb + pxParen);
- }
- }
-
- function rotate(a, b, s, q) {
- if (a !== b) {
- if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path
- q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: reinterpolate(a, b)});
- } else if (b) {
- s.push(pop(s) + "rotate(" + b + degParen);
- }
- }
-
- function skewX(a, b, s, q) {
- if (a !== b) {
- q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: reinterpolate(a, b)});
- } else if (b) {
- s.push(pop(s) + "skewX(" + b + degParen);
- }
- }
-
- function scale(xa, ya, xb, yb, s, q) {
- if (xa !== xb || ya !== yb) {
- var i = s.push(pop(s) + "scale(", null, ",", null, ")");
- q.push({i: i - 4, x: reinterpolate(xa, xb)}, {i: i - 2, x: reinterpolate(ya, yb)});
- } else if (xb !== 1 || yb !== 1) {
- s.push(pop(s) + "scale(" + xb + "," + yb + ")");
- }
- }
-
- return function(a, b) {
- var s = [], // string constants and placeholders
- q = []; // number interpolators
- a = parse(a), b = parse(b);
- translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
- rotate(a.rotate, b.rotate, s, q);
- skewX(a.skewX, b.skewX, s, q);
- scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
- a = b = null; // gc
- return function(t) {
- var i = -1, n = q.length, o;
- while (++i < n) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- };
- };
-}
-
-var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
-var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
-
-var rho = Math.SQRT2;
-var rho2 = 2;
-var rho4 = 4;
-var epsilon2 = 1e-12;
-
-function cosh(x) {
- return ((x = Math.exp(x)) + 1 / x) / 2;
-}
-
-function sinh(x) {
- return ((x = Math.exp(x)) - 1 / x) / 2;
-}
-
-function tanh(x) {
- return ((x = Math.exp(2 * x)) - 1) / (x + 1);
-}
-
-// p0 = [ux0, uy0, w0]
-// p1 = [ux1, uy1, w1]
-function interpolateZoom(p0, p1) {
- var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],
- ux1 = p1[0], uy1 = p1[1], w1 = p1[2],
- dx = ux1 - ux0,
- dy = uy1 - uy0,
- d2 = dx * dx + dy * dy,
- i,
- S;
-
- // Special case for u0 ≅ u1.
- if (d2 < epsilon2) {
- S = Math.log(w1 / w0) / rho;
- i = function(t) {
- return [
- ux0 + t * dx,
- uy0 + t * dy,
- w0 * Math.exp(rho * t * S)
- ];
- };
- }
-
- // General case.
- else {
- var d1 = Math.sqrt(d2),
- b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),
- b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
- r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
- r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
- S = (r1 - r0) / rho;
- i = function(t) {
- var s = t * S,
- coshr0 = cosh(r0),
- u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
- return [
- ux0 + u * dx,
- uy0 + u * dy,
- w0 * coshr0 / cosh(rho * s + r0)
- ];
- };
- }
-
- i.duration = S * 1000;
-
- return i;
-}
-
-function hsl$1(hue$$1) {
- return function(start, end) {
- var h = hue$$1((start = hsl(start)).h, (end = hsl(end)).h),
- s = nogamma(start.s, end.s),
- l = nogamma(start.l, end.l),
- opacity = nogamma(start.opacity, end.opacity);
- return function(t) {
- start.h = h(t);
- start.s = s(t);
- start.l = l(t);
- start.opacity = opacity(t);
- return start + "";
- };
- }
-}
-
-var hsl$2 = hsl$1(hue);
-var hslLong = hsl$1(nogamma);
-
-function lab$1(start, end) {
- var l = nogamma((start = lab(start)).l, (end = lab(end)).l),
- a = nogamma(start.a, end.a),
- b = nogamma(start.b, end.b),
- opacity = nogamma(start.opacity, end.opacity);
- return function(t) {
- start.l = l(t);
- start.a = a(t);
- start.b = b(t);
- start.opacity = opacity(t);
- return start + "";
- };
-}
-
-function hcl$1(hue$$1) {
- return function(start, end) {
- var h = hue$$1((start = hcl(start)).h, (end = hcl(end)).h),
- c = nogamma(start.c, end.c),
- l = nogamma(start.l, end.l),
- opacity = nogamma(start.opacity, end.opacity);
- return function(t) {
- start.h = h(t);
- start.c = c(t);
- start.l = l(t);
- start.opacity = opacity(t);
- return start + "";
- };
- }
-}
-
-var hcl$2 = hcl$1(hue);
-var hclLong = hcl$1(nogamma);
-
-function cubehelix$1(hue$$1) {
- return (function cubehelixGamma(y) {
- y = +y;
-
- function cubehelix$$1(start, end) {
- var h = hue$$1((start = cubehelix(start)).h, (end = cubehelix(end)).h),
- s = nogamma(start.s, end.s),
- l = nogamma(start.l, end.l),
- opacity = nogamma(start.opacity, end.opacity);
- return function(t) {
- start.h = h(t);
- start.s = s(t);
- start.l = l(Math.pow(t, y));
- start.opacity = opacity(t);
- return start + "";
- };
- }
-
- cubehelix$$1.gamma = cubehelixGamma;
-
- return cubehelix$$1;
- })(1);
-}
-
-var cubehelix$2 = cubehelix$1(hue);
-var cubehelixLong = cubehelix$1(nogamma);
-
-function quantize(interpolator, n) {
- var samples = new Array(n);
- for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));
- return samples;
-}
-
-var frame = 0;
-var timeout = 0;
-var interval = 0;
-var pokeDelay = 1000;
-var taskHead;
-var taskTail;
-var clockLast = 0;
-var clockNow = 0;
-var clockSkew = 0;
-var clock = typeof performance === "object" && performance.now ? performance : Date;
-var setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };
-
-function now() {
- return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
-}
-
-function clearNow() {
- clockNow = 0;
-}
-
-function Timer() {
- this._call =
- this._time =
- this._next = null;
-}
-
-Timer.prototype = timer.prototype = {
- constructor: Timer,
- restart: function(callback, delay, time) {
- if (typeof callback !== "function") throw new TypeError("callback is not a function");
- time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
- if (!this._next && taskTail !== this) {
- if (taskTail) taskTail._next = this;
- else taskHead = this;
- taskTail = this;
- }
- this._call = callback;
- this._time = time;
- sleep();
- },
- stop: function() {
- if (this._call) {
- this._call = null;
- this._time = Infinity;
- sleep();
- }
- }
-};
-
-function timer(callback, delay, time) {
- var t = new Timer;
- t.restart(callback, delay, time);
- return t;
-}
-
-function timerFlush() {
- now(); // Get the current time, if not already set.
- ++frame; // Pretend we’ve set an alarm, if we haven’t already.
- var t = taskHead, e;
- while (t) {
- if ((e = clockNow - t._time) >= 0) t._call.call(null, e);
- t = t._next;
- }
- --frame;
-}
-
-function wake() {
- clockNow = (clockLast = clock.now()) + clockSkew;
- frame = timeout = 0;
- try {
- timerFlush();
- } finally {
- frame = 0;
- nap();
- clockNow = 0;
- }
-}
-
-function poke() {
- var now = clock.now(), delay = now - clockLast;
- if (delay > pokeDelay) clockSkew -= delay, clockLast = now;
-}
-
-function nap() {
- var t0, t1 = taskHead, t2, time = Infinity;
- while (t1) {
- if (t1._call) {
- if (time > t1._time) time = t1._time;
- t0 = t1, t1 = t1._next;
- } else {
- t2 = t1._next, t1._next = null;
- t1 = t0 ? t0._next = t2 : taskHead = t2;
- }
- }
- taskTail = t0;
- sleep(time);
-}
-
-function sleep(time) {
- if (frame) return; // Soonest alarm already set, or will be.
- if (timeout) timeout = clearTimeout(timeout);
- var delay = time - clockNow; // Strictly less than if we recomputed clockNow.
- if (delay > 24) {
- if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);
- if (interval) interval = clearInterval(interval);
- } else {
- if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
- frame = 1, setFrame(wake);
- }
-}
-
-function timeout$1(callback, delay, time) {
- var t = new Timer;
- delay = delay == null ? 0 : +delay;
- t.restart(function(elapsed) {
- t.stop();
- callback(elapsed + delay);
- }, delay, time);
- return t;
-}
-
-function interval$1(callback, delay, time) {
- var t = new Timer, total = delay;
- if (delay == null) return t.restart(callback, delay, time), t;
- delay = +delay, time = time == null ? now() : +time;
- t.restart(function tick(elapsed) {
- elapsed += total;
- t.restart(tick, total += delay, time);
- callback(elapsed);
- }, delay, time);
- return t;
-}
-
-var emptyOn = dispatch("start", "end", "interrupt");
-var emptyTween = [];
-
-var CREATED = 0;
-var SCHEDULED = 1;
-var STARTING = 2;
-var STARTED = 3;
-var RUNNING = 4;
-var ENDING = 5;
-var ENDED = 6;
-
-function schedule(node, name, id, index, group, timing) {
- var schedules = node.__transition;
- if (!schedules) node.__transition = {};
- else if (id in schedules) return;
- create(node, id, {
- name: name,
- index: index, // For context during callback.
- group: group, // For context during callback.
- on: emptyOn,
- tween: emptyTween,
- time: timing.time,
- delay: timing.delay,
- duration: timing.duration,
- ease: timing.ease,
- timer: null,
- state: CREATED
- });
-}
-
-function init(node, id) {
- var schedule = get$1(node, id);
- if (schedule.state > CREATED) throw new Error("too late; already scheduled");
- return schedule;
-}
-
-function set$1(node, id) {
- var schedule = get$1(node, id);
- if (schedule.state > STARTING) throw new Error("too late; already started");
- return schedule;
-}
-
-function get$1(node, id) {
- var schedule = node.__transition;
- if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
- return schedule;
-}
-
-function create(node, id, self) {
- var schedules = node.__transition,
- tween;
-
- // Initialize the self timer when the transition is created.
- // Note the actual delay is not known until the first callback!
- schedules[id] = self;
- self.timer = timer(schedule, 0, self.time);
-
- function schedule(elapsed) {
- self.state = SCHEDULED;
- self.timer.restart(start, self.delay, self.time);
-
- // If the elapsed delay is less than our first sleep, start immediately.
- if (self.delay <= elapsed) start(elapsed - self.delay);
- }
-
- function start(elapsed) {
- var i, j, n, o;
-
- // If the state is not SCHEDULED, then we previously errored on start.
- if (self.state !== SCHEDULED) return stop();
-
- for (i in schedules) {
- o = schedules[i];
- if (o.name !== self.name) continue;
-
- // While this element already has a starting transition during this frame,
- // defer starting an interrupting transition until that transition has a
- // chance to tick (and possibly end); see d3/d3-transition#54!
- if (o.state === STARTED) return timeout$1(start);
-
- // Interrupt the active transition, if any.
- // Dispatch the interrupt event.
- if (o.state === RUNNING) {
- o.state = ENDED;
- o.timer.stop();
- o.on.call("interrupt", node, node.__data__, o.index, o.group);
- delete schedules[i];
- }
-
- // Cancel any pre-empted transitions. No interrupt event is dispatched
- // because the cancelled transitions never started. Note that this also
- // removes this transition from the pending list!
- else if (+i < id) {
- o.state = ENDED;
- o.timer.stop();
- delete schedules[i];
- }
- }
-
- // Defer the first tick to end of the current frame; see d3/d3#1576.
- // Note the transition may be canceled after start and before the first tick!
- // Note this must be scheduled before the start event; see d3/d3-transition#16!
- // Assuming this is successful, subsequent callbacks go straight to tick.
- timeout$1(function() {
- if (self.state === STARTED) {
- self.state = RUNNING;
- self.timer.restart(tick, self.delay, self.time);
- tick(elapsed);
- }
- });
-
- // Dispatch the start event.
- // Note this must be done before the tween are initialized.
- self.state = STARTING;
- self.on.call("start", node, node.__data__, self.index, self.group);
- if (self.state !== STARTING) return; // interrupted
- self.state = STARTED;
-
- // Initialize the tween, deleting null tween.
- tween = new Array(n = self.tween.length);
- for (i = 0, j = -1; i < n; ++i) {
- if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
- tween[++j] = o;
- }
- }
- tween.length = j + 1;
- }
-
- function tick(elapsed) {
- var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),
- i = -1,
- n = tween.length;
-
- while (++i < n) {
- tween[i].call(null, t);
- }
-
- // Dispatch the end event.
- if (self.state === ENDING) {
- self.on.call("end", node, node.__data__, self.index, self.group);
- stop();
- }
- }
-
- function stop() {
- self.state = ENDED;
- self.timer.stop();
- delete schedules[id];
- for (var i in schedules) return; // eslint-disable-line no-unused-vars
- delete node.__transition;
- }
-}
-
-function interrupt(node, name) {
- var schedules = node.__transition,
- schedule$$1,
- active,
- empty = true,
- i;
-
- if (!schedules) return;
-
- name = name == null ? null : name + "";
-
- for (i in schedules) {
- if ((schedule$$1 = schedules[i]).name !== name) { empty = false; continue; }
- active = schedule$$1.state > STARTING && schedule$$1.state < ENDING;
- schedule$$1.state = ENDED;
- schedule$$1.timer.stop();
- if (active) schedule$$1.on.call("interrupt", node, node.__data__, schedule$$1.index, schedule$$1.group);
- delete schedules[i];
- }
-
- if (empty) delete node.__transition;
-}
-
-function selection_interrupt(name) {
- return this.each(function() {
- interrupt(this, name);
- });
-}
-
-function tweenRemove(id, name) {
- var tween0, tween1;
- return function() {
- var schedule$$1 = set$1(this, id),
- tween = schedule$$1.tween;
-
- // If this node shared tween with the previous node,
- // just assign the updated shared tween and we’re done!
- // Otherwise, copy-on-write.
- if (tween !== tween0) {
- tween1 = tween0 = tween;
- for (var i = 0, n = tween1.length; i < n; ++i) {
- if (tween1[i].name === name) {
- tween1 = tween1.slice();
- tween1.splice(i, 1);
- break;
- }
- }
- }
-
- schedule$$1.tween = tween1;
- };
-}
-
-function tweenFunction(id, name, value) {
- var tween0, tween1;
- if (typeof value !== "function") throw new Error;
- return function() {
- var schedule$$1 = set$1(this, id),
- tween = schedule$$1.tween;
-
- // If this node shared tween with the previous node,
- // just assign the updated shared tween and we’re done!
- // Otherwise, copy-on-write.
- if (tween !== tween0) {
- tween1 = (tween0 = tween).slice();
- for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {
- if (tween1[i].name === name) {
- tween1[i] = t;
- break;
- }
- }
- if (i === n) tween1.push(t);
- }
-
- schedule$$1.tween = tween1;
- };
-}
-
-function transition_tween(name, value) {
- var id = this._id;
-
- name += "";
-
- if (arguments.length < 2) {
- var tween = get$1(this.node(), id).tween;
- for (var i = 0, n = tween.length, t; i < n; ++i) {
- if ((t = tween[i]).name === name) {
- return t.value;
- }
- }
- return null;
- }
-
- return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));
-}
-
-function tweenValue(transition, name, value) {
- var id = transition._id;
-
- transition.each(function() {
- var schedule$$1 = set$1(this, id);
- (schedule$$1.value || (schedule$$1.value = {}))[name] = value.apply(this, arguments);
- });
-
- return function(node) {
- return get$1(node, id).value[name];
- };
-}
-
-function interpolate(a, b) {
- var c;
- return (typeof b === "number" ? reinterpolate
- : b instanceof color ? interpolateRgb
- : (c = color(b)) ? (b = c, interpolateRgb)
- : interpolateString)(a, b);
-}
-
-function attrRemove$1(name) {
- return function() {
- this.removeAttribute(name);
- };
-}
-
-function attrRemoveNS$1(fullname) {
- return function() {
- this.removeAttributeNS(fullname.space, fullname.local);
- };
-}
-
-function attrConstant$1(name, interpolate$$1, value1) {
- var value00,
- interpolate0;
- return function() {
- var value0 = this.getAttribute(name);
- return value0 === value1 ? null
- : value0 === value00 ? interpolate0
- : interpolate0 = interpolate$$1(value00 = value0, value1);
- };
-}
-
-function attrConstantNS$1(fullname, interpolate$$1, value1) {
- var value00,
- interpolate0;
- return function() {
- var value0 = this.getAttributeNS(fullname.space, fullname.local);
- return value0 === value1 ? null
- : value0 === value00 ? interpolate0
- : interpolate0 = interpolate$$1(value00 = value0, value1);
- };
-}
-
-function attrFunction$1(name, interpolate$$1, value) {
- var value00,
- value10,
- interpolate0;
- return function() {
- var value0, value1 = value(this);
- if (value1 == null) return void this.removeAttribute(name);
- value0 = this.getAttribute(name);
- return value0 === value1 ? null
- : value0 === value00 && value1 === value10 ? interpolate0
- : interpolate0 = interpolate$$1(value00 = value0, value10 = value1);
- };
-}
-
-function attrFunctionNS$1(fullname, interpolate$$1, value) {
- var value00,
- value10,
- interpolate0;
- return function() {
- var value0, value1 = value(this);
- if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
- value0 = this.getAttributeNS(fullname.space, fullname.local);
- return value0 === value1 ? null
- : value0 === value00 && value1 === value10 ? interpolate0
- : interpolate0 = interpolate$$1(value00 = value0, value10 = value1);
- };
-}
-
-function transition_attr(name, value) {
- var fullname = namespace(name), i = fullname === "transform" ? interpolateTransformSvg : interpolate;
- return this.attrTween(name, typeof value === "function"
- ? (fullname.local ? attrFunctionNS$1 : attrFunction$1)(fullname, i, tweenValue(this, "attr." + name, value))
- : value == null ? (fullname.local ? attrRemoveNS$1 : attrRemove$1)(fullname)
- : (fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, i, value + ""));
-}
-
-function attrTweenNS(fullname, value) {
- function tween() {
- var node = this, i = value.apply(node, arguments);
- return i && function(t) {
- node.setAttributeNS(fullname.space, fullname.local, i(t));
- };
- }
- tween._value = value;
- return tween;
-}
-
-function attrTween(name, value) {
- function tween() {
- var node = this, i = value.apply(node, arguments);
- return i && function(t) {
- node.setAttribute(name, i(t));
- };
- }
- tween._value = value;
- return tween;
-}
-
-function transition_attrTween(name, value) {
- var key = "attr." + name;
- if (arguments.length < 2) return (key = this.tween(key)) && key._value;
- if (value == null) return this.tween(key, null);
- if (typeof value !== "function") throw new Error;
- var fullname = namespace(name);
- return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
-}
-
-function delayFunction(id, value) {
- return function() {
- init(this, id).delay = +value.apply(this, arguments);
- };
-}
-
-function delayConstant(id, value) {
- return value = +value, function() {
- init(this, id).delay = value;
- };
-}
-
-function transition_delay(value) {
- var id = this._id;
-
- return arguments.length
- ? this.each((typeof value === "function"
- ? delayFunction
- : delayConstant)(id, value))
- : get$1(this.node(), id).delay;
-}
-
-function durationFunction(id, value) {
- return function() {
- set$1(this, id).duration = +value.apply(this, arguments);
- };
-}
-
-function durationConstant(id, value) {
- return value = +value, function() {
- set$1(this, id).duration = value;
- };
-}
-
-function transition_duration(value) {
- var id = this._id;
-
- return arguments.length
- ? this.each((typeof value === "function"
- ? durationFunction
- : durationConstant)(id, value))
- : get$1(this.node(), id).duration;
-}
-
-function easeConstant(id, value) {
- if (typeof value !== "function") throw new Error;
- return function() {
- set$1(this, id).ease = value;
- };
-}
-
-function transition_ease(value) {
- var id = this._id;
-
- return arguments.length
- ? this.each(easeConstant(id, value))
- : get$1(this.node(), id).ease;
-}
-
-function transition_filter(match) {
- if (typeof match !== "function") match = matcher$1(match);
-
- for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
- if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
- subgroup.push(node);
- }
- }
- }
-
- return new Transition(subgroups, this._parents, this._name, this._id);
-}
-
-function transition_merge(transition$$1) {
- if (transition$$1._id !== this._id) throw new Error;
-
- for (var groups0 = this._groups, groups1 = transition$$1._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
- for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
- if (node = group0[i] || group1[i]) {
- merge[i] = node;
- }
- }
- }
-
- for (; j < m0; ++j) {
- merges[j] = groups0[j];
- }
-
- return new Transition(merges, this._parents, this._name, this._id);
-}
-
-function start(name) {
- return (name + "").trim().split(/^|\s+/).every(function(t) {
- var i = t.indexOf(".");
- if (i >= 0) t = t.slice(0, i);
- return !t || t === "start";
- });
-}
-
-function onFunction(id, name, listener) {
- var on0, on1, sit = start(name) ? init : set$1;
- return function() {
- var schedule$$1 = sit(this, id),
- on = schedule$$1.on;
-
- // If this node shared a dispatch with the previous node,
- // just assign the updated shared dispatch and we’re done!
- // Otherwise, copy-on-write.
- if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
-
- schedule$$1.on = on1;
- };
-}
-
-function transition_on(name, listener) {
- var id = this._id;
-
- return arguments.length < 2
- ? get$1(this.node(), id).on.on(name)
- : this.each(onFunction(id, name, listener));
-}
-
-function removeFunction(id) {
- return function() {
- var parent = this.parentNode;
- for (var i in this.__transition) if (+i !== id) return;
- if (parent) parent.removeChild(this);
- };
-}
-
-function transition_remove() {
- return this.on("end.remove", removeFunction(this._id));
-}
-
-function transition_select(select) {
- var name = this._name,
- id = this._id;
-
- if (typeof select !== "function") select = selector(select);
-
- for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
- for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
- if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
- if ("__data__" in node) subnode.__data__ = node.__data__;
- subgroup[i] = subnode;
- schedule(subgroup[i], name, id, i, subgroup, get$1(node, id));
- }
- }
- }
-
- return new Transition(subgroups, this._parents, name, id);
-}
-
-function transition_selectAll(select) {
- var name = this._name,
- id = this._id;
-
- if (typeof select !== "function") select = selectorAll(select);
-
- for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
- if (node = group[i]) {
- for (var children = select.call(node, node.__data__, i, group), child, inherit = get$1(node, id), k = 0, l = children.length; k < l; ++k) {
- if (child = children[k]) {
- schedule(child, name, id, k, children, inherit);
- }
- }
- subgroups.push(children);
- parents.push(node);
- }
- }
- }
-
- return new Transition(subgroups, parents, name, id);
-}
-
-var Selection$1 = selection.prototype.constructor;
-
-function transition_selection() {
- return new Selection$1(this._groups, this._parents);
-}
-
-function styleRemove$1(name, interpolate$$1) {
- var value00,
- value10,
- interpolate0;
- return function() {
- var value0 = styleValue(this, name),
- value1 = (this.style.removeProperty(name), styleValue(this, name));
- return value0 === value1 ? null
- : value0 === value00 && value1 === value10 ? interpolate0
- : interpolate0 = interpolate$$1(value00 = value0, value10 = value1);
- };
-}
-
-function styleRemoveEnd(name) {
- return function() {
- this.style.removeProperty(name);
- };
-}
-
-function styleConstant$1(name, interpolate$$1, value1) {
- var value00,
- interpolate0;
- return function() {
- var value0 = styleValue(this, name);
- return value0 === value1 ? null
- : value0 === value00 ? interpolate0
- : interpolate0 = interpolate$$1(value00 = value0, value1);
- };
-}
-
-function styleFunction$1(name, interpolate$$1, value) {
- var value00,
- value10,
- interpolate0;
- return function() {
- var value0 = styleValue(this, name),
- value1 = value(this);
- if (value1 == null) value1 = (this.style.removeProperty(name), styleValue(this, name));
- return value0 === value1 ? null
- : value0 === value00 && value1 === value10 ? interpolate0
- : interpolate0 = interpolate$$1(value00 = value0, value10 = value1);
- };
-}
-
-function transition_style(name, value, priority) {
- var i = (name += "") === "transform" ? interpolateTransformCss : interpolate;
- return value == null ? this
- .styleTween(name, styleRemove$1(name, i))
- .on("end.style." + name, styleRemoveEnd(name))
- : this.styleTween(name, typeof value === "function"
- ? styleFunction$1(name, i, tweenValue(this, "style." + name, value))
- : styleConstant$1(name, i, value + ""), priority);
-}
-
-function styleTween(name, value, priority) {
- function tween() {
- var node = this, i = value.apply(node, arguments);
- return i && function(t) {
- node.style.setProperty(name, i(t), priority);
- };
- }
- tween._value = value;
- return tween;
-}
-
-function transition_styleTween(name, value, priority) {
- var key = "style." + (name += "");
- if (arguments.length < 2) return (key = this.tween(key)) && key._value;
- if (value == null) return this.tween(key, null);
- if (typeof value !== "function") throw new Error;
- return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
-}
-
-function textConstant$1(value) {
- return function() {
- this.textContent = value;
- };
-}
-
-function textFunction$1(value) {
- return function() {
- var value1 = value(this);
- this.textContent = value1 == null ? "" : value1;
- };
-}
-
-function transition_text(value) {
- return this.tween("text", typeof value === "function"
- ? textFunction$1(tweenValue(this, "text", value))
- : textConstant$1(value == null ? "" : value + ""));
-}
-
-function transition_transition() {
- var name = this._name,
- id0 = this._id,
- id1 = newId();
-
- for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
- if (node = group[i]) {
- var inherit = get$1(node, id0);
- schedule(node, name, id1, i, group, {
- time: inherit.time + inherit.delay + inherit.duration,
- delay: 0,
- duration: inherit.duration,
- ease: inherit.ease
- });
- }
- }
- }
-
- return new Transition(groups, this._parents, name, id1);
-}
-
-var id = 0;
-
-function Transition(groups, parents, name, id) {
- this._groups = groups;
- this._parents = parents;
- this._name = name;
- this._id = id;
-}
-
-function transition(name) {
- return selection().transition(name);
-}
-
-function newId() {
- return ++id;
-}
-
-var selection_prototype = selection.prototype;
-
-Transition.prototype = transition.prototype = {
- constructor: Transition,
- select: transition_select,
- selectAll: transition_selectAll,
- filter: transition_filter,
- merge: transition_merge,
- selection: transition_selection,
- transition: transition_transition,
- call: selection_prototype.call,
- nodes: selection_prototype.nodes,
- node: selection_prototype.node,
- size: selection_prototype.size,
- empty: selection_prototype.empty,
- each: selection_prototype.each,
- on: transition_on,
- attr: transition_attr,
- attrTween: transition_attrTween,
- style: transition_style,
- styleTween: transition_styleTween,
- text: transition_text,
- remove: transition_remove,
- tween: transition_tween,
- delay: transition_delay,
- duration: transition_duration,
- ease: transition_ease
-};
-
-function linear$1(t) {
- return +t;
-}
-
-function quadIn(t) {
- return t * t;
-}
-
-function quadOut(t) {
- return t * (2 - t);
-}
-
-function quadInOut(t) {
- return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;
-}
-
-function cubicIn(t) {
- return t * t * t;
-}
-
-function cubicOut(t) {
- return --t * t * t + 1;
-}
-
-function cubicInOut(t) {
- return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
-}
-
-var exponent = 3;
-
-var polyIn = (function custom(e) {
- e = +e;
-
- function polyIn(t) {
- return Math.pow(t, e);
- }
-
- polyIn.exponent = custom;
-
- return polyIn;
-})(exponent);
-
-var polyOut = (function custom(e) {
- e = +e;
-
- function polyOut(t) {
- return 1 - Math.pow(1 - t, e);
- }
-
- polyOut.exponent = custom;
-
- return polyOut;
-})(exponent);
-
-var polyInOut = (function custom(e) {
- e = +e;
-
- function polyInOut(t) {
- return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;
- }
-
- polyInOut.exponent = custom;
-
- return polyInOut;
-})(exponent);
-
-var pi = Math.PI;
-var halfPi = pi / 2;
-
-function sinIn(t) {
- return 1 - Math.cos(t * halfPi);
-}
-
-function sinOut(t) {
- return Math.sin(t * halfPi);
-}
-
-function sinInOut(t) {
- return (1 - Math.cos(pi * t)) / 2;
-}
-
-function expIn(t) {
- return Math.pow(2, 10 * t - 10);
-}
-
-function expOut(t) {
- return 1 - Math.pow(2, -10 * t);
-}
-
-function expInOut(t) {
- return ((t *= 2) <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2;
-}
-
-function circleIn(t) {
- return 1 - Math.sqrt(1 - t * t);
-}
-
-function circleOut(t) {
- return Math.sqrt(1 - --t * t);
-}
-
-function circleInOut(t) {
- return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;
-}
-
-var b1 = 4 / 11;
-var b2 = 6 / 11;
-var b3 = 8 / 11;
-var b4 = 3 / 4;
-var b5 = 9 / 11;
-var b6 = 10 / 11;
-var b7 = 15 / 16;
-var b8 = 21 / 22;
-var b9 = 63 / 64;
-var b0 = 1 / b1 / b1;
-
-function bounceIn(t) {
- return 1 - bounceOut(1 - t);
-}
-
-function bounceOut(t) {
- return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;
-}
-
-function bounceInOut(t) {
- return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;
-}
-
-var overshoot = 1.70158;
-
-var backIn = (function custom(s) {
- s = +s;
-
- function backIn(t) {
- return t * t * ((s + 1) * t - s);
- }
-
- backIn.overshoot = custom;
-
- return backIn;
-})(overshoot);
-
-var backOut = (function custom(s) {
- s = +s;
-
- function backOut(t) {
- return --t * t * ((s + 1) * t + s) + 1;
- }
-
- backOut.overshoot = custom;
-
- return backOut;
-})(overshoot);
-
-var backInOut = (function custom(s) {
- s = +s;
-
- function backInOut(t) {
- return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;
- }
-
- backInOut.overshoot = custom;
-
- return backInOut;
-})(overshoot);
-
-var tau = 2 * Math.PI;
-var amplitude = 1;
-var period = 0.3;
-
-var elasticIn = (function custom(a, p) {
- var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
-
- function elasticIn(t) {
- return a * Math.pow(2, 10 * --t) * Math.sin((s - t) / p);
- }
-
- elasticIn.amplitude = function(a) { return custom(a, p * tau); };
- elasticIn.period = function(p) { return custom(a, p); };
-
- return elasticIn;
-})(amplitude, period);
-
-var elasticOut = (function custom(a, p) {
- var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
-
- function elasticOut(t) {
- return 1 - a * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / p);
- }
-
- elasticOut.amplitude = function(a) { return custom(a, p * tau); };
- elasticOut.period = function(p) { return custom(a, p); };
-
- return elasticOut;
-})(amplitude, period);
-
-var elasticInOut = (function custom(a, p) {
- var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
-
- function elasticInOut(t) {
- return ((t = t * 2 - 1) < 0
- ? a * Math.pow(2, 10 * t) * Math.sin((s - t) / p)
- : 2 - a * Math.pow(2, -10 * t) * Math.sin((s + t) / p)) / 2;
- }
-
- elasticInOut.amplitude = function(a) { return custom(a, p * tau); };
- elasticInOut.period = function(p) { return custom(a, p); };
-
- return elasticInOut;
-})(amplitude, period);
-
-var defaultTiming = {
- time: null, // Set on use.
- delay: 0,
- duration: 250,
- ease: cubicInOut
-};
-
-function inherit(node, id) {
- var timing;
- while (!(timing = node.__transition) || !(timing = timing[id])) {
- if (!(node = node.parentNode)) {
- return defaultTiming.time = now(), defaultTiming;
- }
- }
- return timing;
-}
-
-function selection_transition(name) {
- var id,
- timing;
-
- if (name instanceof Transition) {
- id = name._id, name = name._name;
- } else {
- id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
- }
-
- for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
- if (node = group[i]) {
- schedule(node, name, id, i, group, timing || inherit(node, id));
- }
- }
- }
-
- return new Transition(groups, this._parents, name, id);
-}
-
-selection.prototype.interrupt = selection_interrupt;
-selection.prototype.transition = selection_transition;
-
-var root$1 = [null];
-
-function active(node, name) {
- var schedules = node.__transition,
- schedule$$1,
- i;
-
- if (schedules) {
- name = name == null ? null : name + "";
- for (i in schedules) {
- if ((schedule$$1 = schedules[i]).state > SCHEDULED && schedule$$1.name === name) {
- return new Transition([[node]], root$1, name, +i);
- }
- }
- }
-
- return null;
-}
-
-function constant$4(x) {
- return function() {
- return x;
- };
-}
-
-function BrushEvent(target, type, selection) {
- this.target = target;
- this.type = type;
- this.selection = selection;
-}
-
-function nopropagation$1() {
- exports.event.stopImmediatePropagation();
-}
-
-function noevent$1() {
- exports.event.preventDefault();
- exports.event.stopImmediatePropagation();
-}
-
-var MODE_DRAG = {name: "drag"};
-var MODE_SPACE = {name: "space"};
-var MODE_HANDLE = {name: "handle"};
-var MODE_CENTER = {name: "center"};
-
-var X = {
- name: "x",
- handles: ["e", "w"].map(type),
- input: function(x, e) { return x && [[x[0], e[0][1]], [x[1], e[1][1]]]; },
- output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }
-};
-
-var Y = {
- name: "y",
- handles: ["n", "s"].map(type),
- input: function(y, e) { return y && [[e[0][0], y[0]], [e[1][0], y[1]]]; },
- output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }
-};
-
-var XY = {
- name: "xy",
- handles: ["n", "e", "s", "w", "nw", "ne", "se", "sw"].map(type),
- input: function(xy) { return xy; },
- output: function(xy) { return xy; }
-};
-
-var cursors = {
- overlay: "crosshair",
- selection: "move",
- n: "ns-resize",
- e: "ew-resize",
- s: "ns-resize",
- w: "ew-resize",
- nw: "nwse-resize",
- ne: "nesw-resize",
- se: "nwse-resize",
- sw: "nesw-resize"
-};
-
-var flipX = {
- e: "w",
- w: "e",
- nw: "ne",
- ne: "nw",
- se: "sw",
- sw: "se"
-};
-
-var flipY = {
- n: "s",
- s: "n",
- nw: "sw",
- ne: "se",
- se: "ne",
- sw: "nw"
-};
-
-var signsX = {
- overlay: +1,
- selection: +1,
- n: null,
- e: +1,
- s: null,
- w: -1,
- nw: -1,
- ne: +1,
- se: +1,
- sw: -1
-};
-
-var signsY = {
- overlay: +1,
- selection: +1,
- n: -1,
- e: null,
- s: +1,
- w: null,
- nw: -1,
- ne: -1,
- se: +1,
- sw: +1
-};
-
-function type(t) {
- return {type: t};
-}
-
-// Ignore right-click, since that should open the context menu.
-function defaultFilter() {
- return !exports.event.button;
-}
-
-function defaultExtent() {
- var svg = this.ownerSVGElement || this;
- return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];
-}
-
-// Like d3.local, but with the name “__brush” rather than auto-generated.
-function local(node) {
- while (!node.__brush) if (!(node = node.parentNode)) return;
- return node.__brush;
-}
-
-function empty(extent) {
- return extent[0][0] === extent[1][0]
- || extent[0][1] === extent[1][1];
-}
-
-function brushSelection(node) {
- var state = node.__brush;
- return state ? state.dim.output(state.selection) : null;
-}
-
-function brushX() {
- return brush$1(X);
-}
-
-function brushY() {
- return brush$1(Y);
-}
-
-function brush() {
- return brush$1(XY);
-}
-
-function brush$1(dim) {
- var extent = defaultExtent,
- filter = defaultFilter,
- listeners = dispatch(brush, "start", "brush", "end"),
- handleSize = 6,
- touchending;
-
- function brush(group) {
- var overlay = group
- .property("__brush", initialize)
- .selectAll(".overlay")
- .data([type("overlay")]);
-
- overlay.enter().append("rect")
- .attr("class", "overlay")
- .attr("pointer-events", "all")
- .attr("cursor", cursors.overlay)
- .merge(overlay)
- .each(function() {
- var extent = local(this).extent;
- select(this)
- .attr("x", extent[0][0])
- .attr("y", extent[0][1])
- .attr("width", extent[1][0] - extent[0][0])
- .attr("height", extent[1][1] - extent[0][1]);
- });
-
- group.selectAll(".selection")
- .data([type("selection")])
- .enter().append("rect")
- .attr("class", "selection")
- .attr("cursor", cursors.selection)
- .attr("fill", "#777")
- .attr("fill-opacity", 0.3)
- .attr("stroke", "#fff")
- .attr("shape-rendering", "crispEdges");
-
- var handle = group.selectAll(".handle")
- .data(dim.handles, function(d) { return d.type; });
-
- handle.exit().remove();
-
- handle.enter().append("rect")
- .attr("class", function(d) { return "handle handle--" + d.type; })
- .attr("cursor", function(d) { return cursors[d.type]; });
-
- group
- .each(redraw)
- .attr("fill", "none")
- .attr("pointer-events", "all")
- .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)")
- .on("mousedown.brush touchstart.brush", started);
- }
-
- brush.move = function(group, selection) {
- if (group.selection) {
- group
- .on("start.brush", function() { emitter(this, arguments).beforestart().start(); })
- .on("interrupt.brush end.brush", function() { emitter(this, arguments).end(); })
- .tween("brush", function() {
- var that = this,
- state = that.__brush,
- emit = emitter(that, arguments),
- selection0 = state.selection,
- selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent),
- i = interpolateValue(selection0, selection1);
-
- function tween(t) {
- state.selection = t === 1 && empty(selection1) ? null : i(t);
- redraw.call(that);
- emit.brush();
- }
-
- return selection0 && selection1 ? tween : tween(1);
- });
- } else {
- group
- .each(function() {
- var that = this,
- args = arguments,
- state = that.__brush,
- selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent),
- emit = emitter(that, args).beforestart();
-
- interrupt(that);
- state.selection = selection1 == null || empty(selection1) ? null : selection1;
- redraw.call(that);
- emit.start().brush().end();
- });
- }
- };
-
- function redraw() {
- var group = select(this),
- selection = local(this).selection;
-
- if (selection) {
- group.selectAll(".selection")
- .style("display", null)
- .attr("x", selection[0][0])
- .attr("y", selection[0][1])
- .attr("width", selection[1][0] - selection[0][0])
- .attr("height", selection[1][1] - selection[0][1]);
-
- group.selectAll(".handle")
- .style("display", null)
- .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })
- .attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })
- .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })
- .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });
- }
-
- else {
- group.selectAll(".selection,.handle")
- .style("display", "none")
- .attr("x", null)
- .attr("y", null)
- .attr("width", null)
- .attr("height", null);
- }
- }
-
- function emitter(that, args) {
- return that.__brush.emitter || new Emitter(that, args);
- }
-
- function Emitter(that, args) {
- this.that = that;
- this.args = args;
- this.state = that.__brush;
- this.active = 0;
- }
-
- Emitter.prototype = {
- beforestart: function() {
- if (++this.active === 1) this.state.emitter = this, this.starting = true;
- return this;
- },
- start: function() {
- if (this.starting) this.starting = false, this.emit("start");
- return this;
- },
- brush: function() {
- this.emit("brush");
- return this;
- },
- end: function() {
- if (--this.active === 0) delete this.state.emitter, this.emit("end");
- return this;
- },
- emit: function(type) {
- customEvent(new BrushEvent(brush, type, dim.output(this.state.selection)), listeners.apply, listeners, [type, this.that, this.args]);
- }
- };
-
- function started() {
- if (exports.event.touches) { if (exports.event.changedTouches.length < exports.event.touches.length) return noevent$1(); }
- else if (touchending) return;
- if (!filter.apply(this, arguments)) return;
-
- var that = this,
- type = exports.event.target.__data__.type,
- mode = (exports.event.metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (exports.event.altKey ? MODE_CENTER : MODE_HANDLE),
- signX = dim === Y ? null : signsX[type],
- signY = dim === X ? null : signsY[type],
- state = local(that),
- extent = state.extent,
- selection = state.selection,
- W = extent[0][0], w0, w1,
- N = extent[0][1], n0, n1,
- E = extent[1][0], e0, e1,
- S = extent[1][1], s0, s1,
- dx,
- dy,
- moving,
- shifting = signX && signY && exports.event.shiftKey,
- lockX,
- lockY,
- point0 = mouse(that),
- point = point0,
- emit = emitter(that, arguments).beforestart();
-
- if (type === "overlay") {
- state.selection = selection = [
- [w0 = dim === Y ? W : point0[0], n0 = dim === X ? N : point0[1]],
- [e0 = dim === Y ? E : w0, s0 = dim === X ? S : n0]
- ];
- } else {
- w0 = selection[0][0];
- n0 = selection[0][1];
- e0 = selection[1][0];
- s0 = selection[1][1];
- }
-
- w1 = w0;
- n1 = n0;
- e1 = e0;
- s1 = s0;
-
- var group = select(that)
- .attr("pointer-events", "none");
-
- var overlay = group.selectAll(".overlay")
- .attr("cursor", cursors[type]);
-
- if (exports.event.touches) {
- group
- .on("touchmove.brush", moved, true)
- .on("touchend.brush touchcancel.brush", ended, true);
- } else {
- var view = select(exports.event.view)
- .on("keydown.brush", keydowned, true)
- .on("keyup.brush", keyupped, true)
- .on("mousemove.brush", moved, true)
- .on("mouseup.brush", ended, true);
-
- dragDisable(exports.event.view);
- }
-
- nopropagation$1();
- interrupt(that);
- redraw.call(that);
- emit.start();
-
- function moved() {
- var point1 = mouse(that);
- if (shifting && !lockX && !lockY) {
- if (Math.abs(point1[0] - point[0]) > Math.abs(point1[1] - point[1])) lockY = true;
- else lockX = true;
- }
- point = point1;
- moving = true;
- noevent$1();
- move();
- }
-
- function move() {
- var t;
-
- dx = point[0] - point0[0];
- dy = point[1] - point0[1];
-
- switch (mode) {
- case MODE_SPACE:
- case MODE_DRAG: {
- if (signX) dx = Math.max(W - w0, Math.min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;
- if (signY) dy = Math.max(N - n0, Math.min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;
- break;
- }
- case MODE_HANDLE: {
- if (signX < 0) dx = Math.max(W - w0, Math.min(E - w0, dx)), w1 = w0 + dx, e1 = e0;
- else if (signX > 0) dx = Math.max(W - e0, Math.min(E - e0, dx)), w1 = w0, e1 = e0 + dx;
- if (signY < 0) dy = Math.max(N - n0, Math.min(S - n0, dy)), n1 = n0 + dy, s1 = s0;
- else if (signY > 0) dy = Math.max(N - s0, Math.min(S - s0, dy)), n1 = n0, s1 = s0 + dy;
- break;
- }
- case MODE_CENTER: {
- if (signX) w1 = Math.max(W, Math.min(E, w0 - dx * signX)), e1 = Math.max(W, Math.min(E, e0 + dx * signX));
- if (signY) n1 = Math.max(N, Math.min(S, n0 - dy * signY)), s1 = Math.max(N, Math.min(S, s0 + dy * signY));
- break;
- }
- }
-
- if (e1 < w1) {
- signX *= -1;
- t = w0, w0 = e0, e0 = t;
- t = w1, w1 = e1, e1 = t;
- if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]);
- }
-
- if (s1 < n1) {
- signY *= -1;
- t = n0, n0 = s0, s0 = t;
- t = n1, n1 = s1, s1 = t;
- if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]);
- }
-
- if (state.selection) selection = state.selection; // May be set by brush.move!
- if (lockX) w1 = selection[0][0], e1 = selection[1][0];
- if (lockY) n1 = selection[0][1], s1 = selection[1][1];
-
- if (selection[0][0] !== w1
- || selection[0][1] !== n1
- || selection[1][0] !== e1
- || selection[1][1] !== s1) {
- state.selection = [[w1, n1], [e1, s1]];
- redraw.call(that);
- emit.brush();
- }
- }
-
- function ended() {
- nopropagation$1();
- if (exports.event.touches) {
- if (exports.event.touches.length) return;
- if (touchending) clearTimeout(touchending);
- touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!
- group.on("touchmove.brush touchend.brush touchcancel.brush", null);
- } else {
- yesdrag(exports.event.view, moving);
- view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null);
- }
- group.attr("pointer-events", "all");
- overlay.attr("cursor", cursors.overlay);
- if (state.selection) selection = state.selection; // May be set by brush.move (on start)!
- if (empty(selection)) state.selection = null, redraw.call(that);
- emit.end();
- }
-
- function keydowned() {
- switch (exports.event.keyCode) {
- case 16: { // SHIFT
- shifting = signX && signY;
- break;
- }
- case 18: { // ALT
- if (mode === MODE_HANDLE) {
- if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;
- if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;
- mode = MODE_CENTER;
- move();
- }
- break;
- }
- case 32: { // SPACE; takes priority over ALT
- if (mode === MODE_HANDLE || mode === MODE_CENTER) {
- if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;
- if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;
- mode = MODE_SPACE;
- overlay.attr("cursor", cursors.selection);
- move();
- }
- break;
- }
- default: return;
- }
- noevent$1();
- }
-
- function keyupped() {
- switch (exports.event.keyCode) {
- case 16: { // SHIFT
- if (shifting) {
- lockX = lockY = shifting = false;
- move();
- }
- break;
- }
- case 18: { // ALT
- if (mode === MODE_CENTER) {
- if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;
- if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;
- mode = MODE_HANDLE;
- move();
- }
- break;
- }
- case 32: { // SPACE
- if (mode === MODE_SPACE) {
- if (exports.event.altKey) {
- if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;
- if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;
- mode = MODE_CENTER;
- } else {
- if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;
- if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;
- mode = MODE_HANDLE;
- }
- overlay.attr("cursor", cursors[type]);
- move();
- }
- break;
- }
- default: return;
- }
- noevent$1();
- }
- }
-
- function initialize() {
- var state = this.__brush || {selection: null};
- state.extent = extent.apply(this, arguments);
- state.dim = dim;
- return state;
- }
-
- brush.extent = function(_) {
- return arguments.length ? (extent = typeof _ === "function" ? _ : constant$4([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), brush) : extent;
- };
-
- brush.filter = function(_) {
- return arguments.length ? (filter = typeof _ === "function" ? _ : constant$4(!!_), brush) : filter;
- };
-
- brush.handleSize = function(_) {
- return arguments.length ? (handleSize = +_, brush) : handleSize;
- };
-
- brush.on = function() {
- var value = listeners.on.apply(listeners, arguments);
- return value === listeners ? brush : value;
- };
-
- return brush;
-}
-
-var cos = Math.cos;
-var sin = Math.sin;
-var pi$1 = Math.PI;
-var halfPi$1 = pi$1 / 2;
-var tau$1 = pi$1 * 2;
-var max$1 = Math.max;
-
-function compareValue(compare) {
- return function(a, b) {
- return compare(
- a.source.value + a.target.value,
- b.source.value + b.target.value
- );
- };
-}
-
-function chord() {
- var padAngle = 0,
- sortGroups = null,
- sortSubgroups = null,
- sortChords = null;
-
- function chord(matrix) {
- var n = matrix.length,
- groupSums = [],
- groupIndex = sequence(n),
- subgroupIndex = [],
- chords = [],
- groups = chords.groups = new Array(n),
- subgroups = new Array(n * n),
- k,
- x,
- x0,
- dx,
- i,
- j;
-
- // Compute the sum.
- k = 0, i = -1; while (++i < n) {
- x = 0, j = -1; while (++j < n) {
- x += matrix[i][j];
- }
- groupSums.push(x);
- subgroupIndex.push(sequence(n));
- k += x;
- }
-
- // Sort groups…
- if (sortGroups) groupIndex.sort(function(a, b) {
- return sortGroups(groupSums[a], groupSums[b]);
- });
-
- // Sort subgroups…
- if (sortSubgroups) subgroupIndex.forEach(function(d, i) {
- d.sort(function(a, b) {
- return sortSubgroups(matrix[i][a], matrix[i][b]);
- });
- });
-
- // Convert the sum to scaling factor for [0, 2pi].
- // TODO Allow start and end angle to be specified?
- // TODO Allow padding to be specified as percentage?
- k = max$1(0, tau$1 - padAngle * n) / k;
- dx = k ? padAngle : tau$1 / n;
-
- // Compute the start and end angle for each group and subgroup.
- // Note: Opera has a bug reordering object literal properties!
- x = 0, i = -1; while (++i < n) {
- x0 = x, j = -1; while (++j < n) {
- var di = groupIndex[i],
- dj = subgroupIndex[di][j],
- v = matrix[di][dj],
- a0 = x,
- a1 = x += v * k;
- subgroups[dj * n + di] = {
- index: di,
- subindex: dj,
- startAngle: a0,
- endAngle: a1,
- value: v
- };
- }
- groups[di] = {
- index: di,
- startAngle: x0,
- endAngle: x,
- value: groupSums[di]
- };
- x += dx;
- }
-
- // Generate chords for each (non-empty) subgroup-subgroup link.
- i = -1; while (++i < n) {
- j = i - 1; while (++j < n) {
- var source = subgroups[j * n + i],
- target = subgroups[i * n + j];
- if (source.value || target.value) {
- chords.push(source.value < target.value
- ? {source: target, target: source}
- : {source: source, target: target});
- }
- }
- }
-
- return sortChords ? chords.sort(sortChords) : chords;
- }
-
- chord.padAngle = function(_) {
- return arguments.length ? (padAngle = max$1(0, _), chord) : padAngle;
- };
-
- chord.sortGroups = function(_) {
- return arguments.length ? (sortGroups = _, chord) : sortGroups;
- };
-
- chord.sortSubgroups = function(_) {
- return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups;
- };
-
- chord.sortChords = function(_) {
- return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._;
- };
-
- return chord;
-}
-
-var slice$2 = Array.prototype.slice;
-
-function constant$5(x) {
- return function() {
- return x;
- };
-}
-
-var pi$2 = Math.PI;
-var tau$2 = 2 * pi$2;
-var epsilon$1 = 1e-6;
-var tauEpsilon = tau$2 - epsilon$1;
-
-function Path() {
- this._x0 = this._y0 = // start of current subpath
- this._x1 = this._y1 = null; // end of current subpath
- this._ = "";
-}
-
-function path() {
- return new Path;
-}
-
-Path.prototype = path.prototype = {
- constructor: Path,
- moveTo: function(x, y) {
- this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y);
- },
- closePath: function() {
- if (this._x1 !== null) {
- this._x1 = this._x0, this._y1 = this._y0;
- this._ += "Z";
- }
- },
- lineTo: function(x, y) {
- this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y);
- },
- quadraticCurveTo: function(x1, y1, x, y) {
- this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y);
- },
- bezierCurveTo: function(x1, y1, x2, y2, x, y) {
- this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y);
- },
- arcTo: function(x1, y1, x2, y2, r) {
- x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
- var x0 = this._x1,
- y0 = this._y1,
- x21 = x2 - x1,
- y21 = y2 - y1,
- x01 = x0 - x1,
- y01 = y0 - y1,
- l01_2 = x01 * x01 + y01 * y01;
-
- // Is the radius negative? Error.
- if (r < 0) throw new Error("negative radius: " + r);
-
- // Is this path empty? Move to (x1,y1).
- if (this._x1 === null) {
- this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1);
- }
-
- // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
- else if (!(l01_2 > epsilon$1)) {}
-
- // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?
- // Equivalently, is (x1,y1) coincident with (x2,y2)?
- // Or, is the radius zero? Line to (x1,y1).
- else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon$1) || !r) {
- this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
- }
-
- // Otherwise, draw an arc!
- else {
- var x20 = x2 - x0,
- y20 = y2 - y0,
- l21_2 = x21 * x21 + y21 * y21,
- l20_2 = x20 * x20 + y20 * y20,
- l21 = Math.sqrt(l21_2),
- l01 = Math.sqrt(l01_2),
- l = r * Math.tan((pi$2 - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
- t01 = l / l01,
- t21 = l / l21;
-
- // If the start tangent is not coincident with (x0,y0), line to.
- if (Math.abs(t01 - 1) > epsilon$1) {
- this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
- }
-
- this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21);
- }
- },
- arc: function(x, y, r, a0, a1, ccw) {
- x = +x, y = +y, r = +r;
- var dx = r * Math.cos(a0),
- dy = r * Math.sin(a0),
- x0 = x + dx,
- y0 = y + dy,
- cw = 1 ^ ccw,
- da = ccw ? a0 - a1 : a1 - a0;
-
- // Is the radius negative? Error.
- if (r < 0) throw new Error("negative radius: " + r);
-
- // Is this path empty? Move to (x0,y0).
- if (this._x1 === null) {
- this._ += "M" + x0 + "," + y0;
- }
-
- // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
- else if (Math.abs(this._x1 - x0) > epsilon$1 || Math.abs(this._y1 - y0) > epsilon$1) {
- this._ += "L" + x0 + "," + y0;
- }
-
- // Is this arc empty? We’re done.
- if (!r) return;
-
- // Does the angle go the wrong way? Flip the direction.
- if (da < 0) da = da % tau$2 + tau$2;
-
- // Is this a complete circle? Draw two arcs to complete the circle.
- if (da > tauEpsilon) {
- this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0);
- }
-
- // Is this arc non-empty? Draw an arc!
- else if (da > epsilon$1) {
- this._ += "A" + r + "," + r + ",0," + (+(da >= pi$2)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1));
- }
- },
- rect: function(x, y, w, h) {
- this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z";
- },
- toString: function() {
- return this._;
- }
-};
-
-function defaultSource(d) {
- return d.source;
-}
-
-function defaultTarget(d) {
- return d.target;
-}
-
-function defaultRadius(d) {
- return d.radius;
-}
-
-function defaultStartAngle(d) {
- return d.startAngle;
-}
-
-function defaultEndAngle(d) {
- return d.endAngle;
-}
-
-function ribbon() {
- var source = defaultSource,
- target = defaultTarget,
- radius = defaultRadius,
- startAngle = defaultStartAngle,
- endAngle = defaultEndAngle,
- context = null;
-
- function ribbon() {
- var buffer,
- argv = slice$2.call(arguments),
- s = source.apply(this, argv),
- t = target.apply(this, argv),
- sr = +radius.apply(this, (argv[0] = s, argv)),
- sa0 = startAngle.apply(this, argv) - halfPi$1,
- sa1 = endAngle.apply(this, argv) - halfPi$1,
- sx0 = sr * cos(sa0),
- sy0 = sr * sin(sa0),
- tr = +radius.apply(this, (argv[0] = t, argv)),
- ta0 = startAngle.apply(this, argv) - halfPi$1,
- ta1 = endAngle.apply(this, argv) - halfPi$1;
-
- if (!context) context = buffer = path();
-
- context.moveTo(sx0, sy0);
- context.arc(0, 0, sr, sa0, sa1);
- if (sa0 !== ta0 || sa1 !== ta1) { // TODO sr !== tr?
- context.quadraticCurveTo(0, 0, tr * cos(ta0), tr * sin(ta0));
- context.arc(0, 0, tr, ta0, ta1);
- }
- context.quadraticCurveTo(0, 0, sx0, sy0);
- context.closePath();
-
- if (buffer) return context = null, buffer + "" || null;
- }
-
- ribbon.radius = function(_) {
- return arguments.length ? (radius = typeof _ === "function" ? _ : constant$5(+_), ribbon) : radius;
- };
-
- ribbon.startAngle = function(_) {
- return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$5(+_), ribbon) : startAngle;
- };
-
- ribbon.endAngle = function(_) {
- return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$5(+_), ribbon) : endAngle;
- };
-
- ribbon.source = function(_) {
- return arguments.length ? (source = _, ribbon) : source;
- };
-
- ribbon.target = function(_) {
- return arguments.length ? (target = _, ribbon) : target;
- };
-
- ribbon.context = function(_) {
- return arguments.length ? (context = _ == null ? null : _, ribbon) : context;
- };
-
- return ribbon;
-}
-
-var prefix = "$";
-
-function Map() {}
-
-Map.prototype = map$1.prototype = {
- constructor: Map,
- has: function(key) {
- return (prefix + key) in this;
- },
- get: function(key) {
- return this[prefix + key];
- },
- set: function(key, value) {
- this[prefix + key] = value;
- return this;
- },
- remove: function(key) {
- var property = prefix + key;
- return property in this && delete this[property];
- },
- clear: function() {
- for (var property in this) if (property[0] === prefix) delete this[property];
- },
- keys: function() {
- var keys = [];
- for (var property in this) if (property[0] === prefix) keys.push(property.slice(1));
- return keys;
- },
- values: function() {
- var values = [];
- for (var property in this) if (property[0] === prefix) values.push(this[property]);
- return values;
- },
- entries: function() {
- var entries = [];
- for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]});
- return entries;
- },
- size: function() {
- var size = 0;
- for (var property in this) if (property[0] === prefix) ++size;
- return size;
- },
- empty: function() {
- for (var property in this) if (property[0] === prefix) return false;
- return true;
- },
- each: function(f) {
- for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this);
- }
-};
-
-function map$1(object, f) {
- var map = new Map;
-
- // Copy constructor.
- if (object instanceof Map) object.each(function(value, key) { map.set(key, value); });
-
- // Index array by numeric index or specified key function.
- else if (Array.isArray(object)) {
- var i = -1,
- n = object.length,
- o;
-
- if (f == null) while (++i < n) map.set(i, object[i]);
- else while (++i < n) map.set(f(o = object[i], i, object), o);
- }
-
- // Convert object to map.
- else if (object) for (var key in object) map.set(key, object[key]);
-
- return map;
-}
-
-function nest() {
- var keys = [],
- sortKeys = [],
- sortValues,
- rollup,
- nest;
-
- function apply(array, depth, createResult, setResult) {
- if (depth >= keys.length) {
- if (sortValues != null) array.sort(sortValues);
- return rollup != null ? rollup(array) : array;
- }
-
- var i = -1,
- n = array.length,
- key = keys[depth++],
- keyValue,
- value,
- valuesByKey = map$1(),
- values,
- result = createResult();
-
- while (++i < n) {
- if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) {
- values.push(value);
- } else {
- valuesByKey.set(keyValue, [value]);
- }
- }
-
- valuesByKey.each(function(values, key) {
- setResult(result, key, apply(values, depth, createResult, setResult));
- });
-
- return result;
- }
-
- function entries(map, depth) {
- if (++depth > keys.length) return map;
- var array, sortKey = sortKeys[depth - 1];
- if (rollup != null && depth >= keys.length) array = map.entries();
- else array = [], map.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); });
- return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array;
- }
-
- return nest = {
- object: function(array) { return apply(array, 0, createObject, setObject); },
- map: function(array) { return apply(array, 0, createMap, setMap); },
- entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); },
- key: function(d) { keys.push(d); return nest; },
- sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; },
- sortValues: function(order) { sortValues = order; return nest; },
- rollup: function(f) { rollup = f; return nest; }
- };
-}
-
-function createObject() {
- return {};
-}
-
-function setObject(object, key, value) {
- object[key] = value;
-}
-
-function createMap() {
- return map$1();
-}
-
-function setMap(map, key, value) {
- map.set(key, value);
-}
-
-function Set() {}
-
-var proto = map$1.prototype;
-
-Set.prototype = set$2.prototype = {
- constructor: Set,
- has: proto.has,
- add: function(value) {
- value += "";
- this[prefix + value] = value;
- return this;
- },
- remove: proto.remove,
- clear: proto.clear,
- values: proto.keys,
- size: proto.size,
- empty: proto.empty,
- each: proto.each
-};
-
-function set$2(object, f) {
- var set = new Set;
-
- // Copy constructor.
- if (object instanceof Set) object.each(function(value) { set.add(value); });
-
- // Otherwise, assume it’s an array.
- else if (object) {
- var i = -1, n = object.length;
- if (f == null) while (++i < n) set.add(object[i]);
- else while (++i < n) set.add(f(object[i], i, object));
- }
-
- return set;
-}
-
-function keys(map) {
- var keys = [];
- for (var key in map) keys.push(key);
- return keys;
-}
-
-function values(map) {
- var values = [];
- for (var key in map) values.push(map[key]);
- return values;
-}
-
-function entries(map) {
- var entries = [];
- for (var key in map) entries.push({key: key, value: map[key]});
- return entries;
-}
-
-var EOL = {};
-var EOF = {};
-var QUOTE = 34;
-var NEWLINE = 10;
-var RETURN = 13;
-
-function objectConverter(columns) {
- return new Function("d", "return {" + columns.map(function(name, i) {
- return JSON.stringify(name) + ": d[" + i + "]";
- }).join(",") + "}");
-}
-
-function customConverter(columns, f) {
- var object = objectConverter(columns);
- return function(row, i) {
- return f(object(row), i, columns);
- };
-}
-
-// Compute unique columns in order of discovery.
-function inferColumns(rows) {
- var columnSet = Object.create(null),
- columns = [];
-
- rows.forEach(function(row) {
- for (var column in row) {
- if (!(column in columnSet)) {
- columns.push(columnSet[column] = column);
- }
- }
- });
-
- return columns;
-}
-
-function dsv(delimiter) {
- var reFormat = new RegExp("[\"" + delimiter + "\n\r]"),
- DELIMITER = delimiter.charCodeAt(0);
-
- function parse(text, f) {
- var convert, columns, rows = parseRows(text, function(row, i) {
- if (convert) return convert(row, i - 1);
- columns = row, convert = f ? customConverter(row, f) : objectConverter(row);
- });
- rows.columns = columns || [];
- return rows;
- }
-
- function parseRows(text, f) {
- var rows = [], // output rows
- N = text.length,
- I = 0, // current character index
- n = 0, // current line number
- t, // current token
- eof = N <= 0, // current token followed by EOF?
- eol = false; // current token followed by EOL?
-
- // Strip the trailing newline.
- if (text.charCodeAt(N - 1) === NEWLINE) --N;
- if (text.charCodeAt(N - 1) === RETURN) --N;
-
- function token() {
- if (eof) return EOF;
- if (eol) return eol = false, EOL;
-
- // Unescape quotes.
- var i, j = I, c;
- if (text.charCodeAt(j) === QUOTE) {
- while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);
- if ((i = I) >= N) eof = true;
- else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;
- else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }
- return text.slice(j + 1, i - 1).replace(/""/g, "\"");
- }
-
- // Find next delimiter or newline.
- while (I < N) {
- if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;
- else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }
- else if (c !== DELIMITER) continue;
- return text.slice(j, i);
- }
-
- // Return last token before EOF.
- return eof = true, text.slice(j, N);
- }
-
- while ((t = token()) !== EOF) {
- var row = [];
- while (t !== EOL && t !== EOF) row.push(t), t = token();
- if (f && (row = f(row, n++)) == null) continue;
- rows.push(row);
- }
-
- return rows;
- }
-
- function format(rows, columns) {
- if (columns == null) columns = inferColumns(rows);
- return [columns.map(formatValue).join(delimiter)].concat(rows.map(function(row) {
- return columns.map(function(column) {
- return formatValue(row[column]);
- }).join(delimiter);
- })).join("\n");
- }
-
- function formatRows(rows) {
- return rows.map(formatRow).join("\n");
- }
-
- function formatRow(row) {
- return row.map(formatValue).join(delimiter);
- }
-
- function formatValue(text) {
- return text == null ? ""
- : reFormat.test(text += "") ? "\"" + text.replace(/"/g, "\"\"") + "\""
- : text;
- }
-
- return {
- parse: parse,
- parseRows: parseRows,
- format: format,
- formatRows: formatRows
- };
-}
-
-var csv = dsv(",");
-
-var csvParse = csv.parse;
-var csvParseRows = csv.parseRows;
-var csvFormat = csv.format;
-var csvFormatRows = csv.formatRows;
-
-var tsv = dsv("\t");
-
-var tsvParse = tsv.parse;
-var tsvParseRows = tsv.parseRows;
-var tsvFormat = tsv.format;
-var tsvFormatRows = tsv.formatRows;
-
-function center$1(x, y) {
- var nodes;
-
- if (x == null) x = 0;
- if (y == null) y = 0;
-
- function force() {
- var i,
- n = nodes.length,
- node,
- sx = 0,
- sy = 0;
-
- for (i = 0; i < n; ++i) {
- node = nodes[i], sx += node.x, sy += node.y;
- }
-
- for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) {
- node = nodes[i], node.x -= sx, node.y -= sy;
- }
- }
-
- force.initialize = function(_) {
- nodes = _;
- };
-
- force.x = function(_) {
- return arguments.length ? (x = +_, force) : x;
- };
-
- force.y = function(_) {
- return arguments.length ? (y = +_, force) : y;
- };
-
- return force;
-}
-
-function constant$6(x) {
- return function() {
- return x;
- };
-}
-
-function jiggle() {
- return (Math.random() - 0.5) * 1e-6;
-}
-
-function tree_add(d) {
- var x = +this._x.call(null, d),
- y = +this._y.call(null, d);
- return add(this.cover(x, y), x, y, d);
-}
-
-function add(tree, x, y, d) {
- if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points
-
- var parent,
- node = tree._root,
- leaf = {data: d},
- x0 = tree._x0,
- y0 = tree._y0,
- x1 = tree._x1,
- y1 = tree._y1,
- xm,
- ym,
- xp,
- yp,
- right,
- bottom,
- i,
- j;
-
- // If the tree is empty, initialize the root as a leaf.
- if (!node) return tree._root = leaf, tree;
-
- // Find the existing leaf for the new point, or add it.
- while (node.length) {
- if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;
- if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;
- if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;
- }
-
- // Is the new point is exactly coincident with the existing point?
- xp = +tree._x.call(null, node.data);
- yp = +tree._y.call(null, node.data);
- if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;
-
- // Otherwise, split the leaf node until the old and new point are separated.
- do {
- parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);
- if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;
- if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;
- } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));
- return parent[j] = node, parent[i] = leaf, tree;
-}
-
-function addAll(data) {
- var d, i, n = data.length,
- x,
- y,
- xz = new Array(n),
- yz = new Array(n),
- x0 = Infinity,
- y0 = Infinity,
- x1 = -Infinity,
- y1 = -Infinity;
-
- // Compute the points and their extent.
- for (i = 0; i < n; ++i) {
- if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;
- xz[i] = x;
- yz[i] = y;
- if (x < x0) x0 = x;
- if (x > x1) x1 = x;
- if (y < y0) y0 = y;
- if (y > y1) y1 = y;
- }
-
- // If there were no (valid) points, inherit the existing extent.
- if (x1 < x0) x0 = this._x0, x1 = this._x1;
- if (y1 < y0) y0 = this._y0, y1 = this._y1;
-
- // Expand the tree to cover the new points.
- this.cover(x0, y0).cover(x1, y1);
-
- // Add the new points.
- for (i = 0; i < n; ++i) {
- add(this, xz[i], yz[i], data[i]);
- }
-
- return this;
-}
-
-function tree_cover(x, y) {
- if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points
-
- var x0 = this._x0,
- y0 = this._y0,
- x1 = this._x1,
- y1 = this._y1;
-
- // If the quadtree has no extent, initialize them.
- // Integer extent are necessary so that if we later double the extent,
- // the existing quadrant boundaries don’t change due to floating point error!
- if (isNaN(x0)) {
- x1 = (x0 = Math.floor(x)) + 1;
- y1 = (y0 = Math.floor(y)) + 1;
- }
-
- // Otherwise, double repeatedly to cover.
- else if (x0 > x || x > x1 || y0 > y || y > y1) {
- var z = x1 - x0,
- node = this._root,
- parent,
- i;
-
- switch (i = (y < (y0 + y1) / 2) << 1 | (x < (x0 + x1) / 2)) {
- case 0: {
- do parent = new Array(4), parent[i] = node, node = parent;
- while (z *= 2, x1 = x0 + z, y1 = y0 + z, x > x1 || y > y1);
- break;
- }
- case 1: {
- do parent = new Array(4), parent[i] = node, node = parent;
- while (z *= 2, x0 = x1 - z, y1 = y0 + z, x0 > x || y > y1);
- break;
- }
- case 2: {
- do parent = new Array(4), parent[i] = node, node = parent;
- while (z *= 2, x1 = x0 + z, y0 = y1 - z, x > x1 || y0 > y);
- break;
- }
- case 3: {
- do parent = new Array(4), parent[i] = node, node = parent;
- while (z *= 2, x0 = x1 - z, y0 = y1 - z, x0 > x || y0 > y);
- break;
- }
- }
-
- if (this._root && this._root.length) this._root = node;
- }
-
- // If the quadtree covers the point already, just return.
- else return this;
-
- this._x0 = x0;
- this._y0 = y0;
- this._x1 = x1;
- this._y1 = y1;
- return this;
-}
-
-function tree_data() {
- var data = [];
- this.visit(function(node) {
- if (!node.length) do data.push(node.data); while (node = node.next)
- });
- return data;
-}
-
-function tree_extent(_) {
- return arguments.length
- ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])
- : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];
-}
-
-function Quad(node, x0, y0, x1, y1) {
- this.node = node;
- this.x0 = x0;
- this.y0 = y0;
- this.x1 = x1;
- this.y1 = y1;
-}
-
-function tree_find(x, y, radius) {
- var data,
- x0 = this._x0,
- y0 = this._y0,
- x1,
- y1,
- x2,
- y2,
- x3 = this._x1,
- y3 = this._y1,
- quads = [],
- node = this._root,
- q,
- i;
-
- if (node) quads.push(new Quad(node, x0, y0, x3, y3));
- if (radius == null) radius = Infinity;
- else {
- x0 = x - radius, y0 = y - radius;
- x3 = x + radius, y3 = y + radius;
- radius *= radius;
- }
-
- while (q = quads.pop()) {
-
- // Stop searching if this quadrant can’t contain a closer node.
- if (!(node = q.node)
- || (x1 = q.x0) > x3
- || (y1 = q.y0) > y3
- || (x2 = q.x1) < x0
- || (y2 = q.y1) < y0) continue;
-
- // Bisect the current quadrant.
- if (node.length) {
- var xm = (x1 + x2) / 2,
- ym = (y1 + y2) / 2;
-
- quads.push(
- new Quad(node[3], xm, ym, x2, y2),
- new Quad(node[2], x1, ym, xm, y2),
- new Quad(node[1], xm, y1, x2, ym),
- new Quad(node[0], x1, y1, xm, ym)
- );
-
- // Visit the closest quadrant first.
- if (i = (y >= ym) << 1 | (x >= xm)) {
- q = quads[quads.length - 1];
- quads[quads.length - 1] = quads[quads.length - 1 - i];
- quads[quads.length - 1 - i] = q;
- }
- }
-
- // Visit this point. (Visiting coincident points isn’t necessary!)
- else {
- var dx = x - +this._x.call(null, node.data),
- dy = y - +this._y.call(null, node.data),
- d2 = dx * dx + dy * dy;
- if (d2 < radius) {
- var d = Math.sqrt(radius = d2);
- x0 = x - d, y0 = y - d;
- x3 = x + d, y3 = y + d;
- data = node.data;
- }
- }
- }
-
- return data;
-}
-
-function tree_remove(d) {
- if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points
-
- var parent,
- node = this._root,
- retainer,
- previous,
- next,
- x0 = this._x0,
- y0 = this._y0,
- x1 = this._x1,
- y1 = this._y1,
- x,
- y,
- xm,
- ym,
- right,
- bottom,
- i,
- j;
-
- // If the tree is empty, initialize the root as a leaf.
- if (!node) return this;
-
- // Find the leaf node for the point.
- // While descending, also retain the deepest parent with a non-removed sibling.
- if (node.length) while (true) {
- if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;
- if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;
- if (!(parent = node, node = node[i = bottom << 1 | right])) return this;
- if (!node.length) break;
- if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;
- }
-
- // Find the point to remove.
- while (node.data !== d) if (!(previous = node, node = node.next)) return this;
- if (next = node.next) delete node.next;
-
- // If there are multiple coincident points, remove just the point.
- if (previous) return next ? previous.next = next : delete previous.next, this;
-
- // If this is the root point, remove it.
- if (!parent) return this._root = next, this;
-
- // Remove this leaf.
- next ? parent[i] = next : delete parent[i];
-
- // If the parent now contains exactly one leaf, collapse superfluous parents.
- if ((node = parent[0] || parent[1] || parent[2] || parent[3])
- && node === (parent[3] || parent[2] || parent[1] || parent[0])
- && !node.length) {
- if (retainer) retainer[j] = node;
- else this._root = node;
- }
-
- return this;
-}
-
-function removeAll(data) {
- for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);
- return this;
-}
-
-function tree_root() {
- return this._root;
-}
-
-function tree_size() {
- var size = 0;
- this.visit(function(node) {
- if (!node.length) do ++size; while (node = node.next)
- });
- return size;
-}
-
-function tree_visit(callback) {
- var quads = [], q, node = this._root, child, x0, y0, x1, y1;
- if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));
- while (q = quads.pop()) {
- if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {
- var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;
- if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));
- if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));
- if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));
- if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));
- }
- }
- return this;
-}
-
-function tree_visitAfter(callback) {
- var quads = [], next = [], q;
- if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));
- while (q = quads.pop()) {
- var node = q.node;
- if (node.length) {
- var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;
- if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));
- if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));
- if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));
- if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));
- }
- next.push(q);
- }
- while (q = next.pop()) {
- callback(q.node, q.x0, q.y0, q.x1, q.y1);
- }
- return this;
-}
-
-function defaultX(d) {
- return d[0];
-}
-
-function tree_x(_) {
- return arguments.length ? (this._x = _, this) : this._x;
-}
-
-function defaultY(d) {
- return d[1];
-}
-
-function tree_y(_) {
- return arguments.length ? (this._y = _, this) : this._y;
-}
-
-function quadtree(nodes, x, y) {
- var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);
- return nodes == null ? tree : tree.addAll(nodes);
-}
-
-function Quadtree(x, y, x0, y0, x1, y1) {
- this._x = x;
- this._y = y;
- this._x0 = x0;
- this._y0 = y0;
- this._x1 = x1;
- this._y1 = y1;
- this._root = undefined;
-}
-
-function leaf_copy(leaf) {
- var copy = {data: leaf.data}, next = copy;
- while (leaf = leaf.next) next = next.next = {data: leaf.data};
- return copy;
-}
-
-var treeProto = quadtree.prototype = Quadtree.prototype;
-
-treeProto.copy = function() {
- var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),
- node = this._root,
- nodes,
- child;
-
- if (!node) return copy;
-
- if (!node.length) return copy._root = leaf_copy(node), copy;
-
- nodes = [{source: node, target: copy._root = new Array(4)}];
- while (node = nodes.pop()) {
- for (var i = 0; i < 4; ++i) {
- if (child = node.source[i]) {
- if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});
- else node.target[i] = leaf_copy(child);
- }
- }
- }
-
- return copy;
-};
-
-treeProto.add = tree_add;
-treeProto.addAll = addAll;
-treeProto.cover = tree_cover;
-treeProto.data = tree_data;
-treeProto.extent = tree_extent;
-treeProto.find = tree_find;
-treeProto.remove = tree_remove;
-treeProto.removeAll = removeAll;
-treeProto.root = tree_root;
-treeProto.size = tree_size;
-treeProto.visit = tree_visit;
-treeProto.visitAfter = tree_visitAfter;
-treeProto.x = tree_x;
-treeProto.y = tree_y;
-
-function x(d) {
- return d.x + d.vx;
-}
-
-function y(d) {
- return d.y + d.vy;
-}
-
-function collide(radius) {
- var nodes,
- radii,
- strength = 1,
- iterations = 1;
-
- if (typeof radius !== "function") radius = constant$6(radius == null ? 1 : +radius);
-
- function force() {
- var i, n = nodes.length,
- tree,
- node,
- xi,
- yi,
- ri,
- ri2;
-
- for (var k = 0; k < iterations; ++k) {
- tree = quadtree(nodes, x, y).visitAfter(prepare);
- for (i = 0; i < n; ++i) {
- node = nodes[i];
- ri = radii[node.index], ri2 = ri * ri;
- xi = node.x + node.vx;
- yi = node.y + node.vy;
- tree.visit(apply);
- }
- }
-
- function apply(quad, x0, y0, x1, y1) {
- var data = quad.data, rj = quad.r, r = ri + rj;
- if (data) {
- if (data.index > node.index) {
- var x = xi - data.x - data.vx,
- y = yi - data.y - data.vy,
- l = x * x + y * y;
- if (l < r * r) {
- if (x === 0) x = jiggle(), l += x * x;
- if (y === 0) y = jiggle(), l += y * y;
- l = (r - (l = Math.sqrt(l))) / l * strength;
- node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));
- node.vy += (y *= l) * r;
- data.vx -= x * (r = 1 - r);
- data.vy -= y * r;
- }
- }
- return;
- }
- return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;
- }
- }
-
- function prepare(quad) {
- if (quad.data) return quad.r = radii[quad.data.index];
- for (var i = quad.r = 0; i < 4; ++i) {
- if (quad[i] && quad[i].r > quad.r) {
- quad.r = quad[i].r;
- }
- }
- }
-
- function initialize() {
- if (!nodes) return;
- var i, n = nodes.length, node;
- radii = new Array(n);
- for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);
- }
-
- force.initialize = function(_) {
- nodes = _;
- initialize();
- };
-
- force.iterations = function(_) {
- return arguments.length ? (iterations = +_, force) : iterations;
- };
-
- force.strength = function(_) {
- return arguments.length ? (strength = +_, force) : strength;
- };
-
- force.radius = function(_) {
- return arguments.length ? (radius = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : radius;
- };
-
- return force;
-}
-
-function index(d) {
- return d.index;
-}
-
-function find(nodeById, nodeId) {
- var node = nodeById.get(nodeId);
- if (!node) throw new Error("missing: " + nodeId);
- return node;
-}
-
-function link(links) {
- var id = index,
- strength = defaultStrength,
- strengths,
- distance = constant$6(30),
- distances,
- nodes,
- count,
- bias,
- iterations = 1;
-
- if (links == null) links = [];
-
- function defaultStrength(link) {
- return 1 / Math.min(count[link.source.index], count[link.target.index]);
- }
-
- function force(alpha) {
- for (var k = 0, n = links.length; k < iterations; ++k) {
- for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {
- link = links[i], source = link.source, target = link.target;
- x = target.x + target.vx - source.x - source.vx || jiggle();
- y = target.y + target.vy - source.y - source.vy || jiggle();
- l = Math.sqrt(x * x + y * y);
- l = (l - distances[i]) / l * alpha * strengths[i];
- x *= l, y *= l;
- target.vx -= x * (b = bias[i]);
- target.vy -= y * b;
- source.vx += x * (b = 1 - b);
- source.vy += y * b;
- }
- }
- }
-
- function initialize() {
- if (!nodes) return;
-
- var i,
- n = nodes.length,
- m = links.length,
- nodeById = map$1(nodes, id),
- link;
-
- for (i = 0, count = new Array(n); i < m; ++i) {
- link = links[i], link.index = i;
- if (typeof link.source !== "object") link.source = find(nodeById, link.source);
- if (typeof link.target !== "object") link.target = find(nodeById, link.target);
- count[link.source.index] = (count[link.source.index] || 0) + 1;
- count[link.target.index] = (count[link.target.index] || 0) + 1;
- }
-
- for (i = 0, bias = new Array(m); i < m; ++i) {
- link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);
- }
-
- strengths = new Array(m), initializeStrength();
- distances = new Array(m), initializeDistance();
- }
-
- function initializeStrength() {
- if (!nodes) return;
-
- for (var i = 0, n = links.length; i < n; ++i) {
- strengths[i] = +strength(links[i], i, links);
- }
- }
-
- function initializeDistance() {
- if (!nodes) return;
-
- for (var i = 0, n = links.length; i < n; ++i) {
- distances[i] = +distance(links[i], i, links);
- }
- }
-
- force.initialize = function(_) {
- nodes = _;
- initialize();
- };
-
- force.links = function(_) {
- return arguments.length ? (links = _, initialize(), force) : links;
- };
-
- force.id = function(_) {
- return arguments.length ? (id = _, force) : id;
- };
-
- force.iterations = function(_) {
- return arguments.length ? (iterations = +_, force) : iterations;
- };
-
- force.strength = function(_) {
- return arguments.length ? (strength = typeof _ === "function" ? _ : constant$6(+_), initializeStrength(), force) : strength;
- };
-
- force.distance = function(_) {
- return arguments.length ? (distance = typeof _ === "function" ? _ : constant$6(+_), initializeDistance(), force) : distance;
- };
-
- return force;
-}
-
-function x$1(d) {
- return d.x;
-}
-
-function y$1(d) {
- return d.y;
-}
-
-var initialRadius = 10;
-var initialAngle = Math.PI * (3 - Math.sqrt(5));
-
-function simulation(nodes) {
- var simulation,
- alpha = 1,
- alphaMin = 0.001,
- alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),
- alphaTarget = 0,
- velocityDecay = 0.6,
- forces = map$1(),
- stepper = timer(step),
- event = dispatch("tick", "end");
-
- if (nodes == null) nodes = [];
-
- function step() {
- tick();
- event.call("tick", simulation);
- if (alpha < alphaMin) {
- stepper.stop();
- event.call("end", simulation);
- }
- }
-
- function tick() {
- var i, n = nodes.length, node;
-
- alpha += (alphaTarget - alpha) * alphaDecay;
-
- forces.each(function(force) {
- force(alpha);
- });
-
- for (i = 0; i < n; ++i) {
- node = nodes[i];
- if (node.fx == null) node.x += node.vx *= velocityDecay;
- else node.x = node.fx, node.vx = 0;
- if (node.fy == null) node.y += node.vy *= velocityDecay;
- else node.y = node.fy, node.vy = 0;
- }
- }
-
- function initializeNodes() {
- for (var i = 0, n = nodes.length, node; i < n; ++i) {
- node = nodes[i], node.index = i;
- if (isNaN(node.x) || isNaN(node.y)) {
- var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle;
- node.x = radius * Math.cos(angle);
- node.y = radius * Math.sin(angle);
- }
- if (isNaN(node.vx) || isNaN(node.vy)) {
- node.vx = node.vy = 0;
- }
- }
- }
-
- function initializeForce(force) {
- if (force.initialize) force.initialize(nodes);
- return force;
- }
-
- initializeNodes();
-
- return simulation = {
- tick: tick,
-
- restart: function() {
- return stepper.restart(step), simulation;
- },
-
- stop: function() {
- return stepper.stop(), simulation;
- },
-
- nodes: function(_) {
- return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes;
- },
-
- alpha: function(_) {
- return arguments.length ? (alpha = +_, simulation) : alpha;
- },
-
- alphaMin: function(_) {
- return arguments.length ? (alphaMin = +_, simulation) : alphaMin;
- },
-
- alphaDecay: function(_) {
- return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;
- },
-
- alphaTarget: function(_) {
- return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;
- },
-
- velocityDecay: function(_) {
- return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;
- },
-
- force: function(name, _) {
- return arguments.length > 1 ? (_ == null ? forces.remove(name) : forces.set(name, initializeForce(_)), simulation) : forces.get(name);
- },
-
- find: function(x, y, radius) {
- var i = 0,
- n = nodes.length,
- dx,
- dy,
- d2,
- node,
- closest;
-
- if (radius == null) radius = Infinity;
- else radius *= radius;
-
- for (i = 0; i < n; ++i) {
- node = nodes[i];
- dx = x - node.x;
- dy = y - node.y;
- d2 = dx * dx + dy * dy;
- if (d2 < radius) closest = node, radius = d2;
- }
-
- return closest;
- },
-
- on: function(name, _) {
- return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);
- }
- };
-}
-
-function manyBody() {
- var nodes,
- node,
- alpha,
- strength = constant$6(-30),
- strengths,
- distanceMin2 = 1,
- distanceMax2 = Infinity,
- theta2 = 0.81;
-
- function force(_) {
- var i, n = nodes.length, tree = quadtree(nodes, x$1, y$1).visitAfter(accumulate);
- for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);
- }
-
- function initialize() {
- if (!nodes) return;
- var i, n = nodes.length, node;
- strengths = new Array(n);
- for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);
- }
-
- function accumulate(quad) {
- var strength = 0, q, c, weight = 0, x, y, i;
-
- // For internal nodes, accumulate forces from child quadrants.
- if (quad.length) {
- for (x = y = i = 0; i < 4; ++i) {
- if ((q = quad[i]) && (c = Math.abs(q.value))) {
- strength += q.value, weight += c, x += c * q.x, y += c * q.y;
- }
- }
- quad.x = x / weight;
- quad.y = y / weight;
- }
-
- // For leaf nodes, accumulate forces from coincident quadrants.
- else {
- q = quad;
- q.x = q.data.x;
- q.y = q.data.y;
- do strength += strengths[q.data.index];
- while (q = q.next);
- }
-
- quad.value = strength;
- }
-
- function apply(quad, x1, _, x2) {
- if (!quad.value) return true;
-
- var x = quad.x - node.x,
- y = quad.y - node.y,
- w = x2 - x1,
- l = x * x + y * y;
-
- // Apply the Barnes-Hut approximation if possible.
- // Limit forces for very close nodes; randomize direction if coincident.
- if (w * w / theta2 < l) {
- if (l < distanceMax2) {
- if (x === 0) x = jiggle(), l += x * x;
- if (y === 0) y = jiggle(), l += y * y;
- if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);
- node.vx += x * quad.value * alpha / l;
- node.vy += y * quad.value * alpha / l;
- }
- return true;
- }
-
- // Otherwise, process points directly.
- else if (quad.length || l >= distanceMax2) return;
-
- // Limit forces for very close nodes; randomize direction if coincident.
- if (quad.data !== node || quad.next) {
- if (x === 0) x = jiggle(), l += x * x;
- if (y === 0) y = jiggle(), l += y * y;
- if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);
- }
-
- do if (quad.data !== node) {
- w = strengths[quad.data.index] * alpha / l;
- node.vx += x * w;
- node.vy += y * w;
- } while (quad = quad.next);
- }
-
- force.initialize = function(_) {
- nodes = _;
- initialize();
- };
-
- force.strength = function(_) {
- return arguments.length ? (strength = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : strength;
- };
-
- force.distanceMin = function(_) {
- return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);
- };
-
- force.distanceMax = function(_) {
- return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);
- };
-
- force.theta = function(_) {
- return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);
- };
-
- return force;
-}
-
-function radial(radius, x, y) {
- var nodes,
- strength = constant$6(0.1),
- strengths,
- radiuses;
-
- if (typeof radius !== "function") radius = constant$6(+radius);
- if (x == null) x = 0;
- if (y == null) y = 0;
-
- function force(alpha) {
- for (var i = 0, n = nodes.length; i < n; ++i) {
- var node = nodes[i],
- dx = node.x - x || 1e-6,
- dy = node.y - y || 1e-6,
- r = Math.sqrt(dx * dx + dy * dy),
- k = (radiuses[i] - r) * strengths[i] * alpha / r;
- node.vx += dx * k;
- node.vy += dy * k;
- }
- }
-
- function initialize() {
- if (!nodes) return;
- var i, n = nodes.length;
- strengths = new Array(n);
- radiuses = new Array(n);
- for (i = 0; i < n; ++i) {
- radiuses[i] = +radius(nodes[i], i, nodes);
- strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);
- }
- }
-
- force.initialize = function(_) {
- nodes = _, initialize();
- };
-
- force.strength = function(_) {
- return arguments.length ? (strength = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : strength;
- };
-
- force.radius = function(_) {
- return arguments.length ? (radius = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : radius;
- };
-
- force.x = function(_) {
- return arguments.length ? (x = +_, force) : x;
- };
-
- force.y = function(_) {
- return arguments.length ? (y = +_, force) : y;
- };
-
- return force;
-}
-
-function x$2(x) {
- var strength = constant$6(0.1),
- nodes,
- strengths,
- xz;
-
- if (typeof x !== "function") x = constant$6(x == null ? 0 : +x);
-
- function force(alpha) {
- for (var i = 0, n = nodes.length, node; i < n; ++i) {
- node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;
- }
- }
-
- function initialize() {
- if (!nodes) return;
- var i, n = nodes.length;
- strengths = new Array(n);
- xz = new Array(n);
- for (i = 0; i < n; ++i) {
- strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);
- }
- }
-
- force.initialize = function(_) {
- nodes = _;
- initialize();
- };
-
- force.strength = function(_) {
- return arguments.length ? (strength = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : strength;
- };
-
- force.x = function(_) {
- return arguments.length ? (x = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : x;
- };
-
- return force;
-}
-
-function y$2(y) {
- var strength = constant$6(0.1),
- nodes,
- strengths,
- yz;
-
- if (typeof y !== "function") y = constant$6(y == null ? 0 : +y);
-
- function force(alpha) {
- for (var i = 0, n = nodes.length, node; i < n; ++i) {
- node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;
- }
- }
-
- function initialize() {
- if (!nodes) return;
- var i, n = nodes.length;
- strengths = new Array(n);
- yz = new Array(n);
- for (i = 0; i < n; ++i) {
- strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);
- }
- }
-
- force.initialize = function(_) {
- nodes = _;
- initialize();
- };
-
- force.strength = function(_) {
- return arguments.length ? (strength = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : strength;
- };
-
- force.y = function(_) {
- return arguments.length ? (y = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : y;
- };
-
- return force;
-}
-
-// Computes the decimal coefficient and exponent of the specified number x with
-// significant digits p, where x is positive and p is in [1, 21] or undefined.
-// For example, formatDecimal(1.23) returns ["123", 0].
-function formatDecimal(x, p) {
- if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
- var i, coefficient = x.slice(0, i);
-
- // The string returned by toExponential either has the form \d\.\d+e[-+]\d+
- // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
- return [
- coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
- +x.slice(i + 1)
- ];
-}
-
-function exponent$1(x) {
- return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;
-}
-
-function formatGroup(grouping, thousands) {
- return function(value, width) {
- var i = value.length,
- t = [],
- j = 0,
- g = grouping[0],
- length = 0;
-
- while (i > 0 && g > 0) {
- if (length + g + 1 > width) g = Math.max(1, width - length);
- t.push(value.substring(i -= g, i + g));
- if ((length += g + 1) > width) break;
- g = grouping[j = (j + 1) % grouping.length];
- }
-
- return t.reverse().join(thousands);
- };
-}
-
-function formatNumerals(numerals) {
- return function(value) {
- return value.replace(/[0-9]/g, function(i) {
- return numerals[+i];
- });
- };
-}
-
-function formatDefault(x, p) {
- x = x.toPrecision(p);
-
- out: for (var n = x.length, i = 1, i0 = -1, i1; i < n; ++i) {
- switch (x[i]) {
- case ".": i0 = i1 = i; break;
- case "0": if (i0 === 0) i0 = i; i1 = i; break;
- case "e": break out;
- default: if (i0 > 0) i0 = 0; break;
- }
- }
-
- return i0 > 0 ? x.slice(0, i0) + x.slice(i1 + 1) : x;
-}
-
-var prefixExponent;
-
-function formatPrefixAuto(x, p) {
- var d = formatDecimal(x, p);
- if (!d) return x + "";
- var coefficient = d[0],
- exponent = d[1],
- i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
- n = coefficient.length;
- return i === n ? coefficient
- : i > n ? coefficient + new Array(i - n + 1).join("0")
- : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
- : "0." + new Array(1 - i).join("0") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y!
-}
-
-function formatRounded(x, p) {
- var d = formatDecimal(x, p);
- if (!d) return x + "";
- var coefficient = d[0],
- exponent = d[1];
- return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
- : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
- : coefficient + new Array(exponent - coefficient.length + 2).join("0");
-}
-
-var formatTypes = {
- "": formatDefault,
- "%": function(x, p) { return (x * 100).toFixed(p); },
- "b": function(x) { return Math.round(x).toString(2); },
- "c": function(x) { return x + ""; },
- "d": function(x) { return Math.round(x).toString(10); },
- "e": function(x, p) { return x.toExponential(p); },
- "f": function(x, p) { return x.toFixed(p); },
- "g": function(x, p) { return x.toPrecision(p); },
- "o": function(x) { return Math.round(x).toString(8); },
- "p": function(x, p) { return formatRounded(x * 100, p); },
- "r": formatRounded,
- "s": formatPrefixAuto,
- "X": function(x) { return Math.round(x).toString(16).toUpperCase(); },
- "x": function(x) { return Math.round(x).toString(16); }
-};
-
-// [[fill]align][sign][symbol][0][width][,][.precision][type]
-var re = /^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;
-
-function formatSpecifier(specifier) {
- return new FormatSpecifier(specifier);
-}
-
-formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
-
-function FormatSpecifier(specifier) {
- if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
-
- var match,
- fill = match[1] || " ",
- align = match[2] || ">",
- sign = match[3] || "-",
- symbol = match[4] || "",
- zero = !!match[5],
- width = match[6] && +match[6],
- comma = !!match[7],
- precision = match[8] && +match[8].slice(1),
- type = match[9] || "";
-
- // The "n" type is an alias for ",g".
- if (type === "n") comma = true, type = "g";
-
- // Map invalid types to the default format.
- else if (!formatTypes[type]) type = "";
-
- // If zero fill is specified, padding goes after sign and before digits.
- if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
-
- this.fill = fill;
- this.align = align;
- this.sign = sign;
- this.symbol = symbol;
- this.zero = zero;
- this.width = width;
- this.comma = comma;
- this.precision = precision;
- this.type = type;
-}
-
-FormatSpecifier.prototype.toString = function() {
- return this.fill
- + this.align
- + this.sign
- + this.symbol
- + (this.zero ? "0" : "")
- + (this.width == null ? "" : Math.max(1, this.width | 0))
- + (this.comma ? "," : "")
- + (this.precision == null ? "" : "." + Math.max(0, this.precision | 0))
- + this.type;
-};
-
-function identity$3(x) {
- return x;
-}
-
-var prefixes = ["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];
-
-function formatLocale(locale) {
- var group = locale.grouping && locale.thousands ? formatGroup(locale.grouping, locale.thousands) : identity$3,
- currency = locale.currency,
- decimal = locale.decimal,
- numerals = locale.numerals ? formatNumerals(locale.numerals) : identity$3,
- percent = locale.percent || "%";
-
- function newFormat(specifier) {
- specifier = formatSpecifier(specifier);
-
- var fill = specifier.fill,
- align = specifier.align,
- sign = specifier.sign,
- symbol = specifier.symbol,
- zero = specifier.zero,
- width = specifier.width,
- comma = specifier.comma,
- precision = specifier.precision,
- type = specifier.type;
-
- // Compute the prefix and suffix.
- // For SI-prefix, the suffix is lazily computed.
- var prefix = symbol === "$" ? currency[0] : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
- suffix = symbol === "$" ? currency[1] : /[%p]/.test(type) ? percent : "";
-
- // What format function should we use?
- // Is this an integer type?
- // Can this type generate exponential notation?
- var formatType = formatTypes[type],
- maybeSuffix = !type || /[defgprs%]/.test(type);
-
- // Set the default precision if not specified,
- // or clamp the specified precision to the supported range.
- // For significant precision, it must be in [1, 21].
- // For fixed precision, it must be in [0, 20].
- precision = precision == null ? (type ? 6 : 12)
- : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
- : Math.max(0, Math.min(20, precision));
-
- function format(value) {
- var valuePrefix = prefix,
- valueSuffix = suffix,
- i, n, c;
-
- if (type === "c") {
- valueSuffix = formatType(value) + valueSuffix;
- value = "";
- } else {
- value = +value;
-
- // Perform the initial formatting.
- var valueNegative = value < 0;
- value = formatType(Math.abs(value), precision);
-
- // If a negative value rounds to zero during formatting, treat as positive.
- if (valueNegative && +value === 0) valueNegative = false;
-
- // Compute the prefix and suffix.
- valuePrefix = (valueNegative ? (sign === "(" ? sign : "-") : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
- valueSuffix = valueSuffix + (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + (valueNegative && sign === "(" ? ")" : "");
-
- // Break the formatted value into the integer “value” part that can be
- // grouped, and fractional or exponential “suffix” part that is not.
- if (maybeSuffix) {
- i = -1, n = value.length;
- while (++i < n) {
- if (c = value.charCodeAt(i), 48 > c || c > 57) {
- valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
- value = value.slice(0, i);
- break;
- }
- }
- }
- }
-
- // If the fill character is not "0", grouping is applied before padding.
- if (comma && !zero) value = group(value, Infinity);
-
- // Compute the padding.
- var length = valuePrefix.length + value.length + valueSuffix.length,
- padding = length < width ? new Array(width - length + 1).join(fill) : "";
-
- // If the fill character is "0", grouping is applied after padding.
- if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
-
- // Reconstruct the final output based on the desired alignment.
- switch (align) {
- case "<": value = valuePrefix + value + valueSuffix + padding; break;
- case "=": value = valuePrefix + padding + value + valueSuffix; break;
- case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;
- default: value = padding + valuePrefix + value + valueSuffix; break;
- }
-
- return numerals(value);
- }
-
- format.toString = function() {
- return specifier + "";
- };
-
- return format;
- }
-
- function formatPrefix(specifier, value) {
- var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)),
- e = Math.max(-8, Math.min(8, Math.floor(exponent$1(value) / 3))) * 3,
- k = Math.pow(10, -e),
- prefix = prefixes[8 + e / 3];
- return function(value) {
- return f(k * value) + prefix;
- };
- }
-
- return {
- format: newFormat,
- formatPrefix: formatPrefix
- };
-}
-
-var locale;
-
-
-
-defaultLocale({
- decimal: ".",
- thousands: ",",
- grouping: [3],
- currency: ["$", ""]
-});
-
-function defaultLocale(definition) {
- locale = formatLocale(definition);
- exports.format = locale.format;
- exports.formatPrefix = locale.formatPrefix;
- return locale;
-}
-
-function precisionFixed(step) {
- return Math.max(0, -exponent$1(Math.abs(step)));
-}
-
-function precisionPrefix(step, value) {
- return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent$1(value) / 3))) * 3 - exponent$1(Math.abs(step)));
-}
-
-function precisionRound(step, max) {
- step = Math.abs(step), max = Math.abs(max) - step;
- return Math.max(0, exponent$1(max) - exponent$1(step)) + 1;
-}
-
-// Adds floating point numbers with twice the normal precision.
-// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and
-// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3)
-// 305–363 (1997).
-// Code adapted from GeographicLib by Charles F. F. Karney,
-// http://geographiclib.sourceforge.net/
-
-function adder() {
- return new Adder;
-}
-
-function Adder() {
- this.reset();
-}
-
-Adder.prototype = {
- constructor: Adder,
- reset: function() {
- this.s = // rounded value
- this.t = 0; // exact error
- },
- add: function(y) {
- add$1(temp, y, this.t);
- add$1(this, temp.s, this.s);
- if (this.s) this.t += temp.t;
- else this.s = temp.t;
- },
- valueOf: function() {
- return this.s;
- }
-};
-
-var temp = new Adder;
-
-function add$1(adder, a, b) {
- var x = adder.s = a + b,
- bv = x - a,
- av = x - bv;
- adder.t = (a - av) + (b - bv);
-}
-
-var epsilon$2 = 1e-6;
-var epsilon2$1 = 1e-12;
-var pi$3 = Math.PI;
-var halfPi$2 = pi$3 / 2;
-var quarterPi = pi$3 / 4;
-var tau$3 = pi$3 * 2;
-
-var degrees$1 = 180 / pi$3;
-var radians = pi$3 / 180;
-
-var abs = Math.abs;
-var atan = Math.atan;
-var atan2 = Math.atan2;
-var cos$1 = Math.cos;
-var ceil = Math.ceil;
-var exp = Math.exp;
-
-var log = Math.log;
-var pow = Math.pow;
-var sin$1 = Math.sin;
-var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };
-var sqrt = Math.sqrt;
-var tan = Math.tan;
-
-function acos(x) {
- return x > 1 ? 0 : x < -1 ? pi$3 : Math.acos(x);
-}
-
-function asin(x) {
- return x > 1 ? halfPi$2 : x < -1 ? -halfPi$2 : Math.asin(x);
-}
-
-function haversin(x) {
- return (x = sin$1(x / 2)) * x;
-}
-
-function noop$1() {}
-
-function streamGeometry(geometry, stream) {
- if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {
- streamGeometryType[geometry.type](geometry, stream);
- }
-}
-
-var streamObjectType = {
- Feature: function(object, stream) {
- streamGeometry(object.geometry, stream);
- },
- FeatureCollection: function(object, stream) {
- var features = object.features, i = -1, n = features.length;
- while (++i < n) streamGeometry(features[i].geometry, stream);
- }
-};
-
-var streamGeometryType = {
- Sphere: function(object, stream) {
- stream.sphere();
- },
- Point: function(object, stream) {
- object = object.coordinates;
- stream.point(object[0], object[1], object[2]);
- },
- MultiPoint: function(object, stream) {
- var coordinates = object.coordinates, i = -1, n = coordinates.length;
- while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);
- },
- LineString: function(object, stream) {
- streamLine(object.coordinates, stream, 0);
- },
- MultiLineString: function(object, stream) {
- var coordinates = object.coordinates, i = -1, n = coordinates.length;
- while (++i < n) streamLine(coordinates[i], stream, 0);
- },
- Polygon: function(object, stream) {
- streamPolygon(object.coordinates, stream);
- },
- MultiPolygon: function(object, stream) {
- var coordinates = object.coordinates, i = -1, n = coordinates.length;
- while (++i < n) streamPolygon(coordinates[i], stream);
- },
- GeometryCollection: function(object, stream) {
- var geometries = object.geometries, i = -1, n = geometries.length;
- while (++i < n) streamGeometry(geometries[i], stream);
- }
-};
-
-function streamLine(coordinates, stream, closed) {
- var i = -1, n = coordinates.length - closed, coordinate;
- stream.lineStart();
- while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);
- stream.lineEnd();
-}
-
-function streamPolygon(coordinates, stream) {
- var i = -1, n = coordinates.length;
- stream.polygonStart();
- while (++i < n) streamLine(coordinates[i], stream, 1);
- stream.polygonEnd();
-}
-
-function geoStream(object, stream) {
- if (object && streamObjectType.hasOwnProperty(object.type)) {
- streamObjectType[object.type](object, stream);
- } else {
- streamGeometry(object, stream);
- }
-}
-
-var areaRingSum = adder();
-
-var areaSum = adder();
-var lambda00;
-var phi00;
-var lambda0;
-var cosPhi0;
-var sinPhi0;
-
-var areaStream = {
- point: noop$1,
- lineStart: noop$1,
- lineEnd: noop$1,
- polygonStart: function() {
- areaRingSum.reset();
- areaStream.lineStart = areaRingStart;
- areaStream.lineEnd = areaRingEnd;
- },
- polygonEnd: function() {
- var areaRing = +areaRingSum;
- areaSum.add(areaRing < 0 ? tau$3 + areaRing : areaRing);
- this.lineStart = this.lineEnd = this.point = noop$1;
- },
- sphere: function() {
- areaSum.add(tau$3);
- }
-};
-
-function areaRingStart() {
- areaStream.point = areaPointFirst;
-}
-
-function areaRingEnd() {
- areaPoint(lambda00, phi00);
-}
-
-function areaPointFirst(lambda, phi) {
- areaStream.point = areaPoint;
- lambda00 = lambda, phi00 = phi;
- lambda *= radians, phi *= radians;
- lambda0 = lambda, cosPhi0 = cos$1(phi = phi / 2 + quarterPi), sinPhi0 = sin$1(phi);
-}
-
-function areaPoint(lambda, phi) {
- lambda *= radians, phi *= radians;
- phi = phi / 2 + quarterPi; // half the angular distance from south pole
-
- // Spherical excess E for a spherical triangle with vertices: south pole,
- // previous point, current point. Uses a formula derived from Cagnoli’s
- // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).
- var dLambda = lambda - lambda0,
- sdLambda = dLambda >= 0 ? 1 : -1,
- adLambda = sdLambda * dLambda,
- cosPhi = cos$1(phi),
- sinPhi = sin$1(phi),
- k = sinPhi0 * sinPhi,
- u = cosPhi0 * cosPhi + k * cos$1(adLambda),
- v = k * sdLambda * sin$1(adLambda);
- areaRingSum.add(atan2(v, u));
-
- // Advance the previous points.
- lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;
-}
-
-function area(object) {
- areaSum.reset();
- geoStream(object, areaStream);
- return areaSum * 2;
-}
-
-function spherical(cartesian) {
- return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];
-}
-
-function cartesian(spherical) {
- var lambda = spherical[0], phi = spherical[1], cosPhi = cos$1(phi);
- return [cosPhi * cos$1(lambda), cosPhi * sin$1(lambda), sin$1(phi)];
-}
-
-function cartesianDot(a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
-}
-
-function cartesianCross(a, b) {
- return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];
-}
-
-// TODO return a
-function cartesianAddInPlace(a, b) {
- a[0] += b[0], a[1] += b[1], a[2] += b[2];
-}
-
-function cartesianScale(vector, k) {
- return [vector[0] * k, vector[1] * k, vector[2] * k];
-}
-
-// TODO return d
-function cartesianNormalizeInPlace(d) {
- var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
- d[0] /= l, d[1] /= l, d[2] /= l;
-}
-
-var lambda0$1;
-var phi0;
-var lambda1;
-var phi1;
-var lambda2;
-var lambda00$1;
-var phi00$1;
-var p0;
-var deltaSum = adder();
-var ranges;
-var range;
-
-var boundsStream = {
- point: boundsPoint,
- lineStart: boundsLineStart,
- lineEnd: boundsLineEnd,
- polygonStart: function() {
- boundsStream.point = boundsRingPoint;
- boundsStream.lineStart = boundsRingStart;
- boundsStream.lineEnd = boundsRingEnd;
- deltaSum.reset();
- areaStream.polygonStart();
- },
- polygonEnd: function() {
- areaStream.polygonEnd();
- boundsStream.point = boundsPoint;
- boundsStream.lineStart = boundsLineStart;
- boundsStream.lineEnd = boundsLineEnd;
- if (areaRingSum < 0) lambda0$1 = -(lambda1 = 180), phi0 = -(phi1 = 90);
- else if (deltaSum > epsilon$2) phi1 = 90;
- else if (deltaSum < -epsilon$2) phi0 = -90;
- range[0] = lambda0$1, range[1] = lambda1;
- }
-};
-
-function boundsPoint(lambda, phi) {
- ranges.push(range = [lambda0$1 = lambda, lambda1 = lambda]);
- if (phi < phi0) phi0 = phi;
- if (phi > phi1) phi1 = phi;
-}
-
-function linePoint(lambda, phi) {
- var p = cartesian([lambda * radians, phi * radians]);
- if (p0) {
- var normal = cartesianCross(p0, p),
- equatorial = [normal[1], -normal[0], 0],
- inflection = cartesianCross(equatorial, normal);
- cartesianNormalizeInPlace(inflection);
- inflection = spherical(inflection);
- var delta = lambda - lambda2,
- sign$$1 = delta > 0 ? 1 : -1,
- lambdai = inflection[0] * degrees$1 * sign$$1,
- phii,
- antimeridian = abs(delta) > 180;
- if (antimeridian ^ (sign$$1 * lambda2 < lambdai && lambdai < sign$$1 * lambda)) {
- phii = inflection[1] * degrees$1;
- if (phii > phi1) phi1 = phii;
- } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign$$1 * lambda2 < lambdai && lambdai < sign$$1 * lambda)) {
- phii = -inflection[1] * degrees$1;
- if (phii < phi0) phi0 = phii;
- } else {
- if (phi < phi0) phi0 = phi;
- if (phi > phi1) phi1 = phi;
- }
- if (antimeridian) {
- if (lambda < lambda2) {
- if (angle(lambda0$1, lambda) > angle(lambda0$1, lambda1)) lambda1 = lambda;
- } else {
- if (angle(lambda, lambda1) > angle(lambda0$1, lambda1)) lambda0$1 = lambda;
- }
- } else {
- if (lambda1 >= lambda0$1) {
- if (lambda < lambda0$1) lambda0$1 = lambda;
- if (lambda > lambda1) lambda1 = lambda;
- } else {
- if (lambda > lambda2) {
- if (angle(lambda0$1, lambda) > angle(lambda0$1, lambda1)) lambda1 = lambda;
- } else {
- if (angle(lambda, lambda1) > angle(lambda0$1, lambda1)) lambda0$1 = lambda;
- }
- }
- }
- } else {
- ranges.push(range = [lambda0$1 = lambda, lambda1 = lambda]);
- }
- if (phi < phi0) phi0 = phi;
- if (phi > phi1) phi1 = phi;
- p0 = p, lambda2 = lambda;
-}
-
-function boundsLineStart() {
- boundsStream.point = linePoint;
-}
-
-function boundsLineEnd() {
- range[0] = lambda0$1, range[1] = lambda1;
- boundsStream.point = boundsPoint;
- p0 = null;
-}
-
-function boundsRingPoint(lambda, phi) {
- if (p0) {
- var delta = lambda - lambda2;
- deltaSum.add(abs(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);
- } else {
- lambda00$1 = lambda, phi00$1 = phi;
- }
- areaStream.point(lambda, phi);
- linePoint(lambda, phi);
-}
-
-function boundsRingStart() {
- areaStream.lineStart();
-}
-
-function boundsRingEnd() {
- boundsRingPoint(lambda00$1, phi00$1);
- areaStream.lineEnd();
- if (abs(deltaSum) > epsilon$2) lambda0$1 = -(lambda1 = 180);
- range[0] = lambda0$1, range[1] = lambda1;
- p0 = null;
-}
-
-// Finds the left-right distance between two longitudes.
-// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want
-// the distance between ±180° to be 360°.
-function angle(lambda0, lambda1) {
- return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;
-}
-
-function rangeCompare(a, b) {
- return a[0] - b[0];
-}
-
-function rangeContains(range, x) {
- return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;
-}
-
-function bounds(feature) {
- var i, n, a, b, merged, deltaMax, delta;
-
- phi1 = lambda1 = -(lambda0$1 = phi0 = Infinity);
- ranges = [];
- geoStream(feature, boundsStream);
-
- // First, sort ranges by their minimum longitudes.
- if (n = ranges.length) {
- ranges.sort(rangeCompare);
-
- // Then, merge any ranges that overlap.
- for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {
- b = ranges[i];
- if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {
- if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];
- if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];
- } else {
- merged.push(a = b);
- }
- }
-
- // Finally, find the largest gap between the merged ranges.
- // The final bounding box will be the inverse of this gap.
- for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {
- b = merged[i];
- if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0$1 = b[0], lambda1 = a[1];
- }
- }
-
- ranges = range = null;
-
- return lambda0$1 === Infinity || phi0 === Infinity
- ? [[NaN, NaN], [NaN, NaN]]
- : [[lambda0$1, phi0], [lambda1, phi1]];
-}
-
-var W0;
-var W1;
-var X0;
-var Y0;
-var Z0;
-var X1;
-var Y1;
-var Z1;
-var X2;
-var Y2;
-var Z2;
-var lambda00$2;
-var phi00$2;
-var x0;
-var y0;
-var z0; // previous point
-
-var centroidStream = {
- sphere: noop$1,
- point: centroidPoint,
- lineStart: centroidLineStart,
- lineEnd: centroidLineEnd,
- polygonStart: function() {
- centroidStream.lineStart = centroidRingStart;
- centroidStream.lineEnd = centroidRingEnd;
- },
- polygonEnd: function() {
- centroidStream.lineStart = centroidLineStart;
- centroidStream.lineEnd = centroidLineEnd;
- }
-};
-
-// Arithmetic mean of Cartesian vectors.
-function centroidPoint(lambda, phi) {
- lambda *= radians, phi *= radians;
- var cosPhi = cos$1(phi);
- centroidPointCartesian(cosPhi * cos$1(lambda), cosPhi * sin$1(lambda), sin$1(phi));
-}
-
-function centroidPointCartesian(x, y, z) {
- ++W0;
- X0 += (x - X0) / W0;
- Y0 += (y - Y0) / W0;
- Z0 += (z - Z0) / W0;
-}
-
-function centroidLineStart() {
- centroidStream.point = centroidLinePointFirst;
-}
-
-function centroidLinePointFirst(lambda, phi) {
- lambda *= radians, phi *= radians;
- var cosPhi = cos$1(phi);
- x0 = cosPhi * cos$1(lambda);
- y0 = cosPhi * sin$1(lambda);
- z0 = sin$1(phi);
- centroidStream.point = centroidLinePoint;
- centroidPointCartesian(x0, y0, z0);
-}
-
-function centroidLinePoint(lambda, phi) {
- lambda *= radians, phi *= radians;
- var cosPhi = cos$1(phi),
- x = cosPhi * cos$1(lambda),
- y = cosPhi * sin$1(lambda),
- z = sin$1(phi),
- w = atan2(sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);
- W1 += w;
- X1 += w * (x0 + (x0 = x));
- Y1 += w * (y0 + (y0 = y));
- Z1 += w * (z0 + (z0 = z));
- centroidPointCartesian(x0, y0, z0);
-}
-
-function centroidLineEnd() {
- centroidStream.point = centroidPoint;
-}
-
-// See J. E. Brock, The Inertia Tensor for a Spherical Triangle,
-// J. Applied Mechanics 42, 239 (1975).
-function centroidRingStart() {
- centroidStream.point = centroidRingPointFirst;
-}
-
-function centroidRingEnd() {
- centroidRingPoint(lambda00$2, phi00$2);
- centroidStream.point = centroidPoint;
-}
-
-function centroidRingPointFirst(lambda, phi) {
- lambda00$2 = lambda, phi00$2 = phi;
- lambda *= radians, phi *= radians;
- centroidStream.point = centroidRingPoint;
- var cosPhi = cos$1(phi);
- x0 = cosPhi * cos$1(lambda);
- y0 = cosPhi * sin$1(lambda);
- z0 = sin$1(phi);
- centroidPointCartesian(x0, y0, z0);
-}
-
-function centroidRingPoint(lambda, phi) {
- lambda *= radians, phi *= radians;
- var cosPhi = cos$1(phi),
- x = cosPhi * cos$1(lambda),
- y = cosPhi * sin$1(lambda),
- z = sin$1(phi),
- cx = y0 * z - z0 * y,
- cy = z0 * x - x0 * z,
- cz = x0 * y - y0 * x,
- m = sqrt(cx * cx + cy * cy + cz * cz),
- w = asin(m), // line weight = angle
- v = m && -w / m; // area weight multiplier
- X2 += v * cx;
- Y2 += v * cy;
- Z2 += v * cz;
- W1 += w;
- X1 += w * (x0 + (x0 = x));
- Y1 += w * (y0 + (y0 = y));
- Z1 += w * (z0 + (z0 = z));
- centroidPointCartesian(x0, y0, z0);
-}
-
-function centroid(object) {
- W0 = W1 =
- X0 = Y0 = Z0 =
- X1 = Y1 = Z1 =
- X2 = Y2 = Z2 = 0;
- geoStream(object, centroidStream);
-
- var x = X2,
- y = Y2,
- z = Z2,
- m = x * x + y * y + z * z;
-
- // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.
- if (m < epsilon2$1) {
- x = X1, y = Y1, z = Z1;
- // If the feature has zero length, fall back to arithmetic mean of point vectors.
- if (W1 < epsilon$2) x = X0, y = Y0, z = Z0;
- m = x * x + y * y + z * z;
- // If the feature still has an undefined ccentroid, then return.
- if (m < epsilon2$1) return [NaN, NaN];
- }
-
- return [atan2(y, x) * degrees$1, asin(z / sqrt(m)) * degrees$1];
-}
-
-function constant$7(x) {
- return function() {
- return x;
- };
-}
-
-function compose(a, b) {
-
- function compose(x, y) {
- return x = a(x, y), b(x[0], x[1]);
- }
-
- if (a.invert && b.invert) compose.invert = function(x, y) {
- return x = b.invert(x, y), x && a.invert(x[0], x[1]);
- };
-
- return compose;
-}
-
-function rotationIdentity(lambda, phi) {
- return [lambda > pi$3 ? lambda - tau$3 : lambda < -pi$3 ? lambda + tau$3 : lambda, phi];
-}
-
-rotationIdentity.invert = rotationIdentity;
-
-function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {
- return (deltaLambda %= tau$3) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))
- : rotationLambda(deltaLambda))
- : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)
- : rotationIdentity);
-}
-
-function forwardRotationLambda(deltaLambda) {
- return function(lambda, phi) {
- return lambda += deltaLambda, [lambda > pi$3 ? lambda - tau$3 : lambda < -pi$3 ? lambda + tau$3 : lambda, phi];
- };
-}
-
-function rotationLambda(deltaLambda) {
- var rotation = forwardRotationLambda(deltaLambda);
- rotation.invert = forwardRotationLambda(-deltaLambda);
- return rotation;
-}
-
-function rotationPhiGamma(deltaPhi, deltaGamma) {
- var cosDeltaPhi = cos$1(deltaPhi),
- sinDeltaPhi = sin$1(deltaPhi),
- cosDeltaGamma = cos$1(deltaGamma),
- sinDeltaGamma = sin$1(deltaGamma);
-
- function rotation(lambda, phi) {
- var cosPhi = cos$1(phi),
- x = cos$1(lambda) * cosPhi,
- y = sin$1(lambda) * cosPhi,
- z = sin$1(phi),
- k = z * cosDeltaPhi + x * sinDeltaPhi;
- return [
- atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),
- asin(k * cosDeltaGamma + y * sinDeltaGamma)
- ];
- }
-
- rotation.invert = function(lambda, phi) {
- var cosPhi = cos$1(phi),
- x = cos$1(lambda) * cosPhi,
- y = sin$1(lambda) * cosPhi,
- z = sin$1(phi),
- k = z * cosDeltaGamma - y * sinDeltaGamma;
- return [
- atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),
- asin(k * cosDeltaPhi - x * sinDeltaPhi)
- ];
- };
-
- return rotation;
-}
-
-function rotation(rotate) {
- rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);
-
- function forward(coordinates) {
- coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);
- return coordinates[0] *= degrees$1, coordinates[1] *= degrees$1, coordinates;
- }
-
- forward.invert = function(coordinates) {
- coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);
- return coordinates[0] *= degrees$1, coordinates[1] *= degrees$1, coordinates;
- };
-
- return forward;
-}
-
-// Generates a circle centered at [0°, 0°], with a given radius and precision.
-function circleStream(stream, radius, delta, direction, t0, t1) {
- if (!delta) return;
- var cosRadius = cos$1(radius),
- sinRadius = sin$1(radius),
- step = direction * delta;
- if (t0 == null) {
- t0 = radius + direction * tau$3;
- t1 = radius - step / 2;
- } else {
- t0 = circleRadius(cosRadius, t0);
- t1 = circleRadius(cosRadius, t1);
- if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau$3;
- }
- for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {
- point = spherical([cosRadius, -sinRadius * cos$1(t), -sinRadius * sin$1(t)]);
- stream.point(point[0], point[1]);
- }
-}
-
-// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].
-function circleRadius(cosRadius, point) {
- point = cartesian(point), point[0] -= cosRadius;
- cartesianNormalizeInPlace(point);
- var radius = acos(-point[1]);
- return ((-point[2] < 0 ? -radius : radius) + tau$3 - epsilon$2) % tau$3;
-}
-
-function circle() {
- var center = constant$7([0, 0]),
- radius = constant$7(90),
- precision = constant$7(6),
- ring,
- rotate,
- stream = {point: point};
-
- function point(x, y) {
- ring.push(x = rotate(x, y));
- x[0] *= degrees$1, x[1] *= degrees$1;
- }
-
- function circle() {
- var c = center.apply(this, arguments),
- r = radius.apply(this, arguments) * radians,
- p = precision.apply(this, arguments) * radians;
- ring = [];
- rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;
- circleStream(stream, r, p, 1);
- c = {type: "Polygon", coordinates: [ring]};
- ring = rotate = null;
- return c;
- }
-
- circle.center = function(_) {
- return arguments.length ? (center = typeof _ === "function" ? _ : constant$7([+_[0], +_[1]]), circle) : center;
- };
-
- circle.radius = function(_) {
- return arguments.length ? (radius = typeof _ === "function" ? _ : constant$7(+_), circle) : radius;
- };
-
- circle.precision = function(_) {
- return arguments.length ? (precision = typeof _ === "function" ? _ : constant$7(+_), circle) : precision;
- };
-
- return circle;
-}
-
-function clipBuffer() {
- var lines = [],
- line;
- return {
- point: function(x, y) {
- line.push([x, y]);
- },
- lineStart: function() {
- lines.push(line = []);
- },
- lineEnd: noop$1,
- rejoin: function() {
- if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));
- },
- result: function() {
- var result = lines;
- lines = [];
- line = null;
- return result;
- }
- };
-}
-
-function pointEqual(a, b) {
- return abs(a[0] - b[0]) < epsilon$2 && abs(a[1] - b[1]) < epsilon$2;
-}
-
-function Intersection(point, points, other, entry) {
- this.x = point;
- this.z = points;
- this.o = other; // another intersection
- this.e = entry; // is an entry?
- this.v = false; // visited
- this.n = this.p = null; // next & previous
-}
-
-// A generalized polygon clipping algorithm: given a polygon that has been cut
-// into its visible line segments, and rejoins the segments by interpolating
-// along the clip edge.
-function clipRejoin(segments, compareIntersection, startInside, interpolate, stream) {
- var subject = [],
- clip = [],
- i,
- n;
-
- segments.forEach(function(segment) {
- if ((n = segment.length - 1) <= 0) return;
- var n, p0 = segment[0], p1 = segment[n], x;
-
- // If the first and last points of a segment are coincident, then treat as a
- // closed ring. TODO if all rings are closed, then the winding order of the
- // exterior ring should be checked.
- if (pointEqual(p0, p1)) {
- stream.lineStart();
- for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);
- stream.lineEnd();
- return;
- }
-
- subject.push(x = new Intersection(p0, segment, null, true));
- clip.push(x.o = new Intersection(p0, null, x, false));
- subject.push(x = new Intersection(p1, segment, null, false));
- clip.push(x.o = new Intersection(p1, null, x, true));
- });
-
- if (!subject.length) return;
-
- clip.sort(compareIntersection);
- link$1(subject);
- link$1(clip);
-
- for (i = 0, n = clip.length; i < n; ++i) {
- clip[i].e = startInside = !startInside;
- }
-
- var start = subject[0],
- points,
- point;
-
- while (1) {
- // Find first unvisited intersection.
- var current = start,
- isSubject = true;
- while (current.v) if ((current = current.n) === start) return;
- points = current.z;
- stream.lineStart();
- do {
- current.v = current.o.v = true;
- if (current.e) {
- if (isSubject) {
- for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);
- } else {
- interpolate(current.x, current.n.x, 1, stream);
- }
- current = current.n;
- } else {
- if (isSubject) {
- points = current.p.z;
- for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);
- } else {
- interpolate(current.x, current.p.x, -1, stream);
- }
- current = current.p;
- }
- current = current.o;
- points = current.z;
- isSubject = !isSubject;
- } while (!current.v);
- stream.lineEnd();
- }
-}
-
-function link$1(array) {
- if (!(n = array.length)) return;
- var n,
- i = 0,
- a = array[0],
- b;
- while (++i < n) {
- a.n = b = array[i];
- b.p = a;
- a = b;
- }
- a.n = b = array[0];
- b.p = a;
-}
-
-var sum$1 = adder();
-
-function polygonContains(polygon, point) {
- var lambda = point[0],
- phi = point[1],
- normal = [sin$1(lambda), -cos$1(lambda), 0],
- angle = 0,
- winding = 0;
-
- sum$1.reset();
-
- for (var i = 0, n = polygon.length; i < n; ++i) {
- if (!(m = (ring = polygon[i]).length)) continue;
- var ring,
- m,
- point0 = ring[m - 1],
- lambda0 = point0[0],
- phi0 = point0[1] / 2 + quarterPi,
- sinPhi0 = sin$1(phi0),
- cosPhi0 = cos$1(phi0);
-
- for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {
- var point1 = ring[j],
- lambda1 = point1[0],
- phi1 = point1[1] / 2 + quarterPi,
- sinPhi1 = sin$1(phi1),
- cosPhi1 = cos$1(phi1),
- delta = lambda1 - lambda0,
- sign$$1 = delta >= 0 ? 1 : -1,
- absDelta = sign$$1 * delta,
- antimeridian = absDelta > pi$3,
- k = sinPhi0 * sinPhi1;
-
- sum$1.add(atan2(k * sign$$1 * sin$1(absDelta), cosPhi0 * cosPhi1 + k * cos$1(absDelta)));
- angle += antimeridian ? delta + sign$$1 * tau$3 : delta;
-
- // Are the longitudes either side of the point’s meridian (lambda),
- // and are the latitudes smaller than the parallel (phi)?
- if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {
- var arc = cartesianCross(cartesian(point0), cartesian(point1));
- cartesianNormalizeInPlace(arc);
- var intersection = cartesianCross(normal, arc);
- cartesianNormalizeInPlace(intersection);
- var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);
- if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {
- winding += antimeridian ^ delta >= 0 ? 1 : -1;
- }
- }
- }
- }
-
- // First, determine whether the South pole is inside or outside:
- //
- // It is inside if:
- // * the polygon winds around it in a clockwise direction.
- // * the polygon does not (cumulatively) wind around it, but has a negative
- // (counter-clockwise) area.
- //
- // Second, count the (signed) number of times a segment crosses a lambda
- // from the point to the South pole. If it is zero, then the point is the
- // same side as the South pole.
-
- return (angle < -epsilon$2 || angle < epsilon$2 && sum$1 < -epsilon$2) ^ (winding & 1);
-}
-
-function clip(pointVisible, clipLine, interpolate, start) {
- return function(sink) {
- var line = clipLine(sink),
- ringBuffer = clipBuffer(),
- ringSink = clipLine(ringBuffer),
- polygonStarted = false,
- polygon,
- segments,
- ring;
-
- var clip = {
- point: point,
- lineStart: lineStart,
- lineEnd: lineEnd,
- polygonStart: function() {
- clip.point = pointRing;
- clip.lineStart = ringStart;
- clip.lineEnd = ringEnd;
- segments = [];
- polygon = [];
- },
- polygonEnd: function() {
- clip.point = point;
- clip.lineStart = lineStart;
- clip.lineEnd = lineEnd;
- segments = merge(segments);
- var startInside = polygonContains(polygon, start);
- if (segments.length) {
- if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
- clipRejoin(segments, compareIntersection, startInside, interpolate, sink);
- } else if (startInside) {
- if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
- sink.lineStart();
- interpolate(null, null, 1, sink);
- sink.lineEnd();
- }
- if (polygonStarted) sink.polygonEnd(), polygonStarted = false;
- segments = polygon = null;
- },
- sphere: function() {
- sink.polygonStart();
- sink.lineStart();
- interpolate(null, null, 1, sink);
- sink.lineEnd();
- sink.polygonEnd();
- }
- };
-
- function point(lambda, phi) {
- if (pointVisible(lambda, phi)) sink.point(lambda, phi);
- }
-
- function pointLine(lambda, phi) {
- line.point(lambda, phi);
- }
-
- function lineStart() {
- clip.point = pointLine;
- line.lineStart();
- }
-
- function lineEnd() {
- clip.point = point;
- line.lineEnd();
- }
-
- function pointRing(lambda, phi) {
- ring.push([lambda, phi]);
- ringSink.point(lambda, phi);
- }
-
- function ringStart() {
- ringSink.lineStart();
- ring = [];
- }
-
- function ringEnd() {
- pointRing(ring[0][0], ring[0][1]);
- ringSink.lineEnd();
-
- var clean = ringSink.clean(),
- ringSegments = ringBuffer.result(),
- i, n = ringSegments.length, m,
- segment,
- point;
-
- ring.pop();
- polygon.push(ring);
- ring = null;
-
- if (!n) return;
-
- // No intersections.
- if (clean & 1) {
- segment = ringSegments[0];
- if ((m = segment.length - 1) > 0) {
- if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
- sink.lineStart();
- for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);
- sink.lineEnd();
- }
- return;
- }
-
- // Rejoin connected segments.
- // TODO reuse ringBuffer.rejoin()?
- if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));
-
- segments.push(ringSegments.filter(validSegment));
- }
-
- return clip;
- };
-}
-
-function validSegment(segment) {
- return segment.length > 1;
-}
-
-// Intersections are sorted along the clip edge. For both antimeridian cutting
-// and circle clipping, the same comparison is used.
-function compareIntersection(a, b) {
- return ((a = a.x)[0] < 0 ? a[1] - halfPi$2 - epsilon$2 : halfPi$2 - a[1])
- - ((b = b.x)[0] < 0 ? b[1] - halfPi$2 - epsilon$2 : halfPi$2 - b[1]);
-}
-
-var clipAntimeridian = clip(
- function() { return true; },
- clipAntimeridianLine,
- clipAntimeridianInterpolate,
- [-pi$3, -halfPi$2]
-);
-
-// Takes a line and cuts into visible segments. Return values: 0 - there were
-// intersections or the line was empty; 1 - no intersections; 2 - there were
-// intersections, and the first and last segments should be rejoined.
-function clipAntimeridianLine(stream) {
- var lambda0 = NaN,
- phi0 = NaN,
- sign0 = NaN,
- clean; // no intersections
-
- return {
- lineStart: function() {
- stream.lineStart();
- clean = 1;
- },
- point: function(lambda1, phi1) {
- var sign1 = lambda1 > 0 ? pi$3 : -pi$3,
- delta = abs(lambda1 - lambda0);
- if (abs(delta - pi$3) < epsilon$2) { // line crosses a pole
- stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi$2 : -halfPi$2);
- stream.point(sign0, phi0);
- stream.lineEnd();
- stream.lineStart();
- stream.point(sign1, phi0);
- stream.point(lambda1, phi0);
- clean = 0;
- } else if (sign0 !== sign1 && delta >= pi$3) { // line crosses antimeridian
- if (abs(lambda0 - sign0) < epsilon$2) lambda0 -= sign0 * epsilon$2; // handle degeneracies
- if (abs(lambda1 - sign1) < epsilon$2) lambda1 -= sign1 * epsilon$2;
- phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);
- stream.point(sign0, phi0);
- stream.lineEnd();
- stream.lineStart();
- stream.point(sign1, phi0);
- clean = 0;
- }
- stream.point(lambda0 = lambda1, phi0 = phi1);
- sign0 = sign1;
- },
- lineEnd: function() {
- stream.lineEnd();
- lambda0 = phi0 = NaN;
- },
- clean: function() {
- return 2 - clean; // if intersections, rejoin first and last segments
- }
- };
-}
-
-function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {
- var cosPhi0,
- cosPhi1,
- sinLambda0Lambda1 = sin$1(lambda0 - lambda1);
- return abs(sinLambda0Lambda1) > epsilon$2
- ? atan((sin$1(phi0) * (cosPhi1 = cos$1(phi1)) * sin$1(lambda1)
- - sin$1(phi1) * (cosPhi0 = cos$1(phi0)) * sin$1(lambda0))
- / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))
- : (phi0 + phi1) / 2;
-}
-
-function clipAntimeridianInterpolate(from, to, direction, stream) {
- var phi;
- if (from == null) {
- phi = direction * halfPi$2;
- stream.point(-pi$3, phi);
- stream.point(0, phi);
- stream.point(pi$3, phi);
- stream.point(pi$3, 0);
- stream.point(pi$3, -phi);
- stream.point(0, -phi);
- stream.point(-pi$3, -phi);
- stream.point(-pi$3, 0);
- stream.point(-pi$3, phi);
- } else if (abs(from[0] - to[0]) > epsilon$2) {
- var lambda = from[0] < to[0] ? pi$3 : -pi$3;
- phi = direction * lambda / 2;
- stream.point(-lambda, phi);
- stream.point(0, phi);
- stream.point(lambda, phi);
- } else {
- stream.point(to[0], to[1]);
- }
-}
-
-function clipCircle(radius) {
- var cr = cos$1(radius),
- delta = 6 * radians,
- smallRadius = cr > 0,
- notHemisphere = abs(cr) > epsilon$2; // TODO optimise for this common case
-
- function interpolate(from, to, direction, stream) {
- circleStream(stream, radius, delta, direction, from, to);
- }
-
- function visible(lambda, phi) {
- return cos$1(lambda) * cos$1(phi) > cr;
- }
-
- // Takes a line and cuts into visible segments. Return values used for polygon
- // clipping: 0 - there were intersections or the line was empty; 1 - no
- // intersections 2 - there were intersections, and the first and last segments
- // should be rejoined.
- function clipLine(stream) {
- var point0, // previous point
- c0, // code for previous point
- v0, // visibility of previous point
- v00, // visibility of first point
- clean; // no intersections
- return {
- lineStart: function() {
- v00 = v0 = false;
- clean = 1;
- },
- point: function(lambda, phi) {
- var point1 = [lambda, phi],
- point2,
- v = visible(lambda, phi),
- c = smallRadius
- ? v ? 0 : code(lambda, phi)
- : v ? code(lambda + (lambda < 0 ? pi$3 : -pi$3), phi) : 0;
- if (!point0 && (v00 = v0 = v)) stream.lineStart();
- // Handle degeneracies.
- // TODO ignore if not clipping polygons.
- if (v !== v0) {
- point2 = intersect(point0, point1);
- if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2)) {
- point1[0] += epsilon$2;
- point1[1] += epsilon$2;
- v = visible(point1[0], point1[1]);
- }
- }
- if (v !== v0) {
- clean = 0;
- if (v) {
- // outside going in
- stream.lineStart();
- point2 = intersect(point1, point0);
- stream.point(point2[0], point2[1]);
- } else {
- // inside going out
- point2 = intersect(point0, point1);
- stream.point(point2[0], point2[1]);
- stream.lineEnd();
- }
- point0 = point2;
- } else if (notHemisphere && point0 && smallRadius ^ v) {
- var t;
- // If the codes for two points are different, or are both zero,
- // and there this segment intersects with the small circle.
- if (!(c & c0) && (t = intersect(point1, point0, true))) {
- clean = 0;
- if (smallRadius) {
- stream.lineStart();
- stream.point(t[0][0], t[0][1]);
- stream.point(t[1][0], t[1][1]);
- stream.lineEnd();
- } else {
- stream.point(t[1][0], t[1][1]);
- stream.lineEnd();
- stream.lineStart();
- stream.point(t[0][0], t[0][1]);
- }
- }
- }
- if (v && (!point0 || !pointEqual(point0, point1))) {
- stream.point(point1[0], point1[1]);
- }
- point0 = point1, v0 = v, c0 = c;
- },
- lineEnd: function() {
- if (v0) stream.lineEnd();
- point0 = null;
- },
- // Rejoin first and last segments if there were intersections and the first
- // and last points were visible.
- clean: function() {
- return clean | ((v00 && v0) << 1);
- }
- };
- }
-
- // Intersects the great circle between a and b with the clip circle.
- function intersect(a, b, two) {
- var pa = cartesian(a),
- pb = cartesian(b);
-
- // We have two planes, n1.p = d1 and n2.p = d2.
- // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).
- var n1 = [1, 0, 0], // normal
- n2 = cartesianCross(pa, pb),
- n2n2 = cartesianDot(n2, n2),
- n1n2 = n2[0], // cartesianDot(n1, n2),
- determinant = n2n2 - n1n2 * n1n2;
-
- // Two polar points.
- if (!determinant) return !two && a;
-
- var c1 = cr * n2n2 / determinant,
- c2 = -cr * n1n2 / determinant,
- n1xn2 = cartesianCross(n1, n2),
- A = cartesianScale(n1, c1),
- B = cartesianScale(n2, c2);
- cartesianAddInPlace(A, B);
-
- // Solve |p(t)|^2 = 1.
- var u = n1xn2,
- w = cartesianDot(A, u),
- uu = cartesianDot(u, u),
- t2 = w * w - uu * (cartesianDot(A, A) - 1);
-
- if (t2 < 0) return;
-
- var t = sqrt(t2),
- q = cartesianScale(u, (-w - t) / uu);
- cartesianAddInPlace(q, A);
- q = spherical(q);
-
- if (!two) return q;
-
- // Two intersection points.
- var lambda0 = a[0],
- lambda1 = b[0],
- phi0 = a[1],
- phi1 = b[1],
- z;
-
- if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;
-
- var delta = lambda1 - lambda0,
- polar = abs(delta - pi$3) < epsilon$2,
- meridian = polar || delta < epsilon$2;
-
- if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;
-
- // Check that the first point is between a and b.
- if (meridian
- ? polar
- ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon$2 ? phi0 : phi1)
- : phi0 <= q[1] && q[1] <= phi1
- : delta > pi$3 ^ (lambda0 <= q[0] && q[0] <= lambda1)) {
- var q1 = cartesianScale(u, (-w + t) / uu);
- cartesianAddInPlace(q1, A);
- return [q, spherical(q1)];
- }
- }
-
- // Generates a 4-bit vector representing the location of a point relative to
- // the small circle's bounding box.
- function code(lambda, phi) {
- var r = smallRadius ? radius : pi$3 - radius,
- code = 0;
- if (lambda < -r) code |= 1; // left
- else if (lambda > r) code |= 2; // right
- if (phi < -r) code |= 4; // below
- else if (phi > r) code |= 8; // above
- return code;
- }
-
- return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi$3, radius - pi$3]);
-}
-
-function clipLine(a, b, x0, y0, x1, y1) {
- var ax = a[0],
- ay = a[1],
- bx = b[0],
- by = b[1],
- t0 = 0,
- t1 = 1,
- dx = bx - ax,
- dy = by - ay,
- r;
-
- r = x0 - ax;
- if (!dx && r > 0) return;
- r /= dx;
- if (dx < 0) {
- if (r < t0) return;
- if (r < t1) t1 = r;
- } else if (dx > 0) {
- if (r > t1) return;
- if (r > t0) t0 = r;
- }
-
- r = x1 - ax;
- if (!dx && r < 0) return;
- r /= dx;
- if (dx < 0) {
- if (r > t1) return;
- if (r > t0) t0 = r;
- } else if (dx > 0) {
- if (r < t0) return;
- if (r < t1) t1 = r;
- }
-
- r = y0 - ay;
- if (!dy && r > 0) return;
- r /= dy;
- if (dy < 0) {
- if (r < t0) return;
- if (r < t1) t1 = r;
- } else if (dy > 0) {
- if (r > t1) return;
- if (r > t0) t0 = r;
- }
-
- r = y1 - ay;
- if (!dy && r < 0) return;
- r /= dy;
- if (dy < 0) {
- if (r > t1) return;
- if (r > t0) t0 = r;
- } else if (dy > 0) {
- if (r < t0) return;
- if (r < t1) t1 = r;
- }
-
- if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;
- if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;
- return true;
-}
-
-var clipMax = 1e9;
-var clipMin = -clipMax;
-
-// TODO Use d3-polygon’s polygonContains here for the ring check?
-// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?
-
-function clipRectangle(x0, y0, x1, y1) {
-
- function visible(x, y) {
- return x0 <= x && x <= x1 && y0 <= y && y <= y1;
- }
-
- function interpolate(from, to, direction, stream) {
- var a = 0, a1 = 0;
- if (from == null
- || (a = corner(from, direction)) !== (a1 = corner(to, direction))
- || comparePoint(from, to) < 0 ^ direction > 0) {
- do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);
- while ((a = (a + direction + 4) % 4) !== a1);
- } else {
- stream.point(to[0], to[1]);
- }
- }
-
- function corner(p, direction) {
- return abs(p[0] - x0) < epsilon$2 ? direction > 0 ? 0 : 3
- : abs(p[0] - x1) < epsilon$2 ? direction > 0 ? 2 : 1
- : abs(p[1] - y0) < epsilon$2 ? direction > 0 ? 1 : 0
- : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon
- }
-
- function compareIntersection(a, b) {
- return comparePoint(a.x, b.x);
- }
-
- function comparePoint(a, b) {
- var ca = corner(a, 1),
- cb = corner(b, 1);
- return ca !== cb ? ca - cb
- : ca === 0 ? b[1] - a[1]
- : ca === 1 ? a[0] - b[0]
- : ca === 2 ? a[1] - b[1]
- : b[0] - a[0];
- }
-
- return function(stream) {
- var activeStream = stream,
- bufferStream = clipBuffer(),
- segments,
- polygon,
- ring,
- x__, y__, v__, // first point
- x_, y_, v_, // previous point
- first,
- clean;
-
- var clipStream = {
- point: point,
- lineStart: lineStart,
- lineEnd: lineEnd,
- polygonStart: polygonStart,
- polygonEnd: polygonEnd
- };
-
- function point(x, y) {
- if (visible(x, y)) activeStream.point(x, y);
- }
-
- function polygonInside() {
- var winding = 0;
-
- for (var i = 0, n = polygon.length; i < n; ++i) {
- for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {
- a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];
- if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }
- else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }
- }
- }
-
- return winding;
- }
-
- // Buffer geometry within a polygon and then clip it en masse.
- function polygonStart() {
- activeStream = bufferStream, segments = [], polygon = [], clean = true;
- }
-
- function polygonEnd() {
- var startInside = polygonInside(),
- cleanInside = clean && startInside,
- visible = (segments = merge(segments)).length;
- if (cleanInside || visible) {
- stream.polygonStart();
- if (cleanInside) {
- stream.lineStart();
- interpolate(null, null, 1, stream);
- stream.lineEnd();
- }
- if (visible) {
- clipRejoin(segments, compareIntersection, startInside, interpolate, stream);
- }
- stream.polygonEnd();
- }
- activeStream = stream, segments = polygon = ring = null;
- }
-
- function lineStart() {
- clipStream.point = linePoint;
- if (polygon) polygon.push(ring = []);
- first = true;
- v_ = false;
- x_ = y_ = NaN;
- }
-
- // TODO rather than special-case polygons, simply handle them separately.
- // Ideally, coincident intersection points should be jittered to avoid
- // clipping issues.
- function lineEnd() {
- if (segments) {
- linePoint(x__, y__);
- if (v__ && v_) bufferStream.rejoin();
- segments.push(bufferStream.result());
- }
- clipStream.point = point;
- if (v_) activeStream.lineEnd();
- }
-
- function linePoint(x, y) {
- var v = visible(x, y);
- if (polygon) ring.push([x, y]);
- if (first) {
- x__ = x, y__ = y, v__ = v;
- first = false;
- if (v) {
- activeStream.lineStart();
- activeStream.point(x, y);
- }
- } else {
- if (v && v_) activeStream.point(x, y);
- else {
- var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],
- b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];
- if (clipLine(a, b, x0, y0, x1, y1)) {
- if (!v_) {
- activeStream.lineStart();
- activeStream.point(a[0], a[1]);
- }
- activeStream.point(b[0], b[1]);
- if (!v) activeStream.lineEnd();
- clean = false;
- } else if (v) {
- activeStream.lineStart();
- activeStream.point(x, y);
- clean = false;
- }
- }
- }
- x_ = x, y_ = y, v_ = v;
- }
-
- return clipStream;
- };
-}
-
-function extent$1() {
- var x0 = 0,
- y0 = 0,
- x1 = 960,
- y1 = 500,
- cache,
- cacheStream,
- clip;
-
- return clip = {
- stream: function(stream) {
- return cache && cacheStream === stream ? cache : cache = clipRectangle(x0, y0, x1, y1)(cacheStream = stream);
- },
- extent: function(_) {
- return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]];
- }
- };
-}
-
-var lengthSum = adder();
-var lambda0$2;
-var sinPhi0$1;
-var cosPhi0$1;
-
-var lengthStream = {
- sphere: noop$1,
- point: noop$1,
- lineStart: lengthLineStart,
- lineEnd: noop$1,
- polygonStart: noop$1,
- polygonEnd: noop$1
-};
-
-function lengthLineStart() {
- lengthStream.point = lengthPointFirst;
- lengthStream.lineEnd = lengthLineEnd;
-}
-
-function lengthLineEnd() {
- lengthStream.point = lengthStream.lineEnd = noop$1;
-}
-
-function lengthPointFirst(lambda, phi) {
- lambda *= radians, phi *= radians;
- lambda0$2 = lambda, sinPhi0$1 = sin$1(phi), cosPhi0$1 = cos$1(phi);
- lengthStream.point = lengthPoint;
-}
-
-function lengthPoint(lambda, phi) {
- lambda *= radians, phi *= radians;
- var sinPhi = sin$1(phi),
- cosPhi = cos$1(phi),
- delta = abs(lambda - lambda0$2),
- cosDelta = cos$1(delta),
- sinDelta = sin$1(delta),
- x = cosPhi * sinDelta,
- y = cosPhi0$1 * sinPhi - sinPhi0$1 * cosPhi * cosDelta,
- z = sinPhi0$1 * sinPhi + cosPhi0$1 * cosPhi * cosDelta;
- lengthSum.add(atan2(sqrt(x * x + y * y), z));
- lambda0$2 = lambda, sinPhi0$1 = sinPhi, cosPhi0$1 = cosPhi;
-}
-
-function length$1(object) {
- lengthSum.reset();
- geoStream(object, lengthStream);
- return +lengthSum;
-}
-
-var coordinates = [null, null];
-var object$1 = {type: "LineString", coordinates: coordinates};
-
-function distance(a, b) {
- coordinates[0] = a;
- coordinates[1] = b;
- return length$1(object$1);
-}
-
-var containsObjectType = {
- Feature: function(object, point) {
- return containsGeometry(object.geometry, point);
- },
- FeatureCollection: function(object, point) {
- var features = object.features, i = -1, n = features.length;
- while (++i < n) if (containsGeometry(features[i].geometry, point)) return true;
- return false;
- }
-};
-
-var containsGeometryType = {
- Sphere: function() {
- return true;
- },
- Point: function(object, point) {
- return containsPoint(object.coordinates, point);
- },
- MultiPoint: function(object, point) {
- var coordinates = object.coordinates, i = -1, n = coordinates.length;
- while (++i < n) if (containsPoint(coordinates[i], point)) return true;
- return false;
- },
- LineString: function(object, point) {
- return containsLine(object.coordinates, point);
- },
- MultiLineString: function(object, point) {
- var coordinates = object.coordinates, i = -1, n = coordinates.length;
- while (++i < n) if (containsLine(coordinates[i], point)) return true;
- return false;
- },
- Polygon: function(object, point) {
- return containsPolygon(object.coordinates, point);
- },
- MultiPolygon: function(object, point) {
- var coordinates = object.coordinates, i = -1, n = coordinates.length;
- while (++i < n) if (containsPolygon(coordinates[i], point)) return true;
- return false;
- },
- GeometryCollection: function(object, point) {
- var geometries = object.geometries, i = -1, n = geometries.length;
- while (++i < n) if (containsGeometry(geometries[i], point)) return true;
- return false;
- }
-};
-
-function containsGeometry(geometry, point) {
- return geometry && containsGeometryType.hasOwnProperty(geometry.type)
- ? containsGeometryType[geometry.type](geometry, point)
- : false;
-}
-
-function containsPoint(coordinates, point) {
- return distance(coordinates, point) === 0;
-}
-
-function containsLine(coordinates, point) {
- var ab = distance(coordinates[0], coordinates[1]),
- ao = distance(coordinates[0], point),
- ob = distance(point, coordinates[1]);
- return ao + ob <= ab + epsilon$2;
-}
-
-function containsPolygon(coordinates, point) {
- return !!polygonContains(coordinates.map(ringRadians), pointRadians(point));
-}
-
-function ringRadians(ring) {
- return ring = ring.map(pointRadians), ring.pop(), ring;
-}
-
-function pointRadians(point) {
- return [point[0] * radians, point[1] * radians];
-}
-
-function contains(object, point) {
- return (object && containsObjectType.hasOwnProperty(object.type)
- ? containsObjectType[object.type]
- : containsGeometry)(object, point);
-}
-
-function graticuleX(y0, y1, dy) {
- var y = sequence(y0, y1 - epsilon$2, dy).concat(y1);
- return function(x) { return y.map(function(y) { return [x, y]; }); };
-}
-
-function graticuleY(x0, x1, dx) {
- var x = sequence(x0, x1 - epsilon$2, dx).concat(x1);
- return function(y) { return x.map(function(x) { return [x, y]; }); };
-}
-
-function graticule() {
- var x1, x0, X1, X0,
- y1, y0, Y1, Y0,
- dx = 10, dy = dx, DX = 90, DY = 360,
- x, y, X, Y,
- precision = 2.5;
-
- function graticule() {
- return {type: "MultiLineString", coordinates: lines()};
- }
-
- function lines() {
- return sequence(ceil(X0 / DX) * DX, X1, DX).map(X)
- .concat(sequence(ceil(Y0 / DY) * DY, Y1, DY).map(Y))
- .concat(sequence(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs(x % DX) > epsilon$2; }).map(x))
- .concat(sequence(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs(y % DY) > epsilon$2; }).map(y));
- }
-
- graticule.lines = function() {
- return lines().map(function(coordinates) { return {type: "LineString", coordinates: coordinates}; });
- };
-
- graticule.outline = function() {
- return {
- type: "Polygon",
- coordinates: [
- X(X0).concat(
- Y(Y1).slice(1),
- X(X1).reverse().slice(1),
- Y(Y0).reverse().slice(1))
- ]
- };
- };
-
- graticule.extent = function(_) {
- if (!arguments.length) return graticule.extentMinor();
- return graticule.extentMajor(_).extentMinor(_);
- };
-
- graticule.extentMajor = function(_) {
- if (!arguments.length) return [[X0, Y0], [X1, Y1]];
- X0 = +_[0][0], X1 = +_[1][0];
- Y0 = +_[0][1], Y1 = +_[1][1];
- if (X0 > X1) _ = X0, X0 = X1, X1 = _;
- if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;
- return graticule.precision(precision);
- };
-
- graticule.extentMinor = function(_) {
- if (!arguments.length) return [[x0, y0], [x1, y1]];
- x0 = +_[0][0], x1 = +_[1][0];
- y0 = +_[0][1], y1 = +_[1][1];
- if (x0 > x1) _ = x0, x0 = x1, x1 = _;
- if (y0 > y1) _ = y0, y0 = y1, y1 = _;
- return graticule.precision(precision);
- };
-
- graticule.step = function(_) {
- if (!arguments.length) return graticule.stepMinor();
- return graticule.stepMajor(_).stepMinor(_);
- };
-
- graticule.stepMajor = function(_) {
- if (!arguments.length) return [DX, DY];
- DX = +_[0], DY = +_[1];
- return graticule;
- };
-
- graticule.stepMinor = function(_) {
- if (!arguments.length) return [dx, dy];
- dx = +_[0], dy = +_[1];
- return graticule;
- };
-
- graticule.precision = function(_) {
- if (!arguments.length) return precision;
- precision = +_;
- x = graticuleX(y0, y1, 90);
- y = graticuleY(x0, x1, precision);
- X = graticuleX(Y0, Y1, 90);
- Y = graticuleY(X0, X1, precision);
- return graticule;
- };
-
- return graticule
- .extentMajor([[-180, -90 + epsilon$2], [180, 90 - epsilon$2]])
- .extentMinor([[-180, -80 - epsilon$2], [180, 80 + epsilon$2]]);
-}
-
-function graticule10() {
- return graticule()();
-}
-
-function interpolate$1(a, b) {
- var x0 = a[0] * radians,
- y0 = a[1] * radians,
- x1 = b[0] * radians,
- y1 = b[1] * radians,
- cy0 = cos$1(y0),
- sy0 = sin$1(y0),
- cy1 = cos$1(y1),
- sy1 = sin$1(y1),
- kx0 = cy0 * cos$1(x0),
- ky0 = cy0 * sin$1(x0),
- kx1 = cy1 * cos$1(x1),
- ky1 = cy1 * sin$1(x1),
- d = 2 * asin(sqrt(haversin(y1 - y0) + cy0 * cy1 * haversin(x1 - x0))),
- k = sin$1(d);
-
- var interpolate = d ? function(t) {
- var B = sin$1(t *= d) / k,
- A = sin$1(d - t) / k,
- x = A * kx0 + B * kx1,
- y = A * ky0 + B * ky1,
- z = A * sy0 + B * sy1;
- return [
- atan2(y, x) * degrees$1,
- atan2(z, sqrt(x * x + y * y)) * degrees$1
- ];
- } : function() {
- return [x0 * degrees$1, y0 * degrees$1];
- };
-
- interpolate.distance = d;
-
- return interpolate;
-}
-
-function identity$4(x) {
- return x;
-}
-
-var areaSum$1 = adder();
-var areaRingSum$1 = adder();
-var x00;
-var y00;
-var x0$1;
-var y0$1;
-
-var areaStream$1 = {
- point: noop$1,
- lineStart: noop$1,
- lineEnd: noop$1,
- polygonStart: function() {
- areaStream$1.lineStart = areaRingStart$1;
- areaStream$1.lineEnd = areaRingEnd$1;
- },
- polygonEnd: function() {
- areaStream$1.lineStart = areaStream$1.lineEnd = areaStream$1.point = noop$1;
- areaSum$1.add(abs(areaRingSum$1));
- areaRingSum$1.reset();
- },
- result: function() {
- var area = areaSum$1 / 2;
- areaSum$1.reset();
- return area;
- }
-};
-
-function areaRingStart$1() {
- areaStream$1.point = areaPointFirst$1;
-}
-
-function areaPointFirst$1(x, y) {
- areaStream$1.point = areaPoint$1;
- x00 = x0$1 = x, y00 = y0$1 = y;
-}
-
-function areaPoint$1(x, y) {
- areaRingSum$1.add(y0$1 * x - x0$1 * y);
- x0$1 = x, y0$1 = y;
-}
-
-function areaRingEnd$1() {
- areaPoint$1(x00, y00);
-}
-
-var x0$2 = Infinity;
-var y0$2 = x0$2;
-var x1 = -x0$2;
-var y1 = x1;
-
-var boundsStream$1 = {
- point: boundsPoint$1,
- lineStart: noop$1,
- lineEnd: noop$1,
- polygonStart: noop$1,
- polygonEnd: noop$1,
- result: function() {
- var bounds = [[x0$2, y0$2], [x1, y1]];
- x1 = y1 = -(y0$2 = x0$2 = Infinity);
- return bounds;
- }
-};
-
-function boundsPoint$1(x, y) {
- if (x < x0$2) x0$2 = x;
- if (x > x1) x1 = x;
- if (y < y0$2) y0$2 = y;
- if (y > y1) y1 = y;
-}
-
-// TODO Enforce positive area for exterior, negative area for interior?
-
-var X0$1 = 0;
-var Y0$1 = 0;
-var Z0$1 = 0;
-var X1$1 = 0;
-var Y1$1 = 0;
-var Z1$1 = 0;
-var X2$1 = 0;
-var Y2$1 = 0;
-var Z2$1 = 0;
-var x00$1;
-var y00$1;
-var x0$3;
-var y0$3;
-
-var centroidStream$1 = {
- point: centroidPoint$1,
- lineStart: centroidLineStart$1,
- lineEnd: centroidLineEnd$1,
- polygonStart: function() {
- centroidStream$1.lineStart = centroidRingStart$1;
- centroidStream$1.lineEnd = centroidRingEnd$1;
- },
- polygonEnd: function() {
- centroidStream$1.point = centroidPoint$1;
- centroidStream$1.lineStart = centroidLineStart$1;
- centroidStream$1.lineEnd = centroidLineEnd$1;
- },
- result: function() {
- var centroid = Z2$1 ? [X2$1 / Z2$1, Y2$1 / Z2$1]
- : Z1$1 ? [X1$1 / Z1$1, Y1$1 / Z1$1]
- : Z0$1 ? [X0$1 / Z0$1, Y0$1 / Z0$1]
- : [NaN, NaN];
- X0$1 = Y0$1 = Z0$1 =
- X1$1 = Y1$1 = Z1$1 =
- X2$1 = Y2$1 = Z2$1 = 0;
- return centroid;
- }
-};
-
-function centroidPoint$1(x, y) {
- X0$1 += x;
- Y0$1 += y;
- ++Z0$1;
-}
-
-function centroidLineStart$1() {
- centroidStream$1.point = centroidPointFirstLine;
-}
-
-function centroidPointFirstLine(x, y) {
- centroidStream$1.point = centroidPointLine;
- centroidPoint$1(x0$3 = x, y0$3 = y);
-}
-
-function centroidPointLine(x, y) {
- var dx = x - x0$3, dy = y - y0$3, z = sqrt(dx * dx + dy * dy);
- X1$1 += z * (x0$3 + x) / 2;
- Y1$1 += z * (y0$3 + y) / 2;
- Z1$1 += z;
- centroidPoint$1(x0$3 = x, y0$3 = y);
-}
-
-function centroidLineEnd$1() {
- centroidStream$1.point = centroidPoint$1;
-}
-
-function centroidRingStart$1() {
- centroidStream$1.point = centroidPointFirstRing;
-}
-
-function centroidRingEnd$1() {
- centroidPointRing(x00$1, y00$1);
-}
-
-function centroidPointFirstRing(x, y) {
- centroidStream$1.point = centroidPointRing;
- centroidPoint$1(x00$1 = x0$3 = x, y00$1 = y0$3 = y);
-}
-
-function centroidPointRing(x, y) {
- var dx = x - x0$3,
- dy = y - y0$3,
- z = sqrt(dx * dx + dy * dy);
-
- X1$1 += z * (x0$3 + x) / 2;
- Y1$1 += z * (y0$3 + y) / 2;
- Z1$1 += z;
-
- z = y0$3 * x - x0$3 * y;
- X2$1 += z * (x0$3 + x);
- Y2$1 += z * (y0$3 + y);
- Z2$1 += z * 3;
- centroidPoint$1(x0$3 = x, y0$3 = y);
-}
-
-function PathContext(context) {
- this._context = context;
-}
-
-PathContext.prototype = {
- _radius: 4.5,
- pointRadius: function(_) {
- return this._radius = _, this;
- },
- polygonStart: function() {
- this._line = 0;
- },
- polygonEnd: function() {
- this._line = NaN;
- },
- lineStart: function() {
- this._point = 0;
- },
- lineEnd: function() {
- if (this._line === 0) this._context.closePath();
- this._point = NaN;
- },
- point: function(x, y) {
- switch (this._point) {
- case 0: {
- this._context.moveTo(x, y);
- this._point = 1;
- break;
- }
- case 1: {
- this._context.lineTo(x, y);
- break;
- }
- default: {
- this._context.moveTo(x + this._radius, y);
- this._context.arc(x, y, this._radius, 0, tau$3);
- break;
- }
- }
- },
- result: noop$1
-};
-
-var lengthSum$1 = adder();
-var lengthRing;
-var x00$2;
-var y00$2;
-var x0$4;
-var y0$4;
-
-var lengthStream$1 = {
- point: noop$1,
- lineStart: function() {
- lengthStream$1.point = lengthPointFirst$1;
- },
- lineEnd: function() {
- if (lengthRing) lengthPoint$1(x00$2, y00$2);
- lengthStream$1.point = noop$1;
- },
- polygonStart: function() {
- lengthRing = true;
- },
- polygonEnd: function() {
- lengthRing = null;
- },
- result: function() {
- var length = +lengthSum$1;
- lengthSum$1.reset();
- return length;
- }
-};
-
-function lengthPointFirst$1(x, y) {
- lengthStream$1.point = lengthPoint$1;
- x00$2 = x0$4 = x, y00$2 = y0$4 = y;
-}
-
-function lengthPoint$1(x, y) {
- x0$4 -= x, y0$4 -= y;
- lengthSum$1.add(sqrt(x0$4 * x0$4 + y0$4 * y0$4));
- x0$4 = x, y0$4 = y;
-}
-
-function PathString() {
- this._string = [];
-}
-
-PathString.prototype = {
- _radius: 4.5,
- _circle: circle$1(4.5),
- pointRadius: function(_) {
- if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;
- return this;
- },
- polygonStart: function() {
- this._line = 0;
- },
- polygonEnd: function() {
- this._line = NaN;
- },
- lineStart: function() {
- this._point = 0;
- },
- lineEnd: function() {
- if (this._line === 0) this._string.push("Z");
- this._point = NaN;
- },
- point: function(x, y) {
- switch (this._point) {
- case 0: {
- this._string.push("M", x, ",", y);
- this._point = 1;
- break;
- }
- case 1: {
- this._string.push("L", x, ",", y);
- break;
- }
- default: {
- if (this._circle == null) this._circle = circle$1(this._radius);
- this._string.push("M", x, ",", y, this._circle);
- break;
- }
- }
- },
- result: function() {
- if (this._string.length) {
- var result = this._string.join("");
- this._string = [];
- return result;
- } else {
- return null;
- }
- }
-};
-
-function circle$1(radius) {
- return "m0," + radius
- + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius
- + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius
- + "z";
-}
-
-function index$1(projection, context) {
- var pointRadius = 4.5,
- projectionStream,
- contextStream;
-
- function path(object) {
- if (object) {
- if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments));
- geoStream(object, projectionStream(contextStream));
- }
- return contextStream.result();
- }
-
- path.area = function(object) {
- geoStream(object, projectionStream(areaStream$1));
- return areaStream$1.result();
- };
-
- path.measure = function(object) {
- geoStream(object, projectionStream(lengthStream$1));
- return lengthStream$1.result();
- };
-
- path.bounds = function(object) {
- geoStream(object, projectionStream(boundsStream$1));
- return boundsStream$1.result();
- };
-
- path.centroid = function(object) {
- geoStream(object, projectionStream(centroidStream$1));
- return centroidStream$1.result();
- };
-
- path.projection = function(_) {
- return arguments.length ? (projectionStream = _ == null ? (projection = null, identity$4) : (projection = _).stream, path) : projection;
- };
-
- path.context = function(_) {
- if (!arguments.length) return context;
- contextStream = _ == null ? (context = null, new PathString) : new PathContext(context = _);
- if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius);
- return path;
- };
-
- path.pointRadius = function(_) {
- if (!arguments.length) return pointRadius;
- pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_);
- return path;
- };
-
- return path.projection(projection).context(context);
-}
-
-function transform(methods) {
- return {
- stream: transformer(methods)
- };
-}
-
-function transformer(methods) {
- return function(stream) {
- var s = new TransformStream;
- for (var key in methods) s[key] = methods[key];
- s.stream = stream;
- return s;
- };
-}
-
-function TransformStream() {}
-
-TransformStream.prototype = {
- constructor: TransformStream,
- point: function(x, y) { this.stream.point(x, y); },
- sphere: function() { this.stream.sphere(); },
- lineStart: function() { this.stream.lineStart(); },
- lineEnd: function() { this.stream.lineEnd(); },
- polygonStart: function() { this.stream.polygonStart(); },
- polygonEnd: function() { this.stream.polygonEnd(); }
-};
-
-function fit(projection, fitBounds, object) {
- var clip = projection.clipExtent && projection.clipExtent();
- projection.scale(150).translate([0, 0]);
- if (clip != null) projection.clipExtent(null);
- geoStream(object, projection.stream(boundsStream$1));
- fitBounds(boundsStream$1.result());
- if (clip != null) projection.clipExtent(clip);
- return projection;
-}
-
-function fitExtent(projection, extent, object) {
- return fit(projection, function(b) {
- var w = extent[1][0] - extent[0][0],
- h = extent[1][1] - extent[0][1],
- k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),
- x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,
- y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;
- projection.scale(150 * k).translate([x, y]);
- }, object);
-}
-
-function fitSize(projection, size, object) {
- return fitExtent(projection, [[0, 0], size], object);
-}
-
-function fitWidth(projection, width, object) {
- return fit(projection, function(b) {
- var w = +width,
- k = w / (b[1][0] - b[0][0]),
- x = (w - k * (b[1][0] + b[0][0])) / 2,
- y = -k * b[0][1];
- projection.scale(150 * k).translate([x, y]);
- }, object);
-}
-
-function fitHeight(projection, height, object) {
- return fit(projection, function(b) {
- var h = +height,
- k = h / (b[1][1] - b[0][1]),
- x = -k * b[0][0],
- y = (h - k * (b[1][1] + b[0][1])) / 2;
- projection.scale(150 * k).translate([x, y]);
- }, object);
-}
-
-var maxDepth = 16;
-var cosMinDistance = cos$1(30 * radians); // cos(minimum angular distance)
-
-function resample(project, delta2) {
- return +delta2 ? resample$1(project, delta2) : resampleNone(project);
-}
-
-function resampleNone(project) {
- return transformer({
- point: function(x, y) {
- x = project(x, y);
- this.stream.point(x[0], x[1]);
- }
- });
-}
-
-function resample$1(project, delta2) {
-
- function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {
- var dx = x1 - x0,
- dy = y1 - y0,
- d2 = dx * dx + dy * dy;
- if (d2 > 4 * delta2 && depth--) {
- var a = a0 + a1,
- b = b0 + b1,
- c = c0 + c1,
- m = sqrt(a * a + b * b + c * c),
- phi2 = asin(c /= m),
- lambda2 = abs(abs(c) - 1) < epsilon$2 || abs(lambda0 - lambda1) < epsilon$2 ? (lambda0 + lambda1) / 2 : atan2(b, a),
- p = project(lambda2, phi2),
- x2 = p[0],
- y2 = p[1],
- dx2 = x2 - x0,
- dy2 = y2 - y0,
- dz = dy * dx2 - dx * dy2;
- if (dz * dz / d2 > delta2 // perpendicular projected distance
- || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end
- || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance
- resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);
- stream.point(x2, y2);
- resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);
- }
- }
- }
- return function(stream) {
- var lambda00, x00, y00, a00, b00, c00, // first point
- lambda0, x0, y0, a0, b0, c0; // previous point
-
- var resampleStream = {
- point: point,
- lineStart: lineStart,
- lineEnd: lineEnd,
- polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },
- polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }
- };
-
- function point(x, y) {
- x = project(x, y);
- stream.point(x[0], x[1]);
- }
-
- function lineStart() {
- x0 = NaN;
- resampleStream.point = linePoint;
- stream.lineStart();
- }
-
- function linePoint(lambda, phi) {
- var c = cartesian([lambda, phi]), p = project(lambda, phi);
- resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);
- stream.point(x0, y0);
- }
-
- function lineEnd() {
- resampleStream.point = point;
- stream.lineEnd();
- }
-
- function ringStart() {
- lineStart();
- resampleStream.point = ringPoint;
- resampleStream.lineEnd = ringEnd;
- }
-
- function ringPoint(lambda, phi) {
- linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;
- resampleStream.point = linePoint;
- }
-
- function ringEnd() {
- resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);
- resampleStream.lineEnd = lineEnd;
- lineEnd();
- }
-
- return resampleStream;
- };
-}
-
-var transformRadians = transformer({
- point: function(x, y) {
- this.stream.point(x * radians, y * radians);
- }
-});
-
-function transformRotate(rotate) {
- return transformer({
- point: function(x, y) {
- var r = rotate(x, y);
- return this.stream.point(r[0], r[1]);
- }
- });
-}
-
-function projection(project) {
- return projectionMutator(function() { return project; })();
-}
-
-function projectionMutator(projectAt) {
- var project,
- k = 150, // scale
- x = 480, y = 250, // translate
- dx, dy, lambda = 0, phi = 0, // center
- deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, projectRotate, // rotate
- theta = null, preclip = clipAntimeridian, // clip angle
- x0 = null, y0, x1, y1, postclip = identity$4, // clip extent
- delta2 = 0.5, projectResample = resample(projectTransform, delta2), // precision
- cache,
- cacheStream;
-
- function projection(point) {
- point = projectRotate(point[0] * radians, point[1] * radians);
- return [point[0] * k + dx, dy - point[1] * k];
- }
-
- function invert(point) {
- point = projectRotate.invert((point[0] - dx) / k, (dy - point[1]) / k);
- return point && [point[0] * degrees$1, point[1] * degrees$1];
- }
-
- function projectTransform(x, y) {
- return x = project(x, y), [x[0] * k + dx, dy - x[1] * k];
- }
-
- projection.stream = function(stream) {
- return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));
- };
-
- projection.preclip = function(_) {
- return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;
- };
-
- projection.postclip = function(_) {
- return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;
- };
-
- projection.clipAngle = function(_) {
- return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees$1;
- };
-
- projection.clipExtent = function(_) {
- return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity$4) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];
- };
-
- projection.scale = function(_) {
- return arguments.length ? (k = +_, recenter()) : k;
- };
-
- projection.translate = function(_) {
- return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];
- };
-
- projection.center = function(_) {
- return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees$1, phi * degrees$1];
- };
-
- projection.rotate = function(_) {
- return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees$1, deltaPhi * degrees$1, deltaGamma * degrees$1];
- };
-
- projection.precision = function(_) {
- return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);
- };
-
- projection.fitExtent = function(extent, object) {
- return fitExtent(projection, extent, object);
- };
-
- projection.fitSize = function(size, object) {
- return fitSize(projection, size, object);
- };
-
- projection.fitWidth = function(width, object) {
- return fitWidth(projection, width, object);
- };
-
- projection.fitHeight = function(height, object) {
- return fitHeight(projection, height, object);
- };
-
- function recenter() {
- projectRotate = compose(rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma), project);
- var center = project(lambda, phi);
- dx = x - center[0] * k;
- dy = y + center[1] * k;
- return reset();
- }
-
- function reset() {
- cache = cacheStream = null;
- return projection;
- }
-
- return function() {
- project = projectAt.apply(this, arguments);
- projection.invert = project.invert && invert;
- return recenter();
- };
-}
-
-function conicProjection(projectAt) {
- var phi0 = 0,
- phi1 = pi$3 / 3,
- m = projectionMutator(projectAt),
- p = m(phi0, phi1);
-
- p.parallels = function(_) {
- return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees$1, phi1 * degrees$1];
- };
-
- return p;
-}
-
-function cylindricalEqualAreaRaw(phi0) {
- var cosPhi0 = cos$1(phi0);
-
- function forward(lambda, phi) {
- return [lambda * cosPhi0, sin$1(phi) / cosPhi0];
- }
-
- forward.invert = function(x, y) {
- return [x / cosPhi0, asin(y * cosPhi0)];
- };
-
- return forward;
-}
-
-function conicEqualAreaRaw(y0, y1) {
- var sy0 = sin$1(y0), n = (sy0 + sin$1(y1)) / 2;
-
- // Are the parallels symmetrical around the Equator?
- if (abs(n) < epsilon$2) return cylindricalEqualAreaRaw(y0);
-
- var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n;
-
- function project(x, y) {
- var r = sqrt(c - 2 * n * sin$1(y)) / n;
- return [r * sin$1(x *= n), r0 - r * cos$1(x)];
- }
-
- project.invert = function(x, y) {
- var r0y = r0 - y;
- return [atan2(x, abs(r0y)) / n * sign(r0y), asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))];
- };
-
- return project;
-}
-
-function conicEqualArea() {
- return conicProjection(conicEqualAreaRaw)
- .scale(155.424)
- .center([0, 33.6442]);
-}
-
-function albers() {
- return conicEqualArea()
- .parallels([29.5, 45.5])
- .scale(1070)
- .translate([480, 250])
- .rotate([96, 0])
- .center([-0.6, 38.7]);
-}
-
-// The projections must have mutually exclusive clip regions on the sphere,
-// as this will avoid emitting interleaving lines and polygons.
-function multiplex(streams) {
- var n = streams.length;
- return {
- point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },
- sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },
- lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },
- lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },
- polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },
- polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }
- };
-}
-
-// A composite projection for the United States, configured by default for
-// 960×500. The projection also works quite well at 960×600 if you change the
-// scale to 1285 and adjust the translate accordingly. The set of standard
-// parallels for each region comes from USGS, which is published here:
-// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers
-function albersUsa() {
- var cache,
- cacheStream,
- lower48 = albers(), lower48Point,
- alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338
- hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007
- point, pointStream = {point: function(x, y) { point = [x, y]; }};
-
- function albersUsa(coordinates) {
- var x = coordinates[0], y = coordinates[1];
- return point = null, (lower48Point.point(x, y), point)
- || (alaskaPoint.point(x, y), point)
- || (hawaiiPoint.point(x, y), point);
- }
-
- albersUsa.invert = function(coordinates) {
- var k = lower48.scale(),
- t = lower48.translate(),
- x = (coordinates[0] - t[0]) / k,
- y = (coordinates[1] - t[1]) / k;
- return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska
- : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii
- : lower48).invert(coordinates);
- };
-
- albersUsa.stream = function(stream) {
- return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);
- };
-
- albersUsa.precision = function(_) {
- if (!arguments.length) return lower48.precision();
- lower48.precision(_), alaska.precision(_), hawaii.precision(_);
- return reset();
- };
-
- albersUsa.scale = function(_) {
- if (!arguments.length) return lower48.scale();
- lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);
- return albersUsa.translate(lower48.translate());
- };
-
- albersUsa.translate = function(_) {
- if (!arguments.length) return lower48.translate();
- var k = lower48.scale(), x = +_[0], y = +_[1];
-
- lower48Point = lower48
- .translate(_)
- .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])
- .stream(pointStream);
-
- alaskaPoint = alaska
- .translate([x - 0.307 * k, y + 0.201 * k])
- .clipExtent([[x - 0.425 * k + epsilon$2, y + 0.120 * k + epsilon$2], [x - 0.214 * k - epsilon$2, y + 0.234 * k - epsilon$2]])
- .stream(pointStream);
-
- hawaiiPoint = hawaii
- .translate([x - 0.205 * k, y + 0.212 * k])
- .clipExtent([[x - 0.214 * k + epsilon$2, y + 0.166 * k + epsilon$2], [x - 0.115 * k - epsilon$2, y + 0.234 * k - epsilon$2]])
- .stream(pointStream);
-
- return reset();
- };
-
- albersUsa.fitExtent = function(extent, object) {
- return fitExtent(albersUsa, extent, object);
- };
-
- albersUsa.fitSize = function(size, object) {
- return fitSize(albersUsa, size, object);
- };
-
- albersUsa.fitWidth = function(width, object) {
- return fitWidth(albersUsa, width, object);
- };
-
- albersUsa.fitHeight = function(height, object) {
- return fitHeight(albersUsa, height, object);
- };
-
- function reset() {
- cache = cacheStream = null;
- return albersUsa;
- }
-
- return albersUsa.scale(1070);
-}
-
-function azimuthalRaw(scale) {
- return function(x, y) {
- var cx = cos$1(x),
- cy = cos$1(y),
- k = scale(cx * cy);
- return [
- k * cy * sin$1(x),
- k * sin$1(y)
- ];
- }
-}
-
-function azimuthalInvert(angle) {
- return function(x, y) {
- var z = sqrt(x * x + y * y),
- c = angle(z),
- sc = sin$1(c),
- cc = cos$1(c);
- return [
- atan2(x * sc, z * cc),
- asin(z && y * sc / z)
- ];
- }
-}
-
-var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {
- return sqrt(2 / (1 + cxcy));
-});
-
-azimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {
- return 2 * asin(z / 2);
-});
-
-function azimuthalEqualArea() {
- return projection(azimuthalEqualAreaRaw)
- .scale(124.75)
- .clipAngle(180 - 1e-3);
-}
-
-var azimuthalEquidistantRaw = azimuthalRaw(function(c) {
- return (c = acos(c)) && c / sin$1(c);
-});
-
-azimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {
- return z;
-});
-
-function azimuthalEquidistant() {
- return projection(azimuthalEquidistantRaw)
- .scale(79.4188)
- .clipAngle(180 - 1e-3);
-}
-
-function mercatorRaw(lambda, phi) {
- return [lambda, log(tan((halfPi$2 + phi) / 2))];
-}
-
-mercatorRaw.invert = function(x, y) {
- return [x, 2 * atan(exp(y)) - halfPi$2];
-};
-
-function mercator() {
- return mercatorProjection(mercatorRaw)
- .scale(961 / tau$3);
-}
-
-function mercatorProjection(project) {
- var m = projection(project),
- center = m.center,
- scale = m.scale,
- translate = m.translate,
- clipExtent = m.clipExtent,
- x0 = null, y0, x1, y1; // clip extent
-
- m.scale = function(_) {
- return arguments.length ? (scale(_), reclip()) : scale();
- };
-
- m.translate = function(_) {
- return arguments.length ? (translate(_), reclip()) : translate();
- };
-
- m.center = function(_) {
- return arguments.length ? (center(_), reclip()) : center();
- };
-
- m.clipExtent = function(_) {
- return arguments.length ? (_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];
- };
-
- function reclip() {
- var k = pi$3 * scale(),
- t = m(rotation(m.rotate()).invert([0, 0]));
- return clipExtent(x0 == null
- ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw
- ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]
- : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);
- }
-
- return reclip();
-}
-
-function tany(y) {
- return tan((halfPi$2 + y) / 2);
-}
-
-function conicConformalRaw(y0, y1) {
- var cy0 = cos$1(y0),
- n = y0 === y1 ? sin$1(y0) : log(cy0 / cos$1(y1)) / log(tany(y1) / tany(y0)),
- f = cy0 * pow(tany(y0), n) / n;
-
- if (!n) return mercatorRaw;
-
- function project(x, y) {
- if (f > 0) { if (y < -halfPi$2 + epsilon$2) y = -halfPi$2 + epsilon$2; }
- else { if (y > halfPi$2 - epsilon$2) y = halfPi$2 - epsilon$2; }
- var r = f / pow(tany(y), n);
- return [r * sin$1(n * x), f - r * cos$1(n * x)];
- }
-
- project.invert = function(x, y) {
- var fy = f - y, r = sign(n) * sqrt(x * x + fy * fy);
- return [atan2(x, abs(fy)) / n * sign(fy), 2 * atan(pow(f / r, 1 / n)) - halfPi$2];
- };
-
- return project;
-}
-
-function conicConformal() {
- return conicProjection(conicConformalRaw)
- .scale(109.5)
- .parallels([30, 30]);
-}
-
-function equirectangularRaw(lambda, phi) {
- return [lambda, phi];
-}
-
-equirectangularRaw.invert = equirectangularRaw;
-
-function equirectangular() {
- return projection(equirectangularRaw)
- .scale(152.63);
-}
-
-function conicEquidistantRaw(y0, y1) {
- var cy0 = cos$1(y0),
- n = y0 === y1 ? sin$1(y0) : (cy0 - cos$1(y1)) / (y1 - y0),
- g = cy0 / n + y0;
-
- if (abs(n) < epsilon$2) return equirectangularRaw;
-
- function project(x, y) {
- var gy = g - y, nx = n * x;
- return [gy * sin$1(nx), g - gy * cos$1(nx)];
- }
-
- project.invert = function(x, y) {
- var gy = g - y;
- return [atan2(x, abs(gy)) / n * sign(gy), g - sign(n) * sqrt(x * x + gy * gy)];
- };
-
- return project;
-}
-
-function conicEquidistant() {
- return conicProjection(conicEquidistantRaw)
- .scale(131.154)
- .center([0, 13.9389]);
-}
-
-function gnomonicRaw(x, y) {
- var cy = cos$1(y), k = cos$1(x) * cy;
- return [cy * sin$1(x) / k, sin$1(y) / k];
-}
-
-gnomonicRaw.invert = azimuthalInvert(atan);
-
-function gnomonic() {
- return projection(gnomonicRaw)
- .scale(144.049)
- .clipAngle(60);
-}
-
-function scaleTranslate(kx, ky, tx, ty) {
- return kx === 1 && ky === 1 && tx === 0 && ty === 0 ? identity$4 : transformer({
- point: function(x, y) {
- this.stream.point(x * kx + tx, y * ky + ty);
- }
- });
-}
-
-function identity$5() {
- var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, transform$$1 = identity$4, // scale, translate and reflect
- x0 = null, y0, x1, y1, // clip extent
- postclip = identity$4,
- cache,
- cacheStream,
- projection;
-
- function reset() {
- cache = cacheStream = null;
- return projection;
- }
-
- return projection = {
- stream: function(stream) {
- return cache && cacheStream === stream ? cache : cache = transform$$1(postclip(cacheStream = stream));
- },
- postclip: function(_) {
- return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;
- },
- clipExtent: function(_) {
- return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity$4) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];
- },
- scale: function(_) {
- return arguments.length ? (transform$$1 = scaleTranslate((k = +_) * sx, k * sy, tx, ty), reset()) : k;
- },
- translate: function(_) {
- return arguments.length ? (transform$$1 = scaleTranslate(k * sx, k * sy, tx = +_[0], ty = +_[1]), reset()) : [tx, ty];
- },
- reflectX: function(_) {
- return arguments.length ? (transform$$1 = scaleTranslate(k * (sx = _ ? -1 : 1), k * sy, tx, ty), reset()) : sx < 0;
- },
- reflectY: function(_) {
- return arguments.length ? (transform$$1 = scaleTranslate(k * sx, k * (sy = _ ? -1 : 1), tx, ty), reset()) : sy < 0;
- },
- fitExtent: function(extent, object) {
- return fitExtent(projection, extent, object);
- },
- fitSize: function(size, object) {
- return fitSize(projection, size, object);
- },
- fitWidth: function(width, object) {
- return fitWidth(projection, width, object);
- },
- fitHeight: function(height, object) {
- return fitHeight(projection, height, object);
- }
- };
-}
-
-function naturalEarth1Raw(lambda, phi) {
- var phi2 = phi * phi, phi4 = phi2 * phi2;
- return [
- lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),
- phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))
- ];
-}
-
-naturalEarth1Raw.invert = function(x, y) {
- var phi = y, i = 25, delta;
- do {
- var phi2 = phi * phi, phi4 = phi2 * phi2;
- phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /
- (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));
- } while (abs(delta) > epsilon$2 && --i > 0);
- return [
- x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),
- phi
- ];
-};
-
-function naturalEarth1() {
- return projection(naturalEarth1Raw)
- .scale(175.295);
-}
-
-function orthographicRaw(x, y) {
- return [cos$1(y) * sin$1(x), sin$1(y)];
-}
-
-orthographicRaw.invert = azimuthalInvert(asin);
-
-function orthographic() {
- return projection(orthographicRaw)
- .scale(249.5)
- .clipAngle(90 + epsilon$2);
-}
-
-function stereographicRaw(x, y) {
- var cy = cos$1(y), k = 1 + cos$1(x) * cy;
- return [cy * sin$1(x) / k, sin$1(y) / k];
-}
-
-stereographicRaw.invert = azimuthalInvert(function(z) {
- return 2 * atan(z);
-});
-
-function stereographic() {
- return projection(stereographicRaw)
- .scale(250)
- .clipAngle(142);
-}
-
-function transverseMercatorRaw(lambda, phi) {
- return [log(tan((halfPi$2 + phi) / 2)), -lambda];
-}
-
-transverseMercatorRaw.invert = function(x, y) {
- return [-y, 2 * atan(exp(x)) - halfPi$2];
-};
-
-function transverseMercator() {
- var m = mercatorProjection(transverseMercatorRaw),
- center = m.center,
- rotate = m.rotate;
-
- m.center = function(_) {
- return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);
- };
-
- m.rotate = function(_) {
- return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);
- };
-
- return rotate([0, 0, 90])
- .scale(159.155);
-}
-
-function defaultSeparation(a, b) {
- return a.parent === b.parent ? 1 : 2;
-}
-
-function meanX(children) {
- return children.reduce(meanXReduce, 0) / children.length;
-}
-
-function meanXReduce(x, c) {
- return x + c.x;
-}
-
-function maxY(children) {
- return 1 + children.reduce(maxYReduce, 0);
-}
-
-function maxYReduce(y, c) {
- return Math.max(y, c.y);
-}
-
-function leafLeft(node) {
- var children;
- while (children = node.children) node = children[0];
- return node;
-}
-
-function leafRight(node) {
- var children;
- while (children = node.children) node = children[children.length - 1];
- return node;
-}
-
-function cluster() {
- var separation = defaultSeparation,
- dx = 1,
- dy = 1,
- nodeSize = false;
-
- function cluster(root) {
- var previousNode,
- x = 0;
-
- // First walk, computing the initial x & y values.
- root.eachAfter(function(node) {
- var children = node.children;
- if (children) {
- node.x = meanX(children);
- node.y = maxY(children);
- } else {
- node.x = previousNode ? x += separation(node, previousNode) : 0;
- node.y = 0;
- previousNode = node;
- }
- });
-
- var left = leafLeft(root),
- right = leafRight(root),
- x0 = left.x - separation(left, right) / 2,
- x1 = right.x + separation(right, left) / 2;
-
- // Second walk, normalizing x & y to the desired size.
- return root.eachAfter(nodeSize ? function(node) {
- node.x = (node.x - root.x) * dx;
- node.y = (root.y - node.y) * dy;
- } : function(node) {
- node.x = (node.x - x0) / (x1 - x0) * dx;
- node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;
- });
- }
-
- cluster.separation = function(x) {
- return arguments.length ? (separation = x, cluster) : separation;
- };
-
- cluster.size = function(x) {
- return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]);
- };
-
- cluster.nodeSize = function(x) {
- return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null);
- };
-
- return cluster;
-}
-
-function count(node) {
- var sum = 0,
- children = node.children,
- i = children && children.length;
- if (!i) sum = 1;
- else while (--i >= 0) sum += children[i].value;
- node.value = sum;
-}
-
-function node_count() {
- return this.eachAfter(count);
-}
-
-function node_each(callback) {
- var node = this, current, next = [node], children, i, n;
- do {
- current = next.reverse(), next = [];
- while (node = current.pop()) {
- callback(node), children = node.children;
- if (children) for (i = 0, n = children.length; i < n; ++i) {
- next.push(children[i]);
- }
- }
- } while (next.length);
- return this;
-}
-
-function node_eachBefore(callback) {
- var node = this, nodes = [node], children, i;
- while (node = nodes.pop()) {
- callback(node), children = node.children;
- if (children) for (i = children.length - 1; i >= 0; --i) {
- nodes.push(children[i]);
- }
- }
- return this;
-}
-
-function node_eachAfter(callback) {
- var node = this, nodes = [node], next = [], children, i, n;
- while (node = nodes.pop()) {
- next.push(node), children = node.children;
- if (children) for (i = 0, n = children.length; i < n; ++i) {
- nodes.push(children[i]);
- }
- }
- while (node = next.pop()) {
- callback(node);
- }
- return this;
-}
-
-function node_sum(value) {
- return this.eachAfter(function(node) {
- var sum = +value(node.data) || 0,
- children = node.children,
- i = children && children.length;
- while (--i >= 0) sum += children[i].value;
- node.value = sum;
- });
-}
-
-function node_sort(compare) {
- return this.eachBefore(function(node) {
- if (node.children) {
- node.children.sort(compare);
- }
- });
-}
-
-function node_path(end) {
- var start = this,
- ancestor = leastCommonAncestor(start, end),
- nodes = [start];
- while (start !== ancestor) {
- start = start.parent;
- nodes.push(start);
- }
- var k = nodes.length;
- while (end !== ancestor) {
- nodes.splice(k, 0, end);
- end = end.parent;
- }
- return nodes;
-}
-
-function leastCommonAncestor(a, b) {
- if (a === b) return a;
- var aNodes = a.ancestors(),
- bNodes = b.ancestors(),
- c = null;
- a = aNodes.pop();
- b = bNodes.pop();
- while (a === b) {
- c = a;
- a = aNodes.pop();
- b = bNodes.pop();
- }
- return c;
-}
-
-function node_ancestors() {
- var node = this, nodes = [node];
- while (node = node.parent) {
- nodes.push(node);
- }
- return nodes;
-}
-
-function node_descendants() {
- var nodes = [];
- this.each(function(node) {
- nodes.push(node);
- });
- return nodes;
-}
-
-function node_leaves() {
- var leaves = [];
- this.eachBefore(function(node) {
- if (!node.children) {
- leaves.push(node);
- }
- });
- return leaves;
-}
-
-function node_links() {
- var root = this, links = [];
- root.each(function(node) {
- if (node !== root) { // Don’t include the root’s parent, if any.
- links.push({source: node.parent, target: node});
- }
- });
- return links;
-}
-
-function hierarchy(data, children) {
- var root = new Node(data),
- valued = +data.value && (root.value = data.value),
- node,
- nodes = [root],
- child,
- childs,
- i,
- n;
-
- if (children == null) children = defaultChildren;
-
- while (node = nodes.pop()) {
- if (valued) node.value = +node.data.value;
- if ((childs = children(node.data)) && (n = childs.length)) {
- node.children = new Array(n);
- for (i = n - 1; i >= 0; --i) {
- nodes.push(child = node.children[i] = new Node(childs[i]));
- child.parent = node;
- child.depth = node.depth + 1;
- }
- }
- }
-
- return root.eachBefore(computeHeight);
-}
-
-function node_copy() {
- return hierarchy(this).eachBefore(copyData);
-}
-
-function defaultChildren(d) {
- return d.children;
-}
-
-function copyData(node) {
- node.data = node.data.data;
-}
-
-function computeHeight(node) {
- var height = 0;
- do node.height = height;
- while ((node = node.parent) && (node.height < ++height));
-}
-
-function Node(data) {
- this.data = data;
- this.depth =
- this.height = 0;
- this.parent = null;
-}
-
-Node.prototype = hierarchy.prototype = {
- constructor: Node,
- count: node_count,
- each: node_each,
- eachAfter: node_eachAfter,
- eachBefore: node_eachBefore,
- sum: node_sum,
- sort: node_sort,
- path: node_path,
- ancestors: node_ancestors,
- descendants: node_descendants,
- leaves: node_leaves,
- links: node_links,
- copy: node_copy
-};
-
-var slice$3 = Array.prototype.slice;
-
-function shuffle$1(array) {
- var m = array.length,
- t,
- i;
-
- while (m) {
- i = Math.random() * m-- | 0;
- t = array[m];
- array[m] = array[i];
- array[i] = t;
- }
-
- return array;
-}
-
-function enclose(circles) {
- var i = 0, n = (circles = shuffle$1(slice$3.call(circles))).length, B = [], p, e;
-
- while (i < n) {
- p = circles[i];
- if (e && enclosesWeak(e, p)) ++i;
- else e = encloseBasis(B = extendBasis(B, p)), i = 0;
- }
-
- return e;
-}
-
-function extendBasis(B, p) {
- var i, j;
-
- if (enclosesWeakAll(p, B)) return [p];
-
- // If we get here then B must have at least one element.
- for (i = 0; i < B.length; ++i) {
- if (enclosesNot(p, B[i])
- && enclosesWeakAll(encloseBasis2(B[i], p), B)) {
- return [B[i], p];
- }
- }
-
- // If we get here then B must have at least two elements.
- for (i = 0; i < B.length - 1; ++i) {
- for (j = i + 1; j < B.length; ++j) {
- if (enclosesNot(encloseBasis2(B[i], B[j]), p)
- && enclosesNot(encloseBasis2(B[i], p), B[j])
- && enclosesNot(encloseBasis2(B[j], p), B[i])
- && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {
- return [B[i], B[j], p];
- }
- }
- }
-
- // If we get here then something is very wrong.
- throw new Error;
-}
-
-function enclosesNot(a, b) {
- var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;
- return dr < 0 || dr * dr < dx * dx + dy * dy;
-}
-
-function enclosesWeak(a, b) {
- var dr = a.r - b.r + 1e-6, dx = b.x - a.x, dy = b.y - a.y;
- return dr > 0 && dr * dr > dx * dx + dy * dy;
-}
-
-function enclosesWeakAll(a, B) {
- for (var i = 0; i < B.length; ++i) {
- if (!enclosesWeak(a, B[i])) {
- return false;
- }
- }
- return true;
-}
-
-function encloseBasis(B) {
- switch (B.length) {
- case 1: return encloseBasis1(B[0]);
- case 2: return encloseBasis2(B[0], B[1]);
- case 3: return encloseBasis3(B[0], B[1], B[2]);
- }
-}
-
-function encloseBasis1(a) {
- return {
- x: a.x,
- y: a.y,
- r: a.r
- };
-}
-
-function encloseBasis2(a, b) {
- var x1 = a.x, y1 = a.y, r1 = a.r,
- x2 = b.x, y2 = b.y, r2 = b.r,
- x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,
- l = Math.sqrt(x21 * x21 + y21 * y21);
- return {
- x: (x1 + x2 + x21 / l * r21) / 2,
- y: (y1 + y2 + y21 / l * r21) / 2,
- r: (l + r1 + r2) / 2
- };
-}
-
-function encloseBasis3(a, b, c) {
- var x1 = a.x, y1 = a.y, r1 = a.r,
- x2 = b.x, y2 = b.y, r2 = b.r,
- x3 = c.x, y3 = c.y, r3 = c.r,
- a2 = x1 - x2,
- a3 = x1 - x3,
- b2 = y1 - y2,
- b3 = y1 - y3,
- c2 = r2 - r1,
- c3 = r3 - r1,
- d1 = x1 * x1 + y1 * y1 - r1 * r1,
- d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,
- d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,
- ab = a3 * b2 - a2 * b3,
- xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,
- xb = (b3 * c2 - b2 * c3) / ab,
- ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,
- yb = (a2 * c3 - a3 * c2) / ab,
- A = xb * xb + yb * yb - 1,
- B = 2 * (r1 + xa * xb + ya * yb),
- C = xa * xa + ya * ya - r1 * r1,
- r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);
- return {
- x: x1 + xa + xb * r,
- y: y1 + ya + yb * r,
- r: r
- };
-}
-
-function place(a, b, c) {
- var ax = a.x,
- ay = a.y,
- da = b.r + c.r,
- db = a.r + c.r,
- dx = b.x - ax,
- dy = b.y - ay,
- dc = dx * dx + dy * dy;
- if (dc) {
- var x = 0.5 + ((db *= db) - (da *= da)) / (2 * dc),
- y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);
- c.x = ax + x * dx + y * dy;
- c.y = ay + x * dy - y * dx;
- } else {
- c.x = ax + db;
- c.y = ay;
- }
-}
-
-function intersects(a, b) {
- var dx = b.x - a.x,
- dy = b.y - a.y,
- dr = a.r + b.r;
- return dr * dr - 1e-6 > dx * dx + dy * dy;
-}
-
-function score(node) {
- var a = node._,
- b = node.next._,
- ab = a.r + b.r,
- dx = (a.x * b.r + b.x * a.r) / ab,
- dy = (a.y * b.r + b.y * a.r) / ab;
- return dx * dx + dy * dy;
-}
-
-function Node$1(circle) {
- this._ = circle;
- this.next = null;
- this.previous = null;
-}
-
-function packEnclose(circles) {
- if (!(n = circles.length)) return 0;
-
- var a, b, c, n, aa, ca, i, j, k, sj, sk;
-
- // Place the first circle.
- a = circles[0], a.x = 0, a.y = 0;
- if (!(n > 1)) return a.r;
-
- // Place the second circle.
- b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;
- if (!(n > 2)) return a.r + b.r;
-
- // Place the third circle.
- place(b, a, c = circles[2]);
-
- // Initialize the front-chain using the first three circles a, b and c.
- a = new Node$1(a), b = new Node$1(b), c = new Node$1(c);
- a.next = c.previous = b;
- b.next = a.previous = c;
- c.next = b.previous = a;
-
- // Attempt to place each remaining circle…
- pack: for (i = 3; i < n; ++i) {
- place(a._, b._, c = circles[i]), c = new Node$1(c);
-
- // Find the closest intersecting circle on the front-chain, if any.
- // “Closeness” is determined by linear distance along the front-chain.
- // “Ahead” or “behind” is likewise determined by linear distance.
- j = b.next, k = a.previous, sj = b._.r, sk = a._.r;
- do {
- if (sj <= sk) {
- if (intersects(j._, c._)) {
- b = j, a.next = b, b.previous = a, --i;
- continue pack;
- }
- sj += j._.r, j = j.next;
- } else {
- if (intersects(k._, c._)) {
- a = k, a.next = b, b.previous = a, --i;
- continue pack;
- }
- sk += k._.r, k = k.previous;
- }
- } while (j !== k.next);
-
- // Success! Insert the new circle c between a and b.
- c.previous = a, c.next = b, a.next = b.previous = b = c;
-
- // Compute the new closest circle pair to the centroid.
- aa = score(a);
- while ((c = c.next) !== b) {
- if ((ca = score(c)) < aa) {
- a = c, aa = ca;
- }
- }
- b = a.next;
- }
-
- // Compute the enclosing circle of the front chain.
- a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = enclose(a);
-
- // Translate the circles to put the enclosing circle around the origin.
- for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y;
-
- return c.r;
-}
-
-function siblings(circles) {
- packEnclose(circles);
- return circles;
-}
-
-function optional(f) {
- return f == null ? null : required(f);
-}
-
-function required(f) {
- if (typeof f !== "function") throw new Error;
- return f;
-}
-
-function constantZero() {
- return 0;
-}
-
-function constant$8(x) {
- return function() {
- return x;
- };
-}
-
-function defaultRadius$1(d) {
- return Math.sqrt(d.value);
-}
-
-function index$2() {
- var radius = null,
- dx = 1,
- dy = 1,
- padding = constantZero;
-
- function pack(root) {
- root.x = dx / 2, root.y = dy / 2;
- if (radius) {
- root.eachBefore(radiusLeaf(radius))
- .eachAfter(packChildren(padding, 0.5))
- .eachBefore(translateChild(1));
- } else {
- root.eachBefore(radiusLeaf(defaultRadius$1))
- .eachAfter(packChildren(constantZero, 1))
- .eachAfter(packChildren(padding, root.r / Math.min(dx, dy)))
- .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));
- }
- return root;
- }
-
- pack.radius = function(x) {
- return arguments.length ? (radius = optional(x), pack) : radius;
- };
-
- pack.size = function(x) {
- return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];
- };
-
- pack.padding = function(x) {
- return arguments.length ? (padding = typeof x === "function" ? x : constant$8(+x), pack) : padding;
- };
-
- return pack;
-}
-
-function radiusLeaf(radius) {
- return function(node) {
- if (!node.children) {
- node.r = Math.max(0, +radius(node) || 0);
- }
- };
-}
-
-function packChildren(padding, k) {
- return function(node) {
- if (children = node.children) {
- var children,
- i,
- n = children.length,
- r = padding(node) * k || 0,
- e;
-
- if (r) for (i = 0; i < n; ++i) children[i].r += r;
- e = packEnclose(children);
- if (r) for (i = 0; i < n; ++i) children[i].r -= r;
- node.r = e + r;
- }
- };
-}
-
-function translateChild(k) {
- return function(node) {
- var parent = node.parent;
- node.r *= k;
- if (parent) {
- node.x = parent.x + k * node.x;
- node.y = parent.y + k * node.y;
- }
- };
-}
-
-function roundNode(node) {
- node.x0 = Math.round(node.x0);
- node.y0 = Math.round(node.y0);
- node.x1 = Math.round(node.x1);
- node.y1 = Math.round(node.y1);
-}
-
-function treemapDice(parent, x0, y0, x1, y1) {
- var nodes = parent.children,
- node,
- i = -1,
- n = nodes.length,
- k = parent.value && (x1 - x0) / parent.value;
-
- while (++i < n) {
- node = nodes[i], node.y0 = y0, node.y1 = y1;
- node.x0 = x0, node.x1 = x0 += node.value * k;
- }
-}
-
-function partition() {
- var dx = 1,
- dy = 1,
- padding = 0,
- round = false;
-
- function partition(root) {
- var n = root.height + 1;
- root.x0 =
- root.y0 = padding;
- root.x1 = dx;
- root.y1 = dy / n;
- root.eachBefore(positionNode(dy, n));
- if (round) root.eachBefore(roundNode);
- return root;
- }
-
- function positionNode(dy, n) {
- return function(node) {
- if (node.children) {
- treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);
- }
- var x0 = node.x0,
- y0 = node.y0,
- x1 = node.x1 - padding,
- y1 = node.y1 - padding;
- if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
- if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
- node.x0 = x0;
- node.y0 = y0;
- node.x1 = x1;
- node.y1 = y1;
- };
- }
-
- partition.round = function(x) {
- return arguments.length ? (round = !!x, partition) : round;
- };
-
- partition.size = function(x) {
- return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];
- };
-
- partition.padding = function(x) {
- return arguments.length ? (padding = +x, partition) : padding;
- };
-
- return partition;
-}
-
-var keyPrefix$1 = "$";
-var preroot = {depth: -1};
-var ambiguous = {};
-
-function defaultId(d) {
- return d.id;
-}
-
-function defaultParentId(d) {
- return d.parentId;
-}
-
-function stratify() {
- var id = defaultId,
- parentId = defaultParentId;
-
- function stratify(data) {
- var d,
- i,
- n = data.length,
- root,
- parent,
- node,
- nodes = new Array(n),
- nodeId,
- nodeKey,
- nodeByKey = {};
-
- for (i = 0; i < n; ++i) {
- d = data[i], node = nodes[i] = new Node(d);
- if ((nodeId = id(d, i, data)) != null && (nodeId += "")) {
- nodeKey = keyPrefix$1 + (node.id = nodeId);
- nodeByKey[nodeKey] = nodeKey in nodeByKey ? ambiguous : node;
- }
- }
-
- for (i = 0; i < n; ++i) {
- node = nodes[i], nodeId = parentId(data[i], i, data);
- if (nodeId == null || !(nodeId += "")) {
- if (root) throw new Error("multiple roots");
- root = node;
- } else {
- parent = nodeByKey[keyPrefix$1 + nodeId];
- if (!parent) throw new Error("missing: " + nodeId);
- if (parent === ambiguous) throw new Error("ambiguous: " + nodeId);
- if (parent.children) parent.children.push(node);
- else parent.children = [node];
- node.parent = parent;
- }
- }
-
- if (!root) throw new Error("no root");
- root.parent = preroot;
- root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);
- root.parent = null;
- if (n > 0) throw new Error("cycle");
-
- return root;
- }
-
- stratify.id = function(x) {
- return arguments.length ? (id = required(x), stratify) : id;
- };
-
- stratify.parentId = function(x) {
- return arguments.length ? (parentId = required(x), stratify) : parentId;
- };
-
- return stratify;
-}
-
-function defaultSeparation$1(a, b) {
- return a.parent === b.parent ? 1 : 2;
-}
-
-// function radialSeparation(a, b) {
-// return (a.parent === b.parent ? 1 : 2) / a.depth;
-// }
-
-// This function is used to traverse the left contour of a subtree (or
-// subforest). It returns the successor of v on this contour. This successor is
-// either given by the leftmost child of v or by the thread of v. The function
-// returns null if and only if v is on the highest level of its subtree.
-function nextLeft(v) {
- var children = v.children;
- return children ? children[0] : v.t;
-}
-
-// This function works analogously to nextLeft.
-function nextRight(v) {
- var children = v.children;
- return children ? children[children.length - 1] : v.t;
-}
-
-// Shifts the current subtree rooted at w+. This is done by increasing
-// prelim(w+) and mod(w+) by shift.
-function moveSubtree(wm, wp, shift) {
- var change = shift / (wp.i - wm.i);
- wp.c -= change;
- wp.s += shift;
- wm.c += change;
- wp.z += shift;
- wp.m += shift;
-}
-
-// All other shifts, applied to the smaller subtrees between w- and w+, are
-// performed by this function. To prepare the shifts, we have to adjust
-// change(w+), shift(w+), and change(w-).
-function executeShifts(v) {
- var shift = 0,
- change = 0,
- children = v.children,
- i = children.length,
- w;
- while (--i >= 0) {
- w = children[i];
- w.z += shift;
- w.m += shift;
- shift += w.s + (change += w.c);
- }
-}
-
-// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,
-// returns the specified (default) ancestor.
-function nextAncestor(vim, v, ancestor) {
- return vim.a.parent === v.parent ? vim.a : ancestor;
-}
-
-function TreeNode(node, i) {
- this._ = node;
- this.parent = null;
- this.children = null;
- this.A = null; // default ancestor
- this.a = this; // ancestor
- this.z = 0; // prelim
- this.m = 0; // mod
- this.c = 0; // change
- this.s = 0; // shift
- this.t = null; // thread
- this.i = i; // number
-}
-
-TreeNode.prototype = Object.create(Node.prototype);
-
-function treeRoot(root) {
- var tree = new TreeNode(root, 0),
- node,
- nodes = [tree],
- child,
- children,
- i,
- n;
-
- while (node = nodes.pop()) {
- if (children = node._.children) {
- node.children = new Array(n = children.length);
- for (i = n - 1; i >= 0; --i) {
- nodes.push(child = node.children[i] = new TreeNode(children[i], i));
- child.parent = node;
- }
- }
- }
-
- (tree.parent = new TreeNode(null, 0)).children = [tree];
- return tree;
-}
-
-// Node-link tree diagram using the Reingold-Tilford "tidy" algorithm
-function tree() {
- var separation = defaultSeparation$1,
- dx = 1,
- dy = 1,
- nodeSize = null;
-
- function tree(root) {
- var t = treeRoot(root);
-
- // Compute the layout using Buchheim et al.’s algorithm.
- t.eachAfter(firstWalk), t.parent.m = -t.z;
- t.eachBefore(secondWalk);
-
- // If a fixed node size is specified, scale x and y.
- if (nodeSize) root.eachBefore(sizeNode);
-
- // If a fixed tree size is specified, scale x and y based on the extent.
- // Compute the left-most, right-most, and depth-most nodes for extents.
- else {
- var left = root,
- right = root,
- bottom = root;
- root.eachBefore(function(node) {
- if (node.x < left.x) left = node;
- if (node.x > right.x) right = node;
- if (node.depth > bottom.depth) bottom = node;
- });
- var s = left === right ? 1 : separation(left, right) / 2,
- tx = s - left.x,
- kx = dx / (right.x + s + tx),
- ky = dy / (bottom.depth || 1);
- root.eachBefore(function(node) {
- node.x = (node.x + tx) * kx;
- node.y = node.depth * ky;
- });
- }
-
- return root;
- }
-
- // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is
- // applied recursively to the children of v, as well as the function
- // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the
- // node v is placed to the midpoint of its outermost children.
- function firstWalk(v) {
- var children = v.children,
- siblings = v.parent.children,
- w = v.i ? siblings[v.i - 1] : null;
- if (children) {
- executeShifts(v);
- var midpoint = (children[0].z + children[children.length - 1].z) / 2;
- if (w) {
- v.z = w.z + separation(v._, w._);
- v.m = v.z - midpoint;
- } else {
- v.z = midpoint;
- }
- } else if (w) {
- v.z = w.z + separation(v._, w._);
- }
- v.parent.A = apportion(v, w, v.parent.A || siblings[0]);
- }
-
- // Computes all real x-coordinates by summing up the modifiers recursively.
- function secondWalk(v) {
- v._.x = v.z + v.parent.m;
- v.m += v.parent.m;
- }
-
- // The core of the algorithm. Here, a new subtree is combined with the
- // previous subtrees. Threads are used to traverse the inside and outside
- // contours of the left and right subtree up to the highest common level. The
- // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the
- // superscript o means outside and i means inside, the subscript - means left
- // subtree and + means right subtree. For summing up the modifiers along the
- // contour, we use respective variables si+, si-, so-, and so+. Whenever two
- // nodes of the inside contours conflict, we compute the left one of the
- // greatest uncommon ancestors using the function ANCESTOR and call MOVE
- // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.
- // Finally, we add a new thread (if necessary).
- function apportion(v, w, ancestor) {
- if (w) {
- var vip = v,
- vop = v,
- vim = w,
- vom = vip.parent.children[0],
- sip = vip.m,
- sop = vop.m,
- sim = vim.m,
- som = vom.m,
- shift;
- while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {
- vom = nextLeft(vom);
- vop = nextRight(vop);
- vop.a = v;
- shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);
- if (shift > 0) {
- moveSubtree(nextAncestor(vim, v, ancestor), v, shift);
- sip += shift;
- sop += shift;
- }
- sim += vim.m;
- sip += vip.m;
- som += vom.m;
- sop += vop.m;
- }
- if (vim && !nextRight(vop)) {
- vop.t = vim;
- vop.m += sim - sop;
- }
- if (vip && !nextLeft(vom)) {
- vom.t = vip;
- vom.m += sip - som;
- ancestor = v;
- }
- }
- return ancestor;
- }
-
- function sizeNode(node) {
- node.x *= dx;
- node.y = node.depth * dy;
- }
-
- tree.separation = function(x) {
- return arguments.length ? (separation = x, tree) : separation;
- };
-
- tree.size = function(x) {
- return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);
- };
-
- tree.nodeSize = function(x) {
- return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);
- };
-
- return tree;
-}
-
-function treemapSlice(parent, x0, y0, x1, y1) {
- var nodes = parent.children,
- node,
- i = -1,
- n = nodes.length,
- k = parent.value && (y1 - y0) / parent.value;
-
- while (++i < n) {
- node = nodes[i], node.x0 = x0, node.x1 = x1;
- node.y0 = y0, node.y1 = y0 += node.value * k;
- }
-}
-
-var phi = (1 + Math.sqrt(5)) / 2;
-
-function squarifyRatio(ratio, parent, x0, y0, x1, y1) {
- var rows = [],
- nodes = parent.children,
- row,
- nodeValue,
- i0 = 0,
- i1 = 0,
- n = nodes.length,
- dx, dy,
- value = parent.value,
- sumValue,
- minValue,
- maxValue,
- newRatio,
- minRatio,
- alpha,
- beta;
-
- while (i0 < n) {
- dx = x1 - x0, dy = y1 - y0;
-
- // Find the next non-empty node.
- do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);
- minValue = maxValue = sumValue;
- alpha = Math.max(dy / dx, dx / dy) / (value * ratio);
- beta = sumValue * sumValue * alpha;
- minRatio = Math.max(maxValue / beta, beta / minValue);
-
- // Keep adding nodes while the aspect ratio maintains or improves.
- for (; i1 < n; ++i1) {
- sumValue += nodeValue = nodes[i1].value;
- if (nodeValue < minValue) minValue = nodeValue;
- if (nodeValue > maxValue) maxValue = nodeValue;
- beta = sumValue * sumValue * alpha;
- newRatio = Math.max(maxValue / beta, beta / minValue);
- if (newRatio > minRatio) { sumValue -= nodeValue; break; }
- minRatio = newRatio;
- }
-
- // Position and record the row orientation.
- rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});
- if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);
- else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);
- value -= sumValue, i0 = i1;
- }
-
- return rows;
-}
-
-var squarify = (function custom(ratio) {
-
- function squarify(parent, x0, y0, x1, y1) {
- squarifyRatio(ratio, parent, x0, y0, x1, y1);
- }
-
- squarify.ratio = function(x) {
- return custom((x = +x) > 1 ? x : 1);
- };
-
- return squarify;
-})(phi);
-
-function index$3() {
- var tile = squarify,
- round = false,
- dx = 1,
- dy = 1,
- paddingStack = [0],
- paddingInner = constantZero,
- paddingTop = constantZero,
- paddingRight = constantZero,
- paddingBottom = constantZero,
- paddingLeft = constantZero;
-
- function treemap(root) {
- root.x0 =
- root.y0 = 0;
- root.x1 = dx;
- root.y1 = dy;
- root.eachBefore(positionNode);
- paddingStack = [0];
- if (round) root.eachBefore(roundNode);
- return root;
- }
-
- function positionNode(node) {
- var p = paddingStack[node.depth],
- x0 = node.x0 + p,
- y0 = node.y0 + p,
- x1 = node.x1 - p,
- y1 = node.y1 - p;
- if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
- if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
- node.x0 = x0;
- node.y0 = y0;
- node.x1 = x1;
- node.y1 = y1;
- if (node.children) {
- p = paddingStack[node.depth + 1] = paddingInner(node) / 2;
- x0 += paddingLeft(node) - p;
- y0 += paddingTop(node) - p;
- x1 -= paddingRight(node) - p;
- y1 -= paddingBottom(node) - p;
- if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
- if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
- tile(node, x0, y0, x1, y1);
- }
- }
-
- treemap.round = function(x) {
- return arguments.length ? (round = !!x, treemap) : round;
- };
-
- treemap.size = function(x) {
- return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];
- };
-
- treemap.tile = function(x) {
- return arguments.length ? (tile = required(x), treemap) : tile;
- };
-
- treemap.padding = function(x) {
- return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();
- };
-
- treemap.paddingInner = function(x) {
- return arguments.length ? (paddingInner = typeof x === "function" ? x : constant$8(+x), treemap) : paddingInner;
- };
-
- treemap.paddingOuter = function(x) {
- return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();
- };
-
- treemap.paddingTop = function(x) {
- return arguments.length ? (paddingTop = typeof x === "function" ? x : constant$8(+x), treemap) : paddingTop;
- };
-
- treemap.paddingRight = function(x) {
- return arguments.length ? (paddingRight = typeof x === "function" ? x : constant$8(+x), treemap) : paddingRight;
- };
-
- treemap.paddingBottom = function(x) {
- return arguments.length ? (paddingBottom = typeof x === "function" ? x : constant$8(+x), treemap) : paddingBottom;
- };
-
- treemap.paddingLeft = function(x) {
- return arguments.length ? (paddingLeft = typeof x === "function" ? x : constant$8(+x), treemap) : paddingLeft;
- };
-
- return treemap;
-}
-
-function binary(parent, x0, y0, x1, y1) {
- var nodes = parent.children,
- i, n = nodes.length,
- sum, sums = new Array(n + 1);
-
- for (sums[0] = sum = i = 0; i < n; ++i) {
- sums[i + 1] = sum += nodes[i].value;
- }
-
- partition(0, n, parent.value, x0, y0, x1, y1);
-
- function partition(i, j, value, x0, y0, x1, y1) {
- if (i >= j - 1) {
- var node = nodes[i];
- node.x0 = x0, node.y0 = y0;
- node.x1 = x1, node.y1 = y1;
- return;
- }
-
- var valueOffset = sums[i],
- valueTarget = (value / 2) + valueOffset,
- k = i + 1,
- hi = j - 1;
-
- while (k < hi) {
- var mid = k + hi >>> 1;
- if (sums[mid] < valueTarget) k = mid + 1;
- else hi = mid;
- }
-
- if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k;
-
- var valueLeft = sums[k] - valueOffset,
- valueRight = value - valueLeft;
-
- if ((x1 - x0) > (y1 - y0)) {
- var xk = (x0 * valueRight + x1 * valueLeft) / value;
- partition(i, k, valueLeft, x0, y0, xk, y1);
- partition(k, j, valueRight, xk, y0, x1, y1);
- } else {
- var yk = (y0 * valueRight + y1 * valueLeft) / value;
- partition(i, k, valueLeft, x0, y0, x1, yk);
- partition(k, j, valueRight, x0, yk, x1, y1);
- }
- }
-}
-
-function sliceDice(parent, x0, y0, x1, y1) {
- (parent.depth & 1 ? treemapSlice : treemapDice)(parent, x0, y0, x1, y1);
-}
-
-var resquarify = (function custom(ratio) {
-
- function resquarify(parent, x0, y0, x1, y1) {
- if ((rows = parent._squarify) && (rows.ratio === ratio)) {
- var rows,
- row,
- nodes,
- i,
- j = -1,
- n,
- m = rows.length,
- value = parent.value;
-
- while (++j < m) {
- row = rows[j], nodes = row.children;
- for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;
- if (row.dice) treemapDice(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value);
- else treemapSlice(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1);
- value -= row.value;
- }
- } else {
- parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);
- rows.ratio = ratio;
- }
- }
-
- resquarify.ratio = function(x) {
- return custom((x = +x) > 1 ? x : 1);
- };
-
- return resquarify;
-})(phi);
-
-function area$1(polygon) {
- var i = -1,
- n = polygon.length,
- a,
- b = polygon[n - 1],
- area = 0;
-
- while (++i < n) {
- a = b;
- b = polygon[i];
- area += a[1] * b[0] - a[0] * b[1];
- }
-
- return area / 2;
-}
-
-function centroid$1(polygon) {
- var i = -1,
- n = polygon.length,
- x = 0,
- y = 0,
- a,
- b = polygon[n - 1],
- c,
- k = 0;
-
- while (++i < n) {
- a = b;
- b = polygon[i];
- k += c = a[0] * b[1] - b[0] * a[1];
- x += (a[0] + b[0]) * c;
- y += (a[1] + b[1]) * c;
- }
-
- return k *= 3, [x / k, y / k];
-}
-
-// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of
-// the 3D cross product in a quadrant I Cartesian coordinate system (+x is
-// right, +y is up). Returns a positive value if ABC is counter-clockwise,
-// negative if clockwise, and zero if the points are collinear.
-function cross$1(a, b, c) {
- return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);
-}
-
-function lexicographicOrder(a, b) {
- return a[0] - b[0] || a[1] - b[1];
-}
-
-// Computes the upper convex hull per the monotone chain algorithm.
-// Assumes points.length >= 3, is sorted by x, unique in y.
-// Returns an array of indices into points in left-to-right order.
-function computeUpperHullIndexes(points) {
- var n = points.length,
- indexes = [0, 1],
- size = 2;
-
- for (var i = 2; i < n; ++i) {
- while (size > 1 && cross$1(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;
- indexes[size++] = i;
- }
-
- return indexes.slice(0, size); // remove popped points
-}
-
-function hull(points) {
- if ((n = points.length) < 3) return null;
-
- var i,
- n,
- sortedPoints = new Array(n),
- flippedPoints = new Array(n);
-
- for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];
- sortedPoints.sort(lexicographicOrder);
- for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];
-
- var upperIndexes = computeUpperHullIndexes(sortedPoints),
- lowerIndexes = computeUpperHullIndexes(flippedPoints);
-
- // Construct the hull polygon, removing possible duplicate endpoints.
- var skipLeft = lowerIndexes[0] === upperIndexes[0],
- skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],
- hull = [];
-
- // Add upper hull in right-to-l order.
- // Then add lower hull in left-to-right order.
- for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);
- for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);
-
- return hull;
-}
-
-function contains$1(polygon, point) {
- var n = polygon.length,
- p = polygon[n - 1],
- x = point[0], y = point[1],
- x0 = p[0], y0 = p[1],
- x1, y1,
- inside = false;
-
- for (var i = 0; i < n; ++i) {
- p = polygon[i], x1 = p[0], y1 = p[1];
- if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;
- x0 = x1, y0 = y1;
- }
-
- return inside;
-}
-
-function length$2(polygon) {
- var i = -1,
- n = polygon.length,
- b = polygon[n - 1],
- xa,
- ya,
- xb = b[0],
- yb = b[1],
- perimeter = 0;
-
- while (++i < n) {
- xa = xb;
- ya = yb;
- b = polygon[i];
- xb = b[0];
- yb = b[1];
- xa -= xb;
- ya -= yb;
- perimeter += Math.sqrt(xa * xa + ya * ya);
- }
-
- return perimeter;
-}
-
-var slice$4 = [].slice;
-
-var noabort = {};
-
-function Queue(size) {
- this._size = size;
- this._call =
- this._error = null;
- this._tasks = [];
- this._data = [];
- this._waiting =
- this._active =
- this._ended =
- this._start = 0; // inside a synchronous task callback?
-}
-
-Queue.prototype = queue.prototype = {
- constructor: Queue,
- defer: function(callback) {
- if (typeof callback !== "function") throw new Error("invalid callback");
- if (this._call) throw new Error("defer after await");
- if (this._error != null) return this;
- var t = slice$4.call(arguments, 1);
- t.push(callback);
- ++this._waiting, this._tasks.push(t);
- poke$1(this);
- return this;
- },
- abort: function() {
- if (this._error == null) abort(this, new Error("abort"));
- return this;
- },
- await: function(callback) {
- if (typeof callback !== "function") throw new Error("invalid callback");
- if (this._call) throw new Error("multiple await");
- this._call = function(error, results) { callback.apply(null, [error].concat(results)); };
- maybeNotify(this);
- return this;
- },
- awaitAll: function(callback) {
- if (typeof callback !== "function") throw new Error("invalid callback");
- if (this._call) throw new Error("multiple await");
- this._call = callback;
- maybeNotify(this);
- return this;
- }
-};
-
-function poke$1(q) {
- if (!q._start) {
- try { start$1(q); } // let the current task complete
- catch (e) {
- if (q._tasks[q._ended + q._active - 1]) abort(q, e); // task errored synchronously
- else if (!q._data) throw e; // await callback errored synchronously
- }
- }
-}
-
-function start$1(q) {
- while (q._start = q._waiting && q._active < q._size) {
- var i = q._ended + q._active,
- t = q._tasks[i],
- j = t.length - 1,
- c = t[j];
- t[j] = end(q, i);
- --q._waiting, ++q._active;
- t = c.apply(null, t);
- if (!q._tasks[i]) continue; // task finished synchronously
- q._tasks[i] = t || noabort;
- }
-}
-
-function end(q, i) {
- return function(e, r) {
- if (!q._tasks[i]) return; // ignore multiple callbacks
- --q._active, ++q._ended;
- q._tasks[i] = null;
- if (q._error != null) return; // ignore secondary errors
- if (e != null) {
- abort(q, e);
- } else {
- q._data[i] = r;
- if (q._waiting) poke$1(q);
- else maybeNotify(q);
- }
- };
-}
-
-function abort(q, e) {
- var i = q._tasks.length, t;
- q._error = e; // ignore active callbacks
- q._data = undefined; // allow gc
- q._waiting = NaN; // prevent starting
-
- while (--i >= 0) {
- if (t = q._tasks[i]) {
- q._tasks[i] = null;
- if (t.abort) {
- try { t.abort(); }
- catch (e) { /* ignore */ }
- }
- }
- }
-
- q._active = NaN; // allow notification
- maybeNotify(q);
-}
-
-function maybeNotify(q) {
- if (!q._active && q._call) {
- var d = q._data;
- q._data = undefined; // allow gc
- q._call(q._error, d);
- }
-}
-
-function queue(concurrency) {
- if (concurrency == null) concurrency = Infinity;
- else if (!((concurrency = +concurrency) >= 1)) throw new Error("invalid concurrency");
- return new Queue(concurrency);
-}
-
-function defaultSource$1() {
- return Math.random();
-}
-
-var uniform = (function sourceRandomUniform(source) {
- function randomUniform(min, max) {
- min = min == null ? 0 : +min;
- max = max == null ? 1 : +max;
- if (arguments.length === 1) max = min, min = 0;
- else max -= min;
- return function() {
- return source() * max + min;
- };
- }
-
- randomUniform.source = sourceRandomUniform;
-
- return randomUniform;
-})(defaultSource$1);
-
-var normal = (function sourceRandomNormal(source) {
- function randomNormal(mu, sigma) {
- var x, r;
- mu = mu == null ? 0 : +mu;
- sigma = sigma == null ? 1 : +sigma;
- return function() {
- var y;
-
- // If available, use the second previously-generated uniform random.
- if (x != null) y = x, x = null;
-
- // Otherwise, generate a new x and y.
- else do {
- x = source() * 2 - 1;
- y = source() * 2 - 1;
- r = x * x + y * y;
- } while (!r || r > 1);
-
- return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r);
- };
- }
-
- randomNormal.source = sourceRandomNormal;
-
- return randomNormal;
-})(defaultSource$1);
-
-var logNormal = (function sourceRandomLogNormal(source) {
- function randomLogNormal() {
- var randomNormal = normal.source(source).apply(this, arguments);
- return function() {
- return Math.exp(randomNormal());
- };
- }
-
- randomLogNormal.source = sourceRandomLogNormal;
-
- return randomLogNormal;
-})(defaultSource$1);
-
-var irwinHall = (function sourceRandomIrwinHall(source) {
- function randomIrwinHall(n) {
- return function() {
- for (var sum = 0, i = 0; i < n; ++i) sum += source();
- return sum;
- };
- }
-
- randomIrwinHall.source = sourceRandomIrwinHall;
-
- return randomIrwinHall;
-})(defaultSource$1);
-
-var bates = (function sourceRandomBates(source) {
- function randomBates(n) {
- var randomIrwinHall = irwinHall.source(source)(n);
- return function() {
- return randomIrwinHall() / n;
- };
- }
-
- randomBates.source = sourceRandomBates;
-
- return randomBates;
-})(defaultSource$1);
-
-var exponential$1 = (function sourceRandomExponential(source) {
- function randomExponential(lambda) {
- return function() {
- return -Math.log(1 - source()) / lambda;
- };
- }
-
- randomExponential.source = sourceRandomExponential;
-
- return randomExponential;
-})(defaultSource$1);
-
-function request(url, callback) {
- var request,
- event = dispatch("beforesend", "progress", "load", "error"),
- mimeType,
- headers = map$1(),
- xhr = new XMLHttpRequest,
- user = null,
- password = null,
- response,
- responseType,
- timeout = 0;
-
- // If IE does not support CORS, use XDomainRequest.
- if (typeof XDomainRequest !== "undefined"
- && !("withCredentials" in xhr)
- && /^(http(s)?:)?\/\//.test(url)) xhr = new XDomainRequest;
-
- "onload" in xhr
- ? xhr.onload = xhr.onerror = xhr.ontimeout = respond
- : xhr.onreadystatechange = function(o) { xhr.readyState > 3 && respond(o); };
-
- function respond(o) {
- var status = xhr.status, result;
- if (!status && hasResponse(xhr)
- || status >= 200 && status < 300
- || status === 304) {
- if (response) {
- try {
- result = response.call(request, xhr);
- } catch (e) {
- event.call("error", request, e);
- return;
- }
- } else {
- result = xhr;
- }
- event.call("load", request, result);
- } else {
- event.call("error", request, o);
- }
- }
-
- xhr.onprogress = function(e) {
- event.call("progress", request, e);
- };
-
- request = {
- header: function(name, value) {
- name = (name + "").toLowerCase();
- if (arguments.length < 2) return headers.get(name);
- if (value == null) headers.remove(name);
- else headers.set(name, value + "");
- return request;
- },
-
- // If mimeType is non-null and no Accept header is set, a default is used.
- mimeType: function(value) {
- if (!arguments.length) return mimeType;
- mimeType = value == null ? null : value + "";
- return request;
- },
-
- // Specifies what type the response value should take;
- // for instance, arraybuffer, blob, document, or text.
- responseType: function(value) {
- if (!arguments.length) return responseType;
- responseType = value;
- return request;
- },
-
- timeout: function(value) {
- if (!arguments.length) return timeout;
- timeout = +value;
- return request;
- },
-
- user: function(value) {
- return arguments.length < 1 ? user : (user = value == null ? null : value + "", request);
- },
-
- password: function(value) {
- return arguments.length < 1 ? password : (password = value == null ? null : value + "", request);
- },
-
- // Specify how to convert the response content to a specific type;
- // changes the callback value on "load" events.
- response: function(value) {
- response = value;
- return request;
- },
-
- // Alias for send("GET", …).
- get: function(data, callback) {
- return request.send("GET", data, callback);
- },
-
- // Alias for send("POST", …).
- post: function(data, callback) {
- return request.send("POST", data, callback);
- },
-
- // If callback is non-null, it will be used for error and load events.
- send: function(method, data, callback) {
- xhr.open(method, url, true, user, password);
- if (mimeType != null && !headers.has("accept")) headers.set("accept", mimeType + ",*/*");
- if (xhr.setRequestHeader) headers.each(function(value, name) { xhr.setRequestHeader(name, value); });
- if (mimeType != null && xhr.overrideMimeType) xhr.overrideMimeType(mimeType);
- if (responseType != null) xhr.responseType = responseType;
- if (timeout > 0) xhr.timeout = timeout;
- if (callback == null && typeof data === "function") callback = data, data = null;
- if (callback != null && callback.length === 1) callback = fixCallback(callback);
- if (callback != null) request.on("error", callback).on("load", function(xhr) { callback(null, xhr); });
- event.call("beforesend", request, xhr);
- xhr.send(data == null ? null : data);
- return request;
- },
-
- abort: function() {
- xhr.abort();
- return request;
- },
-
- on: function() {
- var value = event.on.apply(event, arguments);
- return value === event ? request : value;
- }
- };
-
- if (callback != null) {
- if (typeof callback !== "function") throw new Error("invalid callback: " + callback);
- return request.get(callback);
- }
-
- return request;
-}
-
-function fixCallback(callback) {
- return function(error, xhr) {
- callback(error == null ? xhr : null);
- };
-}
-
-function hasResponse(xhr) {
- var type = xhr.responseType;
- return type && type !== "text"
- ? xhr.response // null on error
- : xhr.responseText; // "" on error
-}
-
-function type$1(defaultMimeType, response) {
- return function(url, callback) {
- var r = request(url).mimeType(defaultMimeType).response(response);
- if (callback != null) {
- if (typeof callback !== "function") throw new Error("invalid callback: " + callback);
- return r.get(callback);
- }
- return r;
- };
-}
-
-var html = type$1("text/html", function(xhr) {
- return document.createRange().createContextualFragment(xhr.responseText);
-});
-
-var json = type$1("application/json", function(xhr) {
- return JSON.parse(xhr.responseText);
-});
-
-var text = type$1("text/plain", function(xhr) {
- return xhr.responseText;
-});
-
-var xml = type$1("application/xml", function(xhr) {
- var xml = xhr.responseXML;
- if (!xml) throw new Error("parse error");
- return xml;
-});
-
-function dsv$1(defaultMimeType, parse) {
- return function(url, row, callback) {
- if (arguments.length < 3) callback = row, row = null;
- var r = request(url).mimeType(defaultMimeType);
- r.row = function(_) { return arguments.length ? r.response(responseOf(parse, row = _)) : row; };
- r.row(row);
- return callback ? r.get(callback) : r;
- };
-}
-
-function responseOf(parse, row) {
- return function(request$$1) {
- return parse(request$$1.responseText, row);
- };
-}
-
-var csv$1 = dsv$1("text/csv", csvParse);
-
-var tsv$1 = dsv$1("text/tab-separated-values", tsvParse);
-
-var array$2 = Array.prototype;
-
-var map$3 = array$2.map;
-var slice$5 = array$2.slice;
-
-var implicit = {name: "implicit"};
-
-function ordinal(range) {
- var index = map$1(),
- domain = [],
- unknown = implicit;
-
- range = range == null ? [] : slice$5.call(range);
-
- function scale(d) {
- var key = d + "", i = index.get(key);
- if (!i) {
- if (unknown !== implicit) return unknown;
- index.set(key, i = domain.push(d));
- }
- return range[(i - 1) % range.length];
- }
-
- scale.domain = function(_) {
- if (!arguments.length) return domain.slice();
- domain = [], index = map$1();
- var i = -1, n = _.length, d, key;
- while (++i < n) if (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d));
- return scale;
- };
-
- scale.range = function(_) {
- return arguments.length ? (range = slice$5.call(_), scale) : range.slice();
- };
-
- scale.unknown = function(_) {
- return arguments.length ? (unknown = _, scale) : unknown;
- };
-
- scale.copy = function() {
- return ordinal()
- .domain(domain)
- .range(range)
- .unknown(unknown);
- };
-
- return scale;
-}
-
-function band() {
- var scale = ordinal().unknown(undefined),
- domain = scale.domain,
- ordinalRange = scale.range,
- range$$1 = [0, 1],
- step,
- bandwidth,
- round = false,
- paddingInner = 0,
- paddingOuter = 0,
- align = 0.5;
-
- delete scale.unknown;
-
- function rescale() {
- var n = domain().length,
- reverse = range$$1[1] < range$$1[0],
- start = range$$1[reverse - 0],
- stop = range$$1[1 - reverse];
- step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);
- if (round) step = Math.floor(step);
- start += (stop - start - step * (n - paddingInner)) * align;
- bandwidth = step * (1 - paddingInner);
- if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);
- var values = sequence(n).map(function(i) { return start + step * i; });
- return ordinalRange(reverse ? values.reverse() : values);
- }
-
- scale.domain = function(_) {
- return arguments.length ? (domain(_), rescale()) : domain();
- };
-
- scale.range = function(_) {
- return arguments.length ? (range$$1 = [+_[0], +_[1]], rescale()) : range$$1.slice();
- };
-
- scale.rangeRound = function(_) {
- return range$$1 = [+_[0], +_[1]], round = true, rescale();
- };
-
- scale.bandwidth = function() {
- return bandwidth;
- };
-
- scale.step = function() {
- return step;
- };
-
- scale.round = function(_) {
- return arguments.length ? (round = !!_, rescale()) : round;
- };
-
- scale.padding = function(_) {
- return arguments.length ? (paddingInner = paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
- };
-
- scale.paddingInner = function(_) {
- return arguments.length ? (paddingInner = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
- };
-
- scale.paddingOuter = function(_) {
- return arguments.length ? (paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingOuter;
- };
-
- scale.align = function(_) {
- return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;
- };
-
- scale.copy = function() {
- return band()
- .domain(domain())
- .range(range$$1)
- .round(round)
- .paddingInner(paddingInner)
- .paddingOuter(paddingOuter)
- .align(align);
- };
-
- return rescale();
-}
-
-function pointish(scale) {
- var copy = scale.copy;
-
- scale.padding = scale.paddingOuter;
- delete scale.paddingInner;
- delete scale.paddingOuter;
-
- scale.copy = function() {
- return pointish(copy());
- };
-
- return scale;
-}
-
-function point$1() {
- return pointish(band().paddingInner(1));
-}
-
-function constant$9(x) {
- return function() {
- return x;
- };
-}
-
-function number$2(x) {
- return +x;
-}
-
-var unit = [0, 1];
-
-function deinterpolateLinear(a, b) {
- return (b -= (a = +a))
- ? function(x) { return (x - a) / b; }
- : constant$9(b);
-}
-
-function deinterpolateClamp(deinterpolate) {
- return function(a, b) {
- var d = deinterpolate(a = +a, b = +b);
- return function(x) { return x <= a ? 0 : x >= b ? 1 : d(x); };
- };
-}
-
-function reinterpolateClamp(reinterpolate) {
- return function(a, b) {
- var r = reinterpolate(a = +a, b = +b);
- return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); };
- };
-}
-
-function bimap(domain, range, deinterpolate, reinterpolate) {
- var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
- if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);
- else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);
- return function(x) { return r0(d0(x)); };
-}
-
-function polymap(domain, range, deinterpolate, reinterpolate) {
- var j = Math.min(domain.length, range.length) - 1,
- d = new Array(j),
- r = new Array(j),
- i = -1;
-
- // Reverse descending domains.
- if (domain[j] < domain[0]) {
- domain = domain.slice().reverse();
- range = range.slice().reverse();
- }
-
- while (++i < j) {
- d[i] = deinterpolate(domain[i], domain[i + 1]);
- r[i] = reinterpolate(range[i], range[i + 1]);
- }
-
- return function(x) {
- var i = bisectRight(domain, x, 1, j) - 1;
- return r[i](d[i](x));
- };
-}
-
-function copy(source, target) {
- return target
- .domain(source.domain())
- .range(source.range())
- .interpolate(source.interpolate())
- .clamp(source.clamp());
-}
-
-// deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
-// reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].
-function continuous(deinterpolate, reinterpolate) {
- var domain = unit,
- range = unit,
- interpolate$$1 = interpolateValue,
- clamp = false,
- piecewise,
- output,
- input;
-
- function rescale() {
- piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;
- output = input = null;
- return scale;
- }
-
- function scale(x) {
- return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);
- }
-
- scale.invert = function(y) {
- return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);
- };
-
- scale.domain = function(_) {
- return arguments.length ? (domain = map$3.call(_, number$2), rescale()) : domain.slice();
- };
-
- scale.range = function(_) {
- return arguments.length ? (range = slice$5.call(_), rescale()) : range.slice();
- };
-
- scale.rangeRound = function(_) {
- return range = slice$5.call(_), interpolate$$1 = interpolateRound, rescale();
- };
-
- scale.clamp = function(_) {
- return arguments.length ? (clamp = !!_, rescale()) : clamp;
- };
-
- scale.interpolate = function(_) {
- return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;
- };
-
- return rescale();
-}
-
-function tickFormat(domain, count, specifier) {
- var start = domain[0],
- stop = domain[domain.length - 1],
- step = tickStep(start, stop, count == null ? 10 : count),
- precision;
- specifier = formatSpecifier(specifier == null ? ",f" : specifier);
- switch (specifier.type) {
- case "s": {
- var value = Math.max(Math.abs(start), Math.abs(stop));
- if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;
- return exports.formatPrefix(specifier, value);
- }
- case "":
- case "e":
- case "g":
- case "p":
- case "r": {
- if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
- break;
- }
- case "f":
- case "%": {
- if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
- break;
- }
- }
- return exports.format(specifier);
-}
-
-function linearish(scale) {
- var domain = scale.domain;
-
- scale.ticks = function(count) {
- var d = domain();
- return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
- };
-
- scale.tickFormat = function(count, specifier) {
- return tickFormat(domain(), count, specifier);
- };
-
- scale.nice = function(count) {
- if (count == null) count = 10;
-
- var d = domain(),
- i0 = 0,
- i1 = d.length - 1,
- start = d[i0],
- stop = d[i1],
- step;
-
- if (stop < start) {
- step = start, start = stop, stop = step;
- step = i0, i0 = i1, i1 = step;
- }
-
- step = tickIncrement(start, stop, count);
-
- if (step > 0) {
- start = Math.floor(start / step) * step;
- stop = Math.ceil(stop / step) * step;
- step = tickIncrement(start, stop, count);
- } else if (step < 0) {
- start = Math.ceil(start * step) / step;
- stop = Math.floor(stop * step) / step;
- step = tickIncrement(start, stop, count);
- }
-
- if (step > 0) {
- d[i0] = Math.floor(start / step) * step;
- d[i1] = Math.ceil(stop / step) * step;
- domain(d);
- } else if (step < 0) {
- d[i0] = Math.ceil(start * step) / step;
- d[i1] = Math.floor(stop * step) / step;
- domain(d);
- }
-
- return scale;
- };
-
- return scale;
-}
-
-function linear$2() {
- var scale = continuous(deinterpolateLinear, reinterpolate);
-
- scale.copy = function() {
- return copy(scale, linear$2());
- };
-
- return linearish(scale);
-}
-
-function identity$6() {
- var domain = [0, 1];
-
- function scale(x) {
- return +x;
- }
-
- scale.invert = scale;
-
- scale.domain = scale.range = function(_) {
- return arguments.length ? (domain = map$3.call(_, number$2), scale) : domain.slice();
- };
-
- scale.copy = function() {
- return identity$6().domain(domain);
- };
-
- return linearish(scale);
-}
-
-function nice(domain, interval) {
- domain = domain.slice();
-
- var i0 = 0,
- i1 = domain.length - 1,
- x0 = domain[i0],
- x1 = domain[i1],
- t;
-
- if (x1 < x0) {
- t = i0, i0 = i1, i1 = t;
- t = x0, x0 = x1, x1 = t;
- }
-
- domain[i0] = interval.floor(x0);
- domain[i1] = interval.ceil(x1);
- return domain;
-}
-
-function deinterpolate(a, b) {
- return (b = Math.log(b / a))
- ? function(x) { return Math.log(x / a) / b; }
- : constant$9(b);
-}
-
-function reinterpolate$1(a, b) {
- return a < 0
- ? function(t) { return -Math.pow(-b, t) * Math.pow(-a, 1 - t); }
- : function(t) { return Math.pow(b, t) * Math.pow(a, 1 - t); };
-}
-
-function pow10(x) {
- return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x;
-}
-
-function powp(base) {
- return base === 10 ? pow10
- : base === Math.E ? Math.exp
- : function(x) { return Math.pow(base, x); };
-}
-
-function logp(base) {
- return base === Math.E ? Math.log
- : base === 10 && Math.log10
- || base === 2 && Math.log2
- || (base = Math.log(base), function(x) { return Math.log(x) / base; });
-}
-
-function reflect(f) {
- return function(x) {
- return -f(-x);
- };
-}
-
-function log$1() {
- var scale = continuous(deinterpolate, reinterpolate$1).domain([1, 10]),
- domain = scale.domain,
- base = 10,
- logs = logp(10),
- pows = powp(10);
-
- function rescale() {
- logs = logp(base), pows = powp(base);
- if (domain()[0] < 0) logs = reflect(logs), pows = reflect(pows);
- return scale;
- }
-
- scale.base = function(_) {
- return arguments.length ? (base = +_, rescale()) : base;
- };
-
- scale.domain = function(_) {
- return arguments.length ? (domain(_), rescale()) : domain();
- };
-
- scale.ticks = function(count) {
- var d = domain(),
- u = d[0],
- v = d[d.length - 1],
- r;
-
- if (r = v < u) i = u, u = v, v = i;
-
- var i = logs(u),
- j = logs(v),
- p,
- k,
- t,
- n = count == null ? 10 : +count,
- z = [];
-
- if (!(base % 1) && j - i < n) {
- i = Math.round(i) - 1, j = Math.round(j) + 1;
- if (u > 0) for (; i < j; ++i) {
- for (k = 1, p = pows(i); k < base; ++k) {
- t = p * k;
- if (t < u) continue;
- if (t > v) break;
- z.push(t);
- }
- } else for (; i < j; ++i) {
- for (k = base - 1, p = pows(i); k >= 1; --k) {
- t = p * k;
- if (t < u) continue;
- if (t > v) break;
- z.push(t);
- }
- }
- } else {
- z = ticks(i, j, Math.min(j - i, n)).map(pows);
- }
-
- return r ? z.reverse() : z;
- };
-
- scale.tickFormat = function(count, specifier) {
- if (specifier == null) specifier = base === 10 ? ".0e" : ",";
- if (typeof specifier !== "function") specifier = exports.format(specifier);
- if (count === Infinity) return specifier;
- if (count == null) count = 10;
- var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?
- return function(d) {
- var i = d / pows(Math.round(logs(d)));
- if (i * base < base - 0.5) i *= base;
- return i <= k ? specifier(d) : "";
- };
- };
-
- scale.nice = function() {
- return domain(nice(domain(), {
- floor: function(x) { return pows(Math.floor(logs(x))); },
- ceil: function(x) { return pows(Math.ceil(logs(x))); }
- }));
- };
-
- scale.copy = function() {
- return copy(scale, log$1().base(base));
- };
-
- return scale;
-}
-
-function raise$1(x, exponent) {
- return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);
-}
-
-function pow$1() {
- var exponent = 1,
- scale = continuous(deinterpolate, reinterpolate),
- domain = scale.domain;
-
- function deinterpolate(a, b) {
- return (b = raise$1(b, exponent) - (a = raise$1(a, exponent)))
- ? function(x) { return (raise$1(x, exponent) - a) / b; }
- : constant$9(b);
- }
-
- function reinterpolate(a, b) {
- b = raise$1(b, exponent) - (a = raise$1(a, exponent));
- return function(t) { return raise$1(a + b * t, 1 / exponent); };
- }
-
- scale.exponent = function(_) {
- return arguments.length ? (exponent = +_, domain(domain())) : exponent;
- };
-
- scale.copy = function() {
- return copy(scale, pow$1().exponent(exponent));
- };
-
- return linearish(scale);
-}
-
-function sqrt$1() {
- return pow$1().exponent(0.5);
-}
-
-function quantile$$1() {
- var domain = [],
- range = [],
- thresholds = [];
-
- function rescale() {
- var i = 0, n = Math.max(1, range.length);
- thresholds = new Array(n - 1);
- while (++i < n) thresholds[i - 1] = threshold(domain, i / n);
- return scale;
- }
-
- function scale(x) {
- if (!isNaN(x = +x)) return range[bisectRight(thresholds, x)];
- }
-
- scale.invertExtent = function(y) {
- var i = range.indexOf(y);
- return i < 0 ? [NaN, NaN] : [
- i > 0 ? thresholds[i - 1] : domain[0],
- i < thresholds.length ? thresholds[i] : domain[domain.length - 1]
- ];
- };
-
- scale.domain = function(_) {
- if (!arguments.length) return domain.slice();
- domain = [];
- for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);
- domain.sort(ascending);
- return rescale();
- };
-
- scale.range = function(_) {
- return arguments.length ? (range = slice$5.call(_), rescale()) : range.slice();
- };
-
- scale.quantiles = function() {
- return thresholds.slice();
- };
-
- scale.copy = function() {
- return quantile$$1()
- .domain(domain)
- .range(range);
- };
-
- return scale;
-}
-
-function quantize$1() {
- var x0 = 0,
- x1 = 1,
- n = 1,
- domain = [0.5],
- range = [0, 1];
-
- function scale(x) {
- if (x <= x) return range[bisectRight(domain, x, 0, n)];
- }
-
- function rescale() {
- var i = -1;
- domain = new Array(n);
- while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);
- return scale;
- }
-
- scale.domain = function(_) {
- return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];
- };
-
- scale.range = function(_) {
- return arguments.length ? (n = (range = slice$5.call(_)).length - 1, rescale()) : range.slice();
- };
-
- scale.invertExtent = function(y) {
- var i = range.indexOf(y);
- return i < 0 ? [NaN, NaN]
- : i < 1 ? [x0, domain[0]]
- : i >= n ? [domain[n - 1], x1]
- : [domain[i - 1], domain[i]];
- };
-
- scale.copy = function() {
- return quantize$1()
- .domain([x0, x1])
- .range(range);
- };
-
- return linearish(scale);
-}
-
-function threshold$1() {
- var domain = [0.5],
- range = [0, 1],
- n = 1;
-
- function scale(x) {
- if (x <= x) return range[bisectRight(domain, x, 0, n)];
- }
-
- scale.domain = function(_) {
- return arguments.length ? (domain = slice$5.call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();
- };
-
- scale.range = function(_) {
- return arguments.length ? (range = slice$5.call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();
- };
-
- scale.invertExtent = function(y) {
- var i = range.indexOf(y);
- return [domain[i - 1], domain[i]];
- };
-
- scale.copy = function() {
- return threshold$1()
- .domain(domain)
- .range(range);
- };
-
- return scale;
-}
-
-var t0$1 = new Date;
-var t1$1 = new Date;
-
-function newInterval(floori, offseti, count, field) {
-
- function interval(date) {
- return floori(date = new Date(+date)), date;
- }
-
- interval.floor = interval;
-
- interval.ceil = function(date) {
- return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
- };
-
- interval.round = function(date) {
- var d0 = interval(date),
- d1 = interval.ceil(date);
- return date - d0 < d1 - date ? d0 : d1;
- };
-
- interval.offset = function(date, step) {
- return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;
- };
-
- interval.range = function(start, stop, step) {
- var range = [], previous;
- start = interval.ceil(start);
- step = step == null ? 1 : Math.floor(step);
- if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date
- do range.push(previous = new Date(+start)), offseti(start, step), floori(start);
- while (previous < start && start < stop);
- return range;
- };
-
- interval.filter = function(test) {
- return newInterval(function(date) {
- if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);
- }, function(date, step) {
- if (date >= date) {
- if (step < 0) while (++step <= 0) {
- while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty
- } else while (--step >= 0) {
- while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty
- }
- }
- });
- };
-
- if (count) {
- interval.count = function(start, end) {
- t0$1.setTime(+start), t1$1.setTime(+end);
- floori(t0$1), floori(t1$1);
- return Math.floor(count(t0$1, t1$1));
- };
-
- interval.every = function(step) {
- step = Math.floor(step);
- return !isFinite(step) || !(step > 0) ? null
- : !(step > 1) ? interval
- : interval.filter(field
- ? function(d) { return field(d) % step === 0; }
- : function(d) { return interval.count(0, d) % step === 0; });
- };
- }
-
- return interval;
-}
-
-var millisecond = newInterval(function() {
- // noop
-}, function(date, step) {
- date.setTime(+date + step);
-}, function(start, end) {
- return end - start;
-});
-
-// An optimized implementation for this simple case.
-millisecond.every = function(k) {
- k = Math.floor(k);
- if (!isFinite(k) || !(k > 0)) return null;
- if (!(k > 1)) return millisecond;
- return newInterval(function(date) {
- date.setTime(Math.floor(date / k) * k);
- }, function(date, step) {
- date.setTime(+date + step * k);
- }, function(start, end) {
- return (end - start) / k;
- });
-};
-
-var milliseconds = millisecond.range;
-
-var durationSecond$1 = 1e3;
-var durationMinute$1 = 6e4;
-var durationHour$1 = 36e5;
-var durationDay$1 = 864e5;
-var durationWeek$1 = 6048e5;
-
-var second = newInterval(function(date) {
- date.setTime(Math.floor(date / durationSecond$1) * durationSecond$1);
-}, function(date, step) {
- date.setTime(+date + step * durationSecond$1);
-}, function(start, end) {
- return (end - start) / durationSecond$1;
-}, function(date) {
- return date.getUTCSeconds();
-});
-
-var seconds = second.range;
-
-var minute = newInterval(function(date) {
- date.setTime(Math.floor(date / durationMinute$1) * durationMinute$1);
-}, function(date, step) {
- date.setTime(+date + step * durationMinute$1);
-}, function(start, end) {
- return (end - start) / durationMinute$1;
-}, function(date) {
- return date.getMinutes();
-});
-
-var minutes = minute.range;
-
-var hour = newInterval(function(date) {
- var offset = date.getTimezoneOffset() * durationMinute$1 % durationHour$1;
- if (offset < 0) offset += durationHour$1;
- date.setTime(Math.floor((+date - offset) / durationHour$1) * durationHour$1 + offset);
-}, function(date, step) {
- date.setTime(+date + step * durationHour$1);
-}, function(start, end) {
- return (end - start) / durationHour$1;
-}, function(date) {
- return date.getHours();
-});
-
-var hours = hour.range;
-
-var day = newInterval(function(date) {
- date.setHours(0, 0, 0, 0);
-}, function(date, step) {
- date.setDate(date.getDate() + step);
-}, function(start, end) {
- return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute$1) / durationDay$1;
-}, function(date) {
- return date.getDate() - 1;
-});
-
-var days = day.range;
-
-function weekday(i) {
- return newInterval(function(date) {
- date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);
- date.setHours(0, 0, 0, 0);
- }, function(date, step) {
- date.setDate(date.getDate() + step * 7);
- }, function(start, end) {
- return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute$1) / durationWeek$1;
- });
-}
-
-var sunday = weekday(0);
-var monday = weekday(1);
-var tuesday = weekday(2);
-var wednesday = weekday(3);
-var thursday = weekday(4);
-var friday = weekday(5);
-var saturday = weekday(6);
-
-var sundays = sunday.range;
-var mondays = monday.range;
-var tuesdays = tuesday.range;
-var wednesdays = wednesday.range;
-var thursdays = thursday.range;
-var fridays = friday.range;
-var saturdays = saturday.range;
-
-var month = newInterval(function(date) {
- date.setDate(1);
- date.setHours(0, 0, 0, 0);
-}, function(date, step) {
- date.setMonth(date.getMonth() + step);
-}, function(start, end) {
- return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;
-}, function(date) {
- return date.getMonth();
-});
-
-var months = month.range;
-
-var year = newInterval(function(date) {
- date.setMonth(0, 1);
- date.setHours(0, 0, 0, 0);
-}, function(date, step) {
- date.setFullYear(date.getFullYear() + step);
-}, function(start, end) {
- return end.getFullYear() - start.getFullYear();
-}, function(date) {
- return date.getFullYear();
-});
-
-// An optimized implementation for this simple case.
-year.every = function(k) {
- return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {
- date.setFullYear(Math.floor(date.getFullYear() / k) * k);
- date.setMonth(0, 1);
- date.setHours(0, 0, 0, 0);
- }, function(date, step) {
- date.setFullYear(date.getFullYear() + step * k);
- });
-};
-
-var years = year.range;
-
-var utcMinute = newInterval(function(date) {
- date.setUTCSeconds(0, 0);
-}, function(date, step) {
- date.setTime(+date + step * durationMinute$1);
-}, function(start, end) {
- return (end - start) / durationMinute$1;
-}, function(date) {
- return date.getUTCMinutes();
-});
-
-var utcMinutes = utcMinute.range;
-
-var utcHour = newInterval(function(date) {
- date.setUTCMinutes(0, 0, 0);
-}, function(date, step) {
- date.setTime(+date + step * durationHour$1);
-}, function(start, end) {
- return (end - start) / durationHour$1;
-}, function(date) {
- return date.getUTCHours();
-});
-
-var utcHours = utcHour.range;
-
-var utcDay = newInterval(function(date) {
- date.setUTCHours(0, 0, 0, 0);
-}, function(date, step) {
- date.setUTCDate(date.getUTCDate() + step);
-}, function(start, end) {
- return (end - start) / durationDay$1;
-}, function(date) {
- return date.getUTCDate() - 1;
-});
-
-var utcDays = utcDay.range;
-
-function utcWeekday(i) {
- return newInterval(function(date) {
- date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);
- date.setUTCHours(0, 0, 0, 0);
- }, function(date, step) {
- date.setUTCDate(date.getUTCDate() + step * 7);
- }, function(start, end) {
- return (end - start) / durationWeek$1;
- });
-}
-
-var utcSunday = utcWeekday(0);
-var utcMonday = utcWeekday(1);
-var utcTuesday = utcWeekday(2);
-var utcWednesday = utcWeekday(3);
-var utcThursday = utcWeekday(4);
-var utcFriday = utcWeekday(5);
-var utcSaturday = utcWeekday(6);
-
-var utcSundays = utcSunday.range;
-var utcMondays = utcMonday.range;
-var utcTuesdays = utcTuesday.range;
-var utcWednesdays = utcWednesday.range;
-var utcThursdays = utcThursday.range;
-var utcFridays = utcFriday.range;
-var utcSaturdays = utcSaturday.range;
-
-var utcMonth = newInterval(function(date) {
- date.setUTCDate(1);
- date.setUTCHours(0, 0, 0, 0);
-}, function(date, step) {
- date.setUTCMonth(date.getUTCMonth() + step);
-}, function(start, end) {
- return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;
-}, function(date) {
- return date.getUTCMonth();
-});
-
-var utcMonths = utcMonth.range;
-
-var utcYear = newInterval(function(date) {
- date.setUTCMonth(0, 1);
- date.setUTCHours(0, 0, 0, 0);
-}, function(date, step) {
- date.setUTCFullYear(date.getUTCFullYear() + step);
-}, function(start, end) {
- return end.getUTCFullYear() - start.getUTCFullYear();
-}, function(date) {
- return date.getUTCFullYear();
-});
-
-// An optimized implementation for this simple case.
-utcYear.every = function(k) {
- return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {
- date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);
- date.setUTCMonth(0, 1);
- date.setUTCHours(0, 0, 0, 0);
- }, function(date, step) {
- date.setUTCFullYear(date.getUTCFullYear() + step * k);
- });
-};
-
-var utcYears = utcYear.range;
-
-function localDate(d) {
- if (0 <= d.y && d.y < 100) {
- var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
- date.setFullYear(d.y);
- return date;
- }
- return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
-}
-
-function utcDate(d) {
- if (0 <= d.y && d.y < 100) {
- var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
- date.setUTCFullYear(d.y);
- return date;
- }
- return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
-}
-
-function newYear(y) {
- return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0};
-}
-
-function formatLocale$1(locale) {
- var locale_dateTime = locale.dateTime,
- locale_date = locale.date,
- locale_time = locale.time,
- locale_periods = locale.periods,
- locale_weekdays = locale.days,
- locale_shortWeekdays = locale.shortDays,
- locale_months = locale.months,
- locale_shortMonths = locale.shortMonths;
-
- var periodRe = formatRe(locale_periods),
- periodLookup = formatLookup(locale_periods),
- weekdayRe = formatRe(locale_weekdays),
- weekdayLookup = formatLookup(locale_weekdays),
- shortWeekdayRe = formatRe(locale_shortWeekdays),
- shortWeekdayLookup = formatLookup(locale_shortWeekdays),
- monthRe = formatRe(locale_months),
- monthLookup = formatLookup(locale_months),
- shortMonthRe = formatRe(locale_shortMonths),
- shortMonthLookup = formatLookup(locale_shortMonths);
-
- var formats = {
- "a": formatShortWeekday,
- "A": formatWeekday,
- "b": formatShortMonth,
- "B": formatMonth,
- "c": null,
- "d": formatDayOfMonth,
- "e": formatDayOfMonth,
- "f": formatMicroseconds,
- "H": formatHour24,
- "I": formatHour12,
- "j": formatDayOfYear,
- "L": formatMilliseconds,
- "m": formatMonthNumber,
- "M": formatMinutes,
- "p": formatPeriod,
- "Q": formatUnixTimestamp,
- "s": formatUnixTimestampSeconds,
- "S": formatSeconds,
- "u": formatWeekdayNumberMonday,
- "U": formatWeekNumberSunday,
- "V": formatWeekNumberISO,
- "w": formatWeekdayNumberSunday,
- "W": formatWeekNumberMonday,
- "x": null,
- "X": null,
- "y": formatYear,
- "Y": formatFullYear,
- "Z": formatZone,
- "%": formatLiteralPercent
- };
-
- var utcFormats = {
- "a": formatUTCShortWeekday,
- "A": formatUTCWeekday,
- "b": formatUTCShortMonth,
- "B": formatUTCMonth,
- "c": null,
- "d": formatUTCDayOfMonth,
- "e": formatUTCDayOfMonth,
- "f": formatUTCMicroseconds,
- "H": formatUTCHour24,
- "I": formatUTCHour12,
- "j": formatUTCDayOfYear,
- "L": formatUTCMilliseconds,
- "m": formatUTCMonthNumber,
- "M": formatUTCMinutes,
- "p": formatUTCPeriod,
- "Q": formatUnixTimestamp,
- "s": formatUnixTimestampSeconds,
- "S": formatUTCSeconds,
- "u": formatUTCWeekdayNumberMonday,
- "U": formatUTCWeekNumberSunday,
- "V": formatUTCWeekNumberISO,
- "w": formatUTCWeekdayNumberSunday,
- "W": formatUTCWeekNumberMonday,
- "x": null,
- "X": null,
- "y": formatUTCYear,
- "Y": formatUTCFullYear,
- "Z": formatUTCZone,
- "%": formatLiteralPercent
- };
-
- var parses = {
- "a": parseShortWeekday,
- "A": parseWeekday,
- "b": parseShortMonth,
- "B": parseMonth,
- "c": parseLocaleDateTime,
- "d": parseDayOfMonth,
- "e": parseDayOfMonth,
- "f": parseMicroseconds,
- "H": parseHour24,
- "I": parseHour24,
- "j": parseDayOfYear,
- "L": parseMilliseconds,
- "m": parseMonthNumber,
- "M": parseMinutes,
- "p": parsePeriod,
- "Q": parseUnixTimestamp,
- "s": parseUnixTimestampSeconds,
- "S": parseSeconds,
- "u": parseWeekdayNumberMonday,
- "U": parseWeekNumberSunday,
- "V": parseWeekNumberISO,
- "w": parseWeekdayNumberSunday,
- "W": parseWeekNumberMonday,
- "x": parseLocaleDate,
- "X": parseLocaleTime,
- "y": parseYear,
- "Y": parseFullYear,
- "Z": parseZone,
- "%": parseLiteralPercent
- };
-
- // These recursive directive definitions must be deferred.
- formats.x = newFormat(locale_date, formats);
- formats.X = newFormat(locale_time, formats);
- formats.c = newFormat(locale_dateTime, formats);
- utcFormats.x = newFormat(locale_date, utcFormats);
- utcFormats.X = newFormat(locale_time, utcFormats);
- utcFormats.c = newFormat(locale_dateTime, utcFormats);
-
- function newFormat(specifier, formats) {
- return function(date) {
- var string = [],
- i = -1,
- j = 0,
- n = specifier.length,
- c,
- pad,
- format;
-
- if (!(date instanceof Date)) date = new Date(+date);
-
- while (++i < n) {
- if (specifier.charCodeAt(i) === 37) {
- string.push(specifier.slice(j, i));
- if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
- else pad = c === "e" ? " " : "0";
- if (format = formats[c]) c = format(date, pad);
- string.push(c);
- j = i + 1;
- }
- }
-
- string.push(specifier.slice(j, i));
- return string.join("");
- };
- }
-
- function newParse(specifier, newDate) {
- return function(string) {
- var d = newYear(1900),
- i = parseSpecifier(d, specifier, string += "", 0),
- week, day$$1;
- if (i != string.length) return null;
-
- // If a UNIX timestamp is specified, return it.
- if ("Q" in d) return new Date(d.Q);
-
- // The am-pm flag is 0 for AM, and 1 for PM.
- if ("p" in d) d.H = d.H % 12 + d.p * 12;
-
- // Convert day-of-week and week-of-year to day-of-year.
- if ("V" in d) {
- if (d.V < 1 || d.V > 53) return null;
- if (!("w" in d)) d.w = 1;
- if ("Z" in d) {
- week = utcDate(newYear(d.y)), day$$1 = week.getUTCDay();
- week = day$$1 > 4 || day$$1 === 0 ? utcMonday.ceil(week) : utcMonday(week);
- week = utcDay.offset(week, (d.V - 1) * 7);
- d.y = week.getUTCFullYear();
- d.m = week.getUTCMonth();
- d.d = week.getUTCDate() + (d.w + 6) % 7;
- } else {
- week = newDate(newYear(d.y)), day$$1 = week.getDay();
- week = day$$1 > 4 || day$$1 === 0 ? monday.ceil(week) : monday(week);
- week = day.offset(week, (d.V - 1) * 7);
- d.y = week.getFullYear();
- d.m = week.getMonth();
- d.d = week.getDate() + (d.w + 6) % 7;
- }
- } else if ("W" in d || "U" in d) {
- if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
- day$$1 = "Z" in d ? utcDate(newYear(d.y)).getUTCDay() : newDate(newYear(d.y)).getDay();
- d.m = 0;
- d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day$$1 + 5) % 7 : d.w + d.U * 7 - (day$$1 + 6) % 7;
- }
-
- // If a time zone is specified, all fields are interpreted as UTC and then
- // offset according to the specified time zone.
- if ("Z" in d) {
- d.H += d.Z / 100 | 0;
- d.M += d.Z % 100;
- return utcDate(d);
- }
-
- // Otherwise, all fields are in local time.
- return newDate(d);
- };
- }
-
- function parseSpecifier(d, specifier, string, j) {
- var i = 0,
- n = specifier.length,
- m = string.length,
- c,
- parse;
-
- while (i < n) {
- if (j >= m) return -1;
- c = specifier.charCodeAt(i++);
- if (c === 37) {
- c = specifier.charAt(i++);
- parse = parses[c in pads ? specifier.charAt(i++) : c];
- if (!parse || ((j = parse(d, string, j)) < 0)) return -1;
- } else if (c != string.charCodeAt(j++)) {
- return -1;
- }
- }
-
- return j;
- }
-
- function parsePeriod(d, string, i) {
- var n = periodRe.exec(string.slice(i));
- return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;
- }
-
- function parseShortWeekday(d, string, i) {
- var n = shortWeekdayRe.exec(string.slice(i));
- return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
- }
-
- function parseWeekday(d, string, i) {
- var n = weekdayRe.exec(string.slice(i));
- return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
- }
-
- function parseShortMonth(d, string, i) {
- var n = shortMonthRe.exec(string.slice(i));
- return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
- }
-
- function parseMonth(d, string, i) {
- var n = monthRe.exec(string.slice(i));
- return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
- }
-
- function parseLocaleDateTime(d, string, i) {
- return parseSpecifier(d, locale_dateTime, string, i);
- }
-
- function parseLocaleDate(d, string, i) {
- return parseSpecifier(d, locale_date, string, i);
- }
-
- function parseLocaleTime(d, string, i) {
- return parseSpecifier(d, locale_time, string, i);
- }
-
- function formatShortWeekday(d) {
- return locale_shortWeekdays[d.getDay()];
- }
-
- function formatWeekday(d) {
- return locale_weekdays[d.getDay()];
- }
-
- function formatShortMonth(d) {
- return locale_shortMonths[d.getMonth()];
- }
-
- function formatMonth(d) {
- return locale_months[d.getMonth()];
- }
-
- function formatPeriod(d) {
- return locale_periods[+(d.getHours() >= 12)];
- }
-
- function formatUTCShortWeekday(d) {
- return locale_shortWeekdays[d.getUTCDay()];
- }
-
- function formatUTCWeekday(d) {
- return locale_weekdays[d.getUTCDay()];
- }
-
- function formatUTCShortMonth(d) {
- return locale_shortMonths[d.getUTCMonth()];
- }
-
- function formatUTCMonth(d) {
- return locale_months[d.getUTCMonth()];
- }
-
- function formatUTCPeriod(d) {
- return locale_periods[+(d.getUTCHours() >= 12)];
- }
-
- return {
- format: function(specifier) {
- var f = newFormat(specifier += "", formats);
- f.toString = function() { return specifier; };
- return f;
- },
- parse: function(specifier) {
- var p = newParse(specifier += "", localDate);
- p.toString = function() { return specifier; };
- return p;
- },
- utcFormat: function(specifier) {
- var f = newFormat(specifier += "", utcFormats);
- f.toString = function() { return specifier; };
- return f;
- },
- utcParse: function(specifier) {
- var p = newParse(specifier, utcDate);
- p.toString = function() { return specifier; };
- return p;
- }
- };
-}
-
-var pads = {"-": "", "_": " ", "0": "0"};
-var numberRe = /^\s*\d+/;
-var percentRe = /^%/;
-var requoteRe = /[\\^$*+?|[\]().{}]/g;
-
-function pad(value, fill, width) {
- var sign = value < 0 ? "-" : "",
- string = (sign ? -value : value) + "",
- length = string.length;
- return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);
-}
-
-function requote(s) {
- return s.replace(requoteRe, "\\$&");
-}
-
-function formatRe(names) {
- return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
-}
-
-function formatLookup(names) {
- var map = {}, i = -1, n = names.length;
- while (++i < n) map[names[i].toLowerCase()] = i;
- return map;
-}
-
-function parseWeekdayNumberSunday(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 1));
- return n ? (d.w = +n[0], i + n[0].length) : -1;
-}
-
-function parseWeekdayNumberMonday(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 1));
- return n ? (d.u = +n[0], i + n[0].length) : -1;
-}
-
-function parseWeekNumberSunday(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 2));
- return n ? (d.U = +n[0], i + n[0].length) : -1;
-}
-
-function parseWeekNumberISO(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 2));
- return n ? (d.V = +n[0], i + n[0].length) : -1;
-}
-
-function parseWeekNumberMonday(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 2));
- return n ? (d.W = +n[0], i + n[0].length) : -1;
-}
-
-function parseFullYear(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 4));
- return n ? (d.y = +n[0], i + n[0].length) : -1;
-}
-
-function parseYear(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 2));
- return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;
-}
-
-function parseZone(d, string, i) {
- var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
- return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
-}
-
-function parseMonthNumber(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 2));
- return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
-}
-
-function parseDayOfMonth(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 2));
- return n ? (d.d = +n[0], i + n[0].length) : -1;
-}
-
-function parseDayOfYear(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 3));
- return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
-}
-
-function parseHour24(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 2));
- return n ? (d.H = +n[0], i + n[0].length) : -1;
-}
-
-function parseMinutes(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 2));
- return n ? (d.M = +n[0], i + n[0].length) : -1;
-}
-
-function parseSeconds(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 2));
- return n ? (d.S = +n[0], i + n[0].length) : -1;
-}
-
-function parseMilliseconds(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 3));
- return n ? (d.L = +n[0], i + n[0].length) : -1;
-}
-
-function parseMicroseconds(d, string, i) {
- var n = numberRe.exec(string.slice(i, i + 6));
- return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;
-}
-
-function parseLiteralPercent(d, string, i) {
- var n = percentRe.exec(string.slice(i, i + 1));
- return n ? i + n[0].length : -1;
-}
-
-function parseUnixTimestamp(d, string, i) {
- var n = numberRe.exec(string.slice(i));
- return n ? (d.Q = +n[0], i + n[0].length) : -1;
-}
-
-function parseUnixTimestampSeconds(d, string, i) {
- var n = numberRe.exec(string.slice(i));
- return n ? (d.Q = (+n[0]) * 1000, i + n[0].length) : -1;
-}
-
-function formatDayOfMonth(d, p) {
- return pad(d.getDate(), p, 2);
-}
-
-function formatHour24(d, p) {
- return pad(d.getHours(), p, 2);
-}
-
-function formatHour12(d, p) {
- return pad(d.getHours() % 12 || 12, p, 2);
-}
-
-function formatDayOfYear(d, p) {
- return pad(1 + day.count(year(d), d), p, 3);
-}
-
-function formatMilliseconds(d, p) {
- return pad(d.getMilliseconds(), p, 3);
-}
-
-function formatMicroseconds(d, p) {
- return formatMilliseconds(d, p) + "000";
-}
-
-function formatMonthNumber(d, p) {
- return pad(d.getMonth() + 1, p, 2);
-}
-
-function formatMinutes(d, p) {
- return pad(d.getMinutes(), p, 2);
-}
-
-function formatSeconds(d, p) {
- return pad(d.getSeconds(), p, 2);
-}
-
-function formatWeekdayNumberMonday(d) {
- var day$$1 = d.getDay();
- return day$$1 === 0 ? 7 : day$$1;
-}
-
-function formatWeekNumberSunday(d, p) {
- return pad(sunday.count(year(d), d), p, 2);
-}
-
-function formatWeekNumberISO(d, p) {
- var day$$1 = d.getDay();
- d = (day$$1 >= 4 || day$$1 === 0) ? thursday(d) : thursday.ceil(d);
- return pad(thursday.count(year(d), d) + (year(d).getDay() === 4), p, 2);
-}
-
-function formatWeekdayNumberSunday(d) {
- return d.getDay();
-}
-
-function formatWeekNumberMonday(d, p) {
- return pad(monday.count(year(d), d), p, 2);
-}
-
-function formatYear(d, p) {
- return pad(d.getFullYear() % 100, p, 2);
-}
-
-function formatFullYear(d, p) {
- return pad(d.getFullYear() % 10000, p, 4);
-}
-
-function formatZone(d) {
- var z = d.getTimezoneOffset();
- return (z > 0 ? "-" : (z *= -1, "+"))
- + pad(z / 60 | 0, "0", 2)
- + pad(z % 60, "0", 2);
-}
-
-function formatUTCDayOfMonth(d, p) {
- return pad(d.getUTCDate(), p, 2);
-}
-
-function formatUTCHour24(d, p) {
- return pad(d.getUTCHours(), p, 2);
-}
-
-function formatUTCHour12(d, p) {
- return pad(d.getUTCHours() % 12 || 12, p, 2);
-}
-
-function formatUTCDayOfYear(d, p) {
- return pad(1 + utcDay.count(utcYear(d), d), p, 3);
-}
-
-function formatUTCMilliseconds(d, p) {
- return pad(d.getUTCMilliseconds(), p, 3);
-}
-
-function formatUTCMicroseconds(d, p) {
- return formatUTCMilliseconds(d, p) + "000";
-}
-
-function formatUTCMonthNumber(d, p) {
- return pad(d.getUTCMonth() + 1, p, 2);
-}
-
-function formatUTCMinutes(d, p) {
- return pad(d.getUTCMinutes(), p, 2);
-}
-
-function formatUTCSeconds(d, p) {
- return pad(d.getUTCSeconds(), p, 2);
-}
-
-function formatUTCWeekdayNumberMonday(d) {
- var dow = d.getUTCDay();
- return dow === 0 ? 7 : dow;
-}
-
-function formatUTCWeekNumberSunday(d, p) {
- return pad(utcSunday.count(utcYear(d), d), p, 2);
-}
-
-function formatUTCWeekNumberISO(d, p) {
- var day$$1 = d.getUTCDay();
- d = (day$$1 >= 4 || day$$1 === 0) ? utcThursday(d) : utcThursday.ceil(d);
- return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);
-}
-
-function formatUTCWeekdayNumberSunday(d) {
- return d.getUTCDay();
-}
-
-function formatUTCWeekNumberMonday(d, p) {
- return pad(utcMonday.count(utcYear(d), d), p, 2);
-}
-
-function formatUTCYear(d, p) {
- return pad(d.getUTCFullYear() % 100, p, 2);
-}
-
-function formatUTCFullYear(d, p) {
- return pad(d.getUTCFullYear() % 10000, p, 4);
-}
-
-function formatUTCZone() {
- return "+0000";
-}
-
-function formatLiteralPercent() {
- return "%";
-}
-
-function formatUnixTimestamp(d) {
- return +d;
-}
-
-function formatUnixTimestampSeconds(d) {
- return Math.floor(+d / 1000);
-}
-
-var locale$1;
-
-
-
-
-
-defaultLocale$1({
- dateTime: "%x, %X",
- date: "%-m/%-d/%Y",
- time: "%-I:%M:%S %p",
- periods: ["AM", "PM"],
- days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
- shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
- months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
- shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
-});
-
-function defaultLocale$1(definition) {
- locale$1 = formatLocale$1(definition);
- exports.timeFormat = locale$1.format;
- exports.timeParse = locale$1.parse;
- exports.utcFormat = locale$1.utcFormat;
- exports.utcParse = locale$1.utcParse;
- return locale$1;
-}
-
-var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ";
-
-function formatIsoNative(date) {
- return date.toISOString();
-}
-
-var formatIso = Date.prototype.toISOString
- ? formatIsoNative
- : exports.utcFormat(isoSpecifier);
-
-function parseIsoNative(string) {
- var date = new Date(string);
- return isNaN(date) ? null : date;
-}
-
-var parseIso = +new Date("2000-01-01T00:00:00.000Z")
- ? parseIsoNative
- : exports.utcParse(isoSpecifier);
-
-var durationSecond = 1000;
-var durationMinute = durationSecond * 60;
-var durationHour = durationMinute * 60;
-var durationDay = durationHour * 24;
-var durationWeek = durationDay * 7;
-var durationMonth = durationDay * 30;
-var durationYear = durationDay * 365;
-
-function date$1(t) {
- return new Date(t);
-}
-
-function number$3(t) {
- return t instanceof Date ? +t : +new Date(+t);
-}
-
-function calendar(year$$1, month$$1, week, day$$1, hour$$1, minute$$1, second$$1, millisecond$$1, format) {
- var scale = continuous(deinterpolateLinear, reinterpolate),
- invert = scale.invert,
- domain = scale.domain;
-
- var formatMillisecond = format(".%L"),
- formatSecond = format(":%S"),
- formatMinute = format("%I:%M"),
- formatHour = format("%I %p"),
- formatDay = format("%a %d"),
- formatWeek = format("%b %d"),
- formatMonth = format("%B"),
- formatYear = format("%Y");
-
- var tickIntervals = [
- [second$$1, 1, durationSecond],
- [second$$1, 5, 5 * durationSecond],
- [second$$1, 15, 15 * durationSecond],
- [second$$1, 30, 30 * durationSecond],
- [minute$$1, 1, durationMinute],
- [minute$$1, 5, 5 * durationMinute],
- [minute$$1, 15, 15 * durationMinute],
- [minute$$1, 30, 30 * durationMinute],
- [ hour$$1, 1, durationHour ],
- [ hour$$1, 3, 3 * durationHour ],
- [ hour$$1, 6, 6 * durationHour ],
- [ hour$$1, 12, 12 * durationHour ],
- [ day$$1, 1, durationDay ],
- [ day$$1, 2, 2 * durationDay ],
- [ week, 1, durationWeek ],
- [ month$$1, 1, durationMonth ],
- [ month$$1, 3, 3 * durationMonth ],
- [ year$$1, 1, durationYear ]
- ];
-
- function tickFormat(date) {
- return (second$$1(date) < date ? formatMillisecond
- : minute$$1(date) < date ? formatSecond
- : hour$$1(date) < date ? formatMinute
- : day$$1(date) < date ? formatHour
- : month$$1(date) < date ? (week(date) < date ? formatDay : formatWeek)
- : year$$1(date) < date ? formatMonth
- : formatYear)(date);
- }
-
- function tickInterval(interval, start, stop, step) {
- if (interval == null) interval = 10;
-
- // If a desired tick count is specified, pick a reasonable tick interval
- // based on the extent of the domain and a rough estimate of tick size.
- // Otherwise, assume interval is already a time interval and use it.
- if (typeof interval === "number") {
- var target = Math.abs(stop - start) / interval,
- i = bisector(function(i) { return i[2]; }).right(tickIntervals, target);
- if (i === tickIntervals.length) {
- step = tickStep(start / durationYear, stop / durationYear, interval);
- interval = year$$1;
- } else if (i) {
- i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
- step = i[1];
- interval = i[0];
- } else {
- step = Math.max(tickStep(start, stop, interval), 1);
- interval = millisecond$$1;
- }
- }
-
- return step == null ? interval : interval.every(step);
- }
-
- scale.invert = function(y) {
- return new Date(invert(y));
- };
-
- scale.domain = function(_) {
- return arguments.length ? domain(map$3.call(_, number$3)) : domain().map(date$1);
- };
-
- scale.ticks = function(interval, step) {
- var d = domain(),
- t0 = d[0],
- t1 = d[d.length - 1],
- r = t1 < t0,
- t;
- if (r) t = t0, t0 = t1, t1 = t;
- t = tickInterval(interval, t0, t1, step);
- t = t ? t.range(t0, t1 + 1) : []; // inclusive stop
- return r ? t.reverse() : t;
- };
-
- scale.tickFormat = function(count, specifier) {
- return specifier == null ? tickFormat : format(specifier);
- };
-
- scale.nice = function(interval, step) {
- var d = domain();
- return (interval = tickInterval(interval, d[0], d[d.length - 1], step))
- ? domain(nice(d, interval))
- : scale;
- };
-
- scale.copy = function() {
- return copy(scale, calendar(year$$1, month$$1, week, day$$1, hour$$1, minute$$1, second$$1, millisecond$$1, format));
- };
-
- return scale;
-}
-
-function time() {
- return calendar(year, month, sunday, day, hour, minute, second, millisecond, exports.timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]);
-}
-
-function utcTime() {
- return calendar(utcYear, utcMonth, utcSunday, utcDay, utcHour, utcMinute, second, millisecond, exports.utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]);
-}
-
-function colors(s) {
- return s.match(/.{6}/g).map(function(x) {
- return "#" + x;
- });
-}
-
-var category10 = colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");
-
-var category20b = colors("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6");
-
-var category20c = colors("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9");
-
-var category20 = colors("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5");
-
-var cubehelix$3 = cubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));
-
-var warm = cubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));
-
-var cool = cubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));
-
-var rainbow = cubehelix();
-
-function rainbow$1(t) {
- if (t < 0 || t > 1) t -= Math.floor(t);
- var ts = Math.abs(t - 0.5);
- rainbow.h = 360 * t - 100;
- rainbow.s = 1.5 - 1.5 * ts;
- rainbow.l = 0.8 - 0.9 * ts;
- return rainbow + "";
-}
-
-function ramp(range) {
- var n = range.length;
- return function(t) {
- return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
- };
-}
-
-var viridis = ramp(colors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));
-
-var magma = ramp(colors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));
-
-var inferno = ramp(colors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));
-
-var plasma = ramp(colors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
-
-function sequential(interpolator) {
- var x0 = 0,
- x1 = 1,
- clamp = false;
-
- function scale(x) {
- var t = (x - x0) / (x1 - x0);
- return interpolator(clamp ? Math.max(0, Math.min(1, t)) : t);
- }
-
- scale.domain = function(_) {
- return arguments.length ? (x0 = +_[0], x1 = +_[1], scale) : [x0, x1];
- };
-
- scale.clamp = function(_) {
- return arguments.length ? (clamp = !!_, scale) : clamp;
- };
-
- scale.interpolator = function(_) {
- return arguments.length ? (interpolator = _, scale) : interpolator;
- };
-
- scale.copy = function() {
- return sequential(interpolator).domain([x0, x1]).clamp(clamp);
- };
-
- return linearish(scale);
-}
-
-function constant$10(x) {
- return function constant() {
- return x;
- };
-}
-
-var abs$1 = Math.abs;
-var atan2$1 = Math.atan2;
-var cos$2 = Math.cos;
-var max$2 = Math.max;
-var min$1 = Math.min;
-var sin$2 = Math.sin;
-var sqrt$2 = Math.sqrt;
-
-var epsilon$3 = 1e-12;
-var pi$4 = Math.PI;
-var halfPi$3 = pi$4 / 2;
-var tau$4 = 2 * pi$4;
-
-function acos$1(x) {
- return x > 1 ? 0 : x < -1 ? pi$4 : Math.acos(x);
-}
-
-function asin$1(x) {
- return x >= 1 ? halfPi$3 : x <= -1 ? -halfPi$3 : Math.asin(x);
-}
-
-function arcInnerRadius(d) {
- return d.innerRadius;
-}
-
-function arcOuterRadius(d) {
- return d.outerRadius;
-}
-
-function arcStartAngle(d) {
- return d.startAngle;
-}
-
-function arcEndAngle(d) {
- return d.endAngle;
-}
-
-function arcPadAngle(d) {
- return d && d.padAngle; // Note: optional!
-}
-
-function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
- var x10 = x1 - x0, y10 = y1 - y0,
- x32 = x3 - x2, y32 = y3 - y2,
- t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / (y32 * x10 - x32 * y10);
- return [x0 + t * x10, y0 + t * y10];
-}
-
-// Compute perpendicular offset line of length rc.
-// http://mathworld.wolfram.com/Circle-LineIntersection.html
-function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
- var x01 = x0 - x1,
- y01 = y0 - y1,
- lo = (cw ? rc : -rc) / sqrt$2(x01 * x01 + y01 * y01),
- ox = lo * y01,
- oy = -lo * x01,
- x11 = x0 + ox,
- y11 = y0 + oy,
- x10 = x1 + ox,
- y10 = y1 + oy,
- x00 = (x11 + x10) / 2,
- y00 = (y11 + y10) / 2,
- dx = x10 - x11,
- dy = y10 - y11,
- d2 = dx * dx + dy * dy,
- r = r1 - rc,
- D = x11 * y10 - x10 * y11,
- d = (dy < 0 ? -1 : 1) * sqrt$2(max$2(0, r * r * d2 - D * D)),
- cx0 = (D * dy - dx * d) / d2,
- cy0 = (-D * dx - dy * d) / d2,
- cx1 = (D * dy + dx * d) / d2,
- cy1 = (-D * dx + dy * d) / d2,
- dx0 = cx0 - x00,
- dy0 = cy0 - y00,
- dx1 = cx1 - x00,
- dy1 = cy1 - y00;
-
- // Pick the closer of the two intersection points.
- // TODO Is there a faster way to determine which intersection to use?
- if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;
-
- return {
- cx: cx0,
- cy: cy0,
- x01: -ox,
- y01: -oy,
- x11: cx0 * (r1 / r - 1),
- y11: cy0 * (r1 / r - 1)
- };
-}
-
-function arc() {
- var innerRadius = arcInnerRadius,
- outerRadius = arcOuterRadius,
- cornerRadius = constant$10(0),
- padRadius = null,
- startAngle = arcStartAngle,
- endAngle = arcEndAngle,
- padAngle = arcPadAngle,
- context = null;
-
- function arc() {
- var buffer,
- r,
- r0 = +innerRadius.apply(this, arguments),
- r1 = +outerRadius.apply(this, arguments),
- a0 = startAngle.apply(this, arguments) - halfPi$3,
- a1 = endAngle.apply(this, arguments) - halfPi$3,
- da = abs$1(a1 - a0),
- cw = a1 > a0;
-
- if (!context) context = buffer = path();
-
- // Ensure that the outer radius is always larger than the inner radius.
- if (r1 < r0) r = r1, r1 = r0, r0 = r;
-
- // Is it a point?
- if (!(r1 > epsilon$3)) context.moveTo(0, 0);
-
- // Or is it a circle or annulus?
- else if (da > tau$4 - epsilon$3) {
- context.moveTo(r1 * cos$2(a0), r1 * sin$2(a0));
- context.arc(0, 0, r1, a0, a1, !cw);
- if (r0 > epsilon$3) {
- context.moveTo(r0 * cos$2(a1), r0 * sin$2(a1));
- context.arc(0, 0, r0, a1, a0, cw);
- }
- }
-
- // Or is it a circular or annular sector?
- else {
- var a01 = a0,
- a11 = a1,
- a00 = a0,
- a10 = a1,
- da0 = da,
- da1 = da,
- ap = padAngle.apply(this, arguments) / 2,
- rp = (ap > epsilon$3) && (padRadius ? +padRadius.apply(this, arguments) : sqrt$2(r0 * r0 + r1 * r1)),
- rc = min$1(abs$1(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
- rc0 = rc,
- rc1 = rc,
- t0,
- t1;
-
- // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.
- if (rp > epsilon$3) {
- var p0 = asin$1(rp / r0 * sin$2(ap)),
- p1 = asin$1(rp / r1 * sin$2(ap));
- if ((da0 -= p0 * 2) > epsilon$3) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;
- else da0 = 0, a00 = a10 = (a0 + a1) / 2;
- if ((da1 -= p1 * 2) > epsilon$3) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;
- else da1 = 0, a01 = a11 = (a0 + a1) / 2;
- }
-
- var x01 = r1 * cos$2(a01),
- y01 = r1 * sin$2(a01),
- x10 = r0 * cos$2(a10),
- y10 = r0 * sin$2(a10);
-
- // Apply rounded corners?
- if (rc > epsilon$3) {
- var x11 = r1 * cos$2(a11),
- y11 = r1 * sin$2(a11),
- x00 = r0 * cos$2(a00),
- y00 = r0 * sin$2(a00);
-
- // Restrict the corner radius according to the sector angle.
- if (da < pi$4) {
- var oc = da0 > epsilon$3 ? intersect(x01, y01, x00, y00, x11, y11, x10, y10) : [x10, y10],
- ax = x01 - oc[0],
- ay = y01 - oc[1],
- bx = x11 - oc[0],
- by = y11 - oc[1],
- kc = 1 / sin$2(acos$1((ax * bx + ay * by) / (sqrt$2(ax * ax + ay * ay) * sqrt$2(bx * bx + by * by))) / 2),
- lc = sqrt$2(oc[0] * oc[0] + oc[1] * oc[1]);
- rc0 = min$1(rc, (r0 - lc) / (kc - 1));
- rc1 = min$1(rc, (r1 - lc) / (kc + 1));
- }
- }
-
- // Is the sector collapsed to a line?
- if (!(da1 > epsilon$3)) context.moveTo(x01, y01);
-
- // Does the sector’s outer ring have rounded corners?
- else if (rc1 > epsilon$3) {
- t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
- t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
-
- context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
-
- // Have the corners merged?
- if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2$1(t0.y01, t0.x01), atan2$1(t1.y01, t1.x01), !cw);
-
- // Otherwise, draw the two corners and the ring.
- else {
- context.arc(t0.cx, t0.cy, rc1, atan2$1(t0.y01, t0.x01), atan2$1(t0.y11, t0.x11), !cw);
- context.arc(0, 0, r1, atan2$1(t0.cy + t0.y11, t0.cx + t0.x11), atan2$1(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
- context.arc(t1.cx, t1.cy, rc1, atan2$1(t1.y11, t1.x11), atan2$1(t1.y01, t1.x01), !cw);
- }
- }
-
- // Or is the outer ring just a circular arc?
- else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
-
- // Is there no inner ring, and it’s a circular sector?
- // Or perhaps it’s an annular sector collapsed due to padding?
- if (!(r0 > epsilon$3) || !(da0 > epsilon$3)) context.lineTo(x10, y10);
-
- // Does the sector’s inner ring (or point) have rounded corners?
- else if (rc0 > epsilon$3) {
- t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
- t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
-
- context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
-
- // Have the corners merged?
- if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2$1(t0.y01, t0.x01), atan2$1(t1.y01, t1.x01), !cw);
-
- // Otherwise, draw the two corners and the ring.
- else {
- context.arc(t0.cx, t0.cy, rc0, atan2$1(t0.y01, t0.x01), atan2$1(t0.y11, t0.x11), !cw);
- context.arc(0, 0, r0, atan2$1(t0.cy + t0.y11, t0.cx + t0.x11), atan2$1(t1.cy + t1.y11, t1.cx + t1.x11), cw);
- context.arc(t1.cx, t1.cy, rc0, atan2$1(t1.y11, t1.x11), atan2$1(t1.y01, t1.x01), !cw);
- }
- }
-
- // Or is the inner ring just a circular arc?
- else context.arc(0, 0, r0, a10, a00, cw);
- }
-
- context.closePath();
-
- if (buffer) return context = null, buffer + "" || null;
- }
-
- arc.centroid = function() {
- var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,
- a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi$4 / 2;
- return [cos$2(a) * r, sin$2(a) * r];
- };
-
- arc.innerRadius = function(_) {
- return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant$10(+_), arc) : innerRadius;
- };
-
- arc.outerRadius = function(_) {
- return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant$10(+_), arc) : outerRadius;
- };
-
- arc.cornerRadius = function(_) {
- return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant$10(+_), arc) : cornerRadius;
- };
-
- arc.padRadius = function(_) {
- return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant$10(+_), arc) : padRadius;
- };
-
- arc.startAngle = function(_) {
- return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$10(+_), arc) : startAngle;
- };
-
- arc.endAngle = function(_) {
- return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$10(+_), arc) : endAngle;
- };
-
- arc.padAngle = function(_) {
- return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$10(+_), arc) : padAngle;
- };
-
- arc.context = function(_) {
- return arguments.length ? (context = _ == null ? null : _, arc) : context;
- };
-
- return arc;
-}
-
-function Linear(context) {
- this._context = context;
-}
-
-Linear.prototype = {
- areaStart: function() {
- this._line = 0;
- },
- areaEnd: function() {
- this._line = NaN;
- },
- lineStart: function() {
- this._point = 0;
- },
- lineEnd: function() {
- if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
- this._line = 1 - this._line;
- },
- point: function(x, y) {
- x = +x, y = +y;
- switch (this._point) {
- case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
- case 1: this._point = 2; // proceed
- default: this._context.lineTo(x, y); break;
- }
- }
-};
-
-function curveLinear(context) {
- return new Linear(context);
-}
-
-function x$3(p) {
- return p[0];
-}
-
-function y$3(p) {
- return p[1];
-}
-
-function line() {
- var x$$1 = x$3,
- y$$1 = y$3,
- defined = constant$10(true),
- context = null,
- curve = curveLinear,
- output = null;
-
- function line(data) {
- var i,
- n = data.length,
- d,
- defined0 = false,
- buffer;
-
- if (context == null) output = curve(buffer = path());
-
- for (i = 0; i <= n; ++i) {
- if (!(i < n && defined(d = data[i], i, data)) === defined0) {
- if (defined0 = !defined0) output.lineStart();
- else output.lineEnd();
- }
- if (defined0) output.point(+x$$1(d, i, data), +y$$1(d, i, data));
- }
-
- if (buffer) return output = null, buffer + "" || null;
- }
-
- line.x = function(_) {
- return arguments.length ? (x$$1 = typeof _ === "function" ? _ : constant$10(+_), line) : x$$1;
- };
-
- line.y = function(_) {
- return arguments.length ? (y$$1 = typeof _ === "function" ? _ : constant$10(+_), line) : y$$1;
- };
-
- line.defined = function(_) {
- return arguments.length ? (defined = typeof _ === "function" ? _ : constant$10(!!_), line) : defined;
- };
-
- line.curve = function(_) {
- return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;
- };
-
- line.context = function(_) {
- return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;
- };
-
- return line;
-}
-
-function area$2() {
- var x0 = x$3,
- x1 = null,
- y0 = constant$10(0),
- y1 = y$3,
- defined = constant$10(true),
- context = null,
- curve = curveLinear,
- output = null;
-
- function area(data) {
- var i,
- j,
- k,
- n = data.length,
- d,
- defined0 = false,
- buffer,
- x0z = new Array(n),
- y0z = new Array(n);
-
- if (context == null) output = curve(buffer = path());
-
- for (i = 0; i <= n; ++i) {
- if (!(i < n && defined(d = data[i], i, data)) === defined0) {
- if (defined0 = !defined0) {
- j = i;
- output.areaStart();
- output.lineStart();
- } else {
- output.lineEnd();
- output.lineStart();
- for (k = i - 1; k >= j; --k) {
- output.point(x0z[k], y0z[k]);
- }
- output.lineEnd();
- output.areaEnd();
- }
- }
- if (defined0) {
- x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);
- output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);
- }
- }
-
- if (buffer) return output = null, buffer + "" || null;
- }
-
- function arealine() {
- return line().defined(defined).curve(curve).context(context);
- }
-
- area.x = function(_) {
- return arguments.length ? (x0 = typeof _ === "function" ? _ : constant$10(+_), x1 = null, area) : x0;
- };
-
- area.x0 = function(_) {
- return arguments.length ? (x0 = typeof _ === "function" ? _ : constant$10(+_), area) : x0;
- };
-
- area.x1 = function(_) {
- return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant$10(+_), area) : x1;
- };
-
- area.y = function(_) {
- return arguments.length ? (y0 = typeof _ === "function" ? _ : constant$10(+_), y1 = null, area) : y0;
- };
-
- area.y0 = function(_) {
- return arguments.length ? (y0 = typeof _ === "function" ? _ : constant$10(+_), area) : y0;
- };
-
- area.y1 = function(_) {
- return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant$10(+_), area) : y1;
- };
-
- area.lineX0 =
- area.lineY0 = function() {
- return arealine().x(x0).y(y0);
- };
-
- area.lineY1 = function() {
- return arealine().x(x0).y(y1);
- };
-
- area.lineX1 = function() {
- return arealine().x(x1).y(y0);
- };
-
- area.defined = function(_) {
- return arguments.length ? (defined = typeof _ === "function" ? _ : constant$10(!!_), area) : defined;
- };
-
- area.curve = function(_) {
- return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;
- };
-
- area.context = function(_) {
- return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;
- };
-
- return area;
-}
-
-function descending$1(a, b) {
- return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
-}
-
-function identity$7(d) {
- return d;
-}
-
-function pie() {
- var value = identity$7,
- sortValues = descending$1,
- sort = null,
- startAngle = constant$10(0),
- endAngle = constant$10(tau$4),
- padAngle = constant$10(0);
-
- function pie(data) {
- var i,
- n = data.length,
- j,
- k,
- sum = 0,
- index = new Array(n),
- arcs = new Array(n),
- a0 = +startAngle.apply(this, arguments),
- da = Math.min(tau$4, Math.max(-tau$4, endAngle.apply(this, arguments) - a0)),
- a1,
- p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),
- pa = p * (da < 0 ? -1 : 1),
- v;
-
- for (i = 0; i < n; ++i) {
- if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {
- sum += v;
- }
- }
-
- // Optionally sort the arcs by previously-computed values or by data.
- if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });
- else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });
-
- // Compute the arcs! They are stored in the original data's order.
- for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {
- j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {
- data: data[j],
- index: i,
- value: v,
- startAngle: a0,
- endAngle: a1,
- padAngle: p
- };
- }
-
- return arcs;
- }
-
- pie.value = function(_) {
- return arguments.length ? (value = typeof _ === "function" ? _ : constant$10(+_), pie) : value;
- };
-
- pie.sortValues = function(_) {
- return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;
- };
-
- pie.sort = function(_) {
- return arguments.length ? (sort = _, sortValues = null, pie) : sort;
- };
-
- pie.startAngle = function(_) {
- return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$10(+_), pie) : startAngle;
- };
-
- pie.endAngle = function(_) {
- return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$10(+_), pie) : endAngle;
- };
-
- pie.padAngle = function(_) {
- return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$10(+_), pie) : padAngle;
- };
-
- return pie;
-}
-
-var curveRadialLinear = curveRadial(curveLinear);
-
-function Radial(curve) {
- this._curve = curve;
-}
-
-Radial.prototype = {
- areaStart: function() {
- this._curve.areaStart();
- },
- areaEnd: function() {
- this._curve.areaEnd();
- },
- lineStart: function() {
- this._curve.lineStart();
- },
- lineEnd: function() {
- this._curve.lineEnd();
- },
- point: function(a, r) {
- this._curve.point(r * Math.sin(a), r * -Math.cos(a));
- }
-};
-
-function curveRadial(curve) {
-
- function radial(context) {
- return new Radial(curve(context));
- }
-
- radial._curve = curve;
-
- return radial;
-}
-
-function lineRadial(l) {
- var c = l.curve;
-
- l.angle = l.x, delete l.x;
- l.radius = l.y, delete l.y;
-
- l.curve = function(_) {
- return arguments.length ? c(curveRadial(_)) : c()._curve;
- };
-
- return l;
-}
-
-function lineRadial$1() {
- return lineRadial(line().curve(curveRadialLinear));
-}
-
-function areaRadial() {
- var a = area$2().curve(curveRadialLinear),
- c = a.curve,
- x0 = a.lineX0,
- x1 = a.lineX1,
- y0 = a.lineY0,
- y1 = a.lineY1;
-
- a.angle = a.x, delete a.x;
- a.startAngle = a.x0, delete a.x0;
- a.endAngle = a.x1, delete a.x1;
- a.radius = a.y, delete a.y;
- a.innerRadius = a.y0, delete a.y0;
- a.outerRadius = a.y1, delete a.y1;
- a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0;
- a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1;
- a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0;
- a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1;
-
- a.curve = function(_) {
- return arguments.length ? c(curveRadial(_)) : c()._curve;
- };
-
- return a;
-}
-
-function pointRadial(x, y) {
- return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];
-}
-
-var slice$6 = Array.prototype.slice;
-
-function linkSource(d) {
- return d.source;
-}
-
-function linkTarget(d) {
- return d.target;
-}
-
-function link$2(curve) {
- var source = linkSource,
- target = linkTarget,
- x$$1 = x$3,
- y$$1 = y$3,
- context = null;
-
- function link() {
- var buffer, argv = slice$6.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);
- if (!context) context = buffer = path();
- curve(context, +x$$1.apply(this, (argv[0] = s, argv)), +y$$1.apply(this, argv), +x$$1.apply(this, (argv[0] = t, argv)), +y$$1.apply(this, argv));
- if (buffer) return context = null, buffer + "" || null;
- }
-
- link.source = function(_) {
- return arguments.length ? (source = _, link) : source;
- };
-
- link.target = function(_) {
- return arguments.length ? (target = _, link) : target;
- };
-
- link.x = function(_) {
- return arguments.length ? (x$$1 = typeof _ === "function" ? _ : constant$10(+_), link) : x$$1;
- };
-
- link.y = function(_) {
- return arguments.length ? (y$$1 = typeof _ === "function" ? _ : constant$10(+_), link) : y$$1;
- };
-
- link.context = function(_) {
- return arguments.length ? (context = _ == null ? null : _, link) : context;
- };
-
- return link;
-}
-
-function curveHorizontal(context, x0, y0, x1, y1) {
- context.moveTo(x0, y0);
- context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);
-}
-
-function curveVertical(context, x0, y0, x1, y1) {
- context.moveTo(x0, y0);
- context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);
-}
-
-function curveRadial$1(context, x0, y0, x1, y1) {
- var p0 = pointRadial(x0, y0),
- p1 = pointRadial(x0, y0 = (y0 + y1) / 2),
- p2 = pointRadial(x1, y0),
- p3 = pointRadial(x1, y1);
- context.moveTo(p0[0], p0[1]);
- context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);
-}
-
-function linkHorizontal() {
- return link$2(curveHorizontal);
-}
-
-function linkVertical() {
- return link$2(curveVertical);
-}
-
-function linkRadial() {
- var l = link$2(curveRadial$1);
- l.angle = l.x, delete l.x;
- l.radius = l.y, delete l.y;
- return l;
-}
-
-var circle$2 = {
- draw: function(context, size) {
- var r = Math.sqrt(size / pi$4);
- context.moveTo(r, 0);
- context.arc(0, 0, r, 0, tau$4);
- }
-};
-
-var cross$2 = {
- draw: function(context, size) {
- var r = Math.sqrt(size / 5) / 2;
- context.moveTo(-3 * r, -r);
- context.lineTo(-r, -r);
- context.lineTo(-r, -3 * r);
- context.lineTo(r, -3 * r);
- context.lineTo(r, -r);
- context.lineTo(3 * r, -r);
- context.lineTo(3 * r, r);
- context.lineTo(r, r);
- context.lineTo(r, 3 * r);
- context.lineTo(-r, 3 * r);
- context.lineTo(-r, r);
- context.lineTo(-3 * r, r);
- context.closePath();
- }
-};
-
-var tan30 = Math.sqrt(1 / 3);
-var tan30_2 = tan30 * 2;
-
-var diamond = {
- draw: function(context, size) {
- var y = Math.sqrt(size / tan30_2),
- x = y * tan30;
- context.moveTo(0, -y);
- context.lineTo(x, 0);
- context.lineTo(0, y);
- context.lineTo(-x, 0);
- context.closePath();
- }
-};
-
-var ka = 0.89081309152928522810;
-var kr = Math.sin(pi$4 / 10) / Math.sin(7 * pi$4 / 10);
-var kx = Math.sin(tau$4 / 10) * kr;
-var ky = -Math.cos(tau$4 / 10) * kr;
-
-var star = {
- draw: function(context, size) {
- var r = Math.sqrt(size * ka),
- x = kx * r,
- y = ky * r;
- context.moveTo(0, -r);
- context.lineTo(x, y);
- for (var i = 1; i < 5; ++i) {
- var a = tau$4 * i / 5,
- c = Math.cos(a),
- s = Math.sin(a);
- context.lineTo(s * r, -c * r);
- context.lineTo(c * x - s * y, s * x + c * y);
- }
- context.closePath();
- }
-};
-
-var square = {
- draw: function(context, size) {
- var w = Math.sqrt(size),
- x = -w / 2;
- context.rect(x, x, w, w);
- }
-};
-
-var sqrt3 = Math.sqrt(3);
-
-var triangle = {
- draw: function(context, size) {
- var y = -Math.sqrt(size / (sqrt3 * 3));
- context.moveTo(0, y * 2);
- context.lineTo(-sqrt3 * y, -y);
- context.lineTo(sqrt3 * y, -y);
- context.closePath();
- }
-};
-
-var c = -0.5;
-var s = Math.sqrt(3) / 2;
-var k = 1 / Math.sqrt(12);
-var a = (k / 2 + 1) * 3;
-
-var wye = {
- draw: function(context, size) {
- var r = Math.sqrt(size / a),
- x0 = r / 2,
- y0 = r * k,
- x1 = x0,
- y1 = r * k + r,
- x2 = -x1,
- y2 = y1;
- context.moveTo(x0, y0);
- context.lineTo(x1, y1);
- context.lineTo(x2, y2);
- context.lineTo(c * x0 - s * y0, s * x0 + c * y0);
- context.lineTo(c * x1 - s * y1, s * x1 + c * y1);
- context.lineTo(c * x2 - s * y2, s * x2 + c * y2);
- context.lineTo(c * x0 + s * y0, c * y0 - s * x0);
- context.lineTo(c * x1 + s * y1, c * y1 - s * x1);
- context.lineTo(c * x2 + s * y2, c * y2 - s * x2);
- context.closePath();
- }
-};
-
-var symbols = [
- circle$2,
- cross$2,
- diamond,
- square,
- star,
- triangle,
- wye
-];
-
-function symbol() {
- var type = constant$10(circle$2),
- size = constant$10(64),
- context = null;
-
- function symbol() {
- var buffer;
- if (!context) context = buffer = path();
- type.apply(this, arguments).draw(context, +size.apply(this, arguments));
- if (buffer) return context = null, buffer + "" || null;
- }
-
- symbol.type = function(_) {
- return arguments.length ? (type = typeof _ === "function" ? _ : constant$10(_), symbol) : type;
- };
-
- symbol.size = function(_) {
- return arguments.length ? (size = typeof _ === "function" ? _ : constant$10(+_), symbol) : size;
- };
-
- symbol.context = function(_) {
- return arguments.length ? (context = _ == null ? null : _, symbol) : context;
- };
-
- return symbol;
-}
-
-function noop$2() {}
-
-function point$2(that, x, y) {
- that._context.bezierCurveTo(
- (2 * that._x0 + that._x1) / 3,
- (2 * that._y0 + that._y1) / 3,
- (that._x0 + 2 * that._x1) / 3,
- (that._y0 + 2 * that._y1) / 3,
- (that._x0 + 4 * that._x1 + x) / 6,
- (that._y0 + 4 * that._y1 + y) / 6
- );
-}
-
-function Basis(context) {
- this._context = context;
-}
-
-Basis.prototype = {
- areaStart: function() {
- this._line = 0;
- },
- areaEnd: function() {
- this._line = NaN;
- },
- lineStart: function() {
- this._x0 = this._x1 =
- this._y0 = this._y1 = NaN;
- this._point = 0;
- },
- lineEnd: function() {
- switch (this._point) {
- case 3: point$2(this, this._x1, this._y1); // proceed
- case 2: this._context.lineTo(this._x1, this._y1); break;
- }
- if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
- this._line = 1 - this._line;
- },
- point: function(x, y) {
- x = +x, y = +y;
- switch (this._point) {
- case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
- case 1: this._point = 2; break;
- case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed
- default: point$2(this, x, y); break;
- }
- this._x0 = this._x1, this._x1 = x;
- this._y0 = this._y1, this._y1 = y;
- }
-};
-
-function basis$2(context) {
- return new Basis(context);
-}
-
-function BasisClosed(context) {
- this._context = context;
-}
-
-BasisClosed.prototype = {
- areaStart: noop$2,
- areaEnd: noop$2,
- lineStart: function() {
- this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =
- this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;
- this._point = 0;
- },
- lineEnd: function() {
- switch (this._point) {
- case 1: {
- this._context.moveTo(this._x2, this._y2);
- this._context.closePath();
- break;
- }
- case 2: {
- this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);
- this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);
- this._context.closePath();
- break;
- }
- case 3: {
- this.point(this._x2, this._y2);
- this.point(this._x3, this._y3);
- this.point(this._x4, this._y4);
- break;
- }
- }
- },
- point: function(x, y) {
- x = +x, y = +y;
- switch (this._point) {
- case 0: this._point = 1; this._x2 = x, this._y2 = y; break;
- case 1: this._point = 2; this._x3 = x, this._y3 = y; break;
- case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;
- default: point$2(this, x, y); break;
- }
- this._x0 = this._x1, this._x1 = x;
- this._y0 = this._y1, this._y1 = y;
- }
-};
-
-function basisClosed$1(context) {
- return new BasisClosed(context);
-}
-
-function BasisOpen(context) {
- this._context = context;
-}
-
-BasisOpen.prototype = {
- areaStart: function() {
- this._line = 0;
- },
- areaEnd: function() {
- this._line = NaN;
- },
- lineStart: function() {
- this._x0 = this._x1 =
- this._y0 = this._y1 = NaN;
- this._point = 0;
- },
- lineEnd: function() {
- if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();
- this._line = 1 - this._line;
- },
- point: function(x, y) {
- x = +x, y = +y;
- switch (this._point) {
- case 0: this._point = 1; break;
- case 1: this._point = 2; break;
- case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;
- case 3: this._point = 4; // proceed
- default: point$2(this, x, y); break;
- }
- this._x0 = this._x1, this._x1 = x;
- this._y0 = this._y1, this._y1 = y;
- }
-};
-
-function basisOpen(context) {
- return new BasisOpen(context);
-}
-
-function Bundle(context, beta) {
- this._basis = new Basis(context);
- this._beta = beta;
-}
-
-Bundle.prototype = {
- lineStart: function() {
- this._x = [];
- this._y = [];
- this._basis.lineStart();
- },
- lineEnd: function() {
- var x = this._x,
- y = this._y,
- j = x.length - 1;
-
- if (j > 0) {
- var x0 = x[0],
- y0 = y[0],
- dx = x[j] - x0,
- dy = y[j] - y0,
- i = -1,
- t;
-
- while (++i <= j) {
- t = i / j;
- this._basis.point(
- this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),
- this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)
- );
- }
- }
-
- this._x = this._y = null;
- this._basis.lineEnd();
- },
- point: function(x, y) {
- this._x.push(+x);
- this._y.push(+y);
- }
-};
-
-var bundle = (function custom(beta) {
-
- function bundle(context) {
- return beta === 1 ? new Basis(context) : new Bundle(context, beta);
- }
-
- bundle.beta = function(beta) {
- return custom(+beta);
- };
-
- return bundle;
-})(0.85);
-
-function point$3(that, x, y) {
- that._context.bezierCurveTo(
- that._x1 + that._k * (that._x2 - that._x0),
- that._y1 + that._k * (that._y2 - that._y0),
- that._x2 + that._k * (that._x1 - x),
- that._y2 + that._k * (that._y1 - y),
- that._x2,
- that._y2
- );
-}
-
-function Cardinal(context, tension) {
- this._context = context;
- this._k = (1 - tension) / 6;
-}
-
-Cardinal.prototype = {
- areaStart: function() {
- this._line = 0;
- },
- areaEnd: function() {
- this._line = NaN;
- },
- lineStart: function() {
- this._x0 = this._x1 = this._x2 =
- this._y0 = this._y1 = this._y2 = NaN;
- this._point = 0;
- },
- lineEnd: function() {
- switch (this._point) {
- case 2: this._context.lineTo(this._x2, this._y2); break;
- case 3: point$3(this, this._x1, this._y1); break;
- }
- if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
- this._line = 1 - this._line;
- },
- point: function(x, y) {
- x = +x, y = +y;
- switch (this._point) {
- case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
- case 1: this._point = 2; this._x1 = x, this._y1 = y; break;
- case 2: this._point = 3; // proceed
- default: point$3(this, x, y); break;
- }
- this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
- this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
- }
-};
-
-var cardinal = (function custom(tension) {
-
- function cardinal(context) {
- return new Cardinal(context, tension);
- }
-
- cardinal.tension = function(tension) {
- return custom(+tension);
- };
-
- return cardinal;
-})(0);
-
-function CardinalClosed(context, tension) {
- this._context = context;
- this._k = (1 - tension) / 6;
-}
-
-CardinalClosed.prototype = {
- areaStart: noop$2,
- areaEnd: noop$2,
- lineStart: function() {
- this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =
- this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
- this._point = 0;
- },
- lineEnd: function() {
- switch (this._point) {
- case 1: {
- this._context.moveTo(this._x3, this._y3);
- this._context.closePath();
- break;
- }
- case 2: {
- this._context.lineTo(this._x3, this._y3);
- this._context.closePath();
- break;
- }
- case 3: {
- this.point(this._x3, this._y3);
- this.point(this._x4, this._y4);
- this.point(this._x5, this._y5);
- break;
- }
- }
- },
- point: function(x, y) {
- x = +x, y = +y;
- switch (this._point) {
- case 0: this._point = 1; this._x3 = x, this._y3 = y; break;
- case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;
- case 2: this._point = 3; this._x5 = x, this._y5 = y; break;
- default: point$3(this, x, y); break;
- }
- this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
- this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
- }
-};
-
-var cardinalClosed = (function custom(tension) {
-
- function cardinal$$1(context) {
- return new CardinalClosed(context, tension);
- }
-
- cardinal$$1.tension = function(tension) {
- return custom(+tension);
- };
-
- return cardinal$$1;
-})(0);
-
-function CardinalOpen(context, tension) {
- this._context = context;
- this._k = (1 - tension) / 6;
-}
-
-CardinalOpen.prototype = {
- areaStart: function() {
- this._line = 0;
- },
- areaEnd: function() {
- this._line = NaN;
- },
- lineStart: function() {
- this._x0 = this._x1 = this._x2 =
- this._y0 = this._y1 = this._y2 = NaN;
- this._point = 0;
- },
- lineEnd: function() {
- if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();
- this._line = 1 - this._line;
- },
- point: function(x, y) {
- x = +x, y = +y;
- switch (this._point) {
- case 0: this._point = 1; break;
- case 1: this._point = 2; break;
- case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;
- case 3: this._point = 4; // proceed
- default: point$3(this, x, y); break;
- }
- this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
- this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
- }
-};
-
-var cardinalOpen = (function custom(tension) {
-
- function cardinal$$1(context) {
- return new CardinalOpen(context, tension);
- }
-
- cardinal$$1.tension = function(tension) {
- return custom(+tension);
- };
-
- return cardinal$$1;
-})(0);
-
-function point$4(that, x, y) {
- var x1 = that._x1,
- y1 = that._y1,
- x2 = that._x2,
- y2 = that._y2;
-
- if (that._l01_a > epsilon$3) {
- var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,
- n = 3 * that._l01_a * (that._l01_a + that._l12_a);
- x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
- y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
- }
-
- if (that._l23_a > epsilon$3) {
- var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,
- m = 3 * that._l23_a * (that._l23_a + that._l12_a);
- x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;
- y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;
- }
-
- that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);
-}
-
-function CatmullRom(context, alpha) {
- this._context = context;
- this._alpha = alpha;
-}
-
-CatmullRom.prototype = {
- areaStart: function() {
- this._line = 0;
- },
- areaEnd: function() {
- this._line = NaN;
- },
- lineStart: function() {
- this._x0 = this._x1 = this._x2 =
- this._y0 = this._y1 = this._y2 = NaN;
- this._l01_a = this._l12_a = this._l23_a =
- this._l01_2a = this._l12_2a = this._l23_2a =
- this._point = 0;
- },
- lineEnd: function() {
- switch (this._point) {
- case 2: this._context.lineTo(this._x2, this._y2); break;
- case 3: this.point(this._x2, this._y2); break;
- }
- if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
- this._line = 1 - this._line;
- },
- point: function(x, y) {
- x = +x, y = +y;
-
- if (this._point) {
- var x23 = this._x2 - x,
- y23 = this._y2 - y;
- this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
- }
-
- switch (this._point) {
- case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
- case 1: this._point = 2; break;
- case 2: this._point = 3; // proceed
- default: point$4(this, x, y); break;
- }
-
- this._l01_a = this._l12_a, this._l12_a = this._l23_a;
- this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
- this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
- this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
- }
-};
-
-var catmullRom = (function custom(alpha) {
-
- function catmullRom(context) {
- return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);
- }
-
- catmullRom.alpha = function(alpha) {
- return custom(+alpha);
- };
-
- return catmullRom;
-})(0.5);
-
-function CatmullRomClosed(context, alpha) {
- this._context = context;
- this._alpha = alpha;
-}
-
-CatmullRomClosed.prototype = {
- areaStart: noop$2,
- areaEnd: noop$2,
- lineStart: function() {
- this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =
- this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
- this._l01_a = this._l12_a = this._l23_a =
- this._l01_2a = this._l12_2a = this._l23_2a =
- this._point = 0;
- },
- lineEnd: function() {
- switch (this._point) {
- case 1: {
- this._context.moveTo(this._x3, this._y3);
- this._context.closePath();
- break;
- }
- case 2: {
- this._context.lineTo(this._x3, this._y3);
- this._context.closePath();
- break;
- }
- case 3: {
- this.point(this._x3, this._y3);
- this.point(this._x4, this._y4);
- this.point(this._x5, this._y5);
- break;
- }
- }
- },
- point: function(x, y) {
- x = +x, y = +y;
-
- if (this._point) {
- var x23 = this._x2 - x,
- y23 = this._y2 - y;
- this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
- }
-
- switch (this._point) {
- case 0: this._point = 1; this._x3 = x, this._y3 = y; break;
- case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;
- case 2: this._point = 3; this._x5 = x, this._y5 = y; break;
- default: point$4(this, x, y); break;
- }
-
- this._l01_a = this._l12_a, this._l12_a = this._l23_a;
- this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
- this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
- this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
- }
-};
-
-var catmullRomClosed = (function custom(alpha) {
-
- function catmullRom$$1(context) {
- return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);
- }
-
- catmullRom$$1.alpha = function(alpha) {
- return custom(+alpha);
- };
-
- return catmullRom$$1;
-})(0.5);
-
-function CatmullRomOpen(context, alpha) {
- this._context = context;
- this._alpha = alpha;
-}
-
-CatmullRomOpen.prototype = {
- areaStart: function() {
- this._line = 0;
- },
- areaEnd: function() {
- this._line = NaN;
- },
- lineStart: function() {
- this._x0 = this._x1 = this._x2 =
- this._y0 = this._y1 = this._y2 = NaN;
- this._l01_a = this._l12_a = this._l23_a =
- this._l01_2a = this._l12_2a = this._l23_2a =
- this._point = 0;
- },
- lineEnd: function() {
- if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();
- this._line = 1 - this._line;
- },
- point: function(x, y) {
- x = +x, y = +y;
-
- if (this._point) {
- var x23 = this._x2 - x,
- y23 = this._y2 - y;
- this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
- }
-
- switch (this._point) {
- case 0: this._point = 1; break;
- case 1: this._point = 2; break;
- case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;
- case 3: this._point = 4; // proceed
- default: point$4(this, x, y); break;
- }
-
- this._l01_a = this._l12_a, this._l12_a = this._l23_a;
- this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
- this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
- this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
- }
-};
-
-var catmullRomOpen = (function custom(alpha) {
-
- function catmullRom$$1(context) {
- return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);
- }
-
- catmullRom$$1.alpha = function(alpha) {
- return custom(+alpha);
- };
-
- return catmullRom$$1;
-})(0.5);
-
-function LinearClosed(context) {
- this._context = context;
-}
-
-LinearClosed.prototype = {
- areaStart: noop$2,
- areaEnd: noop$2,
- lineStart: function() {
- this._point = 0;
- },
- lineEnd: function() {
- if (this._point) this._context.closePath();
- },
- point: function(x, y) {
- x = +x, y = +y;
- if (this._point) this._context.lineTo(x, y);
- else this._point = 1, this._context.moveTo(x, y);
- }
-};
-
-function linearClosed(context) {
- return new LinearClosed(context);
-}
-
-function sign$1(x) {
- return x < 0 ? -1 : 1;
-}
-
-// Calculate the slopes of the tangents (Hermite-type interpolation) based on
-// the following paper: Steffen, M. 1990. A Simple Method for Monotonic
-// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.
-// NOV(II), P. 443, 1990.
-function slope3(that, x2, y2) {
- var h0 = that._x1 - that._x0,
- h1 = x2 - that._x1,
- s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),
- s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),
- p = (s0 * h1 + s1 * h0) / (h0 + h1);
- return (sign$1(s0) + sign$1(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
-}
-
-// Calculate a one-sided slope.
-function slope2(that, t) {
- var h = that._x1 - that._x0;
- return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
-}
-
-// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations
-// "you can express cubic Hermite interpolation in terms of cubic Bézier curves
-// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1".
-function point$5(that, t0, t1) {
- var x0 = that._x0,
- y0 = that._y0,
- x1 = that._x1,
- y1 = that._y1,
- dx = (x1 - x0) / 3;
- that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
-}
-
-function MonotoneX(context) {
- this._context = context;
-}
-
-MonotoneX.prototype = {
- areaStart: function() {
- this._line = 0;
- },
- areaEnd: function() {
- this._line = NaN;
- },
- lineStart: function() {
- this._x0 = this._x1 =
- this._y0 = this._y1 =
- this._t0 = NaN;
- this._point = 0;
- },
- lineEnd: function() {
- switch (this._point) {
- case 2: this._context.lineTo(this._x1, this._y1); break;
- case 3: point$5(this, this._t0, slope2(this, this._t0)); break;
- }
- if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
- this._line = 1 - this._line;
- },
- point: function(x, y) {
- var t1 = NaN;
-
- x = +x, y = +y;
- if (x === this._x1 && y === this._y1) return; // Ignore coincident points.
- switch (this._point) {
- case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
- case 1: this._point = 2; break;
- case 2: this._point = 3; point$5(this, slope2(this, t1 = slope3(this, x, y)), t1); break;
- default: point$5(this, this._t0, t1 = slope3(this, x, y)); break;
- }
-
- this._x0 = this._x1, this._x1 = x;
- this._y0 = this._y1, this._y1 = y;
- this._t0 = t1;
- }
-};
-
-function MonotoneY(context) {
- this._context = new ReflectContext(context);
-}
-
-(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {
- MonotoneX.prototype.point.call(this, y, x);
-};
-
-function ReflectContext(context) {
- this._context = context;
-}
-
-ReflectContext.prototype = {
- moveTo: function(x, y) { this._context.moveTo(y, x); },
- closePath: function() { this._context.closePath(); },
- lineTo: function(x, y) { this._context.lineTo(y, x); },
- bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }
-};
-
-function monotoneX(context) {
- return new MonotoneX(context);
-}
-
-function monotoneY(context) {
- return new MonotoneY(context);
-}
-
-function Natural(context) {
- this._context = context;
-}
-
-Natural.prototype = {
- areaStart: function() {
- this._line = 0;
- },
- areaEnd: function() {
- this._line = NaN;
- },
- lineStart: function() {
- this._x = [];
- this._y = [];
- },
- lineEnd: function() {
- var x = this._x,
- y = this._y,
- n = x.length;
-
- if (n) {
- this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);
- if (n === 2) {
- this._context.lineTo(x[1], y[1]);
- } else {
- var px = controlPoints(x),
- py = controlPoints(y);
- for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {
- this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);
- }
- }
- }
-
- if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();
- this._line = 1 - this._line;
- this._x = this._y = null;
- },
- point: function(x, y) {
- this._x.push(+x);
- this._y.push(+y);
- }
-};
-
-// See https://www.particleincell.com/2012/bezier-splines/ for derivation.
-function controlPoints(x) {
- var i,
- n = x.length - 1,
- m,
- a = new Array(n),
- b = new Array(n),
- r = new Array(n);
- a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];
- for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];
- a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];
- for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];
- a[n - 1] = r[n - 1] / b[n - 1];
- for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];
- b[n - 1] = (x[n] + a[n - 1]) / 2;
- for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];
- return [a, b];
-}
-
-function natural(context) {
- return new Natural(context);
-}
-
-function Step(context, t) {
- this._context = context;
- this._t = t;
-}
-
-Step.prototype = {
- areaStart: function() {
- this._line = 0;
- },
- areaEnd: function() {
- this._line = NaN;
- },
- lineStart: function() {
- this._x = this._y = NaN;
- this._point = 0;
- },
- lineEnd: function() {
- if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);
- if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
- if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;
- },
- point: function(x, y) {
- x = +x, y = +y;
- switch (this._point) {
- case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
- case 1: this._point = 2; // proceed
- default: {
- if (this._t <= 0) {
- this._context.lineTo(this._x, y);
- this._context.lineTo(x, y);
- } else {
- var x1 = this._x * (1 - this._t) + x * this._t;
- this._context.lineTo(x1, this._y);
- this._context.lineTo(x1, y);
- }
- break;
- }
- }
- this._x = x, this._y = y;
- }
-};
-
-function step(context) {
- return new Step(context, 0.5);
-}
-
-function stepBefore(context) {
- return new Step(context, 0);
-}
-
-function stepAfter(context) {
- return new Step(context, 1);
-}
-
-function none$1(series, order) {
- if (!((n = series.length) > 1)) return;
- for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {
- s0 = s1, s1 = series[order[i]];
- for (j = 0; j < m; ++j) {
- s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];
- }
- }
-}
-
-function none$2(series) {
- var n = series.length, o = new Array(n);
- while (--n >= 0) o[n] = n;
- return o;
-}
-
-function stackValue(d, key) {
- return d[key];
-}
-
-function stack() {
- var keys = constant$10([]),
- order = none$2,
- offset = none$1,
- value = stackValue;
-
- function stack(data) {
- var kz = keys.apply(this, arguments),
- i,
- m = data.length,
- n = kz.length,
- sz = new Array(n),
- oz;
-
- for (i = 0; i < n; ++i) {
- for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {
- si[j] = sij = [0, +value(data[j], ki, j, data)];
- sij.data = data[j];
- }
- si.key = ki;
- }
-
- for (i = 0, oz = order(sz); i < n; ++i) {
- sz[oz[i]].index = i;
- }
-
- offset(sz, oz);
- return sz;
- }
-
- stack.keys = function(_) {
- return arguments.length ? (keys = typeof _ === "function" ? _ : constant$10(slice$6.call(_)), stack) : keys;
- };
-
- stack.value = function(_) {
- return arguments.length ? (value = typeof _ === "function" ? _ : constant$10(+_), stack) : value;
- };
-
- stack.order = function(_) {
- return arguments.length ? (order = _ == null ? none$2 : typeof _ === "function" ? _ : constant$10(slice$6.call(_)), stack) : order;
- };
-
- stack.offset = function(_) {
- return arguments.length ? (offset = _ == null ? none$1 : _, stack) : offset;
- };
-
- return stack;
-}
-
-function expand(series, order) {
- if (!((n = series.length) > 0)) return;
- for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {
- for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;
- if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;
- }
- none$1(series, order);
-}
-
-function diverging(series, order) {
- if (!((n = series.length) > 1)) return;
- for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {
- for (yp = yn = 0, i = 0; i < n; ++i) {
- if ((dy = (d = series[order[i]][j])[1] - d[0]) >= 0) {
- d[0] = yp, d[1] = yp += dy;
- } else if (dy < 0) {
- d[1] = yn, d[0] = yn += dy;
- } else {
- d[0] = yp;
- }
- }
- }
-}
-
-function silhouette(series, order) {
- if (!((n = series.length) > 0)) return;
- for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {
- for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;
- s0[j][1] += s0[j][0] = -y / 2;
- }
- none$1(series, order);
-}
-
-function wiggle(series, order) {
- if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;
- for (var y = 0, j = 1, s0, m, n; j < m; ++j) {
- for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {
- var si = series[order[i]],
- sij0 = si[j][1] || 0,
- sij1 = si[j - 1][1] || 0,
- s3 = (sij0 - sij1) / 2;
- for (var k = 0; k < i; ++k) {
- var sk = series[order[k]],
- skj0 = sk[j][1] || 0,
- skj1 = sk[j - 1][1] || 0;
- s3 += skj0 - skj1;
- }
- s1 += sij0, s2 += s3 * sij0;
- }
- s0[j - 1][1] += s0[j - 1][0] = y;
- if (s1) y -= s2 / s1;
- }
- s0[j - 1][1] += s0[j - 1][0] = y;
- none$1(series, order);
-}
-
-function ascending$2(series) {
- var sums = series.map(sum$2);
- return none$2(series).sort(function(a, b) { return sums[a] - sums[b]; });
-}
-
-function sum$2(series) {
- var s = 0, i = -1, n = series.length, v;
- while (++i < n) if (v = +series[i][1]) s += v;
- return s;
-}
-
-function descending$2(series) {
- return ascending$2(series).reverse();
-}
-
-function insideOut(series) {
- var n = series.length,
- i,
- j,
- sums = series.map(sum$2),
- order = none$2(series).sort(function(a, b) { return sums[b] - sums[a]; }),
- top = 0,
- bottom = 0,
- tops = [],
- bottoms = [];
-
- for (i = 0; i < n; ++i) {
- j = order[i];
- if (top < bottom) {
- top += sums[j];
- tops.push(j);
- } else {
- bottom += sums[j];
- bottoms.push(j);
- }
- }
-
- return bottoms.reverse().concat(tops);
-}
-
-function reverse(series) {
- return none$2(series).reverse();
-}
-
-function constant$11(x) {
- return function() {
- return x;
- };
-}
-
-function x$4(d) {
- return d[0];
-}
-
-function y$4(d) {
- return d[1];
-}
-
-function RedBlackTree() {
- this._ = null; // root node
-}
-
-function RedBlackNode(node) {
- node.U = // parent node
- node.C = // color - true for red, false for black
- node.L = // left node
- node.R = // right node
- node.P = // previous node
- node.N = null; // next node
-}
-
-RedBlackTree.prototype = {
- constructor: RedBlackTree,
-
- insert: function(after, node) {
- var parent, grandpa, uncle;
-
- if (after) {
- node.P = after;
- node.N = after.N;
- if (after.N) after.N.P = node;
- after.N = node;
- if (after.R) {
- after = after.R;
- while (after.L) after = after.L;
- after.L = node;
- } else {
- after.R = node;
- }
- parent = after;
- } else if (this._) {
- after = RedBlackFirst(this._);
- node.P = null;
- node.N = after;
- after.P = after.L = node;
- parent = after;
- } else {
- node.P = node.N = null;
- this._ = node;
- parent = null;
- }
- node.L = node.R = null;
- node.U = parent;
- node.C = true;
-
- after = node;
- while (parent && parent.C) {
- grandpa = parent.U;
- if (parent === grandpa.L) {
- uncle = grandpa.R;
- if (uncle && uncle.C) {
- parent.C = uncle.C = false;
- grandpa.C = true;
- after = grandpa;
- } else {
- if (after === parent.R) {
- RedBlackRotateLeft(this, parent);
- after = parent;
- parent = after.U;
- }
- parent.C = false;
- grandpa.C = true;
- RedBlackRotateRight(this, grandpa);
- }
- } else {
- uncle = grandpa.L;
- if (uncle && uncle.C) {
- parent.C = uncle.C = false;
- grandpa.C = true;
- after = grandpa;
- } else {
- if (after === parent.L) {
- RedBlackRotateRight(this, parent);
- after = parent;
- parent = after.U;
- }
- parent.C = false;
- grandpa.C = true;
- RedBlackRotateLeft(this, grandpa);
- }
- }
- parent = after.U;
- }
- this._.C = false;
- },
-
- remove: function(node) {
- if (node.N) node.N.P = node.P;
- if (node.P) node.P.N = node.N;
- node.N = node.P = null;
-
- var parent = node.U,
- sibling,
- left = node.L,
- right = node.R,
- next,
- red;
-
- if (!left) next = right;
- else if (!right) next = left;
- else next = RedBlackFirst(right);
-
- if (parent) {
- if (parent.L === node) parent.L = next;
- else parent.R = next;
- } else {
- this._ = next;
- }
-
- if (left && right) {
- red = next.C;
- next.C = node.C;
- next.L = left;
- left.U = next;
- if (next !== right) {
- parent = next.U;
- next.U = node.U;
- node = next.R;
- parent.L = node;
- next.R = right;
- right.U = next;
- } else {
- next.U = parent;
- parent = next;
- node = next.R;
- }
- } else {
- red = node.C;
- node = next;
- }
-
- if (node) node.U = parent;
- if (red) return;
- if (node && node.C) { node.C = false; return; }
-
- do {
- if (node === this._) break;
- if (node === parent.L) {
- sibling = parent.R;
- if (sibling.C) {
- sibling.C = false;
- parent.C = true;
- RedBlackRotateLeft(this, parent);
- sibling = parent.R;
- }
- if ((sibling.L && sibling.L.C)
- || (sibling.R && sibling.R.C)) {
- if (!sibling.R || !sibling.R.C) {
- sibling.L.C = false;
- sibling.C = true;
- RedBlackRotateRight(this, sibling);
- sibling = parent.R;
- }
- sibling.C = parent.C;
- parent.C = sibling.R.C = false;
- RedBlackRotateLeft(this, parent);
- node = this._;
- break;
- }
- } else {
- sibling = parent.L;
- if (sibling.C) {
- sibling.C = false;
- parent.C = true;
- RedBlackRotateRight(this, parent);
- sibling = parent.L;
- }
- if ((sibling.L && sibling.L.C)
- || (sibling.R && sibling.R.C)) {
- if (!sibling.L || !sibling.L.C) {
- sibling.R.C = false;
- sibling.C = true;
- RedBlackRotateLeft(this, sibling);
- sibling = parent.L;
- }
- sibling.C = parent.C;
- parent.C = sibling.L.C = false;
- RedBlackRotateRight(this, parent);
- node = this._;
- break;
- }
- }
- sibling.C = true;
- node = parent;
- parent = parent.U;
- } while (!node.C);
-
- if (node) node.C = false;
- }
-};
-
-function RedBlackRotateLeft(tree, node) {
- var p = node,
- q = node.R,
- parent = p.U;
-
- if (parent) {
- if (parent.L === p) parent.L = q;
- else parent.R = q;
- } else {
- tree._ = q;
- }
-
- q.U = parent;
- p.U = q;
- p.R = q.L;
- if (p.R) p.R.U = p;
- q.L = p;
-}
-
-function RedBlackRotateRight(tree, node) {
- var p = node,
- q = node.L,
- parent = p.U;
-
- if (parent) {
- if (parent.L === p) parent.L = q;
- else parent.R = q;
- } else {
- tree._ = q;
- }
-
- q.U = parent;
- p.U = q;
- p.L = q.R;
- if (p.L) p.L.U = p;
- q.R = p;
-}
-
-function RedBlackFirst(node) {
- while (node.L) node = node.L;
- return node;
-}
-
-function createEdge(left, right, v0, v1) {
- var edge = [null, null],
- index = edges.push(edge) - 1;
- edge.left = left;
- edge.right = right;
- if (v0) setEdgeEnd(edge, left, right, v0);
- if (v1) setEdgeEnd(edge, right, left, v1);
- cells[left.index].halfedges.push(index);
- cells[right.index].halfedges.push(index);
- return edge;
-}
-
-function createBorderEdge(left, v0, v1) {
- var edge = [v0, v1];
- edge.left = left;
- return edge;
-}
-
-function setEdgeEnd(edge, left, right, vertex) {
- if (!edge[0] && !edge[1]) {
- edge[0] = vertex;
- edge.left = left;
- edge.right = right;
- } else if (edge.left === right) {
- edge[1] = vertex;
- } else {
- edge[0] = vertex;
- }
-}
-
-// Liang–Barsky line clipping.
-function clipEdge(edge, x0, y0, x1, y1) {
- var a = edge[0],
- b = edge[1],
- ax = a[0],
- ay = a[1],
- bx = b[0],
- by = b[1],
- t0 = 0,
- t1 = 1,
- dx = bx - ax,
- dy = by - ay,
- r;
-
- r = x0 - ax;
- if (!dx && r > 0) return;
- r /= dx;
- if (dx < 0) {
- if (r < t0) return;
- if (r < t1) t1 = r;
- } else if (dx > 0) {
- if (r > t1) return;
- if (r > t0) t0 = r;
- }
-
- r = x1 - ax;
- if (!dx && r < 0) return;
- r /= dx;
- if (dx < 0) {
- if (r > t1) return;
- if (r > t0) t0 = r;
- } else if (dx > 0) {
- if (r < t0) return;
- if (r < t1) t1 = r;
- }
-
- r = y0 - ay;
- if (!dy && r > 0) return;
- r /= dy;
- if (dy < 0) {
- if (r < t0) return;
- if (r < t1) t1 = r;
- } else if (dy > 0) {
- if (r > t1) return;
- if (r > t0) t0 = r;
- }
-
- r = y1 - ay;
- if (!dy && r < 0) return;
- r /= dy;
- if (dy < 0) {
- if (r > t1) return;
- if (r > t0) t0 = r;
- } else if (dy > 0) {
- if (r < t0) return;
- if (r < t1) t1 = r;
- }
-
- if (!(t0 > 0) && !(t1 < 1)) return true; // TODO Better check?
-
- if (t0 > 0) edge[0] = [ax + t0 * dx, ay + t0 * dy];
- if (t1 < 1) edge[1] = [ax + t1 * dx, ay + t1 * dy];
- return true;
-}
-
-function connectEdge(edge, x0, y0, x1, y1) {
- var v1 = edge[1];
- if (v1) return true;
-
- var v0 = edge[0],
- left = edge.left,
- right = edge.right,
- lx = left[0],
- ly = left[1],
- rx = right[0],
- ry = right[1],
- fx = (lx + rx) / 2,
- fy = (ly + ry) / 2,
- fm,
- fb;
-
- if (ry === ly) {
- if (fx < x0 || fx >= x1) return;
- if (lx > rx) {
- if (!v0) v0 = [fx, y0];
- else if (v0[1] >= y1) return;
- v1 = [fx, y1];
- } else {
- if (!v0) v0 = [fx, y1];
- else if (v0[1] < y0) return;
- v1 = [fx, y0];
- }
- } else {
- fm = (lx - rx) / (ry - ly);
- fb = fy - fm * fx;
- if (fm < -1 || fm > 1) {
- if (lx > rx) {
- if (!v0) v0 = [(y0 - fb) / fm, y0];
- else if (v0[1] >= y1) return;
- v1 = [(y1 - fb) / fm, y1];
- } else {
- if (!v0) v0 = [(y1 - fb) / fm, y1];
- else if (v0[1] < y0) return;
- v1 = [(y0 - fb) / fm, y0];
- }
- } else {
- if (ly < ry) {
- if (!v0) v0 = [x0, fm * x0 + fb];
- else if (v0[0] >= x1) return;
- v1 = [x1, fm * x1 + fb];
- } else {
- if (!v0) v0 = [x1, fm * x1 + fb];
- else if (v0[0] < x0) return;
- v1 = [x0, fm * x0 + fb];
- }
- }
- }
-
- edge[0] = v0;
- edge[1] = v1;
- return true;
-}
-
-function clipEdges(x0, y0, x1, y1) {
- var i = edges.length,
- edge;
-
- while (i--) {
- if (!connectEdge(edge = edges[i], x0, y0, x1, y1)
- || !clipEdge(edge, x0, y0, x1, y1)
- || !(Math.abs(edge[0][0] - edge[1][0]) > epsilon$4
- || Math.abs(edge[0][1] - edge[1][1]) > epsilon$4)) {
- delete edges[i];
- }
- }
-}
-
-function createCell(site) {
- return cells[site.index] = {
- site: site,
- halfedges: []
- };
-}
-
-function cellHalfedgeAngle(cell, edge) {
- var site = cell.site,
- va = edge.left,
- vb = edge.right;
- if (site === vb) vb = va, va = site;
- if (vb) return Math.atan2(vb[1] - va[1], vb[0] - va[0]);
- if (site === va) va = edge[1], vb = edge[0];
- else va = edge[0], vb = edge[1];
- return Math.atan2(va[0] - vb[0], vb[1] - va[1]);
-}
-
-function cellHalfedgeStart(cell, edge) {
- return edge[+(edge.left !== cell.site)];
-}
-
-function cellHalfedgeEnd(cell, edge) {
- return edge[+(edge.left === cell.site)];
-}
-
-function sortCellHalfedges() {
- for (var i = 0, n = cells.length, cell, halfedges, j, m; i < n; ++i) {
- if ((cell = cells[i]) && (m = (halfedges = cell.halfedges).length)) {
- var index = new Array(m),
- array = new Array(m);
- for (j = 0; j < m; ++j) index[j] = j, array[j] = cellHalfedgeAngle(cell, edges[halfedges[j]]);
- index.sort(function(i, j) { return array[j] - array[i]; });
- for (j = 0; j < m; ++j) array[j] = halfedges[index[j]];
- for (j = 0; j < m; ++j) halfedges[j] = array[j];
- }
- }
-}
-
-function clipCells(x0, y0, x1, y1) {
- var nCells = cells.length,
- iCell,
- cell,
- site,
- iHalfedge,
- halfedges,
- nHalfedges,
- start,
- startX,
- startY,
- end,
- endX,
- endY,
- cover = true;
-
- for (iCell = 0; iCell < nCells; ++iCell) {
- if (cell = cells[iCell]) {
- site = cell.site;
- halfedges = cell.halfedges;
- iHalfedge = halfedges.length;
-
- // Remove any dangling clipped edges.
- while (iHalfedge--) {
- if (!edges[halfedges[iHalfedge]]) {
- halfedges.splice(iHalfedge, 1);
- }
- }
-
- // Insert any border edges as necessary.
- iHalfedge = 0, nHalfedges = halfedges.length;
- while (iHalfedge < nHalfedges) {
- end = cellHalfedgeEnd(cell, edges[halfedges[iHalfedge]]), endX = end[0], endY = end[1];
- start = cellHalfedgeStart(cell, edges[halfedges[++iHalfedge % nHalfedges]]), startX = start[0], startY = start[1];
- if (Math.abs(endX - startX) > epsilon$4 || Math.abs(endY - startY) > epsilon$4) {
- halfedges.splice(iHalfedge, 0, edges.push(createBorderEdge(site, end,
- Math.abs(endX - x0) < epsilon$4 && y1 - endY > epsilon$4 ? [x0, Math.abs(startX - x0) < epsilon$4 ? startY : y1]
- : Math.abs(endY - y1) < epsilon$4 && x1 - endX > epsilon$4 ? [Math.abs(startY - y1) < epsilon$4 ? startX : x1, y1]
- : Math.abs(endX - x1) < epsilon$4 && endY - y0 > epsilon$4 ? [x1, Math.abs(startX - x1) < epsilon$4 ? startY : y0]
- : Math.abs(endY - y0) < epsilon$4 && endX - x0 > epsilon$4 ? [Math.abs(startY - y0) < epsilon$4 ? startX : x0, y0]
- : null)) - 1);
- ++nHalfedges;
- }
- }
-
- if (nHalfedges) cover = false;
- }
- }
-
- // If there weren’t any edges, have the closest site cover the extent.
- // It doesn’t matter which corner of the extent we measure!
- if (cover) {
- var dx, dy, d2, dc = Infinity;
-
- for (iCell = 0, cover = null; iCell < nCells; ++iCell) {
- if (cell = cells[iCell]) {
- site = cell.site;
- dx = site[0] - x0;
- dy = site[1] - y0;
- d2 = dx * dx + dy * dy;
- if (d2 < dc) dc = d2, cover = cell;
- }
- }
-
- if (cover) {
- var v00 = [x0, y0], v01 = [x0, y1], v11 = [x1, y1], v10 = [x1, y0];
- cover.halfedges.push(
- edges.push(createBorderEdge(site = cover.site, v00, v01)) - 1,
- edges.push(createBorderEdge(site, v01, v11)) - 1,
- edges.push(createBorderEdge(site, v11, v10)) - 1,
- edges.push(createBorderEdge(site, v10, v00)) - 1
- );
- }
- }
-
- // Lastly delete any cells with no edges; these were entirely clipped.
- for (iCell = 0; iCell < nCells; ++iCell) {
- if (cell = cells[iCell]) {
- if (!cell.halfedges.length) {
- delete cells[iCell];
- }
- }
- }
-}
-
-var circlePool = [];
-
-var firstCircle;
-
-function Circle() {
- RedBlackNode(this);
- this.x =
- this.y =
- this.arc =
- this.site =
- this.cy = null;
-}
-
-function attachCircle(arc) {
- var lArc = arc.P,
- rArc = arc.N;
-
- if (!lArc || !rArc) return;
-
- var lSite = lArc.site,
- cSite = arc.site,
- rSite = rArc.site;
-
- if (lSite === rSite) return;
-
- var bx = cSite[0],
- by = cSite[1],
- ax = lSite[0] - bx,
- ay = lSite[1] - by,
- cx = rSite[0] - bx,
- cy = rSite[1] - by;
-
- var d = 2 * (ax * cy - ay * cx);
- if (d >= -epsilon2$2) return;
-
- var ha = ax * ax + ay * ay,
- hc = cx * cx + cy * cy,
- x = (cy * ha - ay * hc) / d,
- y = (ax * hc - cx * ha) / d;
-
- var circle = circlePool.pop() || new Circle;
- circle.arc = arc;
- circle.site = cSite;
- circle.x = x + bx;
- circle.y = (circle.cy = y + by) + Math.sqrt(x * x + y * y); // y bottom
-
- arc.circle = circle;
-
- var before = null,
- node = circles._;
-
- while (node) {
- if (circle.y < node.y || (circle.y === node.y && circle.x <= node.x)) {
- if (node.L) node = node.L;
- else { before = node.P; break; }
- } else {
- if (node.R) node = node.R;
- else { before = node; break; }
- }
- }
-
- circles.insert(before, circle);
- if (!before) firstCircle = circle;
-}
-
-function detachCircle(arc) {
- var circle = arc.circle;
- if (circle) {
- if (!circle.P) firstCircle = circle.N;
- circles.remove(circle);
- circlePool.push(circle);
- RedBlackNode(circle);
- arc.circle = null;
- }
-}
-
-var beachPool = [];
-
-function Beach() {
- RedBlackNode(this);
- this.edge =
- this.site =
- this.circle = null;
-}
-
-function createBeach(site) {
- var beach = beachPool.pop() || new Beach;
- beach.site = site;
- return beach;
-}
-
-function detachBeach(beach) {
- detachCircle(beach);
- beaches.remove(beach);
- beachPool.push(beach);
- RedBlackNode(beach);
-}
-
-function removeBeach(beach) {
- var circle = beach.circle,
- x = circle.x,
- y = circle.cy,
- vertex = [x, y],
- previous = beach.P,
- next = beach.N,
- disappearing = [beach];
-
- detachBeach(beach);
-
- var lArc = previous;
- while (lArc.circle
- && Math.abs(x - lArc.circle.x) < epsilon$4
- && Math.abs(y - lArc.circle.cy) < epsilon$4) {
- previous = lArc.P;
- disappearing.unshift(lArc);
- detachBeach(lArc);
- lArc = previous;
- }
-
- disappearing.unshift(lArc);
- detachCircle(lArc);
-
- var rArc = next;
- while (rArc.circle
- && Math.abs(x - rArc.circle.x) < epsilon$4
- && Math.abs(y - rArc.circle.cy) < epsilon$4) {
- next = rArc.N;
- disappearing.push(rArc);
- detachBeach(rArc);
- rArc = next;
- }
-
- disappearing.push(rArc);
- detachCircle(rArc);
-
- var nArcs = disappearing.length,
- iArc;
- for (iArc = 1; iArc < nArcs; ++iArc) {
- rArc = disappearing[iArc];
- lArc = disappearing[iArc - 1];
- setEdgeEnd(rArc.edge, lArc.site, rArc.site, vertex);
- }
-
- lArc = disappearing[0];
- rArc = disappearing[nArcs - 1];
- rArc.edge = createEdge(lArc.site, rArc.site, null, vertex);
-
- attachCircle(lArc);
- attachCircle(rArc);
-}
-
-function addBeach(site) {
- var x = site[0],
- directrix = site[1],
- lArc,
- rArc,
- dxl,
- dxr,
- node = beaches._;
-
- while (node) {
- dxl = leftBreakPoint(node, directrix) - x;
- if (dxl > epsilon$4) node = node.L; else {
- dxr = x - rightBreakPoint(node, directrix);
- if (dxr > epsilon$4) {
- if (!node.R) {
- lArc = node;
- break;
- }
- node = node.R;
- } else {
- if (dxl > -epsilon$4) {
- lArc = node.P;
- rArc = node;
- } else if (dxr > -epsilon$4) {
- lArc = node;
- rArc = node.N;
- } else {
- lArc = rArc = node;
- }
- break;
- }
- }
- }
-
- createCell(site);
- var newArc = createBeach(site);
- beaches.insert(lArc, newArc);
-
- if (!lArc && !rArc) return;
-
- if (lArc === rArc) {
- detachCircle(lArc);
- rArc = createBeach(lArc.site);
- beaches.insert(newArc, rArc);
- newArc.edge = rArc.edge = createEdge(lArc.site, newArc.site);
- attachCircle(lArc);
- attachCircle(rArc);
- return;
- }
-
- if (!rArc) { // && lArc
- newArc.edge = createEdge(lArc.site, newArc.site);
- return;
- }
-
- // else lArc !== rArc
- detachCircle(lArc);
- detachCircle(rArc);
-
- var lSite = lArc.site,
- ax = lSite[0],
- ay = lSite[1],
- bx = site[0] - ax,
- by = site[1] - ay,
- rSite = rArc.site,
- cx = rSite[0] - ax,
- cy = rSite[1] - ay,
- d = 2 * (bx * cy - by * cx),
- hb = bx * bx + by * by,
- hc = cx * cx + cy * cy,
- vertex = [(cy * hb - by * hc) / d + ax, (bx * hc - cx * hb) / d + ay];
-
- setEdgeEnd(rArc.edge, lSite, rSite, vertex);
- newArc.edge = createEdge(lSite, site, null, vertex);
- rArc.edge = createEdge(site, rSite, null, vertex);
- attachCircle(lArc);
- attachCircle(rArc);
-}
-
-function leftBreakPoint(arc, directrix) {
- var site = arc.site,
- rfocx = site[0],
- rfocy = site[1],
- pby2 = rfocy - directrix;
-
- if (!pby2) return rfocx;
-
- var lArc = arc.P;
- if (!lArc) return -Infinity;
-
- site = lArc.site;
- var lfocx = site[0],
- lfocy = site[1],
- plby2 = lfocy - directrix;
-
- if (!plby2) return lfocx;
-
- var hl = lfocx - rfocx,
- aby2 = 1 / pby2 - 1 / plby2,
- b = hl / plby2;
-
- if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx;
-
- return (rfocx + lfocx) / 2;
-}
-
-function rightBreakPoint(arc, directrix) {
- var rArc = arc.N;
- if (rArc) return leftBreakPoint(rArc, directrix);
- var site = arc.site;
- return site[1] === directrix ? site[0] : Infinity;
-}
-
-var epsilon$4 = 1e-6;
-var epsilon2$2 = 1e-12;
-var beaches;
-var cells;
-var circles;
-var edges;
-
-function triangleArea(a, b, c) {
- return (a[0] - c[0]) * (b[1] - a[1]) - (a[0] - b[0]) * (c[1] - a[1]);
-}
-
-function lexicographic(a, b) {
- return b[1] - a[1]
- || b[0] - a[0];
-}
-
-function Diagram(sites, extent) {
- var site = sites.sort(lexicographic).pop(),
- x,
- y,
- circle;
-
- edges = [];
- cells = new Array(sites.length);
- beaches = new RedBlackTree;
- circles = new RedBlackTree;
-
- while (true) {
- circle = firstCircle;
- if (site && (!circle || site[1] < circle.y || (site[1] === circle.y && site[0] < circle.x))) {
- if (site[0] !== x || site[1] !== y) {
- addBeach(site);
- x = site[0], y = site[1];
- }
- site = sites.pop();
- } else if (circle) {
- removeBeach(circle.arc);
- } else {
- break;
- }
- }
-
- sortCellHalfedges();
-
- if (extent) {
- var x0 = +extent[0][0],
- y0 = +extent[0][1],
- x1 = +extent[1][0],
- y1 = +extent[1][1];
- clipEdges(x0, y0, x1, y1);
- clipCells(x0, y0, x1, y1);
- }
-
- this.edges = edges;
- this.cells = cells;
-
- beaches =
- circles =
- edges =
- cells = null;
-}
-
-Diagram.prototype = {
- constructor: Diagram,
-
- polygons: function() {
- var edges = this.edges;
-
- return this.cells.map(function(cell) {
- var polygon = cell.halfedges.map(function(i) { return cellHalfedgeStart(cell, edges[i]); });
- polygon.data = cell.site.data;
- return polygon;
- });
- },
-
- triangles: function() {
- var triangles = [],
- edges = this.edges;
-
- this.cells.forEach(function(cell, i) {
- if (!(m = (halfedges = cell.halfedges).length)) return;
- var site = cell.site,
- halfedges,
- j = -1,
- m,
- s0,
- e1 = edges[halfedges[m - 1]],
- s1 = e1.left === site ? e1.right : e1.left;
-
- while (++j < m) {
- s0 = s1;
- e1 = edges[halfedges[j]];
- s1 = e1.left === site ? e1.right : e1.left;
- if (s0 && s1 && i < s0.index && i < s1.index && triangleArea(site, s0, s1) < 0) {
- triangles.push([site.data, s0.data, s1.data]);
- }
- }
- });
-
- return triangles;
- },
-
- links: function() {
- return this.edges.filter(function(edge) {
- return edge.right;
- }).map(function(edge) {
- return {
- source: edge.left.data,
- target: edge.right.data
- };
- });
- },
-
- find: function(x, y, radius) {
- var that = this, i0, i1 = that._found || 0, n = that.cells.length, cell;
-
- // Use the previously-found cell, or start with an arbitrary one.
- while (!(cell = that.cells[i1])) if (++i1 >= n) return null;
- var dx = x - cell.site[0], dy = y - cell.site[1], d2 = dx * dx + dy * dy;
-
- // Traverse the half-edges to find a closer cell, if any.
- do {
- cell = that.cells[i0 = i1], i1 = null;
- cell.halfedges.forEach(function(e) {
- var edge = that.edges[e], v = edge.left;
- if ((v === cell.site || !v) && !(v = edge.right)) return;
- var vx = x - v[0], vy = y - v[1], v2 = vx * vx + vy * vy;
- if (v2 < d2) d2 = v2, i1 = v.index;
- });
- } while (i1 !== null);
-
- that._found = i0;
-
- return radius == null || d2 <= radius * radius ? cell.site : null;
- }
-};
-
-function voronoi() {
- var x$$1 = x$4,
- y$$1 = y$4,
- extent = null;
-
- function voronoi(data) {
- return new Diagram(data.map(function(d, i) {
- var s = [Math.round(x$$1(d, i, data) / epsilon$4) * epsilon$4, Math.round(y$$1(d, i, data) / epsilon$4) * epsilon$4];
- s.index = i;
- s.data = d;
- return s;
- }), extent);
- }
-
- voronoi.polygons = function(data) {
- return voronoi(data).polygons();
- };
-
- voronoi.links = function(data) {
- return voronoi(data).links();
- };
-
- voronoi.triangles = function(data) {
- return voronoi(data).triangles();
- };
-
- voronoi.x = function(_) {
- return arguments.length ? (x$$1 = typeof _ === "function" ? _ : constant$11(+_), voronoi) : x$$1;
- };
-
- voronoi.y = function(_) {
- return arguments.length ? (y$$1 = typeof _ === "function" ? _ : constant$11(+_), voronoi) : y$$1;
- };
-
- voronoi.extent = function(_) {
- return arguments.length ? (extent = _ == null ? null : [[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]], voronoi) : extent && [[extent[0][0], extent[0][1]], [extent[1][0], extent[1][1]]];
- };
-
- voronoi.size = function(_) {
- return arguments.length ? (extent = _ == null ? null : [[0, 0], [+_[0], +_[1]]], voronoi) : extent && [extent[1][0] - extent[0][0], extent[1][1] - extent[0][1]];
- };
-
- return voronoi;
-}
-
-function constant$12(x) {
- return function() {
- return x;
- };
-}
-
-function ZoomEvent(target, type, transform) {
- this.target = target;
- this.type = type;
- this.transform = transform;
-}
-
-function Transform(k, x, y) {
- this.k = k;
- this.x = x;
- this.y = y;
-}
-
-Transform.prototype = {
- constructor: Transform,
- scale: function(k) {
- return k === 1 ? this : new Transform(this.k * k, this.x, this.y);
- },
- translate: function(x, y) {
- return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);
- },
- apply: function(point) {
- return [point[0] * this.k + this.x, point[1] * this.k + this.y];
- },
- applyX: function(x) {
- return x * this.k + this.x;
- },
- applyY: function(y) {
- return y * this.k + this.y;
- },
- invert: function(location) {
- return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
- },
- invertX: function(x) {
- return (x - this.x) / this.k;
- },
- invertY: function(y) {
- return (y - this.y) / this.k;
- },
- rescaleX: function(x) {
- return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));
- },
- rescaleY: function(y) {
- return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));
- },
- toString: function() {
- return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
- }
-};
-
-var identity$8 = new Transform(1, 0, 0);
-
-transform$1.prototype = Transform.prototype;
-
-function transform$1(node) {
- return node.__zoom || identity$8;
-}
-
-function nopropagation$2() {
- exports.event.stopImmediatePropagation();
-}
-
-function noevent$2() {
- exports.event.preventDefault();
- exports.event.stopImmediatePropagation();
-}
-
-// Ignore right-click, since that should open the context menu.
-function defaultFilter$2() {
- return !exports.event.button;
-}
-
-function defaultExtent$1() {
- var e = this, w, h;
- if (e instanceof SVGElement) {
- e = e.ownerSVGElement || e;
- w = e.width.baseVal.value;
- h = e.height.baseVal.value;
- } else {
- w = e.clientWidth;
- h = e.clientHeight;
- }
- return [[0, 0], [w, h]];
-}
-
-function defaultTransform() {
- return this.__zoom || identity$8;
-}
-
-function defaultWheelDelta() {
- return -exports.event.deltaY * (exports.event.deltaMode ? 120 : 1) / 500;
-}
-
-function defaultTouchable$1() {
- return "ontouchstart" in this;
-}
-
-function defaultConstrain(transform$$1, extent, translateExtent) {
- var dx0 = transform$$1.invertX(extent[0][0]) - translateExtent[0][0],
- dx1 = transform$$1.invertX(extent[1][0]) - translateExtent[1][0],
- dy0 = transform$$1.invertY(extent[0][1]) - translateExtent[0][1],
- dy1 = transform$$1.invertY(extent[1][1]) - translateExtent[1][1];
- return transform$$1.translate(
- dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),
- dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)
- );
-}
-
-function zoom() {
- var filter = defaultFilter$2,
- extent = defaultExtent$1,
- constrain = defaultConstrain,
- wheelDelta = defaultWheelDelta,
- touchable = defaultTouchable$1,
- scaleExtent = [0, Infinity],
- translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],
- duration = 250,
- interpolate = interpolateZoom,
- gestures = [],
- listeners = dispatch("start", "zoom", "end"),
- touchstarting,
- touchending,
- touchDelay = 500,
- wheelDelay = 150,
- clickDistance2 = 0;
-
- function zoom(selection) {
- selection
- .property("__zoom", defaultTransform)
- .on("wheel.zoom", wheeled)
- .on("mousedown.zoom", mousedowned)
- .on("dblclick.zoom", dblclicked)
- .filter(touchable)
- .on("touchstart.zoom", touchstarted)
- .on("touchmove.zoom", touchmoved)
- .on("touchend.zoom touchcancel.zoom", touchended)
- .style("touch-action", "none")
- .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
- }
-
- zoom.transform = function(collection, transform$$1) {
- var selection = collection.selection ? collection.selection() : collection;
- selection.property("__zoom", defaultTransform);
- if (collection !== selection) {
- schedule(collection, transform$$1);
- } else {
- selection.interrupt().each(function() {
- gesture(this, arguments)
- .start()
- .zoom(null, typeof transform$$1 === "function" ? transform$$1.apply(this, arguments) : transform$$1)
- .end();
- });
- }
- };
-
- zoom.scaleBy = function(selection, k) {
- zoom.scaleTo(selection, function() {
- var k0 = this.__zoom.k,
- k1 = typeof k === "function" ? k.apply(this, arguments) : k;
- return k0 * k1;
- });
- };
-
- zoom.scaleTo = function(selection, k) {
- zoom.transform(selection, function() {
- var e = extent.apply(this, arguments),
- t0 = this.__zoom,
- p0 = centroid(e),
- p1 = t0.invert(p0),
- k1 = typeof k === "function" ? k.apply(this, arguments) : k;
- return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);
- });
- };
-
- zoom.translateBy = function(selection, x, y) {
- zoom.transform(selection, function() {
- return constrain(this.__zoom.translate(
- typeof x === "function" ? x.apply(this, arguments) : x,
- typeof y === "function" ? y.apply(this, arguments) : y
- ), extent.apply(this, arguments), translateExtent);
- });
- };
-
- zoom.translateTo = function(selection, x, y) {
- zoom.transform(selection, function() {
- var e = extent.apply(this, arguments),
- t = this.__zoom,
- p = centroid(e);
- return constrain(identity$8.translate(p[0], p[1]).scale(t.k).translate(
- typeof x === "function" ? -x.apply(this, arguments) : -x,
- typeof y === "function" ? -y.apply(this, arguments) : -y
- ), e, translateExtent);
- });
- };
-
- function scale(transform$$1, k) {
- k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));
- return k === transform$$1.k ? transform$$1 : new Transform(k, transform$$1.x, transform$$1.y);
- }
-
- function translate(transform$$1, p0, p1) {
- var x = p0[0] - p1[0] * transform$$1.k, y = p0[1] - p1[1] * transform$$1.k;
- return x === transform$$1.x && y === transform$$1.y ? transform$$1 : new Transform(transform$$1.k, x, y);
- }
-
- function centroid(extent) {
- return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];
- }
-
- function schedule(transition, transform$$1, center) {
- transition
- .on("start.zoom", function() { gesture(this, arguments).start(); })
- .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).end(); })
- .tween("zoom", function() {
- var that = this,
- args = arguments,
- g = gesture(that, args),
- e = extent.apply(that, args),
- p = center || centroid(e),
- w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),
- a = that.__zoom,
- b = typeof transform$$1 === "function" ? transform$$1.apply(that, args) : transform$$1,
- i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
- return function(t) {
- if (t === 1) t = b; // Avoid rounding error on end.
- else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }
- g.zoom(null, t);
- };
- });
- }
-
- function gesture(that, args) {
- for (var i = 0, n = gestures.length, g; i < n; ++i) {
- if ((g = gestures[i]).that === that) {
- return g;
- }
- }
- return new Gesture(that, args);
- }
-
- function Gesture(that, args) {
- this.that = that;
- this.args = args;
- this.index = -1;
- this.active = 0;
- this.extent = extent.apply(that, args);
- }
-
- Gesture.prototype = {
- start: function() {
- if (++this.active === 1) {
- this.index = gestures.push(this) - 1;
- this.emit("start");
- }
- return this;
- },
- zoom: function(key, transform$$1) {
- if (this.mouse && key !== "mouse") this.mouse[1] = transform$$1.invert(this.mouse[0]);
- if (this.touch0 && key !== "touch") this.touch0[1] = transform$$1.invert(this.touch0[0]);
- if (this.touch1 && key !== "touch") this.touch1[1] = transform$$1.invert(this.touch1[0]);
- this.that.__zoom = transform$$1;
- this.emit("zoom");
- return this;
- },
- end: function() {
- if (--this.active === 0) {
- gestures.splice(this.index, 1);
- this.index = -1;
- this.emit("end");
- }
- return this;
- },
- emit: function(type) {
- customEvent(new ZoomEvent(zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]);
- }
- };
-
- function wheeled() {
- if (!filter.apply(this, arguments)) return;
- var g = gesture(this, arguments),
- t = this.__zoom,
- k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),
- p = mouse(this);
-
- // If the mouse is in the same location as before, reuse it.
- // If there were recent wheel events, reset the wheel idle timeout.
- if (g.wheel) {
- if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {
- g.mouse[1] = t.invert(g.mouse[0] = p);
- }
- clearTimeout(g.wheel);
- }
-
- // If this wheel event won’t trigger a transform change, ignore it.
- else if (t.k === k) return;
-
- // Otherwise, capture the mouse point and location at the start.
- else {
- g.mouse = [p, t.invert(p)];
- interrupt(this);
- g.start();
- }
-
- noevent$2();
- g.wheel = setTimeout(wheelidled, wheelDelay);
- g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));
-
- function wheelidled() {
- g.wheel = null;
- g.end();
- }
- }
-
- function mousedowned() {
- if (touchending || !filter.apply(this, arguments)) return;
- var g = gesture(this, arguments),
- v = select(exports.event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true),
- p = mouse(this),
- x0 = exports.event.clientX,
- y0 = exports.event.clientY;
-
- dragDisable(exports.event.view);
- nopropagation$2();
- g.mouse = [p, this.__zoom.invert(p)];
- interrupt(this);
- g.start();
-
- function mousemoved() {
- noevent$2();
- if (!g.moved) {
- var dx = exports.event.clientX - x0, dy = exports.event.clientY - y0;
- g.moved = dx * dx + dy * dy > clickDistance2;
- }
- g.zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = mouse(g.that), g.mouse[1]), g.extent, translateExtent));
- }
-
- function mouseupped() {
- v.on("mousemove.zoom mouseup.zoom", null);
- yesdrag(exports.event.view, g.moved);
- noevent$2();
- g.end();
- }
- }
-
- function dblclicked() {
- if (!filter.apply(this, arguments)) return;
- var t0 = this.__zoom,
- p0 = mouse(this),
- p1 = t0.invert(p0),
- k1 = t0.k * (exports.event.shiftKey ? 0.5 : 2),
- t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent);
-
- noevent$2();
- if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0);
- else select(this).call(zoom.transform, t1);
- }
-
- function touchstarted() {
- if (!filter.apply(this, arguments)) return;
- var g = gesture(this, arguments),
- touches = exports.event.changedTouches,
- started,
- n = touches.length, i, t, p;
-
- nopropagation$2();
- for (i = 0; i < n; ++i) {
- t = touches[i], p = touch(this, touches, t.identifier);
- p = [p, this.__zoom.invert(p), t.identifier];
- if (!g.touch0) g.touch0 = p, started = true;
- else if (!g.touch1) g.touch1 = p;
- }
-
- // If this is a dbltap, reroute to the (optional) dblclick.zoom handler.
- if (touchstarting) {
- touchstarting = clearTimeout(touchstarting);
- if (!g.touch1) {
- g.end();
- p = select(this).on("dblclick.zoom");
- if (p) p.apply(this, arguments);
- return;
- }
- }
-
- if (started) {
- touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);
- interrupt(this);
- g.start();
- }
- }
-
- function touchmoved() {
- var g = gesture(this, arguments),
- touches = exports.event.changedTouches,
- n = touches.length, i, t, p, l;
-
- noevent$2();
- if (touchstarting) touchstarting = clearTimeout(touchstarting);
- for (i = 0; i < n; ++i) {
- t = touches[i], p = touch(this, touches, t.identifier);
- if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
- else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
- }
- t = g.that.__zoom;
- if (g.touch1) {
- var p0 = g.touch0[0], l0 = g.touch0[1],
- p1 = g.touch1[0], l1 = g.touch1[1],
- dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,
- dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;
- t = scale(t, Math.sqrt(dp / dl));
- p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
- l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
- }
- else if (g.touch0) p = g.touch0[0], l = g.touch0[1];
- else return;
- g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent));
- }
-
- function touchended() {
- var g = gesture(this, arguments),
- touches = exports.event.changedTouches,
- n = touches.length, i, t;
-
- nopropagation$2();
- if (touchending) clearTimeout(touchending);
- touchending = setTimeout(function() { touchending = null; }, touchDelay);
- for (i = 0; i < n; ++i) {
- t = touches[i];
- if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;
- else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
- }
- if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;
- if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);
- else g.end();
- }
-
- zoom.wheelDelta = function(_) {
- return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant$12(+_), zoom) : wheelDelta;
- };
-
- zoom.filter = function(_) {
- return arguments.length ? (filter = typeof _ === "function" ? _ : constant$12(!!_), zoom) : filter;
- };
-
- zoom.touchable = function(_) {
- return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$12(!!_), zoom) : touchable;
- };
-
- zoom.extent = function(_) {
- return arguments.length ? (extent = typeof _ === "function" ? _ : constant$12([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;
- };
-
- zoom.scaleExtent = function(_) {
- return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];
- };
-
- zoom.translateExtent = function(_) {
- return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];
- };
-
- zoom.constrain = function(_) {
- return arguments.length ? (constrain = _, zoom) : constrain;
- };
-
- zoom.duration = function(_) {
- return arguments.length ? (duration = +_, zoom) : duration;
- };
-
- zoom.interpolate = function(_) {
- return arguments.length ? (interpolate = _, zoom) : interpolate;
- };
-
- zoom.on = function() {
- var value = listeners.on.apply(listeners, arguments);
- return value === listeners ? zoom : value;
- };
-
- zoom.clickDistance = function(_) {
- return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);
- };
-
- return zoom;
-}
-
-exports.version = version;
-exports.bisect = bisectRight;
-exports.bisectRight = bisectRight;
-exports.bisectLeft = bisectLeft;
-exports.ascending = ascending;
-exports.bisector = bisector;
-exports.cross = cross;
-exports.descending = descending;
-exports.deviation = deviation;
-exports.extent = extent;
-exports.histogram = histogram;
-exports.thresholdFreedmanDiaconis = freedmanDiaconis;
-exports.thresholdScott = scott;
-exports.thresholdSturges = sturges;
-exports.max = max;
-exports.mean = mean;
-exports.median = median;
-exports.merge = merge;
-exports.min = min;
-exports.pairs = pairs;
-exports.permute = permute;
-exports.quantile = threshold;
-exports.range = sequence;
-exports.scan = scan;
-exports.shuffle = shuffle;
-exports.sum = sum;
-exports.ticks = ticks;
-exports.tickIncrement = tickIncrement;
-exports.tickStep = tickStep;
-exports.transpose = transpose;
-exports.variance = variance;
-exports.zip = zip;
-exports.axisTop = axisTop;
-exports.axisRight = axisRight;
-exports.axisBottom = axisBottom;
-exports.axisLeft = axisLeft;
-exports.brush = brush;
-exports.brushX = brushX;
-exports.brushY = brushY;
-exports.brushSelection = brushSelection;
-exports.chord = chord;
-exports.ribbon = ribbon;
-exports.nest = nest;
-exports.set = set$2;
-exports.map = map$1;
-exports.keys = keys;
-exports.values = values;
-exports.entries = entries;
-exports.color = color;
-exports.rgb = rgb;
-exports.hsl = hsl;
-exports.lab = lab;
-exports.hcl = hcl;
-exports.cubehelix = cubehelix;
-exports.dispatch = dispatch;
-exports.drag = drag;
-exports.dragDisable = dragDisable;
-exports.dragEnable = yesdrag;
-exports.dsvFormat = dsv;
-exports.csvParse = csvParse;
-exports.csvParseRows = csvParseRows;
-exports.csvFormat = csvFormat;
-exports.csvFormatRows = csvFormatRows;
-exports.tsvParse = tsvParse;
-exports.tsvParseRows = tsvParseRows;
-exports.tsvFormat = tsvFormat;
-exports.tsvFormatRows = tsvFormatRows;
-exports.easeLinear = linear$1;
-exports.easeQuad = quadInOut;
-exports.easeQuadIn = quadIn;
-exports.easeQuadOut = quadOut;
-exports.easeQuadInOut = quadInOut;
-exports.easeCubic = cubicInOut;
-exports.easeCubicIn = cubicIn;
-exports.easeCubicOut = cubicOut;
-exports.easeCubicInOut = cubicInOut;
-exports.easePoly = polyInOut;
-exports.easePolyIn = polyIn;
-exports.easePolyOut = polyOut;
-exports.easePolyInOut = polyInOut;
-exports.easeSin = sinInOut;
-exports.easeSinIn = sinIn;
-exports.easeSinOut = sinOut;
-exports.easeSinInOut = sinInOut;
-exports.easeExp = expInOut;
-exports.easeExpIn = expIn;
-exports.easeExpOut = expOut;
-exports.easeExpInOut = expInOut;
-exports.easeCircle = circleInOut;
-exports.easeCircleIn = circleIn;
-exports.easeCircleOut = circleOut;
-exports.easeCircleInOut = circleInOut;
-exports.easeBounce = bounceOut;
-exports.easeBounceIn = bounceIn;
-exports.easeBounceOut = bounceOut;
-exports.easeBounceInOut = bounceInOut;
-exports.easeBack = backInOut;
-exports.easeBackIn = backIn;
-exports.easeBackOut = backOut;
-exports.easeBackInOut = backInOut;
-exports.easeElastic = elasticOut;
-exports.easeElasticIn = elasticIn;
-exports.easeElasticOut = elasticOut;
-exports.easeElasticInOut = elasticInOut;
-exports.forceCenter = center$1;
-exports.forceCollide = collide;
-exports.forceLink = link;
-exports.forceManyBody = manyBody;
-exports.forceRadial = radial;
-exports.forceSimulation = simulation;
-exports.forceX = x$2;
-exports.forceY = y$2;
-exports.formatDefaultLocale = defaultLocale;
-exports.formatLocale = formatLocale;
-exports.formatSpecifier = formatSpecifier;
-exports.precisionFixed = precisionFixed;
-exports.precisionPrefix = precisionPrefix;
-exports.precisionRound = precisionRound;
-exports.geoArea = area;
-exports.geoBounds = bounds;
-exports.geoCentroid = centroid;
-exports.geoCircle = circle;
-exports.geoClipAntimeridian = clipAntimeridian;
-exports.geoClipCircle = clipCircle;
-exports.geoClipExtent = extent$1;
-exports.geoClipRectangle = clipRectangle;
-exports.geoContains = contains;
-exports.geoDistance = distance;
-exports.geoGraticule = graticule;
-exports.geoGraticule10 = graticule10;
-exports.geoInterpolate = interpolate$1;
-exports.geoLength = length$1;
-exports.geoPath = index$1;
-exports.geoAlbers = albers;
-exports.geoAlbersUsa = albersUsa;
-exports.geoAzimuthalEqualArea = azimuthalEqualArea;
-exports.geoAzimuthalEqualAreaRaw = azimuthalEqualAreaRaw;
-exports.geoAzimuthalEquidistant = azimuthalEquidistant;
-exports.geoAzimuthalEquidistantRaw = azimuthalEquidistantRaw;
-exports.geoConicConformal = conicConformal;
-exports.geoConicConformalRaw = conicConformalRaw;
-exports.geoConicEqualArea = conicEqualArea;
-exports.geoConicEqualAreaRaw = conicEqualAreaRaw;
-exports.geoConicEquidistant = conicEquidistant;
-exports.geoConicEquidistantRaw = conicEquidistantRaw;
-exports.geoEquirectangular = equirectangular;
-exports.geoEquirectangularRaw = equirectangularRaw;
-exports.geoGnomonic = gnomonic;
-exports.geoGnomonicRaw = gnomonicRaw;
-exports.geoIdentity = identity$5;
-exports.geoProjection = projection;
-exports.geoProjectionMutator = projectionMutator;
-exports.geoMercator = mercator;
-exports.geoMercatorRaw = mercatorRaw;
-exports.geoNaturalEarth1 = naturalEarth1;
-exports.geoNaturalEarth1Raw = naturalEarth1Raw;
-exports.geoOrthographic = orthographic;
-exports.geoOrthographicRaw = orthographicRaw;
-exports.geoStereographic = stereographic;
-exports.geoStereographicRaw = stereographicRaw;
-exports.geoTransverseMercator = transverseMercator;
-exports.geoTransverseMercatorRaw = transverseMercatorRaw;
-exports.geoRotation = rotation;
-exports.geoStream = geoStream;
-exports.geoTransform = transform;
-exports.cluster = cluster;
-exports.hierarchy = hierarchy;
-exports.pack = index$2;
-exports.packSiblings = siblings;
-exports.packEnclose = enclose;
-exports.partition = partition;
-exports.stratify = stratify;
-exports.tree = tree;
-exports.treemap = index$3;
-exports.treemapBinary = binary;
-exports.treemapDice = treemapDice;
-exports.treemapSlice = treemapSlice;
-exports.treemapSliceDice = sliceDice;
-exports.treemapSquarify = squarify;
-exports.treemapResquarify = resquarify;
-exports.interpolate = interpolateValue;
-exports.interpolateArray = array$1;
-exports.interpolateBasis = basis$1;
-exports.interpolateBasisClosed = basisClosed;
-exports.interpolateDate = date;
-exports.interpolateNumber = reinterpolate;
-exports.interpolateObject = object;
-exports.interpolateRound = interpolateRound;
-exports.interpolateString = interpolateString;
-exports.interpolateTransformCss = interpolateTransformCss;
-exports.interpolateTransformSvg = interpolateTransformSvg;
-exports.interpolateZoom = interpolateZoom;
-exports.interpolateRgb = interpolateRgb;
-exports.interpolateRgbBasis = rgbBasis;
-exports.interpolateRgbBasisClosed = rgbBasisClosed;
-exports.interpolateHsl = hsl$2;
-exports.interpolateHslLong = hslLong;
-exports.interpolateLab = lab$1;
-exports.interpolateHcl = hcl$2;
-exports.interpolateHclLong = hclLong;
-exports.interpolateCubehelix = cubehelix$2;
-exports.interpolateCubehelixLong = cubehelixLong;
-exports.quantize = quantize;
-exports.path = path;
-exports.polygonArea = area$1;
-exports.polygonCentroid = centroid$1;
-exports.polygonHull = hull;
-exports.polygonContains = contains$1;
-exports.polygonLength = length$2;
-exports.quadtree = quadtree;
-exports.queue = queue;
-exports.randomUniform = uniform;
-exports.randomNormal = normal;
-exports.randomLogNormal = logNormal;
-exports.randomBates = bates;
-exports.randomIrwinHall = irwinHall;
-exports.randomExponential = exponential$1;
-exports.request = request;
-exports.html = html;
-exports.json = json;
-exports.text = text;
-exports.xml = xml;
-exports.csv = csv$1;
-exports.tsv = tsv$1;
-exports.scaleBand = band;
-exports.scalePoint = point$1;
-exports.scaleIdentity = identity$6;
-exports.scaleLinear = linear$2;
-exports.scaleLog = log$1;
-exports.scaleOrdinal = ordinal;
-exports.scaleImplicit = implicit;
-exports.scalePow = pow$1;
-exports.scaleSqrt = sqrt$1;
-exports.scaleQuantile = quantile$$1;
-exports.scaleQuantize = quantize$1;
-exports.scaleThreshold = threshold$1;
-exports.scaleTime = time;
-exports.scaleUtc = utcTime;
-exports.schemeCategory10 = category10;
-exports.schemeCategory20b = category20b;
-exports.schemeCategory20c = category20c;
-exports.schemeCategory20 = category20;
-exports.interpolateCubehelixDefault = cubehelix$3;
-exports.interpolateRainbow = rainbow$1;
-exports.interpolateWarm = warm;
-exports.interpolateCool = cool;
-exports.interpolateViridis = viridis;
-exports.interpolateMagma = magma;
-exports.interpolateInferno = inferno;
-exports.interpolatePlasma = plasma;
-exports.scaleSequential = sequential;
-exports.creator = creator;
-exports.local = local$1;
-exports.matcher = matcher$1;
-exports.mouse = mouse;
-exports.namespace = namespace;
-exports.namespaces = namespaces;
-exports.clientPoint = point;
-exports.select = select;
-exports.selectAll = selectAll;
-exports.selection = selection;
-exports.selector = selector;
-exports.selectorAll = selectorAll;
-exports.style = styleValue;
-exports.touch = touch;
-exports.touches = touches;
-exports.window = defaultView;
-exports.customEvent = customEvent;
-exports.arc = arc;
-exports.area = area$2;
-exports.line = line;
-exports.pie = pie;
-exports.areaRadial = areaRadial;
-exports.radialArea = areaRadial;
-exports.lineRadial = lineRadial$1;
-exports.radialLine = lineRadial$1;
-exports.pointRadial = pointRadial;
-exports.linkHorizontal = linkHorizontal;
-exports.linkVertical = linkVertical;
-exports.linkRadial = linkRadial;
-exports.symbol = symbol;
-exports.symbols = symbols;
-exports.symbolCircle = circle$2;
-exports.symbolCross = cross$2;
-exports.symbolDiamond = diamond;
-exports.symbolSquare = square;
-exports.symbolStar = star;
-exports.symbolTriangle = triangle;
-exports.symbolWye = wye;
-exports.curveBasisClosed = basisClosed$1;
-exports.curveBasisOpen = basisOpen;
-exports.curveBasis = basis$2;
-exports.curveBundle = bundle;
-exports.curveCardinalClosed = cardinalClosed;
-exports.curveCardinalOpen = cardinalOpen;
-exports.curveCardinal = cardinal;
-exports.curveCatmullRomClosed = catmullRomClosed;
-exports.curveCatmullRomOpen = catmullRomOpen;
-exports.curveCatmullRom = catmullRom;
-exports.curveLinearClosed = linearClosed;
-exports.curveLinear = curveLinear;
-exports.curveMonotoneX = monotoneX;
-exports.curveMonotoneY = monotoneY;
-exports.curveNatural = natural;
-exports.curveStep = step;
-exports.curveStepAfter = stepAfter;
-exports.curveStepBefore = stepBefore;
-exports.stack = stack;
-exports.stackOffsetExpand = expand;
-exports.stackOffsetDiverging = diverging;
-exports.stackOffsetNone = none$1;
-exports.stackOffsetSilhouette = silhouette;
-exports.stackOffsetWiggle = wiggle;
-exports.stackOrderAscending = ascending$2;
-exports.stackOrderDescending = descending$2;
-exports.stackOrderInsideOut = insideOut;
-exports.stackOrderNone = none$2;
-exports.stackOrderReverse = reverse;
-exports.timeInterval = newInterval;
-exports.timeMillisecond = millisecond;
-exports.timeMilliseconds = milliseconds;
-exports.utcMillisecond = millisecond;
-exports.utcMilliseconds = milliseconds;
-exports.timeSecond = second;
-exports.timeSeconds = seconds;
-exports.utcSecond = second;
-exports.utcSeconds = seconds;
-exports.timeMinute = minute;
-exports.timeMinutes = minutes;
-exports.timeHour = hour;
-exports.timeHours = hours;
-exports.timeDay = day;
-exports.timeDays = days;
-exports.timeWeek = sunday;
-exports.timeWeeks = sundays;
-exports.timeSunday = sunday;
-exports.timeSundays = sundays;
-exports.timeMonday = monday;
-exports.timeMondays = mondays;
-exports.timeTuesday = tuesday;
-exports.timeTuesdays = tuesdays;
-exports.timeWednesday = wednesday;
-exports.timeWednesdays = wednesdays;
-exports.timeThursday = thursday;
-exports.timeThursdays = thursdays;
-exports.timeFriday = friday;
-exports.timeFridays = fridays;
-exports.timeSaturday = saturday;
-exports.timeSaturdays = saturdays;
-exports.timeMonth = month;
-exports.timeMonths = months;
-exports.timeYear = year;
-exports.timeYears = years;
-exports.utcMinute = utcMinute;
-exports.utcMinutes = utcMinutes;
-exports.utcHour = utcHour;
-exports.utcHours = utcHours;
-exports.utcDay = utcDay;
-exports.utcDays = utcDays;
-exports.utcWeek = utcSunday;
-exports.utcWeeks = utcSundays;
-exports.utcSunday = utcSunday;
-exports.utcSundays = utcSundays;
-exports.utcMonday = utcMonday;
-exports.utcMondays = utcMondays;
-exports.utcTuesday = utcTuesday;
-exports.utcTuesdays = utcTuesdays;
-exports.utcWednesday = utcWednesday;
-exports.utcWednesdays = utcWednesdays;
-exports.utcThursday = utcThursday;
-exports.utcThursdays = utcThursdays;
-exports.utcFriday = utcFriday;
-exports.utcFridays = utcFridays;
-exports.utcSaturday = utcSaturday;
-exports.utcSaturdays = utcSaturdays;
-exports.utcMonth = utcMonth;
-exports.utcMonths = utcMonths;
-exports.utcYear = utcYear;
-exports.utcYears = utcYears;
-exports.timeFormatDefaultLocale = defaultLocale$1;
-exports.timeFormatLocale = formatLocale$1;
-exports.isoFormat = formatIso;
-exports.isoParse = parseIso;
-exports.now = now;
-exports.timer = timer;
-exports.timerFlush = timerFlush;
-exports.timeout = timeout$1;
-exports.interval = interval$1;
-exports.transition = transition;
-exports.active = active;
-exports.interrupt = interrupt;
-exports.voronoi = voronoi;
-exports.zoom = zoom;
-exports.zoomTransform = transform$1;
-exports.zoomIdentity = identity$8;
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-})));
diff --git a/debian/missing-sources/dygraph-c91c859.js b/debian/missing-sources/dygraph-c91c859.js
deleted file mode 100644
index 2565b221..00000000
--- a/debian/missing-sources/dygraph-c91c859.js
+++ /dev/null
@@ -1,3482 +0,0 @@
-/**
- * @license
- * Copyright 2006 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/**
- * @fileoverview Creates an interactive, zoomable graph based on a CSV file or
- * string. Dygraph can handle multiple series with or without error bars. The
- * date/value ranges will be automatically set. Dygraph uses the
- * &lt;canvas&gt; tag, so it only works in FF1.5+.
- * @author danvdk@gmail.com (Dan Vanderkam)
-
- Usage:
- <div id="graphdiv" style="width:800px; height:500px;"></div>
- <script type="text/javascript">
- new Dygraph(document.getElementById("graphdiv"),
- "datafile.csv", // CSV file with headers
- { }); // options
- </script>
-
- The CSV file is of the form
-
- Date,SeriesA,SeriesB,SeriesC
- YYYYMMDD,A1,B1,C1
- YYYYMMDD,A2,B2,C2
-
- If the 'errorBars' option is set in the constructor, the input should be of
- the form
- Date,SeriesA,SeriesB,...
- YYYYMMDD,A1,sigmaA1,B1,sigmaB1,...
- YYYYMMDD,A2,sigmaA2,B2,sigmaB2,...
-
- If the 'fractions' option is set, the input should be of the form:
-
- Date,SeriesA,SeriesB,...
- YYYYMMDD,A1/B1,A2/B2,...
- YYYYMMDD,A1/B1,A2/B2,...
-
- And error bars will be calculated automatically using a binomial distribution.
-
- For further documentation and examples, see http://dygraphs.com/
- */
-
-import DygraphLayout from './dygraph-layout';
-import DygraphCanvasRenderer from './dygraph-canvas';
-import DygraphOptions from './dygraph-options';
-import DygraphInteraction from './dygraph-interaction-model';
-import * as DygraphTickers from './dygraph-tickers';
-import * as utils from './dygraph-utils';
-import DEFAULT_ATTRS from './dygraph-default-attrs';
-import OPTIONS_REFERENCE from './dygraph-options-reference';
-import IFrameTarp from './iframe-tarp';
-
-import DefaultHandler from './datahandler/default';
-import ErrorBarsHandler from './datahandler/bars-error';
-import CustomBarsHandler from './datahandler/bars-custom';
-import DefaultFractionHandler from './datahandler/default-fractions';
-import FractionsBarsHandler from './datahandler/bars-fractions';
-import BarsHandler from './datahandler/bars';
-
-import AnnotationsPlugin from './plugins/annotations';
-import AxesPlugin from './plugins/axes';
-import ChartLabelsPlugin from './plugins/chart-labels';
-import GridPlugin from './plugins/grid';
-import LegendPlugin from './plugins/legend';
-import RangeSelectorPlugin from './plugins/range-selector';
-
-import GVizChart from './dygraph-gviz';
-
-"use strict";
-
-/**
- * Creates an interactive, zoomable chart.
- *
- * @constructor
- * @param {div | String} div A div or the id of a div into which to construct
- * the chart.
- * @param {String | Function} file A file containing CSV data or a function
- * that returns this data. The most basic expected format for each line is
- * "YYYY/MM/DD,val1,val2,...". For more information, see
- * http://dygraphs.com/data.html.
- * @param {Object} attrs Various other attributes, e.g. errorBars determines
- * whether the input data contains error ranges. For a complete list of
- * options, see http://dygraphs.com/options.html.
- */
-var Dygraph = function(div, data, opts) {
- this.__init__(div, data, opts);
-};
-
-Dygraph.NAME = "Dygraph";
-Dygraph.VERSION = "2.1.0";
-
-// Various default values
-Dygraph.DEFAULT_ROLL_PERIOD = 1;
-Dygraph.DEFAULT_WIDTH = 480;
-Dygraph.DEFAULT_HEIGHT = 320;
-
-// For max 60 Hz. animation:
-Dygraph.ANIMATION_STEPS = 12;
-Dygraph.ANIMATION_DURATION = 200;
-
-/**
- * Standard plotters. These may be used by clients.
- * Available plotters are:
- * - Dygraph.Plotters.linePlotter: draws central lines (most common)
- * - Dygraph.Plotters.errorPlotter: draws error bars
- * - Dygraph.Plotters.fillPlotter: draws fills under lines (used with fillGraph)
- *
- * By default, the plotter is [fillPlotter, errorPlotter, linePlotter].
- * This causes all the lines to be drawn over all the fills/error bars.
- */
-Dygraph.Plotters = DygraphCanvasRenderer._Plotters;
-
-
-// Used for initializing annotation CSS rules only once.
-Dygraph.addedAnnotationCSS = false;
-
-/**
- * Initializes the Dygraph. This creates a new DIV and constructs the PlotKit
- * and context &lt;canvas&gt; inside of it. See the constructor for details.
- * on the parameters.
- * @param {Element} div the Element to render the graph into.
- * @param {string | Function} file Source data
- * @param {Object} attrs Miscellaneous other options
- * @private
- */
-Dygraph.prototype.__init__ = function(div, file, attrs) {
- this.is_initial_draw_ = true;
- this.readyFns_ = [];
-
- // Support two-argument constructor
- if (attrs === null || attrs === undefined) { attrs = {}; }
-
- attrs = Dygraph.copyUserAttrs_(attrs);
-
- if (typeof(div) == 'string') {
- div = document.getElementById(div);
- }
-
- if (!div) {
- throw new Error('Constructing dygraph with a non-existent div!');
- }
-
- // Copy the important bits into the object
- // TODO(danvk): most of these should just stay in the attrs_ dictionary.
- this.maindiv_ = div;
- this.file_ = file;
- this.rollPeriod_ = attrs.rollPeriod || Dygraph.DEFAULT_ROLL_PERIOD;
- this.previousVerticalX_ = -1;
- this.fractions_ = attrs.fractions || false;
- this.dateWindow_ = attrs.dateWindow || null;
-
- this.annotations_ = [];
-
- // Clear the div. This ensure that, if multiple dygraphs are passed the same
- // div, then only one will be drawn.
- div.innerHTML = "";
-
- // For historical reasons, the 'width' and 'height' options trump all CSS
- // rules _except_ for an explicit 'width' or 'height' on the div.
- // As an added convenience, if the div has zero height (like <div></div> does
- // without any styles), then we use a default height/width.
- if (div.style.width === '' && attrs.width) {
- div.style.width = attrs.width + "px";
- }
- if (div.style.height === '' && attrs.height) {
- div.style.height = attrs.height + "px";
- }
- if (div.style.height === '' && div.clientHeight === 0) {
- div.style.height = Dygraph.DEFAULT_HEIGHT + "px";
- if (div.style.width === '') {
- div.style.width = Dygraph.DEFAULT_WIDTH + "px";
- }
- }
- // These will be zero if the dygraph's div is hidden. In that case,
- // use the user-specified attributes if present. If not, use zero
- // and assume the user will call resize to fix things later.
- this.width_ = div.clientWidth || attrs.width || 0;
- this.height_ = div.clientHeight || attrs.height || 0;
-
- // TODO(danvk): set fillGraph to be part of attrs_ here, not user_attrs_.
- if (attrs.stackedGraph) {
- attrs.fillGraph = true;
- // TODO(nikhilk): Add any other stackedGraph checks here.
- }
-
- // DEPRECATION WARNING: All option processing should be moved from
- // attrs_ and user_attrs_ to options_, which holds all this information.
- //
- // Dygraphs has many options, some of which interact with one another.
- // To keep track of everything, we maintain two sets of options:
- //
- // this.user_attrs_ only options explicitly set by the user.
- // this.attrs_ defaults, options derived from user_attrs_, data.
- //
- // Options are then accessed this.attr_('attr'), which first looks at
- // user_attrs_ and then computed attrs_. This way Dygraphs can set intelligent
- // defaults without overriding behavior that the user specifically asks for.
- this.user_attrs_ = {};
- utils.update(this.user_attrs_, attrs);
-
- // This sequence ensures that Dygraph.DEFAULT_ATTRS is never modified.
- this.attrs_ = {};
- utils.updateDeep(this.attrs_, DEFAULT_ATTRS);
-
- this.boundaryIds_ = [];
- this.setIndexByName_ = {};
- this.datasetIndex_ = [];
-
- this.registeredEvents_ = [];
- this.eventListeners_ = {};
-
- this.attributes_ = new DygraphOptions(this);
-
- // Create the containing DIV and other interactive elements
- this.createInterface_();
-
- // Activate plugins.
- this.plugins_ = [];
- var plugins = Dygraph.PLUGINS.concat(this.getOption('plugins'));
- for (var i = 0; i < plugins.length; i++) {
- // the plugins option may contain either plugin classes or instances.
- // Plugin instances contain an activate method.
- var Plugin = plugins[i]; // either a constructor or an instance.
- var pluginInstance;
- if (typeof(Plugin.activate) !== 'undefined') {
- pluginInstance = Plugin;
- } else {
- pluginInstance = new Plugin();
- }
-
- var pluginDict = {
- plugin: pluginInstance,
- events: {},
- options: {},
- pluginOptions: {}
- };
-
- var handlers = pluginInstance.activate(this);
- for (var eventName in handlers) {
- if (!handlers.hasOwnProperty(eventName)) continue;
- // TODO(danvk): validate eventName.
- pluginDict.events[eventName] = handlers[eventName];
- }
-
- this.plugins_.push(pluginDict);
- }
-
- // At this point, plugins can no longer register event handlers.
- // Construct a map from event -> ordered list of [callback, plugin].
- for (var i = 0; i < this.plugins_.length; i++) {
- var plugin_dict = this.plugins_[i];
- for (var eventName in plugin_dict.events) {
- if (!plugin_dict.events.hasOwnProperty(eventName)) continue;
- var callback = plugin_dict.events[eventName];
-
- var pair = [plugin_dict.plugin, callback];
- if (!(eventName in this.eventListeners_)) {
- this.eventListeners_[eventName] = [pair];
- } else {
- this.eventListeners_[eventName].push(pair);
- }
- }
- }
-
- this.createDragInterface_();
-
- this.start_();
-};
-
-/**
- * Triggers a cascade of events to the various plugins which are interested in them.
- * Returns true if the "default behavior" should be prevented, i.e. if one
- * of the event listeners called event.preventDefault().
- * @private
- */
-Dygraph.prototype.cascadeEvents_ = function(name, extra_props) {
- if (!(name in this.eventListeners_)) return false;
-
- // QUESTION: can we use objects & prototypes to speed this up?
- var e = {
- dygraph: this,
- cancelable: false,
- defaultPrevented: false,
- preventDefault: function() {
- if (!e.cancelable) throw "Cannot call preventDefault on non-cancelable event.";
- e.defaultPrevented = true;
- },
- propagationStopped: false,
- stopPropagation: function() {
- e.propagationStopped = true;
- }
- };
- utils.update(e, extra_props);
-
- var callback_plugin_pairs = this.eventListeners_[name];
- if (callback_plugin_pairs) {
- for (var i = callback_plugin_pairs.length - 1; i >= 0; i--) {
- var plugin = callback_plugin_pairs[i][0];
- var callback = callback_plugin_pairs[i][1];
- callback.call(plugin, e);
- if (e.propagationStopped) break;
- }
- }
- return e.defaultPrevented;
-};
-
-/**
- * Fetch a plugin instance of a particular class. Only for testing.
- * @private
- * @param {!Class} type The type of the plugin.
- * @return {Object} Instance of the plugin, or null if there is none.
- */
-Dygraph.prototype.getPluginInstance_ = function(type) {
- for (var i = 0; i < this.plugins_.length; i++) {
- var p = this.plugins_[i];
- if (p.plugin instanceof type) {
- return p.plugin;
- }
- }
- return null;
-};
-
-/**
- * Returns the zoomed status of the chart for one or both axes.
- *
- * Axis is an optional parameter. Can be set to 'x' or 'y'.
- *
- * The zoomed status for an axis is set whenever a user zooms using the mouse
- * or when the dateWindow or valueRange are updated. Double-clicking or calling
- * resetZoom() resets the zoom status for the chart.
- */
-Dygraph.prototype.isZoomed = function(axis) {
- const isZoomedX = !!this.dateWindow_;
- if (axis === 'x') return isZoomedX;
-
- const isZoomedY = this.axes_.map(axis => !!axis.valueRange).indexOf(true) >= 0;
- if (axis === null || axis === undefined) {
- return isZoomedX || isZoomedY;
- }
- if (axis === 'y') return isZoomedY;
-
- throw new Error(`axis parameter is [${axis}] must be null, 'x' or 'y'.`);
-};
-
-/**
- * Returns information about the Dygraph object, including its containing ID.
- */
-Dygraph.prototype.toString = function() {
- var maindiv = this.maindiv_;
- var id = (maindiv && maindiv.id) ? maindiv.id : maindiv;
- return "[Dygraph " + id + "]";
-};
-
-/**
- * @private
- * Returns the value of an option. This may be set by the user (either in the
- * constructor or by calling updateOptions) or by dygraphs, and may be set to a
- * per-series value.
- * @param {string} name The name of the option, e.g. 'rollPeriod'.
- * @param {string} [seriesName] The name of the series to which the option
- * will be applied. If no per-series value of this option is available, then
- * the global value is returned. This is optional.
- * @return { ... } The value of the option.
- */
-Dygraph.prototype.attr_ = function(name, seriesName) {
- // For "production" code, this gets removed by uglifyjs.
- if (typeof(process) !== 'undefined') {
- if (process.env.NODE_ENV != 'production') {
- if (typeof(OPTIONS_REFERENCE) === 'undefined') {
- console.error('Must include options reference JS for testing');
- } else if (!OPTIONS_REFERENCE.hasOwnProperty(name)) {
- console.error('Dygraphs is using property ' + name + ', which has no ' +
- 'entry in the Dygraphs.OPTIONS_REFERENCE listing.');
- // Only log this error once.
- OPTIONS_REFERENCE[name] = true;
- }
- }
- }
- return seriesName ? this.attributes_.getForSeries(name, seriesName) : this.attributes_.get(name);
-};
-
-/**
- * Returns the current value for an option, as set in the constructor or via
- * updateOptions. You may pass in an (optional) series name to get per-series
- * values for the option.
- *
- * All values returned by this method should be considered immutable. If you
- * modify them, there is no guarantee that the changes will be honored or that
- * dygraphs will remain in a consistent state. If you want to modify an option,
- * use updateOptions() instead.
- *
- * @param {string} name The name of the option (e.g. 'strokeWidth')
- * @param {string=} opt_seriesName Series name to get per-series values.
- * @return {*} The value of the option.
- */
-Dygraph.prototype.getOption = function(name, opt_seriesName) {
- return this.attr_(name, opt_seriesName);
-};
-
-/**
- * Like getOption(), but specifically returns a number.
- * This is a convenience function for working with the Closure Compiler.
- * @param {string} name The name of the option (e.g. 'strokeWidth')
- * @param {string=} opt_seriesName Series name to get per-series values.
- * @return {number} The value of the option.
- * @private
- */
-Dygraph.prototype.getNumericOption = function(name, opt_seriesName) {
- return /** @type{number} */(this.getOption(name, opt_seriesName));
-};
-
-/**
- * Like getOption(), but specifically returns a string.
- * This is a convenience function for working with the Closure Compiler.
- * @param {string} name The name of the option (e.g. 'strokeWidth')
- * @param {string=} opt_seriesName Series name to get per-series values.
- * @return {string} The value of the option.
- * @private
- */
-Dygraph.prototype.getStringOption = function(name, opt_seriesName) {
- return /** @type{string} */(this.getOption(name, opt_seriesName));
-};
-
-/**
- * Like getOption(), but specifically returns a boolean.
- * This is a convenience function for working with the Closure Compiler.
- * @param {string} name The name of the option (e.g. 'strokeWidth')
- * @param {string=} opt_seriesName Series name to get per-series values.
- * @return {boolean} The value of the option.
- * @private
- */
-Dygraph.prototype.getBooleanOption = function(name, opt_seriesName) {
- return /** @type{boolean} */(this.getOption(name, opt_seriesName));
-};
-
-/**
- * Like getOption(), but specifically returns a function.
- * This is a convenience function for working with the Closure Compiler.
- * @param {string} name The name of the option (e.g. 'strokeWidth')
- * @param {string=} opt_seriesName Series name to get per-series values.
- * @return {function(...)} The value of the option.
- * @private
- */
-Dygraph.prototype.getFunctionOption = function(name, opt_seriesName) {
- return /** @type{function(...)} */(this.getOption(name, opt_seriesName));
-};
-
-Dygraph.prototype.getOptionForAxis = function(name, axis) {
- return this.attributes_.getForAxis(name, axis);
-};
-
-/**
- * @private
- * @param {string} axis The name of the axis (i.e. 'x', 'y' or 'y2')
- * @return { ... } A function mapping string -> option value
- */
-Dygraph.prototype.optionsViewForAxis_ = function(axis) {
- var self = this;
- return function(opt) {
- var axis_opts = self.user_attrs_.axes;
- if (axis_opts && axis_opts[axis] && axis_opts[axis].hasOwnProperty(opt)) {
- return axis_opts[axis][opt];
- }
-
- // I don't like that this is in a second spot.
- if (axis === 'x' && opt === 'logscale') {
- // return the default value.
- // TODO(konigsberg): pull the default from a global default.
- return false;
- }
-
- // user-specified attributes always trump defaults, even if they're less
- // specific.
- if (typeof(self.user_attrs_[opt]) != 'undefined') {
- return self.user_attrs_[opt];
- }
-
- axis_opts = self.attrs_.axes;
- if (axis_opts && axis_opts[axis] && axis_opts[axis].hasOwnProperty(opt)) {
- return axis_opts[axis][opt];
- }
- // check old-style axis options
- // TODO(danvk): add a deprecation warning if either of these match.
- if (axis == 'y' && self.axes_[0].hasOwnProperty(opt)) {
- return self.axes_[0][opt];
- } else if (axis == 'y2' && self.axes_[1].hasOwnProperty(opt)) {
- return self.axes_[1][opt];
- }
- return self.attr_(opt);
- };
-};
-
-/**
- * Returns the current rolling period, as set by the user or an option.
- * @return {number} The number of points in the rolling window
- */
-Dygraph.prototype.rollPeriod = function() {
- return this.rollPeriod_;
-};
-
-/**
- * Returns the currently-visible x-range. This can be affected by zooming,
- * panning or a call to updateOptions.
- * Returns a two-element array: [left, right].
- * If the Dygraph has dates on the x-axis, these will be millis since epoch.
- */
-Dygraph.prototype.xAxisRange = function() {
- return this.dateWindow_ ? this.dateWindow_ : this.xAxisExtremes();
-};
-
-/**
- * Returns the lower- and upper-bound x-axis values of the data set.
- */
-Dygraph.prototype.xAxisExtremes = function() {
- var pad = this.getNumericOption('xRangePad') / this.plotter_.area.w;
- if (this.numRows() === 0) {
- return [0 - pad, 1 + pad];
- }
- var left = this.rawData_[0][0];
- var right = this.rawData_[this.rawData_.length - 1][0];
- if (pad) {
- // Must keep this in sync with dygraph-layout _evaluateLimits()
- var range = right - left;
- left -= range * pad;
- right += range * pad;
- }
- return [left, right];
-};
-
-/**
- * Returns the lower- and upper-bound y-axis values for each axis. These are
- * the ranges you'll get if you double-click to zoom out or call resetZoom().
- * The return value is an array of [low, high] tuples, one for each y-axis.
- */
-Dygraph.prototype.yAxisExtremes = function() {
- // TODO(danvk): this is pretty inefficient
- const packed = this.gatherDatasets_(this.rolledSeries_, null);
- const { extremes } = packed;
- const saveAxes = this.axes_;
- this.computeYAxisRanges_(extremes);
- const newAxes = this.axes_;
- this.axes_ = saveAxes;
- return newAxes.map(axis => axis.extremeRange);
-}
-
-/**
- * Returns the currently-visible y-range for an axis. This can be affected by
- * zooming, panning or a call to updateOptions. Axis indices are zero-based. If
- * called with no arguments, returns the range of the first axis.
- * Returns a two-element array: [bottom, top].
- */
-Dygraph.prototype.yAxisRange = function(idx) {
- if (typeof(idx) == "undefined") idx = 0;
- if (idx < 0 || idx >= this.axes_.length) {
- return null;
- }
- var axis = this.axes_[idx];
- return [ axis.computedValueRange[0], axis.computedValueRange[1] ];
-};
-
-/**
- * Returns the currently-visible y-ranges for each axis. This can be affected by
- * zooming, panning, calls to updateOptions, etc.
- * Returns an array of [bottom, top] pairs, one for each y-axis.
- */
-Dygraph.prototype.yAxisRanges = function() {
- var ret = [];
- for (var i = 0; i < this.axes_.length; i++) {
- ret.push(this.yAxisRange(i));
- }
- return ret;
-};
-
-// TODO(danvk): use these functions throughout dygraphs.
-/**
- * Convert from data coordinates to canvas/div X/Y coordinates.
- * If specified, do this conversion for the coordinate system of a particular
- * axis. Uses the first axis by default.
- * Returns a two-element array: [X, Y]
- *
- * Note: use toDomXCoord instead of toDomCoords(x, null) and use toDomYCoord
- * instead of toDomCoords(null, y, axis).
- */
-Dygraph.prototype.toDomCoords = function(x, y, axis) {
- return [ this.toDomXCoord(x), this.toDomYCoord(y, axis) ];
-};
-
-/**
- * Convert from data x coordinates to canvas/div X coordinate.
- * If specified, do this conversion for the coordinate system of a particular
- * axis.
- * Returns a single value or null if x is null.
- */
-Dygraph.prototype.toDomXCoord = function(x) {
- if (x === null) {
- return null;
- }
-
- var area = this.plotter_.area;
- var xRange = this.xAxisRange();
- return area.x + (x - xRange[0]) / (xRange[1] - xRange[0]) * area.w;
-};
-
-/**
- * Convert from data x coordinates to canvas/div Y coordinate and optional
- * axis. Uses the first axis by default.
- *
- * returns a single value or null if y is null.
- */
-Dygraph.prototype.toDomYCoord = function(y, axis) {
- var pct = this.toPercentYCoord(y, axis);
-
- if (pct === null) {
- return null;
- }
- var area = this.plotter_.area;
- return area.y + pct * area.h;
-};
-
-/**
- * Convert from canvas/div coords to data coordinates.
- * If specified, do this conversion for the coordinate system of a particular
- * axis. Uses the first axis by default.
- * Returns a two-element array: [X, Y].
- *
- * Note: use toDataXCoord instead of toDataCoords(x, null) and use toDataYCoord
- * instead of toDataCoords(null, y, axis).
- */
-Dygraph.prototype.toDataCoords = function(x, y, axis) {
- return [ this.toDataXCoord(x), this.toDataYCoord(y, axis) ];
-};
-
-/**
- * Convert from canvas/div x coordinate to data coordinate.
- *
- * If x is null, this returns null.
- */
-Dygraph.prototype.toDataXCoord = function(x) {
- if (x === null) {
- return null;
- }
-
- var area = this.plotter_.area;
- var xRange = this.xAxisRange();
-
- if (!this.attributes_.getForAxis("logscale", 'x')) {
- return xRange[0] + (x - area.x) / area.w * (xRange[1] - xRange[0]);
- } else {
- var pct = (x - area.x) / area.w;
- return utils.logRangeFraction(xRange[0], xRange[1], pct);
- }
-};
-
-/**
- * Convert from canvas/div y coord to value.
- *
- * If y is null, this returns null.
- * if axis is null, this uses the first axis.
- */
-Dygraph.prototype.toDataYCoord = function(y, axis) {
- if (y === null) {
- return null;
- }
-
- var area = this.plotter_.area;
- var yRange = this.yAxisRange(axis);
-
- if (typeof(axis) == "undefined") axis = 0;
- if (!this.attributes_.getForAxis("logscale", axis)) {
- return yRange[0] + (area.y + area.h - y) / area.h * (yRange[1] - yRange[0]);
- } else {
- // Computing the inverse of toDomCoord.
- var pct = (y - area.y) / area.h;
- // Note reversed yRange, y1 is on top with pct==0.
- return utils.logRangeFraction(yRange[1], yRange[0], pct);
- }
-};
-
-/**
- * Converts a y for an axis to a percentage from the top to the
- * bottom of the drawing area.
- *
- * If the coordinate represents a value visible on the canvas, then
- * the value will be between 0 and 1, where 0 is the top of the canvas.
- * However, this method will return values outside the range, as
- * values can fall outside the canvas.
- *
- * If y is null, this returns null.
- * if axis is null, this uses the first axis.
- *
- * @param {number} y The data y-coordinate.
- * @param {number} [axis] The axis number on which the data coordinate lives.
- * @return {number} A fraction in [0, 1] where 0 = the top edge.
- */
-Dygraph.prototype.toPercentYCoord = function(y, axis) {
- if (y === null) {
- return null;
- }
- if (typeof(axis) == "undefined") axis = 0;
-
- var yRange = this.yAxisRange(axis);
-
- var pct;
- var logscale = this.attributes_.getForAxis("logscale", axis);
- if (logscale) {
- var logr0 = utils.log10(yRange[0]);
- var logr1 = utils.log10(yRange[1]);
- pct = (logr1 - utils.log10(y)) / (logr1 - logr0);
- } else {
- // yRange[1] - y is unit distance from the bottom.
- // yRange[1] - yRange[0] is the scale of the range.
- // (yRange[1] - y) / (yRange[1] - yRange[0]) is the % from the bottom.
- pct = (yRange[1] - y) / (yRange[1] - yRange[0]);
- }
- return pct;
-};
-
-/**
- * Converts an x value to a percentage from the left to the right of
- * the drawing area.
- *
- * If the coordinate represents a value visible on the canvas, then
- * the value will be between 0 and 1, where 0 is the left of the canvas.
- * However, this method will return values outside the range, as
- * values can fall outside the canvas.
- *
- * If x is null, this returns null.
- * @param {number} x The data x-coordinate.
- * @return {number} A fraction in [0, 1] where 0 = the left edge.
- */
-Dygraph.prototype.toPercentXCoord = function(x) {
- if (x === null) {
- return null;
- }
-
- var xRange = this.xAxisRange();
- var pct;
- var logscale = this.attributes_.getForAxis("logscale", 'x') ;
- if (logscale === true) { // logscale can be null so we test for true explicitly.
- var logr0 = utils.log10(xRange[0]);
- var logr1 = utils.log10(xRange[1]);
- pct = (utils.log10(x) - logr0) / (logr1 - logr0);
- } else {
- // x - xRange[0] is unit distance from the left.
- // xRange[1] - xRange[0] is the scale of the range.
- // The full expression below is the % from the left.
- pct = (x - xRange[0]) / (xRange[1] - xRange[0]);
- }
- return pct;
-};
-
-/**
- * Returns the number of columns (including the independent variable).
- * @return {number} The number of columns.
- */
-Dygraph.prototype.numColumns = function() {
- if (!this.rawData_) return 0;
- return this.rawData_[0] ? this.rawData_[0].length : this.attr_("labels").length;
-};
-
-/**
- * Returns the number of rows (excluding any header/label row).
- * @return {number} The number of rows, less any header.
- */
-Dygraph.prototype.numRows = function() {
- if (!this.rawData_) return 0;
- return this.rawData_.length;
-};
-
-/**
- * Returns the value in the given row and column. If the row and column exceed
- * the bounds on the data, returns null. Also returns null if the value is
- * missing.
- * @param {number} row The row number of the data (0-based). Row 0 is the
- * first row of data, not a header row.
- * @param {number} col The column number of the data (0-based)
- * @return {number} The value in the specified cell or null if the row/col
- * were out of range.
- */
-Dygraph.prototype.getValue = function(row, col) {
- if (row < 0 || row > this.rawData_.length) return null;
- if (col < 0 || col > this.rawData_[row].length) return null;
-
- return this.rawData_[row][col];
-};
-
-/**
- * Generates interface elements for the Dygraph: a containing div, a div to
- * display the current point, and a textbox to adjust the rolling average
- * period. Also creates the Renderer/Layout elements.
- * @private
- */
-Dygraph.prototype.createInterface_ = function() {
- // Create the all-enclosing graph div
- var enclosing = this.maindiv_;
-
- this.graphDiv = document.createElement("div");
-
- // TODO(danvk): any other styles that are useful to set here?
- this.graphDiv.style.textAlign = 'left'; // This is a CSS "reset"
- this.graphDiv.style.position = 'relative';
- enclosing.appendChild(this.graphDiv);
-
- // Create the canvas for interactive parts of the chart.
- this.canvas_ = utils.createCanvas();
- this.canvas_.style.position = "absolute";
-
- // ... and for static parts of the chart.
- this.hidden_ = this.createPlotKitCanvas_(this.canvas_);
-
- this.canvas_ctx_ = utils.getContext(this.canvas_);
- this.hidden_ctx_ = utils.getContext(this.hidden_);
-
- this.resizeElements_();
-
- // The interactive parts of the graph are drawn on top of the chart.
- this.graphDiv.appendChild(this.hidden_);
- this.graphDiv.appendChild(this.canvas_);
- this.mouseEventElement_ = this.createMouseEventElement_();
-
- // Create the grapher
- this.layout_ = new DygraphLayout(this);
-
- var dygraph = this;
-
- this.mouseMoveHandler_ = function(e) {
- dygraph.mouseMove_(e);
- };
-
- this.mouseOutHandler_ = function(e) {
- // The mouse has left the chart if:
- // 1. e.target is inside the chart
- // 2. e.relatedTarget is outside the chart
- var target = e.target || e.fromElement;
- var relatedTarget = e.relatedTarget || e.toElement;
- if (utils.isNodeContainedBy(target, dygraph.graphDiv) &&
- !utils.isNodeContainedBy(relatedTarget, dygraph.graphDiv)) {
- dygraph.mouseOut_(e);
- }
- };
-
- this.addAndTrackEvent(window, 'mouseout', this.mouseOutHandler_);
- this.addAndTrackEvent(this.mouseEventElement_, 'mousemove', this.mouseMoveHandler_);
-
- // Don't recreate and register the resize handler on subsequent calls.
- // This happens when the graph is resized.
- if (!this.resizeHandler_) {
- this.resizeHandler_ = function(e) {
- dygraph.resize();
- };
-
- // Update when the window is resized.
- // TODO(danvk): drop frames depending on complexity of the chart.
- this.addAndTrackEvent(window, 'resize', this.resizeHandler_);
- }
-};
-
-Dygraph.prototype.resizeElements_ = function() {
- this.graphDiv.style.width = this.width_ + "px";
- this.graphDiv.style.height = this.height_ + "px";
-
- var pixelRatioOption = this.getNumericOption('pixelRatio')
-
- var canvasScale = pixelRatioOption || utils.getContextPixelRatio(this.canvas_ctx_);
- this.canvas_.width = this.width_ * canvasScale;
- this.canvas_.height = this.height_ * canvasScale;
- this.canvas_.style.width = this.width_ + "px"; // for IE
- this.canvas_.style.height = this.height_ + "px"; // for IE
- if (canvasScale !== 1) {
- this.canvas_ctx_.scale(canvasScale, canvasScale);
- }
-
- var hiddenScale = pixelRatioOption || utils.getContextPixelRatio(this.hidden_ctx_);
- this.hidden_.width = this.width_ * hiddenScale;
- this.hidden_.height = this.height_ * hiddenScale;
- this.hidden_.style.width = this.width_ + "px"; // for IE
- this.hidden_.style.height = this.height_ + "px"; // for IE
- if (hiddenScale !== 1) {
- this.hidden_ctx_.scale(hiddenScale, hiddenScale);
- }
-};
-
-/**
- * Detach DOM elements in the dygraph and null out all data references.
- * Calling this when you're done with a dygraph can dramatically reduce memory
- * usage. See, e.g., the tests/perf.html example.
- */
-Dygraph.prototype.destroy = function() {
- this.canvas_ctx_.restore();
- this.hidden_ctx_.restore();
-
- // Destroy any plugins, in the reverse order that they were registered.
- for (var i = this.plugins_.length - 1; i >= 0; i--) {
- var p = this.plugins_.pop();
- if (p.plugin.destroy) p.plugin.destroy();
- }
-
- var removeRecursive = function(node) {
- while (node.hasChildNodes()) {
- removeRecursive(node.firstChild);
- node.removeChild(node.firstChild);
- }
- };
-
- this.removeTrackedEvents_();
-
- // remove mouse event handlers (This may not be necessary anymore)
- utils.removeEvent(window, 'mouseout', this.mouseOutHandler_);
- utils.removeEvent(this.mouseEventElement_, 'mousemove', this.mouseMoveHandler_);
-
- // remove window handlers
- utils.removeEvent(window,'resize', this.resizeHandler_);
- this.resizeHandler_ = null;
-
- removeRecursive(this.maindiv_);
-
- var nullOut = function(obj) {
- for (var n in obj) {
- if (typeof(obj[n]) === 'object') {
- obj[n] = null;
- }
- }
- };
- // These may not all be necessary, but it can't hurt...
- nullOut(this.layout_);
- nullOut(this.plotter_);
- nullOut(this);
-};
-
-/**
- * Creates the canvas on which the chart will be drawn. Only the Renderer ever
- * draws on this particular canvas. All Dygraph work (i.e. drawing hover dots
- * or the zoom rectangles) is done on this.canvas_.
- * @param {Object} canvas The Dygraph canvas over which to overlay the plot
- * @return {Object} The newly-created canvas
- * @private
- */
-Dygraph.prototype.createPlotKitCanvas_ = function(canvas) {
- var h = utils.createCanvas();
- h.style.position = "absolute";
- // TODO(danvk): h should be offset from canvas. canvas needs to include
- // some extra area to make it easier to zoom in on the far left and far
- // right. h needs to be precisely the plot area, so that clipping occurs.
- h.style.top = canvas.style.top;
- h.style.left = canvas.style.left;
- h.width = this.width_;
- h.height = this.height_;
- h.style.width = this.width_ + "px"; // for IE
- h.style.height = this.height_ + "px"; // for IE
- return h;
-};
-
-/**
- * Creates an overlay element used to handle mouse events.
- * @return {Object} The mouse event element.
- * @private
- */
-Dygraph.prototype.createMouseEventElement_ = function() {
- return this.canvas_;
-};
-
-/**
- * Generate a set of distinct colors for the data series. This is done with a
- * color wheel. Saturation/Value are customizable, and the hue is
- * equally-spaced around the color wheel. If a custom set of colors is
- * specified, that is used instead.
- * @private
- */
-Dygraph.prototype.setColors_ = function() {
- var labels = this.getLabels();
- var num = labels.length - 1;
- this.colors_ = [];
- this.colorsMap_ = {};
-
- // These are used for when no custom colors are specified.
- var sat = this.getNumericOption('colorSaturation') || 1.0;
- var val = this.getNumericOption('colorValue') || 0.5;
- var half = Math.ceil(num / 2);
-
- var colors = this.getOption('colors');
- var visibility = this.visibility();
- for (var i = 0; i < num; i++) {
- if (!visibility[i]) {
- continue;
- }
- var label = labels[i + 1];
- var colorStr = this.attributes_.getForSeries('color', label);
- if (!colorStr) {
- if (colors) {
- colorStr = colors[i % colors.length];
- } else {
- // alternate colors for high contrast.
- var idx = i % 2 ? (half + (i + 1)/ 2) : Math.ceil((i + 1) / 2);
- var hue = (1.0 * idx / (1 + num));
- colorStr = utils.hsvToRGB(hue, sat, val);
- }
- }
- this.colors_.push(colorStr);
- this.colorsMap_[label] = colorStr;
- }
-};
-
-/**
- * Return the list of colors. This is either the list of colors passed in the
- * attributes or the autogenerated list of rgb(r,g,b) strings.
- * This does not return colors for invisible series.
- * @return {Array.<string>} The list of colors.
- */
-Dygraph.prototype.getColors = function() {
- return this.colors_;
-};
-
-/**
- * Returns a few attributes of a series, i.e. its color, its visibility, which
- * axis it's assigned to, and its column in the original data.
- * Returns null if the series does not exist.
- * Otherwise, returns an object with column, visibility, color and axis properties.
- * The "axis" property will be set to 1 for y1 and 2 for y2.
- * The "column" property can be fed back into getValue(row, column) to get
- * values for this series.
- */
-Dygraph.prototype.getPropertiesForSeries = function(series_name) {
- var idx = -1;
- var labels = this.getLabels();
- for (var i = 1; i < labels.length; i++) {
- if (labels[i] == series_name) {
- idx = i;
- break;
- }
- }
- if (idx == -1) return null;
-
- return {
- name: series_name,
- column: idx,
- visible: this.visibility()[idx - 1],
- color: this.colorsMap_[series_name],
- axis: 1 + this.attributes_.axisForSeries(series_name)
- };
-};
-
-/**
- * Create the text box to adjust the averaging period
- * @private
- */
-Dygraph.prototype.createRollInterface_ = function() {
- // Create a roller if one doesn't exist already.
- var roller = this.roller_;
- if (!roller) {
- this.roller_ = roller = document.createElement("input");
- roller.type = "text";
- roller.style.display = "none";
- roller.className = 'dygraph-roller';
- this.graphDiv.appendChild(roller);
- }
-
- var display = this.getBooleanOption('showRoller') ? 'block' : 'none';
-
- var area = this.getArea();
- var textAttr = {
- "top": (area.y + area.h - 25) + "px",
- "left": (area.x + 1) + "px",
- "display": display
- };
- roller.size = "2";
- roller.value = this.rollPeriod_;
- utils.update(roller.style, textAttr);
-
- roller.onchange = () => this.adjustRoll(roller.value);
-};
-
-/**
- * Set up all the mouse handlers needed to capture dragging behavior for zoom
- * events.
- * @private
- */
-Dygraph.prototype.createDragInterface_ = function() {
- var context = {
- // Tracks whether the mouse is down right now
- isZooming: false,
- isPanning: false, // is this drag part of a pan?
- is2DPan: false, // if so, is that pan 1- or 2-dimensional?
- dragStartX: null, // pixel coordinates
- dragStartY: null, // pixel coordinates
- dragEndX: null, // pixel coordinates
- dragEndY: null, // pixel coordinates
- dragDirection: null,
- prevEndX: null, // pixel coordinates
- prevEndY: null, // pixel coordinates
- prevDragDirection: null,
- cancelNextDblclick: false, // see comment in dygraph-interaction-model.js
-
- // The value on the left side of the graph when a pan operation starts.
- initialLeftmostDate: null,
-
- // The number of units each pixel spans. (This won't be valid for log
- // scales)
- xUnitsPerPixel: null,
-
- // TODO(danvk): update this comment
- // The range in second/value units that the viewport encompasses during a
- // panning operation.
- dateRange: null,
-
- // Top-left corner of the canvas, in DOM coords
- // TODO(konigsberg): Rename topLeftCanvasX, topLeftCanvasY.
- px: 0,
- py: 0,
-
- // Values for use with panEdgeFraction, which limit how far outside the
- // graph's data boundaries it can be panned.
- boundedDates: null, // [minDate, maxDate]
- boundedValues: null, // [[minValue, maxValue] ...]
-
- // We cover iframes during mouse interactions. See comments in
- // dygraph-utils.js for more info on why this is a good idea.
- tarp: new IFrameTarp(),
-
- // contextB is the same thing as this context object but renamed.
- initializeMouseDown: function(event, g, contextB) {
- // prevents mouse drags from selecting page text.
- if (event.preventDefault) {
- event.preventDefault(); // Firefox, Chrome, etc.
- } else {
- event.returnValue = false; // IE
- event.cancelBubble = true;
- }
-
- var canvasPos = utils.findPos(g.canvas_);
- contextB.px = canvasPos.x;
- contextB.py = canvasPos.y;
- contextB.dragStartX = utils.dragGetX_(event, contextB);
- contextB.dragStartY = utils.dragGetY_(event, contextB);
- contextB.cancelNextDblclick = false;
- contextB.tarp.cover();
- },
- destroy: function() {
- var context = this;
- if (context.isZooming || context.isPanning) {
- context.isZooming = false;
- context.dragStartX = null;
- context.dragStartY = null;
- }
-
- if (context.isPanning) {
- context.isPanning = false;
- context.draggingDate = null;
- context.dateRange = null;
- for (var i = 0; i < self.axes_.length; i++) {
- delete self.axes_[i].draggingValue;
- delete self.axes_[i].dragValueRange;
- }
- }
-
- context.tarp.uncover();
- }
- };
-
- var interactionModel = this.getOption("interactionModel");
-
- // Self is the graph.
- var self = this;
-
- // Function that binds the graph and context to the handler.
- var bindHandler = function(handler) {
- return function(event) {
- handler(event, self, context);
- };
- };
-
- for (var eventName in interactionModel) {
- if (!interactionModel.hasOwnProperty(eventName)) continue;
- this.addAndTrackEvent(this.mouseEventElement_, eventName,
- bindHandler(interactionModel[eventName]));
- }
-
- // If the user releases the mouse button during a drag, but not over the
- // canvas, then it doesn't count as a zooming action.
- if (!interactionModel.willDestroyContextMyself) {
- var mouseUpHandler = function(event) {
- context.destroy();
- };
-
- this.addAndTrackEvent(document, 'mouseup', mouseUpHandler);
- }
-};
-
-/**
- * Draw a gray zoom rectangle over the desired area of the canvas. Also clears
- * up any previous zoom rectangles that were drawn. This could be optimized to
- * avoid extra redrawing, but it's tricky to avoid interactions with the status
- * dots.
- *
- * @param {number} direction the direction of the zoom rectangle. Acceptable
- * values are utils.HORIZONTAL and utils.VERTICAL.
- * @param {number} startX The X position where the drag started, in canvas
- * coordinates.
- * @param {number} endX The current X position of the drag, in canvas coords.
- * @param {number} startY The Y position where the drag started, in canvas
- * coordinates.
- * @param {number} endY The current Y position of the drag, in canvas coords.
- * @param {number} prevDirection the value of direction on the previous call to
- * this function. Used to avoid excess redrawing
- * @param {number} prevEndX The value of endX on the previous call to this
- * function. Used to avoid excess redrawing
- * @param {number} prevEndY The value of endY on the previous call to this
- * function. Used to avoid excess redrawing
- * @private
- */
-Dygraph.prototype.drawZoomRect_ = function(direction, startX, endX, startY,
- endY, prevDirection, prevEndX,
- prevEndY) {
- var ctx = this.canvas_ctx_;
-
- // Clean up from the previous rect if necessary
- if (prevDirection == utils.HORIZONTAL) {
- ctx.clearRect(Math.min(startX, prevEndX), this.layout_.getPlotArea().y,
- Math.abs(startX - prevEndX), this.layout_.getPlotArea().h);
- } else if (prevDirection == utils.VERTICAL) {
- ctx.clearRect(this.layout_.getPlotArea().x, Math.min(startY, prevEndY),
- this.layout_.getPlotArea().w, Math.abs(startY - prevEndY));
- }
-
- // Draw a light-grey rectangle to show the new viewing area
- if (direction == utils.HORIZONTAL) {
- if (endX && startX) {
- ctx.fillStyle = "rgba(128,128,128,0.33)";
- ctx.fillRect(Math.min(startX, endX), this.layout_.getPlotArea().y,
- Math.abs(endX - startX), this.layout_.getPlotArea().h);
- }
- } else if (direction == utils.VERTICAL) {
- if (endY && startY) {
- ctx.fillStyle = "rgba(128,128,128,0.33)";
- ctx.fillRect(this.layout_.getPlotArea().x, Math.min(startY, endY),
- this.layout_.getPlotArea().w, Math.abs(endY - startY));
- }
- }
-};
-
-/**
- * Clear the zoom rectangle (and perform no zoom).
- * @private
- */
-Dygraph.prototype.clearZoomRect_ = function() {
- this.currentZoomRectArgs_ = null;
- this.canvas_ctx_.clearRect(0, 0, this.width_, this.height_);
-};
-
-/**
- * Zoom to something containing [lowX, highX]. These are pixel coordinates in
- * the canvas. The exact zoom window may be slightly larger if there are no data
- * points near lowX or highX. Don't confuse this function with doZoomXDates,
- * which accepts dates that match the raw data. This function redraws the graph.
- *
- * @param {number} lowX The leftmost pixel value that should be visible.
- * @param {number} highX The rightmost pixel value that should be visible.
- * @private
- */
-Dygraph.prototype.doZoomX_ = function(lowX, highX) {
- this.currentZoomRectArgs_ = null;
- // Find the earliest and latest dates contained in this canvasx range.
- // Convert the call to date ranges of the raw data.
- var minDate = this.toDataXCoord(lowX);
- var maxDate = this.toDataXCoord(highX);
- this.doZoomXDates_(minDate, maxDate);
-};
-
-/**
- * Zoom to something containing [minDate, maxDate] values. Don't confuse this
- * method with doZoomX which accepts pixel coordinates. This function redraws
- * the graph.
- *
- * @param {number} minDate The minimum date that should be visible.
- * @param {number} maxDate The maximum date that should be visible.
- * @private
- */
-Dygraph.prototype.doZoomXDates_ = function(minDate, maxDate) {
- // TODO(danvk): when xAxisRange is null (i.e. "fit to data", the animation
- // can produce strange effects. Rather than the x-axis transitioning slowly
- // between values, it can jerk around.)
- var old_window = this.xAxisRange();
- var new_window = [minDate, maxDate];
- const zoomCallback = this.getFunctionOption('zoomCallback');
- this.doAnimatedZoom(old_window, new_window, null, null, () => {
- if (zoomCallback) {
- zoomCallback.call(this, minDate, maxDate, this.yAxisRanges());
- }
- });
-};
-
-/**
- * Zoom to something containing [lowY, highY]. These are pixel coordinates in
- * the canvas. This function redraws the graph.
- *
- * @param {number} lowY The topmost pixel value that should be visible.
- * @param {number} highY The lowest pixel value that should be visible.
- * @private
- */
-Dygraph.prototype.doZoomY_ = function(lowY, highY) {
- this.currentZoomRectArgs_ = null;
- // Find the highest and lowest values in pixel range for each axis.
- // Note that lowY (in pixels) corresponds to the max Value (in data coords).
- // This is because pixels increase as you go down on the screen, whereas data
- // coordinates increase as you go up the screen.
- var oldValueRanges = this.yAxisRanges();
- var newValueRanges = [];
- for (var i = 0; i < this.axes_.length; i++) {
- var hi = this.toDataYCoord(lowY, i);
- var low = this.toDataYCoord(highY, i);
- newValueRanges.push([low, hi]);
- }
-
- const zoomCallback = this.getFunctionOption('zoomCallback');
- this.doAnimatedZoom(null, null, oldValueRanges, newValueRanges, () => {
- if (zoomCallback) {
- const [minX, maxX] = this.xAxisRange();
- zoomCallback.call(this, minX, maxX, this.yAxisRanges());
- }
- });
-};
-
-/**
- * Transition function to use in animations. Returns values between 0.0
- * (totally old values) and 1.0 (totally new values) for each frame.
- * @private
- */
-Dygraph.zoomAnimationFunction = function(frame, numFrames) {
- var k = 1.5;
- return (1.0 - Math.pow(k, -frame)) / (1.0 - Math.pow(k, -numFrames));
-};
-
-/**
- * Reset the zoom to the original view coordinates. This is the same as
- * double-clicking on the graph.
- */
-Dygraph.prototype.resetZoom = function() {
- const dirtyX = this.isZoomed('x');
- const dirtyY = this.isZoomed('y');
- const dirty = dirtyX || dirtyY;
-
- // Clear any selection, since it's likely to be drawn in the wrong place.
- this.clearSelection();
-
- if (!dirty) return;
-
- // Calculate extremes to avoid lack of padding on reset.
- const [minDate, maxDate] = this.xAxisExtremes();
-
- const animatedZooms = this.getBooleanOption('animatedZooms');
- const zoomCallback = this.getFunctionOption('zoomCallback');
-
- // TODO(danvk): merge this block w/ the code below.
- // TODO(danvk): factor out a generic, public zoomTo method.
- if (!animatedZooms) {
- this.dateWindow_ = null;
- this.axes_.forEach(axis => {
- if (axis.valueRange) delete axis.valueRange;
- });
-
- this.drawGraph_();
- if (zoomCallback) {
- zoomCallback.call(this, minDate, maxDate, this.yAxisRanges());
- }
- return;
- }
-
- var oldWindow=null, newWindow=null, oldValueRanges=null, newValueRanges=null;
- if (dirtyX) {
- oldWindow = this.xAxisRange();
- newWindow = [minDate, maxDate];
- }
-
- if (dirtyY) {
- oldValueRanges = this.yAxisRanges();
- newValueRanges = this.yAxisExtremes();
- }
-
- this.doAnimatedZoom(oldWindow, newWindow, oldValueRanges, newValueRanges,
- () => {
- this.dateWindow_ = null;
- this.axes_.forEach(axis => {
- if (axis.valueRange) delete axis.valueRange;
- });
- if (zoomCallback) {
- zoomCallback.call(this, minDate, maxDate, this.yAxisRanges());
- }
- });
-};
-
-/**
- * Combined animation logic for all zoom functions.
- * either the x parameters or y parameters may be null.
- * @private
- */
-Dygraph.prototype.doAnimatedZoom = function(oldXRange, newXRange, oldYRanges, newYRanges, callback) {
- var steps = this.getBooleanOption("animatedZooms") ?
- Dygraph.ANIMATION_STEPS : 1;
-
- var windows = [];
- var valueRanges = [];
- var step, frac;
-
- if (oldXRange !== null && newXRange !== null) {
- for (step = 1; step <= steps; step++) {
- frac = Dygraph.zoomAnimationFunction(step, steps);
- windows[step-1] = [oldXRange[0]*(1-frac) + frac*newXRange[0],
- oldXRange[1]*(1-frac) + frac*newXRange[1]];
- }
- }
-
- if (oldYRanges !== null && newYRanges !== null) {
- for (step = 1; step <= steps; step++) {
- frac = Dygraph.zoomAnimationFunction(step, steps);
- var thisRange = [];
- for (var j = 0; j < this.axes_.length; j++) {
- thisRange.push([oldYRanges[j][0]*(1-frac) + frac*newYRanges[j][0],
- oldYRanges[j][1]*(1-frac) + frac*newYRanges[j][1]]);
- }
- valueRanges[step-1] = thisRange;
- }
- }
-
- utils.repeatAndCleanup(step => {
- if (valueRanges.length) {
- for (var i = 0; i < this.axes_.length; i++) {
- var w = valueRanges[step][i];
- this.axes_[i].valueRange = [w[0], w[1]];
- }
- }
- if (windows.length) {
- this.dateWindow_ = windows[step];
- }
- this.drawGraph_();
- }, steps, Dygraph.ANIMATION_DURATION / steps, callback);
-};
-
-/**
- * Get the current graph's area object.
- *
- * Returns: {x, y, w, h}
- */
-Dygraph.prototype.getArea = function() {
- return this.plotter_.area;
-};
-
-/**
- * Convert a mouse event to DOM coordinates relative to the graph origin.
- *
- * Returns a two-element array: [X, Y].
- */
-Dygraph.prototype.eventToDomCoords = function(event) {
- if (event.offsetX && event.offsetY) {
- return [ event.offsetX, event.offsetY ];
- } else {
- var eventElementPos = utils.findPos(this.mouseEventElement_);
- var canvasx = utils.pageX(event) - eventElementPos.x;
- var canvasy = utils.pageY(event) - eventElementPos.y;
- return [canvasx, canvasy];
- }
-};
-
-/**
- * Given a canvas X coordinate, find the closest row.
- * @param {number} domX graph-relative DOM X coordinate
- * Returns {number} row number.
- * @private
- */
-Dygraph.prototype.findClosestRow = function(domX) {
- var minDistX = Infinity;
- var closestRow = -1;
- var sets = this.layout_.points;
- for (var i = 0; i < sets.length; i++) {
- var points = sets[i];
- var len = points.length;
- for (var j = 0; j < len; j++) {
- var point = points[j];
- if (!utils.isValidPoint(point, true)) continue;
- var dist = Math.abs(point.canvasx - domX);
- if (dist < minDistX) {
- minDistX = dist;
- closestRow = point.idx;
- }
- }
- }
-
- return closestRow;
-};
-
-/**
- * Given canvas X,Y coordinates, find the closest point.
- *
- * This finds the individual data point across all visible series
- * that's closest to the supplied DOM coordinates using the standard
- * Euclidean X,Y distance.
- *
- * @param {number} domX graph-relative DOM X coordinate
- * @param {number} domY graph-relative DOM Y coordinate
- * Returns: {row, seriesName, point}
- * @private
- */
-Dygraph.prototype.findClosestPoint = function(domX, domY) {
- var minDist = Infinity;
- var dist, dx, dy, point, closestPoint, closestSeries, closestRow;
- for ( var setIdx = this.layout_.points.length - 1 ; setIdx >= 0 ; --setIdx ) {
- var points = this.layout_.points[setIdx];
- for (var i = 0; i < points.length; ++i) {
- point = points[i];
- if (!utils.isValidPoint(point)) continue;
- dx = point.canvasx - domX;
- dy = point.canvasy - domY;
- dist = dx * dx + dy * dy;
- if (dist < minDist) {
- minDist = dist;
- closestPoint = point;
- closestSeries = setIdx;
- closestRow = point.idx;
- }
- }
- }
- var name = this.layout_.setNames[closestSeries];
- return {
- row: closestRow,
- seriesName: name,
- point: closestPoint
- };
-};
-
-/**
- * Given canvas X,Y coordinates, find the touched area in a stacked graph.
- *
- * This first finds the X data point closest to the supplied DOM X coordinate,
- * then finds the series which puts the Y coordinate on top of its filled area,
- * using linear interpolation between adjacent point pairs.
- *
- * @param {number} domX graph-relative DOM X coordinate
- * @param {number} domY graph-relative DOM Y coordinate
- * Returns: {row, seriesName, point}
- * @private
- */
-Dygraph.prototype.findStackedPoint = function(domX, domY) {
- var row = this.findClosestRow(domX);
- var closestPoint, closestSeries;
- for (var setIdx = 0; setIdx < this.layout_.points.length; ++setIdx) {
- var boundary = this.getLeftBoundary_(setIdx);
- var rowIdx = row - boundary;
- var points = this.layout_.points[setIdx];
- if (rowIdx >= points.length) continue;
- var p1 = points[rowIdx];
- if (!utils.isValidPoint(p1)) continue;
- var py = p1.canvasy;
- if (domX > p1.canvasx && rowIdx + 1 < points.length) {
- // interpolate series Y value using next point
- var p2 = points[rowIdx + 1];
- if (utils.isValidPoint(p2)) {
- var dx = p2.canvasx - p1.canvasx;
- if (dx > 0) {
- var r = (domX - p1.canvasx) / dx;
- py += r * (p2.canvasy - p1.canvasy);
- }
- }
- } else if (domX < p1.canvasx && rowIdx > 0) {
- // interpolate series Y value using previous point
- var p0 = points[rowIdx - 1];
- if (utils.isValidPoint(p0)) {
- var dx = p1.canvasx - p0.canvasx;
- if (dx > 0) {
- var r = (p1.canvasx - domX) / dx;
- py += r * (p0.canvasy - p1.canvasy);
- }
- }
- }
- // Stop if the point (domX, py) is above this series' upper edge
- if (setIdx === 0 || py < domY) {
- closestPoint = p1;
- closestSeries = setIdx;
- }
- }
- var name = this.layout_.setNames[closestSeries];
- return {
- row: row,
- seriesName: name,
- point: closestPoint
- };
-};
-
-/**
- * When the mouse moves in the canvas, display information about a nearby data
- * point and draw dots over those points in the data series. This function
- * takes care of cleanup of previously-drawn dots.
- * @param {Object} event The mousemove event from the browser.
- * @private
- */
-Dygraph.prototype.mouseMove_ = function(event) {
- // This prevents JS errors when mousing over the canvas before data loads.
- var points = this.layout_.points;
- if (points === undefined || points === null) return;
-
- var canvasCoords = this.eventToDomCoords(event);
- var canvasx = canvasCoords[0];
- var canvasy = canvasCoords[1];
-
- var highlightSeriesOpts = this.getOption("highlightSeriesOpts");
- var selectionChanged = false;
- if (highlightSeriesOpts && !this.isSeriesLocked()) {
- var closest;
- if (this.getBooleanOption("stackedGraph")) {
- closest = this.findStackedPoint(canvasx, canvasy);
- } else {
- closest = this.findClosestPoint(canvasx, canvasy);
- }
- selectionChanged = this.setSelection(closest.row, closest.seriesName);
- } else {
- var idx = this.findClosestRow(canvasx);
- selectionChanged = this.setSelection(idx);
- }
-
- var callback = this.getFunctionOption("highlightCallback");
- if (callback && selectionChanged) {
- callback.call(this, event,
- this.lastx_,
- this.selPoints_,
- this.lastRow_,
- this.highlightSet_);
- }
-};
-
-/**
- * Fetch left offset from the specified set index or if not passed, the
- * first defined boundaryIds record (see bug #236).
- * @private
- */
-Dygraph.prototype.getLeftBoundary_ = function(setIdx) {
- if (this.boundaryIds_[setIdx]) {
- return this.boundaryIds_[setIdx][0];
- } else {
- for (var i = 0; i < this.boundaryIds_.length; i++) {
- if (this.boundaryIds_[i] !== undefined) {
- return this.boundaryIds_[i][0];
- }
- }
- return 0;
- }
-};
-
-Dygraph.prototype.animateSelection_ = function(direction) {
- var totalSteps = 10;
- var millis = 30;
- if (this.fadeLevel === undefined) this.fadeLevel = 0;
- if (this.animateId === undefined) this.animateId = 0;
- var start = this.fadeLevel;
- var steps = direction < 0 ? start : totalSteps - start;
- if (steps <= 0) {
- if (this.fadeLevel) {
- this.updateSelection_(1.0);
- }
- return;
- }
-
- var thisId = ++this.animateId;
- var that = this;
- var cleanupIfClearing = function() {
- // if we haven't reached fadeLevel 0 in the max frame time,
- // ensure that the clear happens and just go to 0
- if (that.fadeLevel !== 0 && direction < 0) {
- that.fadeLevel = 0;
- that.clearSelection();
- }
- };
- utils.repeatAndCleanup(
- function(n) {
- // ignore simultaneous animations
- if (that.animateId != thisId) return;
-
- that.fadeLevel += direction;
- if (that.fadeLevel === 0) {
- that.clearSelection();
- } else {
- that.updateSelection_(that.fadeLevel / totalSteps);
- }
- },
- steps, millis, cleanupIfClearing);
-};
-
-/**
- * Draw dots over the selectied points in the data series. This function
- * takes care of cleanup of previously-drawn dots.
- * @private
- */
-Dygraph.prototype.updateSelection_ = function(opt_animFraction) {
- /*var defaultPrevented = */
- this.cascadeEvents_('select', {
- selectedRow: this.lastRow_ === -1 ? undefined : this.lastRow_,
- selectedX: this.lastx_ === -1 ? undefined : this.lastx_,
- selectedPoints: this.selPoints_
- });
- // TODO(danvk): use defaultPrevented here?
-
- // Clear the previously drawn vertical, if there is one
- var i;
- var ctx = this.canvas_ctx_;
- if (this.getOption('highlightSeriesOpts')) {
- ctx.clearRect(0, 0, this.width_, this.height_);
- var alpha = 1.0 - this.getNumericOption('highlightSeriesBackgroundAlpha');
- var backgroundColor = utils.toRGB_(this.getOption('highlightSeriesBackgroundColor'));
-
- if (alpha) {
- // Activating background fade includes an animation effect for a gradual
- // fade. TODO(klausw): make this independently configurable if it causes
- // issues? Use a shared preference to control animations?
- var animateBackgroundFade = true;
- if (animateBackgroundFade) {
- if (opt_animFraction === undefined) {
- // start a new animation
- this.animateSelection_(1);
- return;
- }
- alpha *= opt_animFraction;
- }
- ctx.fillStyle = 'rgba(' + backgroundColor.r + ',' + backgroundColor.g + ',' + backgroundColor.b + ',' + alpha + ')';
- ctx.fillRect(0, 0, this.width_, this.height_);
- }
-
- // Redraw only the highlighted series in the interactive canvas (not the
- // static plot canvas, which is where series are usually drawn).
- this.plotter_._renderLineChart(this.highlightSet_, ctx);
- } else if (this.previousVerticalX_ >= 0) {
- // Determine the maximum highlight circle size.
- var maxCircleSize = 0;
- var labels = this.attr_('labels');
- for (i = 1; i < labels.length; i++) {
- var r = this.getNumericOption('highlightCircleSize', labels[i]);
- if (r > maxCircleSize) maxCircleSize = r;
- }
- var px = this.previousVerticalX_;
- ctx.clearRect(px - maxCircleSize - 1, 0,
- 2 * maxCircleSize + 2, this.height_);
- }
-
- if (this.selPoints_.length > 0) {
- // Draw colored circles over the center of each selected point
- var canvasx = this.selPoints_[0].canvasx;
- ctx.save();
- for (i = 0; i < this.selPoints_.length; i++) {
- var pt = this.selPoints_[i];
- if (isNaN(pt.canvasy)) continue;
-
- var circleSize = this.getNumericOption('highlightCircleSize', pt.name);
- var callback = this.getFunctionOption("drawHighlightPointCallback", pt.name);
- var color = this.plotter_.colors[pt.name];
- if (!callback) {
- callback = utils.Circles.DEFAULT;
- }
- ctx.lineWidth = this.getNumericOption('strokeWidth', pt.name);
- ctx.strokeStyle = color;
- ctx.fillStyle = color;
- callback.call(this, this, pt.name, ctx, canvasx, pt.canvasy,
- color, circleSize, pt.idx);
- }
- ctx.restore();
-
- this.previousVerticalX_ = canvasx;
- }
-};
-
-/**
- * Manually set the selected points and display information about them in the
- * legend. The selection can be cleared using clearSelection() and queried
- * using getSelection().
- *
- * To set a selected series but not a selected point, call setSelection with
- * row=false and the selected series name.
- *
- * @param {number} row Row number that should be highlighted (i.e. appear with
- * hover dots on the chart).
- * @param {seriesName} optional series name to highlight that series with the
- * the highlightSeriesOpts setting.
- * @param { locked } optional If true, keep seriesName selected when mousing
- * over the graph, disabling closest-series highlighting. Call clearSelection()
- * to unlock it.
- */
-Dygraph.prototype.setSelection = function(row, opt_seriesName, opt_locked) {
- // Extract the points we've selected
- this.selPoints_ = [];
-
- var changed = false;
- if (row !== false && row >= 0) {
- if (row != this.lastRow_) changed = true;
- this.lastRow_ = row;
- for (var setIdx = 0; setIdx < this.layout_.points.length; ++setIdx) {
- var points = this.layout_.points[setIdx];
- // Check if the point at the appropriate index is the point we're looking
- // for. If it is, just use it, otherwise search the array for a point
- // in the proper place.
- var setRow = row - this.getLeftBoundary_(setIdx);
- if (setRow >= 0 && setRow < points.length && points[setRow].idx == row) {
- var point = points[setRow];
- if (point.yval !== null) this.selPoints_.push(point);
- } else {
- for (var pointIdx = 0; pointIdx < points.length; ++pointIdx) {
- var point = points[pointIdx];
- if (point.idx == row) {
- if (point.yval !== null) {
- this.selPoints_.push(point);
- }
- break;
- }
- }
- }
- }
- } else {
- if (this.lastRow_ >= 0) changed = true;
- this.lastRow_ = -1;
- }
-
- if (this.selPoints_.length) {
- this.lastx_ = this.selPoints_[0].xval;
- } else {
- this.lastx_ = -1;
- }
-
- if (opt_seriesName !== undefined) {
- if (this.highlightSet_ !== opt_seriesName) changed = true;
- this.highlightSet_ = opt_seriesName;
- }
-
- if (opt_locked !== undefined) {
- this.lockedSet_ = opt_locked;
- }
-
- if (changed) {
- this.updateSelection_(undefined);
- }
- return changed;
-};
-
-/**
- * The mouse has left the canvas. Clear out whatever artifacts remain
- * @param {Object} event the mouseout event from the browser.
- * @private
- */
-Dygraph.prototype.mouseOut_ = function(event) {
- if (this.getFunctionOption("unhighlightCallback")) {
- this.getFunctionOption("unhighlightCallback").call(this, event);
- }
-
- if (this.getBooleanOption("hideOverlayOnMouseOut") && !this.lockedSet_) {
- this.clearSelection();
- }
-};
-
-/**
- * Clears the current selection (i.e. points that were highlighted by moving
- * the mouse over the chart).
- */
-Dygraph.prototype.clearSelection = function() {
- this.cascadeEvents_('deselect', {});
-
- this.lockedSet_ = false;
- // Get rid of the overlay data
- if (this.fadeLevel) {
- this.animateSelection_(-1);
- return;
- }
- this.canvas_ctx_.clearRect(0, 0, this.width_, this.height_);
- this.fadeLevel = 0;
- this.selPoints_ = [];
- this.lastx_ = -1;
- this.lastRow_ = -1;
- this.highlightSet_ = null;
-};
-
-/**
- * Returns the number of the currently selected row. To get data for this row,
- * you can use the getValue method.
- * @return {number} row number, or -1 if nothing is selected
- */
-Dygraph.prototype.getSelection = function() {
- if (!this.selPoints_ || this.selPoints_.length < 1) {
- return -1;
- }
-
- for (var setIdx = 0; setIdx < this.layout_.points.length; setIdx++) {
- var points = this.layout_.points[setIdx];
- for (var row = 0; row < points.length; row++) {
- if (points[row].x == this.selPoints_[0].x) {
- return points[row].idx;
- }
- }
- }
- return -1;
-};
-
-/**
- * Returns the name of the currently-highlighted series.
- * Only available when the highlightSeriesOpts option is in use.
- */
-Dygraph.prototype.getHighlightSeries = function() {
- return this.highlightSet_;
-};
-
-/**
- * Returns true if the currently-highlighted series was locked
- * via setSelection(..., seriesName, true).
- */
-Dygraph.prototype.isSeriesLocked = function() {
- return this.lockedSet_;
-};
-
-/**
- * Fires when there's data available to be graphed.
- * @param {string} data Raw CSV data to be plotted
- * @private
- */
-Dygraph.prototype.loadedEvent_ = function(data) {
- this.rawData_ = this.parseCSV_(data);
- this.cascadeDataDidUpdateEvent_();
- this.predraw_();
-};
-
-/**
- * Add ticks on the x-axis representing years, months, quarters, weeks, or days
- * @private
- */
-Dygraph.prototype.addXTicks_ = function() {
- // Determine the correct ticks scale on the x-axis: quarterly, monthly, ...
- var range;
- if (this.dateWindow_) {
- range = [this.dateWindow_[0], this.dateWindow_[1]];
- } else {
- range = this.xAxisExtremes();
- }
-
- var xAxisOptionsView = this.optionsViewForAxis_('x');
- var xTicks = xAxisOptionsView('ticker')(
- range[0],
- range[1],
- this.plotter_.area.w, // TODO(danvk): should be area.width
- xAxisOptionsView,
- this);
- // var msg = 'ticker(' + range[0] + ', ' + range[1] + ', ' + this.width_ + ', ' + this.attr_('pixelsPerXLabel') + ') -> ' + JSON.stringify(xTicks);
- // console.log(msg);
- this.layout_.setXTicks(xTicks);
-};
-
-/**
- * Returns the correct handler class for the currently set options.
- * @private
- */
-Dygraph.prototype.getHandlerClass_ = function() {
- var handlerClass;
- if (this.attr_('dataHandler')) {
- handlerClass = this.attr_('dataHandler');
- } else if (this.fractions_) {
- if (this.getBooleanOption('errorBars')) {
- handlerClass = FractionsBarsHandler;
- } else {
- handlerClass = DefaultFractionHandler;
- }
- } else if (this.getBooleanOption('customBars')) {
- handlerClass = CustomBarsHandler;
- } else if (this.getBooleanOption('errorBars')) {
- handlerClass = ErrorBarsHandler;
- } else {
- handlerClass = DefaultHandler;
- }
- return handlerClass;
-};
-
-/**
- * @private
- * This function is called once when the chart's data is changed or the options
- * dictionary is updated. It is _not_ called when the user pans or zooms. The
- * idea is that values derived from the chart's data can be computed here,
- * rather than every time the chart is drawn. This includes things like the
- * number of axes, rolling averages, etc.
- */
-Dygraph.prototype.predraw_ = function() {
- var start = new Date();
-
- // Create the correct dataHandler
- this.dataHandler_ = new (this.getHandlerClass_())();
-
- this.layout_.computePlotArea();
-
- // TODO(danvk): move more computations out of drawGraph_ and into here.
- this.computeYAxes_();
-
- if (!this.is_initial_draw_) {
- this.canvas_ctx_.restore();
- this.hidden_ctx_.restore();
- }
-
- this.canvas_ctx_.save();
- this.hidden_ctx_.save();
-
- // Create a new plotter.
- this.plotter_ = new DygraphCanvasRenderer(this,
- this.hidden_,
- this.hidden_ctx_,
- this.layout_);
-
- // The roller sits in the bottom left corner of the chart. We don't know where
- // this will be until the options are available, so it's positioned here.
- this.createRollInterface_();
-
- this.cascadeEvents_('predraw');
-
- // Convert the raw data (a 2D array) into the internal format and compute
- // rolling averages.
- this.rolledSeries_ = [null]; // x-axis is the first series and it's special
- for (var i = 1; i < this.numColumns(); i++) {
- // var logScale = this.attr_('logscale', i); // TODO(klausw): this looks wrong // konigsberg thinks so too.
- var series = this.dataHandler_.extractSeries(this.rawData_, i, this.attributes_);
- if (this.rollPeriod_ > 1) {
- series = this.dataHandler_.rollingAverage(series, this.rollPeriod_, this.attributes_);
- }
-
- this.rolledSeries_.push(series);
- }
-
- // If the data or options have changed, then we'd better redraw.
- this.drawGraph_();
-
- // This is used to determine whether to do various animations.
- var end = new Date();
- this.drawingTimeMs_ = (end - start);
-};
-
-/**
- * Point structure.
- *
- * xval_* and yval_* are the original unscaled data values,
- * while x_* and y_* are scaled to the range (0.0-1.0) for plotting.
- * yval_stacked is the cumulative Y value used for stacking graphs,
- * and bottom/top/minus/plus are used for error bar graphs.
- *
- * @typedef {{
- * idx: number,
- * name: string,
- * x: ?number,
- * xval: ?number,
- * y_bottom: ?number,
- * y: ?number,
- * y_stacked: ?number,
- * y_top: ?number,
- * yval_minus: ?number,
- * yval: ?number,
- * yval_plus: ?number,
- * yval_stacked
- * }}
- */
-Dygraph.PointType = undefined;
-
-/**
- * Calculates point stacking for stackedGraph=true.
- *
- * For stacking purposes, interpolate or extend neighboring data across
- * NaN values based on stackedGraphNaNFill settings. This is for display
- * only, the underlying data value as shown in the legend remains NaN.
- *
- * @param {Array.<Dygraph.PointType>} points Point array for a single series.
- * Updates each Point's yval_stacked property.
- * @param {Array.<number>} cumulativeYval Accumulated top-of-graph stacked Y
- * values for the series seen so far. Index is the row number. Updated
- * based on the current series's values.
- * @param {Array.<number>} seriesExtremes Min and max values, updated
- * to reflect the stacked values.
- * @param {string} fillMethod Interpolation method, one of 'all', 'inside', or
- * 'none'.
- * @private
- */
-Dygraph.stackPoints_ = function(
- points, cumulativeYval, seriesExtremes, fillMethod) {
- var lastXval = null;
- var prevPoint = null;
- var nextPoint = null;
- var nextPointIdx = -1;
-
- // Find the next stackable point starting from the given index.
- var updateNextPoint = function(idx) {
- // If we've previously found a non-NaN point and haven't gone past it yet,
- // just use that.
- if (nextPointIdx >= idx) return;
-
- // We haven't found a non-NaN point yet or have moved past it,
- // look towards the right to find a non-NaN point.
- for (var j = idx; j < points.length; ++j) {
- // Clear out a previously-found point (if any) since it's no longer
- // valid, we shouldn't use it for interpolation anymore.
- nextPoint = null;
- if (!isNaN(points[j].yval) && points[j].yval !== null) {
- nextPointIdx = j;
- nextPoint = points[j];
- break;
- }
- }
- };
-
- for (var i = 0; i < points.length; ++i) {
- var point = points[i];
- var xval = point.xval;
- if (cumulativeYval[xval] === undefined) {
- cumulativeYval[xval] = 0;
- }
-
- var actualYval = point.yval;
- if (isNaN(actualYval) || actualYval === null) {
- if(fillMethod == 'none') {
- actualYval = 0;
- } else {
- // Interpolate/extend for stacking purposes if possible.
- updateNextPoint(i);
- if (prevPoint && nextPoint && fillMethod != 'none') {
- // Use linear interpolation between prevPoint and nextPoint.
- actualYval = prevPoint.yval + (nextPoint.yval - prevPoint.yval) *
- ((xval - prevPoint.xval) / (nextPoint.xval - prevPoint.xval));
- } else if (prevPoint && fillMethod == 'all') {
- actualYval = prevPoint.yval;
- } else if (nextPoint && fillMethod == 'all') {
- actualYval = nextPoint.yval;
- } else {
- actualYval = 0;
- }
- }
- } else {
- prevPoint = point;
- }
-
- var stackedYval = cumulativeYval[xval];
- if (lastXval != xval) {
- // If an x-value is repeated, we ignore the duplicates.
- stackedYval += actualYval;
- cumulativeYval[xval] = stackedYval;
- }
- lastXval = xval;
-
- point.yval_stacked = stackedYval;
-
- if (stackedYval > seriesExtremes[1]) {
- seriesExtremes[1] = stackedYval;
- }
- if (stackedYval < seriesExtremes[0]) {
- seriesExtremes[0] = stackedYval;
- }
- }
-};
-
-
-/**
- * Loop over all fields and create datasets, calculating extreme y-values for
- * each series and extreme x-indices as we go.
- *
- * dateWindow is passed in as an explicit parameter so that we can compute
- * extreme values "speculatively", i.e. without actually setting state on the
- * dygraph.
- *
- * @param {Array.<Array.<Array.<(number|Array<number>)>>} rolledSeries, where
- * rolledSeries[seriesIndex][row] = raw point, where
- * seriesIndex is the column number starting with 1, and
- * rawPoint is [x,y] or [x, [y, err]] or [x, [y, yminus, yplus]].
- * @param {?Array.<number>} dateWindow [xmin, xmax] pair, or null.
- * @return {{
- * points: Array.<Array.<Dygraph.PointType>>,
- * seriesExtremes: Array.<Array.<number>>,
- * boundaryIds: Array.<number>}}
- * @private
- */
-Dygraph.prototype.gatherDatasets_ = function(rolledSeries, dateWindow) {
- var boundaryIds = [];
- var points = [];
- var cumulativeYval = []; // For stacked series.
- var extremes = {}; // series name -> [low, high]
- var seriesIdx, sampleIdx;
- var firstIdx, lastIdx;
- var axisIdx;
-
- // Loop over the fields (series). Go from the last to the first,
- // because if they're stacked that's how we accumulate the values.
- var num_series = rolledSeries.length - 1;
- var series;
- for (seriesIdx = num_series; seriesIdx >= 1; seriesIdx--) {
- if (!this.visibility()[seriesIdx - 1]) continue;
-
- // Prune down to the desired range, if necessary (for zooming)
- // Because there can be lines going to points outside of the visible area,
- // we actually prune to visible points, plus one on either side.
- if (dateWindow) {
- series = rolledSeries[seriesIdx];
- var low = dateWindow[0];
- var high = dateWindow[1];
-
- // TODO(danvk): do binary search instead of linear search.
- // TODO(danvk): pass firstIdx and lastIdx directly to the renderer.
- firstIdx = null;
- lastIdx = null;
- for (sampleIdx = 0; sampleIdx < series.length; sampleIdx++) {
- if (series[sampleIdx][0] >= low && firstIdx === null) {
- firstIdx = sampleIdx;
- }
- if (series[sampleIdx][0] <= high) {
- lastIdx = sampleIdx;
- }
- }
-
- if (firstIdx === null) firstIdx = 0;
- var correctedFirstIdx = firstIdx;
- var isInvalidValue = true;
- while (isInvalidValue && correctedFirstIdx > 0) {
- correctedFirstIdx--;
- // check if the y value is null.
- isInvalidValue = series[correctedFirstIdx][1] === null;
- }
-
- if (lastIdx === null) lastIdx = series.length - 1;
- var correctedLastIdx = lastIdx;
- isInvalidValue = true;
- while (isInvalidValue && correctedLastIdx < series.length - 1) {
- correctedLastIdx++;
- isInvalidValue = series[correctedLastIdx][1] === null;
- }
-
- if (correctedFirstIdx!==firstIdx) {
- firstIdx = correctedFirstIdx;
- }
- if (correctedLastIdx !== lastIdx) {
- lastIdx = correctedLastIdx;
- }
-
- boundaryIds[seriesIdx-1] = [firstIdx, lastIdx];
-
- // .slice's end is exclusive, we want to include lastIdx.
- series = series.slice(firstIdx, lastIdx + 1);
- } else {
- series = rolledSeries[seriesIdx];
- boundaryIds[seriesIdx-1] = [0, series.length-1];
- }
-
- var seriesName = this.attr_("labels")[seriesIdx];
- var seriesExtremes = this.dataHandler_.getExtremeYValues(series,
- dateWindow, this.getBooleanOption("stepPlot",seriesName));
-
- var seriesPoints = this.dataHandler_.seriesToPoints(series,
- seriesName, boundaryIds[seriesIdx-1][0]);
-
- if (this.getBooleanOption("stackedGraph")) {
- axisIdx = this.attributes_.axisForSeries(seriesName);
- if (cumulativeYval[axisIdx] === undefined) {
- cumulativeYval[axisIdx] = [];
- }
- Dygraph.stackPoints_(seriesPoints, cumulativeYval[axisIdx], seriesExtremes,
- this.getBooleanOption("stackedGraphNaNFill"));
- }
-
- extremes[seriesName] = seriesExtremes;
- points[seriesIdx] = seriesPoints;
- }
-
- return { points: points, extremes: extremes, boundaryIds: boundaryIds };
-};
-
-/**
- * Update the graph with new data. This method is called when the viewing area
- * has changed. If the underlying data or options have changed, predraw_ will
- * be called before drawGraph_ is called.
- *
- * @private
- */
-Dygraph.prototype.drawGraph_ = function() {
- var start = new Date();
-
- // This is used to set the second parameter to drawCallback, below.
- var is_initial_draw = this.is_initial_draw_;
- this.is_initial_draw_ = false;
-
- this.layout_.removeAllDatasets();
- this.setColors_();
- this.attrs_.pointSize = 0.5 * this.getNumericOption('highlightCircleSize');
-
- var packed = this.gatherDatasets_(this.rolledSeries_, this.dateWindow_);
- var points = packed.points;
- var extremes = packed.extremes;
- this.boundaryIds_ = packed.boundaryIds;
-
- this.setIndexByName_ = {};
- var labels = this.attr_("labels");
- var dataIdx = 0;
- for (var i = 1; i < points.length; i++) {
- if (!this.visibility()[i - 1]) continue;
- this.layout_.addDataset(labels[i], points[i]);
- this.datasetIndex_[i] = dataIdx++;
- }
- for (var i = 0; i < labels.length; i++) {
- this.setIndexByName_[labels[i]] = i;
- }
-
- this.computeYAxisRanges_(extremes);
- this.layout_.setYAxes(this.axes_);
-
- this.addXTicks_();
-
- // Tell PlotKit to use this new data and render itself
- this.layout_.evaluate();
- this.renderGraph_(is_initial_draw);
-
- if (this.getStringOption("timingName")) {
- var end = new Date();
- console.log(this.getStringOption("timingName") + " - drawGraph: " + (end - start) + "ms");
- }
-};
-
-/**
- * This does the work of drawing the chart. It assumes that the layout and axis
- * scales have already been set (e.g. by predraw_).
- *
- * @private
- */
-Dygraph.prototype.renderGraph_ = function(is_initial_draw) {
- this.cascadeEvents_('clearChart');
- this.plotter_.clear();
-
- const underlayCallback = this.getFunctionOption('underlayCallback');
- if (underlayCallback) {
- // NOTE: we pass the dygraph object to this callback twice to avoid breaking
- // users who expect a deprecated form of this callback.
- underlayCallback.call(this,
- this.hidden_ctx_, this.layout_.getPlotArea(), this, this);
- }
-
- var e = {
- canvas: this.hidden_,
- drawingContext: this.hidden_ctx_
- };
- this.cascadeEvents_('willDrawChart', e);
- this.plotter_.render();
- this.cascadeEvents_('didDrawChart', e);
- this.lastRow_ = -1; // because plugins/legend.js clears the legend
-
- // TODO(danvk): is this a performance bottleneck when panning?
- // The interaction canvas should already be empty in that situation.
- this.canvas_.getContext('2d').clearRect(0, 0, this.width_, this.height_);
-
- const drawCallback = this.getFunctionOption("drawCallback");
- if (drawCallback !== null) {
- drawCallback.call(this, this, is_initial_draw);
- }
- if (is_initial_draw) {
- this.readyFired_ = true;
- while (this.readyFns_.length > 0) {
- var fn = this.readyFns_.pop();
- fn(this);
- }
- }
-};
-
-/**
- * @private
- * Determine properties of the y-axes which are independent of the data
- * currently being displayed. This includes things like the number of axes and
- * the style of the axes. It does not include the range of each axis and its
- * tick marks.
- * This fills in this.axes_.
- * axes_ = [ { options } ]
- * indices are into the axes_ array.
- */
-Dygraph.prototype.computeYAxes_ = function() {
- var axis, index, opts, v;
-
- // this.axes_ doesn't match this.attributes_.axes_.options. It's used for
- // data computation as well as options storage.
- // Go through once and add all the axes.
- this.axes_ = [];
-
- for (axis = 0; axis < this.attributes_.numAxes(); axis++) {
- // Add a new axis, making a copy of its per-axis options.
- opts = { g : this };
- utils.update(opts, this.attributes_.axisOptions(axis));
- this.axes_[axis] = opts;
- }
-
- for (axis = 0; axis < this.axes_.length; axis++) {
- if (axis === 0) {
- opts = this.optionsViewForAxis_('y' + (axis ? '2' : ''));
- v = opts("valueRange");
- if (v) this.axes_[axis].valueRange = v;
- } else { // To keep old behavior
- var axes = this.user_attrs_.axes;
- if (axes && axes.y2) {
- v = axes.y2.valueRange;
- if (v) this.axes_[axis].valueRange = v;
- }
- }
- }
-};
-
-/**
- * Returns the number of y-axes on the chart.
- * @return {number} the number of axes.
- */
-Dygraph.prototype.numAxes = function() {
- return this.attributes_.numAxes();
-};
-
-/**
- * @private
- * Returns axis properties for the given series.
- * @param {string} setName The name of the series for which to get axis
- * properties, e.g. 'Y1'.
- * @return {Object} The axis properties.
- */
-Dygraph.prototype.axisPropertiesForSeries = function(series) {
- // TODO(danvk): handle errors.
- return this.axes_[this.attributes_.axisForSeries(series)];
-};
-
-/**
- * @private
- * Determine the value range and tick marks for each axis.
- * @param {Object} extremes A mapping from seriesName -> [low, high]
- * This fills in the valueRange and ticks fields in each entry of this.axes_.
- */
-Dygraph.prototype.computeYAxisRanges_ = function(extremes) {
- var isNullUndefinedOrNaN = function(num) {
- return isNaN(parseFloat(num));
- };
- var numAxes = this.attributes_.numAxes();
- var ypadCompat, span, series, ypad;
-
- var p_axis;
-
- // Compute extreme values, a span and tick marks for each axis.
- for (var i = 0; i < numAxes; i++) {
- var axis = this.axes_[i];
- var logscale = this.attributes_.getForAxis("logscale", i);
- var includeZero = this.attributes_.getForAxis("includeZero", i);
- var independentTicks = this.attributes_.getForAxis("independentTicks", i);
- series = this.attributes_.seriesForAxis(i);
-
- // Add some padding. This supports two Y padding operation modes:
- //
- // - backwards compatible (yRangePad not set):
- // 10% padding for automatic Y ranges, but not for user-supplied
- // ranges, and move a close-to-zero edge to zero, since drawing at the edge
- // results in invisible lines. Unfortunately lines drawn at the edge of a
- // user-supplied range will still be invisible. If logscale is
- // set, add a variable amount of padding at the top but
- // none at the bottom.
- //
- // - new-style (yRangePad set by the user):
- // always add the specified Y padding.
- //
- ypadCompat = true;
- ypad = 0.1; // add 10%
- const yRangePad = this.getNumericOption('yRangePad');
- if (yRangePad !== null) {
- ypadCompat = false;
- // Convert pixel padding to ratio
- ypad = yRangePad / this.plotter_.area.h;
- }
-
- if (series.length === 0) {
- // If no series are defined or visible then use a reasonable default
- axis.extremeRange = [0, 1];
- } else {
- // Calculate the extremes of extremes.
- var minY = Infinity; // extremes[series[0]][0];
- var maxY = -Infinity; // extremes[series[0]][1];
- var extremeMinY, extremeMaxY;
-
- for (var j = 0; j < series.length; j++) {
- // this skips invisible series
- if (!extremes.hasOwnProperty(series[j])) continue;
-
- // Only use valid extremes to stop null data series' from corrupting the scale.
- extremeMinY = extremes[series[j]][0];
- if (extremeMinY !== null) {
- minY = Math.min(extremeMinY, minY);
- }
- extremeMaxY = extremes[series[j]][1];
- if (extremeMaxY !== null) {
- maxY = Math.max(extremeMaxY, maxY);
- }
- }
-
- // Include zero if requested by the user.
- if (includeZero && !logscale) {
- if (minY > 0) minY = 0;
- if (maxY < 0) maxY = 0;
- }
-
- // Ensure we have a valid scale, otherwise default to [0, 1] for safety.
- if (minY == Infinity) minY = 0;
- if (maxY == -Infinity) maxY = 1;
-
- span = maxY - minY;
- // special case: if we have no sense of scale, center on the sole value.
- if (span === 0) {
- if (maxY !== 0) {
- span = Math.abs(maxY);
- } else {
- // ... and if the sole value is zero, use range 0-1.
- maxY = 1;
- span = 1;
- }
- }
-
- var maxAxisY = maxY, minAxisY = minY;
- if (ypadCompat) {
- if (logscale) {
- maxAxisY = maxY + ypad * span;
- minAxisY = minY;
- } else {
- maxAxisY = maxY + ypad * span;
- minAxisY = minY - ypad * span;
-
- // Backwards-compatible behavior: Move the span to start or end at zero if it's
- // close to zero.
- if (minAxisY < 0 && minY >= 0) minAxisY = 0;
- if (maxAxisY > 0 && maxY <= 0) maxAxisY = 0;
- }
- }
- axis.extremeRange = [minAxisY, maxAxisY];
- }
- if (axis.valueRange) {
- // This is a user-set value range for this axis.
- var y0 = isNullUndefinedOrNaN(axis.valueRange[0]) ? axis.extremeRange[0] : axis.valueRange[0];
- var y1 = isNullUndefinedOrNaN(axis.valueRange[1]) ? axis.extremeRange[1] : axis.valueRange[1];
- axis.computedValueRange = [y0, y1];
- } else {
- axis.computedValueRange = axis.extremeRange;
- }
- if (!ypadCompat) {
- // When using yRangePad, adjust the upper/lower bounds to add
- // padding unless the user has zoomed/panned the Y axis range.
-
- y0 = axis.computedValueRange[0];
- y1 = axis.computedValueRange[1];
-
- // special case #781: if we have no sense of scale, center on the sole value.
- if (y0 === y1) {
- y0 -= 0.5;
- y1 += 0.5;
- }
-
- if (logscale) {
- var y0pct = ypad / (2 * ypad - 1);
- var y1pct = (ypad - 1) / (2 * ypad - 1);
- axis.computedValueRange[0] = utils.logRangeFraction(y0, y1, y0pct);
- axis.computedValueRange[1] = utils.logRangeFraction(y0, y1, y1pct);
- } else {
- span = y1 - y0;
- axis.computedValueRange[0] = y0 - span * ypad;
- axis.computedValueRange[1] = y1 + span * ypad;
- }
- }
-
-
- if (independentTicks) {
- axis.independentTicks = independentTicks;
- var opts = this.optionsViewForAxis_('y' + (i ? '2' : ''));
- var ticker = opts('ticker');
- axis.ticks = ticker(axis.computedValueRange[0],
- axis.computedValueRange[1],
- this.plotter_.area.h,
- opts,
- this);
- // Define the first independent axis as primary axis.
- if (!p_axis) p_axis = axis;
- }
- }
- if (p_axis === undefined) {
- throw ("Configuration Error: At least one axis has to have the \"independentTicks\" option activated.");
- }
- // Add ticks. By default, all axes inherit the tick positions of the
- // primary axis. However, if an axis is specifically marked as having
- // independent ticks, then that is permissible as well.
- for (var i = 0; i < numAxes; i++) {
- var axis = this.axes_[i];
-
- if (!axis.independentTicks) {
- var opts = this.optionsViewForAxis_('y' + (i ? '2' : ''));
- var ticker = opts('ticker');
- var p_ticks = p_axis.ticks;
- var p_scale = p_axis.computedValueRange[1] - p_axis.computedValueRange[0];
- var scale = axis.computedValueRange[1] - axis.computedValueRange[0];
- var tick_values = [];
- for (var k = 0; k < p_ticks.length; k++) {
- var y_frac = (p_ticks[k].v - p_axis.computedValueRange[0]) / p_scale;
- var y_val = axis.computedValueRange[0] + y_frac * scale;
- tick_values.push(y_val);
- }
-
- axis.ticks = ticker(axis.computedValueRange[0],
- axis.computedValueRange[1],
- this.plotter_.area.h,
- opts,
- this,
- tick_values);
- }
- }
-};
-
-/**
- * Detects the type of the str (date or numeric) and sets the various
- * formatting attributes in this.attrs_ based on this type.
- * @param {string} str An x value.
- * @private
- */
-Dygraph.prototype.detectTypeFromString_ = function(str) {
- var isDate = false;
- var dashPos = str.indexOf('-'); // could be 2006-01-01 _or_ 1.0e-2
- if ((dashPos > 0 && (str[dashPos-1] != 'e' && str[dashPos-1] != 'E')) ||
- str.indexOf('/') >= 0 ||
- isNaN(parseFloat(str))) {
- isDate = true;
- } else if (str.length == 8 && str > '19700101' && str < '20371231') {
- // TODO(danvk): remove support for this format.
- isDate = true;
- }
-
- this.setXAxisOptions_(isDate);
-};
-
-Dygraph.prototype.setXAxisOptions_ = function(isDate) {
- if (isDate) {
- this.attrs_.xValueParser = utils.dateParser;
- this.attrs_.axes.x.valueFormatter = utils.dateValueFormatter;
- this.attrs_.axes.x.ticker = DygraphTickers.dateTicker;
- this.attrs_.axes.x.axisLabelFormatter = utils.dateAxisLabelFormatter;
- } else {
- /** @private (shut up, jsdoc!) */
- this.attrs_.xValueParser = function(x) { return parseFloat(x); };
- // TODO(danvk): use Dygraph.numberValueFormatter here?
- /** @private (shut up, jsdoc!) */
- this.attrs_.axes.x.valueFormatter = function(x) { return x; };
- this.attrs_.axes.x.ticker = DygraphTickers.numericTicks;
- this.attrs_.axes.x.axisLabelFormatter = this.attrs_.axes.x.valueFormatter;
- }
-};
-
-/**
- * @private
- * Parses a string in a special csv format. We expect a csv file where each
- * line is a date point, and the first field in each line is the date string.
- * We also expect that all remaining fields represent series.
- * if the errorBars attribute is set, then interpret the fields as:
- * date, series1, stddev1, series2, stddev2, ...
- * @param {[Object]} data See above.
- *
- * @return [Object] An array with one entry for each row. These entries
- * are an array of cells in that row. The first entry is the parsed x-value for
- * the row. The second, third, etc. are the y-values. These can take on one of
- * three forms, depending on the CSV and constructor parameters:
- * 1. numeric value
- * 2. [ value, stddev ]
- * 3. [ low value, center value, high value ]
- */
-Dygraph.prototype.parseCSV_ = function(data) {
- var ret = [];
- var line_delimiter = utils.detectLineDelimiter(data);
- var lines = data.split(line_delimiter || "\n");
- var vals, j;
-
- // Use the default delimiter or fall back to a tab if that makes sense.
- var delim = this.getStringOption('delimiter');
- if (lines[0].indexOf(delim) == -1 && lines[0].indexOf('\t') >= 0) {
- delim = '\t';
- }
-
- var start = 0;
- if (!('labels' in this.user_attrs_)) {
- // User hasn't explicitly set labels, so they're (presumably) in the CSV.
- start = 1;
- this.attrs_.labels = lines[0].split(delim); // NOTE: _not_ user_attrs_.
- this.attributes_.reparseSeries();
- }
- var line_no = 0;
-
- var xParser;
- var defaultParserSet = false; // attempt to auto-detect x value type
- var expectedCols = this.attr_("labels").length;
- var outOfOrder = false;
- for (var i = start; i < lines.length; i++) {
- var line = lines[i];
- line_no = i;
- if (line.length === 0) continue; // skip blank lines
- if (line[0] == '#') continue; // skip comment lines
- var inFields = line.split(delim);
- if (inFields.length < 2) continue;
-
- var fields = [];
- if (!defaultParserSet) {
- this.detectTypeFromString_(inFields[0]);
- xParser = this.getFunctionOption("xValueParser");
- defaultParserSet = true;
- }
- fields[0] = xParser(inFields[0], this);
-
- // If fractions are expected, parse the numbers as "A/B"
- if (this.fractions_) {
- for (j = 1; j < inFields.length; j++) {
- // TODO(danvk): figure out an appropriate way to flag parse errors.
- vals = inFields[j].split("/");
- if (vals.length != 2) {
- console.error('Expected fractional "num/den" values in CSV data ' +
- "but found a value '" + inFields[j] + "' on line " +
- (1 + i) + " ('" + line + "') which is not of this form.");
- fields[j] = [0, 0];
- } else {
- fields[j] = [utils.parseFloat_(vals[0], i, line),
- utils.parseFloat_(vals[1], i, line)];
- }
- }
- } else if (this.getBooleanOption("errorBars")) {
- // If there are error bars, values are (value, stddev) pairs
- if (inFields.length % 2 != 1) {
- console.error('Expected alternating (value, stdev.) pairs in CSV data ' +
- 'but line ' + (1 + i) + ' has an odd number of values (' +
- (inFields.length - 1) + "): '" + line + "'");
- }
- for (j = 1; j < inFields.length; j += 2) {
- fields[(j + 1) / 2] = [utils.parseFloat_(inFields[j], i, line),
- utils.parseFloat_(inFields[j + 1], i, line)];
- }
- } else if (this.getBooleanOption("customBars")) {
- // Bars are a low;center;high tuple
- for (j = 1; j < inFields.length; j++) {
- var val = inFields[j];
- if (/^ *$/.test(val)) {
- fields[j] = [null, null, null];
- } else {
- vals = val.split(";");
- if (vals.length == 3) {
- fields[j] = [ utils.parseFloat_(vals[0], i, line),
- utils.parseFloat_(vals[1], i, line),
- utils.parseFloat_(vals[2], i, line) ];
- } else {
- console.warn('When using customBars, values must be either blank ' +
- 'or "low;center;high" tuples (got "' + val +
- '" on line ' + (1+i));
- }
- }
- }
- } else {
- // Values are just numbers
- for (j = 1; j < inFields.length; j++) {
- fields[j] = utils.parseFloat_(inFields[j], i, line);
- }
- }
- if (ret.length > 0 && fields[0] < ret[ret.length - 1][0]) {
- outOfOrder = true;
- }
-
- if (fields.length != expectedCols) {
- console.error("Number of columns in line " + i + " (" + fields.length +
- ") does not agree with number of labels (" + expectedCols +
- ") " + line);
- }
-
- // If the user specified the 'labels' option and none of the cells of the
- // first row parsed correctly, then they probably double-specified the
- // labels. We go with the values set in the option, discard this row and
- // log a warning to the JS console.
- if (i === 0 && this.attr_('labels')) {
- var all_null = true;
- for (j = 0; all_null && j < fields.length; j++) {
- if (fields[j]) all_null = false;
- }
- if (all_null) {
- console.warn("The dygraphs 'labels' option is set, but the first row " +
- "of CSV data ('" + line + "') appears to also contain " +
- "labels. Will drop the CSV labels and use the option " +
- "labels.");
- continue;
- }
- }
- ret.push(fields);
- }
-
- if (outOfOrder) {
- console.warn("CSV is out of order; order it correctly to speed loading.");
- ret.sort(function(a,b) { return a[0] - b[0]; });
- }
-
- return ret;
-};
-
-// In native format, all values must be dates or numbers.
-// This check isn't perfect but will catch most mistaken uses of strings.
-function validateNativeFormat(data) {
- const firstRow = data[0];
- const firstX = firstRow[0];
- if (typeof firstX !== 'number' && !utils.isDateLike(firstX)) {
- throw new Error(`Expected number or date but got ${typeof firstX}: ${firstX}.`);
- }
- for (let i = 1; i < firstRow.length; i++) {
- const val = firstRow[i];
- if (val === null || val === undefined) continue;
- if (typeof val === 'number') continue;
- if (utils.isArrayLike(val)) continue; // e.g. error bars or custom bars.
- throw new Error(`Expected number or array but got ${typeof val}: ${val}.`);
- }
-}
-
-/**
- * The user has provided their data as a pre-packaged JS array. If the x values
- * are numeric, this is the same as dygraphs' internal format. If the x values
- * are dates, we need to convert them from Date objects to ms since epoch.
- * @param {!Array} data
- * @return {Object} data with numeric x values.
- * @private
- */
-Dygraph.prototype.parseArray_ = function(data) {
- // Peek at the first x value to see if it's numeric.
- if (data.length === 0) {
- console.error("Can't plot empty data set");
- return null;
- }
- if (data[0].length === 0) {
- console.error("Data set cannot contain an empty row");
- return null;
- }
-
- validateNativeFormat(data);
-
- var i;
- if (this.attr_("labels") === null) {
- console.warn("Using default labels. Set labels explicitly via 'labels' " +
- "in the options parameter");
- this.attrs_.labels = [ "X" ];
- for (i = 1; i < data[0].length; i++) {
- this.attrs_.labels.push("Y" + i); // Not user_attrs_.
- }
- this.attributes_.reparseSeries();
- } else {
- var num_labels = this.attr_("labels");
- if (num_labels.length != data[0].length) {
- console.error("Mismatch between number of labels (" + num_labels + ")" +
- " and number of columns in array (" + data[0].length + ")");
- return null;
- }
- }
-
- if (utils.isDateLike(data[0][0])) {
- // Some intelligent defaults for a date x-axis.
- this.attrs_.axes.x.valueFormatter = utils.dateValueFormatter;
- this.attrs_.axes.x.ticker = DygraphTickers.dateTicker;
- this.attrs_.axes.x.axisLabelFormatter = utils.dateAxisLabelFormatter;
-
- // Assume they're all dates.
- var parsedData = utils.clone(data);
- for (i = 0; i < data.length; i++) {
- if (parsedData[i].length === 0) {
- console.error("Row " + (1 + i) + " of data is empty");
- return null;
- }
- if (parsedData[i][0] === null ||
- typeof(parsedData[i][0].getTime) != 'function' ||
- isNaN(parsedData[i][0].getTime())) {
- console.error("x value in row " + (1 + i) + " is not a Date");
- return null;
- }
- parsedData[i][0] = parsedData[i][0].getTime();
- }
- return parsedData;
- } else {
- // Some intelligent defaults for a numeric x-axis.
- /** @private (shut up, jsdoc!) */
- this.attrs_.axes.x.valueFormatter = function(x) { return x; };
- this.attrs_.axes.x.ticker = DygraphTickers.numericTicks;
- this.attrs_.axes.x.axisLabelFormatter = utils.numberAxisLabelFormatter;
- return data;
- }
-};
-
-/**
- * Parses a DataTable object from gviz.
- * The data is expected to have a first column that is either a date or a
- * number. All subsequent columns must be numbers. If there is a clear mismatch
- * between this.xValueParser_ and the type of the first column, it will be
- * fixed. Fills out rawData_.
- * @param {!google.visualization.DataTable} data See above.
- * @private
- */
-Dygraph.prototype.parseDataTable_ = function(data) {
- var shortTextForAnnotationNum = function(num) {
- // converts [0-9]+ [A-Z][a-z]*
- // example: 0=A, 1=B, 25=Z, 26=Aa, 27=Ab
- // and continues like.. Ba Bb .. Za .. Zz..Aaa...Zzz Aaaa Zzzz
- var shortText = String.fromCharCode(65 /* A */ + num % 26);
- num = Math.floor(num / 26);
- while ( num > 0 ) {
- shortText = String.fromCharCode(65 /* A */ + (num - 1) % 26 ) + shortText.toLowerCase();
- num = Math.floor((num - 1) / 26);
- }
- return shortText;
- };
-
- var cols = data.getNumberOfColumns();
- var rows = data.getNumberOfRows();
-
- var indepType = data.getColumnType(0);
- if (indepType == 'date' || indepType == 'datetime') {
- this.attrs_.xValueParser = utils.dateParser;
- this.attrs_.axes.x.valueFormatter = utils.dateValueFormatter;
- this.attrs_.axes.x.ticker = DygraphTickers.dateTicker;
- this.attrs_.axes.x.axisLabelFormatter = utils.dateAxisLabelFormatter;
- } else if (indepType == 'number') {
- this.attrs_.xValueParser = function(x) { return parseFloat(x); };
- this.attrs_.axes.x.valueFormatter = function(x) { return x; };
- this.attrs_.axes.x.ticker = DygraphTickers.numericTicks;
- this.attrs_.axes.x.axisLabelFormatter = this.attrs_.axes.x.valueFormatter;
- } else {
- throw new Error(
- "only 'date', 'datetime' and 'number' types are supported " +
- "for column 1 of DataTable input (Got '" + indepType + "')");
- }
-
- // Array of the column indices which contain data (and not annotations).
- var colIdx = [];
- var annotationCols = {}; // data index -> [annotation cols]
- var hasAnnotations = false;
- var i, j;
- for (i = 1; i < cols; i++) {
- var type = data.getColumnType(i);
- if (type == 'number') {
- colIdx.push(i);
- } else if (type == 'string' && this.getBooleanOption('displayAnnotations')) {
- // This is OK -- it's an annotation column.
- var dataIdx = colIdx[colIdx.length - 1];
- if (!annotationCols.hasOwnProperty(dataIdx)) {
- annotationCols[dataIdx] = [i];
- } else {
- annotationCols[dataIdx].push(i);
- }
- hasAnnotations = true;
- } else {
- throw new Error(
- "Only 'number' is supported as a dependent type with Gviz." +
- " 'string' is only supported if displayAnnotations is true");
- }
- }
-
- // Read column labels
- // TODO(danvk): add support back for errorBars
- var labels = [data.getColumnLabel(0)];
- for (i = 0; i < colIdx.length; i++) {
- labels.push(data.getColumnLabel(colIdx[i]));
- if (this.getBooleanOption("errorBars")) i += 1;
- }
- this.attrs_.labels = labels;
- cols = labels.length;
-
- var ret = [];
- var outOfOrder = false;
- var annotations = [];
- for (i = 0; i < rows; i++) {
- var row = [];
- if (typeof(data.getValue(i, 0)) === 'undefined' ||
- data.getValue(i, 0) === null) {
- console.warn("Ignoring row " + i +
- " of DataTable because of undefined or null first column.");
- continue;
- }
-
- if (indepType == 'date' || indepType == 'datetime') {
- row.push(data.getValue(i, 0).getTime());
- } else {
- row.push(data.getValue(i, 0));
- }
- if (!this.getBooleanOption("errorBars")) {
- for (j = 0; j < colIdx.length; j++) {
- var col = colIdx[j];
- row.push(data.getValue(i, col));
- if (hasAnnotations &&
- annotationCols.hasOwnProperty(col) &&
- data.getValue(i, annotationCols[col][0]) !== null) {
- var ann = {};
- ann.series = data.getColumnLabel(col);
- ann.xval = row[0];
- ann.shortText = shortTextForAnnotationNum(annotations.length);
- ann.text = '';
- for (var k = 0; k < annotationCols[col].length; k++) {
- if (k) ann.text += "\n";
- ann.text += data.getValue(i, annotationCols[col][k]);
- }
- annotations.push(ann);
- }
- }
-
- // Strip out infinities, which give dygraphs problems later on.
- for (j = 0; j < row.length; j++) {
- if (!isFinite(row[j])) row[j] = null;
- }
- } else {
- for (j = 0; j < cols - 1; j++) {
- row.push([ data.getValue(i, 1 + 2 * j), data.getValue(i, 2 + 2 * j) ]);
- }
- }
- if (ret.length > 0 && row[0] < ret[ret.length - 1][0]) {
- outOfOrder = true;
- }
- ret.push(row);
- }
-
- if (outOfOrder) {
- console.warn("DataTable is out of order; order it correctly to speed loading.");
- ret.sort(function(a,b) { return a[0] - b[0]; });
- }
- this.rawData_ = ret;
-
- if (annotations.length > 0) {
- this.setAnnotations(annotations, true);
- }
- this.attributes_.reparseSeries();
-};
-
-/**
- * Signals to plugins that the chart data has updated.
- * This happens after the data has updated but before the chart has redrawn.
- * @private
- */
-Dygraph.prototype.cascadeDataDidUpdateEvent_ = function() {
- // TODO(danvk): there are some issues checking xAxisRange() and using
- // toDomCoords from handlers of this event. The visible range should be set
- // when the chart is drawn, not derived from the data.
- this.cascadeEvents_('dataDidUpdate', {});
-};
-
-/**
- * Get the CSV data. If it's in a function, call that function. If it's in a
- * file, do an XMLHttpRequest to get it.
- * @private
- */
-Dygraph.prototype.start_ = function() {
- var data = this.file_;
-
- // Functions can return references of all other types.
- if (typeof data == 'function') {
- data = data();
- }
-
- if (utils.isArrayLike(data)) {
- this.rawData_ = this.parseArray_(data);
- this.cascadeDataDidUpdateEvent_();
- this.predraw_();
- } else if (typeof data == 'object' &&
- typeof data.getColumnRange == 'function') {
- // must be a DataTable from gviz.
- this.parseDataTable_(data);
- this.cascadeDataDidUpdateEvent_();
- this.predraw_();
- } else if (typeof data == 'string') {
- // Heuristic: a newline means it's CSV data. Otherwise it's an URL.
- var line_delimiter = utils.detectLineDelimiter(data);
- if (line_delimiter) {
- this.loadedEvent_(data);
- } else {
- // REMOVE_FOR_IE
- var req;
- if (window.XMLHttpRequest) {
- // Firefox, Opera, IE7, and other browsers will use the native object
- req = new XMLHttpRequest();
- } else {
- // IE 5 and 6 will use the ActiveX control
- req = new ActiveXObject("Microsoft.XMLHTTP");
- }
-
- var caller = this;
- req.onreadystatechange = function () {
- if (req.readyState == 4) {
- if (req.status === 200 || // Normal http
- req.status === 0) { // Chrome w/ --allow-file-access-from-files
- caller.loadedEvent_(req.responseText);
- }
- }
- };
-
- req.open("GET", data, true);
- req.send(null);
- }
- } else {
- console.error("Unknown data format: " + (typeof data));
- }
-};
-
-/**
- * Changes various properties of the graph. These can include:
- * <ul>
- * <li>file: changes the source data for the graph</li>
- * <li>errorBars: changes whether the data contains stddev</li>
- * </ul>
- *
- * There's a huge variety of options that can be passed to this method. For a
- * full list, see http://dygraphs.com/options.html.
- *
- * @param {Object} input_attrs The new properties and values
- * @param {boolean} block_redraw Usually the chart is redrawn after every
- * call to updateOptions(). If you know better, you can pass true to
- * explicitly block the redraw. This can be useful for chaining
- * updateOptions() calls, avoiding the occasional infinite loop and
- * preventing redraws when it's not necessary (e.g. when updating a
- * callback).
- */
-Dygraph.prototype.updateOptions = function(input_attrs, block_redraw) {
- if (typeof(block_redraw) == 'undefined') block_redraw = false;
-
- // copyUserAttrs_ drops the "file" parameter as a convenience to us.
- var file = input_attrs.file;
- var attrs = Dygraph.copyUserAttrs_(input_attrs);
-
- // TODO(danvk): this is a mess. Move these options into attr_.
- if ('rollPeriod' in attrs) {
- this.rollPeriod_ = attrs.rollPeriod;
- }
- if ('dateWindow' in attrs) {
- this.dateWindow_ = attrs.dateWindow;
- }
-
- // TODO(danvk): validate per-series options.
- // Supported:
- // strokeWidth
- // pointSize
- // drawPoints
- // highlightCircleSize
-
- // Check if this set options will require new points.
- var requiresNewPoints = utils.isPixelChangingOptionList(this.attr_("labels"), attrs);
-
- utils.updateDeep(this.user_attrs_, attrs);
-
- this.attributes_.reparseSeries();
-
- if (file) {
- // This event indicates that the data is about to change, but hasn't yet.
- // TODO(danvk): support cancellation of the update via this event.
- this.cascadeEvents_('dataWillUpdate', {});
-
- this.file_ = file;
- if (!block_redraw) this.start_();
- } else {
- if (!block_redraw) {
- if (requiresNewPoints) {
- this.predraw_();
- } else {
- this.renderGraph_(false);
- }
- }
- }
-};
-
-/**
- * Make a copy of input attributes, removing file as a convenience.
- * @private
- */
-Dygraph.copyUserAttrs_ = function(attrs) {
- var my_attrs = {};
- for (var k in attrs) {
- if (!attrs.hasOwnProperty(k)) continue;
- if (k == 'file') continue;
- if (attrs.hasOwnProperty(k)) my_attrs[k] = attrs[k];
- }
- return my_attrs;
-};
-
-/**
- * Resizes the dygraph. If no parameters are specified, resizes to fill the
- * containing div (which has presumably changed size since the dygraph was
- * instantiated. If the width/height are specified, the div will be resized.
- *
- * This is far more efficient than destroying and re-instantiating a
- * Dygraph, since it doesn't have to reparse the underlying data.
- *
- * @param {number} width Width (in pixels)
- * @param {number} height Height (in pixels)
- */
-Dygraph.prototype.resize = function(width, height) {
- if (this.resize_lock) {
- return;
- }
- this.resize_lock = true;
-
- if ((width === null) != (height === null)) {
- console.warn("Dygraph.resize() should be called with zero parameters or " +
- "two non-NULL parameters. Pretending it was zero.");
- width = height = null;
- }
-
- var old_width = this.width_;
- var old_height = this.height_;
-
- if (width) {
- this.maindiv_.style.width = width + "px";
- this.maindiv_.style.height = height + "px";
- this.width_ = width;
- this.height_ = height;
- } else {
- this.width_ = this.maindiv_.clientWidth;
- this.height_ = this.maindiv_.clientHeight;
- }
-
- if (old_width != this.width_ || old_height != this.height_) {
- // Resizing a canvas erases it, even when the size doesn't change, so
- // any resize needs to be followed by a redraw.
- this.resizeElements_();
- this.predraw_();
- }
-
- this.resize_lock = false;
-};
-
-/**
- * Adjusts the number of points in the rolling average. Updates the graph to
- * reflect the new averaging period.
- * @param {number} length Number of points over which to average the data.
- */
-Dygraph.prototype.adjustRoll = function(length) {
- this.rollPeriod_ = length;
- this.predraw_();
-};
-
-/**
- * Returns a boolean array of visibility statuses.
- */
-Dygraph.prototype.visibility = function() {
- // Do lazy-initialization, so that this happens after we know the number of
- // data series.
- if (!this.getOption("visibility")) {
- this.attrs_.visibility = [];
- }
- // TODO(danvk): it looks like this could go into an infinite loop w/ user_attrs.
- while (this.getOption("visibility").length < this.numColumns() - 1) {
- this.attrs_.visibility.push(true);
- }
- return this.getOption("visibility");
-};
-
-/**
- * Changes the visibility of one or more series.
- *
- * @param {number|number[]|object} num the series index or an array of series indices
- * or a boolean array of visibility states by index
- * or an object mapping series numbers, as keys, to
- * visibility state (boolean values)
- * @param {boolean} value the visibility state expressed as a boolean
- */
-Dygraph.prototype.setVisibility = function(num, value) {
- var x = this.visibility();
- var numIsObject = false;
-
- if (!Array.isArray(num)) {
- if (num !== null && typeof num === 'object') {
- numIsObject = true;
- } else {
- num = [num];
- }
- }
-
- if (numIsObject) {
- for (var i in num) {
- if (num.hasOwnProperty(i)) {
- if (i < 0 || i >= x.length) {
- console.warn("Invalid series number in setVisibility: " + i);
- } else {
- x[i] = num[i];
- }
- }
- }
- } else {
- for (var i = 0; i < num.length; i++) {
- if (typeof num[i] === 'boolean') {
- if (i >= x.length) {
- console.warn("Invalid series number in setVisibility: " + i);
- } else {
- x[i] = num[i];
- }
- } else {
- if (num[i] < 0 || num[i] >= x.length) {
- console.warn("Invalid series number in setVisibility: " + num[i]);
- } else {
- x[num[i]] = value;
- }
- }
- }
- }
-
- this.predraw_();
-};
-
-/**
- * How large of an area will the dygraph render itself in?
- * This is used for testing.
- * @return A {width: w, height: h} object.
- * @private
- */
-Dygraph.prototype.size = function() {
- return { width: this.width_, height: this.height_ };
-};
-
-/**
- * Update the list of annotations and redraw the chart.
- * See dygraphs.com/annotations.html for more info on how to use annotations.
- * @param ann {Array} An array of annotation objects.
- * @param suppressDraw {Boolean} Set to "true" to block chart redraw (optional).
- */
-Dygraph.prototype.setAnnotations = function(ann, suppressDraw) {
- // Only add the annotation CSS rule once we know it will be used.
- this.annotations_ = ann;
- if (!this.layout_) {
- console.warn("Tried to setAnnotations before dygraph was ready. " +
- "Try setting them in a ready() block. See " +
- "dygraphs.com/tests/annotation.html");
- return;
- }
-
- this.layout_.setAnnotations(this.annotations_);
- if (!suppressDraw) {
- this.predraw_();
- }
-};
-
-/**
- * Return the list of annotations.
- */
-Dygraph.prototype.annotations = function() {
- return this.annotations_;
-};
-
-/**
- * Get the list of label names for this graph. The first column is the
- * x-axis, so the data series names start at index 1.
- *
- * Returns null when labels have not yet been defined.
- */
-Dygraph.prototype.getLabels = function() {
- var labels = this.attr_("labels");
- return labels ? labels.slice() : null;
-};
-
-/**
- * Get the index of a series (column) given its name. The first column is the
- * x-axis, so the data series start with index 1.
- */
-Dygraph.prototype.indexFromSetName = function(name) {
- return this.setIndexByName_[name];
-};
-
-/**
- * Find the row number corresponding to the given x-value.
- * Returns null if there is no such x-value in the data.
- * If there are multiple rows with the same x-value, this will return the
- * first one.
- * @param {number} xVal The x-value to look for (e.g. millis since epoch).
- * @return {?number} The row number, which you can pass to getValue(), or null.
- */
-Dygraph.prototype.getRowForX = function(xVal) {
- var low = 0,
- high = this.numRows() - 1;
-
- while (low <= high) {
- var idx = (high + low) >> 1;
- var x = this.getValue(idx, 0);
- if (x < xVal) {
- low = idx + 1;
- } else if (x > xVal) {
- high = idx - 1;
- } else if (low != idx) { // equal, but there may be an earlier match.
- high = idx;
- } else {
- return idx;
- }
- }
-
- return null;
-};
-
-/**
- * Trigger a callback when the dygraph has drawn itself and is ready to be
- * manipulated. This is primarily useful when dygraphs has to do an XHR for the
- * data (i.e. a URL is passed as the data source) and the chart is drawn
- * asynchronously. If the chart has already drawn, the callback will fire
- * immediately.
- *
- * This is a good place to call setAnnotation().
- *
- * @param {function(!Dygraph)} callback The callback to trigger when the chart
- * is ready.
- */
-Dygraph.prototype.ready = function(callback) {
- if (this.is_initial_draw_) {
- this.readyFns_.push(callback);
- } else {
- callback.call(this, this);
- }
-};
-
-/**
- * Add an event handler. This event handler is kept until the graph is
- * destroyed with a call to graph.destroy().
- *
- * @param {!Node} elem The element to add the event to.
- * @param {string} type The type of the event, e.g. 'click' or 'mousemove'.
- * @param {function(Event):(boolean|undefined)} fn The function to call
- * on the event. The function takes one parameter: the event object.
- * @private
- */
-Dygraph.prototype.addAndTrackEvent = function(elem, type, fn) {
- utils.addEvent(elem, type, fn);
- this.registeredEvents_.push({elem, type, fn});
-};
-
-Dygraph.prototype.removeTrackedEvents_ = function() {
- if (this.registeredEvents_) {
- for (var idx = 0; idx < this.registeredEvents_.length; idx++) {
- var reg = this.registeredEvents_[idx];
- utils.removeEvent(reg.elem, reg.type, reg.fn);
- }
- }
-
- this.registeredEvents_ = [];
-};
-
-
-// Installed plugins, in order of precedence (most-general to most-specific).
-Dygraph.PLUGINS = [
- LegendPlugin,
- AxesPlugin,
- RangeSelectorPlugin, // Has to be before ChartLabels so that its callbacks are called after ChartLabels' callbacks.
- ChartLabelsPlugin,
- AnnotationsPlugin,
- GridPlugin
-];
-
-// There are many symbols which have historically been available through the
-// Dygraph class. These are exported here for backwards compatibility.
-Dygraph.GVizChart = GVizChart;
-Dygraph.DASHED_LINE = utils.DASHED_LINE;
-Dygraph.DOT_DASH_LINE = utils.DOT_DASH_LINE;
-Dygraph.dateAxisLabelFormatter = utils.dateAxisLabelFormatter;
-Dygraph.toRGB_ = utils.toRGB_;
-Dygraph.findPos = utils.findPos;
-Dygraph.pageX = utils.pageX;
-Dygraph.pageY = utils.pageY;
-Dygraph.dateString_ = utils.dateString_;
-Dygraph.defaultInteractionModel = DygraphInteraction.defaultModel;
-Dygraph.nonInteractiveModel = Dygraph.nonInteractiveModel_ = DygraphInteraction.nonInteractiveModel_;
-Dygraph.Circles = utils.Circles;
-
-Dygraph.Plugins = {
- Legend: LegendPlugin,
- Axes: AxesPlugin,
- Annotations: AnnotationsPlugin,
- ChartLabels: ChartLabelsPlugin,
- Grid: GridPlugin,
- RangeSelector: RangeSelectorPlugin
-};
-
-Dygraph.DataHandlers = {
- DefaultHandler,
- BarsHandler,
- CustomBarsHandler,
- DefaultFractionHandler,
- ErrorBarsHandler,
- FractionsBarsHandler
-};
-
-Dygraph.startPan = DygraphInteraction.startPan;
-Dygraph.startZoom = DygraphInteraction.startZoom;
-Dygraph.movePan = DygraphInteraction.movePan;
-Dygraph.moveZoom = DygraphInteraction.moveZoom;
-Dygraph.endPan = DygraphInteraction.endPan;
-Dygraph.endZoom = DygraphInteraction.endZoom;
-
-Dygraph.numericLinearTicks = DygraphTickers.numericLinearTicks;
-Dygraph.numericTicks = DygraphTickers.numericTicks;
-Dygraph.dateTicker = DygraphTickers.dateTicker;
-Dygraph.Granularity = DygraphTickers.Granularity;
-Dygraph.getDateAxis = DygraphTickers.getDateAxis;
-Dygraph.floatFormat = utils.floatFormat;
-
-export default Dygraph;
diff --git a/debian/missing-sources/dygraph-smooth-plotter-c91c859.js b/debian/missing-sources/dygraph-smooth-plotter-c91c859.js
deleted file mode 100644
index 69685ec8..00000000
--- a/debian/missing-sources/dygraph-smooth-plotter-c91c859.js
+++ /dev/null
@@ -1,140 +0,0 @@
-(function() {
-"use strict";
-
-var Dygraph;
-if (window.Dygraph) {
- Dygraph = window.Dygraph;
-} else if (typeof(module) !== 'undefined') {
- Dygraph = require('../dygraph');
-}
-
-/**
- * Given three sequential points, p0, p1 and p2, find the left and right
- * control points for p1.
- *
- * The three points are expected to have x and y properties.
- *
- * The alpha parameter controls the amount of smoothing.
- * If α=0, then both control points will be the same as p1 (i.e. no smoothing).
- *
- * Returns [l1x, l1y, r1x, r1y]
- *
- * It's guaranteed that the line from (l1x, l1y)-(r1x, r1y) passes through p1.
- * Unless allowFalseExtrema is set, then it's also guaranteed that:
- * l1y ∈ [p0.y, p1.y]
- * r1y ∈ [p1.y, p2.y]
- *
- * The basic algorithm is:
- * 1. Put the control points l1 and r1 α of the way down (p0, p1) and (p1, p2).
- * 2. Shift l1 and r2 so that the line l1–r1 passes through p1
- * 3. Adjust to prevent false extrema while keeping p1 on the l1–r1 line.
- *
- * This is loosely based on the HighCharts algorithm.
- */
-function getControlPoints(p0, p1, p2, opt_alpha, opt_allowFalseExtrema) {
- var alpha = (opt_alpha !== undefined) ? opt_alpha : 1/3; // 0=no smoothing, 1=crazy smoothing
- var allowFalseExtrema = opt_allowFalseExtrema || false;
-
- if (!p2) {
- return [p1.x, p1.y, null, null];
- }
-
- // Step 1: Position the control points along each line segment.
- var l1x = (1 - alpha) * p1.x + alpha * p0.x,
- l1y = (1 - alpha) * p1.y + alpha * p0.y,
- r1x = (1 - alpha) * p1.x + alpha * p2.x,
- r1y = (1 - alpha) * p1.y + alpha * p2.y;
-
- // Step 2: shift the points up so that p1 is on the l1–r1 line.
- if (l1x != r1x) {
- // This can be derived w/ some basic algebra.
- var deltaY = p1.y - r1y - (p1.x - r1x) * (l1y - r1y) / (l1x - r1x);
- l1y += deltaY;
- r1y += deltaY;
- }
-
- // Step 3: correct to avoid false extrema.
- if (!allowFalseExtrema) {
- if (l1y > p0.y && l1y > p1.y) {
- l1y = Math.max(p0.y, p1.y);
- r1y = 2 * p1.y - l1y;
- } else if (l1y < p0.y && l1y < p1.y) {
- l1y = Math.min(p0.y, p1.y);
- r1y = 2 * p1.y - l1y;
- }
-
- if (r1y > p1.y && r1y > p2.y) {
- r1y = Math.max(p1.y, p2.y);
- l1y = 2 * p1.y - r1y;
- } else if (r1y < p1.y && r1y < p2.y) {
- r1y = Math.min(p1.y, p2.y);
- l1y = 2 * p1.y - r1y;
- }
- }
-
- return [l1x, l1y, r1x, r1y];
-}
-
-// i.e. is none of (null, undefined, NaN)
-function isOK(x) {
- return !!x && !isNaN(x);
-};
-
-// A plotter which uses splines to create a smooth curve.
-// See tests/plotters.html for a demo.
-// Can be controlled via smoothPlotter.smoothing
-function smoothPlotter(e) {
- var ctx = e.drawingContext,
- points = e.points;
-
- ctx.beginPath();
- ctx.moveTo(points[0].canvasx, points[0].canvasy);
-
- // right control point for previous point
- var lastRightX = points[0].canvasx, lastRightY = points[0].canvasy;
-
- for (var i = 1; i < points.length; i++) {
- var p0 = points[i - 1],
- p1 = points[i],
- p2 = points[i + 1];
- p0 = p0 && isOK(p0.canvasy) ? p0 : null;
- p1 = p1 && isOK(p1.canvasy) ? p1 : null;
- p2 = p2 && isOK(p2.canvasy) ? p2 : null;
- if (p0 && p1) {
- var controls = getControlPoints({x: p0.canvasx, y: p0.canvasy},
- {x: p1.canvasx, y: p1.canvasy},
- p2 && {x: p2.canvasx, y: p2.canvasy},
- smoothPlotter.smoothing);
- // Uncomment to show the control points:
- // ctx.lineTo(lastRightX, lastRightY);
- // ctx.lineTo(controls[0], controls[1]);
- // ctx.lineTo(p1.canvasx, p1.canvasy);
- lastRightX = (lastRightX !== null) ? lastRightX : p0.canvasx;
- lastRightY = (lastRightY !== null) ? lastRightY : p0.canvasy;
- ctx.bezierCurveTo(lastRightX, lastRightY,
- controls[0], controls[1],
- p1.canvasx, p1.canvasy);
- lastRightX = controls[2];
- lastRightY = controls[3];
- } else if (p1) {
- // We're starting again after a missing point.
- ctx.moveTo(p1.canvasx, p1.canvasy);
- lastRightX = p1.canvasx;
- lastRightY = p1.canvasy;
- } else {
- lastRightX = lastRightY = null;
- }
- }
-
- ctx.stroke();
-}
-smoothPlotter.smoothing = 1/3;
-smoothPlotter._getControlPoints = getControlPoints; // for testing
-
-// older versions exported a global.
-// This will be removed in the future.
-// The preferred way to access smoothPlotter is via Dygraph.smoothPlotter.
-window.smoothPlotter = smoothPlotter;
-Dygraph.smoothPlotter = smoothPlotter;
-
-})();
diff --git a/debian/missing-sources/fontawesome-all-5.0.1.js b/debian/missing-sources/fontawesome-all-5.0.1.js
deleted file mode 100644
index 5598fb82..00000000
--- a/debian/missing-sources/fontawesome-all-5.0.1.js
+++ /dev/null
@@ -1,3040 +0,0 @@
-/*!
- * Font Awesome Free 5.0.2 by @fontawesome - http://fontawesome.com
- * License - http://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
- */
-(function () {
-'use strict';
-
-var _WINDOW = {};
-try {
- if (typeof window !== 'undefined') _WINDOW = window;
-
-} catch (e) {}
-
-var _ref = _WINDOW.navigator || {};
-var _ref$userAgent = _ref.userAgent;
-var userAgent = _ref$userAgent === undefined ? '' : _ref$userAgent;
-
-var WINDOW = _WINDOW;
-
-
-
-
-var IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');
-
-var NAMESPACE_IDENTIFIER = '___FONT_AWESOME___';
-
-
-
-
-
-
-
-var PRODUCTION = function () {
- try {
- return "production" === 'production';
- } catch (e) {
- return false;
- }
-}();
-
-var oneToTen = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
-var oneToTwenty = oneToTen.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);
-
-
-
-var RESERVED_CLASSES = ['xs', 'sm', 'lg', 'fw', 'ul', 'li', 'border', 'pull-left', 'pull-right', 'spin', 'pulse', 'rotate-90', 'rotate-180', 'rotate-270', 'flip-horizontal', 'flip-vertical', 'stack', 'stack-1x', 'stack-2x', 'inverse', 'layers', 'layers-text', 'layers-counter'].concat(oneToTen.map(function (n) {
- return n + 'x';
-})).concat(oneToTwenty.map(function (n) {
- return 'w-' + n;
-}));
-
-function bunker(fn) {
- try {
- fn();
- } catch (e) {
- if (!PRODUCTION) {
- throw e;
- }
- }
-}
-
-var w = WINDOW || {};
-
-if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};
-if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};
-if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};
-if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];
-
-var namespace = w[NAMESPACE_IDENTIFIER];
-
-var _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
-
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
-
- return target;
-};
-
-function define(prefix, icons) {
- var normalized = Object.keys(icons).reduce(function (acc, iconName) {
- var icon = icons[iconName];
- var expanded = !!icon.icon;
-
- if (expanded) {
- acc[icon.iconName] = icon.icon;
- } else {
- acc[iconName] = icon;
- }
- return acc;
- }, {});
-
- if (typeof namespace.hooks.addPack === 'function') {
- namespace.hooks.addPack(prefix, normalized);
- } else {
- namespace.styles[prefix] = _extends({}, namespace.styles[prefix] || {}, normalized);
- }
-
- /**
- * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
- * of new styles we needed to differentiate between them. Prefix `fa` is now an alias
- * for `fas` so we'll easy the upgrade process for our users by automatically defining
- * this as well.
- */
- if (prefix === 'fas') {
- define('fa', icons);
- }
-}
-
-var icons = {
- "500px": [448, 512, [], "f26e", "M103.3 344.3c-6.5-14.2-6.9-18.3 7.4-23.1 25.6-8 8 9.2 43.2 49.2h.3v-93.9c1.2-50.2 44-92.2 97.7-92.2 53.9 0 97.7 43.5 97.7 96.8 0 63.4-60.8 113.2-128.5 93.3-10.5-4.2-2.1-31.7 8.5-28.6 53 0 89.4-10.1 89.4-64.4 0-61-77.1-89.6-116.9-44.6-23.5 26.4-17.6 42.1-17.6 157.6 50.7 31 118.3 22 160.4-20.1 24.8-24.8 38.5-58 38.5-93 0-35.2-13.8-68.2-38.8-93.3-24.8-24.8-57.8-38.5-93.3-38.5s-68.8 13.8-93.5 38.5c-.3.3-16 16.5-21.2 23.9l-.5.6c-3.3 4.7-6.3 9.1-20.1 6.1-6.9-1.7-14.3-5.8-14.3-11.8V20c0-5 3.9-10.5 10.5-10.5h241.3c8.3 0 8.3 11.6 8.3 15.1 0 3.9 0 15.1-8.3 15.1H130.3v132.9h.3c104.2-109.8 282.8-36 282.8 108.9 0 178.1-244.8 220.3-310.1 62.8zm63.3-260.8c-.5 4.2 4.6 24.5 14.6 20.6C306 56.6 384 144.5 390.6 144.5c4.8 0 22.8-15.3 14.3-22.8-93.2-89-234.5-57-238.3-38.2zM393 414.7C283 524.6 94 475.5 61 310.5c0-12.2-30.4-7.4-28.9 3.3 24 173.4 246 256.9 381.6 121.3 6.9-7.8-12.6-28.4-20.7-20.4zM213.6 306.6c0 4 4.3 7.3 5.5 8.5 3 3 6.1 4.4 8.5 4.4 3.8 0 2.6.2 22.3-19.5 19.6 19.3 19.1 19.5 22.3 19.5 5.4 0 18.5-10.4 10.7-18.2L265.6 284l18.2-18.2c6.3-6.8-10.1-21.8-16.2-15.7L249.7 268c-18.6-18.8-18.4-19.5-21.5-19.5-5 0-18 11.7-12.4 17.3L234 284c-18.1 17.9-20.4 19.2-20.4 22.6z"],
- "accessible-icon": [448, 512, [], "f368", "M423.9 255.8L411 413.1c-3.3 40.7-63.9 35.1-60.6-4.9l10-122.5-41.1 2.3c10.1 20.7 15.8 43.9 15.8 68.5 0 41.2-16.1 78.7-42.3 106.5l-39.3-39.3c57.9-63.7 13.1-167.2-74-167.2-25.9 0-49.5 9.9-67.2 26L73 243.2c22-20.7 50.1-35.1 81.4-40.2l75.3-85.7-42.6-24.8-51.6 46c-30 26.8-70.6-18.5-40.5-45.4l68-60.7c9.8-8.8 24.1-10.2 35.5-3.6 0 0 139.3 80.9 139.5 81.1 16.2 10.1 20.7 36 6.1 52.6L285.7 229l106.1-5.9c18.5-1.1 33.6 14.4 32.1 32.7zm-64.9-154c28.1 0 50.9-22.8 50.9-50.9C409.9 22.8 387.1 0 359 0c-28.1 0-50.9 22.8-50.9 50.9 0 28.1 22.8 50.9 50.9 50.9zM179.6 456.5c-80.6 0-127.4-90.6-82.7-156.1l-39.7-39.7C36.4 287 24 320.3 24 356.4c0 130.7 150.7 201.4 251.4 122.5l-39.7-39.7c-16 10.9-35.3 17.3-56.1 17.3z"],
- "accusoft": [640, 512, [], "f369", "M482.2 372.1C476.5 365.2 250 75 242.3 65.5c-13.7-17.2 0-16.8 19.2-16.9 9.7-.1 106.3-.6 116.5-.6 24.1-.1 28.7.6 38.4 12.8 2.1 2.7 205.1 245.8 207.2 248.3 5.5 6.7 15.2 19.1 7.2 23.4-2.4 1.3-114.6 47.7-117.8 48.9-10.1 4-17.5 6.8-30.8-9.3m114.7-5.6s-115 50.4-117.5 51.6c-16 7.3-26.9-3.2-36.7-14.6l-57.1-74c-5.4-.9-60.4-9.6-65.3-9.3-3.1.2-9.6.8-14.4 2.9-4.9 2.1-145.2 52.8-150.2 54.7-5.1 2-11.4 3.6-11.1 7.6.2 2.5 2 2.6 4.6 3.5 2.7.8 300.9 67.6 308 69.1 15.6 3.3 38.5 10.5 53.6 1.7 2.1-1.2 123.8-76.4 125.8-77.8 5.4-4 4.3-6.8-1.7-8.2-2.3-.3-24.6-4.7-38-7.2m-326-181.3s-12 1.6-25 15.1c-9 9.3-242.1 239.1-243.4 240.9-7 10 1.6 6.8 15.7 1.7.8 0 114.5-36.6 114.5-36.6.5-.6-.1-.1.6-.6-.4-5.1-.8-26.2-1-27.7-.6-5.2 2.2-6.9 7-8.9l92.6-33.8c.6-.8 88.5-81.7 90.2-83.3v-1l-51.2-65.8"],
- "adn": [496, 512, [], "f170", "M248 167.5l64.9 98.8H183.1l64.9-98.8zM496 256c0 136.9-111.1 248-248 248S0 392.9 0 256 111.1 8 248 8s248 111.1 248 248zm-99.8 82.7L248 115.5 99.8 338.7h30.4l33.6-51.7h168.6l33.6 51.7h30.2z"],
- "adversal": [512, 512, [], "f36a", "M482.1 32H28.7C5.8 32 0 37.9 0 60.9v390.2C0 474.4 5.8 480 28.7 480h453.4c24.4 0 29.9-5.2 29.9-29.7V62.2c0-24.6-5.4-30.2-29.9-30.2zM178.4 220.3c-27.5-20.2-72.1-8.7-84.2 23.4-4.3 11.1-9.3 9.5-17.5 8.3-9.7-1.5-17.2-3.2-22.5-5.5-28.8-11.4 8.6-55.3 24.9-64.3 41.1-21.4 83.4-22.2 125.3-4.8 40.9 16.8 34.5 59.2 34.5 128.5 2.7 25.8-4.3 58.3 9.3 88.8 1.9 4.4.4 7.9-2.7 10.7-8.4 6.7-39.3 2.2-46.6-7.4-1.9-2.2-1.8-3.6-3.9-6.2-3.6-3.9-7.3-2.2-11.9 1-57.4 36.4-140.3 21.4-147-43.3-3.1-29.3 12.4-57.1 39.6-71 38.2-19.5 112.2-11.8 114-30.9 1.1-10.2-1.9-20.1-11.3-27.3zm286.7 222c0 15.1-11.1 9.9-17.8 9.9H52.4c-7.4 0-18.2 4.8-17.8-10.7.4-13.9 10.5-9.1 17.1-9.1 132.3-.4 264.5-.4 396.8 0 6.8 0 16.6-4.4 16.6 9.9zm3.8-340.5v291c0 5.7-.7 13.9-8.1 13.9-12.4-.4-27.5 7.1-36.1-5.6-5.8-8.7-7.8-4-12.4-1.2-53.4 29.7-128.1 7.1-144.4-85.2-6.1-33.4-.7-67.1 15.7-100 11.8-23.9 56.9-76.1 136.1-30.5v-71c0-26.2-.1-26.2 26-26.2 3.1 0 6.6.4 9.7 0 10.1-.8 13.6 4.4 13.6 14.3-.1.2-.1.3-.1.5zm-51.5 232.3c-19.5 47.6-72.9 43.3-90 5.2-15.1-33.3-15.5-68.2.4-101.5 16.3-34.1 59.7-35.7 81.5-4.8 20.6 28.8 14.9 84.6 8.1 101.1zm-294.8 35.3c-7.5-1.3-33-3.3-33.7-27.8-.4-13.9 7.8-23 19.8-25.8 24.4-5.9 49.3-9.9 73.7-14.7 8.9-2 7.4 4.4 7.8 9.5 1.4 33-26.1 59.2-67.6 58.8z"],
- "affiliatetheme": [512, 512, [], "f36b", "M159.7 237.4C108.4 308.3 43.1 348.2 14 326.6-15.2 304.9 2.8 230 54.2 159.1c51.3-70.9 116.6-110.8 145.7-89.2 29.1 21.6 11.1 96.6-40.2 167.5zm351.2-57.3C437.1 303.5 319 367.8 246.4 323.7c-25-15.2-41.3-41.2-49-73.8-33.6 64.8-92.8 113.8-164.1 133.2 49.8 59.3 124.1 96.9 207 96.9 150 0 271.6-123.1 271.6-274.9.1-8.5-.3-16.8-1-25z"],
- "algolia": [448, 512, [], "f36c", "M229.3 182.6c-49.3 0-89.2 39.9-89.2 89.2 0 49.3 39.9 89.2 89.2 89.2s89.2-39.9 89.2-89.2c0-49.3-40-89.2-89.2-89.2zm62.7 56.6l-58.9 30.6c-1.8.9-3.8-.4-3.8-2.3V201c0-1.5 1.3-2.7 2.7-2.6 26.2 1 48.9 15.7 61.1 37.1.7 1.3.2 3-1.1 3.7zM389.1 32H58.9C26.4 32 0 58.4 0 90.9V421c0 32.6 26.4 59 58.9 59H389c32.6 0 58.9-26.4 58.9-58.9V90.9C448 58.4 421.6 32 389.1 32zm-202.6 84.7c0-10.8 8.7-19.5 19.5-19.5h45.3c10.8 0 19.5 8.7 19.5 19.5v15.4c0 1.8-1.7 3-3.3 2.5-12.3-3.4-25.1-5.1-38.1-5.1-13.5 0-26.7 1.8-39.4 5.5-1.7.5-3.4-.8-3.4-2.5v-15.8zm-84.4 37l9.2-9.2c7.6-7.6 19.9-7.6 27.5 0l7.7 7.7c1.1 1.1 1 3-.3 4-6.2 4.5-12.1 9.4-17.6 14.9-5.4 5.4-10.4 11.3-14.8 17.4-1 1.3-2.9 1.5-4 .3l-7.7-7.7c-7.6-7.5-7.6-19.8 0-27.4zm127.2 244.8c-70 0-126.6-56.7-126.6-126.6s56.7-126.6 126.6-126.6c70 0 126.6 56.6 126.6 126.6 0 69.8-56.7 126.6-126.6 126.6z"],
- "amazon": [448, 512, [], "f270", "M257.2 162.7c-48.7 1.8-169.5 15.5-169.5 117.5 0 109.5 138.3 114 183.5 43.2 6.5 10.2 35.4 37.5 45.3 46.8l56.8-56S341 288.9 341 261.4V114.3C341 89 316.5 32 228.7 32 140.7 32 94 87 94 136.3l73.5 6.8c16.3-49.5 54.2-49.5 54.2-49.5 40.7-.1 35.5 29.8 35.5 69.1zm0 86.8c0 80-84.2 68-84.2 17.2 0-47.2 50.5-56.7 84.2-57.8v40.6zm136 163.5c-7.7 10-70 67-174.5 67S34.2 408.5 9.7 379c-6.8-7.7 1-11.3 5.5-8.3C88.5 415.2 203 488.5 387.7 401c7.5-3.7 13.3 2 5.5 12zm39.8 2.2c-6.5 15.8-16 26.8-21.2 31-5.5 4.5-9.5 2.7-6.5-3.8s19.3-46.5 12.7-55c-6.5-8.3-37-4.3-48-3.2-10.8 1-13 2-14-.3-2.3-5.7 21.7-15.5 37.5-17.5 15.7-1.8 41-.8 46 5.7 3.7 5.1 0 27.1-6.5 43.1z"],
- "amazon-pay": [611, 512, [], "f42c", "M0 325.2c2.3-4.2 5.2-4.9 9.7-2.5 10.4 5.6 20.6 11.4 31.2 16.7 40.7 20.4 83.2 35.6 127.4 46.3 20.9 5 41.9 9 63.2 11.8 31.5 4.2 63.2 6 95 5.2 17.4-.4 34.8-1.8 52.1-3.8 56.4-6.7 110.9-20.8 163.3-42.8 2.9-1.2 5.9-2 9.1-1.2 6.7 1.8 9 9 4.1 13.9-2.8 2.8-6.3 5.1-9.6 7.4-30.7 21.1-64.2 36.4-99.6 47.9-24.6 7.9-49.6 13.8-75.1 17.6-17.6 2.6-35.4 4.4-53.2 4.8-.8 0-1.7.2-2.5.3H294c-.8-.1-1.7-.3-2.5-.3-3.6-.2-7.2-.3-10.7-.4-16.9-.7-33.7-2.6-50.4-5.3-27.4-4.5-54.2-11.4-80.4-20.9-54.1-19.6-102.6-48.6-145.6-87-1.8-1.6-3-3.8-4.4-5.7v-2zM158 65c-1.4.2-2.9.4-4.3.6-14 1.7-26.6 6.9-38 15.1-2.4 1.7-4.6 3.5-7.1 5.4-.2-.5-.4-1-.4-1.4-.4-2.7-.8-5.5-1.3-8.2-.7-4.6-3-6.6-7.6-6.6H87.8c-6.9 0-8.2 1.3-8.2 8.2v209.3c0 1 0 2 .1 3 .2 3 2 4.9 4.9 5 7 .1 14.1.1 21.1 0 2.9 0 4.7-2 5-5 .1-1 .1-2 .1-3V215c1.1.9 1.7 1.4 2.2 1.9 17.9 14.9 38.5 19.8 61 15.4 20.4-4 34.6-16.5 43.8-34.9 7-13.9 9.9-28.7 10.3-44.1.5-17.1-1.2-33.9-8.1-49.8-8.5-19.6-22.6-32.5-43.9-36.9-3.2-.7-6.5-1-9.8-1.5-2.8-.1-5.5-.1-8.3-.1zm-47.4 41.9c0-1.5.4-2.4 1.7-3.3 13.7-9.5 28.8-14.5 45.6-13.2 14.9 1.1 27.1 8.4 33.5 25.9 3.9 10.7 4.9 21.8 4.9 33 0 10.4-.8 20.6-4 30.6-6.8 21.3-22.4 29.4-42.6 28.5-14-.6-26.2-6-37.4-13.9-1.2-.9-1.7-1.7-1.7-3.3.1-14.1 0-28.1 0-42.2 0-14 .1-28 0-42.1zM316.3 65c-1 .1-2 .3-2.9.4-9.8.5-19.4 1.7-28.9 4.1-6.1 1.6-12 3.8-17.9 5.8-3.6 1.2-5.4 3.8-5.3 7.7.1 3.3-.1 6.6 0 9.9.1 4.8 2.1 6.1 6.8 4.9 7.8-2 15.6-4.2 23.5-5.7 12.3-2.3 24.7-3.3 37.2-1.4 6.5 1 12.6 2.9 16.8 8.4 3.7 4.8 5.1 10.5 5.3 16.4.3 8.3.2 16.6.3 24.9 0 .4-.1.9-.2 1.4-.5-.1-.9 0-1.3-.1-10.5-2.5-21.1-4.3-32-4.9-11.3-.6-22.5.1-33.3 3.9-12.9 4.5-23.3 12.3-29.4 24.9-4.7 9.8-5.4 20.2-3.9 30.7 2 14 9 24.8 21.4 31.7 11.9 6.6 24.8 7.4 37.9 5.4 15.1-2.3 28.5-8.7 40.3-18.4.4-.4.9-.7 1.6-1.1.6 3.8 1.1 7.4 1.8 11 .6 3.1 2.5 5.1 5.4 5.2 5.4.1 10.9.1 16.3 0 2.7-.1 4.5-1.9 4.8-4.7.1-.9.1-1.9.1-2.8v-106c0-4.3-.2-8.6-.9-12.9-1.9-12.9-7.4-23.5-19-30.4-6.7-4-14.1-6-21.8-7.1-3.6-.5-7.2-.8-10.8-1.3-3.9.1-7.9.1-11.9.1zm35 127.7c0 1.3-.4 2.2-1.5 3-11.2 8.1-23.5 13.5-37.4 14.9-5.7.6-11.4.4-16.8-1.8-6.3-2.5-10.4-6.9-12.4-13.3s-2-13-.1-19.4c2.5-8.3 8.4-13 16.4-15.6 8.1-2.6 16.5-3 24.8-2.2 8.4.7 16.6 2.3 25 3.4 1.6.2 2.1 1 2.1 2.6-.1 4.8 0 9.5 0 14.3-.1 4.7-.2 9.4-.1 14.1zm259.9 129.4c-1-5-4.8-6.9-9.1-8.3-6.8-2.3-13.9-3.3-21-3.9-13.1-1.1-26.2-.5-39.2 1.9-14.3 2.7-27.9 7.3-40 15.6-1.4 1-2.8 2.1-3.7 3.5-.7 1.1-.9 2.8-.5 4 .4 1.5 2.1 1.9 3.6 1.8.7 0 1.5 0 2.2-.1 7.8-.8 15.5-1.7 23.3-2.5 11.4-1.1 22.9-1.8 34.3-.9 4.8.3 9.7 1.4 14.4 2.7 5.1 1.4 7.4 5.2 7.6 10.4.4 8-1.4 15.7-3.5 23.3-4.1 15.4-10 30.3-15.8 45.1-.4 1-.8 2-1 3-.5 2.9 1.2 4.8 4.1 4.1 1.7-.4 3.6-1.3 4.8-2.5 4.4-4.3 8.9-8.6 12.7-13.4 12.8-16.4 20.3-35.3 24.7-55.6.8-3.6 1.4-7.3 2.1-10.9v-17.3zM479.1 198.9c-12.9-35.7-25.8-71.5-38.7-107.2-2-5.7-4.2-11.3-6.3-16.9-1.1-2.9-3.2-4.8-6.4-4.8-7.6-.1-15.2-.2-22.9-.1-2.5 0-3.7 2-3.2 4.5.5 2.1 1.1 4.1 1.9 6.1 19.6 48.5 39.3 97.1 59.1 145.5 1.7 4.1 2.1 7.6.2 11.8-3.3 7.3-5.9 15-9.3 22.3-3 6.5-8 11.4-15.2 13.3-5.1 1.4-10.2 1.6-15.4 1.1-2.5-.2-5-.8-7.5-1-3.4-.2-5.1 1.3-5.2 4.8-.1 3.3-.1 6.6 0 9.9.1 5.5 2 8 7.4 8.9 5.6 1 11.3 1.9 16.9 2 17.1.4 30.7-6.5 39.5-21.4 3.5-5.9 6.7-12.1 9.2-18.4 23.7-59.8 47.1-119.7 70.6-179.6.7-1.8 1.3-3.6 1.6-5.5.4-2.8-.9-4.4-3.7-4.4-6.6-.1-13.3 0-19.9 0-3.7 0-6.3 1.6-7.7 5.2-.5 1.4-1.1 2.7-1.6 4.1-11.6 33.3-23.2 66.6-34.8 100-2.5 7.2-5.1 14.5-7.7 22.2-.4-1.1-.6-1.7-.9-2.4z"],
- "amilia": [448, 512, [], "f36d", "M240.1 32c-61.9 0-131.5 16.9-184.2 55.4-5.1 3.1-9.1 9.2-7.2 19.4 1.1 5.1 5.1 27.4 10.2 39.6 4.1 10.2 14.2 10.2 20.3 6.1 32.5-22.3 96.5-47.7 152.3-47.7 57.9 0 58.9 28.4 58.9 73.1v38.5C203 227.7 78.2 251 46.7 264.2 11.2 280.5 16.3 357.7 16.3 376s15.2 104 124.9 104c47.8 0 113.7-20.7 153.3-42.1v25.4c0 3 2.1 8.2 6.1 9.1 3.1 1 50.7 2 59.9 2s62.5.3 66.5-.7c4.1-1 5.1-6.1 5.1-9.1V168c-.1-80.3-57.9-136-192-136zm-87.9 327.7c0-12.2-3-42.7 18.3-52.9 24.3-13.2 75.1-29.4 119.8-33.5V380c-21.4 13.2-48.7 24.4-79.1 24.4-52.8 0-58.9-33.5-59-44.7"],
- "android": [448, 512, [], "f17b", "M89.6 204.5v115.8c0 15.4-12.1 27.7-27.5 27.7-15.3 0-30.1-12.4-30.1-27.7V204.5c0-15.1 14.8-27.5 30.1-27.5 15.1 0 27.5 12.4 27.5 27.5zm10.8 157c0 16.4 13.2 29.6 29.6 29.6h19.9l.3 61.1c0 36.9 55.2 36.6 55.2 0v-61.1h37.2v61.1c0 36.7 55.5 36.8 55.5 0v-61.1h20.2c16.2 0 29.4-13.2 29.4-29.6V182.1H100.4v179.4zm248-189.1H99.3c0-42.8 25.6-80 63.6-99.4l-19.1-35.3c-2.8-4.9 4.3-8 6.7-3.8l19.4 35.6c34.9-15.5 75-14.7 108.3 0L297.5 34c2.5-4.3 9.5-1.1 6.7 3.8L285.1 73c37.7 19.4 63.3 56.6 63.3 99.4zm-170.7-55.5c0-5.7-4.6-10.5-10.5-10.5-5.7 0-10.2 4.8-10.2 10.5s4.6 10.5 10.2 10.5c5.9 0 10.5-4.8 10.5-10.5zm113.4 0c0-5.7-4.6-10.5-10.2-10.5-5.9 0-10.5 4.8-10.5 10.5s4.6 10.5 10.5 10.5c5.6 0 10.2-4.8 10.2-10.5zm94.8 60.1c-15.1 0-27.5 12.1-27.5 27.5v115.8c0 15.4 12.4 27.7 27.5 27.7 15.4 0 30.1-12.4 30.1-27.7V204.5c0-15.4-14.8-27.5-30.1-27.5z"],
- "angellist": [448, 512, [], "f209", "M347.1 215.4c11.7-32.6 45.4-126.9 45.4-157.1 0-26.6-15.7-48.9-43.7-48.9-44.6 0-84.6 131.7-97.1 163.1C242 144 196.6 0 156.6 0c-31.1 0-45.7 22.9-45.7 51.7 0 35.3 34.2 126.8 46.6 162-6.3-2.3-13.1-4.3-20-4.3-23.4 0-48.3 29.1-48.3 52.6 0 8.9 4.9 21.4 8 29.7-36.9 10-51.1 34.6-51.1 71.7C46 435.6 114.4 512 210.6 512c118 0 191.4-88.6 191.4-202.9 0-43.1-6.9-82-54.9-93.7zM311.7 108c4-12.3 21.1-64.3 37.1-64.3 8.6 0 10.9 8.9 10.9 16 0 19.1-38.6 124.6-47.1 148l-34-6 33.1-93.7zM142.3 48.3c0-11.9 14.5-45.7 46.3 47.1l34.6 100.3c-15.6-1.3-27.7-3-35.4 1.4-10.9-28.8-45.5-119.7-45.5-148.8zM140 244c29.3 0 67.1 94.6 67.1 107.4 0 5.1-4.9 11.4-10.6 11.4-20.9 0-76.9-76.9-76.9-97.7.1-7.7 12.7-21.1 20.4-21.1zm184.3 186.3c-29.1 32-66.3 48.6-109.7 48.6-59.4 0-106.3-32.6-128.9-88.3-17.1-43.4 3.8-68.3 20.6-68.3 11.4 0 54.3 60.3 54.3 73.1 0 4.9-7.7 8.3-11.7 8.3-16.1 0-22.4-15.5-51.1-51.4-29.7 29.7 20.5 86.9 58.3 86.9 26.1 0 43.1-24.2 38-42 3.7 0 8.3.3 11.7-.6 1.1 27.1 9.1 59.4 41.7 61.7 0-.9 2-7.1 2-7.4 0-17.4-10.6-32.6-10.6-50.3 0-28.3 21.7-55.7 43.7-71.7 8-6 17.7-9.7 27.1-13.1 9.7-3.7 20-8 27.4-15.4-1.1-11.2-5.7-21.1-16.9-21.1-27.7 0-120.6 4-120.6-39.7 0-6.7.1-13.1 17.4-13.1 32.3 0 114.3 8 138.3 29.1 18.1 16.1 24.3 113.2-31 174.7zm-98.6-126c9.7 3.1 19.7 4 29.7 6-7.4 5.4-14 12-20.3 19.1-2.8-8.5-6.2-16.8-9.4-25.1z"],
- "angrycreative": [640, 512, [], "f36e", "M640 238.2l-3.2 28.2-34.5 2.3-2 18.1 34.5-2.3-3.2 28.2-34.4 2.2-2.3 20.1 34.4-2.2-3 26.1-64.7 4.1 12.7-113.2L527 365.2l-31.9 2-23.8-117.8 30.3-2 13.6 79.4 31.7-82.4 93.1-6.2zM426.8 371.5l28.3-1.8L468 249.6l-28.4 1.9-12.8 120zM162 388.1l-19.4-36-3.5 37.4-28.2 1.7 2.7-29.1c-11 18-32 34.3-56.9 35.8C23.9 399.9-3 377 .3 339.7c2.6-29.3 26.7-62.8 67.5-65.4 37.7-2.4 47.6 23.2 51.3 28.8l2.8-30.8 38.9-2.5c20.1-1.3 38.7 3.7 42.5 23.7l2.6-26.6 64.8-4.2-2.7 27.9-36.4 2.4-1.7 17.9 36.4-2.3-2.7 27.9-36.4 2.3-1.9 19.9 36.3-2.3-2.1 20.8 55-117.2 23.8-1.6L370.4 369l8.9-85.6-22.3 1.4 2.9-27.9 75-4.9-3 28-24.3 1.6-9.7 91.9-58 3.7-4.3-15.6-39.4 2.5-8 16.3-126.2 7.7zm-44.3-70.2l-26.4 1.7C84.6 307.2 76.9 303 65 303.8c-19 1.2-33.3 17.5-34.6 33.3-1.4 16 7.3 32.5 28.7 31.2 12.8-.8 21.3-8.6 28.9-18.9l27-1.7 2.7-29.8zm56.1-7.7c1.2-12.9-7.6-13.6-26.1-12.4l-2.7 28.5c14.2-.9 27.5-2.1 28.8-16.1zm21.1 70.8l5.8-60c-5 13.5-14.7 21.1-27.9 26.6l22.1 33.4zm135.4-45l-7.9-37.8-15.8 39.3 23.7-1.5zm-170.1-74.6l-4.3-17.5-39.6 2.6-8.1 18.2-31.9 2.1 57-121.9 23.9-1.6 30.7 102 9.9-104.7 27-1.8 37.8 63.6 6.5-66.6 28.5-1.9-4 41.2c7.4-13.5 22.9-44.7 63.6-47.5 40.5-2.8 52.4 29.3 53.4 30.3l3.3-32 39.3-2.7c12.7-.9 27.8.3 36.3 9.7l-4.4-11.9 32.2-2.2 12.9 43.2 23-45.7 31-2.2-43.6 78.4-4.8 44.3-28.4 1.9 4.8-44.3-15.8-43c1 22.3-9.2 40.1-32 49.6l25.2 38.8-36.4 2.4-19.2-36.8-4 38.3-28.4 1.9 3.3-31.5c-6.7 9.3-19.7 35.4-59.6 38-26.2 1.7-45.6-10.3-55.4-39.2l-4 40.3-25 1.6-37.6-63.3-6.3 66.2-56.8 3.7zm276.6-82.1c10.2-.7 17.5-2.1 21.6-4.3 4.5-2.4 7-6.4 7.6-12.1.6-5.3-.6-8.8-3.4-10.4-3.6-2.1-10.6-2.8-22.9-2l-2.9 28.8zM327.7 214c5.6 5.9 12.7 8.5 21.3 7.9 4.7-.3 9.1-1.8 13.3-4.1 5.5-3 10.6-8 15.1-14.3l-34.2 2.3 2.4-23.9 63.1-4.3 1.2-12-31.2 2.1c-4.1-3.7-7.8-6.6-11.1-8.1-4-1.7-8.1-2.8-12.2-2.5-8 .5-15.3 3.6-22 9.2-7.7 6.4-12 14.5-12.9 24.4-1.1 9.6 1.4 17.3 7.2 23.3zm-201.3 8.2l23.8-1.6-8.3-37.6-15.5 39.2z"],
- "angular": [415, 512, [], "f420", "M169.7 268.1h76.2l-38.1-91.6-38.1 91.6zM207.8 32L0 106.4l31.8 275.7 176 97.9 176-97.9 31.8-275.7L207.8 32zM338 373.8h-48.6l-26.2-65.4H152.6l-26.2 65.4H77.7L207.8 81.5 338 373.8z"],
- "app-store": [512, 512, [], "f36f", "M255.9 120.9l9.1-15.7c5.6-9.8 18.1-13.1 27.9-7.5 9.8 5.6 13.1 18.1 7.5 27.9l-87.5 151.5h63.3c20.5 0 32 24.1 23.1 40.8H113.8c-11.3 0-20.4-9.1-20.4-20.4 0-11.3 9.1-20.4 20.4-20.4h52l66.6-115.4-20.8-36.1c-5.6-9.8-2.3-22.2 7.5-27.9 9.8-5.6 22.2-2.3 27.9 7.5l8.9 15.7zm-78.7 218l-19.6 34c-5.6 9.8-18.1 13.1-27.9 7.5-9.8-5.6-13.1-18.1-7.5-27.9l14.6-25.2c16.4-5.1 29.8-1.2 40.4 11.6zm168.9-61.7h53.1c11.3 0 20.4 9.1 20.4 20.4 0 11.3-9.1 20.4-20.4 20.4h-29.5l19.9 34.5c5.6 9.8 2.3 22.2-7.5 27.9-9.8 5.6-22.2 2.3-27.9-7.5-33.5-58.1-58.7-101.6-75.4-130.6-17.1-29.5-4.9-59.1 7.2-69.1 13.4 23 33.4 57.7 60.1 104zM256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm216 248c0 118.7-96.1 216-216 216-118.7 0-216-96.1-216-216 0-118.7 96.1-216 216-216 118.7 0 216 96.1 216 216z"],
- "app-store-ios": [448, 512, [], "f370", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM127 384.5c-5.5 9.6-17.8 12.8-27.3 7.3-9.6-5.5-12.8-17.8-7.3-27.3l14.3-24.7c16.1-4.9 29.3-1.1 39.6 11.4L127 384.5zm138.9-53.9H84c-11 0-20-9-20-20s9-20 20-20h51l65.4-113.2-20.5-35.4c-5.5-9.6-2.2-21.8 7.3-27.3 9.6-5.5 21.8-2.2 27.3 7.3l8.9 15.4 8.9-15.4c5.5-9.6 17.8-12.8 27.3-7.3 9.6 5.5 12.8 17.8 7.3 27.3l-85.8 148.6h62.1c20.2 0 31.5 23.7 22.7 40zm98.1 0h-29l19.6 33.9c5.5 9.6 2.2 21.8-7.3 27.3-9.6 5.5-21.8 2.2-27.3-7.3-32.9-56.9-57.5-99.7-74-128.1-16.7-29-4.8-58 7.1-67.8 13.1 22.7 32.7 56.7 58.9 102h52c11 0 20 9 20 20 0 11.1-9 20-20 20z"],
- "apper": [640, 512, [], "f371", "M42.1 239.1c22.2 0 29 2.8 33.5 14.6h.8v-22.9c0-11.3-4.8-15.4-17.9-15.4-11.3 0-14.4 2.5-15.1 12.8H4.8c.3-13.9 1.5-19.1 5.8-24.4C17.9 195 29.5 192 56.7 192c33 0 47.1 5 53.9 18.9 2 4.3 4 15.6 4 23.7v76.3H76.3l1.3-19.1h-1c-5.3 15.6-13.6 20.4-35.5 20.4-30.3 0-41.1-10.1-41.1-37.3 0-25.2 12.3-35.8 42.1-35.8zm17.1 48.1c13.1 0 16.9-3 16.9-13.4 0-9.1-4.3-11.6-19.6-11.6-13.1 0-17.9 3-17.9 12.1-.1 10.4 3.7 12.9 20.6 12.9zm77.8-94.9h38.3l-1.5 20.6h.8c9.1-17.1 15.9-20.9 37.5-20.9 14.4 0 24.7 3 31.5 9.1 9.8 8.6 12.8 20.4 12.8 48.1 0 30-3 43.1-12.1 52.9-6.8 7.3-16.4 10.1-33.2 10.1-20.4 0-29.2-5.5-33.8-21.2h-.8v70.3H137v-169zm80.9 60.7c0-27.5-3.3-32.5-20.7-32.5-16.9 0-20.7 5-20.7 28.7 0 28 3.5 33.5 21.2 33.5 16.4 0 20.2-5.6 20.2-29.7zm57.9-60.7h38.3l-1.5 20.6h.8c9.1-17.1 15.9-20.9 37.5-20.9 14.4 0 24.7 3 31.5 9.1 9.8 8.6 12.8 20.4 12.8 48.1 0 30-3 43.1-12.1 52.9-6.8 7.3-16.4 10.1-33.3 10.1-20.4 0-29.2-5.5-33.8-21.2h-.8v70.3h-39.5v-169zm80.9 60.7c0-27.5-3.3-32.5-20.7-32.5-16.9 0-20.7 5-20.7 28.7 0 28 3.5 33.5 21.2 33.5 16.4 0 20.2-5.6 20.2-29.7zm53.8-3.8c0-25.4 3.3-37.8 12.3-45.8 8.8-8.1 22.2-11.3 45.1-11.3 42.8 0 55.7 12.8 55.7 55.7v11.1h-75.3c-.3 2-.3 4-.3 4.8 0 16.9 4.5 21.9 20.1 21.9 13.9 0 17.9-3 17.9-13.9h37.5v2.3c0 9.8-2.5 18.9-6.8 24.7-7.3 9.8-19.6 13.6-44.3 13.6-27.5 0-41.6-3.3-50.6-12.3-8.5-8.5-11.3-21.3-11.3-50.8zm76.4-11.6c-.3-1.8-.3-3.3-.3-3.8 0-12.3-3.3-14.6-19.6-14.6-14.4 0-17.1 3-18.1 15.1l-.3 3.3h38.3zm55.6-45.3h38.3l-1.8 19.9h.7c6.8-14.9 14.4-20.2 29.7-20.2 10.8 0 19.1 3.3 23.4 9.3 5.3 7.3 6.8 14.4 6.8 34 0 1.5 0 5 .2 9.3h-35c.3-1.8.3-3.3.3-4 0-15.4-2-19.4-10.3-19.4-6.3 0-10.8 3.3-13.1 9.3-1 3-1 4.3-1 12.3v68h-38.3V192.3z"],
- "apple": [448, 512, [], "f179", "M247.2 137.6c-6.2 1.9-15.3 3.5-27.9 4.6 1.1-56.7 29.9-96.6 88-110.1 9.3 41.6-26.1 94.1-60.1 105.5zm121.3 72.7c6.4-9.4 16.6-19.9 30.6-31.7-22.3-27.6-48.1-44.3-85.1-44.3-35.4 0-65.2 18.2-87 18.2-18.5 0-51.9-16.1-84.5-16.1-69.6 0-106.5 68.1-106.5 139C36 354.2 95.7 480 156.2 480c23.8 0 45.2-18 73.5-18 29.3 0 52.8 17.2 80.3 17.2 46 0 88.6-77.5 102-119.7-46.8-14.3-84.4-90.2-43.5-149.2z"],
- "apple-pay": [640, 512, [], "f415", "M116.9 158.5c-7.5 8.9-19.5 15.9-31.5 14.9-1.5-12 4.4-24.8 11.3-32.6 7.5-9.1 20.6-15.6 31.3-16.1 1.2 12.4-3.7 24.7-11.1 33.8m10.9 17.2c-17.4-1-32.3 9.9-40.5 9.9-8.4 0-21-9.4-34.8-9.1-17.9.3-34.5 10.4-43.6 26.5-18.8 32.3-4.9 80 13.3 106.3 8.9 13 19.5 27.3 33.5 26.8 13.3-.5 18.5-8.6 34.5-8.6 16.1 0 20.8 8.6 34.8 8.4 14.5-.3 23.6-13 32.5-26 10.1-14.8 14.3-29.1 14.5-29.9-.3-.3-28-10.9-28.3-42.9-.3-26.8 21.9-39.5 22.9-40.3-12.5-18.6-32-20.6-38.8-21.1m100.4-36.2v194.9h30.3v-66.6h41.9c38.3 0 65.1-26.3 65.1-64.3s-26.4-64-64.1-64h-73.2zm30.3 25.5h34.9c26.3 0 41.3 14 41.3 38.6s-15 38.8-41.4 38.8h-34.8V165zm162.2 170.9c19 0 36.6-9.6 44.6-24.9h.6v23.4h28v-97c0-28.1-22.5-46.3-57.1-46.3-32.1 0-55.9 18.4-56.8 43.6h27.3c2.3-12 13.4-19.9 28.6-19.9 18.5 0 28.9 8.6 28.9 24.5v10.8l-37.8 2.3c-35.1 2.1-54.1 16.5-54.1 41.5.1 25.2 19.7 42 47.8 42zm8.2-23.1c-16.1 0-26.4-7.8-26.4-19.6 0-12.3 9.9-19.4 28.8-20.5l33.6-2.1v11c0 18.2-15.5 31.2-36 31.2zm102.5 74.6c29.5 0 43.4-11.3 55.5-45.4L640 193h-30.8l-35.6 115.1h-.6L537.4 193h-31.6L557 334.9l-2.8 8.6c-4.6 14.6-12.1 20.3-25.5 20.3-2.4 0-7-.3-8.9-.5v23.4c1.8.4 9.3.7 11.6.7z"],
- "asymmetrik": [576, 512, [], "f372", "M517.5 309.2c38.8-40 58.1-80 58.5-116.1.8-65.5-59.4-118.2-169.4-135C277.9 38.4 118.1 73.6 0 140.5 52 114 110.6 92.3 170.7 82.3c74.5-20.5 153-25.4 221.3-14.8C544.5 91.3 588.8 195 490.8 299.2c-10.2 10.8-22 21.1-35 30.6L304.9 103.4 114.7 388.9c-65.6-29.4-76.5-90.2-19.1-151.2 20.8-22.2 48.3-41.9 79.5-58.1 20-12.2 39.7-22.6 62-30.7-65.1 20.3-122.7 52.9-161.6 92.9-27.7 28.6-41.4 57.1-41.7 82.9-.5 35.1 23.4 65.1 68.4 83l-34.5 51.7h101.6l22-34.4c22.2 1 45.3 0 68.6-2.7l-22.8 37.1h135.5L340 406.3c18.6-5.3 36.9-11.5 54.5-18.7l45.9 71.8H542L468.6 349c18.5-12.1 35-25.5 48.9-39.8zm-187.6 80.5l-25-40.6-32.7 53.3c-23.4 3.5-46.7 5.1-69.2 4.4l101.9-159.3 78.7 123c-17.2 7.4-35.3 13.9-53.7 19.2z"],
- "audible": [640, 512, [], "f373", "M640 199.9v54l-320 200L0 254v-54l320 200 320-200.1zm-194.5 72l47.1-29.4c-37.2-55.8-100.7-92.6-172.7-92.6-72 0-135.5 36.7-172.6 92.4h.3c2.5-2.3 5.1-4.5 7.7-6.7 89.7-74.4 219.4-58.1 290.2 36.3zm-220.1 18.8c16.9-11.9 36.5-18.7 57.4-18.7 34.4 0 65.2 18.4 86.4 47.6l45.4-28.4c-20.9-29.9-55.6-49.5-94.8-49.5-38.9 0-73.4 19.4-94.4 49zM103.6 161.1c131.8-104.3 318.2-76.4 417.5 62.1l.7 1 48.8-30.4C517.1 112.1 424.8 58.1 319.9 58.1c-103.5 0-196.6 53.5-250.5 135.6 9.9-10.5 22.7-23.5 34.2-32.6zm467 32.7z"],
- "autoprefixer": [640, 512, [], "f41c", "M318.4 16l-161 480h77.5l25.4-81.4h119.5L405 496h77.5L318.4 16zm-40.3 341.9l41.2-130.4h1.5l40.9 130.4h-83.6zM640 405l-10-31.4L462.1 358l19.4 56.5L640 405zm-462.1-47L10 373.7 0 405l158.5 9.4 19.4-56.4z"],
- "avianex": [512, 512, [], "f374", "M453.1 32h-312c-38.9 0-76.2 31.2-83.3 69.7L1.2 410.3C-5.9 448.8 19.9 480 58.9 480h312c38.9 0 76.2-31.2 83.3-69.7l56.7-308.5c7-38.6-18.8-69.8-57.8-69.8zm-58.2 347.3l-32 13.5-115.4-110c-14.7 10-29.2 19.5-41.7 27.1l22.1 64.2-17.9 12.7-40.6-61-52.4-48.1 15.7-15.4 58 31.1c9.3-10.5 20.8-22.6 32.8-34.9L203 228.9l-68.8-99.8 18.8-28.9 8.9-4.8L265 207.8l4.9 4.5c19.4-18.8 33.8-32.4 33.8-32.4 7.7-6.5 21.5-2.9 30.7 7.9 9 10.5 10.6 24.7 2.7 31.3-1.8 1.3-15.5 11.4-35.3 25.6l4.5 7.3 94.9 119.4-6.3 7.9z"],
- "aviato": [640, 512, [], "f421", "M107.2 283.5l-19-41.8H36.1l-19 41.8H0l62.2-131.4 62.2 131.4h-17.2zm-45-98.1l-19.6 42.5h39.2l-19.6-42.5zm112.7 102.4l-62.2-131.4h17.1l45.1 96 45.1-96h17l-62.1 131.4zm80.6-4.3V156.4H271v127.1h-15.5zm209.1-115.6v115.6h-17.3V167.9h-41.2v-11.5h99.6v11.5h-41.1zM640 218.8c0 9.2-1.7 17.8-5.1 25.8-3.4 8-8.2 15.1-14.2 21.1-6 6-13.1 10.8-21.1 14.2-8 3.4-16.6 5.1-25.8 5.1s-17.8-1.7-25.8-5.1c-8-3.4-15.1-8.2-21.1-14.2-6-6-10.8-13-14.2-21.1-3.4-8-5.1-16.6-5.1-25.8s1.7-17.8 5.1-25.8c3.4-8 8.2-15.1 14.2-21.1 6-6 13-8.4 21.1-11.9 8-3.4 16.6-5.1 25.8-5.1s17.8 1.7 25.8 5.1c8 3.4 15.1 5.8 21.1 11.9 6 6 10.7 13.1 14.2 21.1 3.4 8 5.1 16.6 5.1 25.8zm-15.5 0c0-7.3-1.3-14-3.9-20.3-2.6-6.3-6.2-11.7-10.8-16.3-4.6-4.6-10-8.2-16.2-10.9-6.2-2.7-12.8-4-19.8-4s-13.6 1.3-19.8 4c-6.2 2.7-11.6 6.3-16.2 10.9-4.6 4.6-8.2 10-10.8 16.3-2.6 6.3-3.9 13.1-3.9 20.3 0 7.3 1.3 14 3.9 20.3 2.6 6.3 6.2 11.7 10.8 16.3 4.6 4.6 10 8.2 16.2 10.9 6.2 2.7 12.8 4 19.8 4s13.6-1.3 19.8-4c6.2-2.7 11.6-6.3 16.2-10.9 4.6-4.6 8.2-10 10.8-16.3 2.6-6.3 3.9-13.1 3.9-20.3zm-94.8 96.7v-6.3l88.9-10-242.9 13.4c.6-2.2 1.1-4.6 1.4-7.2.3-2 .5-4.2.6-6.5l64.8-8.1-64.9 1.9c0-.4-.1-.7-.1-1.1-2.8-17.2-25.5-23.7-25.5-23.7l-1.1-26.3h23.8l19 41.8h17.1L348.6 152l-62.2 131.4h17.1l19-41.8h23.6L345 268s-22.7 6.5-25.5 23.7c-.1.3-.1.7-.1 1.1l-64.9-1.9 64.8 8.1c.1 2.3.3 4.4.6 6.5.3 2.6.8 5 1.4 7.2L78.4 299.2l88.9 10v6.3c-5.9.9-10.5 6-10.5 12.2 0 6.8 5.6 12.4 12.4 12.4 6.8 0 12.4-5.6 12.4-12.4 0-6.2-4.6-11.3-10.5-12.2v-5.8l80.3 9v5.4c-5.7 1.1-9.9 6.2-9.9 12.1 0 6.8 5.6 10.2 12.4 10.2 6.8 0 12.4-3.4 12.4-10.2 0-6-4.3-11-9.9-12.1v-4.9l28.4 3.2v23.7h-5.9V360h5.9v-6.6h5v6.6h5.9v-13.8h-5.9V323l38.3 4.3c8.1 11.4 19 13.6 19 13.6l-.1 6.7-5.1.2-.1 12.1h4.1l.1-5h5.2l.1 5h4.1l-.1-12.1-5.1-.2-.1-6.7s10.9-2.1 19-13.6l38.3-4.3v23.2h-5.9V360h5.9v-6.6h5v6.6h5.9v-13.8h-5.9v-23.7l28.4-3.2v4.9c-5.7 1.1-9.9 6.2-9.9 12.1 0 6.8 5.6 10.2 12.4 10.2 6.8 0 12.4-3.4 12.4-10.2 0-6-4.3-11-9.9-12.1v-5.4l80.3-9v5.8c-5.9.9-10.5 6-10.5 12.2 0 6.8 5.6 12.4 12.4 12.4 6.8 0 12.4-5.6 12.4-12.4-.2-6.3-4.7-11.4-10.7-12.3zm-200.8-87.6l19.6-42.5 19.6 42.5h-17.9l-1.7-40.3-1.7 40.3h-17.9z"],
- "aws": [512, 512, [], "f375", "M261.2 136.1c-14 57.5-13.1 54.4-25.8 107-1.6 6.5-4.1 8.4-10.7 8.5h-14.4c-5.8-.1-8.2-1.6-9.9-7.3-12.3-39.4-28.8-94.1-39.9-130.7-4.1-13.5-1.4-13.2 9.3-12.9 3.7.1 7.3 0 11 0 5.1.1 7.7 2 9.1 7.1 3.6 12.9 6 22.8 26.6 104.1.4 1.6.9 3.1 1.4 4.6h1.1c.5-2 1.1-3.9 1.6-5.9 7.8-32.9 15.5-65.9 23.3-98.8 2.4-10.2 6.7-11.2 17-11.2h7.6c6.9.1 9 1.5 10.7 8.3 6 23.4 23.5 101.8 26.7 110.4 5.1-18.3-1.8 7.9 28.5-109 2.1-8.1 4.1-9.7 12.3-9.7h12.7c5.4.1 7 1.8 5.7 7.1-2.4 9.5-2.9 9.9-41.3 132.9-3.1 9.9-4.2 10.8-14.6 10.8h-10.6c-7.3 0-9.2-1.3-11-8.4-4.3-16.2-23.3-95.7-26.4-106.9zM125.4 247.3c4.2 5.8 8.1 6.3 14.1 2.4l6.3-4.2c6.8-4.5 7.3-6.3 3.6-13.5-4.3-8.4-6.4-17.3-6.3-26.9 0-3.1.6-55.7-.9-66.8-2.7-19.3-12.5-32.8-31.7-38.7-10.7-3.4-21.7-3.3-32.7-3-15.1.4-29.4 4.6-42.8 11.4-1.8.9-3.7 3.1-4.1 4.9-.8 3.9-1.1 8.1-.7 12.1.6 5.9 2.6 7 8.2 5.1 5.1-1.7 10-3.9 15.1-5.4 14.5-4.4 29.2-6.4 44.1-1.7 7.1 2.2 11.7 6.9 14.3 13.8 3 7.9 2.4 16.1 2.4 24.2 0 5.5-.1 5.5-5.5 4.5-13.9-2.6-27.7-5-41.9-3.1-15.2 2.1-28.6 7.3-38.2 20-9.1 12-10 25.6-7.4 39.5 2.8 15 11.8 25.7 26.4 30.4 20.6 6.7 40.1 3.3 57.7-9.5 3.8-2.8 7.2-6.2 11.1-9.5 3.1 5 5.8 9.7 8.9 14zm-15.3-61.6c3 .4 4.5 1.9 4.3 5.1-.2 3.8.1 7.6-.3 11.4-1.2 11.7-7.7 19.7-17.9 24.9-8.2 4.2-16.9 5.8-26.1 5-15.2-1.3-21-13.1-19.6-26.3C51.8 193.2 59 186.2 72 184c13.8-2.4 16-1.1 38.1 1.7zm348.8 65.1c21.3-8.6 32.9-26.2 29.2-50-2.2-14.6-11.8-24.2-25.2-29.5-14.7-5.9-33.8-10.3-48.1-18.2-4.4-2.4-7.4-6.3-7.6-11.9-.4-11.1 4.2-17.2 15.4-19.8 9.3-2.1 18.8-2.2 28.1-.4 7.3 1.4 14.3 4.2 21.4 6.3 2.8.9 5.9 2.1 7.8-1.6 3.8-7.3.4-18.7-7.3-21.8-22.5-9-45.5-11.6-68.2-1.6-14.6 6.4-24.6 17.4-26 34.2-1.6 19.3 6.9 33.4 24.1 41.7 7.7 3.7 16.1 5.9 24.2 8.9 8.1 3 16.2 5.8 24.1 9.1 12.3 5.3 11.6 24.2 1.2 30-27.7 15.3-64.9-2.4-69.2-3.8-3.3-1.1-5.3.2-6.3 3.7-3 11.3.7 18.8 11.6 22.7 21.7 7.9 49.6 10.5 70.8 2zM296 413.5c50.8-5.8 98.7-20.8 142.7-47 8-4.7 15.5-10.3 23.1-15.7 7.3-5.2 3.2-18.4-11.3-12.2-54.4 23.2-111.2 36.1-170.2 38.9-30.5 1.5-60.8-.3-91.1-4.7-63.1-9.2-122.4-29.2-177.6-61.2-2.1-1.2-4.2-2.5-6.5-3-4.9-1.1-7.7 4.7-2.4 9.7 24 22.1 50.3 40.8 79.1 55.7 53.7 27.7 110.5 42.7 171.2 42 14.4-.8 28.8-.9 43-2.5zm174.7-92.2c14.8.8 19.4 5.9 15.7 20.2-3.8 14.8-9.3 29.2-13.9 43.8-.9 2.9-4.2 6.3-.8 8.8 3.7 2.6 6.5-1 9-3.3 10.2-9.5 17.4-21 22.5-33.8 5.4-13.4 9.3-27.2 8.7-41.9-.2-6.2-1.8-8.8-7.8-10.5-5.4-1.5-11-2.8-16.5-3.2-21.6-1.8-42.5.5-62 10.6-3.1 1.6-6 3.7-8.7 5.9-1.1.9-3.2 5.3 2.4 6.1 1.9.3 3.9-.1 5.9-.3 16.9-1.6 28.6-3.3 45.5-2.4z"],
- "bandcamp": [496, 512, [], "f2d5", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm48.2 326.1h-181L199.9 178h181l-84.7 156.1z"],
- "behance": [576, 512, [], "f1b4", "M232 237.2c31.8-15.2 48.4-38.2 48.4-74 0-70.6-52.6-87.8-113.3-87.8H0v354.4h171.8c64.4 0 124.9-30.9 124.9-102.9 0-44.5-21.1-77.4-64.7-89.7zM77.9 135.9H151c28.1 0 53.4 7.9 53.4 40.5 0 30.1-19.7 42.2-47.5 42.2h-79v-82.7zm83.3 233.7H77.9V272h84.9c34.3 0 56 14.3 56 50.6 0 35.8-25.9 47-57.6 47zm358.5-240.7H376V94h143.7v34.9zM576 305.2c0-75.9-44.4-139.2-124.9-139.2-78.2 0-131.3 58.8-131.3 135.8 0 79.9 50.3 134.7 131.3 134.7 61.3 0 101-27.6 120.1-86.3H509c-6.7 21.9-34.3 33.5-55.7 33.5-41.3 0-63-24.2-63-65.3h185.1c.3-4.2.6-8.7.6-13.2zM390.4 274c2.3-33.7 24.7-54.8 58.5-54.8 35.4 0 53.2 20.8 56.2 54.8H390.4z"],
- "behance-square": [512, 512, [], "f1b5", "M186.5 293c0 19.3-14 25.4-31.2 25.4h-45.1v-52.9h46c18.6.1 30.3 7.8 30.3 27.5zm-7.7-82.3c0-17.7-13.7-21.9-28.9-21.9h-39.6v44.8H153c15.1 0 25.8-6.6 25.8-22.9zm132.3 23.2c-18.3 0-30.5 11.4-31.7 29.7h62.2c-1.7-18.5-11.3-29.7-30.5-29.7zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zM271.7 185h77.8v-18.9h-77.8V185zm-43 110.3c0-24.1-11.4-44.9-35-51.6 17.2-8.2 26.2-17.7 26.2-37 0-38.2-28.5-47.5-61.4-47.5H68v192h93.1c34.9-.2 67.6-16.9 67.6-55.9zM380 280.5c0-41.1-24.1-75.4-67.6-75.4-42.4 0-71.1 31.8-71.1 73.6 0 43.3 27.3 73 71.1 73 33.2 0 54.7-14.9 65.1-46.8h-33.7c-3.7 11.9-18.6 18.1-30.2 18.1-22.4 0-34.1-13.1-34.1-35.3h100.2c.1-2.3.3-4.8.3-7.2z"],
- "bimobject": [448, 512, [], "f378", "M416 32H32C14.4 32 0 46.4 0 64v384c0 17.6 14.4 32 32 32h384c17.6 0 32-14.4 32-32V64c0-17.6-14.4-32-32-32zm-64 257.4c0 49.4-11.4 82.6-103.8 82.6h-16.9c-44.1 0-62.4-14.9-70.4-38.8h-.9V368H96V136h64v74.7h1.1c4.6-30.5 39.7-38.8 69.7-38.8h17.3c92.4 0 103.8 33.1 103.8 82.5v35zm-64-28.9v22.9c0 21.7-3.4 33.8-38.4 33.8h-45.3c-28.9 0-44.1-6.5-44.1-35.7v-19c0-29.3 15.2-35.7 44.1-35.7h45.3c35-.2 38.4 12 38.4 33.7z"],
- "bitbucket": [512, 512, [], "f171", "M23.1 32C14.2 31.9 7 38.9 6.9 47.8c0 .9.1 1.8.2 2.8L74.9 462c1.7 10.4 10.7 18 21.2 18.1h325.1c7.9.1 14.7-5.6 16-13.4l67.8-416c1.4-8.7-4.5-16.9-13.2-18.3-.9-.1-1.8-.2-2.8-.2L23.1 32zm285.3 297.3H204.6l-28.1-146.8h157l-25.1 146.8z"],
- "bitcoin": [512, 512, [], "f379", "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-141.651-35.33c4.937-32.999-20.191-50.739-54.55-62.573l11.146-44.702-27.213-6.781-10.851 43.524c-7.154-1.783-14.502-3.464-21.803-5.13l10.929-43.81-27.198-6.781-11.153 44.686c-5.922-1.349-11.735-2.682-17.377-4.084l.031-.14-37.53-9.37-7.239 29.062s20.191 4.627 19.765 4.913c11.022 2.751 13.014 10.044 12.68 15.825l-12.696 50.925c.76.194 1.744.473 2.829.907-.907-.225-1.876-.473-2.876-.713l-17.796 71.338c-1.349 3.348-4.767 8.37-12.471 6.464.271.395-19.78-4.937-19.78-4.937l-13.51 31.147 35.414 8.827c6.588 1.651 13.045 3.379 19.4 5.006l-11.262 45.213 27.182 6.781 11.153-44.733a1038.209 1038.209 0 0 0 21.687 5.627l-11.115 44.523 27.213 6.781 11.262-45.128c46.404 8.781 81.299 5.239 95.986-36.727 11.836-33.79-.589-53.281-25.004-65.991 17.78-4.098 31.174-15.792 34.747-39.949zm-62.177 87.179c-8.41 33.79-65.308 15.523-83.755 10.943l14.944-59.899c18.446 4.603 77.6 13.717 68.811 48.956zm8.417-87.667c-7.673 30.736-55.031 15.12-70.393 11.292l13.548-54.327c15.363 3.828 64.836 10.973 56.845 43.035z"],
- "bity": [496, 512, [], "f37a", "M78.4 67.2C173.8-22 324.5-24 421.5 71c14.3 14.1-6.4 37.1-22.4 21.5-84.8-82.4-215.8-80.3-298.9-3.2-16.3 15.1-36.5-8.3-21.8-22.1zm98.9 418.6c19.3 5.7 29.3-23.6 7.9-30C73 421.9 9.4 306.1 37.7 194.8c5-19.6-24.9-28.1-30.2-7.1-32.1 127.4 41.1 259.8 169.8 298.1zm148.1-2c121.9-40.2 192.9-166.9 164.4-291-4.5-19.7-34.9-13.8-30 7.9 24.2 107.7-37.1 217.9-143.2 253.4-21.2 7-10.4 36 8.8 29.7zm-62.9-79l.2-71.8c0-8.2-6.6-14.8-14.8-14.8-8.2 0-14.8 6.7-14.8 14.8l-.2 71.8c0 8.2 6.6 14.8 14.8 14.8s14.8-6.6 14.8-14.8zm71-269c2.1 90.9 4.7 131.9-85.5 132.5-92.5-.7-86.9-44.3-85.5-132.5 0-21.8-32.5-19.6-32.5 0v71.6c0 69.3 60.7 90.9 118 90.1 57.3.8 118-20.8 118-90.1v-71.6c0-19.6-32.5-21.8-32.5 0z"],
- "black-tie": [448, 512, [], "f27e", "M0 32v448h448V32H0zm316.5 325.2L224 445.9l-92.5-88.7 64.5-184-64.5-86.6h184.9L252 173.2l64.5 184z"],
- "blackberry": [512, 512, [], "f37b", "M166 116.9c0 23.4-16.4 49.1-72.5 49.1H23.4l21-88.8h67.8c42.1 0 53.8 23.3 53.8 39.7zm126.2-39.7h-67.8L205.7 166h70.1c53.8 0 70.1-25.7 70.1-49.1.1-16.4-11.6-39.7-53.7-39.7zM88.8 208.1H21L0 296.9h70.1c56.1 0 72.5-23.4 72.5-49.1 0-16.3-11.7-39.7-53.8-39.7zm180.1 0h-67.8l-18.7 88.8h70.1c53.8 0 70.1-23.4 70.1-49.1 0-16.3-11.7-39.7-53.7-39.7zm189.3-53.8h-67.8l-18.7 88.8h70.1c53.8 0 70.1-23.4 70.1-49.1.1-16.3-11.6-39.7-53.7-39.7zm-28 137.9h-67.8L343.7 381h70.1c56.1 0 70.1-23.4 70.1-49.1 0-16.3-11.6-39.7-53.7-39.7zM240.8 346H173l-18.7 88.8h70.1c56.1 0 70.1-25.7 70.1-49.1.1-16.3-11.6-39.7-53.7-39.7z"],
- "blogger": [448, 512, [], "f37c", "M162.4 196c4.8-4.9 6.2-5.1 36.4-5.1 27.2 0 28.1.1 32.1 2.1 5.8 2.9 8.3 7 8.3 13.6 0 5.9-2.4 10-7.6 13.4-2.8 1.8-4.5 1.9-31.1 2.1-16.4.1-29.5-.2-31.5-.8-10.3-2.9-14.1-17.7-6.6-25.3zm61.4 94.5c-53.9 0-55.8.2-60.2 4.1-3.5 3.1-5.7 9.4-5.1 13.9.7 4.7 4.8 10.1 9.2 12 2.2 1 14.1 1.7 56.3 1.2l47.9-.6 9.2-1.5c9-5.1 10.5-17.4 3.1-24.4-5.3-4.7-5-4.7-60.4-4.7zm223.4 130.1c-3.5 28.4-23 50.4-51.1 57.5-7.2 1.8-9.7 1.9-172.9 1.8-157.8 0-165.9-.1-172-1.8-8.4-2.2-15.6-5.5-22.3-10-5.6-3.8-13.9-11.8-17-16.4-3.8-5.6-8.2-15.3-10-22C.1 423 0 420.3 0 256.3 0 93.2 0 89.7 1.8 82.6 8.1 57.9 27.7 39 53 33.4c7.3-1.6 332.1-1.9 340-.3 21.2 4.3 37.9 17.1 47.6 36.4 7.7 15.3 7-1.5 7.3 180.6.2 115.8 0 164.5-.7 170.5zm-85.4-185.2c-1.1-5-4.2-9.6-7.7-11.5-1.1-.6-8-1.3-15.5-1.7-12.4-.6-13.8-.8-17.8-3.1-6.2-3.6-7.9-7.6-8-18.3 0-20.4-8.5-39.4-25.3-56.5-12-12.2-25.3-20.5-40.6-25.1-3.6-1.1-11.8-1.5-39.2-1.8-42.9-.5-52.5.4-67.1 6.2-27 10.7-46.3 33.4-53.4 62.4-1.3 5.4-1.6 14.2-1.9 64.3-.4 62.8 0 72.1 4 84.5 9.7 30.7 37.1 53.4 64.6 58.4 9.2 1.7 122.2 2.1 133.7.5 20.1-2.7 35.9-10.8 50.7-25.9 10.7-10.9 17.4-22.8 21.8-38.5 3.2-10.9 2.9-88.4 1.7-93.9z"],
- "blogger-b": [448, 512, [], "f37d", "M446.6 222.7c-1.8-8-6.8-15.4-12.5-18.5-1.8-1-13-2.2-25-2.7-20.1-.9-22.3-1.3-28.7-5-10.1-5.9-12.8-12.3-12.9-29.5-.1-33-13.8-63.7-40.9-91.3-19.3-19.7-40.9-33-65.5-40.5-5.9-1.8-19.1-2.4-63.3-2.9-69.4-.8-84.8.6-108.4 10C45.9 59.5 14.7 96.1 3.3 142.9 1.2 151.7.7 165.8.2 246.8c-.6 101.5.1 116.4 6.4 136.5 15.6 49.6 59.9 86.3 104.4 94.3 14.8 2.7 197.3 3.3 216 .8 32.5-4.4 58-17.5 81.9-41.9 17.3-17.7 28.1-36.8 35.2-62.1 4.9-17.6 4.5-142.8 2.5-151.7zm-322.1-63.6c7.8-7.9 10-8.2 58.8-8.2 43.9 0 45.4.1 51.8 3.4 9.3 4.7 13.4 11.3 13.4 21.9 0 9.5-3.8 16.2-12.3 21.6-4.6 2.9-7.3 3.1-50.3 3.3-26.5.2-47.7-.4-50.8-1.2-16.6-4.7-22.8-28.5-10.6-40.8zm191.8 199.8l-14.9 2.4-77.5.9c-68.1.8-87.3-.4-90.9-2-7.1-3.1-13.8-11.7-14.9-19.4-1.1-7.3 2.6-17.3 8.2-22.4 7.1-6.4 10.2-6.6 97.3-6.7 89.6-.1 89.1-.1 97.6 7.8 12.1 11.3 9.5 31.2-4.9 39.4z"],
- "bluetooth": [448, 512, [], "f293", "M292.6 171.1L249.7 214l-.3-86 43.2 43.1m-43.2 219.8l43.1-43.1-42.9-42.9-.2 86zM416 259.4C416 465 344.1 512 230.9 512S32 465 32 259.4 115.4 0 228.6 0 416 53.9 416 259.4zm-158.5 0l79.4-88.6L211.8 36.5v176.9L138 139.6l-27 26.9 92.7 93-92.7 93 26.9 26.9 73.8-73.8 2.3 170 127.4-127.5-83.9-88.7z"],
- "bluetooth-b": [320, 512, [], "f294", "M196.48 260.023l92.626-103.333L143.125 0v206.33l-86.111-86.111-31.406 31.405 108.061 108.399L25.608 368.422l31.406 31.405 86.111-86.111L145.84 512l148.552-148.644-97.912-103.333zm40.86-102.996l-49.977 49.978-.338-100.295 50.315 50.317zM187.363 313.04l49.977 49.978-50.315 50.316.338-100.294z"],
- "btc": [384, 512, [], "f15a", "M310.204 242.638c27.73-14.18 45.377-39.39 41.28-81.3-5.358-57.351-52.458-76.573-114.85-81.929V0h-48.528v77.203c-12.605 0-25.525.315-38.444.63V0h-48.528v79.409c-17.842.539-38.622.276-97.37 0v51.678c38.314-.678 58.417-3.14 63.023 21.427v217.429c-2.925 19.492-18.524 16.685-53.255 16.071L3.765 443.68c88.481 0 97.37.315 97.37.315V512h48.528v-67.06c13.234.315 26.154.315 38.444.315V512h48.528v-68.005c81.299-4.412 135.647-24.894 142.895-101.467 5.671-61.446-23.32-88.862-69.326-99.89zM150.608 134.553c27.415 0 113.126-8.507 113.126 48.528 0 54.515-85.71 48.212-113.126 48.212v-96.74zm0 251.776V279.821c32.772 0 133.127-9.138 133.127 53.255-.001 60.186-100.355 53.253-133.127 53.253z"],
- "buromobelexperte": [448, 512, [], "f37f", "M0 32v128h128V32H0zm120 120H8V40h112v112zm40-120v128h128V32H160zm120 120H168V40h112v112zm40-120v128h128V32H320zm120 120H328V40h112v112zM0 192v128h128V192H0zm120 120H8V200h112v112zm40-120v128h128V192H160zm120 120H168V200h112v112zm40-120v128h128V192H320zm120 120H328V200h112v112zM0 352v128h128V352H0zm120 120H8V360h112v112zm40-120v128h128V352H160zm120 120H168V360h112v112zm40-120v128h128V352H320z"],
- "buysellads": [448, 512, [], "f20d", "M224 150.7l42.9 160.7h-85.8L224 150.7zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-65.3 325.3l-94.5-298.7H159.8L65.3 405.3H156l111.7-91.6 24.2 91.6h90.8z"],
- "cc-amazon-pay": [576, 512, [], "f42d", "M124.7 201.8c.1-11.8 0-23.5 0-35.3v-35.3c0-1.3.4-2 1.4-2.7 11.5-8 24.1-12.1 38.2-11.1 12.5.9 22.7 7 28.1 21.7 3.3 8.9 4.1 18.2 4.1 27.7 0 8.7-.7 17.3-3.4 25.6-5.7 17.8-18.7 24.7-35.7 23.9-11.7-.5-21.9-5-31.4-11.7-.9-.8-1.4-1.6-1.3-2.8zm154.9 14.6c4.6 1.8 9.3 2 14.1 1.5 11.6-1.2 21.9-5.7 31.3-12.5.9-.6 1.3-1.3 1.3-2.5-.1-3.9 0-7.9 0-11.8 0-4-.1-8 0-12 0-1.4-.4-2-1.8-2.2-7-.9-13.9-2.2-20.9-2.9-7-.6-14-.3-20.8 1.9-6.7 2.2-11.7 6.2-13.7 13.1-1.6 5.4-1.6 10.8.1 16.2 1.6 5.5 5.2 9.2 10.4 11.2zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zm-207.5 23.9c.4 1.7.9 3.4 1.6 5.1 16.5 40.6 32.9 81.3 49.5 121.9 1.4 3.5 1.7 6.4.2 9.9-2.8 6.2-4.9 12.6-7.8 18.7-2.6 5.5-6.7 9.5-12.7 11.2-4.2 1.1-8.5 1.3-12.9.9-2.1-.2-4.2-.7-6.3-.8-2.8-.2-4.2 1.1-4.3 4-.1 2.8-.1 5.6 0 8.3.1 4.6 1.6 6.7 6.2 7.5 4.7.8 9.4 1.6 14.2 1.7 14.3.3 25.7-5.4 33.1-17.9 2.9-4.9 5.6-10.1 7.7-15.4 19.8-50.1 39.5-100.3 59.2-150.5.6-1.5 1.1-3 1.3-4.6.4-2.4-.7-3.6-3.1-3.7-5.6-.1-11.1 0-16.7 0-3.1 0-5.3 1.4-6.4 4.3-.4 1.1-.9 2.3-1.3 3.4l-29.1 83.7c-2.1 6.1-4.2 12.1-6.5 18.6-.4-.9-.6-1.4-.8-1.9-10.8-29.9-21.6-59.9-32.4-89.8-1.7-4.7-3.5-9.5-5.3-14.2-.9-2.5-2.7-4-5.4-4-6.4-.1-12.8-.2-19.2-.1-2.2 0-3.3 1.6-2.8 3.7zM242.4 206c1.7 11.7 7.6 20.8 18 26.6 9.9 5.5 20.7 6.2 31.7 4.6 12.7-1.9 23.9-7.3 33.8-15.5.4-.3.8-.6 1.4-1 .5 3.2.9 6.2 1.5 9.2.5 2.6 2.1 4.3 4.5 4.4 4.6.1 9.1.1 13.7 0 2.3-.1 3.8-1.6 4-3.9.1-.8.1-1.6.1-2.3v-88.8c0-3.6-.2-7.2-.7-10.8-1.6-10.8-6.2-19.7-15.9-25.4-5.6-3.3-11.8-5-18.2-5.9-3-.4-6-.7-9.1-1.1h-10c-.8.1-1.6.3-2.5.3-8.2.4-16.3 1.4-24.2 3.5-5.1 1.3-10 3.2-15 4.9-3 1-4.5 3.2-4.4 6.5.1 2.8-.1 5.6 0 8.3.1 4.1 1.8 5.2 5.7 4.1 6.5-1.7 13.1-3.5 19.7-4.8 10.3-1.9 20.7-2.7 31.1-1.2 5.4.8 10.5 2.4 14.1 7 3.1 4 4.2 8.8 4.4 13.7.3 6.9.2 13.9.3 20.8 0 .4-.1.7-.2 1.2-.4 0-.8 0-1.1-.1-8.8-2.1-17.7-3.6-26.8-4.1-9.5-.5-18.9.1-27.9 3.2-10.8 3.8-19.5 10.3-24.6 20.8-4.1 8.3-4.6 17-3.4 25.8zM98.7 106.9v175.3c0 .8 0 1.7.1 2.5.2 2.5 1.7 4.1 4.1 4.2 5.9.1 11.8.1 17.7 0 2.5 0 4-1.7 4.1-4.1.1-.8.1-1.7.1-2.5v-60.7c.9.7 1.4 1.2 1.9 1.6 15 12.5 32.2 16.6 51.1 12.9 17.1-3.4 28.9-13.9 36.7-29.2 5.8-11.6 8.3-24.1 8.7-37 .5-14.3-1-28.4-6.8-41.7-7.1-16.4-18.9-27.3-36.7-30.9-2.7-.6-5.5-.8-8.2-1.2h-7c-1.2.2-2.4.3-3.6.5-11.7 1.4-22.3 5.8-31.8 12.7-2 1.4-3.9 3-5.9 4.5-.1-.5-.3-.8-.4-1.2-.4-2.3-.7-4.6-1.1-6.9-.6-3.9-2.5-5.5-6.4-5.6h-9.7c-5.9-.1-6.9 1-6.9 6.8zM493.6 339c-2.7-.7-5.1 0-7.6 1-43.9 18.4-89.5 30.2-136.8 35.8-14.5 1.7-29.1 2.8-43.7 3.2-26.6.7-53.2-.8-79.6-4.3-17.8-2.4-35.5-5.7-53-9.9-37-8.9-72.7-21.7-106.7-38.8-8.8-4.4-17.4-9.3-26.1-14-3.8-2.1-6.2-1.5-8.2 2.1v1.7c1.2 1.6 2.2 3.4 3.7 4.8 36 32.2 76.6 56.5 122 72.9 21.9 7.9 44.4 13.7 67.3 17.5 14 2.3 28 3.8 42.2 4.5 3 .1 6 .2 9 .4.7 0 1.4.2 2.1.3h17.7c.7-.1 1.4-.3 2.1-.3 14.9-.4 29.8-1.8 44.6-4 21.4-3.2 42.4-8.1 62.9-14.7 29.6-9.6 57.7-22.4 83.4-40.1 2.8-1.9 5.7-3.8 8-6.2 4.3-4.4 2.3-10.4-3.3-11.9zm50.4-27.7c-.8-4.2-4-5.8-7.6-7-5.7-1.9-11.6-2.8-17.6-3.3-11-.9-22-.4-32.8 1.6-12 2.2-23.4 6.1-33.5 13.1-1.2.8-2.4 1.8-3.1 3-.6.9-.7 2.3-.5 3.4.3 1.3 1.7 1.6 3 1.5.6 0 1.2 0 1.8-.1l19.5-2.1c9.6-.9 19.2-1.5 28.8-.8 4.1.3 8.1 1.2 12 2.2 4.3 1.1 6.2 4.4 6.4 8.7.3 6.7-1.2 13.1-2.9 19.5-3.5 12.9-8.3 25.4-13.3 37.8-.3.8-.7 1.7-.8 2.5-.4 2.5 1 4 3.4 3.5 1.4-.3 3-1.1 4-2.1 3.7-3.6 7.5-7.2 10.6-11.2 10.7-13.8 17-29.6 20.7-46.6.7-3 1.2-6.1 1.7-9.1.2-4.7.2-9.6.2-14.5z"],
- "cc-amex": [576, 512, [], "f1f3", "M576 255.4c-37.9-.2-44.2-.9-54.5 5v-5c-45.3 0-53.5-1.7-64.9 5.2v-5.2h-78.2v5.1c-11.4-6.5-21.4-5.1-75.7-5.1v5.6c-6.3-3.7-14.5-5.6-24.3-5.6h-58c-3.5 3.8-12.5 13.7-15.7 17.2-12.7-14.1-10.5-11.6-15.5-17.2h-83.1v92.3h82c3.3-3.5 12.9-13.9 16.1-17.4 12.7 14.3 10.3 11.7 15.4 17.4h48.9c0-14.7.1-8.3.1-23 11.5.2 24.3-.2 34.3-6.2 0 13.9-.1 17.1-.1 29.2h39.6c0-18.5.1-7.4.1-25.3 6.2 0 7.7 0 9.4.1.1 1.3 0 0 0 25.2 152.8 0 145.9 1.1 156.7-4.5v4.5c34.8 0 54.8 2.2 67.5-6.1V432c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V228.3h26.6c4.2-10.1 2.2-5.3 6.4-15.3h19.2c4.2 10 2.2 5.2 6.4 15.3h52.9v-11.4c2.2 5 1.1 2.5 5.1 11.4h29.5c2.4-5.5 2.6-5.8 5.1-11.4v11.4h135.5v-25.1c6.4 0 8-.1 9.8.2 0 0-.2 10.9.1 24.8h66.5v-8.9c7.4 5.9 17.4 8.9 29.7 8.9h26.8c4.2-10.1 2.2-5.3 6.4-15.3h19c6.5 15 .2.5 6.6 15.3h52.8v-21.9c11.8 19.7 7.8 12.9 13.2 21.9h41.6v-92h-39.9v18.4c-12.2-20.2-6.3-10.4-11.2-18.4h-43.3v20.6c-6.2-14.6-4.6-10.8-8.8-20.6h-32.4c-.4 0-2.3.2-2.3-.3h-27.6c-12.8 0-23.1 3.2-30.7 9.3v-9.3h-39.9v5.3c-10.8-6.1-20.7-5.1-64.4-5.3-.1 0-11.6-.1-11.6 0h-103c-2.5 6.1-6.8 16.4-12.6 30-2.8-6-11-23.8-13.9-30h-46V157c-7.4-17.4-4.7-11-9-21.1H22.9c-3.4 7.9-13.7 32-23.1 53.9V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48v175.4zm-186.6-80.6c-.3.2-1.4 2.2-1.4 7.6 0 6 .9 7.7 1.1 7.9.2.1 1.1.5 3.4.5l7.3-16.9c-1.1 0-2.1-.1-3.1-.1-5.6 0-7 .7-7.3 1zm-19.9 130.9c9.2 3.3 11 9.5 11 18.4l-.1 13.8h-16.6l.1-11.5c0-11.8-3.8-13.8-14.8-13.8h-17.6l-.1 25.3h-16.6l.1-69.3h39.4c13 0 27.1 2.3 27.1 18.7-.1 7.6-4.2 15.3-11.9 18.4zm-6.3-15.4c0-6.4-5.6-7.4-10.7-7.4h-21v15.6h20.7c5.6 0 11-1.3 11-8.2zm181.7-7.1H575v-14.6h-32.9c-12.8 0-23.8 6.6-23.8 20.7 0 33 42.7 12.8 42.7 27.4 0 5.1-4.3 6.4-8.4 6.4h-32l-.1 14.8h32c8.4 0 17.6-1.8 22.5-8.9v-25.8c-10.5-13.8-39.3-1.3-39.3-13.5 0-5.8 4.6-6.5 9.2-6.5zm-99.2-.3v-14.3h-55.2l-.1 69.3h55.2l.1-14.3-38.6-.3v-13.8H445v-14.1h-37.8v-12.5h38.5zm42.2 40.1h-32.2l-.1 14.8h32.2c14.8 0 26.2-5.6 26.2-22 0-33.2-42.9-11.2-42.9-26.3 0-5.6 4.9-6.4 9.2-6.4h30.4v-14.6h-33.2c-12.8 0-23.5 6.6-23.5 20.7 0 33 42.7 12.5 42.7 27.4-.1 5.4-4.7 6.4-8.8 6.4zm-78.1-158.7c-17.4-.3-33.2-4.1-33.2 19.7 0 11.8 2.8 19.9 16.1 19.9h7.4l23.5-54.5h24.8l27.9 65.4v-65.4h25.3l29.1 48.1v-48.1h16.9v69H524l-31.2-51.9v51.9h-33.7l-6.6-15.3h-34.3l-6.4 15.3h-19.2c-22.8 0-33-11.8-33-34 0-23.3 10.5-35.3 34-35.3h16.1v15.2zm14.3 24.5h22.8l-11.2-27.6-11.6 27.6zm-72.6-39.6h-16.9v69.3h16.9v-69.3zm-38.1 37.3c9.5 3.3 11 9.2 11 18.4v13.5h-16.6c-.3-14.8 3.6-25.1-14.8-25.1h-18v25.1h-16.4v-69.3l39.1.3c13.3 0 27.4 2 27.4 18.4.1 8-4.3 15.7-11.7 18.7zm-6.7-15.3c0-6.4-5.6-7.4-10.7-7.4h-21v15.3h20.7c5.7 0 11-1.3 11-7.9zm-59.5-7.4v-14.6h-55.5v69.3h55.5v-14.3h-38.9v-13.8h37.8v-14.1h-37.8v-12.5h38.9zm-84.6 54.7v-54.2l-24 54.2H124l-24-54.2v54.2H66.2l-6.4-15.3H25.3l-6.4 15.3H1l29.7-69.3h24.5l28.1 65.7v-65.7h27.1l21.7 47 19.7-47h27.6v69.3h-16.8zM53.9 188.8l-11.5-27.6-11.2 27.6h22.7zm253 102.5c0 27.9-30.4 23.3-49.3 23.3l-.1 23.3h-32.2l-20.4-23-21.3 23h-65.4l.1-69.3h66.5l20.5 22.8 21-22.8H279c15.6 0 27.9 5.4 27.9 22.7zm-112.7 11.8l-17.9-20.2h-41.7v12.5h36.3v14.1h-36.3v13.8h40.6l19-20.2zM241 276l-25.3 27.4 25.3 28.1V276zm48.3 15.3c0-6.1-4.6-8.4-10.2-8.4h-21.5v17.6h21.2c5.9 0 10.5-2.8 10.5-9.2z"],
- "cc-apple-pay": [576, 512, [], "f416", "M302.2 218.4c0 17.2-10.5 27.1-29 27.1h-24.3v-54.2h24.4c18.4 0 28.9 9.8 28.9 27.1zm47.5 62.6c0 8.3 7.2 13.7 18.5 13.7 14.4 0 25.2-9.1 25.2-21.9v-7.7l-23.5 1.5c-13.3.9-20.2 5.8-20.2 14.4zM576 79v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM127.8 197.2c8.4.7 16.8-4.2 22.1-10.4 5.2-6.4 8.6-15 7.7-23.7-7.4.3-16.6 4.9-21.9 11.3-4.8 5.5-8.9 14.4-7.9 22.8zm60.6 74.5c-.2-.2-19.6-7.6-19.8-30-.2-18.7 15.3-27.7 16-28.2-8.8-13-22.4-14.4-27.1-14.7-12.2-.7-22.6 6.9-28.4 6.9-5.9 0-14.7-6.6-24.3-6.4-12.5.2-24.2 7.3-30.5 18.6-13.1 22.6-3.4 56 9.3 74.4 6.2 9.1 13.7 19.1 23.5 18.7 9.3-.4 13-6 24.2-6 11.3 0 14.5 6 24.3 5.9 10.2-.2 16.5-9.1 22.8-18.2 6.9-10.4 9.8-20.4 10-21zm135.4-53.4c0-26.6-18.5-44.8-44.9-44.8h-51.2v136.4h21.2v-46.6h29.3c26.8 0 45.6-18.4 45.6-45zm90 23.7c0-19.7-15.8-32.4-40-32.4-22.5 0-39.1 12.9-39.7 30.5h19.1c1.6-8.4 9.4-13.9 20-13.9 13 0 20.2 6 20.2 17.2v7.5l-26.4 1.6c-24.6 1.5-37.9 11.6-37.9 29.1 0 17.7 13.7 29.4 33.4 29.4 13.3 0 25.6-6.7 31.2-17.4h.4V310h19.6v-68zM516 210.9h-21.5l-24.9 80.6h-.4l-24.9-80.6H422l35.9 99.3-1.9 6c-3.2 10.2-8.5 14.2-17.9 14.2-1.7 0-4.9-.2-6.2-.3v16.4c1.2.4 6.5.5 8.1.5 20.7 0 30.4-7.9 38.9-31.8L516 210.9z"],
- "cc-diners-club": [576, 512, [], "f24c", "M239.7 79.9c-96.9 0-175.8 78.6-175.8 175.8 0 96.9 78.9 175.8 175.8 175.8 97.2 0 175.8-78.9 175.8-175.8 0-97.2-78.6-175.8-175.8-175.8zm-39.9 279.6c-41.7-15.9-71.4-56.4-71.4-103.8s29.7-87.9 71.4-104.1v207.9zm79.8.3V151.6c41.7 16.2 71.4 56.7 71.4 104.1s-29.7 87.9-71.4 104.1zM528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM329.7 448h-90.3c-106.2 0-193.8-85.5-193.8-190.2C45.6 143.2 133.2 64 239.4 64h90.3c105 0 200.7 79.2 200.7 193.8 0 104.7-95.7 190.2-200.7 190.2z"],
- "cc-discover": [576, 512, [], "f1f2", "M83 212.1c0 7.9-3.2 15.5-8.9 20.7-4.9 4.4-11.6 6.4-21.9 6.4H48V185h4.2c10.3 0 16.7 1.7 21.9 6.6 5.7 5 8.9 12.6 8.9 20.5zM504.8 184h-4.9v24.9h4.7c10.3 0 15.8-4.4 15.8-12.8 0-7.9-5.5-12.1-15.6-12.1zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM428 253h45.3v-13.8H444V217h28.3v-13.8H444V185h29.3v-14H428v82zm-86.2-82l35 84.2h8.6l35.5-84.2h-17.5l-22.2 55.2-21.9-55.2h-17.5zm-83 41.6c0 24.6 19.9 44.6 44.6 44.6 24.6 0 44.6-19.9 44.6-44.6 0-24.6-19.9-44.6-44.6-44.6-24.6 0-44.6 19.9-44.6 44.6zm-68-.5c0 32.5 33.6 52.5 63.3 38.2v-19c-19.3 19.3-46.8 5.8-46.8-19.2 0-23.7 26.7-39.1 46.8-19v-19c-30.2-15-63.3 6.8-63.3 38zm-33.9 28.3c-7.6 0-13.8-3.7-17.5-10.8l-10.3 9.9c17.8 26.1 56.6 18.2 56.6-11.3 0-13.1-5.4-19-23.6-25.6-9.6-3.4-12.3-5.9-12.3-10.3 0-8.7 14.5-14.1 24.9-2.5l8.4-10.8c-19.1-17.1-49.7-8.9-49.7 14.3 0 11.3 5.2 17.2 20.2 22.7 25.7 9.1 14.7 24.4 3.3 24.4zm-57.4-28.3c0-24.1-18-41.1-44.1-41.1H32v82h23.4c30.9 0 44.1-22.4 44.1-40.9zm23.4-41.1h-16v82h16v-82zM544 288c-33.3 20.8-226.4 124.4-416 160h401c8.2 0 15-6.8 15-15V288zm0-35l-25.9-34.5c12.1-2.5 18.7-10.6 18.7-23.2 0-28.5-30.3-24.4-52.9-24.4v82h16v-32.8h2.2l22.2 32.8H544z"],
- "cc-jcb": [576, 512, [], "f24b", "M431.5 244.3V212c41.2 0 38.5.2 38.5.2 7.3 1.3 13.3 7.3 13.3 16 0 8.8-6 14.5-13.3 15.8-1.2.4-3.3.3-38.5.3zm42.8 20.2c-2.8-.7-3.3-.5-42.8-.5v35c39.6 0 40 .2 42.8-.5 7.5-1.5 13.5-8 13.5-17 0-8.7-6-15.5-13.5-17zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM182 192.3h-57c0 67.1 10.7 109.7-35.8 109.7-19.5 0-38.8-5.7-57.2-14.8v28c30 8.3 68 8.3 68 8.3 97.9 0 82-47.7 82-131.2zm178.5 4.5c-63.4-16-165-14.9-165 59.3 0 77.1 108.2 73.6 165 59.2V287C312.9 311.7 253 309 253 256s59.8-55.6 107.5-31.2v-28zM544 286.5c0-18.5-16.5-30.5-38-32v-.8c19.5-2.7 30.3-15.5 30.3-30.2 0-19-15.7-30-37-31 0 0 6.3-.3-120.3-.3v127.5h122.7c24.3.1 42.3-12.9 42.3-33.2z"],
- "cc-mastercard": [576, 512, [], "f1f1", "M482.9 410.3c0 6.8-4.6 11.7-11.2 11.7-6.8 0-11.2-5.2-11.2-11.7 0-6.5 4.4-11.7 11.2-11.7 6.6 0 11.2 5.2 11.2 11.7zm-310.8-11.7c-7.1 0-11.2 5.2-11.2 11.7 0 6.5 4.1 11.7 11.2 11.7 6.5 0 10.9-4.9 10.9-11.7-.1-6.5-4.4-11.7-10.9-11.7zm117.5-.3c-5.4 0-8.7 3.5-9.5 8.7h19.1c-.9-5.7-4.4-8.7-9.6-8.7zm107.8.3c-6.8 0-10.9 5.2-10.9 11.7 0 6.5 4.1 11.7 10.9 11.7 6.8 0 11.2-4.9 11.2-11.7 0-6.5-4.4-11.7-11.2-11.7zm105.9 26.1c0 .3.3.5.3 1.1 0 .3-.3.5-.3 1.1-.3.3-.3.5-.5.8-.3.3-.5.5-1.1.5-.3.3-.5.3-1.1.3-.3 0-.5 0-1.1-.3-.3 0-.5-.3-.8-.5-.3-.3-.5-.5-.5-.8-.3-.5-.3-.8-.3-1.1 0-.5 0-.8.3-1.1 0-.5.3-.8.5-1.1.3-.3.5-.3.8-.5.5-.3.8-.3 1.1-.3.5 0 .8 0 1.1.3.5.3.8.3 1.1.5s.2.6.5 1.1zm-2.2 1.4c.5 0 .5-.3.8-.3.3-.3.3-.5.3-.8 0-.3 0-.5-.3-.8-.3 0-.5-.3-1.1-.3h-1.6v3.5h.8V426h.3l1.1 1.4h.8l-1.1-1.3zM576 81v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V81c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM64 220.6c0 76.5 62.1 138.5 138.5 138.5 27.2 0 53.9-8.2 76.5-23.1-72.9-59.3-72.4-171.2 0-230.5-22.6-15-49.3-23.1-76.5-23.1-76.4-.1-138.5 62-138.5 138.2zm224 108.8c70.5-55 70.2-162.2 0-217.5-70.2 55.3-70.5 162.6 0 217.5zm-142.3 76.3c0-8.7-5.7-14.4-14.7-14.7-4.6 0-9.5 1.4-12.8 6.5-2.4-4.1-6.5-6.5-12.2-6.5-3.8 0-7.6 1.4-10.6 5.4V392h-8.2v36.7h8.2c0-18.9-2.5-30.2 9-30.2 10.2 0 8.2 10.2 8.2 30.2h7.9c0-18.3-2.5-30.2 9-30.2 10.2 0 8.2 10 8.2 30.2h8.2v-23zm44.9-13.7h-7.9v4.4c-2.7-3.3-6.5-5.4-11.7-5.4-10.3 0-18.2 8.2-18.2 19.3 0 11.2 7.9 19.3 18.2 19.3 5.2 0 9-1.9 11.7-5.4v4.6h7.9V392zm40.5 25.6c0-15-22.9-8.2-22.9-15.2 0-5.7 11.9-4.8 18.5-1.1l3.3-6.5c-9.4-6.1-30.2-6-30.2 8.2 0 14.3 22.9 8.3 22.9 15 0 6.3-13.5 5.8-20.7.8l-3.5 6.3c11.2 7.6 32.6 6 32.6-7.5zm35.4 9.3l-2.2-6.8c-3.8 2.1-12.2 4.4-12.2-4.1v-16.6h13.1V392h-13.1v-11.2h-8.2V392h-7.6v7.3h7.6V416c0 17.6 17.3 14.4 22.6 10.9zm13.3-13.4h27.5c0-16.2-7.4-22.6-17.4-22.6-10.6 0-18.2 7.9-18.2 19.3 0 20.5 22.6 23.9 33.8 14.2l-3.8-6c-7.8 6.4-19.6 5.8-21.9-4.9zm59.1-21.5c-4.6-2-11.6-1.8-15.2 4.4V392h-8.2v36.7h8.2V408c0-11.6 9.5-10.1 12.8-8.4l2.4-7.6zm10.6 18.3c0-11.4 11.6-15.1 20.7-8.4l3.8-6.5c-11.6-9.1-32.7-4.1-32.7 15 0 19.8 22.4 23.8 32.7 15l-3.8-6.5c-9.2 6.5-20.7 2.6-20.7-8.6zm66.7-18.3H408v4.4c-8.3-11-29.9-4.8-29.9 13.9 0 19.2 22.4 24.7 29.9 13.9v4.6h8.2V392zm33.7 0c-2.4-1.2-11-2.9-15.2 4.4V392h-7.9v36.7h7.9V408c0-11 9-10.3 12.8-8.4l2.4-7.6zm40.3-14.9h-7.9v19.3c-8.2-10.9-29.9-5.1-29.9 13.9 0 19.4 22.5 24.6 29.9 13.9v4.6h7.9v-51.7zm7.6-75.1v4.6h.8V302h1.9v-.8h-4.6v.8h1.9zm6.6 123.8c0-.5 0-1.1-.3-1.6-.3-.3-.5-.8-.8-1.1-.3-.3-.8-.5-1.1-.8-.5 0-1.1-.3-1.6-.3-.3 0-.8.3-1.4.3-.5.3-.8.5-1.1.8-.5.3-.8.8-.8 1.1-.3.5-.3 1.1-.3 1.6 0 .3 0 .8.3 1.4 0 .3.3.8.8 1.1.3.3.5.5 1.1.8.5.3 1.1.3 1.4.3.5 0 1.1 0 1.6-.3.3-.3.8-.5 1.1-.8.3-.3.5-.8.8-1.1.3-.6.3-1.1.3-1.4zm3.2-124.7h-1.4l-1.6 3.5-1.6-3.5h-1.4v5.4h.8v-4.1l1.6 3.5h1.1l1.4-3.5v4.1h1.1v-5.4zm4.4-80.5c0-76.2-62.1-138.3-138.5-138.3-27.2 0-53.9 8.2-76.5 23.1 72.1 59.3 73.2 171.5 0 230.5 22.6 15 49.5 23.1 76.5 23.1 76.4.1 138.5-61.9 138.5-138.4z"],
- "cc-paypal": [576, 512, [], "f1f4", "M186.3 258.2c0 12.2-9.7 21.5-22 21.5-9.2 0-16-5.2-16-15 0-12.2 9.5-22 21.7-22 9.3 0 16.3 5.7 16.3 15.5zM80.5 209.7h-4.7c-1.5 0-3 1-3.2 2.7l-4.3 26.7 8.2-.3c11 0 19.5-1.5 21.5-14.2 2.3-13.4-6.2-14.9-17.5-14.9zm284 0H360c-1.8 0-3 1-3.2 2.7l-4.2 26.7 8-.3c13 0 22-3 22-18-.1-10.6-9.6-11.1-18.1-11.1zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM128.3 215.4c0-21-16.2-28-34.7-28h-40c-2.5 0-5 2-5.2 4.7L32 294.2c-.3 2 1.2 4 3.2 4h19c2.7 0 5.2-2.9 5.5-5.7l4.5-26.6c1-7.2 13.2-4.7 18-4.7 28.6 0 46.1-17 46.1-45.8zm84.2 8.8h-19c-3.8 0-4 5.5-4.2 8.2-5.8-8.5-14.2-10-23.7-10-24.5 0-43.2 21.5-43.2 45.2 0 19.5 12.2 32.2 31.7 32.2 9 0 20.2-4.9 26.5-11.9-.5 1.5-1 4.7-1 6.2 0 2.3 1 4 3.2 4H200c2.7 0 5-2.9 5.5-5.7l10.2-64.3c.3-1.9-1.2-3.9-3.2-3.9zm40.5 97.9l63.7-92.6c.5-.5.5-1 .5-1.7 0-1.7-1.5-3.5-3.2-3.5h-19.2c-1.7 0-3.5 1-4.5 2.5l-26.5 39-11-37.5c-.8-2.2-3-4-5.5-4h-18.7c-1.7 0-3.2 1.8-3.2 3.5 0 1.2 19.5 56.8 21.2 62.1-2.7 3.8-20.5 28.6-20.5 31.6 0 1.8 1.5 3.2 3.2 3.2h19.2c1.8-.1 3.5-1.1 4.5-2.6zm159.3-106.7c0-21-16.2-28-34.7-28h-39.7c-2.7 0-5.2 2-5.5 4.7l-16.2 102c-.2 2 1.3 4 3.2 4h20.5c2 0 3.5-1.5 4-3.2l4.5-29c1-7.2 13.2-4.7 18-4.7 28.4 0 45.9-17 45.9-45.8zm84.2 8.8h-19c-3.8 0-4 5.5-4.3 8.2-5.5-8.5-14-10-23.7-10-24.5 0-43.2 21.5-43.2 45.2 0 19.5 12.2 32.2 31.7 32.2 9.3 0 20.5-4.9 26.5-11.9-.3 1.5-1 4.7-1 6.2 0 2.3 1 4 3.2 4H484c2.7 0 5-2.9 5.5-5.7l10.2-64.3c.3-1.9-1.2-3.9-3.2-3.9zm47.5-33.3c0-2-1.5-3.5-3.2-3.5h-18.5c-1.5 0-3 1.2-3.2 2.7l-16.2 104-.3.5c0 1.8 1.5 3.5 3.5 3.5h16.5c2.5 0 5-2.9 5.2-5.7L544 191.2v-.3zm-90 51.8c-12.2 0-21.7 9.7-21.7 22 0 9.7 7 15 16.2 15 12 0 21.7-9.2 21.7-21.5.1-9.8-6.9-15.5-16.2-15.5z"],
- "cc-stripe": [576, 512, [], "f1f5", "M396.9 256.5c0 19.1-8.8 33.4-21.9 33.4-8.3 0-13.3-3-16.8-6.7l-.2-52.8c3.7-4.1 8.8-7 17-7 12.9-.1 21.9 14.5 21.9 33.1zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM122.2 281.1c0-42.3-54.3-34.7-54.3-50.7 0-5.5 4.6-7.7 12.1-7.7 10.8 0 24.5 3.3 35.3 9.1v-33.4c-11.8-4.7-23.5-6.5-35.3-6.5-28.8 0-48 15-48 40.2 0 39.3 54 32.9 54 49.9 0 6.6-5.7 8.7-13.6 8.7-11.8 0-26.9-4.9-38.9-11.3v33.9c13.2 5.7 26.6 8.1 38.8 8.1 29.6-.2 49.9-14.7 49.9-40.3zm68.9-86.9h-27v-30.8l-34.7 7.4-.2 113.9c0 21 15.8 36.5 36.9 36.5 11.6 0 20.2-2.1 24.9-4.7v-28.9c-4.5 1.8-27 8.3-27-12.6v-50.5h27v-30.3zm73.8 0c-4.7-1.7-21.3-4.8-29.6 10.5l-2.2-10.5h-30.7v124.5h35.5v-84.4c8.4-11 22.6-8.9 27.1-7.4v-32.7zm44.2 0h-35.7v124.5h35.7V194.2zm0-47.3l-35.7 7.6v28.9l35.7-7.6v-28.9zm122.7 108.8c0-41.3-23.5-63.8-48.4-63.8-13.9 0-22.9 6.6-27.8 11.1l-1.8-8.8h-31.3V360l35.5-7.5.1-40.2c5.1 3.7 12.7 9 25.1 9 25.4-.1 48.6-20.5 48.6-65.6zm112.2 1.2c0-36.4-17.6-65.1-51.3-65.1-33.8 0-54.3 28.7-54.3 64.9 0 42.8 24.2 64.5 58.8 64.5 17 0 29.7-3.9 39.4-9.2v-28.6c-9.7 4.9-20.8 7.9-34.9 7.9-13.8 0-26-4.9-27.6-21.5h69.5c.1-2 .4-9.4.4-12.9zm-51.6-36.1c-8.9 0-18.7 6.7-18.7 22.7h36.7c0-16-9.3-22.7-18-22.7z"],
- "cc-visa": [576, 512, [], "f1f0", "M470.1 231.3s7.6 37.2 9.3 45H446c3.3-8.9 16-43.5 16-43.5-.2.3 3.3-9.1 5.3-14.9l2.8 13.4zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM152.5 331.2L215.7 176h-42.5l-39.3 106-4.3-21.5-14-71.4c-2.3-9.9-9.4-12.7-18.2-13.1H32.7l-.7 3.1c15.8 4 29.9 9.8 42.2 17.1l35.8 135h42.5zm94.4.2L272.1 176h-40.2l-25.1 155.4h40.1zm139.9-50.8c.2-17.7-10.6-31.2-33.7-42.3-14.1-7.1-22.7-11.9-22.7-19.2.2-6.6 7.3-13.4 23.1-13.4 13.1-.3 22.7 2.8 29.9 5.9l3.6 1.7 5.5-33.6c-7.9-3.1-20.5-6.6-36-6.6-39.7 0-67.6 21.2-67.8 51.4-.3 22.3 20 34.7 35.2 42.2 15.5 7.6 20.8 12.6 20.8 19.3-.2 10.4-12.6 15.2-24.1 15.2-16 0-24.6-2.5-37.7-8.3l-5.3-2.5-5.6 34.9c9.4 4.3 26.8 8.1 44.8 8.3 42.2.1 69.7-20.8 70-53zM528 331.4L495.6 176h-31.1c-9.6 0-16.9 2.8-21 12.9l-59.7 142.5H426s6.9-19.2 8.4-23.3H486c1.2 5.5 4.8 23.3 4.8 23.3H528z"],
- "centercode": [512, 512, [], "f380", "M329.2 268.6c-3.8 35.2-35.4 60.6-70.6 56.8-35.2-3.8-60.6-35.4-56.8-70.6 3.8-35.2 35.4-60.6 70.6-56.8 35.1 3.8 60.6 35.4 56.8 70.6zm-85.8 235.1C96.7 496-8.2 365.5 10.1 224.3c11.2-86.6 65.8-156.9 139.1-192 161-77.1 349.7 37.4 354.7 216.6 4.1 147-118.4 262.2-260.5 254.8zm179.9-180c27.9-118-160.5-205.9-237.2-234.2-57.5 56.3-69.1 188.6-33.8 344.4 68.8 15.8 169.1-26.4 271-110.2z"],
- "chrome": [496, 512, [], "f268", "M131.5 217.5L55.1 100.1c47.6-59.2 119-91.8 192-92.1 42.3-.3 85.5 10.5 124.8 33.2 43.4 25.2 76.4 61.4 97.4 103L264 133.4c-58.1-3.4-113.4 29.3-132.5 84.1zm32.9 38.5c0 46.2 37.4 83.6 83.6 83.6s83.6-37.4 83.6-83.6-37.4-83.6-83.6-83.6-83.6 37.3-83.6 83.6zm314.9-89.2L339.6 174c37.9 44.3 38.5 108.2 6.6 157.2L234.1 503.6c46.5 2.5 94.4-7.7 137.8-32.9 107.4-62 150.9-192 107.4-303.9zM133.7 303.6L40.4 120.1C14.9 159.1 0 205.9 0 256c0 124 90.8 226.7 209.5 244.9l63.7-124.8c-57.6 10.8-113.2-20.8-139.5-72.5z"],
- "cloudscale": [448, 512, [], "f383", "M318.1 154l-9.4 7.6c-22.5-19.3-51.5-33.6-83.3-33.6C153.8 128 96 188.8 96 260.3c0 6.6.4 13.1 1.4 19.4-2-56 41.8-97.4 92.6-97.4 24.2 0 46.2 9.4 62.6 24.7l-25.2 20.4c-8.3-.9-16.8 1.8-23.1 8.1-11.1 11-11.1 28.9 0 40 11.1 11 28.9 11 40 0 6.3-6.3 9-14.9 8.1-23.1l75.2-88.8c6.3-6.5-3.3-15.9-9.5-9.6zm-83.8 111.5c-5.6 5.5-14.6 5.5-20.2 0-5.6-5.6-5.6-14.6 0-20.2s14.6-5.6 20.2 0 5.6 14.7 0 20.2zM224 32C100.5 32 0 132.5 0 256s100.5 224 224 224 224-100.5 224-224S347.5 32 224 32zm0 384c-88.2 0-160-71.8-160-160S135.8 96 224 96s160 71.8 160 160-71.8 160-160 160z"],
- "cloudsmith": [332, 512, [], "f384", "M332.5 419.9c0 46.4-37.6 84.1-84 84.1s-84-37.7-84-84.1 37.6-84 84-84 84 37.6 84 84zm-84-243.9c46.4 0 80-37.6 80-84s-33.6-84-80-84-88 37.6-88 84-29.6 76-76 76-84 41.6-84 88 37.6 80 84 80 84-33.6 84-80 33.6-80 80-80z"],
- "cloudversify": [616, 512, [], "f385", "M148.6 304c8.2 68.5 67.4 115.5 146 111.3 51.2 43.3 136.8 45.8 186.4-5.6 69.2 1.1 118.5-44.6 131.5-99.5 14.8-62.5-18.2-132.5-92.1-155.1-33-88.1-131.4-101.5-186.5-85-57.3 17.3-84.3 53.2-99.3 109.7-7.8 2.7-26.5 8.9-45 24.1 11.7 0 15.2 8.9 15.2 19.5v20.4c0 10.7-8.7 19.5-19.5 19.5h-20.2c-10.7 0-19.5-6-19.5-16.7V240H98.8C95 240 88 244.3 88 251.9v40.4c0 6.4 5.3 11.8 11.7 11.8h48.9zm227.4 8c-10.7 46.3 21.7 72.4 55.3 86.8C324.1 432.6 259.7 348 296 288c-33.2 21.6-33.7 71.2-29.2 92.9-17.9-12.4-53.8-32.4-57.4-79.8-3-39.9 21.5-75.7 57-93.9C297 191.4 369.9 198.7 400 248c-14.1-48-53.8-70.1-101.8-74.8 30.9-30.7 64.4-50.3 114.2-43.7 69.8 9.3 133.2 82.8 67.7 150.5 35-16.3 48.7-54.4 47.5-76.9l10.5 19.6c11.8 22 15.2 47.6 9.4 72-9.2 39-40.6 68.8-79.7 76.5-32.1 6.3-83.1-5.1-91.8-59.2zM128 208H88.2c-8.9 0-16.2-7.3-16.2-16.2v-39.6c0-8.9 7.3-16.2 16.2-16.2H128c8.9 0 16.2 7.3 16.2 16.2v39.6c0 8.9-7.3 16.2-16.2 16.2zM10.1 168C4.5 168 0 163.5 0 157.9v-27.8c0-5.6 4.5-10.1 10.1-10.1h27.7c5.5 0 10.1 4.5 10.1 10.1v27.8c0 5.6-4.5 10.1-10.1 10.1H10.1zM168 142.7v-21.4c0-5.1 4.2-9.3 9.3-9.3h21.4c5.1 0 9.3 4.2 9.3 9.3v21.4c0 5.1-4.2 9.3-9.3 9.3h-21.4c-5.1 0-9.3-4.2-9.3-9.3zM56 235.5v25c0 6.3-5.1 11.5-11.4 11.5H19.4C13.1 272 8 266.8 8 260.5v-25c0-6.3 5.1-11.5 11.4-11.5h25.1c6.4 0 11.5 5.2 11.5 11.5z"],
- "codepen": [512, 512, [], "f1cb", "M502.285 159.704l-234-156c-7.987-4.915-16.511-4.96-24.571 0l-234 156C3.714 163.703 0 170.847 0 177.989v155.999c0 7.143 3.714 14.286 9.715 18.286l234 156.022c7.987 4.915 16.511 4.96 24.571 0l234-156.022c6-3.999 9.715-11.143 9.715-18.286V177.989c-.001-7.142-3.715-14.286-9.716-18.285zM278 63.131l172.286 114.858-76.857 51.429L278 165.703V63.131zm-44 0v102.572l-95.429 63.715-76.857-51.429L234 63.131zM44 219.132l55.143 36.857L44 292.846v-73.714zm190 229.715L61.714 333.989l76.857-51.429L234 346.275v102.572zm22-140.858l-77.715-52 77.715-52 77.715 52-77.715 52zm22 140.858V346.275l95.429-63.715 76.857 51.429L278 448.847zm190-156.001l-55.143-36.857L468 219.132v73.714z"],
- "codiepie": [472, 512, [], "f284", "M422.5 202.9c30.7 0 33.5 53.1-.3 53.1h-10.8v44.3h-26.6v-97.4h37.7zM472 352.6C429.9 444.5 350.4 504 248 504 111 504 0 393 0 256S111 8 248 8c97.4 0 172.8 53.7 218.2 138.4l-186 108.8L472 352.6zm-38.5 12.5l-60.3-30.7c-27.1 44.3-70.4 71.4-122.4 71.4-82.5 0-149.2-66.7-149.2-148.9 0-82.5 66.7-149.2 149.2-149.2 48.4 0 88.9 23.5 116.9 63.4l59.5-34.6c-40.7-62.6-104.7-100-179.2-100-121.2 0-219.5 98.3-219.5 219.5S126.8 475.5 248 475.5c78.6 0 146.5-42.1 185.5-110.4z"],
- "connectdevelop": [576, 512, [], "f20e", "M550.5 241l-50.089-86.786c1.071-2.142 1.875-4.553 1.875-7.232 0-8.036-6.696-14.733-14.732-15.001l-55.447-95.893c.536-1.607 1.071-3.214 1.071-4.821 0-8.571-6.964-15.268-15.268-15.268-4.821 0-8.839 2.143-11.786 5.625H299.518C296.839 18.143 292.821 16 288 16s-8.839 2.143-11.518 5.625H170.411C167.464 18.143 163.447 16 158.625 16c-8.303 0-15.268 6.696-15.268 15.268 0 1.607.536 3.482 1.072 4.821l-55.983 97.233c-5.356 2.41-9.107 7.5-9.107 13.661 0 .535.268 1.071.268 1.607l-53.304 92.143c-7.232 1.339-12.59 7.5-12.59 15 0 7.232 5.089 13.393 12.054 15l55.179 95.358c-.536 1.607-.804 2.946-.804 4.821 0 7.232 5.089 13.393 12.054 14.732l51.697 89.732c-.536 1.607-1.071 3.482-1.071 5.357 0 8.571 6.964 15.268 15.268 15.268 4.821 0 8.839-2.143 11.518-5.357h106.875C279.161 493.857 283.447 496 288 496s8.839-2.143 11.518-5.357h107.143c2.678 2.946 6.696 4.821 10.982 4.821 8.571 0 15.268-6.964 15.268-15.268 0-1.607-.267-2.946-.803-4.285l51.697-90.268c6.964-1.339 12.054-7.5 12.054-14.732 0-1.607-.268-3.214-.804-4.821l54.911-95.358c6.964-1.339 12.322-7.5 12.322-15-.002-7.232-5.092-13.393-11.788-14.732zM153.535 450.732l-43.66-75.803h43.66v75.803zm0-83.839h-43.66c-.268-1.071-.804-2.142-1.339-3.214l44.999-47.41v50.624zm0-62.411l-50.357 53.304c-1.339-.536-2.679-1.34-4.018-1.607L43.447 259.75c.535-1.339.535-2.679.535-4.018s0-2.41-.268-3.482l51.965-90c2.679-.268 5.357-1.072 7.768-2.679l50.089 51.965v92.946zm0-102.322l-45.803-47.41c1.339-2.143 2.143-4.821 2.143-7.767 0-.268-.268-.804-.268-1.072l43.928-15.804v72.053zm0-80.625l-43.66 15.804 43.66-75.536v59.732zm326.519 39.108l.804 1.339L445.5 329.125l-63.75-67.232 98.036-101.518.268.268zM291.75 355.107l11.518 11.786H280.5l11.25-11.786zm-.268-11.25l-83.303-85.446 79.553-84.375 83.036 87.589-79.286 82.232zm5.357 5.893l79.286-82.232 67.5 71.25-5.892 28.125H313.714l-16.875-17.143zM410.411 44.393c1.071.536 2.142 1.072 3.482 1.34l57.857 100.714v.536c0 2.946.803 5.624 2.143 7.767L376.393 256l-83.035-87.589L410.411 44.393zm-9.107-2.143L287.732 162.518l-57.054-60.268 166.339-60h4.287zm-123.483 0c2.678 2.678 6.16 4.285 10.179 4.285s7.5-1.607 10.179-4.285h75L224.786 95.821 173.893 42.25h103.928zm-116.249 5.625l1.071-2.142a33.834 33.834 0 0 0 2.679-.804l51.161 53.84-54.911 19.821V47.875zm0 79.286l60.803-21.964 59.732 63.214-79.553 84.107-40.982-42.053v-83.304zm0 92.678L198 257.607l-36.428 38.304v-76.072zm0 87.858l42.053-44.464 82.768 85.982-17.143 17.678H161.572v-59.196zm6.964 162.053c-1.607-1.607-3.482-2.678-5.893-3.482l-1.071-1.607v-89.732h99.91l-91.607 94.821h-1.339zm129.911 0c-2.679-2.41-6.428-4.285-10.447-4.285s-7.767 1.875-10.447 4.285h-96.429l91.607-94.821h38.304l91.607 94.821H298.447zm120-11.786l-4.286 7.5c-1.339.268-2.41.803-3.482 1.339l-89.196-91.875h114.376l-17.412 83.036zm12.856-22.232l12.858-60.803h21.964l-34.822 60.803zm34.822-68.839h-20.357l4.553-21.16 17.143 18.214c-.535.803-1.071 1.874-1.339 2.946zm66.161-107.411l-55.447 96.697c-1.339.535-2.679 1.071-4.018 1.874l-20.625-21.964 34.554-163.928 45.803 79.286c-.267 1.339-.803 2.678-.803 4.285 0 1.339.268 2.411.536 3.75z"],
- "contao": [512, 512, [], "f26d", "M45.4 305c14.4 67.1 26.4 129 68.2 175H34c-18.7 0-34-15.2-34-34V66c0-18.7 15.2-34 34-34h57.7C77.9 44.6 65.6 59.2 54.8 75.6c-45.4 70-27 146.8-9.4 229.4zM478 32h-90.2c21.4 21.4 39.2 49.5 52.7 84.1l-137.1 29.3c-14.9-29-37.8-53.3-82.6-43.9-24.6 5.3-41 19.3-48.3 34.6-8.8 18.7-13.2 39.8 8.2 140.3 21.1 100.2 33.7 117.7 49.5 131.2 12.9 11.1 33.4 17 58.3 11.7 44.5-9.4 55.7-40.7 57.4-73.2l137.4-29.6c3.2 71.5-18.7 125.2-57.4 163.6H478c18.7 0 34-15.2 34-34V66c0-18.8-15.2-34-34-34z"],
- "cpanel": [640, 512, [], "f388", "M52.9 213.7h40l-6.2 23.6c-1.9 6.5-7.4 10.9-14.3 10.9H53.8c-24.9 0-24.7 37.4 0 37.4h11.3c4.2 0 7.6 3.9 6.4 8.3L64.4 320H52c-33.5 0-59-31.4-50.3-65.2 7.3-27 28.3-41.1 51.2-41.1M73.1 320L108 189.9c1.8-6.4 7.2-10.9 14.3-10.9h37c24.1 0 45.4 16.4 51 41.2 6.6 29.1-14.5 65.3-51.7 65.3h-32l6.4-23.8c1.8-6.2 7.3-10.8 14.3-10.8h10.3c12.4 0 20.8-11.7 18.3-22.6-2.1-9.2-9.9-14.8-18.3-14.8h-19.8L112 309.2c-1.9 6.2-7.4 10.7-14.2 10.7l-24.7.1m220.6-69.4c.3-1 1.9-5.3-2.1-5.3h-57.5c-9.7 0-16.6-8.9-14.2-18.5l3.5-13.4h77.9c18.8 0 33.3 17.6 28.5 36.8l-14 51.8c-2.8 10.6-12.2 17.8-23.4 17.8l-57.5-.2c-42.9 0-38.5-63.8.7-63.8H284l-3.5 13.2c-1.9 6.2-7.4 10.8-14.2 10.8h-21.6c-5.3 0-5.3 7.9 0 7.9h34.9c4.6 0 5.1-3.9 5.5-5.3l8.6-31.8m103.1-36.9c34.4 0 59.3 32.3 50.3 65.4l-8.8 33.1c-1.2 4.9-5.7 7.8-10.3 7.8h-19.1c-4.5 0-7.6-4-6.4-8.3l10.6-40c3.3-11.6-5.6-23.4-18.1-23.4h-19.8l-17.2 64c-1.2 4.8-5.6 7.8-10.4 7.8h-18.9c-4.2 0-7.6-3.9-6.4-8.3l26.2-98h48.3M498 251.6l-8 30c-.9 3.3 1.5 6.7 5.1 6.7h73.3l-5.7 21c-1.9 6.2-7.4 10.7-14.2 10.7h-66.7c-20 0-33.3-19-28.3-36.7l10.8-40c4.8-17.6 20.7-29.6 38.6-29.6h47.3c19 0 33.2 17.7 28.3 36.8l-3.2 12c-2.9 11-12.7 17.6-23.2 17.6h-53.4l3.5-13c1.6-6.2 7.2-10.8 14.2-10.8H538c2 0 3.3-1 3.9-3l.7-2.6c.7-2.7-1.3-5.1-3.9-5.1h-32.9c-4.1 0-6.9 2.1-7.8 6zm70.2 68.4l35.6-133.1c1.2-4.7 5.5-7.9 10.4-7.9h18.9c4.5 0 7.7 4 6.5 8.3l-26.5 98.2c-5.1 20.7-24.2 34.5-44.9 34.5"],
- "creative-commons": [512, 512, [], "f25e", "M255.547 8C392.884 8 504 114.439 504 256.004 504 405.979 381.106 504 255.562 504 122.319 504 8 394.557 8 256.004 8 124.825 113.486 8 255.547 8zm.899 44.734c-120.341 0-203.727 100.568-203.727 203.278 0 106.515 88.984 202.394 203.727 202.394 101.528 0 202.821-79.442 202.821-202.387-.001-114.773-91.773-203.285-202.821-203.285zm-3.108 162.093l-33.225 17.275c-5.395-11.203-15.25-19.926-27.459-19.926-22.134 0-33.217 14.609-33.217 43.842 0 23.842 9.446 43.842 33.217 43.842 14.469 0 24.653-7.091 30.566-21.259l30.551 15.5c-12.813 23.899-36.887 38.975-65.101 38.975-43.162 0-73.959-27.272-73.959-77.052 0-49.541 32.706-77.059 72.634-77.059 30.714-.013 52.701 11.946 65.993 35.862zm143.044 0l-32.775 17.275c-5.517-11.482-15.324-19.926-27.9-19.926-22.142 0-33.225 14.609-33.225 43.842 0 23.906 9.502 43.842 33.225 43.842 14.454 0 24.645-7.091 30.543-21.259l31 15.5c-13.363 23.869-37.451 38.975-65.086 38.975-43.439 0-73.959-26.988-73.959-77.052 0-49.523 32.698-77.059 72.626-77.059 30.706-.013 52.569 11.946 65.551 35.862z"],
- "css3": [512, 512, [], "f13c", "M480 32l-64 368-223.3 80L0 400l19.6-94.8h82l-8 40.6L210 390.2l134.1-44.4 18.8-97.1H29.5l16-82h333.7l10.5-52.7H56.3l16.3-82H480z"],
- "css3-alt": [384, 512, [], "f38b", "M0 32l34.9 395.8L192 480l157.1-52.2L384 32H0zm313.1 80l-4.8 47.3L193 208.6l-.3.1h111.5l-12.8 146.6-98.2 28.7-98.8-29.2-6.4-73.9h48.9l3.2 38.3 52.6 13.3 54.7-15.4 3.7-61.6-166.3-.5v-.1l-.2.1-3.6-46.3L193.1 162l6.5-2.7H76.7L70.9 112h242.2z"],
- "cuttlefish": [440, 512, [], "f38c", "M344 305.5c-17.5 31.6-57.4 54.5-96 54.5-56.6 0-104-47.4-104-104s47.4-104 104-104c38.6 0 78.5 22.9 96 54.5 13.7-50.9 41.7-93.3 87-117.8C385.7 39.1 320.5 8 248 8 111 8 0 119 0 256s111 248 248 248c72.5 0 137.7-31.1 183-80.7-45.3-24.5-73.3-66.9-87-117.8z"],
- "d-and-d": [576, 512, [], "f38d", "M82.5 98.9c-.6-17.2 2-33.8 12.7-48.2.3 7.4 1.2 14.5 4.2 21.6 5.9-27.5 19.7-49.3 42.3-65.5-1.9 5.9-3.5 11.8-3 17.7 8.7-7.4 18.8-17.8 44.4-22.7 14.7-2.8 29.7-2 42.1 1 38.5 9.3 61 34.3 69.7 72.3 5.3 23.1.7 45-8.3 66.4-5.2 12.4-12 24.4-20.7 35.1-2-1.9-3.9-3.8-5.8-5.6-42.8-40.8-26.8-25.2-37.4-37.4-1.1-1.2-1-2.2-.1-3.6 8.3-13.5 11.8-28.2 10-44-1.1-9.8-4.3-18.9-11.3-26.2-14.5-15.3-39.2-15-53.5.6-11.4 12.5-14.1 27.4-10.9 43.6.2 1.3.4 2.7 0 3.9-3.4 13.7-4.6 27.6-2.5 41.6.1.5.1 1.1.1 1.6 0 .3-.1.5-.2 1.1-21.8-11-36-28.3-43.2-52.2-8.3 17.8-11.1 35.5-6.6 54.1-15.6-15.2-21.3-34.3-22-55.2zm469.6 123.2c-11.6-11.6-25-20.4-40.1-26.6-12.8-5.2-26-7.9-39.9-7.1-10 .6-19.6 3.1-29 6.4-2.5.9-5.1 1.6-7.7 2.2-4.9 1.2-7.3-3.1-4.7-6.8 3.2-4.6 3.4-4.2 15-12 .6-.4 1.2-.8 2.2-1.5h-2.5c-.6 0-1.2.2-1.9.3-19.3 3.3-30.7 15.5-48.9 29.6-10.4 8.1-13.8 3.8-12-.5 1.4-3.5 3.3-6.7 5.1-10 1-1.8 2.3-3.4 3.5-5.1-.2-.2-.5-.3-.7-.5-27 18.3-46.7 42.4-57.7 73.3.3.3.7.6 1 .9.3-.6.5-1.2.9-1.7 10.4-12.1 22.8-21.8 36.6-29.8 18.2-10.6 37.5-18.3 58.7-20.2 4.3-.4 8.7-.1 13.1-.1-1.8.7-3.5.9-5.3 1.1-18.5 2.4-35.5 9-51.5 18.5-30.2 17.9-54.5 42.2-75.1 70.4-.3.4-.4.9-.7 1.3 14.5 5.3 24 17.3 36.1 25.6.2-.1.3-.2.4-.4l1.2-2.7c12.2-26.9 27-52.3 46.7-74.5 16.7-18.8 38-25.3 62.5-20 5.9 1.3 11.4 4.4 17.2 6.8 2.3-1.4 5.1-3.2 8-4.7 8.4-4.3 17.4-7 26.7-9 14.7-3.1 29.5-4.9 44.5-1.3v-.5c-.5-.4-1.2-.8-1.7-1.4zM316.7 397.6c-39.4-33-22.8-19.5-42.7-35.6-.8.9 0-.2-1.9 3-11.2 19.1-25.5 35.3-44 47.6-10.3 6.8-21.5 11.8-34.1 11.8-21.6 0-38.2-9.5-49.4-27.8-12-19.5-13.3-40.7-8.2-62.6 7.8-33.8 30.1-55.2 38.6-64.3-18.7-6.2-33 1.7-46.4 13.9.8-13.9 4.3-26.2 11.8-37.3-24.3 10.6-45.9 25-64.8 43.9-.3-5.8 5.4-43.7 5.6-44.7.3-2.7-.6-5.3-3-7.4-24.2 24.7-44.5 51.8-56.1 84.6 7.4-5.9 14.9-11.4 23.6-16.2-8.3 22.3-19.6 52.8-7.8 101.1 4.6 19 11.9 36.8 24.1 52.3 2.9 3.7 6.3 6.9 9.5 10.3.2-.2.4-.3.6-.5-1.4-7-2.2-14.1-1.5-21.9 2.2 3.2 3.9 6 5.9 8.6 12.6 16 28.7 27.4 47.2 35.6 25 11.3 51.1 13.3 77.9 8.6 54.9-9.7 90.7-48.6 116-98.8 1-1.8.6-2.9-.9-4.2zm172-46.4c-9.5-3.1-22.2-4.2-28.7-2.9 9.9 4 14.1 6.6 18.8 12 12.6 14.4 10.4 34.7-5.4 45.6-11.7 8.1-24.9 10.5-38.9 9.1-1.2-.1-2.3-.4-3-.6 2.8-3.7 6-7 8.1-10.8 9.4-16.8 5.4-42.1-8.7-56.1-2.1-2.1-4.6-3.9-7-5.9-.3 1.3-.1 2.1.1 2.8 4.2 16.6-8.1 32.4-24.8 31.8-7.6-.3-13.9-3.8-19.6-8.5-19.5-16.1-39.1-32.1-58.5-48.3-5.9-4.9-12.5-8.1-20.1-8.7-4.6-.4-9.3-.6-13.9-.9-5.9-.4-8.8-2.8-10.4-8.4-.9-3.4-1.5-6.8-2.2-10.2-1.5-8.1-6.2-13-14.3-14.2-4.4-.7-8.9-1-13.3-1.5-13-1.4-19.8-7.4-22.6-20.3-5 11-1.6 22.4 7.3 29.9 4.5 3.8 9.3 7.3 13.8 11.2 4.6 3.8 7.4 8.7 7.9 14.8.4 4.7.8 9.5 1.8 14.1 2.2 10.6 8.9 18.4 17 25.1 16.5 13.7 33 27.3 49.5 41.1 17.9 15 13.9 32.8 13 56-.9 22.9 12.2 42.9 33.5 51.2 1 .4 2 .6 3.6 1.1-15.7-18.2-10.1-44.1.7-52.3.3 2.2.4 4.3.9 6.4 9.4 44.1 45.4 64.2 85 56.9 16-2.9 30.6-8.9 42.9-19.8 2-1.8 3.7-4.1 5.9-6.5-19.3 4.6-35.8.1-50.9-10.6.7-.3 1.3-.3 1.9-.3 21.3 1.8 40.6-3.4 57-17.4 19.5-16.6 26.6-42.9 17.4-66-8.3-20.1-23.6-32.3-43.8-38.9zM99.4 179.3c-5.3-9.2-13.2-15.6-22.1-21.3 13.7-.5 26.6.2 39.6 3.7-7-12.2-8.5-24.7-5-38.7 5.3 11.9 13.7 20.1 23.6 26.8 19.7 13.2 35.7 19.6 46.7 30.2 3.4 3.3 6.3 7.1 9.6 10.9-.8-2.1-1.4-4.1-2.2-6-5-10.6-13-18.6-22.6-25-1.8-1.2-2.8-2.5-3.4-4.5-3.3-12.5-3-25.1-.7-37.6 1-5.5 2.8-10.9 4.5-16.3.8-2.4 2.3-4.6 4-6.6.6 6.9 0 25.5 19.6 46 10.8 11.3 22.4 21.9 33.9 32.7 9 8.5 18.3 16.7 25.5 26.8 1.1 1.6 2.2 3.3 3.8 4.7-5-13-14.2-24.1-24.2-33.8-9.6-9.3-19.4-18.4-29.2-27.4-3.3-3-4.6-6.7-5.1-10.9-1.2-10.4 0-20.6 4.3-30.2.5-1 1.1-2 1.9-3.3.5 4.2.6 7.9 1.4 11.6 4.8 23.1 20.4 36.3 49.3 63.5 10 9.4 19.3 19.2 25.6 31.6 4.8 9.3 7.3 19 5.7 29.6-.1.6.5 1.7 1.1 2 6.2 2.6 10 6.9 9.7 14.3 7.7-2.6 12.5-8 16.4-14.5 4.2 20.2-9.1 50.3-27.2 58.7.4-4.5 5-23.4-16.5-27.7-6.8-1.3-12.8-1.3-22.9-2.1 4.7-9 10.4-20.6.5-22.4-24.9-4.6-52.8 1.9-57.8 4.6 8.2.4 16.3 1 23.5 3.3-2 6.5-4 12.7-5.8 18.9-1.9 6.5 2.1 14.6 9.3 9.6 1.2-.9 2.3-1.9 3.3-2.7-3.1 17.9-2.9 15.9-2.8 18.3.3 10.2 9.5 7.8 15.7 7.3-2.5 11.8-29.5 27.3-45.4 25.8 7-4.7 12.7-10.3 15.9-17.9-6.5.8-12.9 1.6-19.2 2.4l-.3-.9c4.7-3.4 8-7.8 10.2-13.1 8.7-21.1-3.6-38-25-39.9-9.1-.8-17.8.8-25.9 5.5 6.2-15.6 17.2-26.6 32.6-34.5-15.2-4.3-8.9-2.7-24.6-6.3 14.6-9.3 30.2-13.2 46.5-14.6-5.2-3.2-48.1-3.6-70.2 20.9 7.9 1.4 15.5 2.8 23.2 4.2-23.8 7-44 19.7-62.4 35.6 1.1-4.8 2.7-9.5 3.3-14.3.6-4.5.8-9.2.1-13.6-1.5-9.4-8.9-15.1-19.7-16.3-7.9-.9-15.6.1-23.3 1.3-.9.1-1.7.3-2.9 0 15.8-14.8 36-21.7 53.1-33.5 6-4.5 6.8-8.2 3-14.9zm128.4 26.8c3.3 16 12.6 25.5 23.8 24.3-4.6-11.3-12.1-19.5-23.8-24.3z"],
- "dashcube": [384, 512, [], "f210", "M288.1 97.5H85.5C37.6 97.5 0 138.1 0 185.2v215.1C0 447.7 37.6 480 85.5 480h213c47.9 0 85.5-32.3 85.5-79.7V0l-95.9 97.5zm-161.9 293c-16.6 0-30.4-14.2-30.4-30.8v-134c0-16.6 13.8-30.5 30.4-30.5h131.9c16.6 0 30 13.9 30 30.5v115.7l47.9 49H126.2z"],
- "delicious": [448, 512, [], "f1a5", "M446.5 68c-.4-1.5-.9-3-1.4-4.5-.9-2.5-2-4.8-3.3-7.1-1.4-2.4-3-4.8-4.7-6.9-2.1-2.5-4.4-4.8-6.9-6.8-1.1-.9-2.2-1.7-3.3-2.5-1.3-.9-2.6-1.7-4-2.4-1.8-1-3.6-1.8-5.5-2.5-1.7-.7-3.5-1.3-5.4-1.7-3.8-1-7.9-1.5-12-1.5H48C21.5 32 0 53.5 0 80v352c0 4.1.5 8.2 1.5 12 2 7.7 5.8 14.6 11 20.3 1 1.1 2.1 2.2 3.3 3.3 5.7 5.2 12.6 9 20.3 11 3.8 1 7.9 1.5 12 1.5h352c26.5 0 48-21.5 48-48V80c-.1-4.1-.6-8.2-1.6-12zM416 432c0 8.8-7.2 16-16 16H224V256H32V80c0-8.8 7.2-16 16-16h176v192h192v176z"],
- "deploydog": [512, 512, [], "f38e", "M382.2 136h51.7v239.6h-51.7v-20.7c-19.8 24.8-52.8 24.1-73.8 14.7-26.2-11.7-44.3-38.1-44.3-71.8 0-29.8 14.8-57.9 43.3-70.8 20.2-9.1 52.7-10.6 74.8 12.9V136zm-64.7 161.8c0 18.2 13.6 33.5 33.2 33.5 19.8 0 33.2-16.4 33.2-32.9 0-17.1-13.7-33.2-33.2-33.2-19.6 0-33.2 16.4-33.2 32.6zM188.5 136h51.7v239.6h-51.7v-20.7c-19.8 24.8-52.8 24.1-73.8 14.7-26.2-11.7-44.3-38.1-44.3-71.8 0-29.8 14.8-57.9 43.3-70.8 20.2-9.1 52.7-10.6 74.8 12.9V136zm-64.7 161.8c0 18.2 13.6 33.5 33.2 33.5 19.8 0 33.2-16.4 33.2-32.9 0-17.1-13.7-33.2-33.2-33.2-19.7 0-33.2 16.4-33.2 32.6zM448 96c17.5 0 32 14.4 32 32v256c0 17.5-14.4 32-32 32H64c-17.5 0-32-14.4-32-32V128c0-17.5 14.4-32 32-32h384m0-32H64C28.8 64 0 92.8 0 128v256c0 35.2 28.8 64 64 64h384c35.2 0 64-28.8 64-64V128c0-35.2-28.8-64-64-64z"],
- "deskpro": [480, 512, [], "f38f", "M205.9 512l31.1-38.4c12.3-.2 25.6-1.4 36.5-6.6 38.9-18.6 38.4-61.9 38.3-63.8-.1-5-.8-4.4-28.9-37.4H362c-.2 50.1-7.3 68.5-10.2 75.7-9.4 23.7-43.9 62.8-95.2 69.4-8.7 1.1-32.8 1.2-50.7 1.1zm200.4-167.7c38.6 0 58.5-13.6 73.7-30.9l-175.5-.3-17.4 31.3 119.2-.1zm-43.6-223.9v168.3h-73.5l-32.7 55.5H250c-52.3 0-58.1-56.5-58.3-58.9-1.2-13.2-21.3-11.6-20.1 1.8 1.4 15.8 8.8 40 26.4 57.1h-91c-25.5 0-110.8-26.8-107-114V16.9C0 .9 9.7.3 15 .1h82c.2 0 .3.1.5.1 4.3-.4 50.1-2.1 50.1 43.7 0 13.3 20.2 13.4 20.2 0 0-18.2-5.5-32.8-15.8-43.7h84.2c108.7-.4 126.5 79.4 126.5 120.2zm-132.5 56l64 29.3c13.3-45.5-42.2-71.7-64-29.3z"],
- "deviantart": [320, 512, [], "f1bd", "M320 93.2l-98.2 179.1 7.4 9.5H320v127.7H159.1l-13.5 9.2-43.7 84c-.3 0-8.6 8.6-9.2 9.2H0v-93.2l93.2-179.4-7.4-9.2H0V102.5h156l13.5-9.2 43.7-84c.3 0 8.6-8.6 9.2-9.2H320v93.1z"],
- "digg": [512, 512, [], "f1a6", "M81.7 172.3H0v174.4h132.7V96h-51v76.3zm0 133.4H50.9v-92.3h30.8v92.3zm297.2-133.4v174.4h81.8v28.5h-81.8V416H512V172.3H378.9zm81.8 133.4h-30.8v-92.3h30.8v92.3zm-235.6 41h82.1v28.5h-82.1V416h133.3V172.3H225.1v174.4zm51.2-133.3h30.8v92.3h-30.8v-92.3zM153.3 96h51.3v51h-51.3V96zm0 76.3h51.3v174.4h-51.3V172.3z"],
- "digital-ocean": [512, 512, [], "f391", "M256 504v-96.1c101.8 0 180.8-100.9 141.7-208-14.3-39.6-46.1-71.4-85.8-85.7-107.1-38.8-208.1 39.9-208.1 141.7H8C8 93.7 164.9-32.8 335 20.3c74.2 23.3 133.6 82.4 156.6 156.6C544.8 347.2 418.6 504 256 504zm.3-191.4h-95.6v95.6h95.6v-95.6zm-95.6 95.6H87v73.6h73.7v-73.6zM87 346.6H25.4v61.6H87v-61.6z"],
- "discord": [448, 512, [], "f392", "M297.216 243.2c0 15.616-11.52 28.416-26.112 28.416-14.336 0-26.112-12.8-26.112-28.416s11.52-28.416 26.112-28.416c14.592 0 26.112 12.8 26.112 28.416zm-119.552-28.416c-14.592 0-26.112 12.8-26.112 28.416s11.776 28.416 26.112 28.416c14.592 0 26.112-12.8 26.112-28.416.256-15.616-11.52-28.416-26.112-28.416zM448 52.736V512c-64.494-56.994-43.868-38.128-118.784-107.776l13.568 47.36H52.48C23.552 451.584 0 428.032 0 398.848V52.736C0 23.552 23.552 0 52.48 0h343.04C424.448 0 448 23.552 448 52.736zm-72.96 242.688c0-82.432-36.864-149.248-36.864-149.248-36.864-27.648-71.936-26.88-71.936-26.88l-3.584 4.096c43.52 13.312 63.744 32.512 63.744 32.512-60.811-33.329-132.244-33.335-191.232-7.424-9.472 4.352-15.104 7.424-15.104 7.424s21.248-20.224 67.328-33.536l-2.56-3.072s-35.072-.768-71.936 26.88c0 0-36.864 66.816-36.864 149.248 0 0 21.504 37.12 78.08 38.912 0 0 9.472-11.52 17.152-21.248-32.512-9.728-44.8-30.208-44.8-30.208 3.766 2.636 9.976 6.053 10.496 6.4 43.21 24.198 104.588 32.126 159.744 8.96 8.96-3.328 18.944-8.192 29.44-15.104 0 0-12.8 20.992-46.336 30.464 7.68 9.728 16.896 20.736 16.896 20.736 56.576-1.792 78.336-38.912 78.336-38.912z"],
- "discourse": [448, 512, [], "f393", "M225.9 32C103.3 32 0 130.5 0 252.1 0 256 .1 480 .1 480l225.8-.2c122.7 0 222.1-102.3 222.1-223.9C448 134.3 348.6 32 225.9 32zM224 384c-19.4 0-37.9-4.3-54.4-12.1L88.5 392l22.9-75c-9.8-18.1-15.4-38.9-15.4-61 0-70.7 57.3-128 128-128s128 57.3 128 128-57.3 128-128 128z"],
- "dochub": [416, 512, [], "f394", "M397.9 160H256V19.6L397.9 160zM304 192v130c0 66.8-36.5 100.1-113.3 100.1H96V84.8h94.7c12 0 23.1.8 33.1 2.5v-84C212.9 1.1 201.4 0 189.2 0H0v512h189.2C329.7 512 400 447.4 400 318.1V192h-96z"],
- "docker": [640, 512, [], "f395", "M349.9 236.3h-66.1v-59.4h66.1v59.4zm0-204.3h-66.1v60.7h66.1V32zm78.2 144.8H362v59.4h66.1v-59.4zm-156.3-72.1h-66.1v60.1h66.1v-60.1zm78.1 0h-66.1v60.1h66.1v-60.1zm276.8 100c-14.4-9.7-47.6-13.2-73.1-8.4-3.3-24-16.7-44.9-41.1-63.7l-14-9.3-9.3 14c-18.4 27.8-23.4 73.6-3.7 103.8-8.7 4.7-25.8 11.1-48.4 10.7H2.4c-8.7 50.8 5.8 116.8 44 162.1 37.1 43.9 92.7 66.2 165.4 66.2 157.4 0 273.9-72.5 328.4-204.2 21.4.4 67.6.1 91.3-45.2 1.5-2.5 6.6-13.2 8.5-17.1l-13.3-8.9zm-511.1-27.9h-66v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm-78.1-72.1h-66.1v60.1h66.1v-60.1z"],
- "draft2digital": [480, 512, [], "f396", "M369.9 425.4V371l47.1 27.2-47.1 27.2zM82.4 380.6c25.5-27.3 97.7-104.7 150.9-170 35.1-43.1 40.3-82.4 28.4-112.7-7.4-18.8-17.5-30.2-24.3-35.7 45.3 2.1 68 23.4 82.2 38.3 0 0 42.4 48.2 5.8 113.3-37 65.9-110.9 147.5-128.5 166.7H82.4zm51.8-219.2c0 12.4-10 22.4-22.4 22.4-12.4 0-22.4-10-22.4-22.4 0-12.4 10-22.4 22.4-22.4 12.4 0 22.4 10.1 22.4 22.4M336 315.9v64.7h-91.3c30.8-35 81.8-95.9 111.8-149.3 35.2-62.6 16.1-123.4-12.8-153.3-4.4-4.6-62.2-62.9-166-41.2-59.1 12.4-89.4 43.4-104.3 67.3-13.1 20.9-17 39.8-18.2 47.7-5.5 33 19.4 67.1 56.7 67.1 31.7 0 57.3-25.7 57.3-57.4 0-27.1-19.7-52.1-48-56.8 1.8-7.3 17.7-21.1 26.3-24.7 41.1-17.3 78 5.2 83.3 33.5 8.3 44.3-37.1 90.4-69.7 127.6C84.5 328.1 18.3 396.8 0 415.9l336-.1V480l144-81.9-144-82.2z"],
- "dribbble": [512, 512, [], "f17d", "M256 8C119.252 8 8 119.252 8 256s111.252 248 248 248 248-111.252 248-248S392.748 8 256 8zm163.97 114.366c29.503 36.046 47.369 81.957 47.835 131.955-6.984-1.477-77.018-15.682-147.502-6.818-5.752-14.041-11.181-26.393-18.617-41.614 78.321-31.977 113.818-77.482 118.284-83.523zM396.421 97.87c-3.81 5.427-35.697 48.286-111.021 76.519-34.712-63.776-73.185-116.168-79.04-124.008 67.176-16.193 137.966 1.27 190.061 47.489zm-230.48-33.25c5.585 7.659 43.438 60.116 78.537 122.509-99.087 26.313-186.36 25.934-195.834 25.809C62.38 147.205 106.678 92.573 165.941 64.62zM44.17 256.323c0-2.166.043-4.322.108-6.473 9.268.19 111.92 1.513 217.706-30.146 6.064 11.868 11.857 23.915 17.174 35.949-76.599 21.575-146.194 83.527-180.531 142.306C64.794 360.405 44.17 310.73 44.17 256.323zm81.807 167.113c22.127-45.233 82.178-103.622 167.579-132.756 29.74 77.283 42.039 142.053 45.189 160.638-68.112 29.013-150.015 21.053-212.768-27.882zm248.38 8.489c-2.171-12.886-13.446-74.897-41.152-151.033 66.38-10.626 124.7 6.768 131.947 9.055-9.442 58.941-43.273 109.844-90.795 141.978z"],
- "dribbble-square": [448, 512, [], "f397", "M90.2 228.2c8.9-42.4 37.4-77.7 75.7-95.7 3.6 4.9 28 38.8 50.7 79-64 17-120.3 16.8-126.4 16.7zM314.6 154c-33.6-29.8-79.3-41.1-122.6-30.6 3.8 5.1 28.6 38.9 51 80 48.6-18.3 69.1-45.9 71.6-49.4zM140.1 364c40.5 31.6 93.3 36.7 137.3 18-2-12-10-53.8-29.2-103.6-55.1 18.8-93.8 56.4-108.1 85.6zm98.8-108.2c-3.4-7.8-7.2-15.5-11.1-23.2C159.6 253 93.4 252.2 87.4 252c0 1.4-.1 2.8-.1 4.2 0 35.1 13.3 67.1 35.1 91.4 22.2-37.9 67.1-77.9 116.5-91.8zm34.9 16.3c17.9 49.1 25.1 89.1 26.5 97.4 30.7-20.7 52.5-53.6 58.6-91.6-4.6-1.5-42.3-12.7-85.1-5.8zm-20.3-48.4c4.8 9.8 8.3 17.8 12 26.8 45.5-5.7 90.7 3.4 95.2 4.4-.3-32.3-11.8-61.9-30.9-85.1-2.9 3.9-25.8 33.2-76.3 53.9zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-64 176c0-88.2-71.8-160-160-160S64 167.8 64 256s71.8 160 160 160 160-71.8 160-160z"],
- "dropbox": [528, 512, [], "f16b", "M264.4 116.3l-132 84.3 132 84.3-132 84.3L0 284.1l132.3-84.3L0 116.3 132.3 32l132.1 84.3zM131.6 395.7l132-84.3 132 84.3-132 84.3-132-84.3zm132.8-111.6l132-84.3-132-83.6L395.7 32 528 116.3l-132.3 84.3L528 284.8l-132.3 84.3-131.3-85z"],
- "drupal": [448, 512, [], "f1a9", "M319.5 114.7c-22.2-14-43.5-19.5-64.7-33.5-13-8.8-31.3-30-46.5-48.3-2.7 29.3-11.5 41.2-22 49.5-21.3 17-34.8 22.2-53.5 32.3C117 123 32 181.5 32 290.5 32 399.7 123.8 480 225.8 480 327.5 480 416 406 416 294c0-112.3-83-171-96.5-179.3zm2.5 325.6c-20.1 20.1-90.1 28.7-116.7 4.2-4.8-4.8.3-12 6.5-12 0 0 17 13.3 51.5 13.3 27 0 46-7.7 54.5-14 6.1-4.6 8.4 4.3 4.2 8.5zm-54.5-52.6c8.7-3.6 29-3.8 36.8 1.3 4.1 2.8 16.1 18.8 6.2 23.7-8.4 4.2-1.2-15.7-26.5-15.7-14.7 0-19.5 5.2-26.7 11-7 6-9.8 8-12.2 4.7-6-8.2 15.9-22.3 22.4-25zM360 405c-15.2-1-45.5-48.8-65-49.5-30.9-.9-104.1 80.7-161.3 42-38.8-26.6-14.6-104.8 51.8-105.2 49.5-.5 83.8 49 108.5 48.5 21.3-.3 61.8-41.8 81.8-41.8 48.7 0 23.3 109.3-15.8 106z"],
- "dyalog": [416, 512, [], "f399", "M0 32v119.2h64V96h107.2C284.6 96 352 176.2 352 255.9 352 332 293.4 416 171.2 416H0v64h171.2C331.9 480 416 367.3 416 255.9c0-58.7-22.1-113.4-62.3-154.3C308.9 56 245.7 32 171.2 32H0z"],
- "earlybirds": [480, 512, [], "f39a", "M313.2 47.5c1.2-13 21.3-14 36.6-8.7.9.3 26.2 9.7 19 15.2-27.9-7.4-56.4 18.2-55.6-6.5zm-201 6.9c30.7-8.1 62 20 61.1-7.1-1.3-14.2-23.4-15.3-40.2-9.6-1 .3-28.7 10.5-20.9 16.7zM319.4 160c-8.8 0-16 7.2-16 16s7.2 16 16 16 16-7.2 16-16-7.2-16-16-16zm-159.7 0c-8.8 0-16 7.2-16 16s7.2 16 16 16 16-7.2 16-16-7.2-16-16-16zm318.5 163.2c-9.9 24-40.7 11-63.9-1.2-13.5 69.1-58.1 111.4-126.3 124.2.3.9-2-.1 24 1 33.6 1.4 63.8-3.1 97.4-8-19.8-13.8-11.4-37.1-9.8-38.1 1.4-.9 14.7 1.7 21.6 11.5 8.6-12.5 28.4-14.8 30.2-13.6 1.6 1.1 6.6 20.9-6.9 34.6 4.7-.9 8.2-1.6 9.8-2.1 2.6-.8 17.7 11.3 3.1 13.3-14.3 2.3-22.6 5.1-47.1 10.8-45.9 10.7-85.9 11.8-117.7 12.8l1 11.6c3.8 18.1-23.4 24.3-27.6 6.2.8 17.9-27.1 21.8-28.4-1l-.5 5.3c-.7 18.4-28.4 17.9-28.3-.6-7.5 13.5-28.1 6.8-26.4-8.5l1.2-12.4c-36.7.9-59.7 3.1-61.8 3.1-20.9 0-20.9-31.6 0-31.6 2.4 0 27.7 1.3 63.2 2.8-61.1-15.5-103.7-55-114.9-118.2-25 12.8-57.5 26.8-68.2.8-10.5-25.4 21.5-42.6 66.8-73.4.7-6.6 1.6-13.3 2.7-19.8-14.4-19.6-11.6-36.3-16.1-60.4-16.8 2.4-23.2-9.1-23.6-23.1.3-7.3 2.1-14.9 2.4-15.4 1.1-1.8 10.1-2 12.7-2.6 6-31.7 50.6-33.2 90.9-34.5 19.7-21.8 45.2-41.5 80.9-48.3C203.3 29 215.2 8.5 216.2 8c1.7-.8 21.2 4.3 26.3 23.2 5.2-8.8 18.3-11.4 19.6-10.7 1.1.6 6.4 15-4.9 25.9 40.3 3.5 72.2 24.7 96 50.7 36.1 1.5 71.8 5.9 77.1 34 2.7.6 11.6.8 12.7 2.6.3.5 2.1 8.1 2.4 15.4-.5 13.9-6.8 25.4-23.6 23.1-3.2 17.3-2.7 32.9-8.7 47.7 2.4 11.7 4 23.8 4.8 36.4 37 25.4 70.3 42.5 60.3 66.9zM207.4 159.9c.9-44-37.9-42.2-78.6-40.3-21.7 1-38.9 1.9-45.5 13.9-11.4 20.9 5.9 92.9 23.2 101.2 9.8 4.7 73.4 7.9 86.3-7.1 8.2-9.4 15-49.4 14.6-67.7zm52 58.3c-4.3-12.4-6-30.1-15.3-32.7-2-.5-9-.5-11 0-10 2.8-10.8 22.1-17 37.2 15.4 0 19.3 9.7 23.7 9.7 4.3 0 6.3-11.3 19.6-14.2zm135.7-84.7c-6.6-12.1-24.8-12.9-46.5-13.9-40.2-1.9-78.2-3.8-77.3 40.3-.5 18.3 5 58.3 13.2 67.8 13 14.9 76.6 11.8 86.3 7.1 15.8-7.6 36.5-78.9 24.3-101.3z"],
- "edge": [512, 512, [], "f282", "M25.714 228.163c.111-.162.23-.323.342-.485-.021.162-.045.323-.065.485h-.277zm460.572 15.508c0-44.032-7.754-84.465-28.801-122.405C416.498 47.879 343.912 8.001 258.893 8.001 118.962 7.724 40.617 113.214 26.056 227.679c42.429-61.312 117.073-121.376 220.375-124.966 0 0 109.666 0 99.419 104.957H169.997c6.369-37.386 18.554-58.986 34.339-78.926-75.048 34.893-121.85 96.096-120.742 188.315.83 71.448 50.124 144.836 120.743 171.976 83.357 31.847 192.776 7.2 240.132-21.324V363.307c-80.864 56.494-270.871 60.925-272.255-67.572h314.073v-52.064z"],
- "ember": [640, 512, [], "f423", "M639.9 311.7c-1.1-10.7-10.7-6.8-10.7-6.8s-15.6 12.1-29.3 10.7c-13.7-1.3-9.4-32-9.4-32s3-28.1-5.1-30.4c-8.1-2.4-18 7.3-18 7.3s-12.4 13.7-18.3 31.2l-1.6.5s1.9-30.6-.3-37.6c-1.6-3.5-16.4-3.2-18.8 3-2.4 6.2-14.2 49.2-15 67.2 0 0-23.1 19.6-43.3 22.8-20.2 3.2-25-9.4-25-9.4s54.8-15.3 52.9-59.1c-1.9-43.8-44.2-27.6-49-24-4.6 3.5-29.4 18.4-36.6 59.7-.2 1.4-.7 7.5-.7 7.5s-21.2 14.2-33 18c0 0 33-55.6-7.3-80.9-18.3-11-32.8 12.1-32.8 12.1s54.5-60.7 42.5-112c-5.8-24.4-18-27.1-29.2-23.1-17 6.7-23.5 16.7-23.5 16.7s-22 32-27.1 79.5-12.6 105.1-12.6 105.1-10.5 10.2-20.2 10.7-5.4-28.7-5.4-28.7 7.5-44.6 7-52.1-1.1-11.6-9.9-14.2c-8.9-2.7-18.5 8.6-18.5 8.6s-25.5 38.7-27.7 44.6l-1.3 2.4-1.3-1.6s18-52.7.8-53.5-28.5 18.8-28.5 18.8-19.6 32.8-20.4 36.5l-1.3-1.6s8.1-38.2 6.4-47.6c-1.6-9.4-10.5-7.5-10.5-7.5s-11.3-1.3-14.2 5.9c-3 7.3-13.7 55.3-15 70.7 0 0-28.2 20.2-46.8 20.4s-16.7-11.8-16.7-11.8 68-23.3 49.4-69.2c-8.3-11.8-18-15.5-31.7-15.3-13.7.3-30.3 8.6-41.3 33.3-5.3 11.8-6.8 23-7.8 31.5 0 0-12.3 2.4-18.8-2.9-6.4-5.4-10 0-10 0s-11.2 13.9-.1 18.2c11 4.3 28.1 6.1 28.1 6.1 1.6 7.5 6.2 19.5 19.6 29.7 20.2 15.3 58.8-1.3 58.8-1.3l15.9-8.8s.5 14.6 12.1 16.7c11.6 2.1 16.4 1 36.5-47.9 11.8-25 12.6-23.6 12.6-23.6l1.3-.3s-9.1 46.8-5.6 59.7c3.5 12.9 18.8 11.6 18.8 11.6s8.3 2.4 15-21.2c6.7-23.6 19.6-49.9 19.6-49.9h1.6s-5.6 48.1 3 63.7c8.6 15.6 30.9 5.3 30.9 5.3s15.6-7.8 18-10.2c0 0 18.5 15.8 44.6 12.9 58.3-11.5 79.1-25.9 79.1-25.9s10 24.4 41.1 26.7c35.5 2.7 54.8-18.6 54.8-18.6s-.3 13.5 12.1 18.6c12.4 5.1 20.7-22.8 20.7-22.8l20.7-57.2h1.9s1.1 37.3 21.5 43.2c20.4 5.9 47-13.7 47-13.7s6.4-3.7 5.3-14.4zm-578 5.3c.8-32 21.8-45.9 29-39 7.3 7 4.6 22-9.1 31.4-13.7 9.5-19.9 7.6-19.9 7.6zm272.8-123.9s19.1-49.7 23.6-25.5-40 96.2-40 96.2c.5-16.1 16.4-70.7 16.4-70.7zm22.8 138.4c-12.6 33-43.3 19.6-43.3 19.6s-3.5-11.8 6.4-44.9 33.3-20.2 33.3-20.2 16.2 12.5 3.6 45.5zm84.6-14.5s-3-10.5 8.1-30.6c11-20.2 19.6-9.1 19.6-9.1s9.4 10.2-1.3 25.5c-10.8 15.3-26.4 14.2-26.4 14.2z"],
- "empire": [496, 512, [], "f1d1", "M287.6 54.2c-10.8-2.2-22.1-3.3-33.5-3.6V32.4c78.1 2.2 146.1 44 184.6 106.6l-15.8 9.1c-6.1-9.7-12.7-18.8-20.2-27.1l-18 15.5c-26-29.6-61.4-50.7-101.9-58.4l4.8-23.9zM53.4 322.4l23-7.7c-6.4-18.3-10-38.2-10-58.7s3.3-40.4 9.7-58.7l-22.7-7.7c3.6-10.8 8.3-21.3 13.6-31l-15.8-9.1C34 181 24.1 217.5 24.1 256s10 75 27.1 106.6l15.8-9.1c-5.3-10-9.7-20.3-13.6-31.1zM213.1 434c-40.4-8-75.8-29.1-101.9-58.7l-18 15.8c-7.5-8.6-14.4-17.7-20.2-27.4l-16 9.4c38.5 62.3 106.8 104.3 184.9 106.6v-18.3c-11.3-.3-22.7-1.7-33.5-3.6l4.7-23.8zM93.3 120.9l18 15.5c26-29.6 61.4-50.7 101.9-58.4l-4.7-23.8c10.8-2.2 22.1-3.3 33.5-3.6V32.4C163.9 34.6 95.9 76.4 57.4 139l15.8 9.1c6-9.7 12.6-18.9 20.1-27.2zm309.4 270.2l-18-15.8c-26 29.6-61.4 50.7-101.9 58.7l4.7 23.8c-10.8 1.9-22.1 3.3-33.5 3.6v18.3c78.1-2.2 146.4-44.3 184.9-106.6l-16.1-9.4c-5.7 9.7-12.6 18.8-20.1 27.4zM496 256c0 137-111 248-248 248S0 393 0 256 111 8 248 8s248 111 248 248zm-12.2 0c0-130.1-105.7-235.8-235.8-235.8S12.2 125.9 12.2 256 117.9 491.8 248 491.8 483.8 386.1 483.8 256zm-39-106.6l-15.8 9.1c5.3 9.7 10 20.2 13.6 31l-22.7 7.7c6.4 18.3 9.7 38.2 9.7 58.7s-3.6 40.4-10 58.7l23 7.7c-3.9 10.8-8.3 21-13.6 31l15.8 9.1C462 331 471.9 294.5 471.9 256s-9.9-75-27.1-106.6zm-183 177.7c16.3-3.3 30.4-11.6 40.7-23.5l51.2 44.8c11.9-13.6 21.3-29.3 27.1-46.8l-64.2-22.1c2.5-7.5 3.9-15.2 3.9-23.5s-1.4-16.1-3.9-23.5l64.5-22.1c-6.1-17.4-15.5-33.2-27.4-46.8l-51.2 44.8c-10.2-11.9-24.4-20.5-40.7-23.8l13.3-66.4c-8.6-1.9-17.7-2.8-27.1-2.8-9.4 0-18.5.8-27.1 2.8l13.3 66.4c-16.3 3.3-30.4 11.9-40.7 23.8l-51.2-44.8c-11.9 13.6-21.3 29.3-27.4 46.8l64.5 22.1c-2.5 7.5-3.9 15.2-3.9 23.5s1.4 16.1 3.9 23.5l-64.2 22.1c5.8 17.4 15.2 33.2 27.1 46.8l51.2-44.8c10.2 11.9 24.4 20.2 40.7 23.5l-13.3 66.7c8.6 1.7 17.7 2.8 27.1 2.8 9.4 0 18.5-1.1 27.1-2.8l-13.3-66.7z"],
- "envira": [448, 512, [], "f299", "M0 32c477.6 0 366.6 317.3 367.1 366.3L448 480h-26l-70.4-71.2c-39 4.2-124.4 34.5-214.4-37C47 300.3 52 214.7 0 32zm79.7 46c-49.7-23.5-5.2 9.2-5.2 9.2 45.2 31.2 66 73.7 90.2 119.9 31.5 60.2 79 139.7 144.2 167.7 65 28 34.2 12.5 6-8.5-28.2-21.2-68.2-87-91-130.2-31.7-60-61-118.6-144.2-158.1z"],
- "erlang": [640, 512, [], "f39d", "M21.7 193c-.1 86.8 29 159.5 78.7 212.1H0V.1h87.2C45.7 50.3 21.6 116.2 21.7 193zM640 .1h-83.6c31.4 42.7 48.7 97.5 46.2 162.7.5 6 .5 11.7 0 24.1H230.2c-.2 109.7 38.9 194.9 138.6 195.3 68.5-.3 118-51 151.9-106.1l96.4 48.2c-17.4 30.9-36.5 57.8-57.9 80.8H640V.1zm-80.8 405h-.2.2zM556.1.1h.3l-.1-.1-.2.1zM325.4 9.8c-45.9.1-85.1 33.5-89.2 83.2h169.9C405 43.3 371.6 9.9 325.4 9.8z"],
- "ethereum": [320, 512, [], "f42e", "M311.9 260.8L160 353.6 8 260.8 160 0l151.9 260.8zM160 383.4L8 290.6 160 512l152-221.4-152 92.8z"],
- "etsy": [384, 512, [], "f2d7", "M384 348c-1.75 10.75-13.75 110-15.5 132-117.879-4.299-219.895-4.743-368.5 0v-25.5c45.457-8.948 60.627-8.019 61-35.25 1.793-72.322 3.524-244.143 0-322-1.029-28.46-12.13-26.765-61-36v-25.5c73.886 2.358 255.933 8.551 362.999-3.75-3.5 38.25-7.75 126.5-7.75 126.5H332C320.947 115.665 313.241 68 277.25 68h-137c-10.25 0-10.75 3.5-10.75 9.75V241.5c58 .5 88.5-2.5 88.5-2.5 29.77-.951 27.56-8.502 40.75-65.251h25.75c-4.407 101.351-3.91 61.829-1.75 160.25H257c-9.155-40.086-9.065-61.045-39.501-61.5 0 0-21.5-2-88-2v139c0 26 14.25 38.25 44.25 38.25H263c63.636 0 66.564-24.996 98.751-99.75H384z"],
- "expeditedssl": [496, 512, [], "f23e", "M248 43.4C130.6 43.4 35.4 138.6 35.4 256S130.6 468.6 248 468.6 460.6 373.4 460.6 256 365.4 43.4 248 43.4zm-97.4 132.9c0-53.7 43.7-97.4 97.4-97.4s97.4 43.7 97.4 97.4v26.6c0 5-3.9 8.9-8.9 8.9h-17.7c-5 0-8.9-3.9-8.9-8.9v-26.6c0-82.1-124-82.1-124 0v26.6c0 5-3.9 8.9-8.9 8.9h-17.7c-5 0-8.9-3.9-8.9-8.9v-26.6zM389.7 380c0 9.7-8 17.7-17.7 17.7H124c-9.7 0-17.7-8-17.7-17.7V238.3c0-9.7 8-17.7 17.7-17.7h248c9.7 0 17.7 8 17.7 17.7V380zm-248-137.3v132.9c0 2.5-1.9 4.4-4.4 4.4h-8.9c-2.5 0-4.4-1.9-4.4-4.4V242.7c0-2.5 1.9-4.4 4.4-4.4h8.9c2.5 0 4.4 1.9 4.4 4.4zm141.7 48.7c0 13-7.2 24.4-17.7 30.4v31.6c0 5-3.9 8.9-8.9 8.9h-17.7c-5 0-8.9-3.9-8.9-8.9v-31.6c-10.5-6.1-17.7-17.4-17.7-30.4 0-19.7 15.8-35.4 35.4-35.4s35.5 15.8 35.5 35.4zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 478.3C121 486.3 17.7 383 17.7 256S121 25.7 248 25.7 478.3 129 478.3 256 375 486.3 248 486.3z"],
- "facebook": [448, 512, [], "f09a", "M448 56.7v398.5c0 13.7-11.1 24.7-24.7 24.7H309.1V306.5h58.2l8.7-67.6h-67v-43.2c0-19.6 5.4-32.9 33.5-32.9h35.8v-60.5c-6.2-.8-27.4-2.7-52.2-2.7-51.6 0-87 31.5-87 89.4v49.9h-58.4v67.6h58.4V480H24.7C11.1 480 0 468.9 0 455.3V56.7C0 43.1 11.1 32 24.7 32h398.5c13.7 0 24.8 11.1 24.8 24.7z"],
- "facebook-f": [264, 512, [], "f39e", "M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"],
- "facebook-messenger": [448, 512, [], "f39f", "M224 32C15.9 32-77.5 278 84.6 400.6V480l75.7-42c142.2 39.8 285.4-59.9 285.4-198.7C445.8 124.8 346.5 32 224 32zm23.4 278.1L190 250.5 79.6 311.6l121.1-128.5 57.4 59.6 110.4-61.1-121.1 128.5z"],
- "facebook-square": [448, 512, [], "f082", "M448 80v352c0 26.5-21.5 48-48 48h-85.3V302.8h60.6l8.7-67.6h-69.3V192c0-19.6 5.4-32.9 33.5-32.9H384V98.7c-6.2-.8-27.4-2.7-52.2-2.7-51.6 0-87 31.5-87 89.4v49.9H184v67.6h60.9V480H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48z"],
- "firefox": [480, 512, [], "f269", "M478.1 235.3c-.7-4.5-1.4-7.1-1.4-7.1s-1.8 2-4.7 5.9c-.9-10.7-2.8-21.2-5.8-31.6-3.7-12.9-8.5-25.4-14.5-37.4-3.8-8-8.2-15.6-13.3-22.8-1.8-2.7-3.7-5.4-5.6-7.9-8.8-14.4-19-23.3-30.7-40-7.6-12.8-12.9-26.9-15.4-41.6-3.2 8.9-5.7 18-7.4 27.3-12.1-12.2-22.5-20.8-28.9-26.7C319.4 24.2 323 9.1 323 9.1S264.7 74.2 289.9 142c8.7 23 23.8 43.1 43.4 57.9 24.4 20.2 50.8 36 64.7 76.6-11.2-21.3-28.1-39.2-48.8-51.5 6.2 14.7 9.4 30.6 9.3 46.5 0 61-49.6 110.5-110.6 110.4-8.3 0-16.5-.9-24.5-2.8-9.5-1.8-18.7-4.9-27.4-9.3-12.9-7.8-24-18.1-32.8-30.3l-.2-.3 2 .7c4.6 1.6 9.2 2.8 14 3.7 18.7 4 38.3 1.7 55.6-6.6 17.5-9.7 28-16.9 36.6-14h.2c8.4 2.7 15-5.5 9-14-10.4-13.4-27.4-20-44.2-17-17.5 2.5-33.5 15-56.4 2.9-1.5-.8-2.9-1.6-4.3-2.5-1.6-.9 4.9 1.3 3.4.3-5-2.5-9.8-5.4-14.4-8.6-.3-.3 3.5 1.1 3.1.8-5.9-4-11-9.2-15-15.2-4.1-7.4-4.5-16.4-1-24.1 2.1-3.8 5.4-6.9 9.3-8.7 3 1.5 4.8 2.6 4.8 2.6s-1.3-2.5-2.1-3.8c.3-.1.5 0 .8-.2 2.6 1.1 8.3 4 11.4 5.8 2.1 1.1 3.8 2.7 5.2 4.7 0 0 1-.5.3-2.7-1.1-2.7-2.9-5-5.4-6.6h.2c2.3 1.2 4.5 2.6 6.6 4.1 1.9-4.4 2.8-9.2 2.6-14 .2-2.6-.2-5.3-1.1-7.8-.8-1.6.5-2.2 1.9-.5-.2-1.3-.7-2.5-1.2-3.7v-.1s.8-1.1 1.2-1.5c1-1 2.1-1.9 3.4-2.7 7.2-4.5 14.8-8.4 22.7-11.6 6.4-2.8 11.7-4.9 12.8-5.6 1.6-1 3.1-2.2 4.5-3.5 5.3-4.5 9-10.8 10.2-17.7.1-.9.2-1.8.3-2.8v-1.5c-.9-3.5-6.9-6.1-38.4-9.1-11.1-1.8-20-10.1-22.5-21.1v.1c-.4 1.1-.9 2.3-1.3 3.5.4-1.2.8-2.3 1.3-3.5v-.2c6-15.7 16.8-29.1 30.8-38.3.8-.7-3.2.2-2.4-.5 2.7-1.3 5.4-2.5 8.2-3.5 1.4-.6-6-3.4-12.6-2.7-4 .2-8 1.2-11.7 2.8 1.6-1.3 6.2-3.1 5.1-3.1-8.4 1.6-16.5 4.7-23.9 9 0-.8.1-1.5.5-2.2-5.9 2.5-11 6.5-15 11.5.1-.9.2-1.8.2-2.7-2.7 2-5.2 4.3-7.3 6.9l-.1.1c-17.4-6.7-36.3-8.3-54.6-4.7l-.2-.1h.2c-3.8-3.1-7.1-6.7-9.7-10.9l-.2.1-.4-.2c-1.2-1.8-2.4-3.8-3.7-6-.9-1.6-1.8-3.4-2.7-5.2 0-.1-.1-.2-.2-.2-.4 0-.6 1.7-.9 1.3v-.1c-3.2-8.3-4.7-17.2-4.4-26.2l-.2.1c-5.1 3.5-9 8.6-11.1 14.5-.9 2.1-1.6 3.3-2.2 4.5v-.5c.1-1.1.6-3.3.5-3.1-.1.2-.2.3-.3.4-1.5 1.7-2.9 3.7-3.9 5.8-.9 1.9-1.7 3.9-2.3 5.9-.1.3 0-.3 0-1s.1-2 0-1.7l-.3.7c-6.7 14.9-10.9 30.8-12.4 47.1-.4 2.8-.6 5.6-.5 8.3v.2c-4.8 5.2-9 11-12.7 17.1-12.1 20.4-21.1 42.5-26.8 65.6 4-8.8 8.8-17.2 14.3-25.1C5.5 228.5 0 257.4 0 286.6c1.8-8.6 4.2-17 7-25.3-1.7 34.5 4.9 68.9 19.4 100.3 19.4 43.5 51.6 80 92.3 104.7 16.6 11.2 34.7 19.9 53.8 25.8 2.5.9 5.1 1.8 7.7 2.7-.8-.3-1.6-.7-2.4-1 22.6 6.8 46.2 10.3 69.8 10.3 83.7 0 111.3-31.9 113.8-35 4.1-3.7 7.5-8.2 9.9-13.3 1.6-.7 3.2-1.4 4.9-2.1l1-.5 1.9-.9c12.6-5.9 24.5-13.4 35.3-22.1 16.3-11.7 27.9-28.7 32.9-48.1 3-7.1 3.1-15 .4-22.2.9-1.4 1.7-2.8 2.7-4.3 18-28.9 28.2-61.9 29.6-95.9v-2.8c0-7.3-.6-14.5-1.9-21.6z"],
- "first-order": [448, 512, [], "f2b0", "M12.9 229.2c.1-.1.2-.3.3-.4 0 .1 0 .3-.1.4h-.2zM224 96.6c-7.1 0-14.6.6-21.4 1.7l3.7 67.4-22-64c-14.3 3.7-27.7 9.4-40 16.6l29.4 61.4-45.1-50.9c-11.4 8.9-21.7 19.1-30.6 30.9l50.6 45.4-61.1-29.7c-7.1 12.3-12.9 25.7-16.6 40l64.3 22.6-68-4c-.9 7.1-1.4 14.6-1.4 22s.6 14.6 1.4 21.7l67.7-4-64 22.6c3.7 14.3 9.4 27.7 16.6 40.3l61.1-29.7L97.7 352c8.9 11.7 19.1 22.3 30.9 30.9l44.9-50.9-29.5 61.4c12.3 7.4 25.7 13.1 40 16.9l22.3-64.6-4 68c7.1 1.1 14.6 1.7 21.7 1.7 7.4 0 14.6-.6 21.7-1.7l-4-68.6 22.6 65.1c14.3-4 27.7-9.4 40-16.9L274.9 332l44.9 50.9c11.7-8.9 22-19.1 30.6-30.9l-50.6-45.1 61.1 29.4c7.1-12.3 12.9-25.7 16.6-40.3l-64-22.3 67.4 4c1.1-7.1 1.4-14.3 1.4-21.7s-.3-14.9-1.4-22l-67.7 4 64-22.3c-3.7-14.3-9.1-28-16.6-40.3l-60.9 29.7 50.6-45.4c-8.9-11.7-19.1-22-30.6-30.9l-45.1 50.9 29.4-61.1c-12.3-7.4-25.7-13.1-40-16.9L241.7 166l4-67.7c-7.1-1.2-14.3-1.7-21.7-1.7zM443.4 128v256L224 512 4.6 384V128L224 0l219.4 128zm-17.1 10.3L224 20.9 21.7 138.3v235.1L224 491.1l202.3-117.7V138.3zM224 37.1l187.7 109.4v218.9L224 474.9 36.3 365.4V146.6L224 37.1zm0 50.9c-92.3 0-166.9 75.1-166.9 168 0 92.6 74.6 167.7 166.9 167.7 92 0 166.9-75.1 166.9-167.7 0-92.9-74.9-168-166.9-168z"],
- "firstdraft": [384, 512, [], "f3a1", "M384 192h-64v128H192v128H0v-25.6h166.4v-128h128v-128H384V192zm-25.6 38.4v128h-128v128H64V512h192V384h128V230.4h-25.6zm25.6 192h-89.6V512H320v-64h64v-25.6zM0 0v384h128V256h128V128h128V0H0z"],
- "flickr": [448, 512, [], "f16e", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM144.5 319c-35.1 0-63.5-28.4-63.5-63.5s28.4-63.5 63.5-63.5 63.5 28.4 63.5 63.5-28.4 63.5-63.5 63.5zm159 0c-35.1 0-63.5-28.4-63.5-63.5s28.4-63.5 63.5-63.5 63.5 28.4 63.5 63.5-28.4 63.5-63.5 63.5z"],
- "fly": [384, 512, [], "f417", "M197.8 427.8c12.9 11.7 33.7 33.3 33.2 50.7 0 .8-.1 1.6-.1 2.5-1.8 19.8-18.8 31.1-39.1 31-25-.1-39.9-16.8-38.7-35.8 1-16.2 20.5-36.7 32.4-47.6 2.3-2.1 2.7-2.7 5.6-3.6 3.4 0 3.9.3 6.7 2.8zM331.9 67.3c-16.3-25.7-38.6-40.6-63.3-52.1C243.1 4.5 214-.2 192 0c-44.1 0-71.2 13.2-81.1 17.3C57.3 45.2 26.5 87.2 28 158.6c7.1 82.2 97 176 155.8 233.8 1.7 1.6 4.5 4.5 6.2 5.1l3.3.1c2.1-.7 1.8-.5 3.5-2.1 52.3-49.2 140.7-145.8 155.9-215.7 7-39.2 3.1-72.5-20.8-112.5zM186.8 351.9c-28-51.1-65.2-130.7-69.3-189-3.4-47.5 11.4-131.2 69.3-136.7v325.7zM328.7 180c-16.4 56.8-77.3 128-118.9 170.3C237.6 298.4 275 217 277 158.4c1.6-45.9-9.8-105.8-48-131.4 88.8 18.3 115.5 98.1 99.7 153z"],
- "font-awesome": [448, 512, [], "f2b4", "M397.8 32H50.2C22.7 32 0 54.7 0 82.2v347.6C0 457.3 22.7 480 50.2 480h347.6c27.5 0 50.2-22.7 50.2-50.2V82.2c0-27.5-22.7-50.2-50.2-50.2zm-45.4 284.3c0 4.2-3.6 6-7.8 7.8-16.7 7.2-34.6 13.7-53.8 13.7-26.9 0-39.4-16.7-71.7-16.7-23.3 0-47.8 8.4-67.5 17.3-1.2.6-2.4.6-3.6 1.2V385c0 1.8 0 3.6-.6 4.8v1.2c-2.4 8.4-10.2 14.3-19.1 14.3-11.3 0-20.3-9-20.3-20.3V166.4c-7.8-6-13.1-15.5-13.1-26.3 0-18.5 14.9-33.5 33.5-33.5 18.5 0 33.5 14.9 33.5 33.5 0 10.8-4.8 20.3-13.1 26.3v18.5c1.8-.6 3.6-1.2 5.4-2.4 18.5-7.8 40.6-14.3 61.5-14.3 22.7 0 40.6 6 60.9 13.7 4.2 1.8 8.4 2.4 13.1 2.4 22.7 0 47.8-16.1 53.8-16.1 4.8 0 9 3.6 9 7.8v140.3z"],
- "font-awesome-alt": [448, 512, [], "f35c", "M397.8 67.8c7.8 0 14.3 6.6 14.3 14.3v347.6c0 7.8-6.6 14.3-14.3 14.3H50.2c-7.8 0-14.3-6.6-14.3-14.3V82.2c0-7.8 6.6-14.3 14.3-14.3h347.6m0-35.9H50.2C22.7 32 0 54.7 0 82.2v347.6C0 457.3 22.7 480 50.2 480h347.6c27.5 0 50.2-22.7 50.2-50.2V82.2c0-27.5-22.7-50.2-50.2-50.2zm-58.5 139.2c-6 0-29.9 15.5-52.6 15.5-4.2 0-8.4-.6-12.5-2.4-19.7-7.8-37-13.7-59.1-13.7-20.3 0-41.8 6.6-59.7 13.7-1.8.6-3.6 1.2-4.8 1.8v-17.9c7.8-6 12.5-14.9 12.5-25.7 0-17.9-14.3-32.3-32.3-32.3s-32.3 14.3-32.3 32.3c0 10.2 4.8 19.7 12.5 25.7v212.1c0 10.8 9 19.7 19.7 19.7 9 0 16.1-6 18.5-13.7V385c.6-1.8.6-3 .6-4.8V336c1.2 0 2.4-.6 3-1.2 19.7-8.4 43-16.7 65.7-16.7 31.1 0 43 16.1 69.3 16.1 18.5 0 36.4-6.6 52-13.7 4.2-1.8 7.2-3.6 7.2-7.8V178.3c1.8-4.1-2.3-7.1-7.7-7.1z"],
- "font-awesome-flag": [448, 512, [], "f425", "M444.373 359.424c0 7.168-6.144 10.24-13.312 13.312-28.672 12.288-59.392 23.552-92.16 23.552-46.08 0-67.584-28.672-122.88-28.672-39.936 0-81.92 14.336-115.712 29.696-2.048 1.024-4.096 1.024-6.144 2.048v77.824c0 21.405-16.122 34.816-33.792 34.816-19.456 0-34.816-15.36-34.816-34.816V102.4C12.245 92.16 3.029 75.776 3.029 57.344 3.029 25.6 28.629 0 60.373 0s57.344 25.6 57.344 57.344c0 18.432-8.192 34.816-22.528 45.056v31.744c4.124-1.374 58.768-28.672 114.688-28.672 65.27 0 97.676 27.648 126.976 27.648 38.912 0 81.92-27.648 92.16-27.648 8.192 0 15.36 6.144 15.36 13.312v240.64z"],
- "fonticons": [448, 512, [], "f280", "M0 32v448h448V32H0zm167.4 196h67.4l-11.1 37.3H168v112.9c0 5.8-2 6.7 3.2 7.3l43.5 4.1v25.1H84V389l21.3-2c5.2-.6 6.7-2.3 6.7-7.9V267.7c0-2.3-2.9-2.3-5.8-2.3H84V228h28v-21c0-49.6 26.5-70 77.3-70 34.1 0 64.7 8.2 64.7 52.8l-50.7 6.1c.3-18.7-4.4-23-16.3-23-18.4 0-19 9.9-19 27.4v23.3c0 2.4-3.5 4.4-.6 4.4zM364 414.7H261.3v-25.1l20.4-2.6c5.2-.6 7.6-1.7 7.6-7.3V271.8c0-4.1-2.9-6.7-6.7-7.9l-24.2-6.4 6.7-29.5h80.2v151.7c0 5.8-2.6 6.4 2.9 7.3l15.7 2.6v25.1zm-21.9-255.5l9 33.2-7.3 7.3-31.2-16.6-31.2 16.6-7.3-7.3 9-33.2-21.8-24.2 3.5-9.6h27.7l15.5-28h9.3l15.5 28h27.7l3.5 9.6-21.9 24.2z"],
- "fonticons-fi": [384, 512, [], "f3a2", "M114.4 224h92.4l-15.2 51.2h-76.4V433c0 8-2.8 9.2 4.4 10l59.6 5.6V483H0v-35.2l29.2-2.8c7.2-.8 9.2-3.2 9.2-10.8V278.4c0-3.2-4-3.2-8-3.2H0V224h38.4v-28.8c0-68 36.4-96 106-96 46.8 0 88.8 11.2 88.8 72.4l-69.6 8.4c.4-25.6-6-31.6-22.4-31.6-25.2 0-26 13.6-26 37.6v32c0 3.2-4.8 6-.8 6zM384 483H243.2v-34.4l28-3.6c7.2-.8 10.4-2.4 10.4-10V287c0-5.6-4-9.2-9.2-10.8l-33.2-8.8 9.2-40.4h110v208c0 8-3.6 8.8 4 10l21.6 3.6V483zm-30-347.2l12.4 45.6-10 10-42.8-22.8-42.8 22.8-10-10 12.4-45.6-30-36.4 4.8-10h38L307.2 51H320l21.2 38.4h38l4.8 13.2-30 33.2z"],
- "fort-awesome": [448, 512, [], "f286", "M412 284h-24c-2.25 0-4 1.75-4 4v28h-32V160c0-2.25-1.75-4-4-4h-24c-2.25 0-4 1.75-4 4v28h-32v-28c0-2.25-1.75-4-4-4h-24c-2.25 0-4 1.75-4 4v28h-32v-28c0-5.25-7-4-10.25-4v-33.25c7.25-1.75 15-3 22.5-3 9.501 0 18.251 3.75 27.5 3.75 4 0 24.25-1 24.25-7V64c0-2.25-1.75-4-4-4-4.5 0-13.25 3.75-21 3.75-8.499 0-18.25-3.75-28.501-3.75-7 0-14 1-20.75 2.5v-4.25c4.75-2.25 8-7.25 8-12.5 0-18.149-27.499-18.167-27.499 0 0 5.25 3.25 10.25 8 12.5V156c-3.25 0-10.25-1.25-10.25 4v28h-32v-28c0-2.25-1.75-4-4-4h-24c-2.25 0-4 1.75-4 4v28H96v-28c0-2.25-1.75-4-4-4H68c-2.25 0-4 1.75-4 4v156H32v-28c0-2.25-1.75-4-4-4H4c-2.25 0-4 1.75-4 4v192h160v-84c0-63.507 96-63.525 96 0v84h160V288c0-2.25-1.75-4-4-4zm-252-4.001c0 2.25-1.75 4-4 4h-24c-2.25 0-4-1.75-4-4V224c0-2.25 1.75-4 4-4h24c2.25 0 4 1.75 4 4v55.999zm128 0c0 2.25-1.75 4-4 4h-24c-2.25 0-4-1.75-4-4V224c0-2.25 1.75-4 4-4h24c2.25 0 4 1.75 4 4v55.999z"],
- "fort-awesome-alt": [512, 512, [], "f3a3", "M211.7 241.1v51.7c0 2.1-1.6 3.7-3.7 3.7h-22.2c-2.1 0-3.7-1.6-3.7-3.7v-51.7c0-2.1 1.6-3.7 3.7-3.7H208c2.1 0 3.7 1.6 3.7 3.7zm114.5-3.7H304c-2.1 0-3.7 1.6-3.7 3.7v51.7c0 2.1 1.6 3.7 3.7 3.7h22.2c2.1 0 3.7-1.6 3.7-3.7v-51.7c-.1-2.1-1.7-3.7-3.7-3.7zm-29.1 263.2c-.9.1-1.7.3-2.6.4-1 .2-2.1.3-3.1.5-.9.1-1.8.3-2.8.4-1 .1-2 .3-3 .4-1 .1-2 .2-2.9.3-1 .1-1.9.2-2.9.3-1 .1-2.1.2-3.1.3-.9.1-1.8.2-2.7.2-1.1.1-2.3.1-3.4.2-.8 0-1.7.1-2.5.1-1.3.1-2.6.1-3.9.1-.7 0-1.4.1-2.1.1-2 0-4 .1-6 .1s-4 0-6-.1c-.7 0-1.4 0-2.1-.1-1.3 0-2.6-.1-3.9-.1-.8 0-1.7-.1-2.5-.1-1.1-.1-2.3-.1-3.4-.2-.9-.1-1.8-.1-2.7-.2-1-.1-2.1-.2-3.1-.3-1-.1-1.9-.2-2.9-.3-1-.1-2-.2-2.9-.3-1-.1-2-.2-3-.4-.9-.1-1.8-.3-2.8-.4-1-.1-2.1-.3-3.1-.5-.9-.1-1.7-.3-2.6-.4-65.6-10.9-122.5-47.7-160-99.4-.2-.2-.3-.5-.5-.7-.8-1.1-1.6-2.2-2.3-3.3-.3-.4-.6-.8-.8-1.2-.7-1.1-1.4-2.1-2.1-3.2-.3-.5-.6-.9-.9-1.4-.7-1.1-1.4-2.1-2-3.2-.3-.5-.6-.9-.9-1.4-.7-1.1-1.3-2.2-2-3.3-.2-.4-.5-.8-.7-1.2-2.4-4-4.6-8.1-6.8-12.2-.1-.2-.2-.3-.3-.5-.6-1.1-1.1-2.2-1.7-3.3-.3-.6-.6-1.1-.8-1.7-.5-1-1-2.1-1.5-3.1-.3-.7-.6-1.3-.9-2-.5-1-.9-2-1.4-3l-.9-2.1c-.4-1-.9-2-1.3-3-.3-.7-.6-1.5-.9-2.2l-1.2-3c-.3-.8-.6-1.5-.9-2.3-.4-1-.8-2-1.1-3-.3-.9-.6-1.8-1-2.8-.6-1.6-1.1-3.3-1.7-4.9-.3-.9-.6-1.8-.9-2.8-.3-.9-.5-1.8-.8-2.7-.3-.9-.6-1.9-.8-2.8-.3-.9-.5-1.8-.8-2.7-.3-1-.5-1.9-.8-2.9-.2-.9-.5-1.8-.7-2.7-.3-1-.5-2-.7-3-.2-.9-.4-1.7-.6-2.6-.2-1.1-.5-2.2-.7-3.2-.2-.8-.3-1.6-.5-2.4-.3-1.3-.5-2.7-.8-4-.1-.6-.2-1.1-.3-1.7l-.9-5.7c-.1-.6-.2-1.3-.3-1.9-.2-1.3-.4-2.6-.5-3.9-.1-.8-.2-1.5-.3-2.3-.1-1.2-.3-2.4-.4-3.6-.1-.8-.2-1.6-.2-2.4-.1-1.2-.2-2.4-.3-3.5-.1-.8-.1-1.6-.2-2.4-.1-1.2-.2-2.4-.2-3.7 0-.8-.1-1.5-.1-2.3-.1-1.3-.1-2.7-.2-4 0-.7 0-1.3-.1-2 0-2-.1-4-.1-6 0-53.5 16.9-103 45.8-143.6 2.3-3.2 4.7-6.4 7.1-9.5 4.9-6.2 10.1-12.3 15.6-18 2.7-2.9 5.5-5.7 8.4-8.4 2.9-2.7 5.8-5.4 8.8-8 4.5-3.9 9.1-7.6 13.9-11.2 1.6-1.2 3.2-2.4 4.8-3.5C140 34.2 171.7 20.1 206 13c16.1-3.3 32.9-5 50-5s33.8 1.7 50 5c34.3 7 66 21.1 93.6 40.7 1.6 1.2 3.2 2.3 4.8 3.5 4.8 3.6 9.4 7.3 13.9 11.2 12 10.4 23 21.9 32.8 34.4 2.5 3.1 4.8 6.3 7.1 9.5C487.1 153 504 202.5 504 256c0 2 0 4-.1 6 0 .7 0 1.3-.1 2 0 1.3-.1 2.7-.2 4 0 .8-.1 1.5-.1 2.3-.1 1.2-.1 2.4-.2.7-.1.8-.1 1.6-.2 2.4-.1 1.2-.2 2.4-.3 3.5-.1.8-.2 1.6-.2 2.4-.1 1.2-.3 2.4-.4 3.6-.1.8-.2 1.5-.3 2.3-.2 1.3-.4 2.6-.5 3.9-.1.6-.2 1.3-.3 1.9l-.9 5.7c-.1.6-.2 1.1-.3 1.7-.2 1.3-.5 2.7-.8 4-.2.8-.3 1.6-.5 2.4-.2 1.1-.5 2.2-.7 3.2-.2.9-.4 1.7-.6 2.6-.2 1-.5 2-.7 3-.2.9-.5 1.8-.7 2.7-.3 1-.5 1.9-.8 2.9-.2.9-.5 1.8-.8 2.7-.3.9-.6 1.9-.8 2.8-.3.9-.5 1.8-.8 2.7-.3.9-.6 1.8-.9 2.8-.5 1.6-1.1 3.3-1.7 4.9-.3.9-.6 1.8-1 2.8-.4 1-.7 2-1.1 3-.3.8-.6 1.5-.9 2.3l-1.2 3c-.3.7-.6 1.5-.9 2.2-.4 1-.8 2-1.3 3l-.9 2.1c-.4 1-.9 2-1.4 3-.3.7-.6 1.3-.9 2-.5 1-1 2.1-1.5 3.1-.3.6-.6 1.1-.8 1.7-.6 1.1-1.1 2.2-1.7 3.3-.1.2-.2.3-.3.5-2.2 4.1-4.4 8.2-6.8 12.2-.2.4-.5.8-.7 1.2-.7 1.1-1.3 2.2-2 3.3-.3.5-.6.9-.9 1.4-.7 1.1-1.4 2.1-2 3.2-.3.5-.6.9-.9 1.4-.7 1.1-1.4 2.1-2.1 3.2-.3.4-.6.8-.8 1.2-.8 1.1-1.5 2.2-2.3 3.3-.2.2-.3.5-.5.7-37.6 54.7-94.5 91.4-160.1 102.4zm117.3-86.2c13-13 24.2-27.4 33.6-42.9v-71.3c0-2.1-1.6-3.7-3.7-3.7h-22.2c-2.1 0-3.7 1.6-3.7 3.7V326h-29.5V182c0-2.1-1.6-3.7-3.7-3.7h-22.1c-2.1 0-3.7 1.6-3.7 3.7v25.9h-29.5V182c0-2.1-1.6-3.7-3.7-3.7H304c-2.1 0-3.7 1.6-3.7 3.7v25.9h-29.5V182c0-4.8-6.5-3.7-9.5-3.7v-30.7c6.7-1.6 13.8-2.8 20.8-2.8 8.8 0 16.8 3.5 25.4 3.5 3.7 0 22.4-.9 22.4-6.5V93.4c0-2.1-1.6-3.7-3.7-3.7-4.2 0-12.2 3.5-19.4 3.5-7.9 0-16.9-3.5-26.3-3.5-6.5 0-12.9.9-19.2 2.3v-3.9c4.4-2.1 7.4-6.7 7.4-11.5 0-16.8-25.4-16.8-25.4 0 0 4.8 3 9.5 7.4 11.5v90.2c-3 0-9.5-1.1-9.5 3.7v25.9h-29.5V182c0-2.1-1.6-3.7-3.7-3.7h-22.2c-2.1 0-3.7 1.6-3.7 3.7v25.9h-29.5V182c0-2.1-1.6-3.7-3.7-3.7h-22.1c-2.1 0-3.7 1.6-3.7 3.7v144H93.5v-25.8c0-2.1-1.6-3.7-3.7-3.7H67.7c-2.1 0-3.7 1.6-3.7 3.7v71.3c9.4 15.5 20.6 29.9 33.6 42.9 20.6 20.6 44.5 36.7 71.2 48 13.9 5.9 28.2 10.3 42.9 13.2v-75.8c0-58.6 88.6-58.6 88.6 0v75.8c14.7-2.9 29-7.4 42.9-13.2 26.7-11.3 50.6-27.4 71.2-48"],
- "forumbee": [448, 512, [], "f211", "M5.8 309.7C2 292.7 0 275.5 0 258.3 0 135 99.8 35 223.1 35c16.6 0 33.3 2 49.3 5.5C149 87.5 51.9 186 5.8 309.7zm392.9-189.2C385 103 369 87.8 350.9 75.2c-149.6 44.3-266.3 162.1-309.7 312 12.5 18.1 28 35.6 45.2 49 43.1-151.3 161.2-271.7 312.3-315.7zm15.8 252.7c15.2-25.1 25.4-53.7 29.5-82.8-79.4 42.9-145 110.6-187.6 190.3 30-4.4 58.9-15.3 84.6-31.3 35 13.1 70.9 24.3 107 33.6-9.3-36.5-20.4-74.5-33.5-109.8zm29.7-145.5c-2.6-19.5-7.9-38.7-15.8-56.8C290.5 216.7 182 327.5 137.1 466c18.1 7.6 37 12.5 56.6 15.2C240 367.1 330.5 274.4 444.2 227.7z"],
- "foursquare": [368, 512, [], "f180", "M323.1 3H49.9C12.4 3 0 31.3 0 49.1v433.8c0 20.3 12.1 27.7 18.2 30.1 6.2 2.5 22.8 4.6 32.9-7.1C180 356.5 182.2 354 182.2 354c3.1-3.4 3.4-3.1 6.8-3.1h83.4c35.1 0 40.6-25.2 44.3-39.7l48.6-243C373.8 25.8 363.1 3 323.1 3zm-16.3 73.8l-11.4 59.7c-1.2 6.5-9.5 13.2-16.9 13.2H172.1c-12 0-20.6 8.3-20.6 20.3v13c0 12 8.6 20.6 20.6 20.6h90.4c8.3 0 16.6 9.2 14.8 18.2-1.8 8.9-10.5 53.8-11.4 58.8-.9 4.9-6.8 13.5-16.9 13.5h-73.5c-13.5 0-17.2 1.8-26.5 12.6 0 0-8.9 11.4-89.5 108.3-.9.9-1.8.6-1.8-.3V75.9c0-7.7 6.8-16.6 16.6-16.6h219c8.2 0 15.6 7.7 13.5 17.5z"],
- "free-code-camp": [576, 512, [], "f2c5", "M69.3 144.5c-41 68.5-36.4 163 1 227C92.5 409.7 120 423.9 120 438c0 6.8-6 13-12.8 13C87.7 451 8 375.5 8 253.2c0-111.5 78-186 97.1-186 6 0 14.9 4.8 14.9 11.1 0 12.7-28.3 28.6-50.7 66.2zm195.8 213.8c4.5 1.8 12.3 5.2 12.3-1.2 0-2.7-2.2-2.9-4.3-3.6-8.5-3.4-14-7.7-19.1-15.2-8.2-12.1-10.1-24.2-10.1-38.6 0-32.1 44.2-37.9 44.2-70 0-12.3-7.7-15.9-7.7-19.3 0-2.2.7-2.2 2.9-2.2 8 0 19.1 13.3 22.5 19.8 2.2 4.6 2.4 6 2.4 11.1 0 7-.7 14.2-.7 21.3 0 27 31.9 19.8 31.9 6.8 0-6-3.6-11.6-3.6-17.4 0-.7 0-1.2.7-1.2 3.4 0 9.4 7.7 11.1 10.1 5.8 8.9 8.5 20.8 8.5 31.4 0 32.4-29.5 49-29.5 56 0 1 2.9 7.7 12.1 1.9 29.7-15.1 53.1-47.6 53.1-89.8 0-33.6-8.7-57.7-32.1-82.6-3.9-4.1-16.4-16.9-22.5-16.9-8.2 0 7.2 18.6 7.2 31.2 0 7.2-4.8 12.3-12.3 12.3-11.6 0-14.5-25.4-15.9-33.3-5.8-33.8-12.8-58.2-46.4-74.1-10.4-5-36.5-11.8-36.5-2.2 0 2.4 2.7 4.1 4.6 5.1 9.2 5.6 19.6 21.4 19.6 38.2 0 46.1-57.7 88.2-57.7 136.2-.2 40.3 28.1 72.6 65.3 86.2zM470.4 67c-6 0-14.4 6.5-14.4 12.6 0 8.7 12.1 19.6 17.6 25.4 81.6 85.1 78.6 214.3 17.6 291-7 8.9-35.3 35.3-35.3 43.5 0 5.1 8.2 11.4 13.2 11.4 25.4 0 98.8-80.8 98.8-185.7C568 145.9 491.8 67 470.4 67zm-42.3 323.1H167c-9.4 0-15.5 7.5-15.5 16.4 0 8.5 7 15.5 15.5 15.5h261.1c9.4 0 11.9-7.5 11.9-16.4 0-8.5-3.5-15.5-11.9-15.5z"],
- "freebsd": [448, 512, [], "f3a4", "M303.7 96.2c11.1-11.1 115.5-77 139.2-53.2 23.7 23.7-42.1 128.1-53.2 139.2-11.1 11.1-39.4.9-63.1-22.9-23.8-23.7-34.1-52-22.9-63.1zM109.9 68.1C73.6 47.5 22 24.6 5.6 41.1c-16.6 16.6 7.1 69.4 27.9 105.7 18.5-32.2 44.8-59.3 76.4-78.7zM406.7 174c3.3 11.3 2.7 20.7-2.7 26.1-20.3 20.3-87.5-27-109.3-70.1-18-32.3-11.1-53.4 14.9-48.7 5.7-3.6 12.3-7.6 19.6-11.6-29.8-15.5-63.6-24.3-99.5-24.3-119.1 0-215.6 96.5-215.6 215.6 0 119 96.5 215.6 215.6 215.6S445.3 380.1 445.3 261c0-38.4-10.1-74.5-27.7-105.8-3.9 7-7.6 13.3-10.9 18.8z"],
- "get-pocket": [448, 512, [], "f265", "M407.6 64h-367C18.5 64 0 82.5 0 104.6v135.2C0 364.5 99.7 464 224.2 464c124 0 223.8-99.5 223.8-224.2V104.6c0-22.4-17.7-40.6-40.4-40.6zm-162 268.5c-12.4 11.8-31.4 11.1-42.4 0C89.5 223.6 88.3 227.4 88.3 209.3c0-16.9 13.8-30.7 30.7-30.7 17 0 16.1 3.8 105.2 89.3 90.6-86.9 88.6-89.3 105.5-89.3 16.9 0 30.7 13.8 30.7 30.7 0 17.8-2.9 15.7-114.8 123.2z"],
- "gg": [512, 512, [], "f260", "M179.2 230.4l102.4 102.4-102.4 102.4L0 256 179.2 76.8l44.8 44.8-25.6 25.6-19.2-19.2-128 128 128 128 51.5-51.5-77.1-76.5 25.6-25.6zM332.8 76.8L230.4 179.2l102.4 102.4 25.6-25.6-77.1-76.5 51.5-51.5 128 128-128 128-19.2-19.2-25.6 25.6 44.8 44.8L512 256 332.8 76.8z"],
- "gg-circle": [512, 512, [], "f261", "M257 8C120 8 9 119 9 256s111 248 248 248 248-111 248-248S394 8 257 8zm-49.5 374.8L81.8 257.1l125.7-125.7 35.2 35.4-24.2 24.2-11.1-11.1-77.2 77.2 77.2 77.2 26.6-26.6-53.1-52.9 24.4-24.4 77.2 77.2-75 75.2zm99-2.2l-35.2-35.2 24.1-24.4 11.1 11.1 77.2-77.2-77.2-77.2-26.5 26.5 53.1 52.9-24.4 24.4-77.2-77.2 75-75L432.2 255 306.5 380.6z"],
- "git": [448, 512, [], "f1d3", "M18.8 221.7c0 25.3 16.2 60 41.5 68.5v1c-18.8 8.3-24 50.6 1 65.8v1C34 367 16 384.3 16 414.2c0 51.5 48.8 65.8 91.5 65.8 52 0 90.7-18.7 90.7-76 0-70.5-101-44.5-101-82.8 0-13.5 7.2-18.7 19.7-21.3 41.5-7.7 67.5-40 67.5-82.2 0-7.3-1.5-14.2-4-21 6.7-1.5 13.2-3.3 19.7-5.5v-50.5c-17.2 6.8-35.7 11.8-54.5 11.8-53.8-31-126.8 1.3-126.8 69.2zm87.7 163.8c17 0 41.2 3 41.2 25 0 21.8-19.5 26.3-37.7 26.3-17.3 0-43.3-2.7-43.3-25.2.1-22.3 22.1-26.1 39.8-26.1zM103.3 256c-22 0-31.3-13-31.3-33.8 0-49.3 61-48.8 61-.5 0 20.3-8 34.3-29.7 34.3zM432 305.5v49c-13.3 7.3-30.5 9.8-45.5 9.8-53.5 0-59.8-42.2-59.8-85.7v-87.7h.5v-1c-7 0-7.3-1.6-24 1v-47.5h24c0-22.3.3-31-1.5-41.2h56.7c-2 13.8-1.5 27.5-1.5 41.2h51v47.5s-19.3-1-51-1V281c0 14.8 3.3 32.8 21.8 32.8 9.8 0 21.3-2.8 29.3-8.3zM286 68.7c0 18.7-14.5 36.2-33.8 36.2-19.8 0-34.5-17.2-34.5-36.2 0-19.3 14.5-36.7 34.5-36.7C272 32 286 50 286 68.7zm-6.2 74.5c-1.8 14.6-1.6 199.8 0 217.8h-55.5c1.6-18.1 1.8-203 0-217.8h55.5z"],
- "git-square": [448, 512, [], "f1d2", "M140.1 348.5c12.1 0 29.5 2.1 29.5 17.9 0 15.5-13.9 18.8-27 18.8-12.3 0-30.9-2-30.9-18s15.7-18.7 28.4-18.7zm-24.7-116.6c0 14.8 6.6 24.1 22.3 24.1 15.5 0 21.2-10 21.2-24.5.1-34.4-43.5-34.8-43.5.4zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-241 93.7c-12.3 4.8-25.5 8.4-38.9 8.4-38.5-22.1-90.7.9-90.7 49.5 0 18 11.6 42.9 29.6 48.9v.7c-13.4 5.9-17.1 36.1.7 47v.7c-19.5 6.4-32.3 18.8-32.3 40.2 0 36.8 34.8 47 65.4 47 37.1 0 64.8-13.4 64.8-54.3 0-50.4-72.1-31.8-72.1-59.1 0-9.6 5.2-13.4 14.1-15.2 29.6-5.5 48.2-28.6 48.2-58.7 0-5.2-1.1-10.2-2.9-15 4.8-1.1 9.5-2.3 14.1-3.9v-36.2zm56.8 1.8h-39.6c1.3 10.6 1.1 142.6 0 155.5h39.6c-1.1-12.8-1.2-145.1 0-155.5zm4.5-53.3c0-13.4-10-26.2-24.1-26.2-14.3 0-24.6 12.5-24.6 26.2 0 13.6 10.5 25.9 24.6 25.9 13.7 0 24.1-12.5 24.1-25.9zm104.3 53.3h-36.4c0-9.8-.4-19.6 1.1-29.5h-40.5c1.3 7.3 1.1 13.6 1.1 29.5h-17.1v33.9c11.9-1.9 12.1-.7 17.1-.7v.7h-.4v62.7c0 31.1 4.5 61.2 42.7 61.2 10.7 0 23-1.8 32.5-7v-35c-5.7 3.9-13.9 5.9-20.9 5.9-13.2 0-15.5-12.9-15.5-23.4v-65.2c22.7 0 36.4.7 36.4.7v-33.8z"],
- "github": [496, 512, [], "f09b", "M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"],
- "github-alt": [480, 512, [], "f113", "M186.1 328.7c0 20.9-10.9 55.1-36.7 55.1s-36.7-34.2-36.7-55.1 10.9-55.1 36.7-55.1 36.7 34.2 36.7 55.1zM480 278.2c0 31.9-3.2 65.7-17.5 95-37.9 76.6-142.1 74.8-216.7 74.8-75.8 0-186.2 2.7-225.6-74.8-14.6-29-20.2-63.1-20.2-95 0-41.9 13.9-81.5 41.5-113.6-5.2-15.8-7.7-32.4-7.7-48.8 0-21.5 4.9-32.3 14.6-51.8 45.3 0 74.3 9 108.8 36 29-6.9 58.8-10 88.7-10 27 0 54.2 2.9 80.4 9.2 34-26.7 63-35.2 107.8-35.2 9.8 19.5 14.6 30.3 14.6 51.8 0 16.4-2.6 32.7-7.7 48.2 27.5 32.4 39 72.3 39 114.2zm-64.3 50.5c0-43.9-26.7-82.6-73.5-82.6-18.9 0-37 3.4-56 6-14.9 2.3-29.8 3.2-45.1 3.2-15.2 0-30.1-.9-45.1-3.2-18.7-2.6-37-6-56-6-46.8 0-73.5 38.7-73.5 82.6 0 87.8 80.4 101.3 150.4 101.3h48.2c70.3 0 150.6-13.4 150.6-101.3zm-82.6-55.1c-25.8 0-36.7 34.2-36.7 55.1s10.9 55.1 36.7 55.1 36.7-34.2 36.7-55.1-10.9-55.1-36.7-55.1z"],
- "github-square": [448, 512, [], "f092", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM277.3 415.7c-8.4 1.5-11.5-3.7-11.5-8 0-5.4.2-33 .2-55.3 0-15.6-5.2-25.5-11.3-30.7 37-4.1 76-9.2 76-73.1 0-18.2-6.5-27.3-17.1-39 1.7-4.3 7.4-22-1.7-45-13.9-4.3-45.7 17.9-45.7 17.9-13.2-3.7-27.5-5.6-41.6-5.6-14.1 0-28.4 1.9-41.6 5.6 0 0-31.8-22.2-45.7-17.9-9.1 22.9-3.5 40.6-1.7 45-10.6 11.7-15.6 20.8-15.6 39 0 63.6 37.3 69 74.3 73.1-4.8 4.3-9.1 11.7-10.6 22.3-9.5 4.3-33.8 11.7-48.3-13.9-9.1-15.8-25.5-17.1-25.5-17.1-16.2-.2-1.1 10.2-1.1 10.2 10.8 5 18.4 24.2 18.4 24.2 9.7 29.7 56.1 19.7 56.1 19.7 0 13.9.2 36.5.2 40.6 0 4.3-3 9.5-11.5 8-66-22.1-112.2-84.9-112.2-158.3 0-91.8 70.2-161.5 162-161.5S388 165.6 388 257.4c.1 73.4-44.7 136.3-110.7 158.3zm-98.1-61.1c-1.9.4-3.7-.4-3.9-1.7-.2-1.5 1.1-2.8 3-3.2 1.9-.2 3.7.6 3.9 1.9.3 1.3-1 2.6-3 3zm-9.5-.9c0 1.3-1.5 2.4-3.5 2.4-2.2.2-3.7-.9-3.7-2.4 0-1.3 1.5-2.4 3.5-2.4 1.9-.2 3.7.9 3.7 2.4zm-13.7-1.1c-.4 1.3-2.4 1.9-4.1 1.3-1.9-.4-3.2-1.9-2.8-3.2.4-1.3 2.4-1.9 4.1-1.5 2 .6 3.3 2.1 2.8 3.4zm-12.3-5.4c-.9 1.1-2.8.9-4.3-.6-1.5-1.3-1.9-3.2-.9-4.1.9-1.1 2.8-.9 4.3.6 1.3 1.3 1.8 3.3.9 4.1zm-9.1-9.1c-.9.6-2.6 0-3.7-1.5s-1.1-3.2 0-3.9c1.1-.9 2.8-.2 3.7 1.3 1.1 1.5 1.1 3.3 0 4.1zm-6.5-9.7c-.9.9-2.4.4-3.5-.6-1.1-1.3-1.3-2.8-.4-3.5.9-.9 2.4-.4 3.5.6 1.1 1.3 1.3 2.8.4 3.5zm-6.7-7.4c-.4.9-1.7 1.1-2.8.4-1.3-.6-1.9-1.7-1.5-2.6.4-.6 1.5-.9 2.8-.4 1.3.7 1.9 1.8 1.5 2.6z"],
- "gitkraken": [592, 512, [], "f3a6", "M565.7 118.1c-2.3-6.1-9.3-9.2-15.3-6.6-5.7 2.4-8.5 8.9-6.3 14.6 10.9 29 16.9 60.5 16.9 93.3 0 134.6-100.3 245.7-230.2 262.7V358.4c7.9-1.5 15.5-3.6 23-6.2v104c106.7-25.9 185.9-122.1 185.9-236.8 0-91.8-50.8-171.8-125.8-213.3-5.7-3.2-13-.9-15.9 5-2.7 5.5-.6 12.2 4.7 15.1 67.9 37.6 113.9 110 113.9 193.2 0 93.3-57.9 173.1-139.8 205.4v-92.2c14.2-4.5 24.9-17.7 24.9-33.5 0-13.1-6.8-24.4-17.3-30.5 8.3-79.5 44.5-58.6 44.5-83.9V170c0-38-87.9-161.8-129-164.7-2.5-.2-5-.2-7.6 0C251.1 8.3 163.2 132 163.2 170v14.8c0 25.3 36.3 4.3 44.5 83.9-10.6 6.1-17.3 17.4-17.3 30.5 0 15.8 10.6 29 24.8 33.5v92.2c-81.9-32.2-139.8-112-139.8-205.4 0-83.1 46-155.5 113.9-193.2 5.4-3 7.4-9.6 4.7-15.1-2.9-5.9-10.1-8.2-15.9-5-75 41.5-125.8 121.5-125.8 213.3 0 114.7 79.2 210.8 185.9 236.8v-104c7.6 2.5 15.1 4.6 23 6.2v123.7C131.4 465.2 31 354.1 31 219.5c0-32.8 6-64.3 16.9-93.3 2.2-5.8-.6-12.2-6.3-14.6-6-2.6-13 .4-15.3 6.6C14.5 149.7 8 183.8 8 219.5c0 155.1 122.6 281.6 276.3 287.8V361.4c6.8.4 15 .5 23.4 0v145.8C461.4 501.1 584 374.6 584 219.5c0-35.7-6.5-69.8-18.3-101.4zM365.9 275.5c13 0 23.7 10.5 23.7 23.7 0 13.1-10.6 23.7-23.7 23.7-13 0-23.7-10.5-23.7-23.7 0-13.1 10.6-23.7 23.7-23.7zm-139.8 47.3c-13.2 0-23.7-10.7-23.7-23.7s10.5-23.7 23.7-23.7c13.1 0 23.7 10.6 23.7 23.7 0 13-10.5 23.7-23.7 23.7z"],
- "gitlab": [512, 512, [], "f296", "M29.782 199.732L256 493.714 8.074 309.699c-6.856-5.142-9.712-13.996-7.141-21.993l28.849-87.974zm75.405-174.806c-3.142-8.854-15.709-8.854-18.851 0L29.782 199.732h131.961L105.187 24.926zm56.556 174.806L256 493.714l94.257-293.982H161.743zm349.324 87.974l-28.849-87.974L256 493.714l247.926-184.015c6.855-5.142 9.711-13.996 7.141-21.993zm-85.404-262.78c-3.142-8.854-15.709-8.854-18.851 0l-56.555 174.806h131.961L425.663 24.926z"],
- "gitter": [384, 512, [], "f426", "M66.4 322.5H16V0h50.4v322.5zM166.9 76.1h-50.4V512h50.4V76.1zm100.6 0h-50.4V512h50.4V76.1zM368 76h-50.4v247H368V76z"],
- "glide": [448, 512, [], "f2a5", "M252.8 148.6c0 8.8-1.6 17.7-3.4 26.4-5.8 27.8-11.6 55.8-17.3 83.6-1.4 6.3-8.3 4.9-13.7 4.9-23.8 0-30.5-26-30.5-45.5 0-29.3 11.2-68.1 38.5-83.1 4.3-2.5 9.2-4.2 14.1-4.2 11.4 0 12.3 8.3 12.3 17.9zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-64 187c0-5.1-20.8-37.7-25.5-39.5-2.2-.9-7.2-2.3-9.6-2.3-23.1 0-38.7 10.5-58.2 21.5l-.5-.5c4.3-29.4 14.6-57.2 14.6-87.4 0-44.6-23.8-62.7-67.5-62.7-71.7 0-108 70.8-108 123.5 0 54.7 32 85 86.3 85 7.5 0 6.9-.6 6.9 2.3-10.5 80.3-56.5 82.9-56.5 58.9 0-24.4 28-36.5 28.3-38-.2-7.6-29.3-17.2-36.7-17.2-21.1 0-32.7 33-32.7 50.6 0 32.3 20.4 54.7 53.3 54.7 48.2 0 83.4-49.7 94.3-91.7 9.4-37.7 7-39.4 12.3-42.1 20-10.1 35.8-16.8 58.4-16.8 11.1 0 19 2.3 36.7 5.2 1.8.1 4.1-1.7 4.1-3.5z"],
- "glide-g": [448, 512, [], "f2a6", "M407.1 211.2c-3.5-1.4-11.6-3.8-15.4-3.8-37.1 0-62.2 16.8-93.5 34.5l-.9-.9c7-47.3 23.5-91.9 23.5-140.4C320.8 29.1 282.6 0 212.4 0 97.3 0 39 113.7 39 198.4 39 286.3 90.3 335 177.6 335c12 0 11-1 11 3.8-16.9 128.9-90.8 133.1-90.8 94.6 0-39.2 45-58.6 45.5-61-.3-12.2-47-27.6-58.9-27.6-33.9.1-52.4 51.2-52.4 79.3C32 476 64.8 512 117.5 512c77.4 0 134-77.8 151.4-145.4 15.1-60.5 11.2-63.3 19.7-67.6 32.2-16.2 57.5-27 93.8-27 17.8 0 30.5 3.7 58.9 8.4 2.9 0 6.7-2.9 6.7-5.8 0-8-33.4-60.5-40.9-63.4zm-175.3-84.4c-9.3 44.7-18.6 89.6-27.8 134.3-2.3 10.2-13.3 7.8-22 7.8-38.3 0-49-41.8-49-73.1 0-47 18-109.3 61.8-133.4 7-4.1 14.8-6.7 22.6-6.7 18.6 0 20 13.3 20 28.7-.1 14.3-2.7 28.5-5.6 42.4z"],
- "gofore": [400, 512, [], "f3a7", "M324 319.8h-13.2v34.7c-24.5 23.1-56.3 35.8-89.9 35.8-73.2 0-132.4-60.2-132.4-134.4 0-74.1 59.2-134.4 132.4-134.4 35.3 0 68.6 14 93.6 39.4l62.3-63.3C335 55.3 279.7 32 220.7 32 98 32 0 132.6 0 256c0 122.5 97 224 220.7 224 63.2 0 124.5-26.2 171-82.5-2-27.6-13.4-77.7-67.7-77.7zm-12.1-112.5H205.6v89H324c33.5 0 60.5 15.1 76 41.8v-30.6c0-65.2-40.4-100.2-88.1-100.2z"],
- "goodreads": [448, 512, [], "f3a8", "M299.9 191.2c5.1 37.3-4.7 79-35.9 100.7-22.3 15.5-52.8 14.1-70.8 5.7-37.1-17.3-49.5-58.6-46.8-97.2 4.3-60.9 40.9-87.9 75.3-87.5 46.9-.2 71.8 31.8 78.2 78.3zM448 88v336c0 30.9-25.1 56-56 56H56c-30.9 0-56-25.1-56-56V88c0-30.9 25.1-56 56-56h336c30.9 0 56 25.1 56 56zM330 313.2s-.1-34-.1-217.3h-29v40.3c-.8.3-1.2-.5-1.6-1.2-9.6-20.7-35.9-46.3-76-46-51.9.4-87.2 31.2-100.6 77.8-4.3 14.9-5.8 30.1-5.5 45.6 1.7 77.9 45.1 117.8 112.4 115.2 28.9-1.1 54.5-17 69-45.2.5-1 1.1-1.9 1.7-2.9.2.1.4.1.6.2.3 3.8.2 30.7.1 34.5-.2 14.8-2 29.5-7.2 43.5-7.8 21-22.3 34.7-44.5 39.5-17.8 3.9-35.6 3.8-53.2-1.2-21.5-6.1-36.5-19-41.1-41.8-.3-1.6-1.3-1.3-2.3-1.3h-26.8c.8 10.6 3.2 20.3 8.5 29.2 24.2 40.5 82.7 48.5 128.2 37.4 49.9-12.3 67.3-54.9 67.4-106.3z"],
- "goodreads-g": [384, 512, [], "f3a9", "M42.6 403.3h2.8c12.7 0 25.5 0 38.2.1 1.6 0 3.1-.4 3.6 2.1 7.1 34.9 30 54.6 62.9 63.9 26.9 7.6 54.1 7.8 81.3 1.8 33.8-7.4 56-28.3 68-60.4 8-21.5 10.7-43.8 11-66.5.1-5.8.3-47-.2-52.8l-.9-.3c-.8 1.5-1.7 2.9-2.5 4.4-22.1 43.1-61.3 67.4-105.4 69.1-103 4-169.4-57-172-176.2-.5-23.7 1.8-46.9 8.3-69.7C58.3 47.7 112.3.6 191.6 0c61.3-.4 101.5 38.7 116.2 70.3.5 1.1 1.3 2.3 2.4 1.9V10.6h44.3c0 280.3.1 332.2.1 332.2-.1 78.5-26.7 143.7-103 162.2-69.5 16.9-159 4.8-196-57.2-8-13.5-11.8-28.3-13-44.5zM188.9 36.5c-52.5-.5-108.5 40.7-115 133.8-4.1 59 14.8 122.2 71.5 148.6 27.6 12.9 74.3 15 108.3-8.7 47.6-33.2 62.7-97 54.8-154-9.7-71.1-47.8-120-119.6-119.7z"],
- "google": [488, 512, [], "f1a0", "M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"],
- "google-drive": [512, 512, [], "f3aa", "M339 314.9L175.4 32h161.2l163.6 282.9H339zm-137.5 23.6L120.9 480h310.5L512 338.5H201.5zM154.1 67.4L0 338.5 80.6 480 237 208.8 154.1 67.4z"],
- "google-play": [512, 512, [], "f3ab", "M325.3 234.3L104.6 13l280.8 161.2-60.1 60.1zM47 0C34 6.8 25.3 19.2 25.3 35.3v441.3c0 16.1 8.7 28.5 21.7 35.3l256.6-256L47 0zm425.2 225.6l-58.9-34.1-65.7 64.5 65.7 64.5 60.1-34.1c18-14.3 18-46.5-1.2-60.8zM104.6 499l280.8-161.2-60.1-60.1L104.6 499z"],
- "google-plus": [496, 512, [], "f2b3", "M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm-70.7 372c-68.8 0-124-55.5-124-124s55.2-124 124-124c31.3 0 60.1 11 83 32.3l-33.6 32.6c-13.2-12.9-31.3-19.1-49.4-19.1-42.9 0-77.2 35.5-77.2 78.1s34.2 78.1 77.2 78.1c32.6 0 64.9-19.1 70.1-53.3h-70.1v-42.6h116.9c1.3 6.8 1.9 13.6 1.9 20.7 0 70.8-47.5 121.2-118.8 121.2zm230.2-106.2v35.5H372v-35.5h-35.5v-35.5H372v-35.5h35.5v35.5h35.2v35.5h-35.2z"],
- "google-plus-g": [640, 512, [], "f0d5", "M386.061 228.496c1.834 9.692 3.143 19.384 3.143 31.956C389.204 370.205 315.599 448 204.8 448c-106.084 0-192-85.915-192-192s85.916-192 192-192c51.864 0 95.083 18.859 128.611 50.292l-52.126 50.03c-14.145-13.621-39.028-29.599-76.485-29.599-65.484 0-118.92 54.221-118.92 121.277 0 67.056 53.436 121.277 118.92 121.277 75.961 0 104.513-54.745 108.965-82.773H204.8v-66.009h181.261zm185.406 6.437V179.2h-56.001v55.733h-55.733v56.001h55.733v55.733h56.001v-55.733H627.2v-56.001h-55.733z"],
- "google-plus-square": [448, 512, [], "f0d4", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM164 356c-55.3 0-100-44.7-100-100s44.7-100 100-100c27 0 49.5 9.8 67 26.2l-27.1 26.1c-7.4-7.1-20.3-15.4-39.8-15.4-34.1 0-61.9 28.2-61.9 63.2 0 34.9 27.8 63.2 61.9 63.2 39.6 0 54.4-28.5 56.8-43.1H164v-34.4h94.4c1 5 1.6 10.1 1.6 16.6 0 57.1-38.3 97.6-96 97.6zm220-81.8h-29v29h-29.2v-29h-29V245h29v-29H355v29h29v29.2z"],
- "google-wallet": [448, 512, [], "f1ee", "M156.8 126.8c37.6 60.6 64.2 113.1 84.3 162.5-8.3 33.8-18.8 66.5-31.3 98.3-13.2-52.3-26.5-101.3-56-148.5 6.5-36.4 2.3-73.6 3-112.3zM109.3 200H16.1c-6.5 0-10.5 7.5-6.5 12.7C51.8 267 81.3 330.5 101.3 400h103.5c-16.2-69.7-38.7-133.7-82.5-193.5-3-4-8-6.5-13-6.5zm47.8-88c68.5 108 130 234.5 138.2 368H409c-12-138-68.4-265-143.2-368H157.1zm251.8-68.5c-1.8-6.8-8.2-11.5-15.2-11.5h-88.3c-5.3 0-9 5-7.8 10.3 13.2 46.5 22.3 95.5 26.5 146 48.2 86.2 79.7 178.3 90.6 270.8 15.8-60.5 25.3-133.5 25.3-203 0-73.6-12.1-145.1-31.1-212.6z"],
- "gratipay": [496, 512, [], "f184", "M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm114.6 226.4l-113 152.7-112.7-152.7c-8.7-11.9-19.1-50.4 13.6-72 28.1-18.1 54.6-4.2 68.5 11.9 15.9 17.9 46.6 16.9 61.7 0 13.9-16.1 40.4-30 68.1-11.9 32.9 21.6 22.6 60 13.8 72z"],
- "grav": [512, 512, [], "f2d6", "M301.1 212c4.4 4.4 4.4 11.9 0 16.3l-9.7 9.7c-4.4 4.7-11.9 4.7-16.6 0l-10.5-10.5c-4.4-4.7-4.4-11.9 0-16.6l9.7-9.7c4.4-4.4 11.9-4.4 16.6 0l10.5 10.8zm-30.2-19.7c3-3 3-7.8 0-10.5-2.8-3-7.5-3-10.5 0-2.8 2.8-2.8 7.5 0 10.5 3.1 2.8 7.8 2.8 10.5 0zm-26 5.3c-3 2.8-3 7.5 0 10.2 2.8 3 7.5 3 10.5 0 2.8-2.8 2.8-7.5 0-10.2-3-3-7.7-3-10.5 0zm72.5-13.3c-19.9-14.4-33.8-43.2-11.9-68.1 21.6-24.9 40.7-17.2 59.8.8 11.9 11.3 29.3 24.9 17.2 48.2-12.5 23.5-45.1 33.2-65.1 19.1zm47.7-44.5c-8.9-10-23.3 6.9-15.5 16.1 7.4 9 32.1 2.4 15.5-16.1zM504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-66.2 42.6c2.5-16.1-20.2-16.6-25.2-25.7-13.6-24.1-27.7-36.8-54.5-30.4 11.6-8 23.5-6.1 23.5-6.1.3-6.4 0-13-9.4-24.9 3.9-12.5.3-22.4.3-22.4 15.5-8.6 26.8-24.4 29.1-43.2 3.6-31-18.8-59.2-49.8-62.8-22.1-2.5-43.7 7.7-54.3 25.7-23.2 40.1 1.4 70.9 22.4 81.4-14.4-1.4-34.3-11.9-40.1-34.3-6.6-25.7 2.8-49.8 8.9-61.4 0 0-4.4-5.8-8-8.9 0 0-13.8 0-24.6 5.3 11.9-15.2 25.2-14.4 25.2-14.4 0-6.4-.6-14.9-3.6-21.6-5.4-11-23.8-12.9-31.7 2.8.1-.2.3-.4.4-.5-5 11.9-1.1 55.9 16.9 87.2-2.5 1.4-9.1 6.1-13 10-21.6 9.7-56.2 60.3-56.2 60.3-28.2 10.8-77.2 50.9-70.6 79.7.3 3 1.4 5.5 3 7.5-2.8 2.2-5.5 5-8.3 8.3-11.9 13.8-5.3 35.2 17.7 24.4 15.8-7.2 29.6-20.2 36.3-30.4 0 0-5.5-5-16.3-4.4 27.7-6.6 34.3-9.4 46.2-9.1 8 3.9 8-34.3 8-34.3 0-14.7-2.2-31-11.1-41.5 12.5 12.2 29.1 32.7 28 60.6-.8 18.3-15.2 23-15.2 23-9.1 16.6-43.2 65.9-30.4 106 0 0-9.7-14.9-10.2-22.1-17.4 19.4-46.5 52.3-24.6 64.5 26.6 14.7 108.8-88.6 126.2-142.3 34.6-20.8 55.4-47.3 63.9-65 22 43.5 95.3 94.5 101.1 59z"],
- "gripfire": [384, 512, [], "f3ac", "M171.8 503.8c0-5.3 4.8-12.2 4.8-22.3 0-15.2-13-39.9-78.1-86.6C64.2 365.8 32 336.4 32 286.6 32 171.9 179.1 110.1 179.1 18c0-3.3-.2-6.7-.6-10 5.1 2.4 39.1 43.3 39.1 90.4 0 80.5-105.1 129.2-105.1 203 0 26.9 16.6 47.2 32.6 69.5 22.5 30.2 44.2 56.9 44.2 86.5-.1 14.5-4.4 29.7-17.5 46.4zm146-241.4c1.5 8.4 2.2 16.6 2.2 24.6 0 51.8-29.4 97.5-67.3 136.8-1 1-2.2 2.4-3.2 2.4-3.6 0-35.5-41.6-35.5-53.2 0 0 41.8-55.7 41.8-96.9 0-10.8-2.7-21.7-9.1-33.4-1.5 32.3-55.7 87.7-58.1 87.7-2.7 0-17.9-22-17.9-42.1 0-5.3 1-10.7 3.2-15.8 2.4-5.5 56.6-72 56.6-116.7 0-6.2-1-12-3.4-17.1l-4-7.2c16.7 6.5 82.6 64.1 94.7 130.9"],
- "grunt": [384, 512, [], "f3ad", "M61.3 189.3c-1.1 10 5.2 19.1 5.2 19.1.7-7.5 2.2-12.8 4-16.6.4 10.3 3.2 23.5 12.8 34.1 6.9 7.6 35.6 23.3 54.9 6.1 1 2.4 2.1 5.3 3 8.5 2.9 10.3-2.7 25.3-2.7 25.3s15.1-17.1 13.9-32.5c10.8-.5 21.4-8.4 21.1-19.5 0 0-18.9 10.4-35.5-8.8-9.7-11.2-40.9-42-83.1-31.8 4.3 1 8.9 2.4 13.5 4.1h-.1c-4.2 2-6.5 7.1-7 12zm28.3-1.8c19.5 11 37.4 25.7 44.9 37-5.7 3.3-21.7 10.4-38-1.7-10.3-7.6-9.8-26.2-6.9-35.3zm79.2 233.7c2.2 2.3 1.5 5.3.9 6.8-1.1 2.7-5.5 11.6-13 19.8-2.7 2.9-6.6 4.6-11 4.6-4.3 0-8.7-1.6-11.8-4.3-2.3-2.1-10.2-9.5-13.7-18.6-1.3-3.4-1-6.1.9-8.1 1.3-1.3 4-2.9 9.5-2.9H160c4.1 0 7 .9 8.8 2.7zm62.9-187.9c-1.2 15.5 13.9 32.5 13.9 32.5s-5.6-15-2.7-25.3c.9-3.2 2-6 3-8.5 19.3 17.3 48 1.5 54.8-6.1 9.6-10.6 12.3-23.8 12.8-34.1 1.8 3.8 3.4 9.1 4 16.6 0 0 6.4-9.1 5.2-19.1-.6-5-2.9-10-7-11.8h-.1c4.6-1.8 9.2-3.2 13.5-4.1-42.3-10.2-73.4 20.6-83.1 31.8-16.7 19.2-35.5 8.8-35.5 8.8-.2 10.9 10.4 18.9 21.2 19.3zm17.8-8.8c7.5-11.4 25.4-26 44.9-37 3 9.1 3.4 27.7-7 35.4-16.3 12.1-32.2 5-37.9 1.6-.1.1 0 0 0 0zM263 421.4c1.9 1.9 2.2 4.6.9 7.9-3.5 8.9-11.4 16.1-13.7 18.1-3.1 2.6-7.4 4.2-11.8 4.2s-8.3-1.6-11-4.5c-7.5-8-12-16.7-13-19.3-.6-1.5-1.3-4.4.9-6.7 1.7-1.8 4.7-2.7 8.9-2.7h29.4c5.4.1 8.1 1.7 9.4 3zm-98.3-251.5c9.9 6 18.8 8.1 27.3 8.3 8.5-.2 17.4-2.3 27.3-8.3 0 0-14.5 17.7-27.2 17.8h-.2c-12.7-.2-27.2-17.8-27.2-17.8zm184.5 147.4c-2.4 17.9-13 33.8-24.6 43.7-3.1-22.7-3.7-55.5-3.7-62.4 0-14.7 9.5-24.5 12.2-26.1 2.5-1.5 5.4-3 8.3-4.6 18-9.6 40.4-21.6 40.4-43.7 0-16.2-9.3-23.2-15.4-27.8-.8-.6-1.5-1.1-2.2-1.7-2.1-1.7-3.7-3-4.3-4.4-4.4-9.8-3.6-34.2-1.7-37.6.6-.6 16.7-20.9 11.8-39.2-2-7.4-6.9-13.3-14.1-17-5.3-2.7-11.9-4.2-19.5-4.5-.1-2-.5-3.9-.9-5.9-.6-2.6-1.1-5.3-.9-8.1.4-4.7.8-9 2.2-11.3 8.4-13.3 28.8-17.6 29-17.6l12.3-2.4-8.1-9.5c-.1-.2-17.3-17.5-46.3-17.5-7.9 0-16 1.3-24.1 3.9-24.2 7.8-42.9 30.5-49.4 39.3-3.1-1-6.3-1.9-9.6-2.7-4.2-15.8 9-38.5 9-38.5s-13.6-3-33.7 15.2c-2.6-6.5-8.1-20.5-1.8-37.2C184.6 10.1 177.2 26 175 40.4c-7.6-5.4-6.7-23.1-7.2-27.6-7.5.9-29.2 21.9-28.2 48.3-2 .5-3.9 1.1-5.9 1.7-6.5-8.8-25.1-31.5-49.4-39.3-7.9-2.2-16-3.5-23.9-3.5-29 0-46.1 17.3-46.3 17.5L6 46.9l12.3 2.4c.2 0 20.6 4.3 29 17.6 1.4 2.2 1.8 6.6 2.2 11.3.2 2.8-.4 5.5-.9 8.1-.4 1.9-.8 3.9-.9 5.9-7.7.3-14.2 1.8-19.5 4.5-7.2 3.7-12.1 9.6-14.1 17-5 18.2 11.2 38.5 11.8 39.2 1.9 3.4 2.7 27.8-1.7 37.6-.6 1.4-2.2 2.7-4.3 4.4-.7.5-1.4 1.1-2.2 1.7-6.1 4.6-15.4 11.7-15.4 27.8 0 22.1 22.4 34.1 40.4 43.7 3 1.6 5.8 3.1 8.3 4.6 2.7 1.6 12.2 11.4 12.2 26.1 0 6.9-.6 39.7-3.7 62.4-11.6-9.9-22.2-25.9-24.6-43.8 0 0-29.2 22.6-20.6 70.8 5.2 29.5 23.2 46.1 47 54.7 8.8 19.1 29.4 45.7 67.3 49.6C143 504.3 163 512 192.2 512h.2c29.1 0 49.1-7.7 63.6-19.5 37.9-3.9 58.5-30.5 67.3-49.6 23.8-8.7 41.7-25.2 47-54.7 8.2-48.4-21.1-70.9-21.1-70.9zM305.7 37.7c5.6-1.8 11.6-2.7 17.7-2.7 11 0 19.9 3 24.7 5-3.1 1.4-6.4 3.2-9.7 5.3-2.4-.4-5.6-.8-9.2-.8-10.5 0-20.5 3.1-28.7 8.9-12.3 8.7-18 16.9-20.7 22.4-2.2-1.3-4.5-2.5-7.1-3.7-1.6-.8-3.1-1.5-4.7-2.2 6.1-9.1 19.9-26.5 37.7-32.2zm21 18.2c-.8 1-1.6 2.1-2.3 3.2-3.3 5.2-3.9 11.6-4.4 17.8-.5 6.4-1.1 12.5-4.4 17-4.2.8-8.1 1.7-11.5 2.7-2.3-3.1-5.6-7-10.5-11.2 1.4-4.8 5.5-16.1 13.5-22.5 5.6-4.3 12.2-6.7 19.6-7zM45.6 45.3c-3.3-2.2-6.6-4-9.7-5.3 4.8-2 13.7-5 24.7-5 6.1 0 12 .9 17.7 2.7 17.8 5.8 31.6 23.2 37.7 32.1-1.6.7-3.2 1.4-4.8 2.2-2.5 1.2-4.9 2.5-7.1 3.7-2.6-5.4-8.3-13.7-20.7-22.4-8.3-5.8-18.2-8.9-28.8-8.9-3.4.1-6.6.5-9 .9zm44.7 40.1c-4.9 4.2-8.3 8-10.5 11.2-3.4-.9-7.3-1.9-11.5-2.7C65 89.5 64.5 83.4 64 77c-.5-6.2-1.1-12.6-4.4-17.8-.7-1.1-1.5-2.2-2.3-3.2 7.4.3 14 2.6 19.5 7 8 6.3 12.1 17.6 13.5 22.4zM58.1 259.9c-2.7-1.6-5.6-3.1-8.4-4.6-14.9-8-30.2-16.3-30.2-30.5 0-11.1 4.3-14.6 8.9-18.2l.5-.4c.7-.6 1.4-1.2 2.2-1.8-.9 7.2-1.9 13.3-2.7 14.9 0 0 12.1-15 15.7-44.3 1.4-11.5-1.1-34.3-5.1-43 .2 4.9 0 9.8-.3 14.4-.4-.8-.8-1.6-1.3-2.2-3.2-4-11.8-17.5-9.4-26.6.9-3.5 3.1-6 6.7-7.8 3.8-1.9 8.8-2.9 15.1-2.9 12.3 0 25.9 3.7 32.9 6 25.1 8 55.4 30.9 64.1 37.7.2.2.4.3.4.3l5.6 3.9-3.5-5.8c-.2-.3-19.1-31.4-53.2-46.5 2-2.9 7.4-8.1 21.6-15.1 21.4-10.5 46.5-15.8 74.3-15.8 27.9 0 52.9 5.3 74.3 15.8 14.2 6.9 19.6 12.2 21.6 15.1-34 15.1-52.9 46.2-53.1 46.5l-3.5 5.8 5.6-3.9s.2-.1.4-.3c8.7-6.8 39-29.8 64.1-37.7 7-2.2 20.6-6 32.9-6 6.3 0 11.3 1 15.1 2.9 3.5 1.8 5.7 4.4 6.7 7.8 2.5 9.1-6.1 22.6-9.4 26.6-.5.6-.9 1.3-1.3 2.2-.3-4.6-.5-9.5-.3-14.4-4 8.8-6.5 31.5-5.1 43 3.6 29.3 15.7 44.3 15.7 44.3-.8-1.6-1.8-7.7-2.7-14.9.7.6 1.5 1.2 2.2 1.8l.5.4c4.6 3.7 8.9 7.1 8.9 18.2 0 14.2-15.4 22.5-30.2 30.5-2.9 1.5-5.7 3.1-8.4 4.6-8.7 5-18 16.7-19.1 34.2-.9 14.6.9 49.9 3.4 75.9-12.4 4.8-26.7 6.4-39.7 6.8-2-4.1-3.9-8.5-5.5-13.1-.7-2-19.6-51.1-26.4-62.2 5.5 39 17.5 73.7 23.5 89.6-3.5-.5-7.3-.7-11.7-.7h-117c-4.4 0-8.3.3-11.7.7 6-15.9 18.1-50.6 23.5-89.6-6.8 11.2-25.7 60.3-26.4 62.2-1.6 4.6-3.5 9-5.5 13.1-13-.4-27.2-2-39.7-6.8 2.5-26 4.3-61.2 3.4-75.9-.9-17.4-10.3-29.2-19-34.2zM34.8 404.6c-12.1-20-8.7-54.1-3.7-59.1 10.9 34.4 47.2 44.3 74.4 45.4-2.7 4.2-5.2 7.6-7 10l-1.4 1.4c-7.2 7.8-8.6 18.5-4.1 31.8-22.7-.1-46.3-9.8-58.2-29.5zm45.7 43.5c6 1.1 12.2 1.9 18.6 2.4 3.5 8 7.4 15.9 12.3 23.1-14.4-5.9-24.4-16-30.9-25.5zM192 498.2c-60.6-.1-78.3-45.8-84.9-64.7-3.7-10.5-3.4-18.2.9-23.1 2.9-3.3 9.5-7.2 24.6-7.2h118.8c15.1 0 21.8 3.9 24.6 7.2 4.2 4.8 4.5 12.6.9 23.1-6.6 18.8-24.3 64.6-84.9 64.7zm80.6-24.6c4.9-7.2 8.8-15.1 12.3-23.1 6.4-.5 12.6-1.3 18.6-2.4-6.5 9.5-16.5 19.6-30.9 25.5zm76.6-69c-12 19.7-35.6 29.3-58.1 29.7 4.5-13.3 3.1-24.1-4.1-31.8-.4-.5-.9-1-1.4-1.5-1.8-2.4-4.3-5.8-7-10 27.2-1.2 63.5-11 74.4-45.4 5 5 8.4 39.1-3.8 59z"],
- "gulp": [256, 512, [], "f3ae", "M209.8 391.1l-14.1 24.6-4.6 80.2c0 8.9-28.3 16.1-63.1 16.1s-63.1-7.2-63.1-16.1l-5.8-79.4-14.9-25.4c41.2 17.3 126 16.7 165.6 0zm-196-253.3l13.6 125.5c5.9-20 20.8-47 40-55.2 6.3-2.7 12.7-2.7 18.7.9 5.2 3 9.6 9.3 10.1 11.8 1.2 6.5-2 9.1-4.5 9.1-3 0-5.3-4.6-6.8-7.3-4.1-7.3-10.3-7.6-16.9-2.8-6.9 5-12.9 13.4-17.1 20.7-5.1 8.8-9.4 18.5-12 28.2-1.5 5.6-2.9 14.6-.6 19.9 1 2.2 2.5 3.6 4.9 3.6 5 0 12.3-6.6 15.8-10.1 4.5-4.5 10.3-11.5 12.5-16l5.2-15.5c2.6-6.8 9.9-5.6 9.9 0 0 10.2-3.7 13.6-10 34.7-5.8 19.5-7.6 25.8-7.6 25.8-.7 2.8-3.4 7.5-6.3 7.5-1.2 0-2.1-.4-2.6-1.2-1-1.4-.9-5.3-.8-6.3.2-3.2 6.3-22.2 7.3-25.2-2 2.2-4.1 4.4-6.4 6.6-5.4 5.1-14.1 11.8-21.5 11.8-3.4 0-5.6-.9-7.7-2.4l7.6 79.6c2 5 39.2 17.1 88.2 17.1 49.1 0 86.3-12.2 88.2-17.1l10.9-94.6c-5.7 5.2-12.3 11.6-19.6 14.8-5.4 2.3-17.4 3.8-17.4-5.7 0-5.2 9.1-14.8 14.4-21.5 1.4-1.7 4.7-5.9 4.7-8.1 0-2.9-6-2.2-11.7 2.5-3.2 2.7-6.2 6.3-8.7 9.7-4.3 6-6.6 11.2-8.5 15.5-6.2 14.2-4.1 8.6-9.1 22-5 13.3-4.2 11.8-5.2 14-.9 1.9-2.2 3.5-4 4.5-1.9 1-4.5.9-6.1-.3-.9-.6-1.3-1.9-1.3-3.7 0-.9.1-1.8.3-2.7 1.5-6.1 7.8-18.1 15-34.3 1.6-3.7 1-2.6.8-2.3-6.2 6-10.9 8.9-14.4 10.5-5.8 2.6-13 2.6-14.5-4.1-.1-.4-.1-.8-.2-1.2-11.8 9.2-24.3 11.7-20-8.1-4.6 8.2-12.6 14.9-22.4 14.9-4.1 0-7.1-1.4-8.6-5.1-2.3-5.5 1.3-14.9 4.6-23.8 1.7-4.5 4-9.9 7.1-16.2 1.6-3.4 4.2-5.4 7.6-4.5.6.2 1.1.4 1.6.7 2.6 1.8 1.6 4.5.3 7.2-3.8 7.5-7.1 13-9.3 20.8-.9 3.3-2 9 1.5 9 2.4 0 4.7-.8 6.9-2.4 4.6-3.4 8.3-8.5 11.1-13.5 2-3.6 4.4-8.3 5.6-12.3.5-1.7 1.1-3.3 1.8-4.8 1.1-2.5 2.6-5.1 5.2-5.1 1.3 0 2.4.5 3.2 1.5 1.7 2.2 1.3 4.5.4 6.9-2 5.6-4.7 10.6-6.9 16.7-1.3 3.5-2.7 8-2.7 11.7 0 3.4 3.7 2.6 6.8 1.2 2.4-1.1 4.8-2.8 6.8-4.5 1.2-4.9.9-3.8 26.4-68.2 1.3-3.3 3.7-4.7 6.1-4.7 1.2 0 2.2.4 3.2 1.1 1.7 1.3 1.7 4.1 1 6.2-.7 1.9-.6 1.3-4.5 10.5-5.2 12.1-8.6 20.8-13.2 31.9-1.9 4.6-7.7 18.9-8.7 22.3-.6 2.2-1.3 5.8 1 5.8 5.4 0 19.3-13.1 23.1-17 .2-.3.5-.4.9-.6.6-1.9 1.2-3.7 1.7-5.5 1.4-3.8 2.7-8.2 5.3-11.3.8-1 1.7-1.6 2.7-1.6 2.8 0 4.2 1.2 4.2 4 0 1.1-.7 5.1-1.1 6.2 1.4-1.5 2.9-3 4.5-4.5 15-13.9 25.7-6.8 25.7.2 0 7.4-8.9 17.7-13.8 23.4-1.6 1.9-4.9 5.4-5 6.4 0 1.3.9 1.8 2.2 1.8 2 0 6.4-3.5 8-4.7 5-3.9 11.8-9.9 16.6-14.1l14.8-136.8c-30.5 17.1-197.6 17.2-228.3.2zm229.7-8.5c0 21-231.2 21-231.2 0 0-8.8 51.8-15.9 115.6-15.9 9 0 17.8.1 26.3.4l12.6-48.7L228.1.6c1.4-1.4 5.8-.2 9.9 3.5s6.6 7.9 5.3 9.3l-.1.1L185.9 74l-10 40.7c39.9 2.6 67.6 8.1 67.6 14.6zm-69.4 4.6c0-.8-.9-1.5-2.5-2.1l-.2.8c0 1.3-5 2.4-11.1 2.4s-11.1-1.1-11.1-2.4c0-.1 0-.2.1-.3l.2-.7c-1.8.6-3 1.4-3 2.3 0 2.1 6.2 3.7 13.7 3.7 7.7.1 13.9-1.6 13.9-3.7z"],
- "hacker-news": [448, 512, [], "f1d4", "M0 32v448h448V32H0zm21.2 197.2H21c.1-.1.2-.3.3-.4 0 .1 0 .3-.1.4zm218 53.9V384h-31.4V281.3L128 128h37.3c52.5 98.3 49.2 101.2 59.3 125.6 12.3-27 5.8-24.4 60.6-125.6H320l-80.8 155.1z"],
- "hacker-news-square": [448, 512, [], "f3af", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM21.2 229.2H21c.1-.1.2-.3.3-.4 0 .1 0 .3-.1.4zm218 53.9V384h-31.4V281.3L128 128h37.3c52.5 98.3 49.2 101.2 59.3 125.6 12.3-27 5.8-24.4 60.6-125.6H320l-80.8 155.1z"],
- "hire-a-helper": [512, 512, [], "f3b0", "M443.1 0H71.9C67.9 37.3 37.4 67.8 0 71.7v371.5c37.4 4.9 66 32.4 71.9 68.8h372.2c3-36.4 32.5-65.8 67.9-69.8V71.7c-36.4-5.9-65-35.3-68.9-71.7zm-37 404.9c-36.3 0-18.8-2-55.1-2-35.8 0-21 2-56.1 2-5.9 0-4.9-8.2 0-9.8 22.8-7.6 22.9-10.2 24.6-12.8 10.4-15.6 5.9-83 5.9-113 0-5.3-6.4-12.8-13.8-12.8H200.4c-7.4 0-13.8 7.5-13.8 12.8 0 30-4.5 97.4 5.9 113 1.7 2.5 1.8 5.2 24.6 12.8 4.9 1.6 6 9.8 0 9.8-35.1 0-20.3-2-56.1-2-36.3 0-18.8 2-55.1 2-7.9 0-5.8-10.8 0-10.8 10.2-3.4 13.5-3.5 21.7-13.8 7.7-12.9 7.9-44.4 7.9-127.8V151.3c0-22.2-12.2-28.3-28.6-32.4-8.8-2.2-4-11.8 1-11.8 36.5 0 20.6 2 57.1 2 32.7 0 16.5-2 49.2-2 3.3 0 8.5 8.3 1 10.8-4.9 1.6-27.6 3.7-27.6 39.3 0 45.6-.2 55.8 1 68.8 0 1.3 2.3 12.8 12.8 12.8h109.2c10.5 0 12.8-11.5 12.8-12.8 1.2-13 1-23.2 1-68.8 0-35.6-22.7-37.7-27.6-39.3-7.5-2.5-2.3-10.8 1-10.8 32.7 0 16.5 2 49.2 2 36.5 0 20.6-2 57.1-2 4.9 0 9.9 9.6 1 11.8-16.4 4.1-28.6 10.3-28.6 32.4v101.2c0 83.4.1 114.9 7.9 127.8 8.2 10.2 11.4 10.4 21.7 13.8 5.8 0 7.8 10.8 0 10.8z"],
- "hooli": [640, 512, [], "f427", "M508.4 352h57.9V156.7L508.4 184v168zm73.7-110.5V352H640V241.5h-57.9zm-250.7-8.9c-18.2-18.2-50.4-17.1-50.4-17.1s-32.2-1.1-50.4 17.1c-1.9 1.9-3.7 3.9-5.3 6-38.2-29.6-72.5-46.5-102.1-61.1v-20.7l-22.5 10.6c-54.4-22.1-89-18.2-97.3.1 0 0-24.9 32.8 61.9 110.9v-31c-48.8-54.6-39-76.1-35.3-79.2 13.5-11.4 37.5-8 64.4 2.1L65.2 184v63.3c13.1 14.7 30.5 31.5 53.5 50.4l4.5 3.6v-29.8c0-6.9 1.7-18.2 10.8-18.2s10.6 6.9 10.6 15V317c18 12.2 37.3 22.1 57.7 29.6v-93.9c0-18.7-13.4-37.4-40.6-37.4-15.8-.1-30.5 8.2-38.5 21.9v-54.3c41.9 20.9 83.9 46.5 99.9 58.3-10.2 14.6-9.3 28.1-9.3 43.7 0 18.7-1.4 34.3 16.8 52.5 18.2 18.2 50.4 17.1 50.4 17.1s32.3 1.1 50.4-17.1c18.2-18.2 16.7-33.8 16.7-52.5 0-18.5 1.5-34.2-16.7-52.3zm-39.7 71.9c0 3.6-1.8 12.5-10.7 12.5-8.9 0-10.7-8.9-10.7-12.5v-40.4c0-8.7 7.3-10.9 10.7-10.9 3.4 0 10.7 2.1 10.7 10.9v40.4zm185.7-71.9c-18.2-18.2-50.4-17.1-50.4-17.1s-32.3-1.1-50.4 17.1c-18.2 18.2-16.8 33.9-16.8 52.6 0 18.7-1.4 34.3 16.8 52.5 18.2 18.2 50.4 17.1 50.4 17.1s32.3 1.1 50.4-17.1c18.2-18.2 16.8-33.8 16.8-52.5-.1-18.8 1.3-34.5-16.8-52.6zm-39.8 71.9c0 3.6-1.8 12.5-10.7 12.5-8.9 0-10.7-8.9-10.7-12.5v-40.4c0-8.7 7.3-10.9 10.7-10.9 3.4 0 10.7 2.1 10.7 10.9v40.4zm173.5-73c15.9 0 28.9-12.9 28.9-28.9s-12.9-24.5-28.9-24.5c-15.9 0-28.9 8.6-28.9 24.5s12.9 28.9 28.9 28.9zM144.5 352l38.3.8c-13.2-4.6-26-10.2-38.3-16.8v16zm-21.4 0v-28.6c-6.5-4.2-13-8.7-19.4-13.6-14.8-11.2-27.5-21.7-38.5-31.5V352h57.9zm59.7.8c36.5 12.5 69.9 14.2 94.7 7.2-19.9.2-45.8-2.6-75.3-13.3v5.3l-19.4.8z"],
- "hotjar": [448, 512, [], "f3b1", "M414.9 161.5C340.2 29 121.1 0 121.1 0S222.2 110.4 93 197.7C11.3 252.8-21 324.4 14 402.6c26.8 59.9 83.5 84.3 144.6 93.4-29.2-55.1-6.6-122.4-4.1-129.6 57.1 86.4 165 0 110.8-93.9 71 15.4 81.6 138.6 27.1 215.5 80.5-25.3 134.1-88.9 148.8-145.6 15.5-59.3 3.7-127.9-26.3-180.9z"],
- "houzz": [320, 512, [], "f27c", "M12.2 256L160 341.1 12.2 426.6V256M160 512l147.8-85.4V256L160 341.1V512zm0-512L12.2 85.4V256L160 170.6V0zm0 170.6L307.8 256V85.4L160 170.6z"],
- "html5": [384, 512, [], "f13b", "M0 32l34.9 395.8L191.5 480l157.6-52.2L384 32H0zm308.2 127.9H124.4l4.1 49.4h175.6l-13.6 148.4-97.9 27v.3h-1.1l-98.7-27.3-6-75.8h47.7L138 320l53.5 14.5 53.7-14.5 6-62.2H84.3L71.5 112.2h241.1l-4.4 47.7z"],
- "hubspot": [512, 512, [], "f3b2", "M267.4 211.6c-25.1 23.7-40.8 57.3-40.8 94.6 0 29.3 9.7 56.3 26 78L203.1 434c-4.4-1.6-9.1-2.5-14-2.5-10.8 0-20.9 4.2-28.5 11.8-7.6 7.6-11.8 17.8-11.8 28.6s4.2 20.9 11.8 28.5c7.6 7.6 17.8 11.6 28.5 11.6 10.8 0 20.9-3.9 28.6-11.6 7.6-7.6 11.8-17.8 11.8-28.5 0-4.2-.6-8.2-1.9-12.1l50-50.2c22 16.9 49.4 26.9 79.3 26.9 71.9 0 130-58.3 130-130.2 0-65.2-47.7-119.2-110.2-128.7V116c17.5-7.4 28.2-23.8 28.2-42.9 0-26.1-20.9-47.9-47-47.9S311.2 47 311.2 73.1c0 19.1 10.7 35.5 28.2 42.9v61.2c-15.2 2.1-29.6 6.7-42.7 13.6-27.6-20.9-117.5-85.7-168.9-124.8 1.2-4.4 2-9 2-13.8C129.8 23.4 106.3 0 77.4 0 48.6 0 25.2 23.4 25.2 52.2c0 28.9 23.4 52.3 52.2 52.3 9.8 0 18.9-2.9 26.8-7.6l163.2 114.7zm89.5 163.6c-38.1 0-69-30.9-69-69s30.9-69 69-69 69 30.9 69 69-30.9 69-69 69z"],
- "imdb": [448, 512, [], "f2d8", "M350.5 288.7c0 5.4 1.6 14.4-6.2 14.4-1.6 0-3-.8-3.8-2.4-2.2-5.1-1.1-44.1-1.1-44.7 0-3.8-1.1-12.7 4.9-12.7 7.3 0 6.2 7.3 6.2 12.7v32.7zM265 229.9c0-9.7 1.6-16-10.3-16v83.7c12.2.3 10.3-8.7 10.3-18.4v-49.3zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zM21.3 228.8c-.1.1-.2.3-.3.4h.3v-.4zM97 192H64v127.8h33V192zm113.3 0h-43.1l-7.6 59.9c-2.7-20-5.4-40.1-8.7-59.9h-42.8v127.8h29v-84.5l12.2 84.5h20.6l11.6-86.4v86.4h28.7V192zm86.3 45.3c0-8.1.3-16.8-1.4-24.4-4.3-22.5-31.4-20.9-49-20.9h-24.6v127.8c86.1.1 75 6 75-82.5zm85.9 17.3c0-17.3-.8-30.1-22.2-30.1-8.9 0-14.9 2.7-20.9 9.2V192h-31.7v127.8h29.8l1.9-8.1c5.7 6.8 11.9 9.8 20.9 9.8 19.8 0 22.2-15.2 22.2-30.9v-36z"],
- "instagram": [448, 512, [], "f16d", "M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"],
- "internet-explorer": [512, 512, [], "f26b", "M483.049 159.706c10.855-24.575 21.424-60.438 21.424-87.871 0-72.722-79.641-98.371-209.673-38.577-107.632-7.181-211.221 73.67-237.098 186.457 30.852-34.862 78.271-82.298 121.977-101.158C125.404 166.85 79.128 228.002 43.992 291.725 23.246 329.651 0 390.94 0 436.747c0 98.575 92.854 86.5 180.251 42.006 31.423 15.43 66.559 15.573 101.695 15.573 97.124 0 184.249-54.294 216.814-146.022H377.927c-52.509 88.593-196.819 52.996-196.819-47.436H509.9c6.407-43.581-1.655-95.715-26.851-141.162zM64.559 346.877c17.711 51.15 53.703 95.871 100.266 123.304-88.741 48.94-173.267 29.096-100.266-123.304zm115.977-108.873c2-55.151 50.276-94.871 103.98-94.871 53.418 0 101.981 39.72 103.981 94.871H180.536zm184.536-187.6c21.425-10.287 48.563-22.003 72.558-22.003 31.422 0 54.274 21.717 54.274 53.722 0 20.003-7.427 49.007-14.569 67.867-26.28-42.292-65.986-81.584-112.263-99.586z"],
- "ioxhost": [640, 512, [], "f208", "M616 160h-67.3C511.2 70.7 422.9 8 320 8 183 8 72 119 72 256c0 16.4 1.6 32.5 4.7 48H24c-13.3 0-24 10.8-24 24 0 13.3 10.7 24 24 24h67.3c37.5 89.3 125.8 152 228.7 152 137 0 248-111 248-248 0-16.4-1.6-32.5-4.7-48H616c13.3 0 24-10.8 24-24 0-13.3-10.7-24-24-24zm-96 96c0 110.5-89.5 200-200 200-75.7 0-141.6-42-175.5-104H424c13.3 0 24-10.8 24-24 0-13.3-10.7-24-24-24H125.8c-3.8-15.4-5.8-31.4-5.8-48 0-110.5 89.5-200 200-200 75.7 0 141.6 42 175.5 104H216c-13.3 0-24 10.8-24 24 0 13.3 10.7 24 24 24h298.2c3.8 15.4 5.8 31.4 5.8 48zm-304-24h208c13.3 0 24 10.7 24 24 0 13.2-10.7 24-24 24H216c-13.3 0-24-10.7-24-24 0-13.2 10.7-24 24-24z"],
- "itunes": [448, 512, [], "f3b4", "M223.6 80.3C129 80.3 52.5 157 52.5 251.5S129 422.8 223.6 422.8s171.2-76.7 171.2-171.2c0-94.6-76.7-171.3-171.2-171.3zm79.4 240c-3.2 13.6-13.5 21.2-27.3 23.8-12.1 2.2-22.2 2.8-31.9-5-11.8-10-12-26.4-1.4-36.8 8.4-8 20.3-9.6 38-12.8 3-.5 5.6-1.2 7.7-3.7 3.2-3.6 2.2-2 2.2-80.8 0-5.6-2.7-7.1-8.4-6.1-4 .7-91.9 17.1-91.9 17.1-5 1.1-6.7 2.6-6.7 8.3 0 116.1.5 110.8-1.2 118.5-2.1 9-7.6 15.8-14.9 19.6-8.3 4.6-23.4 6.6-31.4 5.2-21.4-4-28.9-28.7-14.4-42.9 8.4-8 20.3-9.6 38-12.8 3-.5 5.6-1.2 7.7-3.7 5-5.7.9-127 2.6-133.7.4-2.6 1.5-4.8 3.5-6.4 2.1-1.7 5.8-2.7 6.7-2.7 101-19 113.3-21.4 115.1-21.4 5.7-.4 9 3 9 8.7-.1 170.6.4 161.4-1 167.6zM345.2 32H102.8C45.9 32 0 77.9 0 134.8v242.4C0 434.1 45.9 480 102.8 480h242.4c57 0 102.8-45.9 102.8-102.8V134.8C448 77.9 402.1 32 345.2 32zM223.6 444c-106.3 0-192.5-86.2-192.5-192.5S117.3 59 223.6 59s192.5 86.2 192.5 192.5S329.9 444 223.6 444z"],
- "itunes-note": [384, 512, [], "f3b5", "M381.9 388.2c-6.4 27.4-27.2 42.8-55.1 48-24.5 4.5-44.9 5.6-64.5-10.2-23.9-20.1-24.2-53.4-2.7-74.4 17-16.2 40.9-19.5 76.8-25.8 6-1.1 11.2-2.5 15.6-7.4 6.4-7.2 4.4-4.1 4.4-163.2 0-11.2-5.5-14.3-17-12.3-8.2 1.4-185.7 34.6-185.7 34.6-10.2 2.2-13.4 5.2-13.4 16.7 0 234.7 1.1 223.9-2.5 239.5-4.2 18.2-15.4 31.9-30.2 39.5-16.8 9.3-47.2 13.4-63.4 10.4-43.2-8.1-58.4-58-29.1-86.6 17-16.2 40.9-19.5 76.8-25.8 6-1.1 11.2-2.5 15.6-7.4 10.1-11.5 1.8-256.6 5.2-270.2.8-5.2 3-9.6 7.1-12.9 4.2-3.5 11.8-5.5 13.4-5.5 204-38.2 228.9-43.1 232.4-43.1 11.5-.8 18.1 6 18.1 17.6.2 344.5 1.1 326-1.8 338.5z"],
- "jenkins": [512, 512, [], "f3b6", "M487.1 425c-1.4-11.2-19-23.1-28.2-31.9-5.1-5-29-23.1-30.4-29.9-1.4-6.6 9.7-21.5 13.3-28.9 5.1-10.7 8.8-23.7 11.3-32.6 18.8-66.1 20.7-156.9-6.2-211.2-10.2-20.6-38.6-49-56.4-62.5-42-31.7-119.6-35.3-170.1-16.6-14.1 5.2-27.8 9.8-40.1 17.1-33.1 19.4-68.3 32.5-78.1 71.6-24.2 10.8-31.5 41.8-30.3 77.8.2 7 4.1 15.8 2.7 22.4-.7 3.3-5.2 7.6-6.1 9.8-11.6 27.7-2.3 64 11.1 83.7 8.1 11.9 21.5 22.4 39.2 25.2.7 10.6 3.3 19.7 8.2 30.4 3.1 6.8 14.7 19 10.4 27.7-2.2 4.4-21 13.8-27.3 17.6C89 407.2 73.7 415 54.2 429c-12.6 9-32.3 10.2-29.2 31.1 2.1 14.1 10.1 31.6 14.7 45.8.7 2 1.4 4.1 2.1 6h422c4.9-15.3 9.7-30.9 14.6-47.2 3.4-11.4 10.2-27.8 8.7-39.7zM205.9 33.7c1.8-.5 3.4.7 4.9 2.4-.2 5.2-5.4 5.1-8.9 6.8-5.4 6.7-13.4 9.8-20 17.2-6.8 7.5-14.4 27.7-23.4 30-4.5 1.1-9.7-.8-13.6-.5-10.4.7-17.7 6-28.3 7.5 13.6-29.9 56.1-54 89.3-63.4zm-104.8 93.6c13.5-14.9 32.1-24.1 54.8-25.9 11.7 29.7-8.4 65-.9 97.6 2.3 9.9 10.2 25.4-2.4 25.7.3-28.3-34.8-46.3-61.3-29.6-1.8-21.5-4.9-51.7 9.8-67.8zm36.7 200.2c-1-4.1-2.7-12.9-2.3-15.1 1.6-8.7 17.1-12.5 11-24.7-11.3-.1-13.8 10.2-24.1 11.3-26.7 2.6-45.6-35.4-44.4-58.4 1-19.5 17.6-38.2 40.1-35.8 16 1.8 21.4 19.2 24.5 34.7 9.2.5 22.5-.4 26.9-7.6-.6-17.5-8.8-31.6-8.2-47.7 1-30.3 17.5-57.6 4.8-87.4 13.6-30.9 53.5-55.3 83.1-70 36.6-18.3 94.9-3.7 129.3 15.8 19.7 11.1 34.4 32.7 48.3 50.7-19.5-5.8-36.1 4.2-33.1 20.3 16.3-14.9 44.2-.2 52.5 16.4 7.9 15.8 7.8 39.3 9 62.8 2.9 57-10.4 115.9-39.1 157.1-7.7 11-14.1 23-24.9 30.6-26 18.2-65.4 34.7-99.2 23.4-44.7-15-65-44.8-89.5-78.8.7 18.7 13.8 34.1 26.8 48.4 11.3 12.5 25 26.6 39.7 32.4-12.3-2.9-31.1-3.8-36.2 7.2-28.6-1.9-55.1-4.8-68.7-24.2-10.6-15.4-21.4-41.4-26.3-61.4zm222 124.1c4.1-3 11.1-2.9 17.4-3.6-5.4-2.7-13-3.7-19.3-2.2-.1-4.2-2-6.8-3.2-10.2 10.6-3.8 35.5-28.5 49.6-20.3 6.7 3.9 9.5 26.2 10.1 37 .4 9-.8 18-4.5 22.8-18.8-.6-35.8-2.8-50.7-7 .9-6.1-1-12.1.6-16.5zm-17.2-20c-16.8.8-26-1.2-38.3-10.8.2-.8 1.4-.5 1.5-1.4 18 8 40.8-3.3 59-4.9-7.9 5.1-14.6 11.6-22.2 17.1zm-12.1 33.2c-1.6-9.4-3.5-12-2.8-20.2 25-16.6 29.7 28.6 2.8 20.2zM226 438.6c-11.6-.7-48.1-14-38.5-23.7 9.4 6.5 27.5 4.9 41.3 7.3.8 4.4-2.8 10.2-2.8 16.4zM57.7 497.1c-4.3-12.7-9.2-25.1-14.8-36.9 30.8-23.8 65.3-48.9 102.2-63.5 2.8-1.1 23.2 25.4 26.2 27.6 16.5 11.7 37 21 56.2 30.2 1.2 8.8 3.9 20.2 8.7 35.5.7 2.3 1.4 4.7 2.2 7.2H57.7zm240.6 5.7h-.8c.3-.2.5-.4.8-.5v.5zm7.5-5.7c2.1-1.4 4.3-2.8 6.4-4.3 1.1 1.4 2.2 2.8 3.2 4.3h-9.6zm15.1-24.7c-10.8 7.3-20.6 18.3-33.3 25.2-6 3.3-27 11.7-33.4 10.2-3.6-.8-3.9-5.3-5.4-9.5-3.1-9-10.1-23.4-10.8-37-.8-17.2-2.5-46 16-42.4 14.9 2.9 32.3 9.7 43.9 16.1 7.1 3.9 11.1 8.6 21.9 9.5-.1 1.4-.1 2.8-.2 4.3-5.9 3.9-15.3 3.8-21.8 7.1 9.5.4 17 2.7 23.5 5.9-.1 3.4-.3 7-.4 10.6zm53.4 24.7h-14c-.1-3.2-2.8-5.8-6.1-5.8s-5.9 2.6-6.1 5.8h-17.4c-2.8-4.4-5.7-8.6-8.9-12.5 2.1-2.2 4-4.7 6-6.9 9 3.7 14.8-4.9 21.7-4.2 7.9.8 14.2 11.7 25.4 11l-.6 12.6zm8.7 0c.2-4 .4-7.8.6-11.5 15.6-7.3 29 1.3 35.7 11.5H383zm83.4-37c-2.3 11.2-5.8 24-9.9 37.1-.2-.1-.4-.1-.6-.1H428c.6-1.1 1.2-2.2 1.9-3.3-2.6-6.1-9-8.7-10.9-15.5 12.1-22.7 6.5-93.4-24.2-78.5 4.3-6.3 15.6-11.5 20.8-19.3 13 10.4 20.8 20.3 33.2 31.4 6.8 6 20 13.3 21.4 23.1.8 5.5-2.6 18.9-3.8 25.1zM222.2 130.5c5.4-14.9 27.2-34.7 45-32 7.7 1.2 18 8.2 12.2 17.7-30.2-7-45.2 12.6-54.4 33.1-8.1-2-4.9-13.1-2.8-18.8zm184.1 63.1c8.2-3.6 22.4-.7 29.6-5.3-4.2-11.5-10.3-21.4-9.3-37.7.5 0 1 0 1.4.1 6.8 14.2 12.7 29.2 21.4 41.7-5.7 13.5-43.6 25.4-43.1 1.2zm20.4-43zm-117.2 45.7c-6.8-10.9-19-32.5-14.5-45.3 6.5 11.9 8.6 24.4 17.8 33.3 4.1 4 12.2 9 8.2 20.2-.9 2.7-7.8 8.6-11.7 9.7-14.4 4.3-47.9.9-36.6-17.1 11.9.7 27.9 7.8 36.8-.8zm27.3 70c3.8 6.6 1.4 18.7 12.1 20.6 20.2 3.4 43.6-12.3 58.1-17.8 9-15.2-.8-20.7-8.9-30.5-16.6-20-38.8-44.8-38-74.7 6.7-4.9 7.3 7.4 8.2 9.7 8.7 20.3 30.4 46.2 46.3 63.5 3.9 4.3 10.3 8.4 11 11.2 2.1 8.2-5.4 18-4.5 23.5-21.7 13.9-45.8 29.1-81.4 25.6-7.4-6.7-10.3-21.4-2.9-31.1zm-201.3-9.2c-6.8-3.9-8.4-21-16.4-21.4-11.4-.7-9.3 22.2-9.3 35.5-7.8-7.1-9.2-29.1-3.5-40.3-6.6-3.2-9.5 3.6-13.1 5.9 4.7-34.1 49.8-15.8 42.3 20.3zm299.6 28.8c-10.1 19.2-24.4 40.4-54 41-.6-6.2-1.1-15.6 0-19.4 22.7-2.2 36.6-13.7 54-21.6zm-141.9 12.4c18.9 9.9 53.6 11 79.3 10.2 1.4 5.6 1.3 12.6 1.4 19.4-33 1.8-72-6.4-80.7-29.6zm92.2 46.7c-1.7 4.3-5.3 9.3-9.8 11.1-12.1 4.9-45.6 8.7-62.4-.3-10.7-5.7-17.5-18.5-23.4-26-2.8-3.6-16.9-12.9-.2-12.9 13.1 32.7 58 29 95.8 28.1z"],
- "joget": [496, 512, [], "f3b7", "M227.5 468.7c-9-13.6-19.9-33.3-23.7-42.4-5.7-13.7-27.2-45.6 31.2-67.1 51.7-19.1 176.7-16.5 208.8-17.6-4 9-8.6 17.9-13.9 26.6-40.4 65.5-110.4 101.5-182 101.5-6.8 0-13.6-.4-20.4-1M66.1 143.9C128 43.4 259.6 12.2 360.1 74.1c74.8 46.1 111.2 130.9 99.3 212.7-24.9-.5-179.3-3.6-230.3-4.9-55.5-1.4-81.7-20.8-58.5-48.2 23.2-27.4 51.1-40.7 68.9-51.2 17.9-10.5 27.3-33.7-23.6-29.7C87.3 161.5 48.6 252.1 37.6 293c-8.8-49.7-.1-102.7 28.5-149.1m-29.2-18c-71.9 116.6-35.6 269.3 81 341.2 116.6 71.9 269.3 35.6 341.2-80.9 71.9-116.6 35.6-269.4-81-341.2-40.5-25.1-85.5-37-129.9-37C165 8 83.8 49.9 36.9 125.9m244.4 110.4c-31.5 20.5-65.3 31.3-65.3 31.3l169.5-1.6 46.5-23.4s3.6-9.5-19.1-15.5c-22.7-6-57 11.3-86.7 27.2-29.7 15.8-31.1 8.2-31.1 8.2s40.2-28.1 50.7-34.5c10.5-6.4 31.9-14 13.4-24.6-3.2-1.8-6.7-2.7-10.4-2.7-17.8 0-41.5 18.7-67.5 35.6"],
- "joomla": [448, 512, [], "f1aa", "M.6 92.1C.6 58.8 27.4 32 60.4 32c30 0 54.5 21.9 59.2 50.2 32.6-7.6 67.1.6 96.5 30l-44.3 44.3c-20.5-20.5-42.6-16.3-55.4-3.5-14.3 14.3-14.3 37.9 0 52.2l99.5 99.5-44 44.3c-87.7-87.2-49.7-49.7-99.8-99.7-26.8-26.5-35-64.8-24.8-98.9C20.4 144.6.6 120.7.6 92.1zm129.5 116.4l44.3 44.3c10-10 89.7-89.7 99.7-99.8 14.3-14.3 37.6-14.3 51.9 0 12.8 12.8 17 35-3.5 55.4l44 44.3c31.2-31.2 38.5-67.6 28.9-101.2 29.2-4.1 51.9-29.2 51.9-59.5 0-33.2-26.8-60.1-59.8-60.1-30.3 0-55.4 22.5-59.5 51.6-33.8-9.9-71.7-1.5-98.3 25.1-18.3 19.1-71.1 71.5-99.6 99.9zm266.3 152.2c8.2-32.7-.9-68.5-26.3-93.9-11.8-12.2 5 4.7-99.5-99.7l-44.3 44.3 99.7 99.7c14.3 14.3 14.3 37.6 0 51.9-12.8 12.8-35 17-55.4-3.5l-44 44.3c27.6 30.2 68 38.8 102.7 28 5.5 27.4 29.7 48.1 58.9 48.1 33 0 59.8-26.8 59.8-60.1 0-30.2-22.5-55-51.6-59.1zm-84.3-53.1l-44-44.3c-87 86.4-50.4 50.4-99.7 99.8-14.3 14.3-37.6 14.3-51.9 0-13.1-13.4-16.9-35.3 3.2-55.4l-44-44.3c-30.2 30.2-38 65.2-29.5 98.3-26.7 6-46.2 29.9-46.2 58.2C0 453.2 26.8 480 59.8 480c28.6 0 52.5-19.8 58.6-46.7 32.7 8.2 68.5-.6 94.2-26 32.1-32 12.2-12.4 99.5-99.7z"],
- "js": [448, 512, [], "f3b8", "M0 32v448h448V32H0zm243.8 349.4c0 43.6-25.6 63.5-62.9 63.5-33.7 0-53.2-17.4-63.2-38.5l34.3-20.7c6.6 11.7 12.6 21.6 27.1 21.6 13.8 0 22.6-5.4 22.6-26.5V237.7h42.1v143.7zm99.6 63.5c-39.1 0-64.4-18.6-76.7-43l34.3-19.8c9 14.7 20.8 25.6 41.5 25.6 17.4 0 28.6-8.7 28.6-20.8 0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5 0-31.6 24.1-55.6 61.6-55.6 26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18-12.3 0-20.1 7.8-20.1 18 0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2 0 37.8-29.8 58.6-69.7 58.6z"],
- "js-square": [512, 512, [], "f3b9", "M432 32H80c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM275.8 381.4c0 43.6-25.6 63.5-62.9 63.5-33.7 0-53.2-17.4-63.2-38.5l34.3-20.7c6.6 11.7 12.6 21.6 27.1 21.6 13.8 0 22.6-5.4 22.6-26.5V237.7h42.1v143.7zm99.6 63.5c-39.1 0-64.4-18.6-76.7-43l34.3-19.8c9 14.7 20.8 25.6 41.5 25.6 17.4 0 28.6-8.7 28.6-20.8 0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5 0-31.6 24.1-55.6 61.6-55.6 26.8 0 46 9.3 59.8 33.7L400 290c-7.2-12.9-15-18-27.1-18-12.3 0-20.1 7.8-20.1 18 0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2 0 37.8-29.8 58.6-69.7 58.6z"],
- "jsfiddle": [576, 512, [], "f1cc", "M510.634 237.462c-4.727-2.621-5.664-5.748-6.381-10.776-2.352-16.488-3.539-33.619-9.097-49.095-35.895-99.957-153.99-143.386-246.849-91.646-27.37 15.25-48.971 36.369-65.493 63.903-3.184-1.508-5.458-2.71-7.824-3.686-30.102-12.421-59.049-10.121-85.331 9.167-25.531 18.737-36.422 44.548-32.676 76.408.355 3.025-1.967 7.621-4.514 9.545-39.712 29.992-56.031 78.065-41.902 124.615 13.831 45.569 57.514 79.796 105.608 81.433 30.291 1.031 60.637.546 90.959.539 84.041-.021 168.09.531 252.12-.48 52.664-.634 96.108-36.873 108.212-87.293 11.54-48.074-11.144-97.3-56.832-122.634zm21.107 156.88c-18.23 22.432-42.343 35.253-71.28 35.65-56.874.781-113.767.23-170.652.23 0 .7-163.028.159-163.728.154-43.861-.332-76.739-19.766-95.175-59.995-18.902-41.245-4.004-90.848 34.186-116.106 9.182-6.073 12.505-11.566 10.096-23.136-5.49-26.361 4.453-47.956 26.42-62.981 22.987-15.723 47.422-16.146 72.034-3.083 10.269 5.45 14.607 11.564 22.198-2.527 14.222-26.399 34.557-46.727 60.671-61.294 97.46-54.366 228.37 7.568 230.24 132.697.122 8.15 2.412 12.428 9.848 15.894 57.56 26.829 74.456 96.122 35.142 144.497zm-87.789-80.499c-5.848 31.157-34.622 55.096-66.666 55.095-16.953-.001-32.058-6.545-44.079-17.705-27.697-25.713-71.141-74.98-95.937-93.387-20.056-14.888-41.99-12.333-60.272 3.782-49.996 44.071 15.859 121.775 67.063 77.188 4.548-3.96 7.84-9.543 12.744-12.844 8.184-5.509 20.766-.884 13.168 10.622-17.358 26.284-49.33 38.197-78.863 29.301-28.897-8.704-48.84-35.968-48.626-70.179 1.225-22.485 12.364-43.06 35.414-55.965 22.575-12.638 46.369-13.146 66.991 2.474C295.68 280.7 320.467 323.97 352.185 343.47c24.558 15.099 54.254 7.363 68.823-17.506 28.83-49.209-34.592-105.016-78.868-63.46-3.989 3.744-6.917 8.932-11.41 11.72-10.975 6.811-17.333-4.113-12.809-10.353 20.703-28.554 50.464-40.44 83.271-28.214 31.429 11.714 49.108 44.366 42.76 78.186z"],
- "keycdn": [512, 512, [], "f3ba", "M63.8 409.3l60.5-59c32.1 42.8 71.1 66 126.6 67.4 30.5.7 60.3-7 86.4-22.4 5.1 5.3 18.5 19.5 20.9 22-32.2 20.7-69.6 31.1-108.1 30.2-43.3-1.1-84.6-16.7-117.7-44.4.3-.6-38.2 37.5-38.6 37.9 9.5 29.8-13.1 62.4-46.3 62.4C20.7 503.3 0 481.7 0 454.9c0-34.3 33.1-56.6 63.8-45.6zm354.9-252.4c19.1 31.3 29.6 67.4 28.7 104-1.1 44.8-19 87.5-48.6 121 .3.3 23.8 25.2 24.1 25.5 9.6-1.3 19.2 2 25.9 9.1 11.3 12 10.9 30.9-1.1 42.4-12 11.3-30.9 10.9-42.4-1.1-6.7-7-9.4-16.8-7.6-26.3-24.9-26.6-44.4-47.2-44.4-47.2 42.7-34.1 63.3-79.6 64.4-124.2.7-28.9-7.2-57.2-21.1-82.2l22.1-21zM104 53.1c6.7 7 9.4 16.8 7.6 26.3l45.9 48.1c-4.7 3.8-13.3 10.4-22.8 21.3-25.4 28.5-39.6 64.8-40.7 102.9-.7 28.9 6.1 57.2 20 82.4l-22 21.5C72.7 324 63.1 287.9 64.2 250.9c1-44.6 18.3-87.6 47.5-121.1l-25.3-26.4c-9.6 1.3-19.2-2-25.9-9.1-11.3-12-10.9-30.9 1.1-42.4C73.5 40.7 92.2 41 104 53.1zM464.9 8c26 0 47.1 22.4 47.1 48.3S490.9 104 464.9 104c-6.3.1-14-1.1-15.9-1.8l-62.9 59.7c-32.7-43.6-76.7-65.9-126.9-67.2-30.5-.7-60.3 6.8-86.2 22.4l-21.1-22C184.1 74.3 221.5 64 260 64.9c43.3 1.1 84.6 16.7 117.7 44.6l41.1-38.6c-1.5-4.7-2.2-9.6-2.2-14.5C416.5 29.7 438.9 8 464.9 8zM256.7 113.4c5.5 0 10.9.4 16.4 1.1 78.1 9.8 133.4 81.1 123.8 159.1-9.8 78.1-81.1 133.4-159.1 123.8-78.1-9.8-133.4-81.1-123.8-159.2 9.3-72.4 70.1-124.6 142.7-124.8zm-59 119.4c.6 22.7 12.2 41.8 32.4 52.2l-11 51.7h73.7l-11-51.7c20.1-10.9 32.1-29 32.4-52.2-.4-32.8-25.8-57.5-58.3-58.3-32.1.8-57.3 24.8-58.2 58.3zM256 160"],
- "kickstarter": [448, 512, [], "f3bb", "M400 480H48c-26.4 0-48-21.6-48-48V80c0-26.4 21.6-48 48-48h352c26.4 0 48 21.6 48 48v352c0 26.4-21.6 48-48 48zM199.6 178.5c0-30.7-17.6-45.1-39.7-45.1-25.8 0-40 19.8-40 44.5v154.8c0 25.8 13.7 45.6 40.5 45.6 21.5 0 39.2-14 39.2-45.6v-41.8l60.6 75.7c12.3 14.9 39 16.8 55.8 0 14.6-15.1 14.8-36.8 4-50.4l-49.1-62.8 40.5-58.7c9.4-13.5 9.5-34.5-5.6-49.1-16.4-15.9-44.6-17.3-61.4 7l-44.8 64.7v-38.8z"],
- "kickstarter-k": [384, 512, [], "f3bc", "M147.3 114.4c0-56.2-32.5-82.4-73.4-82.4C26.2 32 0 68.2 0 113.4v283c0 47.3 25.3 83.4 74.9 83.4 39.8 0 72.4-25.6 72.4-83.4v-76.5l112.1 138.3c22.7 27.2 72.1 30.7 103.2 0 27-27.6 27.3-67.4 7.4-92.2l-90.8-114.8 74.9-107.4c17.4-24.7 17.5-63.1-10.4-89.8-30.3-29-82.4-31.6-113.6 12.8L147.3 185v-70.6z"],
- "korvue": [446, 512, [], "f42f", "M386.5 34h-327C26.8 34 0 60.8 0 93.5v327.1C0 453.2 26.8 480 59.5 480h327.1c33 0 59.5-26.8 59.5-59.5v-327C446 60.8 419.2 34 386.5 34zM87.1 120.8h96v116l61.8-116h110.9l-81.2 132H87.1v-132zm161.8 272.1l-65.7-113.6v113.6h-96V262.1h191.5l88.6 130.8H248.9z"],
- "laravel": [640, 512, [], "f3bd", "M637.5 204.7c-4.2-4.8-62.8-78.1-73.1-90.5-10.3-12.4-15.4-10.2-21.7-9.3s-80.5 13.4-89.1 14.8c-8.6 1.5-14 4.9-8.7 12.3 4.7 6.6 53.4 75.7 64.2 90.9l-193.7 46.4L161.2 11.7C155.1 2.6 153.8-.6 139.8.1 125.9.7 19 9.6 11.4 10.2c-7.6.6-16 4-8.4 22s129 279.6 132.4 287.2c3.4 7.6 12.2 20 32.8 15 21.1-5.1 94.3-24.2 134.3-34.7 21.1 38.3 64.2 115.9 72.2 127 10.6 14.9 18 12.4 34.3 7.4 12.8-3.9 199.6-71.1 208-74.5 8.4-3.5 13.6-5.9 7.9-14.4-4.2-6.2-53.5-72.2-79.3-106.8 17.7-4.7 80.6-21.4 87.3-23.3 7.8-1.8 8.9-5.7 4.6-10.4zm-352.2 72c-2.3.5-110.8 26.5-116.6 27.8-5.8 1.3-5.8.7-6.5-1.3-.7-2-129-266.7-130.8-270-1.8-3.3-1.7-5.9 0-5.9s102.5-9 106-9.2c3.6-.2 3.2.6 4.5 2.8 0 0 142.2 245.4 144.6 249.7 2.6 4.3 1.1 5.6-1.2 6.1zm306 57.3c1.7 2.7 3.5 4.5-2 6.4-5.4 2-183.7 62.1-187.1 63.6-3.5 1.5-6.2 2-10.6-4.5-4.5-6.4-62.4-106.8-62.4-106.8l188.8-49c4.7-1.5 6.2-2.5 9.2 2.2 2.9 4.7 62.4 85.4 64.1 88.1zm12.1-134.1c-4.2.9-73.6 18.1-73.6 18.1l-56.7-77.8c-1.6-2.2-2.9-4.5 1.1-5s68.4-12.2 71.3-12.8c2.9-.7 5.4-1.5 9 3.4 3.6 4.9 52.6 67 54.5 69.4 1.8 2.3-1.4 3.8-5.6 4.7z"],
- "lastfm": [512, 512, [], "f202", "M225.8 367.1l-18.8-51s-30.5 34-76.2 34c-40.5 0-69.2-35.2-69.2-91.5 0-72.1 36.4-97.9 72.1-97.9 66.5 0 74.8 53.3 100.9 134.9 18.8 56.9 54 102.6 155.4 102.6 72.7 0 122-22.3 122-80.9 0-72.9-62.7-80.6-115-92.1-25.8-5.9-33.4-16.4-33.4-34 0-19.9 15.8-31.7 41.6-31.7 28.2 0 43.4 10.6 45.7 35.8l58.6-7c-4.7-52.8-41.1-74.5-100.9-74.5-52.8 0-104.4 19.9-104.4 83.9 0 39.9 19.4 65.1 68 76.8 44.9 10.6 79.8 13.8 79.8 45.7 0 21.7-21.1 30.5-61 30.5-59.2 0-83.9-31.1-97.9-73.9-32-96.8-43.6-163-161.3-163C45.7 113.8 0 168.3 0 261c0 89.1 45.7 137.2 127.9 137.2 66.2 0 97.9-31.1 97.9-31.1z"],
- "lastfm-square": [448, 512, [], "f203", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-92.2 312.9c-63.4 0-85.4-28.6-97.1-64.1-16.3-51-21.5-84.3-63-84.3-22.4 0-45.1 16.1-45.1 61.2 0 35.2 18 57.2 43.3 57.2 28.6 0 47.6-21.3 47.6-21.3l11.7 31.9s-19.8 19.4-61.2 19.4c-51.3 0-79.9-30.1-79.9-85.8 0-57.9 28.6-92 82.5-92 73.5 0 80.8 41.4 100.8 101.9 8.8 26.8 24.2 46.2 61.2 46.2 24.9 0 38.1-5.5 38.1-19.1 0-19.9-21.8-22-49.9-28.6-30.4-7.3-42.5-23.1-42.5-48 0-40 32.3-52.4 65.2-52.4 37.4 0 60.1 13.6 63 46.6l-36.7 4.4c-1.5-15.8-11-22.4-28.6-22.4-16.1 0-26 7.3-26 19.8 0 11 4.8 17.6 20.9 21.3 32.7 7.1 71.8 12 71.8 57.5.1 36.7-30.7 50.6-76.1 50.6z"],
- "leanpub": [576, 512, [], "f212", "M386.539 111.485l15.096 248.955-10.979-.275c-36.232-.824-71.64 8.783-102.657 27.997-31.016-19.214-66.424-27.997-102.657-27.997-45.564 0-82.07 10.705-123.516 27.723L93.117 129.6c28.546-11.803 61.484-18.115 92.226-18.115 41.173 0 73.836 13.175 102.657 42.544 27.723-28.271 59.013-41.721 98.539-42.544zM569.07 448c-25.526 0-47.485-5.215-70.542-15.645-34.31-15.645-69.993-24.978-107.871-24.978-38.977 0-74.934 12.901-102.657 40.623-27.723-27.723-63.68-40.623-102.657-40.623-37.878 0-73.561 9.333-107.871 24.978C55.239 442.236 32.731 448 8.303 448H6.93L49.475 98.859C88.726 76.626 136.486 64 181.775 64 218.83 64 256.984 71.685 288 93.095 319.016 71.685 357.17 64 394.225 64c45.289 0 93.049 12.626 132.3 34.859L569.07 448zm-43.368-44.741l-34.036-280.246c-30.742-13.999-67.248-21.41-101.009-21.41-38.428 0-74.385 12.077-102.657 38.702-28.272-26.625-64.228-38.702-102.657-38.702-33.761 0-70.267 7.411-101.009 21.41L50.298 403.259c47.211-19.487 82.894-33.486 135.045-33.486 37.604 0 70.817 9.606 102.657 29.644 31.84-20.038 65.052-29.644 102.657-29.644 52.151 0 87.834 13.999 135.045 33.486z"],
- "less": [640, 512, [], "f41d", "M612.7 219c0-20.5 3.2-32.6 3.2-54.6 0-34.2-12.6-45.2-40.5-45.2h-20.5v24.2h6.3c14.2 0 17.3 4.7 17.3 22.1 0 16.3-1.6 32.6-1.6 51.5 0 24.2 7.9 33.6 23.6 37.3v1.6c-15.8 3.7-23.6 13.1-23.6 37.3 0 18.9 1.6 34.2 1.6 51.5 0 17.9-3.7 22.6-17.3 22.6v.5h-6.3V393h20.5c27.8 0 40.5-11 40.5-45.2 0-22.6-3.2-34.2-3.2-54.6 0-11 6.8-22.6 27.3-23.6v-27.3c-20.5-.7-27.3-12.3-27.3-23.3zm-105.6 32c-15.8-6.3-30.5-10-30.5-20.5 0-7.9 6.3-12.6 17.9-12.6s22.1 4.7 33.6 13.1l21-27.8c-13.1-10-31-20.5-55.2-20.5-35.7 0-59.9 20.5-59.9 49.4 0 25.7 22.6 38.9 41.5 46.2 16.3 6.3 32.1 11.6 32.1 22.1 0 7.9-6.3 13.1-20.5 13.1-13.1 0-26.3-5.3-40.5-16.3l-21 30.5c15.8 13.1 39.9 22.1 59.9 22.1 42 0 64.6-22.1 64.6-51s-22.5-41-43-47.8zm-358.9 59.4c-3.7 0-8.4-3.2-8.4-13.1V119.1H65.2c-28.4 0-41 11-41 45.2 0 22.6 3.2 35.2 3.2 54.6 0 11-6.8 22.6-27.3 23.6v27.3c20.5.5 27.3 12.1 27.3 23.1 0 19.4-3.2 31-3.2 53.6 0 34.2 12.6 45.2 40.5 45.2h20.5v-24.2h-6.3c-13.1 0-17.3-5.3-17.3-22.6s1.6-32.1 1.6-51.5c0-24.2-7.9-33.6-23.6-37.3v-1.6c15.8-3.7 23.6-13.1 23.6-37.3 0-18.9-1.6-34.2-1.6-51.5s3.7-22.1 17.3-22.1H93v150.8c0 32.1 11 53.1 43.1 53.1 10 0 17.9-1.6 23.6-3.7l-5.3-34.2c-3.1.8-4.6.8-6.2.8zM379.9 251c-16.3-6.3-31-10-31-20.5 0-7.9 6.3-12.6 17.9-12.6 11.6 0 22.1 4.7 33.6 13.1l21-27.8c-13.1-10-31-20.5-55.2-20.5-35.7 0-59.9 20.5-59.9 49.4 0 25.7 22.6 38.9 41.5 46.2 16.3 6.3 32.1 11.6 32.1 22.1 0 7.9-6.3 13.1-20.5 13.1-13.1 0-26.3-5.3-40.5-16.3l-20.5 30.5c15.8 13.1 39.9 22.1 59.9 22.1 42 0 64.6-22.1 64.6-51 .1-28.9-22.5-41-43-47.8zm-155-68.8c-38.4 0-75.1 32.1-74.1 82.5 0 52 34.2 82.5 79.3 82.5 18.9 0 39.9-6.8 56.2-17.9l-15.8-27.8c-11.6 6.8-22.6 10-34.2 10-21 0-37.3-10-41.5-34.2H290c.5-3.7 1.6-11 1.6-19.4.6-42.6-22.6-75.7-66.7-75.7zm-30 66.2c3.2-21 15.8-31 30.5-31 18.9 0 26.3 13.1 26.3 31h-56.8z"],
- "line": [448, 512, [], "f3c0", "M272.1 204.2v71.1c0 1.8-1.4 3.2-3.2 3.2h-11.4c-1.1 0-2.1-.6-2.6-1.3l-32.6-44v42.2c0 1.8-1.4 3.2-3.2 3.2h-11.4c-1.8 0-3.2-1.4-3.2-3.2v-71.1c0-1.8 1.4-3.2 3.2-3.2H219c1 0 2.1.5 2.6 1.4l32.6 44v-42.2c0-1.8 1.4-3.2 3.2-3.2h11.4c1.8-.1 3.3 1.4 3.3 3.1zm-82-3.2h-11.4c-1.8 0-3.2 1.4-3.2 3.2v71.1c0 1.8 1.4 3.2 3.2 3.2h11.4c1.8 0 3.2-1.4 3.2-3.2v-71.1c0-1.7-1.4-3.2-3.2-3.2zm-27.5 59.6h-31.1v-56.4c0-1.8-1.4-3.2-3.2-3.2h-11.4c-1.8 0-3.2 1.4-3.2 3.2v71.1c0 .9.3 1.6.9 2.2.6.5 1.3.9 2.2.9h45.7c1.8 0 3.2-1.4 3.2-3.2v-11.4c0-1.7-1.4-3.2-3.1-3.2zM332.1 201h-45.7c-1.7 0-3.2 1.4-3.2 3.2v71.1c0 1.7 1.4 3.2 3.2 3.2h45.7c1.8 0 3.2-1.4 3.2-3.2v-11.4c0-1.8-1.4-3.2-3.2-3.2H301v-12h31.1c1.8 0 3.2-1.4 3.2-3.2V234c0-1.8-1.4-3.2-3.2-3.2H301v-12h31.1c1.8 0 3.2-1.4 3.2-3.2v-11.4c-.1-1.7-1.5-3.2-3.2-3.2zM448 113.7V399c-.1 44.8-36.8 81.1-81.7 81H81c-44.8-.1-81.1-36.9-81-81.7V113c.1-44.8 36.9-81.1 81.7-81H367c44.8.1 81.1 36.8 81 81.7zm-61.6 122.6c0-73-73.2-132.4-163.1-132.4-89.9 0-163.1 59.4-163.1 132.4 0 65.4 58 120.2 136.4 130.6 19.1 4.1 16.9 11.1 12.6 36.8-.7 4.1-3.3 16.1 14.1 8.8 17.4-7.3 93.9-55.3 128.2-94.7 23.6-26 34.9-52.3 34.9-81.5z"],
- "linkedin": [448, 512, [], "f08c", "M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"],
- "linkedin-in": [448, 512, [], "f0e1", "M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"],
- "linode": [448, 512, [], "f2b8", "M437.4 226.3c-.3-.9-.9-1.4-1.4-2l-70-38.6c-.9-.6-2-.6-3.1 0l-58.9 36c-.9.6-1.4 1.7-1.4 2.6l-.9 31.4-24-16c-.9-.6-2.3-.6-3.1 0L240 260.9l-1.4-35.1c0-.9-.6-2-1.4-2.3l-36-24.3 33.7-17.4c1.1-.6 1.7-1.7 1.7-2.9l-5.7-132.3c0-.9-.9-2-1.7-2.6L138.6.3c-.9-.3-1.7-.3-2.3-.3L12.6 38.6c-1.4.6-2.3 2-2 3.7L38 175.4c.9 3.4 34 27.4 38.6 30.9l-26.9 12.9c-1.4.9-2 2.3-1.7 3.4l20.6 100.3c.6 2.9 23.7 23.1 27.1 26.3l-17.4 10.6c-.9.6-1.7 2-1.4 3.1 1.4 7.1 15.4 77.7 16.9 79.1l65.1 69.1c.6.6 1.4.6 2.3.9.6 0 1.1-.3 1.7-.6l83.7-66.9c.9-.6 1.1-1.4 1.1-2.3l-2-46 28 23.7c1.1.9 2.9.9 4 0l66.9-53.4c.9-.6 1.1-1.4 1.1-2.3l2.3-33.4 20.3 14c1.1.9 2.6.9 3.7 0l54.6-43.7c.6-.3 1.1-1.1 1.1-2 .9-6.5 10.3-70.8 9.7-72.8zm-204.8 4.8l4 92.6-90.6 61.2-14-96.6 100.6-57.2zm-7.7-180l5.4 126-106.6 55.4L104 97.7l120.9-46.6zM44 173.1L18 48l79.7 49.4 19.4 132.9L44 173.1zm30.6 147.8L55.7 230l70 58.3 13.7 93.4-64.8-60.8zm24.3 117.7l-13.7-67.1 61.7 60.9 9.7 67.4-57.7-61.2zm64.5 64.5l-10.6-70.9 85.7-61.4 3.1 70-78.2 62.3zm82-115.1c0-3.4.9-22.9-2-25.1l-24.3-20 22.3-14.9c2.3-1.7 1.1-5.7 1.1-8l29.4 22.6.6 68.3-27.1-22.9zm94.3-25.4l-60.9 48.6-.6-68.6 65.7-46.9-4.2 66.9zm27.7-25.7l-19.1-13.4 2-34c.3-.9-.3-2-1.1-2.6L308 259.7l.6-30 64.6 40.6-5.8 66.6zm54.6-39.8l-48.3 38.3 5.7-65.1 51.1-36.6-8.5 63.4z"],
- "linux": [448, 512, [], "f17c", "M196.1 123.6c-.2-1.4 1.9-2.3 3.2-2.9 1.7-.7 3.9-1 5.5-.1.4.2.8.7.6 1.1-.4 1.2-2.4 1-3.5 1.6-1 .5-1.8 1.7-3 1.7-1 .1-2.7-.4-2.8-1.4zm24.7-.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7zm214.7 310.2c-.5 8.2-6.5 13.8-13.9 18.3-14.9 9-37.3 15.8-50.9 32.2l-2.6-2.2 2.6 2.2c-14.2 16.9-31.7 26.6-48.3 27.9-16.5 1.3-32-6.3-40.3-23v-.1c-1.1-2.1-1.9-4.4-2.5-6.7-21.5 1.2-40.2-5.3-55.1-4.1-22 1.2-35.8 6.5-48.3 6.6-4.8 10.6-14.3 17.6-25.9 20.2-16 3.7-36.1 0-55.9-10.4l1.6-3-1.6 3c-18.5-9.8-42-8.9-59.3-12.5-8.7-1.8-16.3-5-20.1-12.3-3.7-7.3-3-17.3 2.2-31.7 1.7-5.1.4-12.7-.8-20.8-.6-3.9-1.2-7.9-1.2-11.8 0-4.3.7-8.5 2.8-12.4 4.5-8.5 11.8-12.1 18.5-14.5 6.7-2.4 12.8-4 17-8.3 5.2-5.5 10.1-14.4 16.6-20.2-2.6-17.2.2-35.4 6.2-53.3 12.6-37.9 39.2-74.2 58.1-96.7 16.1-22.9 20.8-41.3 22.5-64.7C158 103.4 132.4-.2 234.8 0c80.9.1 76.3 85.4 75.8 131.3-.3 30.1 16.3 50.5 33.4 72 15.2 18 35.1 44.3 46.5 74.4 9.3 24.6 12.9 51.8 3.7 79.1 1.4.5 2.8 1.2 4.1 2 1.4.8 2.7 1.8 4 2.9 6.6 5.6 8.7 14.3 10.5 22.4 1.9 8.1 3.6 15.7 7.2 19.7 11.1 12.4 15.9 21.5 15.5 29.7zM220.8 109.1c3.6.9 8.9 2.4 13 4.4-2.1-12.2 4.5-23.5 11.8-23 8.9.3 13.9 15.5 9.1 27.3-.8 1.9-2.8 3.4-3.9 4.6 6.7 2.3 11 4.1 12.6 4.9 7.9-9.5 10.8-26.2 4.3-40.4-9.8-21.4-34.2-21.8-44 .4-3.2 7.2-3.9 14.9-2.9 21.8zm-46.2 18.8c7.8-5.7 6.9-4.7 5.9-5.5-8-6.9-6.6-27.4 1.8-28.1 6.3-.5 10.8 10.7 9.6 19.6 3.1-2.1 6.7-3.6 10.2-4.6 1.7-19.3-9-33.5-19.1-33.5-18.9 0-24 37.5-8.4 52.1zm-9.4 20.9c1.5 4.9 6.1 10.5 14.7 15.3 7.8 4.6 12 11.5 20 15 2.6 1.1 5.7 1.9 9.6 2.1 18.4 1.1 27.1-11.3 38.2-14.9 11.7-3.7 20.1-11 22.7-18.1 3.2-8.5-2.1-14.7-10.5-18.2-11.3-4.9-16.3-5.2-22.6-9.3-10.3-6.6-18.8-8.9-25.9-8.9-14.4 0-23.2 9.8-27.9 14.2-.5.5-7.9 5.9-14.1 10.5-4.2 3.3-5.6 7.4-4.2 12.3zm-33.5 252.8L112.1 366c-6.8-9.2-13.8-14.8-21.9-16-7.7-1.2-12.6 1.4-17.7 6.9-4.8 5.1-8.8 12.3-14.3 18-7.8 6.5-9.3 6.2-19.6 9.9-6.3 2.2-11.3 4.6-14.8 11.3-2.7 5-2.1 12.2-.9 20 1.2 7.9 3 16.3.6 23.9v.2c-5 13.7-5 21.7-2.6 26.4 7.9 15.4 46.6 6.1 76.5 21.9 31.4 16.4 72.6 17.1 75.3-18 2.1-20.5-31.5-49-41-68.9zm153.9 35.8c3.2-11 6.3-21.3 6.8-29 .8-15.2 1.6-28.7 4.4-39.9 3.1-12.6 9.3-23.1 21.4-27.3 2.3-21.1 18.7-21.1 38.3-12.5 18.9 8.5 26 16 22.8 26.1 1 0 2-.1 4.2 0 5.2-16.9-14.3-28-30.7-34.8 2.9-12 2.4-24.1-.4-35.7-6-25.3-22.6-47.8-35.2-59-2.3-.1-2.1 1.9 2.6 6.5 11.6 10.7 37.1 49.2 23.3 84.9-3.9-1-7.6-1.5-10.9-1.4-5.3-29.1-17.5-53.2-23.6-64.6-11.5-21.4-29.5-65.3-37.2-95.7-4.5 6.4-12.4 11.9-22.3 15-4.7 1.5-9.7 5.5-15.9 9-13.9 8-30 8.8-42.4-1.2-4.5-3.6-8-7.6-12.6-10.3-1.6-.9-5.1-3.3-6.2-4.1-2 37.8-27.3 85.3-39.3 112.7-8.3 19.7-13.2 40.8-13.8 61.5-21.8-29.1-5.9-66.3 2.6-82.4 9.5-17.6 11-22.5 8.7-20.8-8.6 14-22 36.3-27.2 59.2-2.7 11.9-3.2 24 .3 35.2 3.5 11.2 11.1 21.5 24.6 29.9 0 0 24.8 14.3 38.3 32.5 7.4 10 9.7 18.7 7.4 24.9-2.5 6.7-9.6 8.9-16.7 8.9 4.8 6 10.3 13 14.4 19.6 37.6 25.7 82.2 15.7 114.3-7.2zM415 408.5c-10-11.3-7.2-33.1-17.1-41.6-6.9-6-13.6-5.4-22.6-5.1-7.7 8.8-25.8 19.6-38.4 16.3-11.5-2.9-18-16.3-18.8-29.5-.3.2-.7.3-1 .5-7.1 3.9-11.1 10.8-13.7 21.1-2.5 10.2-3.4 23.5-4.2 38.7-.7 11.8-6.2 26.4-9.9 40.6-3.5 13.2-5.8 25.2-1.1 36.3 7.2 14.5 19.5 20.4 33.7 19.3 14.2-1.1 30.4-9.8 43.6-25.5 22-26.6 62.3-29.7 63.2-46.5.3-5.1-3.1-13-13.7-24.6zM173.3 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4 3.9-3.4 5.9-6.3 3.1-6.6-2.8-.3-2.6 2.6-6 5.1-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2-10.4 0-18.7-4.8-24.9-9.7-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5z"],
- "lyft": [512, 512, [], "f3c3", "M0 81.1h77.8v208.7c0 33.1 15 52.8 27.2 61-12.7 11.1-51.2 20.9-80.2-2.8C7.8 334 0 310.7 0 289V81.1zm485.9 173.5v-22h23.8v-76.8h-26.1c-10.1-46.3-51.2-80.7-100.3-80.7-56.6 0-102.7 46-102.7 102.7V357c16 2.3 35.4-.3 51.7-14 17.1-14 24.8-37.2 24.8-59v-6.7h38.8v-76.8h-38.8v-23.3c0-34.6 52.2-34.6 52.2 0v77.1c0 56.6 46 102.7 102.7 102.7v-76.5c-14.5 0-26.1-11.7-26.1-25.9zm-294.3-99v113c0 15.4-23.8 15.4-23.8 0v-113H91v132.7c0 23.8 8 54 45 63.9 37 9.8 58.2-10.6 58.2-10.6-2.1 13.4-14.5 23.3-34.9 25.3-15.5 1.6-35.2-3.6-45-7.8v70.3c25.1 7.5 51.5 9.8 77.6 4.7 47.1-9.1 76.8-48.4 76.8-100.8V155.1h-77.1v.5z"],
- "magento": [448, 512, [], "f3c4", "M445.7 127.9V384l-63.4 36.5V164.7L223.8 73.1 65.2 164.7l.4 255.9L2.3 384V128.1L224.2 0l221.5 127.9zM255.6 420.5L224 438.9l-31.8-18.2v-256l-63.3 36.6.1 255.9 94.9 54.9 95.1-54.9v-256l-63.4-36.6v255.9z"],
- "maxcdn": [512, 512, [], "f136", "M461.1 442.7h-97.4L415.6 200c2.3-10.2.9-19.5-4.4-25.7-5-6.1-13.7-9.6-24.2-9.6h-49.3l-59.5 278h-97.4l59.5-278h-83.4l-59.5 278H0l59.5-278-44.6-95.4H387c39.4 0 75.3 16.3 98.3 44.9 23.3 28.6 31.8 67.4 23.6 105.9l-47.8 222.6z"],
- "medapps": [320, 512, [], "f3c6", "M118.3 238.4c3.5-12.5 6.9-33.6 13.2-33.6 8.3 1.8 9.6 23.4 18.6 36.6 4.6-23.5 5.3-85.1 14.1-86.7 9-.7 19.7 66.5 22 77.5 9.9 4.1 48.9 6.6 48.9 6.6 1.9 7.3-24 7.6-40 7.8-4.6 14.8-5.4 27.7-11.4 28-4.7.2-8.2-28.8-17.5-49.6l-9.4 65.5c-4.4 13-15.5-22.5-21.9-39.3-3.3-.1-62.4-1.6-47.6-7.8l31-5zM228 448c21.2 0 21.2-32 0-32H92c-21.2 0-21.2 32 0 32h136zm-24 64c21.2 0 21.2-32 0-32h-88c-21.2 0-21.2 32 0 32h88zm34.2-141.5c3.2-18.9 5.2-36.4 11.9-48.8 7.9-14.7 16.1-28.1 24-41 24.6-40.4 45.9-75.2 45.9-125.5C320 69.6 248.2 0 160 0S0 69.6 0 155.2c0 50.2 21.3 85.1 45.9 125.5 7.9 12.9 16 26.3 24 41 6.7 12.5 8.7 29.8 11.9 48.9 3.5 21 36.1 15.7 32.6-5.1-3.6-21.7-5.6-40.7-15.3-58.6C66.5 246.5 33 211.3 33 155.2 33 87.3 90 32 160 32s127 55.3 127 123.2c0 56.1-33.5 91.3-66.1 151.6-9.7 18-11.7 37.4-15.3 58.6-3.4 20.6 29 26.4 32.6 5.1z"],
- "medium": [448, 512, [], "f23a", "M0 32v448h448V32H0zm372.2 106.1l-24 23c-2.1 1.6-3.1 4.2-2.7 6.7v169.3c-.4 2.6.6 5.2 2.7 6.7l23.5 23v5.1h-118V367l24.3-23.6c2.4-2.4 2.4-3.1 2.4-6.7V199.8l-67.6 171.6h-9.1L125 199.8v115c-.7 4.8 1 9.7 4.4 13.2l31.6 38.3v5.1H71.2v-5.1l31.6-38.3c3.4-3.5 4.9-8.4 4.1-13.2v-133c.4-3.7-1-7.3-3.8-9.8L75 138.1V133h87.3l67.4 148L289 133.1h83.2v5z"],
- "medium-m": [512, 512, [], "f3c7", "M71.5 142.3c.6-5.9-1.7-11.8-6.1-15.8L20.3 72.1V64h140.2l108.4 237.7L364.2 64h133.7v8.1l-38.6 37c-3.3 2.5-5 6.7-4.3 10.8v272c-.7 4.1 1 8.3 4.3 10.8l37.7 37v8.1H307.3v-8.1l39.1-37.9c3.8-3.8 3.8-5 3.8-10.8V171.2L241.5 447.1h-14.7L100.4 171.2v184.9c-1.1 7.8 1.5 15.6 7 21.2l50.8 61.6v8.1h-144v-8L65 377.3c5.4-5.6 7.9-13.5 6.5-21.2V142.3z"],
- "medrt": [544, 512, [], "f3c8", "M113.7 256c0 121.8 83.9 222.8 193.5 241.1-18.7 4.5-38.2 6.9-58.2 6.9C111.4 504 0 393 0 256S111.4 8 248.9 8c20.1 0 39.6 2.4 58.2 6.9C197.5 33.2 113.7 134.2 113.7 256m297.4 100.3c-77.7 55.4-179.6 47.5-240.4-14.6 5.5 14.1 12.7 27.7 21.7 40.5 61.6 88.2 182.4 109.3 269.7 47 87.3-62.3 108.1-184.3 46.5-272.6-9-12.9-19.3-24.3-30.5-34.2 37.4 78.8 10.7 178.5-67 233.9m-218.8-244c-1.4 1-2.7 2.1-4 3.1 64.3-17.8 135.9 4 178.9 60.5 35.7 47 42.9 106.6 24.4 158 56.7-56.2 67.6-142.1 22.3-201.8-50-65.5-149.1-74.4-221.6-19.8M296 224c-4.4 0-8-3.6-8-8v-40c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v40c0 4.4-3.6 8-8 8h-40c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h40c4.4 0 8 3.6 8 8v40c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-40c0-4.4 3.6-8 8-8h40c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-40z"],
- "meetup": [512, 512, [], "f2e0", "M99 414.3c1.1 5.7-2.3 11.1-8 12.3-5.4 1.1-10.9-2.3-12-8-1.1-5.4 2.3-11.1 7.7-12.3 5.4-1.2 11.1 2.3 12.3 8zm143.1 71.4c-6.3 4.6-8 13.4-3.7 20 4.6 6.6 13.4 8.3 20 3.7 6.3-4.6 8-13.4 3.4-20-4.2-6.5-13.1-8.3-19.7-3.7zm-86-462.3c6.3-1.4 10.3-7.7 8.9-14-1.1-6.6-7.4-10.6-13.7-9.1-6.3 1.4-10.3 7.7-9.1 14 1.4 6.6 7.6 10.6 13.9 9.1zM34.4 226.3c-10-6.9-23.7-4.3-30.6 6-6.9 10-4.3 24 5.7 30.9 10 7.1 23.7 4.6 30.6-5.7 6.9-10.4 4.3-24.1-5.7-31.2zm272-170.9c10.6-6.3 13.7-20 7.7-30.3-6.3-10.6-19.7-14-30-7.7s-13.7 20-7.4 30.6c6 10.3 19.4 13.7 29.7 7.4zm-191.1 58c7.7-5.4 9.4-16 4.3-23.7s-15.7-9.4-23.1-4.3c-7.7 5.4-9.4 16-4.3 23.7 5.1 7.8 15.6 9.5 23.1 4.3zm372.3 156c-7.4 1.7-12.3 9.1-10.6 16.9 1.4 7.4 8.9 12.3 16.3 10.6 7.4-1.4 12.3-8.9 10.6-16.6-1.5-7.4-8.9-12.3-16.3-10.9zm39.7-56.8c-1.1-5.7-6.6-9.1-12-8-5.7 1.1-9.1 6.9-8 12.6 1.1 5.4 6.6 9.1 12.3 8 5.4-1.5 9.1-6.9 7.7-12.6zM447 138.9c-8.6 6-10.6 17.7-4.9 26.3 5.7 8.6 17.4 10.6 26 4.9 8.3-6 10.3-17.7 4.6-26.3-5.7-8.7-17.4-10.9-25.7-4.9zm-6.3 139.4c26.3 43.1 15.1 100-26.3 129.1-17.4 12.3-37.1 17.7-56.9 17.1-12 47.1-69.4 64.6-105.1 32.6-1.1.9-2.6 1.7-3.7 2.9-39.1 27.1-92.3 17.4-119.4-22.3-9.7-14.3-14.6-30.6-15.1-46.9-65.4-10.9-90-94-41.1-139.7-28.3-46.9.6-107.4 53.4-114.9C151.6 70 234.1 38.6 290.1 82c67.4-22.3 136.3 29.4 130.9 101.1 41.1 12.6 52.8 66.9 19.7 95.2zm-70 74.3c-3.1-20.6-40.9-4.6-43.1-27.1-3.1-32 43.7-101.1 40-128-3.4-24-19.4-29.1-33.4-29.4-13.4-.3-16.9 2-21.4 4.6-2.9 1.7-6.6 4.9-11.7-.3-6.3-6-11.1-11.7-19.4-12.9-12.3-2-17.7 2-26.6 9.7-3.4 2.9-12 12.9-20 9.1-3.4-1.7-15.4-7.7-24-11.4-16.3-7.1-40 4.6-48.6 20-12.9 22.9-38 113.1-41.7 125.1-8.6 26.6 10.9 48.6 36.9 47.1 11.1-.6 18.3-4.6 25.4-17.4 4-7.4 41.7-107.7 44.6-112.6 2-3.4 8.9-8 14.6-5.1 5.7 3.1 6.9 9.4 6 15.1-1.1 9.7-28 70.9-28.9 77.7-3.4 22.9 26.9 26.6 38.6 4 3.7-7.1 45.7-92.6 49.4-98.3 4.3-6.3 7.4-8.3 11.7-8 3.1 0 8.3.9 7.1 10.9-1.4 9.4-35.1 72.3-38.9 87.7-4.6 20.6 6.6 41.4 24.9 50.6 11.4 5.7 62.5 15.7 58.5-11.1zm5.7 92.3c-10.3 7.4-12.9 22-5.7 32.6 7.1 10.6 21.4 13.1 32 6 10.6-7.4 13.1-22 6-32.6-7.4-10.6-21.7-13.5-32.3-6z"],
- "microsoft": [448, 512, [], "f3ca", "M0 32h214.6v214.6H0V32zm233.4 0H448v214.6H233.4V32zM0 265.4h214.6V480H0V265.4zm233.4 0H448V480H233.4V265.4z"],
- "mix": [416, 512, [], "f3cb", "M0 64v348.9c0 56.2 88 58.1 88 0V174.3c7.9-52.9 88-50.4 88 6.5v175.3c0 57.9 96 58 96 0V240c5.3-54.7 88-52.5 88 4.3v23.8c0 59.9 88 56.6 88 0V64H0z"],
- "mixcloud": [640, 512, [], "f289", "M424.43 219.729C416.124 134.727 344.135 68 256.919 68c-72.266 0-136.224 46.516-159.205 114.074-54.545 8.029-96.63 54.822-96.63 111.582 0 62.298 50.668 112.966 113.243 112.966h289.614c52.329 0 94.969-42.362 94.969-94.693 0-45.131-32.118-83.063-74.48-92.2zm-20.489 144.53H114.327c-39.04 0-70.881-31.564-70.881-70.604s31.841-70.604 70.881-70.604c18.827 0 36.548 7.475 49.838 20.766 19.963 19.963 50.133-10.227 30.18-30.18-14.675-14.398-32.672-24.365-52.053-29.349 19.935-44.3 64.79-73.926 114.628-73.926 69.496 0 125.979 56.483 125.979 125.702 0 13.568-2.215 26.857-6.369 39.594-8.943 27.517 32.133 38.939 40.147 13.29 2.769-8.306 4.984-16.889 6.369-25.472 19.381 7.476 33.502 26.303 33.502 48.453 0 28.795-23.535 52.33-52.607 52.33zm235.069-52.33c0 44.024-12.737 86.386-37.102 122.657-4.153 6.092-10.798 9.414-17.72 9.414-16.317 0-27.127-18.826-17.443-32.949 19.381-29.349 29.903-63.682 29.903-99.122s-10.521-69.773-29.903-98.845c-15.655-22.831 19.361-47.24 35.163-23.534 24.366 35.993 37.102 78.356 37.102 122.379zm-70.88 0c0 31.565-9.137 62.021-26.857 88.325-4.153 6.091-10.798 9.136-17.72 9.136-17.201 0-27.022-18.979-17.443-32.948 13.013-19.104 19.658-41.255 19.658-64.513 0-22.981-6.645-45.408-19.658-64.512-15.761-22.986 19.008-47.095 35.163-23.535 17.719 26.026 26.857 56.483 26.857 88.047z"],
- "mizuni": [496, 512, [], "f3cc", "M248 8C111 8 0 119.1 0 256c0 137 111 248 248 248s248-111 248-248C496 119.1 385 8 248 8zm-80 351.9c-31.4 10.6-58.8 27.3-80 48.2V136c0-22.1 17.9-40 40-40s40 17.9 40 40v223.9zm120-9.9c-12.9-2-26.2-3.1-39.8-3.1-13.8 0-27.2 1.1-40.2 3.1V136c0-22.1 17.9-40 40-40s40 17.9 40 40v214zm120 57.7c-21.2-20.8-48.6-37.4-80-48V136c0-22.1 17.9-40 40-40s40 17.9 40 40v271.7z"],
- "modx": [448, 512, [], "f285", "M356 241.8l36.7 23.7V480l-133-83.8L356 241.8zM440 75H226.3l-23 37.8 153.5 96.5L440 75zm-89 142.8L55.2 32v214.5l46 29L351 217.8zM97 294.2L8 437h213.7l125-200.5L97 294.2z"],
- "monero": [496, 512, [], "f3d0", "M352 384h108.4C417 455.9 338.1 504 248 504S79 455.9 35.6 384H144V256.2L248 361l104-105v128zM88 336V128l159.4 159.4L408 128v208h74.8c8.5-25.1 13.2-52 13.2-80C496 119 385 8 248 8S0 119 0 256c0 28 4.6 54.9 13.2 80H88z"],
- "napster": [496, 512, [], "f3d2", "M298.3 373.6c-14.2 13.6-31.3 24.1-50.4 30.5-19-6.4-36.2-16.9-50.3-30.5h100.7zm44-199.6c20-16.9 43.6-29.2 69.6-36.2V299c0 219.4-328 217.6-328 .3V137.7c25.9 6.9 49.6 19.6 69.5 36.4 56.8-40 132.5-39.9 188.9-.1zm-208.8-58.5c64.4-60 164.3-60.1 228.9-.2-7.1 3.5-13.9 7.3-20.6 11.5-58.7-30.5-129.2-30.4-187.9.1-6.3-4-13.9-8.2-20.4-11.4zM43.8 93.2v69.3c-58.4 36.5-58.4 121.1.1 158.3 26.4 245.1 381.7 240.3 407.6 1.5l.3-1.7c58.7-36.3 58.9-121.7.2-158.2V93.2c-17.3.5-34 3-50.1 7.4-82-91.5-225.5-91.5-307.5.1-16.3-4.4-33.1-7-50.6-7.5zM259.2 352s36-.3 61.3-1.5c10.2-.5 21.1-4 25.5-6.5 26.3-15.1 25.4-39.2 26.2-47.4-79.5-.6-99.9-3.9-113 55.4zm-135.5-55.3c.8 8.2-.1 32.3 26.2 47.4 4.4 2.5 15.2 6 25.5 6.5 25.3 1.1 61.3 1.5 61.3 1.5-13.2-59.4-33.7-56.1-113-55.4zm169.1 123.4c-3.2-5.3-6.9-7.3-6.9-7.3-24.8 7.3-52.2 6.9-75.9 0 0 0-2.9 1.5-6.4 6.6-2.8 4.1-3.7 9.6-3.7 9.6 29.1 17.6 67.1 17.6 96.2 0-.1-.1-.3-4-3.3-8.9z"],
- "nintendo-switch": [448, 512, [], "f418", "M95.9 33.5c-44.6 8-80.5 41-91.8 84.4C0 133.6-.3 142.8.2 264.4.4 376 .5 378.6 2.4 387.3c10.3 46.5 43.3 79.6 90.3 90.5 6.1 1.4 13.9 1.7 64.1 1.9 51.9.4 57.3.3 58.7-1.1 1.4-1.4 1.5-19.3 1.5-222.2 0-150.5-.3-221.3-.9-222.6-.9-1.7-2.5-1.8-56.9-1.7-44.2.1-57.5.4-63.3 1.4zm83.9 222.6V444l-37.8-.5c-34.8-.4-38.5-.6-45.5-2.3-29.9-7.7-52-30.7-58.3-60.7-2-9.4-2-240.1-.1-249.3 5.6-26.1 23.7-47.7 48-57.4 12.2-4.9 17.9-5.5 57.6-5.6l35.9-.1v188zm-75.9-131.2c-5.8 1.1-14.7 5.6-19.5 9.7-9.7 8.4-14.6 20.4-13.8 34.5.4 7.3.8 9.3 3.8 15.2 4.4 9 10.9 15.6 19.9 20 6.2 3.1 7.8 3.4 15.9 3.7 7.3.3 9.9 0 14.8-1.7 20.1-6.8 32.3-26.3 28.8-46.4-3.9-23.7-26.6-39.7-49.9-35zm158.2-92.3c-.4.3-.6 100.8-.6 223.5 0 202.3.1 222.8 1.5 223.4 2.5.9 74.5.6 83.4-.4 37.7-4.3 71-27.2 89-61.2 2.3-4.4 5.4-11.7 7-16.2 5.8-17.4 5.7-12.8 5.7-146.1 0-106.4-.2-122.3-1.5-129-9.2-48.3-46.1-84.8-94.5-93.1-6.5-1.1-16.5-1.4-48.8-1.4-22.4-.1-40.9.2-41.2.5zm99.1 202.1c14.5 3.8 26.3 14.8 31.2 28.9 3.1 8.7 3 21.5-.1 29.5-5.7 14.7-16.8 25-31.1 28.8-23.2 6-47.9-8-54.6-31-2-7-1.9-18.9.4-26.2 6.9-22.7 31-36.1 54.2-30z"],
- "node": [640, 512, [], "f419", "M316.3 452c-2.1 0-4.2-.6-6.1-1.6L291 439c-2.9-1.6-1.5-2.2-.5-2.5 3.8-1.3 4.6-1.6 8.7-4 .4-.2 1-.1 1.4.1l14.8 8.8c.5.3 1.3.3 1.8 0L375 408c.5-.3.9-.9.9-1.6v-66.7c0-.7-.3-1.3-.9-1.6l-57.8-33.3c-.5-.3-1.2-.3-1.8 0l-57.8 33.3c-.6.3-.9 1-.9 1.6v66.7c0 .6.4 1.2.9 1.5l15.8 9.1c8.6 4.3 13.9-.8 13.9-5.8v-65.9c0-.9.7-1.7 1.7-1.7h7.3c.9 0 1.7.7 1.7 1.7v65.9c0 11.5-6.2 18-17.1 18-3.3 0-6 0-13.3-3.6l-15.2-8.7c-3.7-2.2-6.1-6.2-6.1-10.5v-66.7c0-4.3 2.3-8.4 6.1-10.5l57.8-33.4c3.7-2.1 8.5-2.1 12.1 0l57.8 33.4c3.7 2.2 6.1 6.2 6.1 10.5v66.7c0 4.3-2.3 8.4-6.1 10.5l-57.8 33.4c-1.7 1.1-3.8 1.7-6 1.7zm46.7-65.8c0-12.5-8.4-15.8-26.2-18.2-18-2.4-19.8-3.6-19.8-7.8 0-3.5 1.5-8.1 14.8-8.1 11.9 0 16.3 2.6 18.1 10.6.2.8.8 1.3 1.6 1.3h7.5c.5 0 .9-.2 1.2-.5.3-.4.5-.8.4-1.3-1.2-13.8-10.3-20.2-28.8-20.2-16.5 0-26.3 7-26.3 18.6 0 12.7 9.8 16.1 25.6 17.7 18.9 1.9 20.4 4.6 20.4 8.3 0 6.5-5.2 9.2-17.4 9.2-15.3 0-18.7-3.8-19.8-11.4-.1-.8-.8-1.4-1.7-1.4h-7.5c-.9 0-1.7.7-1.7 1.7 0 9.7 5.3 21.3 30.6 21.3 18.5 0 29-7.2 29-19.8zm54.5-50.1c0 6.1-5 11.1-11.1 11.1s-11.1-5-11.1-11.1c0-6.3 5.2-11.1 11.1-11.1 6-.1 11.1 4.8 11.1 11.1zm-1.8 0c0-5.2-4.2-9.3-9.4-9.3-5.1 0-9.3 4.1-9.3 9.3 0 5.2 4.2 9.4 9.3 9.4 5.2-.1 9.4-4.3 9.4-9.4zm-4.5 6.2h-2.6c-.1-.6-.5-3.8-.5-3.9-.2-.7-.4-1.1-1.3-1.1h-2.2v5h-2.4v-12.5h4.3c1.5 0 4.4 0 4.4 3.3 0 2.3-1.5 2.8-2.4 3.1 1.7.1 1.8 1.2 2.1 2.8.1 1 .3 2.7.6 3.3zm-2.8-8.8c0-1.7-1.2-1.7-1.8-1.7h-2v3.5h1.9c1.6 0 1.9-1.1 1.9-1.8zM137.3 191c0-2.7-1.4-5.1-3.7-6.4l-61.3-35.3c-1-.6-2.2-.9-3.4-1h-.6c-1.2 0-2.3.4-3.4 1L3.7 184.6C1.4 185.9 0 188.4 0 191l.1 95c0 1.3.7 2.5 1.8 3.2 1.1.7 2.5.7 3.7 0L42 268.3c2.3-1.4 3.7-3.8 3.7-6.4v-44.4c0-2.6 1.4-5.1 3.7-6.4l15.5-8.9c1.2-.7 2.4-1 3.7-1 1.3 0 2.6.3 3.7 1l15.5 8.9c2.3 1.3 3.7 3.8 3.7 6.4v44.4c0 2.6 1.4 5.1 3.7 6.4l36.4 20.9c1.1.7 2.6.7 3.7 0 1.1-.6 1.8-1.9 1.8-3.2l.2-95zM472.5 87.3v176.4c0 2.6-1.4 5.1-3.7 6.4l-61.3 35.4c-2.3 1.3-5.1 1.3-7.4 0l-61.3-35.4c-2.3-1.3-3.7-3.8-3.7-6.4v-70.8c0-2.6 1.4-5.1 3.7-6.4l61.3-35.4c2.3-1.3 5.1-1.3 7.4 0l15.3 8.8c1.7 1 3.9-.3 3.9-2.2v-94c0-2.8 3-4.6 5.5-3.2l36.5 20.4c2.3 1.2 3.8 3.7 3.8 6.4zm-46 128.9c0-.7-.4-1.3-.9-1.6l-21-12.2c-.6-.3-1.3-.3-1.9 0l-21 12.2c-.6.3-.9.9-.9 1.6v24.3c0 .7.4 1.3.9 1.6l21 12.1c.6.3 1.3.3 1.8 0l21-12.1c.6-.3.9-.9.9-1.6v-24.3zm209.8-.7c2.3-1.3 3.7-3.8 3.7-6.4V192c0-2.6-1.4-5.1-3.7-6.4l-60.9-35.4c-2.3-1.3-5.1-1.3-7.4 0l-61.3 35.4c-2.3 1.3-3.7 3.8-3.7 6.4v70.8c0 2.7 1.4 5.1 3.7 6.4l60.9 34.7c2.2 1.3 5 1.3 7.3 0l36.8-20.5c2.5-1.4 2.5-5 0-6.4L550 241.6c-1.2-.7-1.9-1.9-1.9-3.2v-22.2c0-1.3.7-2.5 1.9-3.2l19.2-11.1c1.1-.7 2.6-.7 3.7 0l19.2 11.1c1.1.7 1.9 1.9 1.9 3.2v17.4c0 2.8 3.1 4.6 5.6 3.2l36.7-21.3zM559 219c-.4.3-.7.7-.7 1.2v13.6c0 .5.3 1 .7 1.2l11.8 6.8c.4.3 1 .3 1.4 0L584 235c.4-.3.7-.7.7-1.2v-13.6c0-.5-.3-1-.7-1.2l-11.8-6.8c-.4-.3-1-.3-1.4 0L559 219zm-254.2 43.5v-70.4c0-2.6-1.6-5.1-3.9-6.4l-61.1-35.2c-2.1-1.2-5-1.4-7.4 0l-61.1 35.2c-2.3 1.3-3.9 3.7-3.9 6.4v70.4c0 2.8 1.9 5.2 4 6.4l61.2 35.2c2.4 1.4 5.2 1.3 7.4 0l61-35.2c1.8-1 3.1-2.7 3.6-4.7.1-.5.2-1.1.2-1.7zm-74.3-124.9l-.8.5h1.1l-.3-.5zm76.2 130.2l-.4-.7v.9l.4-.2z"],
- "node-js": [448, 512, [], "f3d3", "M224 480c-6 0-12-1.6-17.2-4.6L151.9 443c-8.2-4.6-4.2-6.2-1.5-7.1 10.9-3.8 13.1-4.7 24.8-11.3 1.2-.7 2.8-.4 4.1.3l42.1 25c1.5.8 3.7.8 5.1 0l164.2-94.8c1.5-.9 2.5-2.6 2.5-4.4V161.2c0-1.9-1-3.6-2.5-4.5L226.5 62c-1.5-.9-3.5-.9-5.1 0l-164 94.7c-1.6.9-2.6 2.7-2.6 4.5v189.5c0 1.8 1 3.5 2.6 4.4l45 26c24.4 12.2 39.3-2.2 39.3-16.6V177.4c0-2.6 2.1-4.7 4.8-4.7h20.8c2.6 0 4.8 2.1 4.8 4.7v187.1c0 32.6-17.7 51.2-48.6 51.2-9.5 0-17 0-37.8-10.3l-43.1-24.8C32 374.5 25.4 363 25.4 350.7V161.2c0-12.3 6.6-23.8 17.2-29.9l164.2-94.9c10.4-5.9 24.2-5.9 34.5 0l164.2 94.9c10.6 6.1 17.2 17.6 17.2 29.9v189.5c0 12.3-6.6 23.8-17.2 29.9l-164.2 94.8c-5.3 3-11.3 4.6-17.3 4.6zm132.5-186.8c0-35.5-24-44.9-74.4-51.6-51-6.7-56.2-10.2-56.2-22.2 0-9.9 4.4-23 42.2-23 33.7 0 46.2 7.3 51.3 30 .4 2.1 2.4 3.7 4.6 3.7h21.3c1.3 0 2.6-.6 3.5-1.5.9-1 1.4-2.3 1.3-3.7-3.3-39.2-29.3-57.4-81.9-57.4-46.8 0-74.7 19.8-74.7 52.9 0 35.9 27.8 45.9 72.7 50.3 53.8 5.3 57.9 13.1 57.9 23.7 0 18.3-14.7 26.2-49.3 26.2-43.4 0-53-10.9-56.2-32.5-.4-2.3-2.3-4-4.7-4h-21.2c-2.6 0-4.7 2.1-4.7 4.7 0 27.7 15.1 60.6 86.9 60.6 51.8.1 81.6-20.4 81.6-56.2z"],
- "npm": [576, 512, [], "f3d4", "M288 288h-32v-64h32v64zm288-128v192H288v32H160v-32H0V160h576zm-416 32H32v128h64v-96h32v96h32V192zm160 0H192v160h64v-32h64V192zm224 0H352v128h64v-96h32v96h32v-96h32v96h32V192z"],
- "ns8": [640, 512, [], "f3d5", "M187.1 159.9l-34.2 113.7-54.5-113.7H49L0 320h44.9L76 213.5 126.6 320h56.9L232 159.9h-44.9zm452.5-.9c-2.9-18-23.9-28.1-42.1-31.3-44.6-7.8-101.9 16.3-88.5 58.8v.1c-43.8 8.7-74.3 26.8-94.2 48.2-3-9.8-13.6-16.6-34-16.6h-87.6c-9.3 0-12.9-2.3-11.5-7.4 1.6-5.5 1.9-6.8 3.7-12.2 2.1-6.4 7.8-7.1 13.3-7.1h133.5l9.7-31.5c-139.7 0-144.5-.5-160.1 1.2-12.3 1.3-23.5 4.8-30.6 15-6.8 9.9-14.4 35.6-17.6 47.1-5.4 19.4-.6 28.6 32.8 28.6h87.3c7.8 0 8.8 2.7 7.7 6.6-1.1 4.4-2.8 10-4.5 14.6-1.6 4.2-4.7 7.4-13.8 7.4H216.3L204.7 320c139.9 0 145.3-.6 160.9-2.3 6.6-.7 13-2.1 18.5-4.9.2 3.7.5 7.3 1.2 10.8 5.4 30.5 27.4 52.3 56.8 59.5 48.6 11.9 108.7-16.8 135.1-68 18.7-36.2 14.1-76.2-3.4-105.5h.1c29.6-5.9 70.3-22 65.7-50.6zM530.7 263.7c-5.9 29.5-36.6 47.8-61.6 43.9-30.9-4.8-38.5-39.5-14.1-64.8 16.2-16.8 45.2-24 68.5-26.9 6.7 14.1 10.3 32 7.2 47.8zm21.8-83.1c-4.2-6-9.8-18.5-2.5-26.3 6.7-7.2 20.9-10.1 31.8-7.7 15.3 3.4 19.7 15.9 4.9 24.4-10.7 6.1-23.6 8.1-34.2 9.6z"],
- "nutritionix": [400, 512, [], "f3d6", "M88 8.1S221.4-.1 209 112.5c0 0 19.1-74.9 103-40.6 0 0-17.7 74-88 56 0 0 14.6-54.6 66.1-56.6 0 0-39.9-10.3-82.1 48.8 0 0-19.8-94.5-93.6-99.7 0 0 75.2 19.4 77.6 107.5 0 .1-106.4 7-104-119.8zm312 315.6c0 48.5-9.7 95.3-32 132.3-42.2 30.9-105 48-168 48-62.9 0-125.8-17.1-168-48C9.7 419 0 372.2 0 323.7 0 275.3 17.7 229 40 192c42.2-30.9 97.1-48.6 160-48.6 63 0 117.8 17.6 160 48.6 22.3 37 40 83.3 40 131.7zM120 428c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zM192 428c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zM264 428c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zM336 428c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm24-39.6c-4.8-22.3-7.4-36.9-16-56-38.8-19.9-90.5-32-144-32S94.8 180.1 56 200c-8.8 19.5-11.2 33.9-16 56 42.2-7.9 98.7-14.8 160-14.8s117.8 6.9 160 14.8z"],
- "odnoklassniki": [320, 512, [], "f263", "M275.1 334c-27.4 17.4-65.1 24.3-90 26.9l20.9 20.6 76.3 76.3c27.9 28.6-17.5 73.3-45.7 45.7-19.1-19.4-47.1-47.4-76.3-76.6L84 503.4c-28.2 27.5-73.6-17.6-45.4-45.7 19.4-19.4 47.1-47.4 76.3-76.3l20.6-20.6c-24.6-2.6-62.9-9.1-90.6-26.9-32.6-21-46.9-33.3-34.3-59 7.4-14.6 27.7-26.9 54.6-5.7 0 0 36.3 28.9 94.9 28.9s94.9-28.9 94.9-28.9c26.9-21.1 47.1-8.9 54.6 5.7 12.4 25.7-1.9 38-34.5 59.1zM30.3 129.7C30.3 58 88.6 0 160 0s129.7 58 129.7 129.7c0 71.4-58.3 129.4-129.7 129.4s-129.7-58-129.7-129.4zm66 0c0 35.1 28.6 63.7 63.7 63.7s63.7-28.6 63.7-63.7c0-35.4-28.6-64-63.7-64s-63.7 28.6-63.7 64z"],
- "odnoklassniki-square": [448, 512, [], "f264", "M184.2 177.1c0-22.1 17.9-40 39.8-40s39.8 17.9 39.8 40c0 22-17.9 39.8-39.8 39.8s-39.8-17.9-39.8-39.8zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-305.1 97.1c0 44.6 36.4 80.9 81.1 80.9s81.1-36.2 81.1-80.9c0-44.8-36.4-81.1-81.1-81.1s-81.1 36.2-81.1 81.1zm174.5 90.7c-4.6-9.1-17.3-16.8-34.1-3.6 0 0-22.7 18-59.3 18s-59.3-18-59.3-18c-16.8-13.2-29.5-5.5-34.1 3.6-7.9 16.1 1.1 23.7 21.4 37 17.3 11.1 41.2 15.2 56.6 16.8l-12.9 12.9c-18.2 18-35.5 35.5-47.7 47.7-17.6 17.6 10.7 45.8 28.4 28.6l47.7-47.9c18.2 18.2 35.7 35.7 47.7 47.9 17.6 17.2 46-10.7 28.6-28.6l-47.7-47.7-13-12.9c15.5-1.6 39.1-5.9 56.2-16.8 20.4-13.3 29.3-21 21.5-37z"],
- "opencart": [640, 512, [], "f23d", "M423.3 440.7c0 25.3-20.3 45.6-45.6 45.6s-45.8-20.3-45.8-45.6 20.6-45.8 45.8-45.8c25.4 0 45.6 20.5 45.6 45.8zm-253.9-45.8c-25.3 0-45.6 20.6-45.6 45.8s20.3 45.6 45.6 45.6 45.8-20.3 45.8-45.6-20.5-45.8-45.8-45.8zm291.7-270C158.9 124.9 81.9 112.1 0 25.7c34.4 51.7 53.3 148.9 373.1 144.2 333.3-5 130 86.1 70.8 188.9 186.7-166.7 319.4-233.9 17.2-233.9z"],
- "openid": [448, 512, [], "f19b", "M271.5 432l-68 32C88.5 453.7 0 392.5 0 318.2c0-71.5 82.5-131 191.7-144.3v43c-71.5 12.5-124 53-124 101.3 0 51 58.5 93.3 135.7 103v-340l68-33.2v384zM448 291l-131.3-28.5 36.8-20.7c-19.5-11.5-43.5-20-70-24.8v-43c46.2 5.5 87.7 19.5 120.3 39.3l35-19.8L448 291z"],
- "opera": [496, 512, [], "f26a", "M313.9 32.7c-170.2 0-252.6 223.8-147.5 355.1 36.5 45.4 88.6 75.6 147.5 75.6 36.3 0 70.3-11.1 99.4-30.4-43.8 39.2-101.9 63-165.3 63-3.9 0-8 0-11.9-.3C104.6 489.6 0 381.1 0 248 0 111 111 0 248 0h.8c63.1.3 120.7 24.1 164.4 63.1-29-19.4-63.1-30.4-99.3-30.4zm101.8 397.7c-40.9 24.7-90.7 23.6-132-5.8 56.2-20.5 97.7-91.6 97.7-176.6 0-84.7-41.2-155.8-97.4-176.6 41.8-29.2 91.2-30.3 132.9-5 105.9 98.7 105.5 265.7-1.2 364z"],
- "optin-monster": [576, 512, [], "f23c", "M550.671 450.303c0 11.62-15.673 19.457-32.158 14.863-12.16-3.243-31.346-17.565-36.211-27.294-5.674-11.62 4.054-32.698 18.916-30.806 15.674 1.621 49.453 25.401 49.453 43.237zM372.86 75.223c-3.783-72.151-100.796-79.718-125.928-23.51 44.588-24.321 90.257-15.673 125.928 23.51zM74.795 407.066c-15.673 1.621-49.452 25.401-49.452 43.237 0 11.62 15.673 19.457 32.157 14.863 12.16-3.243 31.076-17.565 35.94-27.294 5.946-11.62-3.782-32.698-18.645-30.806zm497.765 14.322c1.081 3.513 1.892 7.026 1.892 10.809.81 31.616-44.317 64.045-73.503 65.125-17.295.81-34.59-8.377-42.696-23.51-113.497 4.053-226.994 4.864-340.22 0-8.377 15.133-25.672 24.05-42.967 23.51-28.915-1.081-74.043-33.509-73.503-65.125.27-3.783.811-7.296 1.892-10.809-5.566-9.463-4.845-15.282 5.405-11.62 3.243-5.134 7.026-9.458 11.08-13.782-2.57-10.917 1.27-14.094 11.079-9.188 4.594-3.243 9.998-6.485 15.944-9.188 0-15.757 11.839-11.131 17.295-5.675 12.467-1.78 20.129.709 26.753 5.675v-19.726c-12.987 0-40.641-11.375-45.94-36.212-4.974-20.725 2.607-38.075 25.132-47.56.81-5.945 8.107-14.052 14.862-15.944 7.567-1.892 12.431 4.594 14.052 10.269 7.425 0 17.757 1.465 21.078 8.107 5.405-.541 11.079-1.352 16.484-1.892-2.432-1.892-5.134-3.513-8.107-4.594-5.134-8.917-13.782-11.079-24.591-11.62 0-.81 0-1.621.27-2.702-19.727-.541-44.048-5.675-54.857-17.835-21.321-23.638-15.935-83.577 12.16-103.498 8.377-5.675 21.618-.811 22.699 9.728 2.425 20.598.399 26.833 26.212 25.942 8.107-7.836 16.755-14.592 26.483-19.997-14.862-1.352-28.914 1.621-43.778 3.783 12.752-12.48 23.953-25.442 56.748-42.427 23.511-11.89 49.993-20.808 76.205-23.239-18.646-7.837-39.993-11.891-59.721-16.484 76.475-16.214 174.569-22.159 244.289 37.562 18.105 15.403 32.427 36.211 42.696 59.992 39.799 4.853 36.47-5.581 38.643-25.132 1.081-10.269 14.322-15.403 22.699-9.458 14.862 10.539 22.159 30.806 24.59 48.101 2.162 17.835.27 41.345-12.43 55.127-10.809 12.16-34.32 17.565-53.776 18.105v2.703c-11.08.27-20.268 2.432-25.673 11.62-2.972 1.081-5.674 2.703-8.377 4.594 5.675.54 11.35 1.351 16.755 1.891 1.869-5.619 12.535-8.377 21.077-8.377 1.621-5.405 6.756-11.89 14.052-10.269s14.052 9.998 14.863 15.944c10.809 4.324 22.159 12.16 25.131 25.672 1.892 8.107 1.621 15.133.27 21.888-5.726 25.262-33.361 36.212-45.939 36.212 0 6.756 0 13.241-.27 19.726 8.01-6.006 16.367-7.158 26.752-5.675 5.919-5.919 17.565-9.41 17.565 5.675 5.675 2.703 11.349 5.945 15.944 9.188 10.1-5.051 13.669-.539 10.809 9.188 4.053 4.323 8.107 8.917 11.079 13.782 10.136-3.62 11.021 2.078 5.409 11.62zm-73.773-254.016c17.295 6.756 26.212 22.159 30.265 35.67 1.081-10.539-2.702-39.453-13.782-51.073-7.296-7.296-14.052-5.134-14.052.81.001 6.216-1.35 11.62-2.431 14.593zm-18.646 12.43c12.971 15.673 17.024 41.615 12.7 62.963 10.809-2.162 20.537-6.215 26.212-12.16 1.892-2.162 3.783-4.864 4.864-7.566-1.081-21.348-10.269-42.697-29.725-48.912-3.242 3.243-9.187 4.864-14.051 5.675zm-21.889.811c7.567 20.537 12.431 42.696 14.322 64.585 3.513 0 7.567-.27 11.62-.811 5.945-24.321-.27-51.614-14.052-63.504-3.783 0-8.107 0-11.89-.27zM77.768 167.372c-1.081-2.973-2.432-8.377-2.432-14.593 0-5.945-7.026-8.107-14.052-.81-11.35 11.62-14.863 40.534-13.782 51.073 4.053-13.512 12.971-28.915 30.266-35.67zm5.675 75.394c-4.324-21.348-.27-47.291 12.701-62.963-4.865-.811-10.809-2.432-14.052-5.675-19.457 6.215-28.375 27.563-29.726 48.912 1.351 2.702 2.972 5.404 4.864 7.566 5.675 6.215 15.403 9.998 26.213 12.16zm41.345-61.073c-5.134 1.081-9.998 2.973-14.862 4.865l-12.16 5.134v-.27c-7.296 14.052-9.999 34.319-5.405 52.965 4.594.541 8.647.811 12.7.811 2.432-22.159 9.188-43.778 19.727-63.505zm88.095-23.239c0 42.155 34.319 76.205 76.205 76.205s76.205-34.05 76.205-76.205c0-41.886-34.319-75.935-76.205-75.935s-76.205 34.049-76.205 75.935zm152.41 97.283c9.969 50.608 3.299 64.692 16.484 58.099 15.944-8.107 22.699-39.183 22.97-57.019-12.971-.81-26.213-.81-39.454-1.08zm-71.611-.541v-.27c-.27 5.134.27 38.103 4.324 41.075 11.079 5.405 39.453 4.594 51.073 1.081 5.405-1.621 2.432-37.022 1.621-41.886-18.916-.27-38.102-.27-57.018 0zm-14.053 0v-.27c-19.456.27-38.642.27-57.829.811-1.892 9.187-4.594 48.911 1.892 51.614 12.971 5.675 41.616 5.134 54.586 1.621 4.595-2.432 2.433-45.399 1.351-53.776zm-85.662 57.56c5.405 2.432 8.647 2.432 9.728-4.324 1.892-8.647 2.432-36.752 4.865-52.155-12.16.27-24.591.811-36.752 1.621-5.405 19.727.27 45.129 22.159 54.858zm-65.666-11.08c43.778 47.02 92.689 85.663 155.923 106.47 67.558-19.186 115.659-59.991 163.219-107.011-11.095-4.315-7.715-10.363-7.296-11.62-8.918-.81-17.835-1.892-26.483-2.702-9.458 32.968-35.94 52.965-46.75 31.616-2.702-5.134-3.513-11.62-4.594-16.754-3.783 8.377-13.242 8.107-24.591 8.918-13.241 1.081-31.617 1.351-44.048-2.972-2.972 12.971-11.079 12.971-26.752 14.322-14.052 1.352-48.642 4.054-54.857-10.809-1.081 28.644-35.13 9.998-45.129-7.026-3.243-5.675-5.405-11.35-7.026-17.565-7.837.81-15.673 1.621-23.511 2.702 2.443 3.663 1.549 9.052-8.105 12.431zM115.6 453.545c-5.674-23.239-18.646-49.722-33.508-54.046-22.429-6.756-68.909 23.51-66.207 54.586 12.701 19.457 39.994 35.67 59.181 36.481 17.835.81 35.94-11.08 39.724-28.914.539-2.432.81-5.134.81-8.107zm7.296-5.944c33.509-19.457 69.179-35.671 105.931-47.02-38.643-20.537-68.098-47.831-97.283-77.016-2.162 1.352-5.134 2.432-7.836 3.513-1.637 4.91 8.718 5.33 5.405 12.431-2.162 4.054-8.648 7.567-15.133 9.188-2.161 2.702-5.134 4.864-7.836 6.485h-.27c-.27 13.511-.27 27.024.27 40.535 8.939 15.964 15.426 33.314 16.752 51.884zm320.764 12.7c-36.752-21.348-74.044-41.345-115.659-52.965-13.782 6.215-27.833 11.349-42.155 15.403-2.162.811-2.162.811-4.324 0-11.89-3.783-23.239-8.107-34.859-13.241-40.265 11.62-77.286 29.185-112.416 50.803h-.27v.27c.27 0 .27 0 .27-.27 103.227 4.054 206.455 3.513 309.413 0zm27.023-64.045l-.27.27c.541-13.782.811-27.563.811-41.345-2.973-1.621-5.675-4.054-8.107-6.756-6.485-1.351-12.971-5.134-15.133-8.918-1.892-4.053 1.351-7.566 5.945-10.269-.27-.541-.541-1.621-.541-2.432-2.972-.811-5.405-1.892-7.567-3.243-31.616 29.455-65.396 56.749-103.498 76.746 38.914 11.62 75.935 28.104 111.875 47.561 1.05-14.692 7.231-35.749 16.485-51.614zm23.24 3.244c-14.593 4.323-27.834 30.806-33.509 54.046 0 23.826 21.278 37.897 40.534 37.022 19.186-.811 46.48-17.024 59.181-36.481 2.973-31.077-43.507-61.344-66.206-54.587zM290.709 134.133c.045 0 .089.003.134.003.046 0 .09-.003.136-.003h-.27zm0 96.743c28.645 0 51.884-21.618 51.884-48.371 0-36.092-40.507-58.079-72.151-44.318 9.458 2.972 16.484 11.62 16.484 21.618 0 23.257-33.291 31.955-46.48 11.35-7.297 34.067 19.368 59.721 50.263 59.721zM68.039 474.083c.54 6.486 12.16 12.701 21.618 9.458 6.756-2.703 14.593-10.539 17.295-16.214 2.973-7.026-1.081-19.997-9.728-18.375-8.917 1.621-29.725 16.754-29.185 25.131zm410.75-25.131c-8.377-1.621-12.431 11.349-9.458 18.375 2.432 5.675 10.269 13.511 17.295 16.214 9.187 3.243 21.078-2.972 21.348-9.458.811-8.377-20.267-23.51-29.185-25.131z"],
- "osi": [495, 512, [], "f41a", "M0 259.2C2.3 123.4 97.4 26.8 213.8 11.1c138.8-18.6 255.6 75.8 278 201.1 21.3 118.8-44 230-151.6 274-9.3 3.8-14.4 1.7-18-7.7-17.8-46.3-35.6-92.7-53.4-139-3.1-8.1-1-13.2 7-16.8 24.2-11 39.3-29.4 43.3-55.8 6.4-42.4-24.5-78.7-64.5-82.2-39-3.4-71.8 23.7-77.5 59.7-5.2 33 11.1 63.7 41.9 77.7 9.6 4.4 11.5 8.6 7.8 18.4-17.9 46.6-35.8 93.2-53.7 139.9-2.6 6.9-8.3 9.3-15.5 6.5-52.6-20.3-101.4-61-130.8-119C1.9 318.7 1.6 280.2 0 259.2zm20.9-1.9c.4 6.6.6 14.3 1.3 22.1 6.3 71.9 49.6 143.5 131 183.1 3.2 1.5 4.4.8 5.6-2.3 14.9-39.1 29.9-78.2 45-117.3 1.3-3.3.6-4.8-2.4-6.7-31.6-19.9-47.3-48.5-45.6-86 1-21.6 9.3-40.5 23.8-56.3 30-32.7 77-39.8 115.5-17.6 31.9 18.4 49.5 53.8 45.2 90.4-3.6 30.6-19.3 53.9-45.7 69.8-2.7 1.6-3.5 2.9-2.3 6 15.2 39.2 30.2 78.4 45.2 117.7 1.2 3.1 2.4 3.8 5.6 2.3 35.5-16.6 65.2-40.3 88.1-72 34.8-48.2 49.1-101.9 42.3-161C459.8 112 354.1 14.7 218 31.5 111.9 44.5 22.7 134 20.9 257.3z"],
- "page4": [496, 512, [], "f3d7", "M248 504C111 504 0 393 0 256S111 8 248 8c20.9 0 41.3 2.6 60.7 7.5L42.3 392H248v112zm0-143.6V146.8L98.6 360.4H248zm96 31.6v92.7c45.7-19.2 84.5-51.7 111.4-92.7H344zm57.4-138.2l-21.2 8.4 21.2 8.3v-16.7zm-20.3 54.5c-6.7 0-8 6.3-8 12.9v7.7h16.2v-10c0-5.9-2.3-10.6-8.2-10.6zM496 256c0 37.3-8.2 72.7-23 104.4H344V27.3C433.3 64.8 496 153.1 496 256zM360.4 143.6h68.2V96h-13.9v32.6h-13.9V99h-13.9v29.6h-12.7V96h-13.9v47.6zm68.1 185.3H402v-11c0-15.4-5.6-25.2-20.9-25.2-15.4 0-20.7 10.6-20.7 25.9v25.3h68.2v-15zm0-103l-68.2 29.7V268l68.2 29.5v-16.6l-14.4-5.7v-26.5l14.4-5.9v-16.9zm-4.8-68.5h-35.6V184H402v-12.2h11c8.6 15.8 1.3 35.3-18.6 35.3-22.5 0-28.3-25.3-15.5-37.7l-11.6-10.6c-16.2 17.5-12.2 63.9 27.1 63.9 34 0 44.7-35.9 29.3-65.3z"],
- "pagelines": [384, 512, [], "f18c", "M384 312.7c-55.1 136.7-187.1 54-187.1 54-40.5 81.8-107.4 134.4-184.6 134.7-16.1 0-16.6-24.4 0-24.4 64.4-.3 120.5-42.7 157.2-110.1-41.1 15.9-118.6 27.9-161.6-82.2 109-44.9 159.1 11.2 178.3 45.5 9.9-24.4 17-50.9 21.6-79.7 0 0-139.7 21.9-149.5-98.1 119.1-47.9 152.6 76.7 152.6 76.7 1.6-16.7 3.3-52.6 3.3-53.4 0 0-106.3-73.7-38.1-165.2 124.6 43 61.4 162.4 61.4 162.4.5 1.6.5 23.8 0 33.4 0 0 45.2-89 136.4-57.5-4.2 134-141.9 106.4-141.9 106.4-4.4 27.4-11.2 53.4-20 77.5 0 0 83-91.8 172-20z"],
- "palfed": [560, 512, [], "f3d8", "M376.9 194.1c0-47.4-55.2-44.2-95.4-29.8-1.3 39.4-2.5 80.7-3 119.8.7 2.8 2.6 6.2 15.1 6.2 36.7-.1 83.3-42.9 83.3-96.2zm-194.5 72.2c.2 0 6.5-2.7 11.2-2.7 26.6 0 20.7 44.1-14.4 44.1-21.5 0-37.1-18.1-37.1-43 0-42 42.9-95.6 100.7-126.5 1-12.4 3-22 10.5-28.2 11.2-9 26.6-3.5 29.5 11.1 72.2-22.2 135.2 1 135.2 72 0 77.9-79.3 152.6-140.1 138.2-.1 39.4.9 74.4 2.7 100v.2c.2 3.4.6 12.5-5.3 19.1-9.6 10.6-33.4 10-36.4-22.3-4.1-44.4.2-206.1 1.4-242.5-21.5 15-58.5 50.3-58.5 75.9.1 2.4.3 3.9.6 4.6zM0 181.3s-.1 37.4 38.4 37.4h30l22.4 217.2s0 44.3 44.7 44.3h288.9s44.7-.4 44.7-44.3l22.4-217.2h30s38.4 1.2 38.4-37.4c0 0 .1-37.4-38.4-37.4h-30.1c-7.3-25.6-30.2-74.3-119.4-74.3h-28V50.5s-2.7-18.4-21.1-18.4h-85.8s-21.1 0-21.1 18.4v19.1h-28.1s-105 4.2-120.5 74.3h-29S0 142.7 0 181.3z"],
- "patreon": [512, 512, [], "f3d9", "M489.6 200.2c0 92.5-75.2 167.7-167.7 167.7-92.7 0-168.2-75.2-168.2-167.7 0-92.7 75.5-168.2 168.2-168.2 92.5 0 167.7 75.4 167.7 168.2zM22.4 480h82.1V32H22.4v448z"],
- "paypal": [384, 512, [], "f1ed", "M111.4 295.9c-3.5 19.2-17.4 108.7-21.5 134-.3 1.8-1 2.5-3 2.5H12.3c-7.6 0-13.1-6.6-12.1-13.9L58.8 46.6c1.5-9.6 10.1-16.9 20-16.9 152.3 0 165.1-3.7 204 11.4 60.1 23.3 65.6 79.5 44 140.3-21.5 62.6-72.5 89.5-140.1 90.3-43.4.7-69.5-7-75.3 24.2zM357.1 152c-1.8-1.3-2.5-1.8-3 1.3-2 11.4-5.1 22.5-8.8 33.6-39.9 113.8-150.5 103.9-204.5 103.9-6.1 0-10.1 3.3-10.9 9.4-22.6 140.4-27.1 169.7-27.1 169.7-1 7.1 3.5 12.9 10.6 12.9h63.5c8.6 0 15.7-6.3 17.4-14.9.7-5.4-1.1 6.1 14.4-91.3 4.6-22 14.3-19.7 29.3-19.7 71 0 126.4-28.8 142.9-112.3 6.5-34.8 4.6-71.4-23.8-92.6z"],
- "periscope": [448, 512, [], "f3da", "M370 63.6C331.4 22.6 280.5 0 226.6 0 111.9 0 18.5 96.2 18.5 214.4c0 75.1 57.8 159.8 82.7 192.7C137.8 455.5 192.6 512 226.6 512c41.6 0 112.9-94.2 120.9-105 24.6-33.1 82-118.3 82-192.6 0-56.5-21.1-110.1-59.5-150.8zM226.6 493.9c-42.5 0-190-167.3-190-279.4 0-107.4 83.9-196.3 190-196.3 100.8 0 184.7 89 184.7 196.3.1 112.1-147.4 279.4-184.7 279.4zM338 206.8c0 59.1-51.1 109.7-110.8 109.7-100.6 0-150.7-108.2-92.9-181.8v.4c0 24.5 20.1 44.4 44.8 44.4 24.7 0 44.8-19.9 44.8-44.4 0-18.2-11.1-33.8-26.9-40.7 76.6-19.2 141 39.3 141 112.4z"],
- "phabricator": [496, 512, [], "f3db", "M323 262.1l-.1-13s21.7-19.8 21.1-21.2l-9.5-20c-.6-1.4-29.5-.5-29.5-.5l-9.4-9.3s.2-28.5-1.2-29.1l-20.1-9.2c-1.4-.6-20.7 21-20.7 21l-13.1-.2s-20.5-21.4-21.9-20.8l-20 8.3c-1.4.5.2 28.9.2 28.9l-9.1 9.1s-29.2-.9-29.7.4l-8.1 19.8c-.6 1.4 21 21 21 21l.1 12.9s-21.7 19.8-21.1 21.2l9.5 20c.6 1.4 29.5.5 29.5.5l9.4 9.3s-.2 31.8 1.2 32.3l20.1 8.3c1.4.6 20.7-23.5 20.7-23.5l13.1.2s20.5 23.8 21.8 23.3l20-7.5c1.4-.6-.2-32.1-.2-32.1l9.1-9.1s29.2.9 29.7-.5l8.1-19.8c.7-1.1-20.9-20.7-20.9-20.7zm-44.9-8.7c.7 17.1-12.8 31.6-30.1 32.4-17.3.8-32.1-12.5-32.8-29.6-.7-17.1 12.8-31.6 30.1-32.3 17.3-.8 32.1 12.5 32.8 29.5zm201.2-37.9l-97-97-.1.1c-75.1-73.3-195.4-72.8-269.8 1.6-50.9 51-27.8 27.9-95.7 95.3-22.3 22.3-22.3 58.7 0 81 69.9 69.4 46.4 46 97.4 97l.1-.1c75.1 73.3 195.4 72.9 269.8-1.6 51-50.9 27.9-27.9 95.3-95.3 22.3-22.3 22.3-58.7 0-81zM140.4 363.8c-59.6-59.5-59.6-156 0-215.5 59.5-59.6 156-59.5 215.6 0 59.5 59.5 59.6 156 0 215.6-59.6 59.5-156 59.4-215.6-.1z"],
- "phoenix-framework": [640, 512, [], "f3dc", "M213.2 339.2c3.8-.1 22.9-1.4 25.6-2.2-2.4-2.7-43.6-1-68.1-49.7-4.3-8.7-7.5-17.6-6.4-27.6 2.9-25.5 32.9-30 52.1-18.5 36 21.6 63.4 91.5 113.8 97.6 37.1 4.5 84.7-17 108.3-45.4-.6-.1-.8-.2-1-.1-.4.1-.8.2-1.1.3-33.4 12.1-94.4 9.7-134.8-14.8-37.7-22.8-53.2-58.8-51.9-74.7 1.8-21.4 22.9-23.2 36-19.6 14.4 4 24.4 17.6 39 27.4 15.6 10.4 33 13.7 51.3 10.3 14.9-2.7 34.4-12.3 36.5-14.5-1.1-.1-1.8-.1-2.5-.2-6.2-.6-12.4-.8-18.6-1.7C280.1 189.3 262.5 42 138.7 32.5c-44.4-3.4-99.6 8.1-136.5 35-.8.6-1.5 1.2-2.2 1.8.1.2.1.3.2.5.8-.1 1.6-.1 2.4-.2 6.3-1 12.5-.8 18.8.3 23.9 4.3 47.8 23.1 56 76.6 5.3 34.3-.7 50.9 8 86.2 18.9 77.2 91 107.8 127.8 106.5zM75.4 59.5c-.9-1-.9-1.2-1.3-2 12.1-2.6 24.3-4.1 36.7-4.8-1.1 14.7-22.3 21.4-35.4 6.8zm197.2 350.9c-42.9 1.2-92.1-26.8-123.7-61.5-4.6-5-16.8-20.3-18.6-23.4l.4-.4c6.6 4.1 25.7 18.7 54.9 27.1 24.2 7 48.1 6.3 71.7-3.3 22.7-9.3 41-.5 43.1 2.9-18.5 3.8-20.1 4.4-24.1 7.9-5.1 4.4-4.6 11.7 7 17.2 26.2 12.4 63-2.8 97.3 25.4 2.4 2 8.1 7.8 10.1 10.7-.1.2-.3.3-.4.5-4.8-1.5-16.5-7.5-40.2-9.3-24.7-2-46.3 5.4-77.5 6.2zm175-252.2c16.4-5.2 41.4-13.4 66.6-3.3 16.1 6.5 26.2 18.7 32.1 34.7 3.5 9.4 5.1 19.7 5.1 28.8-.2 0-.4 0-.6.1-.2-.4-.4-.9-.5-1.3-5-22-29.9-43.8-67.7-29.9-50.2 18.6-130.5 9.7-177.2-48-.7-.9-2.4-1.7-1.3-3.2.1-.2 2.1.6 3 1.3 18.1 13.5 38.3 21.9 60.4 26.2 30.6 5.9 54.7 2.6 80.1-5.4zm102.8 117.6c-32.4.2-33.8 50.2-103.7 64.4-18.3 3.7-38.7 4.6-45 4.2v-.4c2.8-1.5 14.7-2.6 29.7-16.6 7.9-7.3 15.3-15.2 22.8-22.9 19.6-20.3 41.5-42.3 82-39 23.1 1.8 29.3 8.2 36.2 12.7.3.2.4.5.7.9-.5 0-.7.1-.9 0-7-2.7-14.3-3.3-21.8-3.3zm-12.3-24.2c-.1.2-.1.4-.2.6-29-4.4-48.1-7.9-68.6 4-17 9.9-31.5 20.6-62.1 24.4-27.1 3.4-45.2 2.4-66.2-8-.3-.2-.6-.4-1-.6 0-.2.1-.3.1-.5 24.9 3.8 36.5 5.2 55.6-5.9 22.4-12.9 40.2-26.7 71.4-31 29.6-3.9 51.3 2.7 71 17zM269 91.9c-.6-.6-1.1-1.2-2.1-2.3 7.6 0 29.7-1.2 53.4 8.4 19.7 8 32.3 21.1 50.3 33 11.1 7.3 23.5 9.3 36.5 8.1 4.3-.4 8.5-1.2 12.8-1.7.4-.1.9 0 1.5.3-.6.4-1.2.9-1.8 1.2-8.1 4-16.7 6.3-25.6 7.2-26.1 2.6-50.4-3.7-73.5-15.4-19.4-10-36.5-23-51.5-38.8zm371.8 238.7c-3.5 3.1-22.7 11.6-42.8 5.3-12.3-3.9-19.5-14.9-31.6-24.1-10-7.6-20.9-7.9-28.2-8.4.6-.8.9-1.2 1.2-1.4 14.8-9.2 30.5-12.2 47.4-6.5 12.5 4.2 19.3 13.5 30.4 24.2 10.8 10.4 21 9.9 23.2 10.5.1-.1.2.1.4.4zM428 467.8c2.2 1.2 1.6 1.5 1.5 2-18.5-1.4-33.9-7.6-46.8-22.2-21.8-24.7-41.8-27.9-48.7-29.7.5-.2.8-.4 1.1-.4 13.1.1 26.2.7 39 3.9 25.3 6.4 35 25.4 41.6 35.4 3.2 4.7 7.4 8.3 12.3 11z"],
- "pied-piper": [640, 512, [], "f2ae", "M640 24.9c-80.8 53.6-89.4 92.5-96.4 104.4-6.7 12.2-11.7 60.3-23.3 83.6-11.7 23.6-54.2 42.2-66.1 50-11.7 7.8-28.3 38.1-41.9 64.2-108.1-4.4-167.4 38.8-259.2 93.6 29.4-9.7 43.3-16.7 43.3-16.7 94.2-36 139.3-68.3 281.1-49.2 1.1 0 1.9.6 2.8.8 3.9 2.2 5.3 6.9 3.1 10.8l-53.9 95.8c-2.5 4.7-7.8 7.2-13.1 6.1-126.8-23.8-226.9 17.3-318.9 18.6C24.1 488 0 453.4 0 451.8c0-1.1.6-1.7 1.7-1.7 0 0 38.3 0 103.1-15.3C178.4 294.5 244 245.4 315.4 245.4c0 0 71.7 0 90.6 61.9 22.8-39.7 28.3-49.2 28.3-49.2 5.3-9.4 35-77.2 86.4-141.4 51.5-64 90.4-79.9 119.3-91.8z"],
- "pied-piper-alt": [576, 512, [], "f1a8", "M242 187c6.3-11.8 13.2-17 25.9-21.8 27.3-10.3 40.2-30.5 58.9-51.1 11.9 8.4 12 24.6 31.6 23v21.8l6.3.3c37.4-14.4 74.7-30.2 106.6-54.6 48.3-36.8 52.9-50 81.3-100l2-2.6c-.6 14.1-6.3 27.3-12.4 39.9-30.5 63.8-78.7 100.3-146.8 116.7-12.4 2.9-26.4 3.2-37.6 8.9 1.4 9.8 13.2 18.1 13.2 23 0 3.4-5.5 7.2-7.5 8.6-11.2-12.9-16.1-19.3-22.7-22.1-7.6-3.5-63.9-6.4-98.8 10zm137.9 256.9c-19 0-64.1 9.5-79.9 19.8l6.9 45.1c35.7 6.1 70.1 3.6 106-9.8-4.8-10-23.5-55.1-33-55.1zM244 246c-3.2-2-6.3-2.9-10.1-2.9-6.6 0-12.6 3.2-19.3 3.7l1.7 4.9L244 246zm-12.6 31.8l24.1 61.2 21-13.8-31.3-50.9-13.8 3.5zM555.5 0l-.6 1.1-.3.9.6-.6.3-1.4zm-59.2 382.1c-33.9-56.9-75.3-118.4-150-115.5l-.3-6c-1.1-13.5 32.8 3.2 35.1-31l-14.4 7.2c-19.8-45.7-8.6-54.3-65.5-54.3-14.7 0-26.7 1.7-41.4 4.6 2.9 18.6 2.2 36.7-10.9 50.3l19.5 5.5c-1.7 3.2-2.9 6.3-2.9 9.8 0 21 42.8 2.9 42.8 33.6 0 18.4-36.8 60.1-54.9 60.1-8 0-53.7-50-53.4-60.1l.3-4.6 52.3-11.5c13-2.6 12.3-22.7-2.9-22.7-3.7 0-43.1 9.2-49.4 10.6-2-5.2-7.5-14.1-13.8-14.1-3.2 0-6.3 3.2-9.5 4-9.2 2.6-31 2.9-21.5 20.1L15.9 298.5c-5.5 1.1-8.9 6.3-8.9 11.8 0 6 5.5 10.9 11.5 10.9 8 0 131.3-28.4 147.4-32.2 2.6 3.2 4.6 6.3 7.8 8.6 20.1 14.4 59.8 85.9 76.4 85.9 24.1 0 58-22.4 71.3-41.9 3.2-4.3 6.9-7.5 12.4-6.9.6 13.8-31.6 34.2-33 43.7-1.4 10.2-1 35.2-.3 41.1 26.7 8.1 52-3.6 77.9-2.9 4.3-21 10.6-41.9 9.8-63.5l-.3-9.5c-1.4-34.2-10.9-38.5-34.8-58.6-1.1-1.1-2.6-2.6-3.7-4 2.2-1.4 1.1-1 4.6-1.7 88.5 0 56.3 183.6 111.5 229.9 33.1-15 72.5-27.9 103.5-47.2-29-25.6-52.6-45.7-72.7-79.9zm-196.2 46v27.3l11.8-3.4-2.9-23.8h-8.9zm76.1 2.9c0-1.4-.6-3.2-.9-4.6-26.8 0-36.9 3.8-59.5 6.3l2 12.4c9-1.5 58.4-6.6 58.4-14.1z"],
- "pied-piper-pp": [448, 512, [], "f1a7", "M205.3 174.6c0 21.1-14.2 38.1-31.7 38.1-7.1 0-12.8-1.2-17.2-3.7v-68c4.4-2.7 10.1-4.2 17.2-4.2 17.5 0 31.7 16.9 31.7 37.8zm52.6 67c-7.1 0-12.8 1.5-17.2 4.2v68c4.4 2.5 10.1 3.7 17.2 3.7 17.4 0 31.7-16.9 31.7-37.8 0-21.1-14.3-38.1-31.7-38.1zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zM185 255.1c41 0 74.2-35.6 74.2-79.6 0-44-33.2-79.6-74.2-79.6-12 0-24.1 3.2-34.6 8.8h-45.7V311l51.8-10.1v-50.6c8.6 3.1 18.1 4.8 28.5 4.8zm158.4 25.3c0-44-33.2-79.6-73.9-79.6-3.2 0-6.4.2-9.6.7-3.7 12.5-10.1 23.8-19.2 33.4-13.8 15-32.2 23.8-51.8 24.8V416l51.8-10.1v-50.6c8.6 3.2 18.2 4.7 28.7 4.7 40.8 0 74-35.6 74-79.6z"],
- "pinterest": [496, 512, [], "f0d2", "M496 256c0 137-111 248-248 248-25.6 0-50.2-3.9-73.4-11.1 10.1-16.5 25.2-43.5 30.8-65 3-11.6 15.4-59 15.4-59 8.1 15.4 31.7 28.5 56.8 28.5 74.8 0 128.7-68.8 128.7-154.3 0-81.9-66.9-143.2-152.9-143.2-107 0-163.9 71.8-163.9 150.1 0 36.4 19.4 81.7 50.3 96.1 4.7 2.2 7.2 1.2 8.3-3.3.8-3.4 5-20.3 6.9-28.1.6-2.5.3-4.7-1.7-7.1-10.1-12.5-18.3-35.3-18.3-56.6 0-54.7 41.4-107.6 112-107.6 60.9 0 103.6 41.5 103.6 100.9 0 67.1-33.9 113.6-78 113.6-24.3 0-42.6-20.1-36.7-44.8 7-29.5 20.5-61.3 20.5-82.6 0-19-10.2-34.9-31.4-34.9-24.9 0-44.9 25.7-44.9 60.2 0 22 7.4 36.8 7.4 36.8s-24.5 103.8-29 123.2c-5 21.4-3 51.6-.9 71.2C65.4 450.9 0 361.1 0 256 0 119 111 8 248 8s248 111 248 248z"],
- "pinterest-p": [384, 512, [], "f231", "M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"],
- "pinterest-square": [448, 512, [], "f0d3", "M448 80v352c0 26.5-21.5 48-48 48H154.4c9.8-16.4 22.4-40 27.4-59.3 3-11.5 15.3-58.4 15.3-58.4 8 15.3 31.4 28.2 56.3 28.2 74.1 0 127.4-68.1 127.4-152.7 0-81.1-66.2-141.8-151.4-141.8-106 0-162.2 71.1-162.2 148.6 0 36 19.2 80.8 49.8 95.1 4.7 2.2 7.1 1.2 8.2-3.3.8-3.4 5-20.1 6.8-27.8.6-2.5.3-4.6-1.7-7-10.1-12.3-18.3-34.9-18.3-56 0-54.2 41-106.6 110.9-106.6 60.3 0 102.6 41.1 102.6 99.9 0 66.4-33.5 112.4-77.2 112.4-24.1 0-42.1-19.9-36.4-44.4 6.9-29.2 20.3-60.7 20.3-81.8 0-53-75.5-45.7-75.5 25 0 21.7 7.3 36.5 7.3 36.5-31.4 132.8-36.1 134.5-29.6 192.6l2.2.8H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48z"],
- "playstation": [576, 512, [], "f3df", "M570.9 372.3c-11.3 14.2-38.8 24.3-38.8 24.3L327 470.2v-54.3l150.9-53.8c17.1-6.1 19.8-14.8 5.8-19.4-13.9-4.6-39.1-3.3-56.2 2.9L327 381.1v-56.4c23.2-7.8 47.1-13.6 75.7-16.8 40.9-4.5 90.9.6 130.2 15.5 44.2 14 49.2 34.7 38 48.9zm-224.4-92.5v-139c0-16.3-3-31.3-18.3-35.6-11.7-3.8-19 7.1-19 23.4v347.9l-93.8-29.8V32c39.9 7.4 98 24.9 129.2 35.4C424.1 94.7 451 128.7 451 205.2c0 74.5-46 102.8-104.5 74.6zM43.2 410.2c-45.4-12.8-53-39.5-32.3-54.8 19.1-14.2 51.7-24.9 51.7-24.9l134.5-47.8v54.5l-96.8 34.6c-17.1 6.1-19.7 14.8-5.8 19.4 13.9 4.6 39.1 3.3 56.2-2.9l46.4-16.9v48.8c-51.6 9.3-101.4 7.3-153.9-10z"],
- "product-hunt": [512, 512, [], "f288", "M326.3 218.8c0 20.5-16.7 37.2-37.2 37.2h-70.3v-74.4h70.3c20.5 0 37.2 16.7 37.2 37.2zM504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-128.1-37.2c0-47.9-38.9-86.8-86.8-86.8H169.2v248h49.6v-74.4h70.3c47.9 0 86.8-38.9 86.8-86.8z"],
- "pushed": [432, 512, [], "f3e1", "M407 111.9l-98.5-9 14-33.4c10.4-23.5-10.8-40.4-28.7-37L22.5 76.9c-15.1 2.7-26 18.3-21.4 36.6l105.1 348.3c6.5 21.3 36.7 24.2 47.7 7l35.3-80.8 235.2-231.3c16.4-16.8 4.3-42.9-17.4-44.8zM297.6 53.6c5.1-.7 7.5 2.5 5.2 7.4L286 100.9 108.6 84.6l189-31zM22.7 107.9c-3.1-5.1 1-10 6.1-9.1l248.7 22.7-96.9 230.7L22.7 107.9zM136 456.4c-2.6 4-7.9 3.1-9.4-1.2L43.5 179.7l127.7 197.6c-7 15-35.2 79.1-35.2 79.1zm272.8-314.5L210.1 337.3l89.7-213.7 106.4 9.7c4 1.1 5.7 5.3 2.6 8.6z"],
- "python": [448, 512, [], "f3e2", "M167.8 36.4c-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1zm-6.7 28.4c11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4zm185.2 81.4v47.5c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6-7.7-30.9-22.3-54.2-53.4-54.2h-40.1zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3z"],
- "qq": [448, 512, [], "f1d6", "M433.754 420.445c-11.526 1.393-44.86-52.741-44.86-52.741 0 31.345-16.136 72.247-51.051 101.786 16.842 5.192 54.843 19.167 45.803 34.421-7.316 12.343-125.51 7.881-159.632 4.037-34.122 3.844-152.316 8.306-159.632-4.037-9.045-15.25 28.918-29.214 45.783-34.415-34.92-29.539-51.059-70.445-51.059-101.792 0 0-33.334 54.134-44.859 52.741-5.37-.65-12.424-29.644 9.347-99.704 10.261-33.024 21.995-60.478 40.144-105.779C60.683 98.063 108.982.006 224 0c113.737.006 163.156 96.133 160.264 214.963 18.118 45.223 29.912 72.85 40.144 105.778 21.768 70.06 14.716 99.053 9.346 99.704z"],
- "quora": [448, 512, [], "f2c4", "M440.5 386.7h-29.3c-1.5 13.5-10.5 30.8-33 30.8-20.5 0-35.3-14.2-49.5-35.8 44.2-34.2 74.7-87.5 74.7-153C403.5 111.2 306.8 32 205 32 105.3 32 7.3 111.7 7.3 228.7c0 134.1 131.3 221.6 249 189C276 451.3 302 480 351.5 480c81.8 0 90.8-75.3 89-93.3zM297 329.2C277.5 300 253.3 277 205.5 277c-30.5 0-54.3 10-69 22.8l12.2 24.3c6.2-3 13-4 19.8-4 35.5 0 53.7 30.8 69.2 61.3-10 3-20.7 4.2-32.7 4.2-75 0-107.5-53-107.5-156.7C97.5 124.5 130 71 205 71c76.2 0 108.7 53.5 108.7 157.7.1 41.8-5.4 75.6-16.7 100.5z"],
- "ravelry": [512, 512, [], "f2d9", "M407.4 61.5C331.6 22.1 257.8 31 182.9 66c-11.3 5.2-15.5 10.6-19.9 19-10.3 19.2-16.2 37.4-19.9 52.7-21.2 25.6-36.4 56.1-43.3 89.9-10.6 18-20.9 41.4-23.1 71.4 0 0-.7 7.6-.5 7.9-35.3-4.6-76.2-27-76.2-27 9.1 14.5 61.3 32.3 76.3 37.9 0 0 1.7 98 64.5 131.2-11.3-17.2-13.3-20.2-13.3-20.2S94.8 369 100.4 324.7c.7 0 1.5.2 2.2.2 23.9 87.4 103.2 151.4 196.9 151.4 6.2 0 12.1-.2 18-.7 14 1.5 27.6.5 40.1-3.9 6.9-2.2 13.8-6.4 20.2-10.8 70.2-39.1 100.9-82 123.1-147.7 5.4-16 8.1-35.5 9.8-52.2 8.7-82.3-30.6-161.6-103.3-199.5zM138.8 163.2s-1.2 12.3-.7 19.7c-3.4 2.5-10.1 8.1-18.2 16.7 5.2-12.8 11.3-25.1 18.9-36.4zm-31.2 121.9c4.4-17.2 13.3-39.1 29.8-55.1 0 0 1.7 48 15.8 90.1l-41.4-6.9c-2.2-9.2-3.5-18.5-4.2-28.1zm7.9 42.8c14.8 3.2 34 7.6 43.1 9.1 27.3 76.8 108.3 124.3 108.3 124.3 1 .5 1.7.7 2.7 1-73.1-11.6-132.7-64.7-154.1-134.4zM386 444.1c-14.5 4.7-36.2 8.4-64.7 3.7 0 0-91.1-23.1-127.5-107.8 38.2.7 52.4-.2 78-3.9 39.4-5.7 79-16.2 115-33 11.8-5.4 11.1-19.4 9.6-29.8-2-12.8-11.1-12.1-21.4-4.7 0 0-82 58.6-189.8 53.7-18.7-32-26.8-110.8-26.8-110.8 41.4-35.2 83.2-59.6 168.4-52.4.2-6.4 3-27.1-20.4-28.1 0 0-93.5-11.1-146 33.5 2.5-16.5 5.9-29.3 11.1-39.4 34.2-30.8 79-49.5 128.3-49.5 106.4 0 193 87.1 193 194.5-.2 76-43.8 142-106.8 174z"],
- "react": [512, 512, [], "f41b", "M418.2 177.2c-5.4-1.8-10.8-3.5-16.2-5.1.9-3.7 1.7-7.4 2.5-11.1 12.3-59.6 4.2-107.5-23.1-123.3-26.3-15.1-69.2.6-112.6 38.4-4.3 3.7-8.5 7.6-12.5 11.5-2.7-2.6-5.5-5.2-8.3-7.7-45.5-40.4-91.1-57.4-118.4-41.5-26.2 15.2-34 60.3-23 116.7 1.1 5.6 2.3 11.1 3.7 16.7-6.4 1.8-12.7 3.8-18.6 5.9C38.3 196.2 0 225.4 0 255.6c0 31.2 40.8 62.5 96.3 81.5 4.5 1.5 9 3 13.6 4.3-1.5 6-2.8 11.9-4 18-10.5 55.5-2.3 99.5 23.9 114.6 27 15.6 72.4-.4 116.6-39.1 3.5-3.1 7-6.3 10.5-9.7 4.4 4.3 9 8.4 13.6 12.4 42.8 36.8 85.1 51.7 111.2 36.6 27-15.6 35.8-62.9 24.4-120.5-.9-4.4-1.9-8.9-3-13.5 3.2-.9 6.3-1.9 9.4-2.9 57.7-19.1 99.5-50 99.5-81.7 0-30.3-39.4-59.7-93.8-78.4zM282.9 92.3c37.2-32.4 71.9-45.1 87.7-36 16.9 9.7 23.4 48.9 12.8 100.4-.7 3.4-1.4 6.7-2.3 10-22.2-5-44.7-8.6-67.3-10.6-13-18.6-27.2-36.4-42.6-53.1 3.9-3.7 7.7-7.2 11.7-10.7zm-130 189.1c4.6 8.8 9.3 17.5 14.3 26.1 5.1 8.7 10.3 17.4 15.8 25.9-15.6-1.7-31.1-4.2-46.4-7.5 4.4-14.4 9.9-29.3 16.3-44.5zm0-50.6c-6.3-14.9-11.6-29.5-16-43.6 14.4-3.2 29.7-5.8 45.6-7.8-5.3 8.3-10.5 16.8-15.4 25.4-4.9 8.5-9.7 17.2-14.2 26zm11.4 25.3c6.6-13.8 13.8-27.3 21.4-40.6 7.6-13.3 15.8-26.2 24.4-38.9 15-1.1 30.3-1.7 45.9-1.7 15.6 0 31 .6 45.9 1.7 8.5 12.6 16.6 25.5 24.3 38.7 7.7 13.2 14.9 26.7 21.7 40.4-6.7 13.8-13.9 27.4-21.6 40.8-7.6 13.3-15.7 26.2-24.2 39-14.9 1.1-30.4 1.6-46.1 1.6-15.7 0-30.9-.5-45.6-1.4-8.7-12.7-16.9-25.7-24.6-39-7.7-13.3-14.8-26.8-21.5-40.6zm180.6 51.2c5.1-8.8 9.9-17.7 14.6-26.7 6.4 14.5 12 29.2 16.9 44.3-15.5 3.5-31.2 6.2-47 8 5.4-8.4 10.5-17 15.5-25.6zm14.4-76.5c-4.7-8.8-9.5-17.6-14.5-26.2-4.9-8.5-10-16.9-15.3-25.2 16.1 2 31.5 4.7 45.9 8-4.6 14.8-10 29.2-16.1 43.4zM256.2 118.3c10.5 11.4 20.4 23.4 29.6 35.8-19.8-.9-39.7-.9-59.5 0 9.8-12.9 19.9-24.9 29.9-35.8zM140.2 57c16.8-9.8 54.1 4.2 93.4 39 2.5 2.2 5 4.6 7.6 7-15.5 16.7-29.8 34.5-42.9 53.1-22.6 2-45 5.5-67.2 10.4-1.3-5.1-2.4-10.3-3.5-15.5-9.4-48.4-3.2-84.9 12.6-94zm-24.5 263.6c-4.2-1.2-8.3-2.5-12.4-3.9-21.3-6.7-45.5-17.3-63-31.2-10.1-7-16.9-17.8-18.8-29.9 0-18.3 31.6-41.7 77.2-57.6 5.7-2 11.5-3.8 17.3-5.5 6.8 21.7 15 43 24.5 63.6-9.6 20.9-17.9 42.5-24.8 64.5zm116.6 98c-16.5 15.1-35.6 27.1-56.4 35.3-11.1 5.3-23.9 5.8-35.3 1.3-15.9-9.2-22.5-44.5-13.5-92 1.1-5.6 2.3-11.2 3.7-16.7 22.4 4.8 45 8.1 67.9 9.8 13.2 18.7 27.7 36.6 43.2 53.4-3.2 3.1-6.4 6.1-9.6 8.9zm24.5-24.3c-10.2-11-20.4-23.2-30.3-36.3 9.6.4 19.5.6 29.5.6 10.3 0 20.4-.2 30.4-.7-9.2 12.7-19.1 24.8-29.6 36.4zm130.7 30c-.9 12.2-6.9 23.6-16.5 31.3-15.9 9.2-49.8-2.8-86.4-34.2-4.2-3.6-8.4-7.5-12.7-11.5 15.3-16.9 29.4-34.8 42.2-53.6 22.9-1.9 45.7-5.4 68.2-10.5 1 4.1 1.9 8.2 2.7 12.2 4.9 21.6 5.7 44.1 2.5 66.3zm18.2-107.5c-2.8.9-5.6 1.8-8.5 2.6-7-21.8-15.6-43.1-25.5-63.8 9.6-20.4 17.7-41.4 24.5-62.9 5.2 1.5 10.2 3.1 15 4.7 46.6 16 79.3 39.8 79.3 58 0 19.6-34.9 44.9-84.8 61.4zM256 210.2c25.3 0 45.8 20.5 45.8 45.8 0 25.3-20.5 45.8-45.8 45.8-25.3 0-45.8-20.5-45.8-45.8 0-25.3 20.5-45.8 45.8-45.8"],
- "rebel": [512, 512, [], "f1d0", "M256.5 504C117.2 504 9 387.8 13.2 249.9 16 170.7 56.4 97.7 129.7 49.5c.3 0 1.9-.6 1.1.8-5.8 5.5-111.3 129.8-14.1 226.4 49.8 49.5 90 2.5 90 2.5 38.5-50.1-.6-125.9-.6-125.9-10-24.9-45.7-40.1-45.7-40.1l28.8-31.8c24.4 10.5 43.2 38.7 43.2 38.7.8-29.6-21.9-61.4-21.9-61.4L255.1 8l44.3 50.1c-20.5 28.8-21.9 62.6-21.9 62.6 13.8-23 43.5-39.3 43.5-39.3l28.5 31.8c-27.4 8.9-45.4 39.9-45.4 39.9-15.8 28.5-27.1 89.4.6 127.3 32.4 44.6 87.7-2.8 87.7-2.8 102.7-91.9-10.5-225-10.5-225-6.1-5.5.8-2.8.8-2.8 50.1 36.5 114.6 84.4 116.2 204.8C500.9 400.2 399 504 256.5 504z"],
- "red-river": [448, 512, [], "f3e3", "M353.2 32H94.8C42.4 32 0 74.4 0 126.8v258.4C0 437.6 42.4 480 94.8 480h258.4c52.4 0 94.8-42.4 94.8-94.8V126.8c0-52.4-42.4-94.8-94.8-94.8zM144.9 200.9v56.3c0 27-21.9 48.9-48.9 48.9V151.9c0-13.2 10.7-23.9 23.9-23.9h154.2c0 27-21.9 48.9-48.9 48.9h-56.3c-12.3-.6-24.6 11.6-24 24zm176.3 72h-56.3c-12.3-.6-24.6 11.6-24 24v56.3c0 27-21.9 48.9-48.9 48.9V247.9c0-13.2 10.7-23.9 23.9-23.9h154.2c0 27-21.9 48.9-48.9 48.9z"],
- "reddit": [512, 512, [], "f1a1", "M201.5 305.5c-13.8 0-24.9-11.1-24.9-24.6 0-13.8 11.1-24.9 24.9-24.9 13.6 0 24.6 11.1 24.6 24.9 0 13.6-11.1 24.6-24.6 24.6zM504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-132.3-41.2c-9.4 0-17.7 3.9-23.8 10-22.4-15.5-52.6-25.5-86.1-26.6l17.4-78.3 55.4 12.5c0 13.6 11.1 24.6 24.6 24.6 13.8 0 24.9-11.3 24.9-24.9s-11.1-24.9-24.9-24.9c-9.7 0-18 5.8-22.1 13.8l-61.2-13.6c-3-.8-6.1 1.4-6.9 4.4l-19.1 86.4c-33.2 1.4-63.1 11.3-85.5 26.8-6.1-6.4-14.7-10.2-24.1-10.2-34.9 0-46.3 46.9-14.4 62.8-1.1 5-1.7 10.2-1.7 15.5 0 52.6 59.2 95.2 132 95.2 73.1 0 132.3-42.6 132.3-95.2 0-5.3-.6-10.8-1.9-15.8 31.3-16 19.8-62.5-14.9-62.5zM302.8 331c-18.2 18.2-76.1 17.9-93.6 0-2.2-2.2-6.1-2.2-8.3 0-2.5 2.5-2.5 6.4 0 8.6 22.8 22.8 87.3 22.8 110.2 0 2.5-2.2 2.5-6.1 0-8.6-2.2-2.2-6.1-2.2-8.3 0zm7.7-75c-13.6 0-24.6 11.1-24.6 24.9 0 13.6 11.1 24.6 24.6 24.6 13.8 0 24.9-11.1 24.9-24.6 0-13.8-11-24.9-24.9-24.9z"],
- "reddit-alien": [512, 512, [], "f281", "M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z"],
- "reddit-square": [448, 512, [], "f1a2", "M283.2 345.5c2.7 2.7 2.7 6.8 0 9.2-24.5 24.5-93.8 24.6-118.4 0-2.7-2.4-2.7-6.5 0-9.2 2.4-2.4 6.5-2.4 8.9 0 18.7 19.2 81 19.6 100.5 0 2.4-2.3 6.6-2.3 9 0zm-91.3-53.8c0-14.9-11.9-26.8-26.5-26.8-14.9 0-26.8 11.9-26.8 26.8 0 14.6 11.9 26.5 26.8 26.5 14.6 0 26.5-11.9 26.5-26.5zm90.7-26.8c-14.6 0-26.5 11.9-26.5 26.8 0 14.6 11.9 26.5 26.5 26.5 14.9 0 26.8-11.9 26.8-26.5 0-14.9-11.9-26.8-26.8-26.8zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-99.7 140.6c-10.1 0-19 4.2-25.6 10.7-24.1-16.7-56.5-27.4-92.5-28.6l18.7-84.2 59.5 13.4c0 14.6 11.9 26.5 26.5 26.5 14.9 0 26.8-12.2 26.8-26.8 0-14.6-11.9-26.8-26.8-26.8-10.4 0-19.3 6.2-23.8 14.9l-65.7-14.6c-3.3-.9-6.5 1.5-7.4 4.8l-20.5 92.8c-35.7 1.5-67.8 12.2-91.9 28.9-6.5-6.8-15.8-11-25.9-11-37.5 0-49.8 50.4-15.5 67.5-1.2 5.4-1.8 11-1.8 16.7 0 56.5 63.7 102.3 141.9 102.3 78.5 0 142.2-45.8 142.2-102.3 0-5.7-.6-11.6-2.1-17 33.6-17.2 21.2-67.2-16.1-67.2z"],
- "rendact": [496, 512, [], "f3e4", "M248 8C111 8 0 119 0 256s111 248 248 248c18.6 0 36.7-2.1 54.1-5.9-5.6-7.4-10.8-14.4-15.9-21.3-12.4 2.1-25.2 3.3-38.3 3.3C124.3 480 24 379.7 24 256S124.3 32 248 32s224 100.3 224 224c0 71-33 134.2-84.5 175.3-25.9 18.8-39.1 21.4-83.5-44.2-78.7-112.9-48-71.1-73.7-108.3 72.8 8.9 228.5-72 168.6-168.6C314-26.8 15 93.8 59.7 226.4c3.2 9.8 14.4 38.6 45.6 38.6 2 0 2.6-.6 2-1.7-4.4-8.7-20.1-9.8-20.1-37.4 0-40.5 40.5-89.6 100.3-120 66.1-32.3 131.9-30.2 158.2 5.4 27.2 38.3-20.9 119.2-120.4 136.9 7.5-9.4 57-75.2 62.8-84 22.7-34.6 23.6-49 14-59.2-15.5-16.9-29.5-10.3-50.7-11.7-10.8-.9-113.7 181.2-136.4 216.9-5.9 9-21.2 34.1-21.2 50.9 0 21.3 2.8 51.4 20.6 51.4 10.6 0 8-18.7 8-26.6 0-12.9 27.4-49.4 74.8-104.6 20.4 36.1 57.7 114.3 130.2 209.7 98-33.1 168.5-125.8 168.5-235C496 119 385 8 248 8z"],
- "renren": [512, 512, [], "f18b", "M214 169.1c0 110.4-61 205.4-147.6 247.4C30 373.2 8 317.7 8 256.6 8 133.9 97.1 32.2 214 12.5v156.6zM255 504c-42.9 0-83.3-11-118.5-30.4C193.7 437.5 239.9 382.9 255 319c15.5 63.9 61.7 118.5 118.8 154.7C338.7 493 298.3 504 255 504zm190.6-87.5C359 374.5 298 279.6 298 169.1V12.5c116.9 19.7 206 121.4 206 244.1 0 61.1-22 116.6-58.4 159.9z"],
- "replyd": [448, 512, [], "f3e6", "M320 480H128C57.6 480 0 422.4 0 352V160C0 89.6 57.6 32 128 32h192c70.4 0 128 57.6 128 128v192c0 70.4-57.6 128-128 128zM193.4 273.2c-6.1-2-11.6-3.1-16.4-3.1-7.2 0-13.5 1.9-18.9 5.6-5.4 3.7-9.6 9-12.8 15.8h-1.1l-4.2-18.3h-28v138.9h36.1v-89.7c1.5-5.4 4.4-9.8 8.7-13.2 4.3-3.4 9.8-5.1 16.2-5.1 4.6 0 9.8 1 15.6 3.1l4.8-34zm115.2 103.4c-3.2 2.4-7.7 4.8-13.7 7.1-6 2.3-12.8 3.5-20.4 3.5-12.2 0-21.1-3-26.5-8.9-5.5-5.9-8.5-14.7-9-26.4h83.3c.9-4.8 1.6-9.4 2.1-13.9.5-4.4.7-8.6.7-12.5 0-10.7-1.6-19.7-4.7-26.9-3.2-7.2-7.3-13-12.5-17.2-5.2-4.3-11.1-7.3-17.8-9.2-6.7-1.8-13.5-2.8-20.6-2.8-21.1 0-37.5 6.1-49.2 18.3s-17.5 30.5-17.5 55c0 22.8 5.2 40.7 15.6 53.7 10.4 13.1 26.8 19.6 49.2 19.6 10.7 0 20.9-1.5 30.4-4.6 9.5-3.1 17.1-6.8 22.6-11.2l-12-23.6zm-21.8-70.3c3.8 5.4 5.3 13.1 4.6 23.1h-51.7c.9-9.4 3.7-17 8.2-22.6 4.5-5.6 11.5-8.5 21-8.5 8.2-.1 14.1 2.6 17.9 8zm79.9 2.5c4.1 3.9 9.4 5.8 16.1 5.8 7 0 12.6-1.9 16.7-5.8s6.1-9.1 6.1-15.6-2-11.6-6.1-15.4c-4.1-3.8-9.6-5.7-16.7-5.7-6.7 0-12 1.9-16.1 5.7-4.1 3.8-6.1 8.9-6.1 15.4s2 11.7 6.1 15.6zm0 100.5c4.1 3.9 9.4 5.8 16.1 5.8 7 0 12.6-1.9 16.7-5.8s6.1-9.1 6.1-15.6-2-11.6-6.1-15.4c-4.1-3.8-9.6-5.7-16.7-5.7-6.7 0-12 1.9-16.1 5.7-4.1 3.8-6.1 8.9-6.1 15.4 0 6.6 2 11.7 6.1 15.6z"],
- "resolving": [496, 512, [], "f3e7", "M281.2 278.2c46-13.3 49.6-23.5 44-43.4L314 195.5c-6.1-20.9-18.4-28.1-71.1-12.8L54.7 236.8l28.6 98.6 197.9-57.2zM248.5 8C131.4 8 33.2 88.7 7.2 197.5l221.9-63.9c34.8-10.2 54.2-11.7 79.3-8.2 36.3 6.1 52.7 25 61.4 55.2l10.7 37.8c8.2 28.1 1 50.6-23.5 73.6-19.4 17.4-31.2 24.5-61.4 33.2L203 351.8l220.4 27.1 9.7 34.2-48.1 13.3-286.8-37.3 23 80.2c36.8 22 80.3 34.7 126.3 34.7 137 0 248.5-111.4 248.5-248.3C497 119.4 385.5 8 248.5 8zM38.3 388.6L0 256.8c0 48.5 14.3 93.4 38.3 131.8z"],
- "rocketchat": [448, 512, [], "f3e8", "M448 256.2c0-87.2-99.6-153.3-219.8-153.3-18.8 0-37.3 1.6-55.3 4.8-11.1-10.5-24.2-20-38-27.4C61.2 44.2 0 79.4 0 79.4s56.9 47.1 47.6 88.3c-52.3 52.3-52.5 124.1 0 176.6C56.9 385.6 0 432.6 0 432.6s61.2 35.2 134.9-.8c13.8-7.5 26.9-16.9 38-27.4 18 3.2 36.5 4.8 55.3 4.8 120.3-.1 219.8-65.8 219.8-153zm-219.7 124c-23.7 0-46.3-2.8-67.3-7.8-21.3 25.8-68.1 61.7-113.6 50.1 14.8-16 36.7-43.1 32-87.6-27.3-21.4-43.6-48.7-43.6-78.5 0-68.4 86.2-123.9 192.5-123.9S420.8 188 420.8 256.4c0 68.3-86.2 123.8-192.5 123.8zm25.6-123.9c0 14.2-11.5 25.8-25.6 25.8-14.1 0-25.6-11.5-25.6-25.8 0-14.2 11.5-25.8 25.6-25.8 14.1 0 25.6 11.6 25.6 25.8zm88.9 0c0 14.2-11.4 25.8-25.6 25.8-14.1 0-25.6-11.5-25.6-25.8 0-14.2 11.4-25.8 25.6-25.8 14.1 0 25.6 11.6 25.6 25.8zm-177.9 0c0 14.2-11.4 25.8-25.6 25.8-14.1 0-25.6-11.5-25.6-25.8 0-14.2 11.4-25.8 25.6-25.8 14.2 0 25.6 11.6 25.6 25.8z"],
- "rockrms": [496, 512, [], "f3e9", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm157.4 419.5h-90l-112-131.3c-17.9-20.4-3.9-56.1 26.6-56.1h75.3l-84.6-99.3-84.3 98.9h-90L193.5 67.2c14.4-18.4 41.3-17.3 54.5 0l157.7 185.1c19 22.8 2 57.2-27.6 56.1-.6 0-74.2.2-74.2.2l101.5 118.9z"],
- "safari": [512, 512, [], "f267", "M236.9 256.8c0-9.1 6.6-17.7 16.3-17.7 8.9 0 17.4 6.4 17.4 16.1 0 9.1-6.4 17.7-16.1 17.7-9 0-17.6-6.7-17.6-16.1zM504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-26.6 0c0-122.3-99.1-221.4-221.4-221.4S34.6 133.7 34.6 256 133.7 477.4 256 477.4 477.4 378.3 477.4 256zm-72.5 96.6c0 3.6 13 10.2 16.3 12.2-27.4 41.5-69.8 71.4-117.9 83.3l-4.4-18.5c-.3-2.5-1.9-2.8-4.2-2.8-1.9 0-3 2.8-2.8 4.2l4.4 18.8c-13.3 2.8-26.8 4.2-40.4 4.2-36.3 0-72-10.2-103-29.1 1.7-2.8 12.2-18 12.2-20.2 0-1.9-1.7-3.6-3.6-3.6-3.9 0-12.2 16.6-14.7 19.9-41.8-27.7-72-70.6-83.6-119.6l19.1-4.2c2.2-.6 2.8-2.2 2.8-4.2 0-1.9-2.8-3-4.4-2.8L62 294.5c-2.5-12.7-3.9-25.5-3.9-38.5 0-37.1 10.5-73.6 30.2-104.9 2.8 1.7 16.1 10.8 18.3 10.8 1.9 0 3.6-1.4 3.6-3.3 0-3.9-14.7-11.3-18-13.6 28.2-41.2 71.1-70.9 119.8-81.9l4.2 18.5c.6 2.2 2.2 2.8 4.2 2.8s3-2.8 2.8-4.4L219 61.7c12.2-2.2 24.6-3.6 37.1-3.6 37.1 0 73.3 10.5 104.9 30.2-1.9 2.8-10.8 15.8-10.8 18 0 1.9 1.4 3.6 3.3 3.6 3.9 0 11.3-14.4 13.3-17.7 41 27.7 70.3 70 81.7 118.2l-15.5 3.3c-2.5.6-2.8 2.2-2.8 4.4 0 1.9 2.8 3 4.2 2.8l15.8-3.6c2.5 12.7 3.9 25.7 3.9 38.7 0 36.3-10 72-28.8 102.7-2.8-1.4-14.4-9.7-16.6-9.7-2.1 0-3.8 1.7-3.8 3.6zm-33.2-242.2c-13 12.2-134.2 123.7-137.6 129.5l-96.6 160.5c12.7-11.9 134.2-124 137.3-129.3l96.9-160.7z"],
- "sass": [640, 512, [], "f41e", "M551.1 291.9c-22.4.1-41.8 5.5-58 13.5-5.9-11.9-12-22.3-13-30.1-1.2-9.1-2.5-14.5-1.1-25.3s7.7-26.1 7.6-27.2c-.1-1.1-1.4-6.6-14.3-6.7-12.9-.1-24 2.5-25.3 5.9-1.3 3.4-3.8 11.1-5.3 19.1-2.3 11.7-25.8 53.5-39.1 75.3-4.4-8.5-8.1-16-8.9-22-1.2-9.1-2.5-14.5-1.1-25.3s7.7-26.1 7.6-27.2c-.1-1.1-1.4-6.6-14.3-6.7-12.9-.1-24 2.5-25.3 5.9-1.3 3.4-2.7 11.4-5.3 19.1-2.6 7.7-33.9 77.3-42.1 95.4-4.2 9.2-7.8 16.6-10.4 21.6s-.2.3-.4.9c-2.2 4.3-3.5 6.7-3.5 6.7v.1c-1.7 3.2-3.6 6.1-4.5 6.1-.6 0-1.9-8.4.3-19.9 4.7-24.2 15.8-61.8 15.7-63.1-.1-.7 2.1-7.2-7.3-10.7-9.1-3.3-12.4 2.2-13.2 2.2-.8 0-1.4 2-1.4 2s10.1-42.4-19.4-42.4c-18.4 0-44 20.2-56.6 38.5-7.9 4.3-25 13.6-43 23.5-6.9 3.8-14 7.7-20.7 11.4-.5-.5-.9-1-1.4-1.5-35.8-38.2-101.9-65.2-99.1-116.5 1-18.7 7.5-67.8 127.1-127.4 98-48.8 176.4-35.4 189.9-5.6 19.4 42.5-41.9 121.6-143.7 133-38.8 4.3-59.2-10.7-64.3-16.3-5.3-5.9-6.1-6.2-8.1-5.1-3.3 1.8-1.2 7 0 10.1 3 7.9 15.5 21.9 36.8 28.9 18.7 6.1 64.2 9.5 119.2-11.8C367 196.5 415.1 130.2 401 74.7 386.6 18.3 293.1-.2 204.6 31.2 151.9 49.9 94.9 79.3 53.9 117.6 5.2 163.2-2.6 202.9.6 219.5c11.4 58.9 92.6 97.3 125.1 125.7-1.6.9-3.1 1.7-4.5 2.5-16.3 8.1-78.2 40.5-93.7 74.7-17.5 38.8 2.9 66.6 16.3 70.4 41.8 11.6 84.6-9.3 107.6-43.6s20.2-79.1 9.6-99.5c-.1-.3-.3-.5-.4-.8 4.2-2.5 8.5-5 12.8-7.5 8.3-4.9 16.4-9.4 23.5-13.3-4 10.8-6.9 23.8-8.4 42.6-1.8 22 7.3 50.5 19.1 61.7 5.2 4.9 11.5 5 15.4 5 13.8 0 20-11.4 26.9-25 8.5-16.6 16-35.9 16-35.9s-9.4 52.2 16.3 52.2c9.4 0 18.8-12.1 23-18.3v.1s.2-.4.7-1.2c1-1.5 1.5-2.4 1.5-2.4v-.3c3.8-6.5 12.1-21.4 24.6-46 16.2-31.8 31.7-71.5 31.7-71.5s1.4 9.7 6.2 25.8c2.8 9.5 8.7 19.9 13.4 30-3.8 5.2-6.1 8.2-6.1 8.2s0 .1.1.2c-3 4-6.4 8.3-9.9 12.5-12.8 15.2-28 32.6-30 37.6-2.4 5.9-1.8 10.3 2.8 13.7 3.4 2.6 9.4 3 15.7 2.5 11.5-.8 19.6-3.6 23.5-5.4 6.2-2.2 13.4-5.7 20.2-10.6 12.5-9.2 20.1-22.4 19.4-39.8-.4-9.6-3.5-19.2-7.3-28.2 1.1-1.6 2.3-3.3 3.4-5 19.8-28.9 35.1-60.6 35.1-60.6s1.4 9.7 6.2 25.8c2.4 8.1 7.1 17 11.4 25.7-18.6 15.1-30.1 32.6-34.1 44.1-7.4 21.3-1.6 30.9 9.3 33.1 4.9 1 11.9-1.3 17.1-3.5 6.5-2.2 14.3-5.7 21.6-11.1 12.5-9.2 24.6-22.1 23.8-39.6-.3-7.9-2.5-15.8-5.4-23.4 15.7-6.6 36.1-10.2 62.1-7.2 55.7 6.5 66.6 41.3 64.5 55.8-2.1 14.6-13.8 22.6-17.7 25-3.9 2.4-5.1 3.3-4.8 5.1.5 2.6 2.3 2.5 5.6 1.9 4.6-.8 29.2-11.8 30.3-38.7 1.6-34-31.1-71.4-89-71.1zM121.8 436.6c-18.4 20.1-44.2 27.7-55.3 21.3C54.6 451 59.3 421.4 82 400c13.8-13 31.6-25 43.4-32.4 2.7-1.6 6.6-4 11.4-6.9.8-.5 1.2-.7 1.2-.7.9-.6 1.9-1.1 2.9-1.7 8.3 30.4.3 57.2-19.1 78.3zm134.4-91.4c-6.4 15.7-19.9 55.7-28.1 53.6-7-1.8-11.3-32.3-1.4-62.3 5-15.1 15.6-33.1 21.9-40.1 10.1-11.3 21.2-14.9 23.8-10.4 3.5 5.9-12.2 49.4-16.2 59.2zm111 53c-2.7 1.4-5.2 2.3-6.4 1.6-.9-.5 1.1-2.4 1.1-2.4s13.9-14.9 19.4-21.7c3.2-4 6.9-8.7 10.9-13.9 0 .5.1 1 .1 1.6-.1 17.9-17.3 30-25.1 34.8zm85.6-19.5c-2-1.4-1.7-6.1 5-20.7 2.6-5.7 8.6-15.3 19-24.5 1.2 3.8 1.9 7.4 1.9 10.8-.1 22.5-16.2 30.9-25.9 34.4z"],
- "schlix": [448, 512, [], "f3ea", "M350.5 157.7l-54.2-46.1 73.4-39 78.3 44.2-97.5 40.9zM192 122.1l45.7-28.2 34.7 34.6-55.4 29-25-35.4zm-65.1 6.6l31.9-22.1L176 135l-36.7 22.5-12.4-28.8zm-23.3 88.2l-8.8-34.8 29.6-18.3 13.1 35.3-33.9 17.8zm-21.2-83.7l23.9-18.1 8.9 24-26.7 18.3-6.1-24.2zM59 206.5l-3.6-28.4 22.3-15.5 6.1 28.7L59 206.5zm-30.6 16.6l20.8-12.8 3.3 33.4-22.9 12-1.2-32.6zM1.4 268l19.2-10.2.4 38.2-21 8.8L1.4 268zm59.1 59.3l-28.3 8.3-1.6-46.8 25.1-10.7 4.8 49.2zM99 263.2l-31.1 13-5.2-40.8L90.1 221l8.9 42.2zM123.2 377l-41.6 5.9-8.1-63.5 35.2-10.8 14.5 68.4zm28.5-139.9l21.2 57.1-46.2 13.6-13.7-54.1 38.7-16.6zm85.7 230.5l-70.9-3.3-24.3-95.8 55.2-8.6 40 107.7zm-84.9-279.7l42.2-22.4 28 45.9-50.8 21.3-19.4-44.8zm41 94.9l61.3-18.7 52.8 86.6-79.8 11.3-34.3-79.2zm51.4-85.6l67.3-28.8 65.5 65.4-88.6 26.2-44.2-62.8z"],
- "scribd": [384, 512, [], "f28a", "M42.3 252.7c-16.1-19-24.7-45.9-24.8-79.9 0-100.4 75.2-153.1 167.2-153.1 98.6-1.6 156.8 49 184.3 70.6l-50.5 72.1-37.3-24.6 26.9-38.6c-36.5-24-79.4-36.5-123-35.8-50.7-.8-111.7 27.2-111.7 76.2 0 18.7 11.2 20.7 28.6 15.6 23.3-5.3 41.9.6 55.8 14 26.4 24.3 23.2 67.6-.7 91.9-29.2 29.5-85.2 27.3-114.8-8.4zm317.7 5.9c-15.5-18.8-38.9-29.4-63.2-28.6-38.1-2-71.1 28-70.5 67.2-.7 16.8 6 33 18.4 44.3 14.1 13.9 33 19.7 56.3 14.4 17.4-5.1 28.6-3.1 28.6 15.6 0 4.3-.5 8.5-1.4 12.7-16.7 40.9-59.5 64.4-121.4 64.4-51.9.2-102.4-16.4-144.1-47.3l33.7-39.4-35.6-27.4L0 406.3l15.4 13.8c52.5 46.8 120.4 72.5 190.7 72.2 51.4 0 94.4-10.5 133.6-44.1 57.1-51.4 54.2-149.2 20.3-189.6z"],
- "searchengin": [460, 512, [], "f3eb", "M220.6 130.3l-67.2 28.2V43.2L98.7 233.5l54.7-24.2v130.3l67.2-209.3zm-83.2-96.7l-1.3 4.7-15.2 52.9C80.6 106.7 52 145.8 52 191.5c0 52.3 34.3 95.9 83.4 105.5v53.6C57.5 340.1 0 272.4 0 191.6c0-80.5 59.8-147.2 137.4-158zm311.4 447.2c-11.2 11.2-23.1 12.3-28.6 10.5-5.4-1.8-27.1-19.9-60.4-44.4-33.3-24.6-33.6-35.7-43-56.7-9.4-20.9-30.4-42.6-57.5-52.4l-9.7-14.7c-24.7 16.9-53 26.9-81.3 28.7l2.1-6.6 15.9-49.5c46.5-11.9 80.9-54 80.9-104.2 0-54.5-38.4-102.1-96-107.1V32.3C254.4 37.4 320 106.8 320 191.6c0 33.6-11.2 64.7-29 90.4l14.6 9.6c9.8 27.1 31.5 48 52.4 57.4s32.2 9.7 56.8 43c24.6 33.2 42.7 54.9 44.5 60.3s.7 17.3-10.5 28.5zm-9.9-17.9c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8 8-3.6 8-8z"],
- "sellcast": [448, 512, [], "f2da", "M353.4 32H94.7C42.6 32 0 74.6 0 126.6v258.7C0 437.4 42.6 480 94.7 480h258.7c52.1 0 94.7-42.6 94.7-94.6V126.6c0-52-42.6-94.6-94.7-94.6zm-50 316.4c-27.9 48.2-89.9 64.9-138.2 37.2-22.9 39.8-54.9 8.6-42.3-13.2l15.7-27.2c5.9-10.3 19.2-13.9 29.5-7.9 18.6 10.8-.1-.1 18.5 10.7 27.6 15.9 63.4 6.3 79.4-21.3 15.9-27.6 6.3-63.4-21.3-79.4-17.8-10.2-.6-.4-18.6-10.6-24.6-14.2-3.4-51.9 21.6-37.5 18.6 10.8-.1-.1 18.5 10.7 48.4 28 65.1 90.3 37.2 138.5zm21.8-208.8c-17 29.5-16.3 28.8-19 31.5-6.5 6.5-16.3 8.7-26.5 3.6-18.6-10.8.1.1-18.5-10.7-27.6-15.9-63.4-6.3-79.4 21.3s-6.3 63.4 21.3 79.4c0 0 18.5 10.6 18.6 10.6 24.6 14.2 3.4 51.9-21.6 37.5-18.6-10.8.1.1-18.5-10.7-48.2-27.8-64.9-90.1-37.1-138.4 27.9-48.2 89.9-64.9 138.2-37.2l4.8-8.4c14.3-24.9 52-3.3 37.7 21.5z"],
- "sellsy": [640, 512, [], "f213", "M539.71 237.308c3.064-12.257 4.29-24.821 4.29-37.384C544 107.382 468.618 32 376.076 32c-77.22 0-144.634 53.012-163.02 127.781-15.322-13.176-34.934-20.53-55.157-20.53-46.271 0-83.962 37.69-83.962 83.961 0 7.354.92 15.015 3.065 22.369-42.9 20.225-70.785 63.738-70.785 111.234C6.216 424.843 61.68 480 129.401 480h381.198c67.72 0 123.184-55.157 123.184-123.184.001-56.384-38.916-106.025-94.073-119.508zM199.88 401.554c0 8.274-7.048 15.321-15.321 15.321H153.61c-8.274 0-15.321-7.048-15.321-15.321V290.626c0-8.273 7.048-15.321 15.321-15.321h30.949c8.274 0 15.321 7.048 15.321 15.321v110.928zm89.477 0c0 8.274-7.048 15.321-15.322 15.321h-30.949c-8.274 0-15.321-7.048-15.321-15.321V270.096c0-8.274 7.048-15.321 15.321-15.321h30.949c8.274 0 15.322 7.048 15.322 15.321v131.458zm89.477 0c0 8.274-7.047 15.321-15.321 15.321h-30.949c-8.274 0-15.322-7.048-15.322-15.321V238.84c0-8.274 7.048-15.321 15.322-15.321h30.949c8.274 0 15.321 7.048 15.321 15.321v162.714zm87.027 0c0 8.274-7.048 15.321-15.322 15.321h-28.497c-8.274 0-15.321-7.048-15.321-15.321V176.941c0-8.579 7.047-15.628 15.321-15.628h28.497c8.274 0 15.322 7.048 15.322 15.628v224.613z"],
- "servicestack": [496, 512, [], "f3ec", "M88 216c81.7 10.2 273.7 102.3 304 232H0c99.5-8.1 184.5-137 88-232zm32-152c32.3 35.6 47.7 83.9 46.4 133.6C249.3 231.3 373.7 321.3 400 448h96C455.3 231.9 222.8 79.5 120 64z"],
- "shirtsinbulk": [448, 512, [], "f214", "M395.208 221.583H406v33.542h-10.792v-33.542zm0-9.625H406v-33.542h-10.792v33.542zm0 86.333H406V264.75h-10.792v33.541zM358.75 135.25h-33.542v10.5h33.542v-10.5zm36.458 206.208H406v-33.542h-10.792v33.542zM311.5 135.25h-33.542v10.5H311.5v-10.5zm-47.25 0H231v10.5h33.25v-10.5zm-47.25 0h-33.25v10.5H217v-10.5zm178.208 33.542H406V135.25h-33.542v10.5h22.75v23.042zm-255.792 259l30.625 13.417 4.375-9.917-30.625-13.417-4.375 9.917zM179.083 445l30.334 13.708 4.374-9.916-30.333-13.417-4.375 9.625zm216.125-60.375H406v-33.542h-10.792v33.542zm-334.833 8.167L91 406.208l4.375-9.624-30.625-13.709-4.375 9.917zm39.666 17.499l30.625 13.417 4.375-9.917-30.625-13.416-4.375 9.916zm132.417 38.501l4.375 9.916L267.459 445l-4.375-9.625-30.626 13.417zm118.417-52.208l4.375 9.624 30.624-13.416-4.374-9.917-30.625 13.709zM311.5 413.791l4.375 9.917 30.625-13.417-4.374-9.916-30.626 13.416zm-39.667 17.501l4.375 9.917 30.625-13.417-4.375-9.917-30.625 13.417zM311.5 46.583h-33.542v10.5H311.5v-10.5zm94.209 0h-33.251v10.5h33.251v-10.5zm-188.709 0h-33.25v10.5H217v-10.5zm141.75 0h-33.542v10.5h33.542v-10.5zm-94.5 0H231v10.5h33.25v-10.5zM448 3.708v406l-226.334 98.584L0 409.708v-406h448zm-29.166 116.958H29.166V390.75l192.792 85.75 196.875-85.75V120.666zm0-87.791H29.166V91.5h389.667V32.875zM75.542 46.583H42.291v10.5h33.251v-10.5zm94.5 0H136.5v10.5h33.542v-10.5zm-47.251 0H89.25v10.5h33.542v-10.5zm7.584 236.542c0-50.167 41.125-91.292 91.292-91.292 50.458 0 91.292 41.125 91.292 91.292 0 50.458-40.833 91.292-91.292 91.292-50.167-.001-91.292-40.834-91.292-91.292zm120.75 18.084c0 13.125-23.917 14.291-32.666 14.291-12.25 0-29.75-2.625-35.875-14.875h-.875L172.666 319c14.876 9.333 29.167 12.25 47.25 12.25 19.542 0 51.042-5.833 51.042-31.209 0-48.125-78.458-16.333-78.458-37.916 0-13.125 20.708-14.875 29.75-14.875 10.791 0 29.166 3.208 35.583 13.124h.875l8.751-16.916c-15.167-6.125-27.417-11.959-44.334-11.959-20.125 0-49.583 6.417-49.583 31.792 0 44.334 77.583 11.959 77.583 37.918zM122.791 135.25H89.25v10.5h33.542v-10.5zm-69.999 10.5h22.75v-10.5H42v33.542h10.792V145.75zm0 32.666H42v33.542h10.792v-33.542zm117.25-43.166H136.5v10.5h33.542v-10.5zm-117.25 86.333H42v33.542h10.792v-33.542zm0 86.334H42v33.542h10.792v-33.542zm0-43.167H42v33.542h10.792V264.75zm0 86.333H42v33.542h10.792v-33.542z"],
- "simplybuilt": [512, 512, [], "f215", "M481.2 64h-106c-14.5 0-26.6 11.8-26.6 26.3v39.6H163.3V90.3c0-14.5-12-26.3-26.6-26.3h-106C16.1 64 4.3 75.8 4.3 90.3v331.4c0 14.5 11.8 26.3 26.6 26.3h450.4c14.8 0 26.6-11.8 26.6-26.3V90.3c-.2-14.5-12-26.3-26.7-26.3zM149.8 355.8c-36.6 0-66.4-29.7-66.4-66.4 0-36.9 29.7-66.6 66.4-66.6 36.9 0 66.6 29.7 66.6 66.6 0 36.7-29.7 66.4-66.6 66.4zm212.4 0c-36.9 0-66.6-29.7-66.6-66.6 0-36.6 29.7-66.4 66.6-66.4 36.6 0 66.4 29.7 66.4 66.4 0 36.9-29.8 66.6-66.4 66.6z"],
- "sistrix": [448, 512, [], "f3ee", "M448 449L301.2 300.2c20-27.9 31.9-62.2 31.9-99.2 0-93.1-74.7-168.9-166.5-168.9C74.7 32 0 107.8 0 200.9s74.7 168.9 166.5 168.9c39.8 0 76.3-14.2 105-37.9l146 148.1 30.5-31zM166.5 330.8c-70.6 0-128.1-58.3-128.1-129.9S95.9 71 166.5 71s128.1 58.3 128.1 129.9-57.4 129.9-128.1 129.9z"],
- "skyatlas": [576, 512, [], "f216", "M545.7 318.5c0 56.2-44.8 97.5-100.2 97.5-141.5 0-167.6-212.9-306.7-212.9-125.2 0-125.4 180.9 4.8 180.9 36.2 0 77.5-15.2 106.8-36.2 4.8-3.5 14.4-13.9 19.5-13.9s9.3 4.3 9.3 9.3c0 6.7-11.2 16.3-16 20.5-34.9 30.4-85.5 52.2-131.9 52.2C60.2 416 0 365.6 0 292.4s57.6-127.1 130.3-127.1c158 0 189.7 209.7 308.5 209.7 85.2 0 80.8-119.1 2.9-119.1-14.9 0-29.8 9.9-40 9.9-7.2 0-13.6-6.1-13.6-13.3 0-9.9 4.5-20.2 4.5-30.9 0-56.8-43.4-97.8-99.7-97.8-45.3 0-68.2 31.4-75.7 31.4-5.3 0-9.6-4.3-9.6-9.6 0-4.8 3.5-8.8 6.7-12.3C235.9 108.8 269.5 96 302 96c67.7 0 118.6 49.8 118.6 117.5 0 5.9-.3 11.7-1.1 17.6 10.1-2.7 20.5-4 30.6-4 51.9 0 95.6 38.6 95.6 91.4z"],
- "skype": [448, 512, [], "f17e", "M424.7 299.8c2.9-14 4.7-28.9 4.7-43.8 0-113.5-91.9-205.3-205.3-205.3-14.9 0-29.7 1.7-43.8 4.7C161.3 40.7 137.7 32 112 32 50.2 32 0 82.2 0 144c0 25.7 8.7 49.3 23.3 68.2-2.9 14-4.7 28.9-4.7 43.8 0 113.5 91.9 205.3 205.3 205.3 14.9 0 29.7-1.7 43.8-4.7 19 14.6 42.6 23.3 68.2 23.3 61.8 0 112-50.2 112-112 .1-25.6-8.6-49.2-23.2-68.1zm-194.6 91.5c-65.6 0-120.5-29.2-120.5-65 0-16 9-30.6 29.5-30.6 31.2 0 34.1 44.9 88.1 44.9 25.7 0 42.3-11.4 42.3-26.3 0-18.7-16-21.6-42-28-62.5-15.4-117.8-22-117.8-87.2 0-59.2 58.6-81.1 109.1-81.1 55.1 0 110.8 21.9 110.8 55.4 0 16.9-11.4 31.8-30.3 31.8-28.3 0-29.2-33.5-75-33.5-25.7 0-42 7-42 22.5 0 19.8 20.8 21.8 69.1 33 41.4 9.3 90.7 26.8 90.7 77.6 0 59.1-57.1 86.5-112 86.5z"],
- "slack": [448, 512, [], "f198", "M244.2 217.5l19.3 57.7-59.8 20-19.3-57.7 59.8-20zm41.4 243.7C131.6 507.4 65 471.6 18.8 317.6S8.4 97 162.4 50.8C316.4 4.6 383 40.4 429.2 194.4c46.2 154 10.4 220.6-143.6 266.8zM366.2 265c-3.9-12.2-17.2-18.6-29.4-14.7l-29 9.7-19.3-57.7 29-9.7c12.2-3.9 18.6-17.2 14.7-29.4-3.9-12.2-17.2-18.6-29.4-14.7l-29 9.7-10-30.1c-3.9-12.2-17.2-18.6-29.4-14.7-12.2 3.9-18.6 17.2-14.7 29.4l10 30.1-59.8 20.1-10-30.1c-3.9-12.2-17.2-18.6-29.4-14.7-12.2 3.9-18.6 17.2-14.7 29.4l10 30.1-29 9.7c-12.2 3.9-18.6 17.2-14.7 29.4 3.2 9.3 12.2 15.4 21.5 15.8 4.3.6 7.7-1 36.9-10.7l19.3 57.7-29 9.7c-12.2 3.9-18.6 17.2-14.7 29.4 3.2 9.3 12.2 15.4 21.5 15.8 4.3.6 7.7-1 36.9-10.7l10 30.1c3.7 10.8 15.8 18.6 29.4 14.7 12.2-3.9 18.6-17.2 14.7-29.4l-10-30.1 59.8-20.1 10 30.1c3.7 10.8 15.8 18.6 29.4 14.7 12.2-3.9 18.6-17.2 14.7-29.4l-10-30.1 29-9.7c12.2-4.2 18.6-17.5 14.7-29.6z"],
- "slack-hash": [448, 512, [], "f3ef", "M446.2 270.4c-6.2-19-26.9-29.1-46-22.9l-45.4 15.1-30.3-90 45.4-15.1c19.1-6.2 29.1-26.8 23-45.9-6.2-19-26.9-29.1-46-22.9l-45.4 15.1-15.7-47c-6.2-19-26.9-29.1-46-22.9-19.1 6.2-29.1 26.8-23 45.9l15.7 47-93.4 31.2-15.7-47c-6.2-19-26.9-29.1-46-22.9-19.1 6.2-29.1 26.8-23 45.9l15.7 47-45.3 15c-19.1 6.2-29.1 26.8-23 45.9 5 14.5 19.1 24 33.6 24.6 6.8 1 12-1.6 57.7-16.8l30.3 90L78 354.8c-19 6.2-29.1 26.9-23 45.9 5 14.5 19.1 24 33.6 24.6 6.8 1 12-1.6 57.7-16.8l15.7 47c5.9 16.9 24.7 29 46 22.9 19.1-6.2 29.1-26.8 23-45.9l-15.7-47 93.6-31.3 15.7 47c5.9 16.9 24.7 29 46 22.9 19.1-6.2 29.1-26.8 23-45.9l-15.7-47 45.4-15.1c19-6 29.1-26.7 22.9-45.7zm-254.1 47.2l-30.3-90.2 93.5-31.3 30.3 90.2-93.5 31.3z"],
- "slideshare": [512, 512, [], "f1e7", "M249.429 211.436c0 31.716-27.715 57.717-61.717 57.717-34.001 0-61.716-26.001-61.716-57.717 0-32.001 27.715-57.716 61.716-57.716 34.001 0 61.717 25.715 61.717 57.716zm254.294 50.002c-18.286 22.573-53.144 50.288-106.289 72.003C453.722 525.163 260 555.735 263.143 457.446c0 1.714-.286-52.859-.286-93.432-4.285-.858-8.571-2-13.714-3.143 0 40.858-.286 98.289-.286 96.575C252 555.735 58.278 525.163 114.566 333.441c-53.145-21.715-88.003-49.43-106.29-72.003-9.143-13.714.858-28.287 16.001-17.715 2 1.428 4.285 2.857 6.285 4.285V49.716C30.563 22.287 51.135 0 76.565 0h359.157c25.429 0 46.002 22.287 46.002 49.716v198.293l6-4.285c15.143-10.573 25.143 4 15.999 17.714zm-46.572-189.15c0-32.858-10.572-45.716-40.859-45.716H98.566c-31.716 0-40.573 10.858-40.573 45.716v192.293c67.717 35.43 125.72 29.144 157.435 28.001 13.429-.286 22.001 2.286 27.144 7.715 1.689 1.687 10.023 9.446 20.287 17.143 1.143-15.715 10.001-25.715 33.716-24.858 32.287 1.428 91.718 7.715 160.577-29.716V72.288zM331.146 153.72c-34.002 0-61.716 25.715-61.716 57.716 0 31.716 27.715 57.717 61.716 57.717 34.287 0 61.716-26.001 61.716-57.717 0-32.001-27.429-57.716-61.716-57.716z"],
- "snapchat": [496, 512, [], "f2ab", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm169.5 338.9c-3.5 8.1-18.1 14-44.8 18.2-1.4 1.9-2.5 9.8-4.3 15.9-1.1 3.7-3.7 5.9-8.1 5.9h-.2c-6.2 0-12.8-2.9-25.8-2.9-17.6 0-23.7 4-37.4 13.7-14.5 10.3-28.4 19.1-49.2 18.2-21 1.6-38.6-11.2-48.5-18.2-13.8-9.7-19.8-13.7-37.4-13.7-12.5 0-20.4 3.1-25.8 3.1-5.4 0-7.5-3.3-8.3-6-1.8-6.1-2.9-14.1-4.3-16-13.8-2.1-44.8-7.5-45.5-21.4-.2-3.6 2.3-6.8 5.9-7.4 46.3-7.6 67.1-55.1 68-57.1 0-.1.1-.2.2-.3 2.5-5 3-9.2 1.6-12.5-3.4-7.9-17.9-10.7-24-13.2-15.8-6.2-18-13.4-17-18.3 1.6-8.5 14.4-13.8 21.9-10.3 5.9 2.8 11.2 4.2 15.7 4.2 3.3 0 5.5-.8 6.6-1.4-1.4-23.9-4.7-58 3.8-77.1C183.1 100 230.7 96 244.7 96c.6 0 6.1-.1 6.7-.1 34.7 0 68 17.8 84.3 54.3 8.5 19.1 5.2 53.1 3.8 77.1 1.1.6 2.9 1.3 5.7 1.4 4.3-.2 9.2-1.6 14.7-4.2 4-1.9 9.6-1.6 13.6 0 6.3 2.3 10.3 6.8 10.4 11.9.1 6.5-5.7 12.1-17.2 16.6-1.4.6-3.1 1.1-4.9 1.7-6.5 2.1-16.4 5.2-19 11.5-1.4 3.3-.8 7.5 1.6 12.5.1.1.1.2.2.3.9 2 21.7 49.5 68 57.1 4 1 7.1 5.5 4.9 10.8z"],
- "snapchat-ghost": [512, 512, [], "f2ac", "M510.846 392.673c-5.211 12.157-27.239 21.089-67.36 27.318-2.064 2.786-3.775 14.686-6.507 23.956-1.625 5.566-5.623 8.869-12.128 8.869l-.297-.005c-9.395 0-19.203-4.323-38.852-4.323-26.521 0-35.662 6.043-56.254 20.588-21.832 15.438-42.771 28.764-74.027 27.399-31.646 2.334-58.025-16.908-72.871-27.404-20.714-14.643-29.828-20.582-56.241-20.582-18.864 0-30.736 4.72-38.852 4.72-8.073 0-11.213-4.922-12.422-9.04-2.703-9.189-4.404-21.263-6.523-24.13-20.679-3.209-67.31-11.344-68.498-32.15a10.627 10.627 0 0 1 8.877-11.069c69.583-11.455 100.924-82.901 102.227-85.934.074-.176.155-.344.237-.515 3.713-7.537 4.544-13.849 2.463-18.753-5.05-11.896-26.872-16.164-36.053-19.796-23.715-9.366-27.015-20.128-25.612-27.504 2.437-12.836 21.725-20.735 33.002-15.453 8.919 4.181 16.843 6.297 23.547 6.297 5.022 0 8.212-1.204 9.96-2.171-2.043-35.936-7.101-87.29 5.687-115.969C158.122 21.304 229.705 15.42 250.826 15.42c.944 0 9.141-.089 10.11-.089 52.148 0 102.254 26.78 126.723 81.643 12.777 28.65 7.749 79.792 5.695 116.009 1.582.872 4.357 1.942 8.599 2.139 6.397-.286 13.815-2.389 22.069-6.257 6.085-2.846 14.406-2.461 20.48.058l.029.01c9.476 3.385 15.439 10.215 15.589 17.87.184 9.747-8.522 18.165-25.878 25.018-2.118.835-4.694 1.655-7.434 2.525-9.797 3.106-24.6 7.805-28.616 17.271-2.079 4.904-1.256 11.211 2.46 18.748.087.168.166.342.239.515 1.301 3.03 32.615 74.46 102.23 85.934 6.427 1.058 11.163 7.877 7.725 15.859z"],
- "snapchat-square": [448, 512, [], "f2ad", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6.5 314.9c-3.5 8.1-18.1 14-44.8 18.2-1.4 1.9-2.5 9.8-4.3 15.9-1.1 3.7-3.7 5.9-8.1 5.9h-.2c-6.2 0-12.8-2.9-25.8-2.9-17.6 0-23.7 4-37.4 13.7-14.5 10.3-28.4 19.1-49.2 18.2-21 1.6-38.6-11.2-48.5-18.2-13.8-9.7-19.8-13.7-37.4-13.7-12.5 0-20.4 3.1-25.8 3.1-5.4 0-7.5-3.3-8.3-6-1.8-6.1-2.9-14.1-4.3-16-13.8-2.1-44.8-7.5-45.5-21.4-.2-3.6 2.3-6.8 5.9-7.4 46.3-7.6 67.1-55.1 68-57.1 0-.1.1-.2.2-.3 2.5-5 3-9.2 1.6-12.5-3.4-7.9-17.9-10.7-24-13.2-15.8-6.2-18-13.4-17-18.3 1.6-8.5 14.4-13.8 21.9-10.3 5.9 2.8 11.2 4.2 15.7 4.2 3.3 0 5.5-.8 6.6-1.4-1.4-23.9-4.7-58 3.8-77.1C159.1 100 206.7 96 220.7 96c.6 0 6.1-.1 6.7-.1 34.7 0 68 17.8 84.3 54.3 8.5 19.1 5.2 53.1 3.8 77.1 1.1.6 2.9 1.3 5.7 1.4 4.3-.2 9.2-1.6 14.7-4.2 4-1.9 9.6-1.6 13.6 0 6.3 2.3 10.3 6.8 10.4 11.9.1 6.5-5.7 12.1-17.2 16.6-1.4.6-3.1 1.1-4.9 1.7-6.5 2.1-16.4 5.2-19 11.5-1.4 3.3-.8 7.5 1.6 12.5.1.1.1.2.2.3.9 2 21.7 49.5 68 57.1 4 1 7.1 5.5 4.9 10.8z"],
- "soundcloud": [640, 512, [], "f1be", "M111.4 256.3l5.8 65-5.8 68.3c-.3 2.5-2.2 4.4-4.4 4.4s-4.2-1.9-4.2-4.4l-5.6-68.3 5.6-65c0-2.2 1.9-4.2 4.2-4.2 2.2 0 4.1 2 4.4 4.2zm21.4-45.6c-2.8 0-4.7 2.2-5 5l-5 105.6 5 68.3c.3 2.8 2.2 5 5 5 2.5 0 4.7-2.2 4.7-5l5.8-68.3-5.8-105.6c0-2.8-2.2-5-4.7-5zm25.5-24.1c-3.1 0-5.3 2.2-5.6 5.3l-4.4 130 4.4 67.8c.3 3.1 2.5 5.3 5.6 5.3 2.8 0 5.3-2.2 5.3-5.3l5.3-67.8-5.3-130c0-3.1-2.5-5.3-5.3-5.3zM7.2 283.2c-1.4 0-2.2 1.1-2.5 2.5L0 321.3l4.7 35c.3 1.4 1.1 2.5 2.5 2.5s2.2-1.1 2.5-2.5l5.6-35-5.6-35.6c-.3-1.4-1.1-2.5-2.5-2.5zm23.6-21.9c-1.4 0-2.5 1.1-2.5 2.5l-6.4 57.5 6.4 56.1c0 1.7 1.1 2.8 2.5 2.8s2.5-1.1 2.8-2.5l7.2-56.4-7.2-57.5c-.3-1.4-1.4-2.5-2.8-2.5zm25.3-11.4c-1.7 0-3.1 1.4-3.3 3.3L47 321.3l5.8 65.8c.3 1.7 1.7 3.1 3.3 3.1 1.7 0 3.1-1.4 3.1-3.1l6.9-65.8-6.9-68.1c0-1.9-1.4-3.3-3.1-3.3zm25.3-2.2c-1.9 0-3.6 1.4-3.6 3.6l-5.8 70 5.8 67.8c0 2.2 1.7 3.6 3.6 3.6s3.6-1.4 3.9-3.6l6.4-67.8-6.4-70c-.3-2.2-2-3.6-3.9-3.6zm241.4-110.9c-1.1-.8-2.8-1.4-4.2-1.4-2.2 0-4.2.8-5.6 1.9-1.9 1.7-3.1 4.2-3.3 6.7v.8l-3.3 176.7 1.7 32.5 1.7 31.7c.3 4.7 4.2 8.6 8.9 8.6s8.6-3.9 8.6-8.6l3.9-64.2-3.9-177.5c-.4-3-2-5.8-4.5-7.2zm-26.7 15.3c-1.4-.8-2.8-1.4-4.4-1.4s-3.1.6-4.4 1.4c-2.2 1.4-3.6 3.9-3.6 6.7l-.3 1.7-2.8 160.8s0 .3 3.1 65.6v.3c0 1.7.6 3.3 1.7 4.7 1.7 1.9 3.9 3.1 6.4 3.1 2.2 0 4.2-1.1 5.6-2.5 1.7-1.4 2.5-3.3 2.5-5.6l.3-6.7 3.1-58.6-3.3-162.8c-.3-2.8-1.7-5.3-3.9-6.7zm-111.4 22.5c-3.1 0-5.8 2.8-5.8 6.1l-4.4 140.6 4.4 67.2c.3 3.3 2.8 5.8 5.8 5.8 3.3 0 5.8-2.5 6.1-5.8l5-67.2-5-140.6c-.2-3.3-2.7-6.1-6.1-6.1zm376.7 62.8c-10.8 0-21.1 2.2-30.6 6.1-6.4-70.8-65.8-126.4-138.3-126.4-17.8 0-35 3.3-50.3 9.4-6.1 2.2-7.8 4.4-7.8 9.2v249.7c0 5 3.9 8.6 8.6 9.2h218.3c43.3 0 78.6-35 78.6-78.3.1-43.6-35.2-78.9-78.5-78.9zm-296.7-60.3c-4.2 0-7.5 3.3-7.8 7.8l-3.3 136.7 3.3 65.6c.3 4.2 3.6 7.5 7.8 7.5 4.2 0 7.5-3.3 7.5-7.5l3.9-65.6-3.9-136.7c-.3-4.5-3.3-7.8-7.5-7.8zm-53.6-7.8c-3.3 0-6.4 3.1-6.4 6.7l-3.9 145.3 3.9 66.9c.3 3.6 3.1 6.4 6.4 6.4 3.6 0 6.4-2.8 6.7-6.4l4.4-66.9-4.4-145.3c-.3-3.6-3.1-6.7-6.7-6.7zm26.7 3.4c-3.9 0-6.9 3.1-6.9 6.9L227 321.3l3.9 66.4c.3 3.9 3.1 6.9 6.9 6.9s6.9-3.1 6.9-6.9l4.2-66.4-4.2-141.7c0-3.9-3-6.9-6.9-6.9z"],
- "speakap": [448, 512, [], "f3f3", "M352 32H96C43.2 32 0 75.2 0 128v256c0 52.8 43.2 96 96 96h256c52.8 0 96-43.2 96-96V128c0-52.8-43.2-96-96-96zM221 382.9c-39.6 0-81.9-17.8-81.9-53.7V302H179v17.8c0 15.1 19.5 24.5 41.9 24.5 24.2 0 41.3-10.4 41.3-29.5 0-23.8-27.2-31.9-54.7-42.6-31.9-12.4-63.1-26.2-63.1-69.1 0-48 38.6-66.4 79.9-66.4 37.6 0 75.5 14.1 75.5 41.9v31.2h-39.9v-16.1c0-12.1-17.8-18.5-35.6-18.5-19.5 0-35.6 8.1-35.6 26.2 0 22.1 22.5 29.2 47 38.9 35.9 12.4 71.1 27.2 71.1 71.5.1 48.6-40.8 71.1-85.8 71.1z"],
- "spotify": [496, 512, [], "f1bc", "M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm100.7 364.9c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4zm26.9-65.6c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm31-76.2c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3z"],
- "stack-exchange": [448, 512, [], "f18d", "M43.5 322.8h361.1V342c0 33-25.7 59.5-57.2 59.5h-16.6L254.9 480v-78.5H100.6c-31.5 0-57.2-26.5-57.2-59.5v-19.2zm0-20.7h361.1v-74.4H43.5v74.4zm0-95.7h361.1V132H43.5v74.4zM347.4 32H100.6c-31.5 0-57.2 26.5-57.2 59.2v19.5h361.1V91.2c0-32.7-25.6-59.2-57.1-59.2z"],
- "stack-overflow": [384, 512, [], "f16c", "M293.7 300l-181.2-84.5 16.7-36.5 181.3 84.7-16.8 36.3zm48-76L188.2 95.7l-25.5 30.8 153.5 128.3 25.5-30.8zm39.6-31.7L262 32l-32 24 119.3 160.3 32-24zM290.7 311L95 269.7 86.8 309l195.7 41 8.2-39zm31.6 129H42.7V320h-40v160h359.5V320h-40v120zm-39.8-80h-200v39.7h200V360z"],
- "staylinked": [440, 512, [], "f3f5", "M201.6 127.4c4.1-3.2 10.3-3 13.8.5l170 167.3-2.7-2.7 44.3 41.3c3.7 3.5 3.3 9-.7 12.2l-198 163.9c-9.9 7.6-17.3.8-17.3.8L2.3 314.6c-3.5-3.5-3-9 1.2-12.2l45.8-34.9c4.2-3.2 10.4-3 13.9.5l151.9 147.5c3.7 3.5 10 3.7 14.2.4l93.2-74c4.1-3.2 4.5-8.7.9-12.2l-84-81.3c-3.6-3.5-9.9-3.7-14-.5l-.1.1c-4.1 3.2-10.4 3-14-.5l-68.1-64.3c-3.5-3.5-3.1-9 1.1-12.2l57.3-43.6m14.8 257.3c3.7 3.5 10.1 3.7 14.3.4l50.2-38.8-.3-.3 7.7-6c4.2-3.2 4.6-8.7.9-12.2l-57.1-54.4c-3.6-3.5-10-3.7-14.2-.5l-.1.1c-4.2 3.2-10.5 3.1-14.2-.4L109 180.8c-3.6-3.5-3.1-8.9 1.1-12.2l92.2-71.5c4.1-3.2 10.3-3 13.9.5l160.4 159c3.7 3.5 10 3.7 14.1.5l45.8-35.8c4.1-3.2 4.4-8.7.7-12.2L226.7 2.5c-1.5-1.2-8-5.5-16.3 1.1L3.6 165.7c-4.2 3.2-4.8 8.7-1.2 12.2l42.3 41.7"],
- "steam": [496, 512, [], "f1b6", "M496 256c0 137-111.2 248-248.4 248-113.8 0-209.6-76.3-239-180.4l95.2 39.3c6.4 32.1 34.9 56.4 68.9 56.4 39.2 0 71.9-32.4 70.2-73.5l84.5-60.2c52.1 1.3 95.8-40.9 95.8-93.5 0-51.6-42-93.5-93.7-93.5s-93.7 42-93.7 93.5v1.2L176.6 279c-15.5-.9-30.7 3.4-43.5 12.1L0 236.1C10.2 108.4 117.1 8 247.6 8 384.8 8 496 119 496 256zM155.7 384.3l-30.5-12.6a52.79 52.79 0 0 0 27.2 25.8c26.9 11.2 57.8-1.6 69-28.4 5.4-13 5.5-27.3.1-40.3-5.4-13-15.5-23.2-28.5-28.6-12.9-5.4-26.7-5.2-38.9-.6l31.5 13c19.8 8.2 29.2 30.9 20.9 50.7-8.3 19.9-31 29.2-50.8 21zm173.8-129.9c-34.4 0-62.4-28-62.4-62.3s28-62.3 62.4-62.3 62.4 28 62.4 62.3-27.9 62.3-62.4 62.3zm.1-15.6c25.9 0 46.9-21 46.9-46.8 0-25.9-21-46.8-46.9-46.8s-46.9 21-46.9 46.8c.1 25.8 21.1 46.8 46.9 46.8z"],
- "steam-square": [448, 512, [], "f1b7", "M185.2 356.5c7.7-18.5-1-39.7-19.6-47.4l-29.5-12.2c11.4-4.3 24.3-4.5 36.4.5 12.2 5.1 21.6 14.6 26.7 26.7 5 12.2 5 25.6-.1 37.7-10.5 25.1-39.4 37-64.6 26.5-11.6-4.8-20.4-13.6-25.4-24.2l28.5 11.8c18.6 7.8 39.9-.9 47.6-19.4zM400 32H48C21.5 32 0 53.5 0 80v160.7l116.6 48.1c12-8.2 26.2-12.1 40.7-11.3l55.4-80.2v-1.1c0-48.2 39.3-87.5 87.6-87.5s87.6 39.3 87.6 87.5c0 49.2-40.9 88.7-89.6 87.5l-79 56.3c1.6 38.5-29.1 68.8-65.7 68.8-31.8 0-58.5-22.7-64.5-52.7L0 319.2V432c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-99.7 222.5c-32.2 0-58.4-26.1-58.4-58.3s26.2-58.3 58.4-58.3 58.4 26.2 58.4 58.3-26.2 58.3-58.4 58.3zm.1-14.6c24.2 0 43.9-19.6 43.9-43.8 0-24.2-19.6-43.8-43.9-43.8-24.2 0-43.9 19.6-43.9 43.8 0 24.2 19.7 43.8 43.9 43.8z"],
- "steam-symbol": [448, 512, [], "f3f6", "M395.5 177.5c0 33.8-27.5 61-61 61-33.8 0-61-27.3-61-61s27.3-61 61-61c33.5 0 61 27.2 61 61zm52.5.2c0 63-51 113.8-113.7 113.8L225 371.3c-4 43-40.5 76.8-84.5 76.8-40.5 0-74.7-28.8-83-67L0 358V250.7L97.2 290c15.1-9.2 32.2-13.3 52-11.5l71-101.7c.5-62.3 51.5-112.8 114-112.8C397 64 448 115 448 177.7zM203 363c0-34.7-27.8-62.5-62.5-62.5-4.5 0-9 .5-13.5 1.5l26 10.5c25.5 10.2 38 39 27.7 64.5-10.2 25.5-39.2 38-64.7 27.5-10.2-4-20.5-8.3-30.7-12.2 10.5 19.7 31.2 33.2 55.2 33.2 34.7 0 62.5-27.8 62.5-62.5zm207.5-185.3c0-42-34.3-76.2-76.2-76.2-42.3 0-76.5 34.2-76.5 76.2 0 42.2 34.3 76.2 76.5 76.2 41.9.1 76.2-33.9 76.2-76.2z"],
- "sticker-mule": [576, 512, [], "f3f7", "M353.1 509.8c-5.9 2.9-32.1 3.2-36.5-.5-4.1-3-2.2-11.9-1.5-15 2.2-15-2.5-7.9-9.8-11.5-3.1-1.5-4.1-5.5-4.6-10-.5-1.5-1-2.5-1.5-3.5-1.7-10.7 6.8-33.6 8.2-43.4 4.9-23.7-.7-37.2 1.5-46.9 3.7-16.2 4.1-3.5 4.1-29.9-1.4-25.9 3.3-36.9.5-38.9-14.8 0-64.3 10.7-112.2 2-46.1-8.9-59.4-29-65.4-30.9-10.3-4.5-23.2.5-27.3 7-.1.1-35 70.6-39.6 87.8-6.2 20.5-.5 47.4 4.1 66.8 0 .1 4.5 14.6 10.3 19.5 2.1 1.5 5.1 2.5 7.2 4.5 2.8 2.7 9.4 15.2 9.8 16 2.6 4.5 3.6 8-1.5 10.5-3.6 2-9.3 2.5-14.4 2.5-2.6.5-1.5 3.5-3.1 5-2.9 2.8-20.7 6.1-29.9 2.5-2.6-1-5.7-3-6.2-5-1.5-4 2.1-9-1-12.5-4.5-2.9-13.1-2-17-12-2.2-5.4-2.6-7.6-2.6-49.4 0-9.7-5.9-38.7-8.2-46.9-1.5-5.5-1.5-11.5 0-16 .3-.9 4.1-4.6 4.1-13-1-1.5-4.6-.5-5.1-1.5-10.4-80.6-5.9-79-7.7-98.3-1.5-16-10.9-43.9-6.7-64.3.5-2.4 3.4-21 24.2-38.9 31-26.7 48.4-38.3 159-11.5 1.1.4 66.3 21.1 110.7-9 15.5-11.3 28.8-11.3 35.5-16 .1-.1 61.7-52.1 87-65.3 47.2-29.4 69.9-16.7 75.1-18 4.7-1 13.4-25.8 17-25.8 5.5 0 1.6 20.2 3.6 25.9.5 2 3.6 5 6.2 5 2.3 0 1.7-.8 10.3-5 8.4-5.4 14.9-17.6 20.6-17 11.7 1.6-19 41.6-19 46.9 0 2 .2.8 4.6 9.5 2.6 5.5 4.6 13.5 6.2 20 8.3 29.7 5.7 14.6 13.4 36.9 20.2 50.1 20.6 45.2 20.6 52.9 0 7.5-4.1 11-7.2 16.5-1.5 3-4.6 7.5-7.2 8-2.7.7 7-1.5-13.4 2.5-7.2 1-13.4-4.5-14.9-9.5-1.6-4.7 2.8-10.1-11.8-22.9-10.3-10-21.1-11.3-31.9-17-9.8-5.7-11.9 1-18 8-18 22.9-34 46.9-52 69.8-11.8 15-24.2 30.4-33.5 47.4-3.9 6.8-9.5 28.1-10.3 29.9-6.2 17.7-5.5 25.8-16.5 68.3-3.1 10-5.7 21.4-8.7 32.4-2.2 6.8-7.4 49.3-.5 59.4 2.1 3.5 8.7 4.5 11.3 8 .1.1 9.6 18.2 9.3 20 0 6.1-9.4 5.6-11.3 6.5-4.8 2.9-3.8 5.9-6.4 7.4"],
- "strava": [369, 512, [], "f428", "M301.6 292l-43.9 88.2-44.6-88.2h-67.6l112.2 220 111.5-220h-67.6zM151.4 0L0 292h89.2l62.2-116.1L213.1 292h88.5L151.4 0z"],
- "stripe": [640, 512, [], "f429", "M640 233.6c0-45.5-22-81.4-64.2-81.4s-67.9 35.9-67.9 81.1c0 53.5 30.3 78.2 73.5 78.2 21.2 0 37.1-4.8 49.2-11.5v-33.4c-12.1 6.1-26 9.8-43.6 9.8-17.3 0-32.5-6.1-34.5-26.9h86.9c.2-2.3.6-11.6.6-15.9m-87.9-16.8c0-20 12.3-28.4 23.4-28.4 10.9 0 22.5 8.4 22.5 28.4h-45.9zm-112.9-64.6c-17.4 0-28.6 8.2-34.8 13.9l-2.3-11H363v204.8l44.4-9.4.1-50.2c6.4 4.7 15.9 11.2 31.4 11.2 31.8 0 60.8-23.2 60.8-79.6.1-51.6-29.3-79.7-60.5-79.7m-10.6 122.5c-10.4 0-16.6-3.8-20.9-8.4l-.3-66c4.6-5.1 11-8.8 21.2-8.8 16.2 0 27.4 18.2 27.4 41.4.1 23.9-10.9 41.8-27.4 41.8M346.4 96v36.2l-44.6 9.5v-36.2l44.6-9.5m-44.5 59.2h44.6v153.2h-44.6V155.2zm-47.8 13.1c10.4-19.1 31.1-15.2 37.1-13.1V196c-5.7-1.8-23.4-4.5-33.9 9.3v103.1H213V155.2h38.4l2.7 13.1m-89-13.1h33.7V193h-33.7v63.2c0 26.2 28 18 33.7 15.7v33.8c-5.9 3.2-16.6 5.9-31.2 5.9-26.3 0-46.1-17-46.1-43.3l.2-142.4 43.3-9.2.1 38.5zM44.9 200.3c0 20 67.9 10.5 67.9 63.4 0 32-25.4 47.8-62.3 47.8-15.3 0-32-3-48.5-10.1v-40c14.9 8.1 33.9 14.2 48.6 14.2 9.9 0 17-2.7 17-10.9 0-21.2-67.5-13.2-67.5-62.4 0-31.4 24-50.2 60-50.2 14.7 0 29.4 2.3 44.1 8.1V202c-13.5-7.3-30.7-11.4-44.2-11.4-9.3.1-15.1 2.8-15.1 9.7"],
- "stripe-s": [362, 512, [], "f42a", "M144.3 154.6c0-22.3 18.6-30.9 48.4-30.9 43.4 0 98.5 13.3 141.9 36.7V26.1C287.3 7.2 240.1 0 192.8 0 77.1 0 0 60.4 0 161.4c0 157.9 216.8 132.3 216.8 200.4 0 26.4-22.9 34.9-54.7 34.9-47.2 0-108.2-19.5-156.1-45.5v128.5c53 22.8 106.8 32.4 156 32.4 118.6 0 200.3-51 200.3-153.6 0-170.2-218-139.7-218-203.9"],
- "studiovinari": [512, 512, [], "f3f8", "M480.3 187.7l4.2 28v28l-25.1 44.1-39.8 78.4-56.1 67.5-79.1 37.8-17.7 24.5-7.7 12-9.6 4s17.3-63.6 19.4-63.6c2.1 0 20.3.7 20.3.7l66.7-38.6-92.5 26.1-55.9 36.8-22.8 28-6.6 1.4 20.8-73.6 6.9-5.5 20.7 12.9 88.3-45.2 56.8-51.5 14.8-68.4-125.4 23.3 15.2-18.2-173.4-53.3 81.9-10.5-166-122.9L133.5 108 32.2 0l252.9 126.6-31.5-38L378 163 234.7 64l18.7 38.4-49.6-18.1L158.3 0l194.6 122L310 66.2l108 96.4 12-8.9-21-16.4 4.2-37.8L451 89.1l29.2 24.7 11.5 4.2-7 6.2 8.5 12-13.1 7.4-10.3 20.2 10.5 23.9z"],
- "stumbleupon": [512, 512, [], "f1a4", "M502.9 266v69.7c0 62.1-50.3 112.4-112.4 112.4-61.8 0-112.4-49.8-112.4-111.3v-70.2l34.3 16 51.1-15.2V338c0 14.7 12 26.5 26.7 26.5S417 352.7 417 338v-72h85.9zm-224.7-58.2l34.3 16 51.1-15.2V173c0-60.5-51.1-109-112.1-109-60.8 0-112.1 48.2-112.1 108.2v162.4c0 14.9-12 26.7-26.7 26.7S86 349.5 86 334.6V266H0v69.7C0 397.7 50.3 448 112.4 448c61.6 0 112.4-49.5 112.4-110.8V176.9c0-14.7 12-26.7 26.7-26.7s26.7 12 26.7 26.7v30.9z"],
- "stumbleupon-circle": [496, 512, [], "f1a3", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 177.5c-9.8 0-17.8 8-17.8 17.8v106.9c0 40.9-33.9 73.9-74.9 73.9-41.4 0-74.9-33.5-74.9-74.9v-46.5h57.3v45.8c0 10 8 17.8 17.8 17.8s17.8-7.9 17.8-17.8V200.1c0-40 34.2-72.1 74.7-72.1 40.7 0 74.7 32.3 74.7 72.6v23.7l-34.1 10.1-22.9-10.7v-20.6c.1-9.6-7.9-17.6-17.7-17.6zm167.6 123.6c0 41.4-33.5 74.9-74.9 74.9-41.2 0-74.9-33.2-74.9-74.2V263l22.9 10.7 34.1-10.1v47.1c0 9.8 8 17.6 17.8 17.6s17.8-7.9 17.8-17.6v-48h57.3c-.1 45.9-.1 46.4-.1 46.4z"],
- "superpowers": [448, 512, [], "f2dd", "M448 32c-83.3 11-166.8 22-250 33-92 12.5-163.3 86.7-169 180-3.3 55.5 18 109.5 57.8 148.2L0 480c83.3-11 166.5-22 249.8-33 91.8-12.5 163.3-86.8 168.7-179.8 3.5-55.5-18-109.5-57.7-148.2L448 32zm-79.7 232.3c-4.2 79.5-74 139.2-152.8 134.5-79.5-4.7-140.7-71-136.3-151 4.5-79.2 74.3-139.3 153-134.5 79.3 4.7 140.5 71 136.1 151z"],
- "supple": [640, 512, [], "f3f9", "M640 262.5c0 64.1-109 116.1-243.5 116.1-24.8 0-48.6-1.8-71.1-5 7.7.4 15.5.6 23.4.6 134.5 0 243.5-56.9 243.5-127.1 0-29.4-19.1-56.4-51.2-78 60 21.1 98.9 55.1 98.9 93.4zM47.7 227.9c-.1-70.2 108.8-127.3 243.3-127.6 7.9 0 15.6.2 23.3.5-22.5-3.2-46.3-4.9-71-4.9C108.8 96.3-.1 148.5 0 212.6c.1 38.3 39.1 72.3 99.3 93.3-32.3-21.5-51.5-48.6-51.6-78zm60.2 39.9s10.5 13.2 29.3 13.2c17.9 0 28.4-11.5 28.4-25.1 0-28-40.2-25.1-40.2-39.7 0-5.4 5.3-9.1 12.5-9.1 5.7 0 11.3 2.6 11.3 6.6v3.9h14.2v-7.9c0-12.1-15.4-16.8-25.4-16.8-16.5 0-28.5 10.2-28.5 24.1 0 26.6 40.2 25.4 40.2 39.9 0 6.6-5.8 10.1-12.3 10.1-11.9 0-20.7-10.1-20.7-10.1l-8.8 10.9zm120.8-73.6v54.4c0 11.3-7.1 17.8-17.8 17.8-10.7 0-17.8-6.5-17.8-17.7v-54.5h-15.8v55c0 18.9 13.4 31.9 33.7 31.9 20.1 0 33.4-13 33.4-31.9v-55h-15.7zm34.4 85.4h15.8v-29.5h15.5c16 0 27.2-11.5 27.2-28.1s-11.2-27.8-27.2-27.8h-39.1v13.4h7.8v72zm15.8-43v-29.1h12.9c8.7 0 13.7 5.7 13.7 14.4 0 8.9-5.1 14.7-14 14.7h-12.6zm57 43h15.8v-29.5h15.5c16 0 27.2-11.5 27.2-28.1s-11.2-27.8-27.2-27.8h-39.1v13.4h7.8v72zm15.7-43v-29.1h12.9c8.7 0 13.7 5.7 13.7 14.4 0 8.9-5 14.7-14 14.7h-12.6zm57.1 34.8c0 5.8 2.4 8.2 8.2 8.2h37.6c5.8 0 8.2-2.4 8.2-8.2v-13h-14.3v5.2c0 1.7-1 2.6-2.6 2.6h-18.6c-1.7 0-2.6-1-2.6-2.6v-61.2c0-5.7-2.4-8.2-8.2-8.2H401v13.4h5.2c1.7 0 2.6 1 2.6 2.6v61.2zm63.4 0c0 5.8 2.4 8.2 8.2 8.2H519c5.7 0 8.2-2.4 8.2-8.2v-13h-14.3v5.2c0 1.7-1 2.6-2.6 2.6h-19.7c-1.7 0-2.6-1-2.6-2.6v-20.3h27.7v-13.4H488v-22.4h19.2c1.7 0 2.6 1 2.6 2.6v5.2H524v-13c0-5.7-2.5-8.2-8.2-8.2h-51.6v13.4h7.8v63.9zm58.9-76v5.9h1.6v-5.9h2.7v-1.2h-7v1.2h2.7zm5.7-1.2v7.1h1.5v-5.7l2.3 5.7h1.3l2.3-5.7v5.7h1.5v-7.1h-2.3l-2.1 5.1-2.1-5.1h-2.4z"],
- "telegram": [496, 512, [], "f2c6", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm121.8 169.9l-40.7 191.8c-3 13.6-11.1 16.9-22.4 10.5l-62-45.7-29.9 28.8c-3.3 3.3-6.1 6.1-12.5 6.1l4.4-63.1 114.9-103.8c5-4.4-1.1-6.9-7.7-2.5l-142 89.4-61.2-19.1c-13.3-4.2-13.6-13.3 2.8-19.7l239.1-92.2c11.1-4 20.8 2.7 17.2 19.5z"],
- "telegram-plane": [448, 512, [], "f3fe", "M446.7 98.6l-67.6 318.8c-5.1 22.5-18.4 28.1-37.3 17.5l-103-75.9-49.7 47.8c-5.5 5.5-10.1 10.1-20.7 10.1l7.4-104.9 190.9-172.5c8.3-7.4-1.8-11.5-12.9-4.1L117.8 284 16.2 252.2c-22.1-6.9-22.5-22.1 4.6-32.7L418.2 66.4c18.4-6.9 34.5 4.1 28.5 32.2z"],
- "tencent-weibo": [384, 512, [], "f1d5", "M72.3 495.8c1.4 19.9-27.6 22.2-29.7 2.9C31 368.8 73.7 259.2 144 185.5c-15.6-34 9.2-77.1 50.6-77.1 30.3 0 55.1 24.6 55.1 55.1 0 44-49.5 70.8-86.9 45.1-65.7 71.3-101.4 169.8-90.5 287.2zM192 .1C66.1.1-12.3 134.3 43.7 242.4 52.4 259.8 79 246.9 70 229 23.7 136.4 91 29.8 192 29.8c75.4 0 136.9 61.4 136.9 136.9 0 90.8-86.9 153.9-167.7 133.1-19.1-4.1-25.6 24.4-6.6 29.1 110.7 23.2 204-60 204-162.3C358.6 74.7 284 .1 192 .1z"],
- "themeisle": [512, 512, [], "f2b2", "M208 88.286c0-10 6.286-21.714 17.715-21.714 11.142 0 17.714 11.714 17.714 21.714 0 10.285-6.572 21.714-17.714 21.714C214.286 110 208 98.571 208 88.286zm304 160c0 36.001-11.429 102.286-36.286 129.714-22.858 24.858-87.428 61.143-120.857 70.572l-1.143.286v32.571c0 16.286-12.572 30.571-29.143 30.571-10 0-19.429-5.714-24.572-14.286-5.427 8.572-14.856 14.286-24.856 14.286-10 0-19.429-5.714-24.858-14.286-5.142 8.572-14.571 14.286-24.57 14.286-10.286 0-19.429-5.714-24.858-14.286-5.143 8.572-14.571 14.286-24.571 14.286-18.857 0-29.429-15.714-29.429-32.857-16.286 12.285-35.715 19.428-56.571 19.428-22 0-43.429-8.285-60.286-22.857 10.285-.286 20.571-2.286 30.285-5.714-20.857-5.714-39.428-18.857-52-36.286 21.37 4.645 46.209 1.673 67.143-11.143-22-22-56.571-58.857-68.572-87.428C1.143 321.714 0 303.714 0 289.429c0-49.714 20.286-160 86.286-160 10.571 0 18.857 4.858 23.143 14.857a158.792 158.792 0 0 1 12-15.428c2-2.572 5.714-5.429 7.143-8.286 7.999-12.571 11.714-21.142 21.714-34C182.571 45.428 232 17.143 285.143 17.143c6 0 12 .285 17.714 1.143C313.714 6.571 328.857 0 344.572 0c14.571 0 29.714 6 40 16.286.857.858 1.428 2.286 1.428 3.428 0 3.714-10.285 13.429-12.857 16.286 4.286 1.429 15.714 6.858 15.714 12 0 2.857-2.857 5.143-4.571 7.143 31.429 27.714 49.429 67.143 56.286 108 4.286-5.143 10.285-8.572 17.143-8.572 10.571 0 20.857 7.144 28.571 14.001C507.143 187.143 512 221.714 512 248.286zM188 89.428c0 18.286 12.571 37.143 32.286 37.143 19.714 0 32.285-18.857 32.285-37.143 0-18-12.571-36.857-32.285-36.857-19.715 0-32.286 18.858-32.286 36.857zM237.714 194c0-19.714 3.714-39.143 8.571-58.286-52.039 79.534-13.531 184.571 68.858 184.571 21.428 0 42.571-7.714 60-20 2-7.429 3.714-14.857 3.714-22.572 0-14.286-6.286-21.428-20.572-21.428-4.571 0-9.143.857-13.429 1.714-63.343 12.668-107.142 3.669-107.142-63.999zm-41.142 254.858c0-11.143-8.858-20.857-20.286-20.857-11.429 0-20 9.715-20 20.857v32.571c0 11.143 8.571 21.142 20 21.142 11.428 0 20.286-9.715 20.286-21.142v-32.571zm49.143 0c0-11.143-8.572-20.857-20-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20-10 20-21.142v-32.571zm49.713 0c0-11.143-8.857-20.857-20.285-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20.285-9.715 20.285-21.142v-32.571zm49.715 0c0-11.143-8.857-20.857-20.286-20.857-11.428 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.858 21.142 20.286 21.142 11.429 0 20.286-10 20.286-21.142v-32.571zM421.714 286c-30.857 59.142-90.285 102.572-158.571 102.572-96.571 0-160.571-84.572-160.571-176.572 0-16.857 2-33.429 6-49.714-20 33.715-29.714 72.572-29.714 111.429 0 60.286 24.857 121.715 71.429 160.857 5.143-9.714 14.857-16.286 26-16.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.571-14.286 24.858-14.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.857-14.286 24.858-14.286 10 0 19.428 5.714 24.857 14.286 5.143-8.571 14.571-14.286 24.572-14.286 10.857 0 20.857 6.572 25.714 16 43.427-36.286 68.569-92 71.426-148.286zm10.572-99.714c0-53.714-34.571-105.714-92.572-105.714-30.285 0-58.571 15.143-78.857 36.857C240.862 183.812 233.41 254 302.286 254c28.805 0 97.357-28.538 84.286 36.857 28.857-26 45.714-65.714 45.714-104.571z"],
- "trello": [448, 512, [], "f181", "M392 32H56C25.1 32 0 57.1 0 88v336c0 30.9 25.1 56 56 56h336c30.9 0 56-25.1 56-56V88c0-30.9-25.1-56-56-56zM194.9 371.4c0 14.8-12 26.9-26.9 26.9H85.1c-14.8 0-26.9-12-26.9-26.9V117.1c0-14.8 12-26.9 26.9-26.9H168c14.8 0 26.9 12 26.9 26.9v254.3zm194.9-112c0 14.8-12 26.9-26.9 26.9H280c-14.8 0-26.9-12-26.9-26.9V117.1c0-14.8 12-26.9 26.9-26.9h82.9c14.8 0 26.9 12 26.9 26.9v142.3z"],
- "tripadvisor": [576, 512, [], "f262", "M166.4 280.521c0 13.236-10.73 23.966-23.966 23.966s-23.966-10.73-23.966-23.966 10.73-23.966 23.966-23.966 23.966 10.729 23.966 23.966zm264.962-23.956c-13.23 0-23.956 10.725-23.956 23.956 0 13.23 10.725 23.956 23.956 23.956 13.23 0 23.956-10.725 23.956-23.956-.001-13.231-10.726-23.956-23.956-23.956zm89.388 139.49c-62.667 49.104-153.276 38.109-202.379-24.559l-30.979 46.325-30.683-45.939c-48.277 60.39-135.622 71.891-197.885 26.055-64.058-47.158-77.759-137.316-30.601-201.374A186.762 186.762 0 0 0 0 139.416l90.286-.05a358.48 358.48 0 0 1 197.065-54.03 350.382 350.382 0 0 1 192.181 53.349l96.218.074a185.713 185.713 0 0 0-28.352 57.649c46.793 62.747 34.964 151.37-26.648 199.647zM259.366 281.761c-.007-63.557-51.535-115.075-115.092-115.068C80.717 166.7 29.2 218.228 29.206 281.785c.007 63.557 51.535 115.075 115.092 115.068 63.513-.075 114.984-51.539 115.068-115.052v-.04zm28.591-10.455c5.433-73.44 65.51-130.884 139.12-133.022a339.146 339.146 0 0 0-139.727-27.812 356.31 356.31 0 0 0-140.164 27.253c74.344 1.582 135.299 59.424 140.771 133.581zm251.706-28.767c-21.992-59.634-88.162-90.148-147.795-68.157-59.634 21.992-90.148 88.162-68.157 147.795v.032c22.038 59.607 88.198 90.091 147.827 68.113 59.615-22.004 90.113-88.162 68.125-147.783zm-326.039 37.975v.115c-.057 39.328-31.986 71.163-71.314 71.106-39.328-.057-71.163-31.986-71.106-71.314.057-39.328 31.986-71.163 71.314-71.106 39.259.116 71.042 31.94 71.106 71.199zm-24.512 0v-.084c-.051-25.784-20.994-46.645-46.778-46.594-25.784.051-46.645 20.994-46.594 46.777.051 25.784 20.994 46.645 46.777 46.594 25.726-.113 46.537-20.968 46.595-46.693zm313.423 0v.048c-.02 39.328-31.918 71.194-71.247 71.173s-71.194-31.918-71.173-71.247c.02-39.328 31.918-71.194 71.247-71.173 39.29.066 71.121 31.909 71.173 71.199zm-24.504-.008c-.009-25.784-20.918-46.679-46.702-46.67-25.784.009-46.679 20.918-46.67 46.702.009 25.784 20.918 46.678 46.702 46.67 25.765-.046 46.636-20.928 46.67-46.693v-.009z"],
- "tumblr": [320, 512, [], "f173", "M309.8 480.3c-13.6 14.5-50 31.7-97.4 31.7-120.8 0-147-88.8-147-140.6v-144H17.9c-5.5 0-10-4.5-10-10v-68c0-7.2 4.5-13.6 11.3-16 62-21.8 81.5-76 84.3-117.1.8-11 6.5-16.3 16.1-16.3h70.9c5.5 0 10 4.5 10 10v115.2h83c5.5 0 10 4.4 10 9.9v81.7c0 5.5-4.5 10-10 10h-83.4V360c0 34.2 23.7 53.6 68 35.8 4.8-1.9 9-3.2 12.7-2.2 3.5.9 5.8 3.4 7.4 7.9l22 64.3c1.8 5 3.3 10.6-.4 14.5z"],
- "tumblr-square": [448, 512, [], "f174", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-82.3 364.2c-8.5 9.1-31.2 19.8-60.9 19.8-75.5 0-91.9-55.5-91.9-87.9v-90h-29.7c-3.4 0-6.2-2.8-6.2-6.2v-42.5c0-4.5 2.8-8.5 7.1-10 38.8-13.7 50.9-47.5 52.7-73.2.5-6.9 4.1-10.2 10-10.2h44.3c3.4 0 6.2 2.8 6.2 6.2v72h51.9c3.4 0 6.2 2.8 6.2 6.2v51.1c0 3.4-2.8 6.2-6.2 6.2h-52.1V321c0 21.4 14.8 33.5 42.5 22.4 3-1.2 5.6-2 8-1.4 2.2.5 3.6 2.1 4.6 4.9l13.8 40.2c1 3.2 2 6.7-.3 9.1z"],
- "twitch": [448, 512, [], "f1e8", "M40.1 32L10 108.9v314.3h107V480h60.2l56.8-56.8h87l117-117V32H40.1zm357.8 254.1L331 353H224l-56.8 56.8V353H76.9V72.1h321v214zM331 149v116.9h-40.1V149H331zm-107 0v116.9h-40.1V149H224z"],
- "twitter": [512, 512, [], "f099", "M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"],
- "twitter-square": [448, 512, [], "f081", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-48.9 158.8c.2 2.8.2 5.7.2 8.5 0 86.7-66 186.6-186.6 186.6-37.2 0-71.7-10.8-100.7-29.4 5.3.6 10.4.8 15.8.8 30.7 0 58.9-10.4 81.4-28-28.8-.6-53-19.5-61.3-45.5 10.1 1.5 19.2 1.5 29.6-1.2-30-6.1-52.5-32.5-52.5-64.4v-.8c8.7 4.9 18.9 7.9 29.6 8.3a65.447 65.447 0 0 1-29.2-54.6c0-12.2 3.2-23.4 8.9-33.1 32.3 39.8 80.8 65.8 135.2 68.6-9.3-44.5 24-80.6 64-80.6 18.9 0 35.9 7.9 47.9 20.7 14.8-2.8 29-8.3 41.6-15.8-4.9 15.2-15.2 28-28.8 36.1 13.2-1.4 26-5.1 37.8-10.2-8.9 13.1-20.1 24.7-32.9 34z"],
- "typo3": [433, 512, [], "f42b", "M330.8 341c-7 2.3-11.6 2.3-18.5 2.3-57.2 0-140.6-198.5-140.6-264.9 0-24.7 5.4-32.4 13.9-39.4-69.5 8.5-149.3 34-176.3 66.4-5.4 7.7-9.3 20.8-9.3 37.1C0 246 106.8 480 184.1 480c36.3 0 97.3-59.5 146.7-139M294.5 32c71.8 0 138.8 11.6 138.8 52.5 0 82.6-52.5 182.3-78.8 182.3-47.9 0-101.7-132.1-101.7-198.5 0-30.9 11.6-36.3 41.7-36.3"],
- "uber": [448, 512, [], "f402", "M414.1 32H33.9C15.2 32 0 47.2 0 65.9V446c0 18.8 15.2 34 33.9 34H414c18.7 0 33.9-15.2 33.9-33.9V65.9C448 47.2 432.8 32 414.1 32zM237.6 391.1C163 398.6 96.4 344.2 88.9 269.6h94.4V290c0 3.7 3 6.8 6.8 6.8H258c3.7 0 6.8-3 6.8-6.8v-67.9c0-3.7-3-6.8-6.8-6.8h-67.9c-3.7 0-6.8 3-6.8 6.8v20.4H88.9c7-69.4 65.4-122.2 135.1-122.2 69.7 0 128.1 52.8 135.1 122.2 7.5 74.5-46.9 141.1-121.5 148.6z"],
- "uikit": [448, 512, [], "f403", "M443.9 128v256L218 512 0 384V169.7l87.6 45.1v117l133.5 75.5 135.8-75.5v-151l-101.1-57.6 87.6-53.1L443.9 128zM308.6 49.1L223.8 0l-88.6 54.8 86 47.3 87.4-53z"],
- "uniregistry": [384, 512, [], "f404", "M281.1 220.1H384v-14.8H281.1v14.8zm0-37.1H384v-12.4H281.1V183zm0 74.2H384v-17.3H281.1v17.3zm-157.7 86.7H8.5c2.6 8.5 5.8 16.8 9.6 24.8h138.3c-12.9-5.7-24.1-14.2-33-24.8m145.7-12.4h109.7c1.8-7.3 3.1-14.7 3.9-22.3H278.3c-2.1 7.9-5.2 15.4-9.2 22.3m-41.5 37.1H367c3.7-8 5.8-16.2 8.5-24.8h-115c-8.8 10.7-20.1 19.2-32.9 24.8M384 32H281.1v2.5H384V32zM192 480c39.5 0 76.2-11.8 106.8-32.2H85.3C115.8 468.2 152.5 480 192 480m89.1-334.2H384V136H281.1v9.8zm0-37.1H384v-7.4H281.1v7.4zm0-37.1H384v-4.9H281.1v4.9zm-178.2 99H0V183h102.9v-12.4zM38.8 405.7h305.3c6.7-8.5 12.6-17.6 17.8-27.2H23c5.2 9.6 9.2 18.7 15.8 27.2m64.1-118.8v-12.4H0v12.4c0 2.5 0 5 .1 7.4h103.1c-.2-2.4-.3-4.9-.3-7.4m178.2 0c0 2.5-.1 5-.4 7.4h103.1c.1-2.5.2-4.9.2-7.4v-12.4H281.1v12.4zm-203 156h227.7c11.8-8.7 22.7-18.6 32.2-29.7H44.9c9.6 11 21.4 21 33.2 29.7m24.8-376.2H0v4.9h102.9v-4.9zm0-34.7H0v2.5h102.9V32zm0 173.3H0v14.8h102.9v-14.8zm0 34.6H0v17.3h102.9v-17.3zm0-103.9H0v9.9h102.9V136zm0-34.7H0v7.4h102.9v-7.4zm2.8 207.9H1.3c.9 7.6 2.2 15 3.9 22.3h109.7c-4-6.9-7.2-14.4-9.2-22.3"],
- "untappd": [640, 512, [], "f405", "M401.3 49.9c-79.8 160.1-84.6 152.5-87.9 173.2l-5.2 32.8c-1.9 12-6.6 23.5-13.7 33.4L145.6 497.1c-7.6 10.6-20.4 16.2-33.4 14.6-40.3-5-77.8-32.2-95.3-68.5-5.7-11.8-4.5-25.8 3.1-36.4l148.9-207.9c7.1-9.9 16.4-18 27.2-23.7l29.3-15.5c18.5-9.8 9.7-11.9 135.6-138.9 1-4.8 1-7.3 3.6-8 3-.7 6.6-1 6.3-4.6l-.4-4.6c-.2-1.9 1.3-3.6 3.2-3.6 4.5-.1 13.2 1.2 25.6 10 12.3 8.9 16.4 16.8 17.7 21.1.6 1.8-.6 3.7-2.4 4.2l-4.5 1.1c-3.4.9-2.5 4.4-2.3 7.4.1 2.8-2.3 3.6-6.5 6.1zM230.1 36.4c3.4.9 2.5 4.4 2.3 7.4-.2 2.7 2.1 3.5 6.4 6 7.9 15.9 15.3 30.5 22.2 44 .7 1.3 2.3 1.5 3.3.5 11.2-12 24.6-26.2 40.5-42.6 1.3-1.4 1.4-3.5.1-4.9-8-8.2-16.5-16.9-25.6-26.1-1-4.7-1-7.3-3.6-8-3-.8-6.6-1-6.3-4.6.3-3.3 1.4-8.1-2.8-8.2-4.5-.1-13.2 1.1-25.6 10-12.3 8.9-16.4 16.8-17.7 21.1-1.4 4.2 3.6 4.6 6.8 5.4zM620 406.7L471.2 198.8c-13.2-18.5-26.6-23.4-56.4-39.1-11.2-5.9-14.2-10.9-30.5-28.9-1-1.1-2.9-.9-3.6.5-46.3 88.8-47.1 82.8-49 94.8-1.7 10.7-1.3 20 .3 29.8 1.9 12 6.6 23.5 13.7 33.4l148.9 207.9c7.6 10.6 20.2 16.2 33.1 14.7 40.3-4.9 78-32 95.7-68.6 5.4-11.9 4.3-25.9-3.4-36.6z"],
- "usb": [640, 512, [], "f287", "M641.5 256c0 3.1-1.7 6.1-4.5 7.5L547.9 317c-1.4.8-2.8 1.4-4.5 1.4-1.4 0-3.1-.3-4.5-1.1-2.8-1.7-4.5-4.5-4.5-7.8v-35.6H295.7c25.3 39.6 40.5 106.9 69.6 106.9H392V354c0-5 3.9-8.9 8.9-8.9H490c5 0 8.9 3.9 8.9 8.9v89.1c0 5-3.9 8.9-8.9 8.9h-89.1c-5 0-8.9-3.9-8.9-8.9v-26.7h-26.7c-75.4 0-81.1-142.5-124.7-142.5H140.3c-8.1 30.6-35.9 53.5-69 53.5C32 327.3 0 295.3 0 256s32-71.3 71.3-71.3c33.1 0 61 22.8 69 53.5 39.1 0 43.9 9.5 74.6-60.4C255 88.7 273 95.7 323.8 95.7c7.5-20.9 27-35.6 50.4-35.6 29.5 0 53.5 23.9 53.5 53.5s-23.9 53.5-53.5 53.5c-23.4 0-42.9-14.8-50.4-35.6H294c-29.1 0-44.3 67.4-69.6 106.9h310.1v-35.6c0-3.3 1.7-6.1 4.5-7.8 2.8-1.7 6.4-1.4 8.9.3l89.1 53.5c2.8 1.1 4.5 4.1 4.5 7.2z"],
- "ussunnah": [512, 512, [], "f407", "M156.8 285.1l5.7 14.4h-8.2c-1.3-3.2-3.1-7.7-3.8-9.5-2.5-6.3-1.1-8.4 0-10 1.9-2.7 3.2-4.4 3.6-5.2 0 2.2.8 5.7 2.7 10.3zm297.3 18.8c-2.1 13.8-5.7 27.1-10.5 39.7l43 23.4-44.8-18.8c-5.3 13.2-12 25.6-19.9 37.2l34.2 30.2-36.8-26.4c-8.4 11.8-18 22.6-28.7 32.3l24.9 34.7-28.1-31.8c-11 9.6-23.1 18-36.1 25.1l15.7 37.2-19.3-35.3c-13.1 6.8-27 12.1-41.6 15.9l6.7 38.4-10.5-37.4c-14.3 3.4-29.2 5.3-44.5 5.4L256 512l-1.9-38.4c-15.3-.1-30.2-2-44.5-5.3L199 505.6l6.7-38.2c-14.6-3.7-28.6-9.1-41.7-15.8l-19.2 35.1 15.6-37c-13-7-25.2-15.4-36.2-25.1l-27.9 31.6 24.7-34.4c-10.7-9.7-20.4-20.5-28.8-32.3l-36.5 26.2 33.9-29.9c-7.9-11.6-14.6-24.1-20-37.3l-44.4 18.7L67.8 344c-4.8-12.7-8.4-26.1-10.5-39.9l-51 9 50.3-14.2c-1.1-8.5-1.7-17.1-1.7-25.9 0-4.7.2-9.4.5-14.1L0 256l56-2.8c1.3-13.1 3.8-25.8 7.5-38.1L6.4 199l58.9 10.4c4-12 9.1-23.5 15.2-34.4l-55.1-30 58.3 24.6C90 159 97.2 149.2 105.3 140L55.8 96.4l53.9 38.7c8.1-8.6 17-16.5 26.6-23.6l-40-55.6 45.6 51.6c9.5-6.6 19.7-12.3 30.3-17.2l-27.3-64.9 33.8 62.1c10.5-4.4 21.4-7.9 32.7-10.4L199 6.4l19.5 69.2c11-2.1 22.3-3.2 33.8-3.4L256 0l3.6 72.2c11.5.2 22.8 1.4 33.8 3.5L313 6.4l-12.4 70.7c11.3 2.6 22.2 6.1 32.6 10.5l33.9-62.2-27.4 65.1c10.6 4.9 20.7 10.7 30.2 17.2l45.8-51.8-40.1 55.9c9.5 7.1 18.4 15 26.5 23.6l54.2-38.9-49.7 43.9c8 9.1 15.2 18.9 21.5 29.4l58.7-24.7-55.5 30.2c6.1 10.9 11.1 22.3 15.1 34.3l59.3-10.4-57.5 16.2c3.7 12.2 6.2 24.9 7.5 37.9L512 256l-56 2.8c.3 4.6.5 9.3.5 14.1 0 8.7-.6 17.3-1.6 25.8l50.7 14.3-51.5-9.1zm-21.8-31c0-97.5-79-176.5-176.5-176.5s-176.5 79-176.5 176.5 79 176.5 176.5 176.5 176.5-79 176.5-176.5zm-24 0c0 84.3-68.3 152.6-152.6 152.6s-152.6-68.3-152.6-152.6 68.3-152.6 152.6-152.6 152.6 68.3 152.6 152.6zM195 241c0 2.1 1.3 3.8 3.6 5.1 3.3 1.9 6.2 4.6 8.2 8.2 2.8-5.7 4.3-9.5 4.3-11.2 0-2.2-1.1-4.4-3.2-7-2.1-2.5-3.2-5.2-3.3-7.7-6.5 6.8-9.6 10.9-9.6 12.6zm-40.7-19c0 2.1 1.3 3.8 3.6 5.1 3.5 1.9 6.2 4.6 8.2 8.2 2.8-5.7 4.3-9.5 4.3-11.2 0-2.2-1.1-4.4-3.2-7-2.1-2.5-3.2-5.2-3.3-7.7-6.5 6.8-9.6 10.9-9.6 12.6zm-19 0c0 2.1 1.3 3.8 3.6 5.1 3.3 1.9 6.2 4.6 8.2 8.2 2.8-5.7 4.3-9.5 4.3-11.2 0-2.2-1.1-4.4-3.2-7-2.1-2.5-3.2-5.2-3.3-7.7-6.4 6.8-9.6 10.9-9.6 12.6zm204.9 87.9c-8.4-3-8.7-6.8-8.7-15.6V182c-8.2 12.5-14.2 18.6-18 18.6 6.3 14.4 9.5 23.9 9.5 28.3v64.3c0 2.2-2.2 6.5-4.7 6.5h-18c-2.8-7.5-10.2-26.9-15.3-40.3-2 2.5-7.2 9.2-10.7 13.7 2.4 1.6 4.1 3.6 5.2 6.3 2.6 6.7 6.4 16.5 7.9 20.2h-9.2c-3.9-10.4-9.6-25.4-11.8-31.1-2 2.5-7.2 9.2-10.7 13.7 2.4 1.6 4.1 3.6 5.2 6.3.8 2 2.8 7.3 4.3 10.9H256c-1.5-4.1-5.6-14.6-8.4-22-2 2.5-7.2 9.2-10.7 13.7 2.5 1.6 4.3 3.6 5.2 6.3.2.6.5 1.4.6 1.7H225c-4.6-13.9-11.4-27.7-11.4-34.1 0-2.2.3-5.1 1.1-8.2-8.8 10.8-14 15.9-14 25 0 7.5 10.4 28.3 10.4 33.3 0 1.7-.5 3.3-1.4 4.9-9.6-12.7-15.5-20.7-18.8-20.7h-12l-11.2-28c-3.8-9.6-5.7-16-5.7-18.8 0-3.8.5-7.7 1.7-12.2-1 1.3-3.7 4.7-5.5 7.1-.8-2.1-3.1-7.7-4.6-11.5-2.1 2.5-7.5 9.1-11.2 13.6.9 2.3 3.3 8.1 4.9 12.2-2.5 3.3-9.1 11.8-13.6 17.7-4 5.3-5.8 13.3-2.7 21.8 2.5 6.7 2 7.9-1.7 14.1H191c5.5 0 14.3 14 15.5 22 13.2-16 15.4-19.6 16.8-21.6h107c3.9 0 7.2-1.9 9.9-5.8zm20.1-26.6V181.7c-9 12.5-15.9 18.6-20.7 18.6 7.1 14.4 10.7 23.9 10.7 28.3v66.3c0 17.5 8.6 20.4 24 20.4 8.1 0 12.5-.8 13.7-2.7-4.3-1.6-7.6-2.5-9.9-3.3-8.1-3.2-17.8-7.4-17.8-26z"],
- "vaadin": [448, 512, [], "f408", "M224.5 140.7c1.5-17.6 4.9-52.7 49.8-52.7h98.6c20.7 0 32.1-7.8 32.1-21.6V54.1c0-12.2 9.3-22.1 21.5-22.1S448 41.9 448 54.1v36.5c0 42.9-21.5 62-66.8 62H280.7c-30.1 0-33 14.7-33 27.1 0 1.3-.1 2.5-.2 3.7-.7 12.3-10.9 22.2-23.4 22.2s-22.7-9.8-23.4-22.2c-.1-1.2-.2-2.4-.2-3.7 0-12.3-3-27.1-33-27.1H66.8c-45.3 0-66.8-19.1-66.8-62V54.1C0 41.9 9.4 32 21.6 32s21.5 9.9 21.5 22.1v12.3C43.1 80.2 54.5 88 75.2 88h98.6c44.8 0 48.3 35.1 49.8 52.7h.9zM224 456c11.5 0 21.4-7 25.7-16.3 1.1-1.8 97.1-169.6 98.2-171.4 11.9-19.6-3.2-44.3-27.2-44.3-13.9 0-23.3 6.4-29.8 20.3L224 362l-66.9-117.7c-6.4-13.9-15.9-20.3-29.8-20.3-24 0-39.1 24.6-27.2 44.3 1.1 1.9 97.1 169.6 98.2 171.4 4.3 9.3 14.2 16.3 25.7 16.3z"],
- "viacoin": [384, 512, [], "f237", "M384 32h-64l-80.7 192h-94.5L64 32H0l48 112H0v48h68.5l13.8 32H0v48h102.8L192 480l89.2-208H384v-48h-82.3l13.8-32H384v-48h-48l48-112zM192 336l-27-64h54l-27 64z"],
- "viadeo": [448, 512, [], "f2a9", "M276.2 150.5v.7C258.3 98.6 233.6 47.8 205.4 0c43.3 29.2 67 100 70.8 150.5zm32.7 121.7c7.6 18.2 11 37.5 11 57 0 77.7-57.8 141-137.8 139.4l3.8-.3c74.2-46.7 109.3-118.6 109.3-205.1 0-38.1-6.5-75.9-18.9-112 1 11.7 1 23.7 1 35.4 0 91.8-18.1 241.6-116.6 280C95 455.2 49.4 398 49.4 329.2c0-75.6 57.4-142.3 135.4-142.3 16.8 0 33.7 3.1 49.1 9.6 1.7-15.1 6.5-29.9 13.4-43.3-19.9-7.2-41.2-10.7-62.5-10.7-161.5 0-238.7 195.9-129.9 313.7 67.9 74.6 192 73.9 259.8 0 56.6-61.3 60.9-142.4 36.4-201-12.7 8-27.1 13.9-42.2 17zM418.1 11.7c-31 66.5-81.3 47.2-115.8 80.1-12.4 12-20.6 34-20.6 50.5 0 14.1 4.5 27.1 12 38.8 47.4-11 98.3-46 118.2-90.7-.7 5.5-4.8 14.4-7.2 19.2-20.3 35.7-64.6 65.6-99.7 84.9 14.8 14.4 33.7 25.8 55 25.8 79 0 110.1-134.6 58.1-208.6z"],
- "viadeo-square": [448, 512, [], "f2aa", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM280.7 381.2c-42.4 46.2-120 46.6-162.4 0-68-73.6-19.8-196.1 81.2-196.1 13.3 0 26.6 2.1 39.1 6.7-4.3 8.4-7.3 17.6-8.4 27.1-9.7-4.1-20.2-6-30.7-6-48.8 0-84.6 41.7-84.6 88.9 0 43 28.5 78.7 69.5 85.9 61.5-24 72.9-117.6 72.9-175 0-7.3 0-14.8-.6-22.1-11.2-32.9-26.6-64.6-44.2-94.5 27.1 18.3 41.9 62.5 44.2 94.1v.4c7.7 22.5 11.8 46.2 11.8 70 0 54.1-21.9 99-68.3 128.2l-2.4.2c50 1 86.2-38.6 86.2-87.2 0-12.2-2.1-24.3-6.9-35.7 9.5-1.9 18.5-5.6 26.4-10.5 15.3 36.6 12.6 87.3-22.8 125.6zM309 233.7c-13.3 0-25.1-7.1-34.4-16.1 21.9-12 49.6-30.7 62.3-53 1.5-3 4.1-8.6 4.5-12-12.5 27.9-44.2 49.8-73.9 56.7-4.7-7.3-7.5-15.5-7.5-24.3 0-10.3 5.2-24.1 12.9-31.6 21.6-20.5 53-8.5 72.4-50 32.5 46.2 13.1 130.3-36.3 130.3z"],
- "viber": [512, 512, [], "f409", "M430.7 49.9C418 38.2 366.6.9 252.1.4c0 0-135.1-8.1-200.9 52.3C14.6 89.3 1.7 142.9.3 209.4c-1.4 66.5-3.1 191.1 117 224.9h.1l-.1 51.6s-.8 20.9 13 25.1c16.6 5.2 26.4-10.7 42.3-27.8 8.7-9.4 20.7-23.2 29.8-33.7 82.2 6.9 145.3-8.9 152.5-11.2 16.6-5.4 110.5-17.4 125.7-142 15.8-128.5-7.6-209.7-49.9-246.4zM444.6 287c-12.9 104-89 110.6-103 115.1-6 1.9-61.5 15.7-131.2 11.2 0 0-52 62.7-68.2 79-5.3 5.3-11.1 4.8-11-5.7 0-6.9.4-85.7.4-85.7-.1 0-.1 0 0 0C29.9 372.7 35.8 266.6 37 211.1c1.1-55.5 11.6-101 42.6-131.6C135.3 29 250 36.5 250 36.5c96.9.4 143.3 29.6 154.1 39.4 35.7 30.6 53.9 103.8 40.5 211.1zm-138.9-80.8c.4 8.6-12.5 9.2-12.9.6-1.1-22-11.4-32.7-32.6-33.9-8.6-.5-7.8-13.4.7-12.9 27.9 1.5 43.4 17.5 44.8 46.2zm20.3 11.3c1-42.4-25.5-75.6-75.8-79.3-8.5-.6-7.6-13.5.9-12.9 58 4.2 88.9 44.1 87.8 92.5-.2 8.6-13.1 8.2-12.9-.3zm46.9 13.4c.1 8.6-12.9 8.7-12.9.1-.6-81.5-54.9-125.9-120.8-126.4-8.5-.1-8.5-12.9 0-12.9 73.8.5 133.1 51.4 133.7 139.2zM361.7 329v.2c-10.8 19-31 40-51.8 33.3l-.2-.3c-21.1-5.9-70.8-31.5-102.2-56.5-16.2-12.8-31-27.9-42.4-42.4-10.3-12.9-20.7-28.2-30.8-46.6-21.3-38.5-26-55.7-26-55.7-6.7-20.8 14.2-41 33.3-51.8h.2c9.2-4.8 18-3.2 23.9 3.9 0 0 12.4 14.8 17.7 22.1 5 6.8 11.7 17.7 15.2 23.8 6.1 10.9 2.3 22-3.7 26.6l-12 9.6c-6.1 4.9-5.3 14-5.3 14s17.8 67.3 84.3 84.3c0 0 9.1.8 14-5.3l9.6-12c4.6-6 15.7-9.8 26.6-3.7 14.7 8.3 33.4 21.2 45.8 32.9 7 5.7 8.6 14.4 3.8 23.6z"],
- "vimeo": [448, 512, [], "f40a", "M403.2 32H44.8C20.1 32 0 52.1 0 76.8v358.4C0 459.9 20.1 480 44.8 480h358.4c24.7 0 44.8-20.1 44.8-44.8V76.8c0-24.7-20.1-44.8-44.8-44.8zM377 180.8c-1.4 31.5-23.4 74.7-66 129.4-44 57.2-81.3 85.8-111.7 85.8-18.9 0-34.8-17.4-47.9-52.3-25.5-93.3-36.4-148-57.4-148-2.4 0-10.9 5.1-25.4 15.2l-15.2-19.6c37.3-32.8 72.9-69.2 95.2-71.2 25.2-2.4 40.7 14.8 46.5 51.7 20.7 131.2 29.9 151 67.6 91.6 13.5-21.4 20.8-37.7 21.8-48.9 3.5-33.2-25.9-30.9-45.8-22.4 15.9-52.1 46.3-77.4 91.2-76 33.3.9 49 22.5 47.1 64.7z"],
- "vimeo-square": [448, 512, [], "f194", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-16.2 149.6c-1.4 31.1-23.2 73.8-65.3 127.9-43.5 56.5-80.3 84.8-110.4 84.8-18.7 0-34.4-17.2-47.3-51.6-25.2-92.3-35.9-146.4-56.7-146.4-2.4 0-10.8 5-25.1 15.1L64 192c36.9-32.4 72.1-68.4 94.1-70.4 24.9-2.4 40.2 14.6 46 51.1 20.5 129.6 29.6 149.2 66.8 90.5 13.4-21.2 20.6-37.2 21.5-48.3 3.4-32.8-25.6-30.6-45.2-22.2 15.7-51.5 45.8-76.5 90.1-75.1 32.9 1 48.4 22.4 46.5 64z"],
- "vimeo-v": [448, 512, [], "f27d", "M447.8 153.6c-2 43.6-32.4 103.3-91.4 179.1-60.9 79.2-112.4 118.8-154.6 118.8-26.1 0-48.2-24.1-66.3-72.3C100.3 250 85.3 174.3 56.2 174.3c-3.4 0-15.1 7.1-35.2 21.1L0 168.2c51.6-45.3 100.9-95.7 131.8-98.5 34.9-3.4 56.3 20.5 64.4 71.5 28.7 181.5 41.4 208.9 93.6 126.7 18.7-29.6 28.8-52.1 30.2-67.6 4.8-45.9-35.8-42.8-63.3-31 22-72.1 64.1-107.1 126.2-105.1 45.8 1.2 67.5 31.1 64.9 89.4z"],
- "vine": [384, 512, [], "f1ca", "M384 254.7v52.1c-18.4 4.2-36.9 6.1-52.1 6.1-36.9 77.4-103 143.8-125.1 156.2-14 7.9-27.1 8.4-42.7-.8C137 452 34.2 367.7 0 102.7h74.5C93.2 261.8 139 343.4 189.3 404.5c27.9-27.9 54.8-65.1 75.6-106.9-49.8-25.3-80.1-80.9-80.1-145.6 0-65.6 37.7-115.1 102.2-115.1 114.9 0 106.2 127.9 81.6 181.5 0 0-46.4 9.2-63.5-20.5 3.4-11.3 8.2-30.8 8.2-48.5 0-31.3-11.3-46.6-28.4-46.6-18.2 0-30.8 17.1-30.8 50 .1 79.2 59.4 118.7 129.9 101.9z"],
- "vk": [576, 512, [], "f189", "M545 117.7c3.7-12.5 0-21.7-17.8-21.7h-58.9c-15 0-21.9 7.9-25.6 16.7 0 0-30 73.1-72.4 120.5-13.7 13.7-20 18.1-27.5 18.1-3.7 0-9.4-4.4-9.4-16.9V117.7c0-15-4.2-21.7-16.6-21.7h-92.6c-9.4 0-15 7-15 13.5 0 14.2 21.2 17.5 23.4 57.5v86.8c0 19-3.4 22.5-10.9 22.5-20 0-68.6-73.4-97.4-157.4-5.8-16.3-11.5-22.9-26.6-22.9H38.8c-16.8 0-20.2 7.9-20.2 16.7 0 15.6 20 93.1 93.1 195.5C160.4 378.1 229 416 291.4 416c37.5 0 42.1-8.4 42.1-22.9 0-66.8-3.4-73.1 15.4-73.1 8.7 0 23.7 4.4 58.7 38.1 40 40 46.6 57.9 69 57.9h58.9c16.8 0 25.3-8.4 20.4-25-11.2-34.9-86.9-106.7-90.3-111.5-8.7-11.2-6.2-16.2 0-26.2.1-.1 72-101.3 79.4-135.6z"],
- "vnv": [640, 512, [], "f40b", "M104.9 352c-34.1 0-46.4-30.4-46.4-30.4L2.6 210.1S-7.8 192 13 192h32.8c10.4 0 13.2 8.7 18.8 18.1l36.7 74.5s5.2 13.1 21.1 13.1 21.1-13.1 21.1-13.1l36.7-74.5c5.6-9.5 8.4-18.1 18.8-18.1h32.8c20.8 0 10.4 18.1 10.4 18.1l-55.8 111.5S174.2 352 140 352h-35.1zm395 0c-34.1 0-46.4-30.4-46.4-30.4l-55.9-111.5S387.2 192 408 192h32.8c10.4 0 13.2 8.7 18.8 18.1l36.7 74.5s5.2 13.1 21.1 13.1 21.1-13.1 21.1-13.1l36.8-74.5c5.6-9.5 8.4-18.1 18.8-18.1H627c20.8 0 10.4 18.1 10.4 18.1l-55.9 111.5S569.3 352 535.1 352h-35.2zM337.6 192c34.1 0 46.4 30.4 46.4 30.4l55.9 111.5s10.4 18.1-10.4 18.1h-32.8c-10.4 0-13.2-8.7-18.8-18.1l-36.7-74.5s-5.2-13.1-21.1-13.1c-15.9 0-21.1 13.1-21.1 13.1l-36.7 74.5c-5.6 9.4-8.4 18.1-18.8 18.1h-32.9c-20.8 0-10.4-18.1-10.4-18.1l55.9-111.5s12.2-30.4 46.4-30.4h35.1z"],
- "vuejs": [448, 512, [], "f41f", "M356.9 64.3H280l-56 88.6-48-88.6H0L224 448 448 64.3h-91.1zm-301.2 32h53.8L224 294.5 338.4 96.3h53.8L224 384.5 55.7 96.3z"],
- "weibo": [512, 512, [], "f18a", "M407 177.6c7.6-24-13.4-46.8-37.4-41.7-22 4.8-28.8-28.1-7.1-32.8 50.1-10.9 92.3 37.1 76.5 84.8-6.8 21.2-38.8 10.8-32-10.3zM214.8 446.7C108.5 446.7 0 395.3 0 310.4c0-44.3 28-95.4 76.3-143.7C176 67 279.5 65.8 249.9 161c-4 13.1 12.3 5.7 12.3 6 79.5-33.6 140.5-16.8 114 51.4-3.7 9.4 1.1 10.9 8.3 13.1 135.7 42.3 34.8 215.2-169.7 215.2zm143.7-146.3c-5.4-55.7-78.5-94-163.4-85.7-84.8 8.6-148.8 60.3-143.4 116s78.5 94 163.4 85.7c84.8-8.6 148.8-60.3 143.4-116zM347.9 35.1c-25.9 5.6-16.8 43.7 8.3 38.3 72.3-15.2 134.8 52.8 111.7 124-7.4 24.2 29.1 37 37.4 12 31.9-99.8-55.1-195.9-157.4-174.3zm-78.5 311c-17.1 38.8-66.8 60-109.1 46.3-40.8-13.1-58-53.4-40.3-89.7 17.7-35.4 63.1-55.4 103.4-45.1 42 10.8 63.1 50.2 46 88.5zm-86.3-30c-12.9-5.4-30 .3-38 12.9-8.3 12.9-4.3 28 8.6 34 13.1 6 30.8.3 39.1-12.9 8-13.1 3.7-28.3-9.7-34zm32.6-13.4c-5.1-1.7-11.4.6-14.3 5.4-2.9 5.1-1.4 10.6 3.7 12.9 5.1 2 11.7-.3 14.6-5.4 2.8-5.2 1.1-10.9-4-12.9z"],
- "weixin": [576, 512, [], "f1d7", "M372.3 167.6c6.4 0 12.6.3 18.8 1.1C374.4 90.3 290.3 32 194.7 32 87.6 32 0 104.8 0 197.4c0 53.4 29.3 97.5 77.9 131.6l-19.3 58.6 68-34.1c24.4 4.8 43.8 9.7 68.2 9.7 6.2 0 12.1-.3 18.3-.8-4-12.9-6.2-26.6-6.2-40.8-.1-84.9 73-154 165.4-154zm-104.5-52.9c14.5 0 24.2 9.7 24.2 24.4 0 14.5-9.7 24.2-24.2 24.2-14.8 0-29.3-9.7-29.3-24.2 0-14.7 14.5-24.4 29.3-24.4zm-136.5 48.6c-14.5 0-29.3-9.7-29.3-24.2 0-14.8 14.8-24.4 29.3-24.4 14.8 0 24.4 9.7 24.4 24.4.1 14.6-9.6 24.2-24.4 24.2zm418.8 156.1c0-77.9-77.9-141.3-165.4-141.3-92.7 0-165.4 63.4-165.4 141.3S292 460.7 384.6 460.7c19.3 0 38.9-5.1 58.6-9.9l53.4 29.3-14.8-48.6c39.3-29.4 68.3-68.3 68.3-112.1zm-219.2-24.5c-9.7 0-19.3-9.7-19.3-19.6 0-9.7 9.7-19.3 19.3-19.3 14.8 0 24.4 9.7 24.4 19.3 0 10-9.6 19.6-24.4 19.6zm107.2 0c-9.7 0-19.3-9.7-19.3-19.6 0-9.7 9.7-19.3 19.3-19.3 14.5 0 24.4 9.7 24.4 19.3 0 10-9.9 19.6-24.4 19.6z"],
- "whatsapp": [448, 512, [], "f232", "M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"],
- "whatsapp-square": [448, 512, [], "f40c", "M224 122.8c-72.7 0-131.8 59.1-131.9 131.8 0 24.9 7 49.2 20.2 70.1l3.1 5-13.3 48.6 49.9-13.1 4.8 2.9c20.2 12 43.4 18.4 67.1 18.4h.1c72.6 0 133.3-59.1 133.3-131.8 0-35.2-15.2-68.3-40.1-93.2-25-25-58-38.7-93.2-38.7zm77.5 188.4c-3.3 9.3-19.1 17.7-26.7 18.8-12.6 1.9-22.4.9-47.5-9.9-39.7-17.2-65.7-57.2-67.7-59.8-2-2.6-16.2-21.5-16.2-41s10.2-29.1 13.9-33.1c3.6-4 7.9-5 10.6-5 2.6 0 5.3 0 7.6.1 2.4.1 5.7-.9 8.9 6.8 3.3 7.9 11.2 27.4 12.2 29.4s1.7 4.3.3 6.9c-7.6 15.2-15.7 14.6-11.6 21.6 15.3 26.3 30.6 35.4 53.9 47.1 4 2 6.3 1.7 8.6-1 2.3-2.6 9.9-11.6 12.5-15.5 2.6-4 5.3-3.3 8.9-2 3.6 1.3 23.1 10.9 27.1 12.9s6.6 3 7.6 4.6c.9 1.9.9 9.9-2.4 19.1zM400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM223.9 413.2c-26.6 0-52.7-6.7-75.8-19.3L64 416l22.5-82.2c-13.9-24-21.2-51.3-21.2-79.3C65.4 167.1 136.5 96 223.9 96c42.4 0 82.2 16.5 112.2 46.5 29.9 30 47.9 69.8 47.9 112.2 0 87.4-72.7 158.5-160.1 158.5z"],
- "whmcs": [448, 512, [], "f40d", "M448 161v-21.3l-28.5-8.8-2.2-10.4 20.1-20.7L427 80.4l-29 7.5-7.2-7.5 7.5-28.2-19.1-11.6-21.3 21-10.7-3.2-7-26.4h-22.6l-6.2 26.4-12.1 3.2-19.7-21-19.4 11 8.1 27.7-8.1 8.4-28.5-7.5-11 19.1 20.7 21-2.9 10.4-28.5 7.8-.3 21.7 28.8 7.5 2.4 12.1-20.1 19.9 10.4 18.5 29.6-7.5 7.2 8.6-8.1 26.9 19.9 11.6 19.4-20.4 11.6 2.9 6.7 28.5 22.6.3 6.7-28.8 11.6-3.5 20.7 21.6 20.4-12.1-8.8-28 7.8-8.1 28.8 8.8 10.3-20.1-20.9-18.8 2.2-12.1 29.1-7zm-119.2 45.2c-31.3 0-56.8-25.4-56.8-56.8s25.4-56.8 56.8-56.8 56.8 25.4 56.8 56.8c0 31.5-25.4 56.8-56.8 56.8zm72.3 16.4l46.9 14.5V277l-55.1 13.4-4.1 22.7 38.9 35.3-19.2 37.9-54-16.7-14.6 15.2 16.7 52.5-38.3 22.7-38.9-40.5-21.7 6.6-12.6 54-42.4-.5-12.6-53.6-21.7-5.6-36.4 38.4-37.4-21.7 15.2-50.5-13.7-16.1-55.5 14.1-19.7-34.8 37.9-37.4-4.8-22.8-54-14.1.5-40.9L54 219.9l5.7-19.7-38.9-39.4L41.5 125l53.6 14.1 15.2-15.7-15.2-52 36.4-20.7 36.8 39.4L191 84l11.6-52H245l11.6 45.9L234 72l-6.3-1.7-3.3 5.7-11 19.1-3.3 5.6 4.6 4.6 17.2 17.4-.3 1-23.8 6.5-6.2 1.7-.1 6.4-.2 12.9C153.8 161.6 118 204 118 254.7c0 58.3 47.3 105.7 105.7 105.7 50.5 0 92.7-35.4 103.2-82.8l13.2.2 6.9.1 1.6-6.7 5.6-24 1.9-.6 17.1 17.8 4.7 4.9 5.8-3.4 20.4-12.1 5.8-3.5-2-6.5-6.8-21.2z"],
- "wikipedia-w": [640, 512, [], "f266", "M640 51.2l-.3 12.2c-28.1.8-45 15.8-55.8 40.3-25 57.8-103.3 240-155.3 358.6H415l-81.9-193.1c-32.5 63.6-68.3 130-99.2 193.1-.3.3-15 0-15-.3C172 352.3 122.8 243.4 75.8 133.4 64.4 106.7 26.4 63.4.2 63.7c0-3.1-.3-10-.3-14.2h161.9v13.9c-19.2 1.1-52.8 13.3-43.3 34.2 21.9 49.7 103.6 240.3 125.6 288.6 15-29.7 57.8-109.2 75.3-142.8-13.9-28.3-58.6-133.9-72.8-160-9.7-17.8-36.1-19.4-55.8-19.7V49.8l142.5.3v13.1c-19.4.6-38.1 7.8-29.4 26.1 18.9 40 30.6 68.1 48.1 104.7 5.6-10.8 34.7-69.4 48.1-100.8 8.9-20.6-3.9-28.6-38.6-29.4.3-3.6 0-10.3.3-13.6 44.4-.3 111.1-.3 123.1-.6v13.6c-22.5.8-45.8 12.8-58.1 31.7l-59.2 122.8c6.4 16.1 63.3 142.8 69.2 156.7L559.2 91.8c-8.6-23.1-36.4-28.1-47.2-28.3V49.6l127.8 1.1.2.5z"],
- "windows": [448, 512, [], "f17a", "M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"],
- "wordpress": [512, 512, [], "f19a", "M61.7 169.4l101.5 278C92.2 413 43.3 340.2 43.3 256c0-30.9 6.6-60.1 18.4-86.6zm337.9 75.9c0-26.3-9.4-44.5-17.5-58.7-10.8-17.5-20.9-32.4-20.9-49.9 0-19.6 14.8-37.8 35.7-37.8.9 0 1.8.1 2.8.2-37.9-34.7-88.3-55.9-143.7-55.9-74.3 0-139.7 38.1-177.8 95.9 5 .2 9.7.3 13.7.3 22.2 0 56.7-2.7 56.7-2.7 11.5-.7 12.8 16.2 1.4 17.5 0 0-11.5 1.3-24.3 2l77.5 230.4L249.8 247l-33.1-90.8c-11.5-.7-22.3-2-22.3-2-11.5-.7-10.1-18.2 1.3-17.5 0 0 35.1 2.7 56 2.7 22.2 0 56.7-2.7 56.7-2.7 11.5-.7 12.8 16.2 1.4 17.5 0 0-11.5 1.3-24.3 2l76.9 228.7 21.2-70.9c9-29.4 16-50.5 16-68.7zm-139.9 29.3l-63.8 185.5c19.1 5.6 39.2 8.7 60.1 8.7 24.8 0 48.5-4.3 70.6-12.1-.6-.9-1.1-1.9-1.5-2.9l-65.4-179.2zm183-120.7c.9 6.8 1.4 14 1.4 21.9 0 21.6-4 45.8-16.2 76.2l-65 187.9C426.2 403 468.7 334.5 468.7 256c0-37-9.4-71.8-26-102.1zM504 256c0 136.8-111.3 248-248 248C119.2 504 8 392.7 8 256 8 119.2 119.2 8 256 8c136.7 0 248 111.2 248 248zm-11.4 0c0-130.5-106.2-236.6-236.6-236.6C125.5 19.4 19.4 125.5 19.4 256S125.6 492.6 256 492.6c130.5 0 236.6-106.1 236.6-236.6z"],
- "wordpress-simple": [512, 512, [], "f411", "M256 8C119.3 8 8 119.2 8 256c0 136.7 111.3 248 248 248s248-111.3 248-248C504 119.2 392.7 8 256 8zM33 256c0-32.3 6.9-63 19.3-90.7l106.4 291.4C84.3 420.5 33 344.2 33 256zm223 223c-21.9 0-43-3.2-63-9.1l66.9-194.4 68.5 187.8c.5 1.1 1 2.1 1.6 3.1-23.1 8.1-48 12.6-74 12.6zm30.7-327.5c13.4-.7 25.5-2.1 25.5-2.1 12-1.4 10.6-19.1-1.4-18.4 0 0-36.1 2.8-59.4 2.8-21.9 0-58.7-2.8-58.7-2.8-12-.7-13.4 17.7-1.4 18.4 0 0 11.4 1.4 23.4 2.1l34.7 95.2L200.6 393l-81.2-241.5c13.4-.7 25.5-2.1 25.5-2.1 12-1.4 10.6-19.1-1.4-18.4 0 0-36.1 2.8-59.4 2.8-4.2 0-9.1-.1-14.4-.3C109.6 73 178.1 33 256 33c58 0 110.9 22.2 150.6 58.5-1-.1-1.9-.2-2.9-.2-21.9 0-37.4 19.1-37.4 39.6 0 18.4 10.6 33.9 21.9 52.3 8.5 14.8 18.4 33.9 18.4 61.5 0 19.1-7.3 41.2-17 72.1l-22.2 74.3-80.7-239.6zm81.4 297.2l68.1-196.9c12.7-31.8 17-57.2 17-79.9 0-8.2-.5-15.8-1.5-22.9 17.4 31.8 27.3 68.2 27.3 107 0 82.3-44.6 154.1-110.9 192.7z"],
- "wpbeginner": [512, 512, [], "f297", "M462.799 322.374C519.01 386.682 466.961 480 370.944 480c-39.602 0-78.824-17.687-100.142-50.04-6.887.356-22.702.356-29.59 0C219.848 462.381 180.588 480 141.069 480c-95.49 0-148.348-92.996-91.855-157.626C-29.925 190.523 80.479 32 256.006 32c175.632 0 285.87 158.626 206.793 290.374zm-339.647-82.972h41.529v-58.075h-41.529v58.075zm217.18 86.072v-23.839c-60.506 20.915-132.355 9.198-187.589-33.971l.246 24.897c51.101 46.367 131.746 57.875 187.343 32.913zm-150.753-86.072h166.058v-58.075H189.579v58.075z"],
- "wpexplorer": [512, 512, [], "f2de", "M512 256c0 141.2-114.7 256-256 256C114.8 512 0 397.3 0 256S114.7 0 256 0s256 114.7 256 256zm-32 0c0-123.2-100.3-224-224-224C132.5 32 32 132.5 32 256s100.5 224 224 224 224-100.5 224-224zM160.9 124.6l86.9 37.1-37.1 86.9-86.9-37.1 37.1-86.9zm110 169.1l46.6 94h-14.6l-50-100-48.9 100h-14l51.1-106.9-22.3-9.4 6-14 68.6 29.1-6 14.3-16.5-7.1zm-11.8-116.3l68.6 29.4-29.4 68.3L230 246l29.1-68.6zm80.3 42.9l54.6 23.1-23.4 54.3-54.3-23.1 23.1-54.3z"],
- "wpforms": [448, 512, [], "f298", "M448 75.2v361.7c0 24.3-19 43.2-43.2 43.2H43.2C19.3 480 0 461.4 0 436.8V75.2C0 51.1 18.8 32 43.2 32h361.7c24 0 43.1 18.8 43.1 43.2zm-37.3 361.6V75.2c0-3-2.6-5.8-5.8-5.8h-9.3L285.3 144 224 94.1 162.8 144 52.5 69.3h-9.3c-3.2 0-5.8 2.8-5.8 5.8v361.7c0 3 2.6 5.8 5.8 5.8h361.7c3.2.1 5.8-2.7 5.8-5.8zM150.2 186v37H76.7v-37h73.5zm0 74.4v37.3H76.7v-37.3h73.5zm11.1-147.3l54-43.7H96.8l64.5 43.7zm210 72.9v37h-196v-37h196zm0 74.4v37.3h-196v-37.3h196zm-84.6-147.3l64.5-43.7H232.8l53.9 43.7zM371.3 335v37.3h-99.4V335h99.4z"],
- "xbox": [512, 512, [], "f412", "M369.9 318.2c44.3 54.3 64.7 98.8 54.4 118.7-7.9 15.1-56.7 44.6-92.6 55.9-29.6 9.3-68.4 13.3-100.4 10.2-38.2-3.7-76.9-17.4-110.1-39C93.3 445.8 87 438.3 87 423.4c0-29.9 32.9-82.3 89.2-142.1 32-33.9 76.5-73.7 81.4-72.6 9.4 2.1 84.3 75.1 112.3 109.5zM188.6 143.8c-29.7-26.9-58.1-53.9-86.4-63.4-15.2-5.1-16.3-4.8-28.7 8.1-29.2 30.4-53.5 79.7-60.3 122.4-5.4 34.2-6.1 43.8-4.2 60.5 5.6 50.5 17.3 85.4 40.5 120.9 9.5 14.6 12.1 17.3 9.3 9.9-4.2-11-.3-37.5 9.5-64 14.3-39 53.9-112.9 120.3-194.4zm311.6 63.5C483.3 127.3 432.7 77 425.6 77c-7.3 0-24.2 6.5-36 13.9-23.3 14.5-41 31.4-64.3 52.8C367.7 197 427.5 283.1 448.2 346c6.8 20.7 9.7 41.1 7.4 52.3-1.7 8.5-1.7 8.5 1.4 4.6 6.1-7.7 19.9-31.3 25.4-43.5 7.4-16.2 15-40.2 18.6-58.7 4.3-22.5 3.9-70.8-.8-93.4zM141.3 43C189 40.5 251 77.5 255.6 78.4c.7.1 10.4-4.2 21.6-9.7 63.9-31.1 94-25.8 107.4-25.2-63.9-39.3-152.7-50-233.9-11.7-23.4 11.1-24 11.9-9.4 11.2z"],
- "xing": [384, 512, [], "f168", "M162.7 210c-1.8 3.3-25.2 44.4-70.1 123.5-4.9 8.3-10.8 12.5-17.7 12.5H9.8c-7.7 0-12.1-7.5-8.5-14.4l69-121.3c.2 0 .2-.1 0-.3l-43.9-75.6c-4.3-7.8.3-14.1 8.5-14.1H100c7.3 0 13.3 4.1 18 12.2l44.7 77.5zM382.6 46.1l-144 253v.3L330.2 466c3.9 7.1.2 14.1-8.5 14.1h-65.2c-7.6 0-13.6-4-18-12.2l-92.4-168.5c3.3-5.8 51.5-90.8 144.8-255.2 4.6-8.1 10.4-12.2 17.5-12.2h65.7c8 0 12.3 6.7 8.5 14.1z"],
- "xing-square": [448, 512, [], "f169", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM140.4 320.2H93.8c-5.5 0-8.7-5.3-6-10.3l49.3-86.7c.1 0 .1-.1 0-.2l-31.4-54c-3-5.6.2-10.1 6-10.1h46.6c5.2 0 9.5 2.9 12.9 8.7l31.9 55.3c-1.3 2.3-18 31.7-50.1 88.2-3.5 6.2-7.7 9.1-12.6 9.1zm219.7-214.1L257.3 286.8v.2l65.5 119c2.8 5.1.1 10.1-6 10.1h-46.6c-5.5 0-9.7-2.9-12.9-8.7l-66-120.3c2.3-4.1 36.8-64.9 103.4-182.3 3.3-5.8 7.4-8.7 12.5-8.7h46.9c5.7-.1 8.8 4.7 6 10z"],
- "y-combinator": [448, 512, [], "f23b", "M448 32v448H0V32h448zM236 287.5L313.5 142h-32.7L235 233c-4.7 9.3-9 18.3-12.8 26.8L210 233l-45.2-91h-35l76.7 143.8v94.5H236v-92.8z"],
- "yahoo": [360, 512, [], "f19e", "M204.9 288l3.5 195.5c-11.3-2-20.9-3.5-28.7-3.5-7.5 0-17 1.5-28.7 3.5l3.5-195.5C105.7 203.7 56.5 113.1 0 28.5 10.6 31.3 20.4 32 29.5 32c8 0 18.1-.7 30.3-3.5 36.4 64.2 72.9 123.2 119.9 200.4 33.2-54.7 80.9-128.1 119.9-200.4 9.8 2.6 19.6 3.5 29.2 3.5 10.2 0 20.6-.9 31.1-3.5C329.4 71.1 243 221.3 204.9 288z"],
- "yandex": [256, 512, [], "f413", "M153.1 315.8L65.7 512H2l96-209.8c-45.1-22.9-75.2-64.4-75.2-141.1C22.7 53.7 90.8 0 171.7 0H254v512h-55.1V315.8h-45.8zm45.8-269.3h-29.4c-44.4 0-87.4 29.4-87.4 114.6 0 82.3 39.4 108.8 87.4 108.8h29.4V46.5z"],
- "yandex-international": [320, 512, [], "f414", "M129.5 512V345.9L18.5 48h55.8l81.8 229.7L250.2 0h51.3L180.8 347.8V512h-51.3z"],
- "yelp": [384, 512, [], "f1e9", "M136.9 328c-1 .3-109.2 35.7-115.8 35.7-15.2-.9-18.5-16.2-19.9-31.2-1.5-14.2-1.4-29.8.3-46.8 1.9-18.8 5.5-45.1 24.2-44 4.8 0 67.1 25.9 112.7 44.4 17.1 6.8 18.6 35.8-1.5 41.9zm57.9-113.9c1.8 38.2-25.5 48.5-47.2 14.3L41.3 60.4c-1.5-6.6.3-12.4 5.3-17.4C62.2 26.5 146 3.2 168.1 8.9c7.5 1.9 12.1 6.1 13.8 12.6 1.3 8.3 11.5 167.4 12.9 192.6zm-1.4 164.8c0 4.6.2 116.4-1.7 121.5-2.3 6-7 9.7-14.3 11.2-10.1 1.7-27.1-1.9-51-10.7-22-8.1-56.7-21.5-49.3-42.5 2.8-6.9 51.4-62.8 77.3-93.6 12-15.2 39.8-5.5 39 14.1zm180.2-117.8c-5.6 3.7-110.8 28.2-118.1 30.6l.3-.6c-18.1 4.7-35.4-18.5-23.3-34.6 3.7-3.7 65.9-92.4 72.8-97 5.2-3.6 11.3-3.8 18.3-.6 18.4 8.8 55.1 63.1 57.4 84.6-.1 2.9 1.2 11.7-7.4 17.6zm10.1 130.7c-2.7 20.6-44.5 73.4-63.8 81-6.9 2.6-12.9 2-17.7-2-5-3.5-61.8-97.1-64.9-102.3-10.9-16.2 6.8-39.8 25.6-33.2 0 0 110.5 35.7 114.7 39.4 5.2 4.1 7.2 9.8 6.1 17.1z"],
- "yoast": [448, 512, [], "f2b1", "M91.265 96h186.043l-7.008 18.878H91.265c-39.658 0-71.889 31.556-71.889 70.292v205.373c0 35.401 24.882 70.311 84.001 70.311V480H91.265C41.165 480 0 439.83 0 390.544V185.17C0 135.937 40.709 96 91.265 96zm229.114-56h66.49C243.146 418.092 241.192 438.918 202.18 479.331c-20.779 21.646-49.294 31.719-78.328 32.669v-51.146c49.234-7.662 64.606-49.855 64.606-75.284 0-20.078.577-12.645-82.117-223.219h61.386l50.354 156.58L320.379 40zM448 181.465V480H233.963c6.635-9.621 10.679-16.277 12.112-19.413h182.529V181.465c0-32.543-17.097-51.945-48.194-62.914l6.733-17.578C428.763 114.636 448 144.059 448 181.465z"],
- "youtube": [576, 512, [], "f167", "M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"]
-};
-
-bunker(function () {
- define('fab', icons);
-});
-
-}());
-(function () {
-'use strict';
-
-var _WINDOW = {};
-try {
- if (typeof window !== 'undefined') _WINDOW = window;
-
-} catch (e) {}
-
-var _ref = _WINDOW.navigator || {};
-var _ref$userAgent = _ref.userAgent;
-var userAgent = _ref$userAgent === undefined ? '' : _ref$userAgent;
-
-var WINDOW = _WINDOW;
-
-
-
-
-var IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');
-
-var NAMESPACE_IDENTIFIER = '___FONT_AWESOME___';
-
-
-
-
-
-
-
-var PRODUCTION = function () {
- try {
- return "production" === 'production';
- } catch (e) {
- return false;
- }
-}();
-
-var oneToTen = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
-var oneToTwenty = oneToTen.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);
-
-
-
-var RESERVED_CLASSES = ['xs', 'sm', 'lg', 'fw', 'ul', 'li', 'border', 'pull-left', 'pull-right', 'spin', 'pulse', 'rotate-90', 'rotate-180', 'rotate-270', 'flip-horizontal', 'flip-vertical', 'stack', 'stack-1x', 'stack-2x', 'inverse', 'layers', 'layers-text', 'layers-counter'].concat(oneToTen.map(function (n) {
- return n + 'x';
-})).concat(oneToTwenty.map(function (n) {
- return 'w-' + n;
-}));
-
-function bunker(fn) {
- try {
- fn();
- } catch (e) {
- if (!PRODUCTION) {
- throw e;
- }
- }
-}
-
-var w = WINDOW || {};
-
-if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};
-if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};
-if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};
-if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];
-
-var namespace = w[NAMESPACE_IDENTIFIER];
-
-var _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
-
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
-
- return target;
-};
-
-function define(prefix, icons) {
- var normalized = Object.keys(icons).reduce(function (acc, iconName) {
- var icon = icons[iconName];
- var expanded = !!icon.icon;
-
- if (expanded) {
- acc[icon.iconName] = icon.icon;
- } else {
- acc[iconName] = icon;
- }
- return acc;
- }, {});
-
- if (typeof namespace.hooks.addPack === 'function') {
- namespace.hooks.addPack(prefix, normalized);
- } else {
- namespace.styles[prefix] = _extends({}, namespace.styles[prefix] || {}, normalized);
- }
-
- /**
- * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
- * of new styles we needed to differentiate between them. Prefix `fa` is now an alias
- * for `fas` so we'll easy the upgrade process for our users by automatically defining
- * this as well.
- */
- if (prefix === 'fas') {
- define('fa', icons);
- }
-}
-
-var icons = {
- "address-book": [448, 512, [], "f2b9", "M320 320v72c0 13.255-10.745 24-24 24H152c-13.255 0-24-10.745-24-24v-72c0-21.431 14.207-40.266 34.813-46.153l18.064-5.161C193.629 275.884 208.342 280 224 280s30.371-4.116 43.122-11.314l18.064 5.161C305.793 279.734 320 298.569 320 320zm-96-64c35.346 0 64-28.654 64-64s-28.654-64-64-64-64 28.654-64 64 28.654 64 64 64zm192-96v64h20c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-20v64h20c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-20v48c0 26.51-21.49 48-48 48H80c-26.51 0-48-21.49-48-48V48C32 21.49 53.49 0 80 0h288c26.51 0 48 21.49 48 48v48h20c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-20zm-48 298V54a6 6 0 0 0-6-6H86a6 6 0 0 0-6 6v404a6 6 0 0 0 6 6h276a6 6 0 0 0 6-6z"],
- "address-card": [512, 512, [], "f2bb", "M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 336H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v276a6 6 0 0 1-6 6zm-54-176H300c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12zm0 80H300c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12zm-284-96c0-30.928 25.072-56 56-56s56 25.072 56 56-25.072 56-56 56-56-25.072-56-56zm136 89.857V340c0 6.627-5.373 12-12 12H108c-6.627 0-12-5.373-12-12v-42.143a24 24 0 0 1 17.104-22.988l13.464-4.039C140.186 281.568 157.351 288 176 288s35.814-6.432 49.433-17.17l13.464 4.039A24 24 0 0 1 256 297.857z"],
- "arrow-alt-circle-down": [512, 512, [], "f358", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm-32-316v116h-67c-10.7 0-16 12.9-8.5 20.5l99 99c4.7 4.7 12.3 4.7 17 0l99-99c7.6-7.6 2.2-20.5-8.5-20.5h-67V140c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12z"],
- "arrow-alt-circle-left": [512, 512, [], "f359", "M8 256c0 137 111 248 248 248s248-111 248-248S393 8 256 8 8 119 8 256zm448 0c0 110.5-89.5 200-200 200S56 366.5 56 256 145.5 56 256 56s200 89.5 200 200zm-72-20v40c0 6.6-5.4 12-12 12H256v67c0 10.7-12.9 16-20.5 8.5l-99-99c-4.7-4.7-4.7-12.3 0-17l99-99c7.6-7.6 20.5-2.2 20.5 8.5v67h116c6.6 0 12 5.4 12 12z"],
- "arrow-alt-circle-right": [512, 512, [], "f35a", "M504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256zm72 20v-40c0-6.6 5.4-12 12-12h116v-67c0-10.7 12.9-16 20.5-8.5l99 99c4.7 4.7 4.7 12.3 0 17l-99 99c-7.6 7.6-20.5 2.2-20.5-8.5v-67H140c-6.6 0-12-5.4-12-12z"],
- "arrow-alt-circle-up": [512, 512, [], "f35b", "M256 504c137 0 248-111 248-248S393 8 256 8 8 119 8 256s111 248 248 248zm0-448c110.5 0 200 89.5 200 200s-89.5 200-200 200S56 366.5 56 256 145.5 56 256 56zm20 328h-40c-6.6 0-12-5.4-12-12V256h-67c-10.7 0-16-12.9-8.5-20.5l99-99c4.7-4.7 12.3-4.7 17 0l99 99c7.6 7.6 2.2 20.5-8.5 20.5h-67v116c0 6.6-5.4 12-12 12z"],
- "bell": [448, 512, [], "f0f3", "M425.403 330.939c-16.989-16.785-34.546-34.143-34.546-116.083 0-83.026-60.958-152.074-140.467-164.762A31.843 31.843 0 0 0 256 32c0-17.673-14.327-32-32-32s-32 14.327-32 32a31.848 31.848 0 0 0 5.609 18.095C118.101 62.783 57.143 131.831 57.143 214.857c0 81.933-17.551 99.292-34.543 116.078C-25.496 378.441 9.726 448 66.919 448H160c0 35.346 28.654 64 64 64 35.346 0 64-28.654 64-64h93.08c57.19 0 92.415-69.583 44.323-117.061zM224 472c-13.234 0-24-10.766-24-24h48c0 13.234-10.766 24-24 24zm157.092-72H66.9c-16.762 0-25.135-20.39-13.334-32.191 28.585-28.585 51.577-55.724 51.577-152.952C105.143 149.319 158.462 96 224 96s118.857 53.319 118.857 118.857c0 97.65 23.221 124.574 51.568 152.952C406.278 379.661 397.783 400 381.092 400z"],
- "bell-slash": [576, 512, [], "f1f6", "M130.9 400c-16.762 0-25.135-20.39-13.334-32.191 25.226-25.226 46.094-49.338 50.649-121.48l-46.777-41.274a168.48 168.48 0 0 0-.296 9.802c0 81.933-17.551 99.292-34.543 116.078C38.504 378.441 73.726 448 130.919 448H224c0 35.346 28.654 64 64 64s64-28.654 64-64h44.777l-54.4-48H130.9zM288 472c-13.234 0-24-10.766-24-24h48c0 13.234-10.766 24-24 24zm283.867.553l-67.931-59.571c13.104-24.118 11.524-56.318-14.532-82.042-16.989-16.785-34.546-34.143-34.546-116.083 0-83.026-60.958-152.074-140.467-164.762A31.848 31.848 0 0 0 320 32c0-17.673-14.327-32-32-32s-32 14.327-32 32a31.848 31.848 0 0 0 5.609 18.095c-41.471 6.618-77.891 28.571-103.249 59.841L36.459 3.037c-5.058-4.436-12.777-3.956-17.24 1.071L3.056 22.313C-1.407 27.34-.925 35.012 4.134 39.447l535.408 469.516c5.058 4.436 12.777 3.956 17.24-1.071l16.163-18.205c4.462-5.027 3.98-12.699-1.078-17.134zM288 96c65.538 0 118.857 53.319 118.857 118.857 0 97.65 23.221 124.574 51.568 152.952 2.908 2.908 4.573 6.328 5.209 9.832L194.482 141.612C216.258 113.867 250.075 96 288 96z"],
- "bookmark": [384, 512, [], "f02e", "M336 0H48C21.49 0 0 21.49 0 48v464l192-112 192 112V48c0-26.51-21.49-48-48-48zm0 428.43l-144-84-144 84V54a6 6 0 0 1 6-6h276c3.314 0 6 2.683 6 5.996V428.43z"],
- "building": [448, 512, [], "f1ad", "M128 148v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12zm140 12h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm-128 96h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm128 0h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm-76 84v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm76 12h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm180 124v36H0v-36c0-6.6 5.4-12 12-12h19.5V24c0-13.3 10.7-24 24-24h337c13.3 0 24 10.7 24 24v440H436c6.6 0 12 5.4 12 12zM79.5 463H192v-67c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v67h112.5V49L80 48l-.5 415z"],
- "calendar": [448, 512, [], "f133", "M400 64h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V160h352v298c0 3.3-2.7 6-6 6z"],
- "calendar-alt": [448, 512, [], "f073", "M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"],
- "calendar-check": [448, 512, [], "f274", "M400 64h-48V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v52H160V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v52H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 400H54a6 6 0 0 1-6-6V160h352v298a6 6 0 0 1-6 6zm-52.849-200.65L198.842 404.519c-4.705 4.667-12.303 4.637-16.971-.068l-75.091-75.699c-4.667-4.705-4.637-12.303.068-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l44.104 44.461 111.072-110.181c4.705-4.667 12.303-4.637 16.971.068l22.536 22.718c4.667 4.705 4.636 12.303-.069 16.97z"],
- "calendar-minus": [448, 512, [], "f272", "M124 328c-6.6 0-12-5.4-12-12v-24c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v24c0 6.6-5.4 12-12 12H124zm324-216v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"],
- "calendar-plus": [448, 512, [], "f271", "M336 292v24c0 6.6-5.4 12-12 12h-76v76c0 6.6-5.4 12-12 12h-24c-6.6 0-12-5.4-12-12v-76h-76c-6.6 0-12-5.4-12-12v-24c0-6.6 5.4-12 12-12h76v-76c0-6.6 5.4-12 12-12h24c6.6 0 12 5.4 12 12v76h76c6.6 0 12 5.4 12 12zm112-180v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"],
- "calendar-times": [448, 512, [], "f273", "M311.7 374.7l-17 17c-4.7 4.7-12.3 4.7-17 0L224 337.9l-53.7 53.7c-4.7 4.7-12.3 4.7-17 0l-17-17c-4.7-4.7-4.7-12.3 0-17l53.7-53.7-53.7-53.7c-4.7-4.7-4.7-12.3 0-17l17-17c4.7-4.7 12.3-4.7 17 0l53.7 53.7 53.7-53.7c4.7-4.7 12.3-4.7 17 0l17 17c4.7 4.7 4.7 12.3 0 17L257.9 304l53.7 53.7c4.8 4.7 4.8 12.3.1 17zM448 112v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"],
- "caret-square-down": [448, 512, [], "f150", "M125.1 208h197.8c10.7 0 16.1 13 8.5 20.5l-98.9 98.3c-4.7 4.7-12.2 4.7-16.9 0l-98.9-98.3c-7.7-7.5-2.3-20.5 8.4-20.5zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"],
- "caret-square-left": [448, 512, [], "f191", "M272 157.1v197.8c0 10.7-13 16.1-20.5 8.5l-98.3-98.9c-4.7-4.7-4.7-12.2 0-16.9l98.3-98.9c7.5-7.7 20.5-2.3 20.5 8.4zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"],
- "caret-square-right": [448, 512, [], "f152", "M176 354.9V157.1c0-10.7 13-16.1 20.5-8.5l98.3 98.9c4.7 4.7 4.7 12.2 0 16.9l-98.3 98.9c-7.5 7.7-20.5 2.3-20.5-8.4zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"],
- "caret-square-up": [448, 512, [], "f151", "M322.9 304H125.1c-10.7 0-16.1-13-8.5-20.5l98.9-98.3c4.7-4.7 12.2-4.7 16.9 0l98.9 98.3c7.7 7.5 2.3 20.5-8.4 20.5zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"],
- "chart-bar": [512, 512, [], "f080", "M500 400c6.6 0 12 5.4 12 12v24c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h24c6.6 0 12 5.4 12 12v324h452zm-356-60v-72c0-6.6-5.4-12-12-12h-24c-6.6 0-12 5.4-12 12v72c0 6.6 5.4 12 12 12h24c6.6 0 12-5.4 12-12zm96 0V140c0-6.6-5.4-12-12-12h-24c-6.6 0-12 5.4-12 12v200c0 6.6 5.4 12 12 12h24c6.6 0 12-5.4 12-12zm96 0V204c0-6.6-5.4-12-12-12h-24c-6.6 0-12 5.4-12 12v136c0 6.6 5.4 12 12 12h24c6.6 0 12-5.4 12-12zm96 0V108c0-6.6-5.4-12-12-12h-24c-6.6 0-12 5.4-12 12v232c0 6.6 5.4 12 12 12h24c6.6 0 12-5.4 12-12z"],
- "check-circle": [512, 512, [], "f058", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z"],
- "check-square": [448, 512, [], "f14a", "M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm0 400H48V80h352v352zm-35.864-241.724L191.547 361.48c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z"],
- "circle": [512, 512, [], "f111", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"],
- "clipboard": [384, 512, [], "f328", "M336 64h-80c0-35.29-28.71-64-64-64s-64 28.71-64 64H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 400H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h42v36c0 6.627 5.373 12 12 12h168c6.627 0 12-5.373 12-12v-36h42a6 6 0 0 1 6 6v340a6 6 0 0 1-6 6zM192 40c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24"],
- "clock": [512, 512, [], "f017", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"],
- "clone": [512, 512, [], "f24d", "M464 0H144c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h320c26.51 0 48-21.49 48-48v-48h48c26.51 0 48-21.49 48-48V48c0-26.51-21.49-48-48-48zM362 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h42v224c0 26.51 21.49 48 48 48h224v42a6 6 0 0 1-6 6zm96-96H150a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h308a6 6 0 0 1 6 6v308a6 6 0 0 1-6 6z"],
- "closed-captioning": [512, 512, [], "f20a", "M464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zm-6 336H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h404c3.3 0 6 2.7 6 6v276c0 3.3-2.7 6-6 6zm-211.1-85.7c1.7 2.4 1.5 5.6-.5 7.7-53.6 56.8-172.8 32.1-172.8-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7l-17.5 30.5c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2 0 48 51 70.5 92.2 32.6 2.8-2.5 7.1-2.1 9.2.9l19.6 27.7zm190.4 0c1.7 2.4 1.5 5.6-.5 7.7-53.6 56.9-172.8 32.1-172.8-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7L420 220.2c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2 0 48 51 70.5 92.2 32.6 2.8-2.5 7.1-2.1 9.2.9l19.6 27.7z"],
- "comment": [576, 512, [], "f075", "M288 32C129 32 0 125.1 0 240c0 49.3 23.7 94.5 63.3 130.2-8.7 23.3-22.1 32.7-37.1 43.1C15.1 421-6 433 1.6 456.5c5.1 15.4 20.9 24.7 38.1 23.3 57.7-4.6 111.2-19.2 157-42.5 28.7 6.9 59.4 10.7 91.2 10.7 159.1 0 288-93 288-208C576 125.1 447.1 32 288 32zm0 368c-32.5 0-65.4-4.4-97.3-14-32.3 19-78.7 46-134.7 54 32-24 56.8-61.6 61.2-88.4C79.1 325.6 48 286.7 48 240c0-70.9 86.3-160 240-160s240 89.1 240 160c0 71-86.3 160-240 160z"],
- "comment-alt": [576, 512, [], "f27a", "M288 32C129 32 0 125.1 0 240c0 49.3 23.7 94.5 63.3 130.2-8.7 23.3-22.1 32.7-37.1 43.1C15.1 421-6 433 1.6 456.5c5.1 15.4 20.9 24.7 38.1 23.3 57.7-4.6 111.2-19.2 157-42.5 28.7 6.9 59.4 10.7 91.2 10.7 159.1 0 288-93 288-208C576 125.1 447.1 32 288 32zm0 368c-32.5 0-65.4-4.4-97.3-14-32.3 19-78.7 46-134.7 54 32-24 56.8-61.6 61.2-88.4C79.1 325.6 48 286.7 48 240c0-70.9 86.3-160 240-160s240 89.1 240 160c0 71-86.3 160-240 160zm-64-160c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48zm112 0c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48zm112 0c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48z"],
- "comments": [576, 512, [], "f086", "M574.507 443.86c-5.421 21.261-24.57 36.14-46.511 36.14-32.246 0-66.511-9.99-102.1-29.734-50.64 11.626-109.151 7.877-157.96-13.437 41.144-2.919 80.361-12.339 116.331-28.705 16.322-1.22 32.674-4.32 48.631-9.593C454.404 412.365 490.663 432 527.996 432c-32-17.455-43.219-38.958-46.159-58.502 25.443-18.848 46.159-47.183 46.159-81.135 0-10.495-2.383-21.536-7.041-32.467 7.405-25.93 8.656-50.194 5.185-73.938 32.164 30.461 49.856 69.128 49.856 106.405 0 33.893-12.913 65.047-34.976 91.119 2.653 2.038 5.924 4.176 9.962 6.378 19.261 10.508 28.947 32.739 23.525 54zM240.002 80C117.068 80 48.004 152.877 48.004 210.909c0 38.196 24.859 70.072 55.391 91.276-3.527 21.988-16.991 46.179-55.391 65.815 44.8 0 88.31-22.089 114.119-37.653 25.52 7.906 51.883 11.471 77.879 11.471C362.998 341.818 432 268.976 432 210.909 432 152.882 362.943 80 240.002 80m0-48C390.193 32 480 126.026 480 210.909c0 22.745-6.506 46.394-18.816 68.391-11.878 21.226-28.539 40.294-49.523 56.674-21.593 16.857-46.798 30.045-74.913 39.197-29.855 9.719-62.405 14.646-96.746 14.646-24.449 0-48.34-2.687-71.292-8.004C126.311 404.512 85.785 416 48.004 416c-22.18 0-41.472-15.197-46.665-36.761-5.194-21.563 5.064-43.878 24.811-53.976 7.663-3.918 13.324-7.737 17.519-11.294-7.393-7.829-13.952-16.124-19.634-24.844C8.09 264.655.005 238.339.005 210.909.005 126.259 89.508 32 240.002 32z"],
- "compass": [512, 512, [], "f14e", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 448c-110.532 0-200-89.451-200-200 0-110.531 89.451-200 200-200 110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200zm91.326-312.131l-33.359 137.779a24.005 24.005 0 0 1-6.772 11.729l-102.64 97.779c-17.104 16.293-45.56.434-39.88-23.024l33.359-137.779a23.997 23.997 0 0 1 6.772-11.729l102.642-97.779c17.285-16.47 45.494-.175 39.878 23.024zM256 224c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32z"],
- "copy": [448, 512, [], "f0c5", "M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"],
- "copyright": [512, 512, [], "f1f9", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 448c-110.532 0-200-89.451-200-200 0-110.531 89.451-200 200-200 110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200zm107.351-101.064c-9.614 9.712-45.53 41.396-104.065 41.396-82.43 0-140.484-61.425-140.484-141.567 0-79.152 60.275-139.401 139.762-139.401 55.531 0 88.738 26.62 97.593 34.779a11.965 11.965 0 0 1 1.936 15.322l-18.155 28.113c-3.841 5.95-11.966 7.282-17.499 2.921-8.595-6.776-31.814-22.538-61.708-22.538-48.303 0-77.916 35.33-77.916 80.082 0 41.589 26.888 83.692 78.277 83.692 32.657 0 56.843-19.039 65.726-27.225 5.27-4.857 13.596-4.039 17.82 1.738l19.865 27.17a11.947 11.947 0 0 1-1.152 15.518z"],
- "credit-card": [576, 512, [], "f09d", "M527.9 32H48.1C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48.1 48h479.8c26.6 0 48.1-21.5 48.1-48V80c0-26.5-21.5-48-48.1-48zM54.1 80h467.8c3.3 0 6 2.7 6 6v42H48.1V86c0-3.3 2.7-6 6-6zm467.8 352H54.1c-3.3 0-6-2.7-6-6V256h479.8v170c0 3.3-2.7 6-6 6zM192 332v40c0 6.6-5.4 12-12 12h-72c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h72c6.6 0 12 5.4 12 12zm192 0v40c0 6.6-5.4 12-12 12H236c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h136c6.6 0 12 5.4 12 12z"],
- "dot-circle": [512, 512, [], "f192", "M256 56c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m0-48C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 168c-44.183 0-80 35.817-80 80s35.817 80 80 80 80-35.817 80-80-35.817-80-80-80z"],
- "edit": [576, 512, [], "f044", "M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"],
- "envelope": [512, 512, [], "f0e0", "M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z"],
- "envelope-open": [512, 512, [], "f2b6", "M494.586 164.516c-4.697-3.883-111.723-89.95-135.251-108.657C337.231 38.191 299.437 0 256 0c-43.205 0-80.636 37.717-103.335 55.859-24.463 19.45-131.07 105.195-135.15 108.549A48.004 48.004 0 0 0 0 201.485V464c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V201.509a48 48 0 0 0-17.414-36.993zM464 458a6 6 0 0 1-6 6H54a6 6 0 0 1-6-6V204.347c0-1.813.816-3.526 2.226-4.665 15.87-12.814 108.793-87.554 132.364-106.293C200.755 78.88 232.398 48 256 48c23.693 0 55.857 31.369 73.41 45.389 23.573 18.741 116.503 93.493 132.366 106.316a5.99 5.99 0 0 1 2.224 4.663V458zm-31.991-187.704c4.249 5.159 3.465 12.795-1.745 16.981-28.975 23.283-59.274 47.597-70.929 56.863C336.636 362.283 299.205 400 256 400c-43.452 0-81.287-38.237-103.335-55.86-11.279-8.967-41.744-33.413-70.927-56.865-5.21-4.187-5.993-11.822-1.745-16.981l15.258-18.528c4.178-5.073 11.657-5.843 16.779-1.726 28.618 23.001 58.566 47.035 70.56 56.571C200.143 320.631 232.307 352 256 352c23.602 0 55.246-30.88 73.41-45.389 11.994-9.535 41.944-33.57 70.563-56.568 5.122-4.116 12.601-3.346 16.778 1.727l15.258 18.526z"],
- "eye-slash": [576, 512, [], "f070", "M272.702 359.139c-80.483-9.011-136.212-86.886-116.93-167.042l116.93 167.042zM288 392c-102.556 0-192.092-54.701-240-136 21.755-36.917 52.1-68.342 88.344-91.658l-27.541-39.343C67.001 152.234 31.921 188.741 6.646 231.631a47.999 47.999 0 0 0 0 48.739C63.004 376.006 168.14 440 288 440a332.89 332.89 0 0 0 39.648-2.367l-32.021-45.744A284.16 284.16 0 0 1 288 392zm281.354-111.631c-33.232 56.394-83.421 101.742-143.554 129.492l48.116 68.74c3.801 5.429 2.48 12.912-2.949 16.712L450.23 509.83c-5.429 3.801-12.912 2.48-16.712-2.949L102.084 33.399c-3.801-5.429-2.48-12.912 2.949-16.712L125.77 2.17c5.429-3.801 12.912-2.48 16.712 2.949l55.526 79.325C226.612 76.343 256.808 72 288 72c119.86 0 224.996 63.994 281.354 159.631a48.002 48.002 0 0 1 0 48.738zM528 256c-44.157-74.933-123.677-127.27-216.162-135.007C302.042 131.078 296 144.83 296 160c0 30.928 25.072 56 56 56s56-25.072 56-56l-.001-.042c30.632 57.277 16.739 130.26-36.928 171.719l26.695 38.135C452.626 346.551 498.308 306.386 528 256z"],
- "file": [384, 512, [], "f15b", "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"],
- "file-alt": [384, 512, [], "f15c", "M288 248v28c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-28c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm-12 72H108c-6.6 0-12 5.4-12 12v28c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-28c0-6.6-5.4-12-12-12zm108-188.1V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V48C0 21.5 21.5 0 48 0h204.1C264.8 0 277 5.1 286 14.1L369.9 98c9 8.9 14.1 21.2 14.1 33.9zm-128-80V128h76.1L256 51.9zM336 464V176H232c-13.3 0-24-10.7-24-24V48H48v416h288z"],
- "file-archive": [384, 512, [], "f1c6", "M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM256 51.882L332.118 128H256V51.882zM336 464H48V48h79.714v16h32V48H208v104c0 13.255 10.745 24 24 24h104v288zM192.27 96h-32V64h32v32zm-32 0v32h-32V96h32zm0 64v32h-32v-32h32zm32 0h-32v-32h32v32zm1.909 105.678A12 12 0 0 0 182.406 256H160.27v-32h-32v32l-19.69 97.106C101.989 385.611 126.834 416 160 416c33.052 0 57.871-30.192 51.476-62.62l-17.297-87.702zM160.27 390.073c-17.918 0-32.444-12.105-32.444-27.036 0-14.932 14.525-27.036 32.444-27.036s32.444 12.105 32.444 27.036c0 14.931-14.526 27.036-32.444 27.036zm32-166.073h-32v-32h32v32z"],
- "file-audio": [384, 512, [], "f1c7", "M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM332.118 128H256V51.882L332.118 128zM48 464V48h160v104c0 13.255 10.745 24 24 24h104v288H48zm144-76.024c0 10.691-12.926 16.045-20.485 8.485L136 360.486h-28c-6.627 0-12-5.373-12-12v-56c0-6.627 5.373-12 12-12h28l35.515-36.947c7.56-7.56 20.485-2.206 20.485 8.485v135.952zm41.201-47.13c9.051-9.297 9.06-24.133.001-33.439-22.149-22.752 12.235-56.246 34.395-33.481 27.198 27.94 27.212 72.444.001 100.401-21.793 22.386-56.947-10.315-34.397-33.481z"],
- "file-code": [384, 512, [], "f1c9", "M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM332.118 128H256V51.882L332.118 128zM48 464V48h160v104c0 13.255 10.745 24 24 24h104v288H48zm101.677-115.115L116.854 320l32.822-28.885a8.793 8.793 0 0 0 .605-12.624l-17.403-18.564c-3.384-3.613-8.964-3.662-12.438-.401L62.78 313.58c-3.703 3.474-3.704 9.367.001 12.84l57.659 54.055a8.738 8.738 0 0 0 6.012 2.381 8.746 8.746 0 0 0 6.427-2.782l17.403-18.563a8.795 8.795 0 0 0-.605-12.626zm84.284-127.85l-24.401-7.084a8.796 8.796 0 0 0-10.905 5.998L144.04 408.061c-1.353 4.66 1.338 9.552 5.998 10.905l24.403 7.084c4.68 1.355 9.557-1.354 10.905-5.998l54.612-188.112c1.354-4.66-1.337-9.552-5.997-10.905zm87.258 92.545l-57.658-54.055c-3.526-3.307-9.099-3.165-12.439.401l-17.403 18.563a8.795 8.795 0 0 0 .605 12.625L267.146 320l-32.822 28.885a8.793 8.793 0 0 0-.605 12.624l17.403 18.564a8.797 8.797 0 0 0 12.439.401h-.001l57.66-54.055c3.703-3.473 3.703-9.366-.001-12.839z"],
- "file-excel": [384, 512, [], "f1c3", "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm212-240h-28.8c-4.4 0-8.4 2.4-10.5 6.3-18 33.1-22.2 42.4-28.6 57.7-13.9-29.1-6.9-17.3-28.6-57.7-2.1-3.9-6.2-6.3-10.6-6.3H124c-9.3 0-15 10-10.4 18l46.3 78-46.3 78c-4.7 8 1.1 18 10.4 18h28.9c4.4 0 8.4-2.4 10.5-6.3 21.7-40 23-45 28.6-57.7 14.9 30.2 5.9 15.9 28.6 57.7 2.1 3.9 6.2 6.3 10.6 6.3H260c9.3 0 15-10 10.4-18L224 320c.7-1.1 30.3-50.5 46.3-78 4.7-8-1.1-18-10.3-18z"],
- "file-image": [384, 512, [], "f1c5", "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z"],
- "file-pdf": [384, 512, [], "f1c1", "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z"],
- "file-powerpoint": [384, 512, [], "f1c4", "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm72-60V236c0-6.6 5.4-12 12-12h69.2c36.7 0 62.8 27 62.8 66.3 0 74.3-68.7 66.5-95.5 66.5V404c0 6.6-5.4 12-12 12H132c-6.6 0-12-5.4-12-12zm48.5-87.4h23c7.9 0 13.9-2.4 18.1-7.2 8.5-9.8 8.4-28.5.1-37.8-4.1-4.6-9.9-7-17.4-7h-23.9v52z"],
- "file-video": [384, 512, [], "f1c8", "M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM332.118 128H256V51.882L332.118 128zM48 464V48h160v104c0 13.255 10.745 24 24 24h104v288H48zm228.687-211.303L224 305.374V268c0-11.046-8.954-20-20-20H100c-11.046 0-20 8.954-20 20v104c0 11.046 8.954 20 20 20h104c11.046 0 20-8.954 20-20v-37.374l52.687 52.674C286.704 397.318 304 390.28 304 375.986V264.011c0-14.311-17.309-21.319-27.313-11.314z"],
- "file-word": [384, 512, [], "f1c2", "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm220.1-208c-5.7 0-10.6 4-11.7 9.5-20.6 97.7-20.4 95.4-21 103.5-.2-1.2-.4-2.6-.7-4.3-.8-5.1.3.2-23.6-99.5-1.3-5.4-6.1-9.2-11.7-9.2h-13.3c-5.5 0-10.3 3.8-11.7 9.1-24.4 99-24 96.2-24.8 103.7-.1-1.1-.2-2.5-.5-4.2-.7-5.2-14.1-73.3-19.1-99-1.1-5.6-6-9.7-11.8-9.7h-16.8c-7.8 0-13.5 7.3-11.7 14.8 8 32.6 26.7 109.5 33.2 136 1.3 5.4 6.1 9.1 11.7 9.1h25.2c5.5 0 10.3-3.7 11.6-9.1l17.9-71.4c1.5-6.2 2.5-12 3-17.3l2.9 17.3c.1.4 12.6 50.5 17.9 71.4 1.3 5.3 6.1 9.1 11.6 9.1h24.7c5.5 0 10.3-3.7 11.6-9.1 20.8-81.9 30.2-119 34.5-136 1.9-7.6-3.8-14.9-11.6-14.9h-15.8z"],
- "flag": [512, 512, [], "f024", "M336.174 80c-49.132 0-93.305-32-161.913-32-31.301 0-58.303 6.482-80.721 15.168a48.04 48.04 0 0 0 2.142-20.727C93.067 19.575 74.167 1.594 51.201.104 23.242-1.71 0 20.431 0 48c0 17.764 9.657 33.262 24 41.562V496c0 8.837 7.163 16 16 16h16c8.837 0 16-7.163 16-16v-83.443C109.869 395.28 143.259 384 199.826 384c49.132 0 93.305 32 161.913 32 58.479 0 101.972-22.617 128.548-39.981C503.846 367.161 512 352.051 512 335.855V95.937c0-34.459-35.264-57.768-66.904-44.117C409.193 67.309 371.641 80 336.174 80zM464 336c-21.783 15.412-60.824 32-102.261 32-59.945 0-102.002-32-161.913-32-43.361 0-96.379 9.403-127.826 24V128c21.784-15.412 60.824-32 102.261-32 59.945 0 102.002 32 161.913 32 43.271 0 96.32-17.366 127.826-32v240z"],
- "folder": [512, 512, [], "f07b", "M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm-6 272H54c-3.314 0-6-2.678-6-5.992V117.992A5.993 5.993 0 0 1 54 112h134.118l64 64H458a6 6 0 0 1 6 6v212a6 6 0 0 1-6 6z"],
- "folder-open": [576, 512, [], "f07c", "M527.943 224H480v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h400a48.001 48.001 0 0 0 40.704-22.56l79.942-128c19.948-31.917-3.038-73.44-40.703-73.44zM54 112h134.118l64 64H426a6 6 0 0 1 6 6v42H152a48 48 0 0 0-41.098 23.202L48 351.449V117.993A5.993 5.993 0 0 1 54 112zm394 288H72l77.234-128H528l-80 128z"],
- "frown": [512, 512, [], "f119", "M256 56c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m0-48C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm64 136c-9.535 0-18.512 2.386-26.37 6.589h.017c12.735 0 23.059 10.324 23.059 23.059 0 12.735-10.324 23.059-23.059 23.059s-23.059-10.324-23.059-23.059v-.017C266.386 181.488 264 190.465 264 200c0 30.928 25.072 56 56 56s56-25.072 56-56-25.072-56-56-56zm-128 0c-9.535 0-18.512 2.386-26.37 6.589h.017c12.735 0 23.059 10.324 23.059 23.059 0 12.735-10.324 23.059-23.059 23.059-12.735 0-23.059-10.324-23.059-23.059v-.017C138.386 181.488 136 190.465 136 200c0 30.928 25.072 56 56 56s56-25.072 56-56-25.072-56-56-56zm171.547 201.782c-56.595-76.964-158.383-77.065-215.057-.001-18.82 25.593 19.858 54.018 38.67 28.438 37.511-51.01 100.365-50.796 137.717-.001 18.509 25.172 57.821-2.395 38.67-28.436z"],
- "futbol": [512, 512, [], "f1e3", "M207.898 325.571l-29.894-91.312L256 177.732l77.996 56.527-29.622 91.312h-96.476zM504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-455.998-.19L48 256c0 44.7 14.015 87.242 39.95 122.626l7.982-35.118 88.595 10.871 37.775 80.985-30.978 18.427c41.832 13.631 87.598 13.606 129.354 0L289.7 435.364l37.775-80.985 88.594-10.871 7.982 35.118C449.985 343.242 464 300.7 464 256l-.002-.19-27.003 23.561-65.223-60.875 17.122-87.779 35.538 3.183c-25.216-34.63-61.309-62.053-104.577-75.951l14.143 33.091L256 134.25l-77.996-43.21 14.144-33.091C148.868 71.851 112.782 99.277 87.57 133.9l35.81-3.183 16.849 87.779-65.223 60.875-27.004-23.561z"],
- "gem": [576, 512, [], "f3a5", "M464 0H112c-4 0-7.8 2-10 5.4L2 152.6c-2.9 4.4-2.6 10.2.7 14.2l276 340.8c4.8 5.9 13.8 5.9 18.6 0l276-340.8c3.3-4.1 3.6-9.8.7-14.2L474.1 5.4C471.8 2 468.1 0 464 0zm-19.3 48l63.3 96h-68.4l-51.7-96h56.8zm-202.1 0h90.7l51.7 96H191l51.6-96zm-111.3 0h56.8l-51.7 96H68l63.3-96zm-43 144h51.4L208 352 88.3 192zm102.9 0h193.6L288 435.3 191.2 192zM368 352l68.2-160h51.4L368 352z"],
- "hand-lizard": [576, 512, [], "f258", "M556.686 290.542L410.328 64.829C397.001 44.272 374.417 32 349.917 32H56C25.121 32 0 57.122 0 88v8c0 44.112 35.888 80 80 80h196.042l-18.333 48H144c-48.523 0-88 39.477-88 88 0 30.879 25.121 56 56 56h131.552c2.987 0 5.914.549 8.697 1.631L352 408.418V480h224V355.829c0-23.225-6.679-45.801-19.314-65.287zM528 432H400v-23.582c0-19.948-12.014-37.508-30.604-44.736l-99.751-38.788A71.733 71.733 0 0 0 243.552 320H112c-4.411 0-8-3.589-8-8 0-22.056 17.944-40 40-40h113.709c19.767 0 37.786-12.407 44.84-30.873l24.552-64.281c8.996-23.553-8.428-48.846-33.63-48.846H80c-17.645 0-32-14.355-32-32v-8c0-4.411 3.589-8 8-8h293.917c8.166 0 15.693 4.09 20.137 10.942l146.358 225.715A71.84 71.84 0 0 1 528 355.829V432z"],
- "hand-paper": [448, 512, [], "f256", "M372.57 112.641v-10.825c0-43.612-40.52-76.691-83.039-65.546-25.629-49.5-94.09-47.45-117.982.747C130.269 26.456 89.144 57.945 89.144 102v126.13c-19.953-7.427-43.308-5.068-62.083 8.871-29.355 21.796-35.794 63.333-14.55 93.153L132.48 498.569a32 32 0 0 0 26.062 13.432h222.897c14.904 0 27.835-10.289 31.182-24.813l30.184-130.958A203.637 203.637 0 0 0 448 310.564V179c0-40.62-35.523-71.992-75.43-66.359zm27.427 197.922c0 11.731-1.334 23.469-3.965 34.886L368.707 464h-201.92L51.591 302.303c-14.439-20.27 15.023-42.776 29.394-22.605l27.128 38.079c8.995 12.626 29.031 6.287 29.031-9.283V102c0-25.645 36.571-24.81 36.571.691V256c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16V67c0-25.663 36.571-24.81 36.571.691V256c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16V101.125c0-25.672 36.57-24.81 36.57.691V256c0 8.837 7.163 16 16 16h6.857c8.837 0 16-7.163 16-16v-76.309c0-26.242 36.57-25.64 36.57-.691v131.563z"],
- "hand-peace": [448, 512, [], "f25b", "M362.146 191.976c-13.71-21.649-38.761-34.016-65.006-30.341V74c0-40.804-32.811-74-73.141-74-40.33 0-73.14 33.196-73.14 74L160 168l-18.679-78.85C126.578 50.843 83.85 32.11 46.209 47.208 8.735 62.238-9.571 104.963 5.008 142.85l55.757 144.927c-30.557 24.956-43.994 57.809-24.733 92.218l54.853 97.999C102.625 498.97 124.73 512 148.575 512h205.702c30.744 0 57.558-21.44 64.555-51.797l27.427-118.999a67.801 67.801 0 0 0 1.729-15.203L448 256c0-44.956-43.263-77.343-85.854-64.024zM399.987 326c0 1.488-.169 2.977-.502 4.423l-27.427 119.001c-1.978 8.582-9.29 14.576-17.782 14.576H148.575c-6.486 0-12.542-3.621-15.805-9.449l-54.854-98c-4.557-8.141-2.619-18.668 4.508-24.488l26.647-21.764a16 16 0 0 0 4.812-18.139l-64.09-166.549C37.226 92.956 84.37 74.837 96.51 106.389l59.784 155.357A16 16 0 0 0 171.227 272h11.632c8.837 0 16-7.163 16-16V74c0-34.375 50.281-34.43 50.281 0v182c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16v-28c0-25.122 36.567-25.159 36.567 0v28c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16 0-25.12 36.567-25.16 36.567 0v70z"],
- "hand-point-down": [448, 512, [], "f0a7", "M188.8 512c45.616 0 83.2-37.765 83.2-83.2v-35.647a93.148 93.148 0 0 0 22.064-7.929c22.006 2.507 44.978-3.503 62.791-15.985C409.342 368.1 448 331.841 448 269.299V248c0-60.063-40-98.512-40-127.2v-2.679c4.952-5.747 8-13.536 8-22.12V32c0-17.673-12.894-32-28.8-32H156.8C140.894 0 128 14.327 128 32v64c0 8.584 3.048 16.373 8 22.12v2.679c0 6.964-6.193 14.862-23.668 30.183l-.148.129-.146.131c-9.937 8.856-20.841 18.116-33.253 25.851C48.537 195.798 0 207.486 0 252.8c0 56.928 35.286 92 83.2 92 8.026 0 15.489-.814 22.4-2.176V428.8c0 45.099 38.101 83.2 83.2 83.2zm0-48c-18.7 0-35.2-16.775-35.2-35.2V270.4c-17.325 0-35.2 26.4-70.4 26.4-26.4 0-35.2-20.625-35.2-44 0-8.794 32.712-20.445 56.1-34.926 14.575-9.074 27.225-19.524 39.875-30.799 18.374-16.109 36.633-33.836 39.596-59.075h176.752C364.087 170.79 400 202.509 400 248v21.299c0 40.524-22.197 57.124-61.325 50.601-8.001 14.612-33.979 24.151-53.625 12.925-18.225 19.365-46.381 17.787-61.05 4.95V428.8c0 18.975-16.225 35.2-35.2 35.2zM328 64c0-13.255 10.745-24 24-24s24 10.745 24 24-10.745 24-24 24-24-10.745-24-24z"],
- "hand-point-left": [512, 512, [], "f0a5", "M0 220.8C0 266.416 37.765 304 83.2 304h35.647a93.148 93.148 0 0 0 7.929 22.064c-2.507 22.006 3.503 44.978 15.985 62.791C143.9 441.342 180.159 480 242.701 480H264c60.063 0 98.512-40 127.2-40h2.679c5.747 4.952 13.536 8 22.12 8h64c17.673 0 32-12.894 32-28.8V188.8c0-15.906-14.327-28.8-32-28.8h-64c-8.584 0-16.373 3.048-22.12 8H391.2c-6.964 0-14.862-6.193-30.183-23.668l-.129-.148-.131-.146c-8.856-9.937-18.116-20.841-25.851-33.253C316.202 80.537 304.514 32 259.2 32c-56.928 0-92 35.286-92 83.2 0 8.026.814 15.489 2.176 22.4H83.2C38.101 137.6 0 175.701 0 220.8zm48 0c0-18.7 16.775-35.2 35.2-35.2h158.4c0-17.325-26.4-35.2-26.4-70.4 0-26.4 20.625-35.2 44-35.2 8.794 0 20.445 32.712 34.926 56.1 9.074 14.575 19.524 27.225 30.799 39.875 16.109 18.374 33.836 36.633 59.075 39.596v176.752C341.21 396.087 309.491 432 264 432h-21.299c-40.524 0-57.124-22.197-50.601-61.325-14.612-8.001-24.151-33.979-12.925-53.625-19.365-18.225-17.787-46.381-4.95-61.05H83.2C64.225 256 48 239.775 48 220.8zM448 360c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24z"],
- "hand-point-right": [512, 512, [], "f0a4", "M428.8 137.6h-86.177a115.52 115.52 0 0 0 2.176-22.4c0-47.914-35.072-83.2-92-83.2-45.314 0-57.002 48.537-75.707 78.784-7.735 12.413-16.994 23.317-25.851 33.253l-.131.146-.129.148C135.662 161.807 127.764 168 120.8 168h-2.679c-5.747-4.952-13.536-8-22.12-8H32c-17.673 0-32 12.894-32 28.8v230.4C0 435.106 14.327 448 32 448h64c8.584 0 16.373-3.048 22.12-8h2.679c28.688 0 67.137 40 127.2 40h21.299c62.542 0 98.8-38.658 99.94-91.145 12.482-17.813 18.491-40.785 15.985-62.791A93.148 93.148 0 0 0 393.152 304H428.8c45.435 0 83.2-37.584 83.2-83.2 0-45.099-38.101-83.2-83.2-83.2zm0 118.4h-91.026c12.837 14.669 14.415 42.825-4.95 61.05 11.227 19.646 1.687 45.624-12.925 53.625 6.524 39.128-10.076 61.325-50.6 61.325H248c-45.491 0-77.21-35.913-120-39.676V215.571c25.239-2.964 42.966-21.222 59.075-39.596 11.275-12.65 21.725-25.3 30.799-39.875C232.355 112.712 244.006 80 252.8 80c23.375 0 44 8.8 44 35.2 0 35.2-26.4 53.075-26.4 70.4h158.4c18.425 0 35.2 16.5 35.2 35.2 0 18.975-16.225 35.2-35.2 35.2zM88 384c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z"],
- "hand-point-up": [448, 512, [], "f0a6", "M105.6 83.2v86.177a115.52 115.52 0 0 0-22.4-2.176c-47.914 0-83.2 35.072-83.2 92 0 45.314 48.537 57.002 78.784 75.707 12.413 7.735 23.317 16.994 33.253 25.851l.146.131.148.129C129.807 376.338 136 384.236 136 391.2v2.679c-4.952 5.747-8 13.536-8 22.12v64c0 17.673 12.894 32 28.8 32h230.4c15.906 0 28.8-14.327 28.8-32v-64c0-8.584-3.048-16.373-8-22.12V391.2c0-28.688 40-67.137 40-127.2v-21.299c0-62.542-38.658-98.8-91.145-99.94-17.813-12.482-40.785-18.491-62.791-15.985A93.148 93.148 0 0 0 272 118.847V83.2C272 37.765 234.416 0 188.8 0c-45.099 0-83.2 38.101-83.2 83.2zm118.4 0v91.026c14.669-12.837 42.825-14.415 61.05 4.95 19.646-11.227 45.624-1.687 53.625 12.925 39.128-6.524 61.325 10.076 61.325 50.6V264c0 45.491-35.913 77.21-39.676 120H183.571c-2.964-25.239-21.222-42.966-39.596-59.075-12.65-11.275-25.3-21.725-39.875-30.799C80.712 279.645 48 267.994 48 259.2c0-23.375 8.8-44 35.2-44 35.2 0 53.075 26.4 70.4 26.4V83.2c0-18.425 16.5-35.2 35.2-35.2 18.975 0 35.2 16.225 35.2 35.2zM352 424c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24z"],
- "hand-pointer": [448, 512, [], "f25a", "M358.182 179.361c-19.493-24.768-52.679-31.945-79.872-19.098-15.127-15.687-36.182-22.487-56.595-19.629V67c0-36.944-29.736-67-66.286-67S89.143 30.056 89.143 67v161.129c-19.909-7.41-43.272-5.094-62.083 8.872-29.355 21.795-35.793 63.333-14.55 93.152l109.699 154.001C134.632 501.59 154.741 512 176 512h178.286c30.802 0 57.574-21.5 64.557-51.797l27.429-118.999A67.873 67.873 0 0 0 448 326v-84c0-46.844-46.625-79.273-89.818-62.639zM80.985 279.697l27.126 38.079c8.995 12.626 29.031 6.287 29.031-9.283V67c0-25.12 36.571-25.16 36.571 0v175c0 8.836 7.163 16 16 16h6.857c8.837 0 16-7.164 16-16v-35c0-25.12 36.571-25.16 36.571 0v35c0 8.836 7.163 16 16 16H272c8.837 0 16-7.164 16-16v-21c0-25.12 36.571-25.16 36.571 0v21c0 8.836 7.163 16 16 16h6.857c8.837 0 16-7.164 16-16 0-25.121 36.571-25.16 36.571 0v84c0 1.488-.169 2.977-.502 4.423l-27.43 119.001c-1.978 8.582-9.29 14.576-17.782 14.576H176c-5.769 0-11.263-2.878-14.697-7.697l-109.712-154c-14.406-20.223 14.994-42.818 29.394-22.606zM176.143 400v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.733 0-14-7.163-14-16zm75.428 0v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.732 0-14-7.163-14-16zM327 400v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.732 0-14-7.163-14-16z"],
- "hand-rock": [512, 512, [], "f255", "M408.864 79.052c-22.401-33.898-66.108-42.273-98.813-23.588-29.474-31.469-79.145-31.093-108.334-.022-47.16-27.02-108.71 5.055-110.671 60.806C44.846 105.407 0 140.001 0 187.429v56.953c0 32.741 14.28 63.954 39.18 85.634l97.71 85.081c4.252 3.702 3.11 5.573 3.11 32.903 0 17.673 14.327 32 32 32h252c17.673 0 32-14.327 32-32 0-23.513-1.015-30.745 3.982-42.37l42.835-99.656c6.094-14.177 9.183-29.172 9.183-44.568V146.963c0-52.839-54.314-88.662-103.136-67.911zM464 261.406a64.505 64.505 0 0 1-5.282 25.613l-42.835 99.655c-5.23 12.171-7.883 25.04-7.883 38.25V432H188v-10.286c0-16.37-7.14-31.977-19.59-42.817l-97.71-85.08C56.274 281.255 48 263.236 48 244.381v-56.953c0-33.208 52-33.537 52 .677v41.228a16 16 0 0 0 5.493 12.067l7 6.095A16 16 0 0 0 139 235.429V118.857c0-33.097 52-33.725 52 .677v26.751c0 8.836 7.164 16 16 16h7c8.836 0 16-7.164 16-16v-41.143c0-33.134 52-33.675 52 .677v40.466c0 8.836 7.163 16 16 16h7c8.837 0 16-7.164 16-16v-27.429c0-33.03 52-33.78 52 .677v26.751c0 8.836 7.163 16 16 16h7c8.837 0 16-7.164 16-16 0-33.146 52-33.613 52 .677v114.445z"],
- "hand-scissors": [512, 512, [], "f257", "M256 480l70-.013c5.114 0 10.231-.583 15.203-1.729l118.999-27.427C490.56 443.835 512 417.02 512 386.277V180.575c0-23.845-13.03-45.951-34.005-57.69l-97.999-54.853c-34.409-19.261-67.263-5.824-92.218 24.733L142.85 37.008c-37.887-14.579-80.612 3.727-95.642 41.201-15.098 37.642 3.635 80.37 41.942 95.112L168 192l-94-9.141c-40.804 0-74 32.811-74 73.14 0 40.33 33.196 73.141 74 73.141h87.635c-3.675 26.245 8.692 51.297 30.341 65.006C178.657 436.737 211.044 480 256 480zm0-48.013c-25.16 0-25.12-36.567 0-36.567 8.837 0 16-7.163 16-16v-6.856c0-8.837-7.163-16-16-16h-28c-25.159 0-25.122-36.567 0-36.567h28c8.837 0 16-7.163 16-16v-6.856c0-8.837-7.163-16-16-16H74c-34.43 0-34.375-50.281 0-50.281h182c8.837 0 16-7.163 16-16v-11.632a16 16 0 0 0-10.254-14.933L106.389 128.51c-31.552-12.14-13.432-59.283 19.222-46.717l166.549 64.091a16.001 16.001 0 0 0 18.139-4.812l21.764-26.647c5.82-7.127 16.348-9.064 24.488-4.508l98 54.854c5.828 3.263 9.449 9.318 9.449 15.805v205.701c0 8.491-5.994 15.804-14.576 17.782l-119.001 27.427a19.743 19.743 0 0 1-4.423.502h-70z"],
- "hand-spock": [512, 512, [], "f259", "M21.096 381.79l129.092 121.513a32 32 0 0 0 21.932 8.698h237.6c14.17 0 26.653-9.319 30.68-22.904l31.815-107.313A115.955 115.955 0 0 0 477 348.811v-36.839c0-4.051.476-8.104 1.414-12.045l31.73-133.41c10.099-42.412-22.316-82.738-65.544-82.525-4.144-24.856-22.543-47.165-49.85-53.992-35.803-8.952-72.227 12.655-81.25 48.75L296.599 184 274.924 52.01c-8.286-36.07-44.303-58.572-80.304-50.296-29.616 6.804-50.138 32.389-51.882 61.295-42.637.831-73.455 40.563-64.071 81.844l31.04 136.508c-27.194-22.515-67.284-19.992-91.482 5.722-25.376 26.961-24.098 69.325 2.871 94.707zm32.068-61.811l.002-.001c7.219-7.672 19.241-7.98 26.856-.813l53.012 49.894C143.225 378.649 160 371.4 160 357.406v-69.479c0-1.193-.134-2.383-.397-3.546l-34.13-150.172c-5.596-24.617 31.502-32.86 37.054-8.421l30.399 133.757a16 16 0 0 0 15.603 12.454h8.604c10.276 0 17.894-9.567 15.594-19.583l-41.62-181.153c-5.623-24.469 31.39-33.076 37.035-8.508l45.22 196.828A16 16 0 0 0 288.956 272h13.217a16 16 0 0 0 15.522-12.119l42.372-169.49c6.104-24.422 42.962-15.159 36.865 9.217L358.805 252.12c-2.521 10.088 5.115 19.88 15.522 19.88h9.694a16 16 0 0 0 15.565-12.295L426.509 146.6c5.821-24.448 42.797-15.687 36.966 8.802L431.72 288.81a100.094 100.094 0 0 0-2.72 23.162v36.839c0 6.548-.943 13.051-2.805 19.328L397.775 464h-219.31L53.978 346.836c-7.629-7.18-7.994-19.229-.814-26.857z"],
- "handshake": [640, 512, [], "f2b5", "M616 96h-48c-7.107 0-13.49 3.091-17.884 8H526.59l-31.13-36.3-.16-.18A103.974 103.974 0 0 0 417.03 32h-46.55c-17.75 0-34.9 4.94-49.69 14.01C304.33 36.93 285.67 32 266.62 32h-32.11c-28.903 0-57.599 11.219-79.2 32.8L116.12 104H89.884C85.49 99.091 79.107 96 72 96H24c-13.255 0-24 10.745-24 24v240c0 13.255 10.745 24 24 24h48c10.449 0 19.334-6.68 22.629-16h18.801l75.35 67.57c25.542 26.45 59.925 44.43 96.58 44.43 16.39 0 32.28-3.85 46.1-10.93 24.936.496 51.101-10.368 69.07-31.41 19.684-5.579 37.503-17.426 50.72-34.6 20.989-4.401 40.728-16.492 53.42-35.06h40.701c3.295 9.32 12.18 16 22.629 16h48c13.255 0 24-10.745 24-24V120c0-13.255-10.745-24-24-24zM48 352c-8.837 0-16-7.163-16-16s7.163-16 16-16 16 7.163 16 16-7.163 16-16 16zm412.52-5.76c-15.35 14.295-36.884 11.328-39.95 8 1.414 13.382-18.257 41.043-49.08 38.88-5.541 18.523-28.218 33.826-51.49 25.75-8.89 8.89-22.46 13.13-34.64 13.13-24.95 0-47.77-14.54-63.14-30.91l-81.3-72.91a31.976 31.976 0 0 0-21.36-8.18H96V152h26.75c8.48 0 16.62-3.37 22.62-9.37l43.88-43.88A64.004 64.004 0 0 1 234.51 80h32.11c5.8 0 11.51.79 17 2.3l-43.27 50.49c-23.56 27.48-23.84 67.62-.66 95.44 32.388 38.866 91.378 39.228 124.48 1.98l25.98-30.08L462.59 296c13.44 14.6 10.95 38.13-2.07 50.24zM544 320h-24.458c.104-20.261-6.799-39.33-19.762-54.4L421.7 162.28c4.51-9.51 2.34-21.23-6.01-28.45-10.075-8.691-25.23-7.499-33.86 2.48l-53.63 62.12c-13.828 15.41-38.223 15.145-51.64-.93a25.857 25.857 0 0 1 .23-33.47l57.92-67.58A47.09 47.09 0 0 1 370.48 80h46.55c16.11 0 31.44 6.94 42.07 19.04L504.52 152H544v168zm48 32c-8.837 0-16-7.163-16-16s7.163-16 16-16 16 7.163 16 16-7.163 16-16 16z"],
- "hdd": [576, 512, [], "f0a0", "M567.403 235.642L462.323 84.589A48 48 0 0 0 422.919 64H153.081a48 48 0 0 0-39.404 20.589L8.597 235.642A48.001 48.001 0 0 0 0 263.054V400c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V263.054c0-9.801-3-19.366-8.597-27.412zM153.081 112h269.838l77.913 112H75.168l77.913-112zM528 400H48V272h480v128zm-32-64c0 17.673-14.327 32-32 32s-32-14.327-32-32 14.327-32 32-32 32 14.327 32 32zm-96 0c0 17.673-14.327 32-32 32s-32-14.327-32-32 14.327-32 32-32 32 14.327 32 32z"],
- "heart": [576, 512, [], "f004", "M257.3 475.4L92.5 313.6C85.4 307 24 248.1 24 174.8 24 84.1 80.8 24 176 24c41.4 0 80.6 22.8 112 49.8 31.3-27 70.6-49.8 112-49.8 91.7 0 152 56.5 152 150.8 0 52-31.8 103.5-68.1 138.7l-.4.4-164.8 161.5a43.7 43.7 0 0 1-61.4 0zM125.9 279.1L288 438.3l161.8-158.7c27.3-27 54.2-66.3 54.2-104.8C504 107.9 465.8 72 400 72c-47.2 0-92.8 49.3-112 68.4-17-17-64-68.4-112-68.4-65.9 0-104 35.9-104 102.8 0 37.3 26.7 78.9 53.9 104.3z"],
- "hospital": [448, 512, [], "f0f8", "M128 244v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12zm140 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12zm-76 84v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm76 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12zm180 124v36H0v-36c0-6.627 5.373-12 12-12h19.5V85.035C31.5 73.418 42.245 64 55.5 64H144V24c0-13.255 10.745-24 24-24h112c13.255 0 24 10.745 24 24v40h88.5c13.255 0 24 9.418 24 21.035V464H436c6.627 0 12 5.373 12 12zM79.5 463H192v-67c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v67h112.5V112H304v24c0 13.255-10.745 24-24 24H168c-13.255 0-24-10.745-24-24v-24H79.5v351zM266 64h-26V38a6 6 0 0 0-6-6h-20a6 6 0 0 0-6 6v26h-26a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h26v26a6 6 0 0 0 6 6h20a6 6 0 0 0 6-6V96h26a6 6 0 0 0 6-6V70a6 6 0 0 0-6-6z"],
- "hourglass": [384, 512, [], "f254", "M368 48h4c6.627 0 12-5.373 12-12V12c0-6.627-5.373-12-12-12H12C5.373 0 0 5.373 0 12v24c0 6.627 5.373 12 12 12h4c0 80.564 32.188 165.807 97.18 208C47.899 298.381 16 383.9 16 464h-4c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h360c6.627 0 12-5.373 12-12v-24c0-6.627-5.373-12-12-12h-4c0-80.564-32.188-165.807-97.18-208C336.102 213.619 368 128.1 368 48zM64 48h256c0 101.62-57.307 184-128 184S64 149.621 64 48zm256 416H64c0-101.62 57.308-184 128-184s128 82.38 128 184z"],
- "id-badge": [384, 512, [], "f2c1", "M192 128c35.346 0 64 28.654 64 64s-28.654 64-64 64-64-28.654-64-64 28.654-64 64-64m61.187 145.847l-18.064-5.161C222.371 275.884 207.658 280 192 280s-30.371-4.116-43.122-11.314l-18.064 5.161C110.207 279.734 96 298.569 96 320v72c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24v-72c0-21.431-14.207-40.266-34.813-46.153zM0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V48c0-26.51-21.49-48-48-48H48C21.49 0 0 21.49 0 48zm336 32v378a6 6 0 0 1-6 6H54a6 6 0 0 1-6-6V80h288z"],
- "id-card": [512, 512, [], "f2c2", "M404 256H300c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12zm12 68v-24c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h104c6.627 0 12-5.373 12-12zm96-212v288c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48zm-48 282V144H48v250a6 6 0 0 0 6 6h404a6 6 0 0 0 6-6zm-288-98c30.928 0 56-25.072 56-56s-25.072-56-56-56-56 25.072-56 56 25.072 56 56 56zm62.896 10.869l-13.464-4.039C211.814 313.568 194.649 320 176 320s-35.814-6.432-49.433-17.17l-13.464 4.039A24 24 0 0 0 96 329.857V372c0 6.627 5.373 12 12 12h136c6.627 0 12-5.373 12-12v-42.143a24 24 0 0 0-17.104-22.988z"],
- "image": [512, 512, [], "f03e", "M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 336H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v276a6 6 0 0 1-6 6zM128 152c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zM96 352h320v-80l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L192 304l-39.515-39.515c-4.686-4.686-12.284-4.686-16.971 0L96 304v48z"],
- "images": [576, 512, [], "f302", "M480 416v16c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V176c0-26.51 21.49-48 48-48h16v48H54a6 6 0 0 0-6 6v244a6 6 0 0 0 6 6h372a6 6 0 0 0 6-6v-10h48zm42-336H150a6 6 0 0 0-6 6v244a6 6 0 0 0 6 6h372a6 6 0 0 0 6-6V86a6 6 0 0 0-6-6zm6-48c26.51 0 48 21.49 48 48v256c0 26.51-21.49 48-48 48H144c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h384zM264 144c0 22.091-17.909 40-40 40s-40-17.909-40-40 17.909-40 40-40 40 17.909 40 40zm-72 96l39.515-39.515c4.686-4.686 12.284-4.686 16.971 0L288 240l103.515-103.515c4.686-4.686 12.284-4.686 16.971 0L480 208v80H192v-48z"],
- "keyboard": [576, 512, [], "f11c", "M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm8 336c0 4.411-3.589 8-8 8H48c-4.411 0-8-3.589-8-8V112c0-4.411 3.589-8 8-8h480c4.411 0 8 3.589 8 8v288zM170 270v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm-336 82v-28c0-6.627-5.373-12-12-12H82c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm384 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zM122 188v-28c0-6.627-5.373-12-12-12H82c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm-98 158v-16c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v16c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z"],
- "lemon": [512, 512, [], "f094", "M484.112 27.889C455.989-.233 416.108-8.057 387.059 8.865 347.604 31.848 223.504-41.111 91.196 91.197-41.277 223.672 31.923 347.472 8.866 387.058c-16.922 29.051-9.1 68.932 19.022 97.054 28.135 28.135 68.011 35.938 97.057 19.021 39.423-22.97 163.557 49.969 295.858-82.329 132.474-132.477 59.273-256.277 82.331-295.861 16.922-29.05 9.1-68.931-19.022-97.054zm-22.405 72.894c-38.8 66.609 45.6 165.635-74.845 286.08-120.44 120.443-219.475 36.048-286.076 74.843-22.679 13.207-64.035-27.241-50.493-50.488 38.8-66.609-45.6-165.635 74.845-286.08C245.573 4.702 344.616 89.086 411.219 50.292c22.73-13.24 64.005 27.288 50.488 50.491zm-169.861 8.736c1.37 10.96-6.404 20.957-17.365 22.327-54.846 6.855-135.779 87.787-142.635 142.635-1.373 10.989-11.399 18.734-22.326 17.365-10.961-1.37-18.735-11.366-17.365-22.326 9.162-73.286 104.167-168.215 177.365-177.365 10.953-1.368 20.956 6.403 22.326 17.364z"],
- "life-ring": [512, 512, [], "f1cd", "M256 504c136.967 0 248-111.033 248-248S392.967 8 256 8 8 119.033 8 256s111.033 248 248 248zm-103.398-76.72l53.411-53.411c31.806 13.506 68.128 13.522 99.974 0l53.411 53.411c-63.217 38.319-143.579 38.319-206.796 0zM336 256c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80zm91.28 103.398l-53.411-53.411c13.505-31.806 13.522-68.128 0-99.974l53.411-53.411c38.319 63.217 38.319 143.579 0 206.796zM359.397 84.72l-53.411 53.411c-31.806-13.505-68.128-13.522-99.973 0L152.602 84.72c63.217-38.319 143.579-38.319 206.795 0zM84.72 152.602l53.411 53.411c-13.506 31.806-13.522 68.128 0 99.974L84.72 359.398c-38.319-63.217-38.319-143.579 0-206.796z"],
- "lightbulb": [384, 512, [], "f0eb", "M272 428v28c0 10.449-6.68 19.334-16 22.629V488c0 13.255-10.745 24-24 24h-80c-13.255 0-24-10.745-24-24v-9.371c-9.32-3.295-16-12.18-16-22.629v-28c0-6.627 5.373-12 12-12h136c6.627 0 12 5.373 12 12zM128 176c0-35.29 28.71-64 64-64 8.837 0 16-7.164 16-16s-7.163-16-16-16c-52.935 0-96 43.065-96 96 0 8.836 7.164 16 16 16s16-7.164 16-16zm64-128c70.734 0 128 57.254 128 128 0 77.602-37.383 60.477-80.98 160h-94.04C101.318 236.33 64 253.869 64 176c0-70.735 57.254-128 128-128m0-48C94.805 0 16 78.803 16 176c0 101.731 51.697 91.541 90.516 192.674 3.55 9.249 12.47 15.326 22.376 15.326h126.215c9.906 0 18.826-6.078 22.376-15.326C316.303 267.541 368 277.731 368 176 368 78.803 289.195 0 192 0z"],
- "list-alt": [512, 512, [], "f022", "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm-6 400H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v340a6 6 0 0 1-6 6zm-42-92v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm0-96v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm0-96v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm-252 12c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36zm0 96c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36zm0 96c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36z"],
- "map": [576, 512, [], "f279", "M508.505 36.17L381.517 92.576 207.179 34.463a47.992 47.992 0 0 0-34.674 1.674l-144 64A48 48 0 0 0 0 144v287.967c0 34.938 35.991 57.864 67.495 43.863l126.988-56.406 174.339 58.113a47.992 47.992 0 0 0 34.674-1.674l144-64A48 48 0 0 0 576 368V80.033c0-34.938-35.991-57.864-67.495-43.863zM360 424l-144-48V88l144 48v288zm-312 8V144l120-53.333v288L48 432zm480-64l-120 53.333v-288L528 80v288z"],
- "meh": [512, 512, [], "f11a", "M256 56c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m0-48C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm64 136c-9.535 0-18.512 2.386-26.37 6.589h.017c12.735 0 23.059 10.324 23.059 23.059 0 12.735-10.324 23.059-23.059 23.059s-23.059-10.324-23.059-23.059v-.017C266.386 181.488 264 190.465 264 200c0 30.928 25.072 56 56 56s56-25.072 56-56-25.072-56-56-56zm-128 0c-9.535 0-18.512 2.386-26.37 6.589h.017c12.735 0 23.059 10.324 23.059 23.059 0 12.735-10.324 23.059-23.059 23.059-12.735 0-23.059-10.324-23.059-23.059v-.017C138.386 181.488 136 190.465 136 200c0 30.928 25.072 56 56 56s56-25.072 56-56-25.072-56-56-56zm136 184H184c-31.776 0-31.749 48 0 48h144c31.776 0 31.749-48 0-48z"],
- "minus-square": [448, 512, [], "f146", "M108 284c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h232c6.6 0 12 5.4 12 12v32c0 6.6-5.4 12-12 12H108zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"],
- "money-bill-alt": [640, 512, [], "f3d1", "M320 144c-53.021 0-96 50.143-96 112 0 61.847 42.977 112 96 112 53 0 96-50.13 96-112 0-61.857-42.979-112-96-112zm48 164.428c0 7.477-3.917 11.572-11.572 11.572h-67.293c-7.656 0-11.573-4.095-11.573-11.572v-8.901c0-7.477 3.917-11.572 11.573-11.572h15.131v-39.878c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.939c4.449-4.095 8.366-5.697 14.42-5.697h12.105c7.656 0 11.75 3.916 11.75 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.902zM616 64H24C10.745 64 0 74.745 0 88v335c0 13.255 10.745 24 24 24h592c13.255 0 24-10.745 24-24V88c0-13.255-10.745-24-24-24zM512 400H128c0-44.183-35.817-80-80-80V192c44.183 0 80-35.817 80-80h384c0 44.183 35.817 80 80 80v128c-44.183 0-80 35.817-80 80z"],
- "moon": [512, 512, [], "f186", "M279.135 512c78.756 0 150.982-35.804 198.844-94.775 28.27-34.831-2.558-85.722-46.249-77.401-82.348 15.683-158.272-47.268-158.272-130.792 0-48.424 26.06-92.292 67.434-115.836 38.745-22.05 28.999-80.788-15.022-88.919A257.936 257.936 0 0 0 279.135 0c-141.36 0-256 114.575-256 256 0 141.36 114.576 256 256 256zm0-464c12.985 0 25.689 1.201 38.016 3.478-54.76 31.163-91.693 90.042-91.693 157.554 0 113.848 103.641 199.2 215.252 177.944C402.574 433.964 344.366 464 279.135 464c-114.875 0-208-93.125-208-208s93.125-208 208-208z"],
- "newspaper": [576, 512, [], "f1ea", "M552 64H112c-20.858 0-38.643 13.377-45.248 32H24c-13.255 0-24 10.745-24 24v272c0 30.928 25.072 56 56 56h496c13.255 0 24-10.745 24-24V88c0-13.255-10.745-24-24-24zM48 392V144h16v248c0 4.411-3.589 8-8 8s-8-3.589-8-8zm480 8H111.422c.374-2.614.578-5.283.578-8V112h416v288zM172 280h136c6.627 0 12-5.373 12-12v-96c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v96c0 6.627 5.373 12 12 12zm28-80h80v40h-80v-40zm-40 140v-24c0-6.627 5.373-12 12-12h136c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H172c-6.627 0-12-5.373-12-12zm192 0v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H364c-6.627 0-12-5.373-12-12zm0-144v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H364c-6.627 0-12-5.373-12-12zm0 72v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H364c-6.627 0-12-5.373-12-12z"],
- "object-group": [512, 512, [], "f247", "M500 128c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v12H96V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v72c0 6.627 5.373 12 12 12h12v256H12c-6.627 0-12 5.373-12 12v72c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-12h320v12c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-12V128h12zm-52-64h32v32h-32V64zM32 64h32v32H32V64zm32 384H32v-32h32v32zm416 0h-32v-32h32v32zm-40-64h-12c-6.627 0-12 5.373-12 12v12H96v-12c0-6.627-5.373-12-12-12H72V128h12c6.627 0 12-5.373 12-12v-12h320v12c0 6.627 5.373 12 12 12h12v256zm-36-192h-84v-52c0-6.628-5.373-12-12-12H108c-6.627 0-12 5.372-12 12v168c0 6.628 5.373 12 12 12h84v52c0 6.628 5.373 12 12 12h200c6.627 0 12-5.372 12-12V204c0-6.628-5.373-12-12-12zm-268-24h144v112H136V168zm240 176H232v-24h76c6.627 0 12-5.372 12-12v-76h56v112z"],
- "object-ungroup": [576, 512, [], "f248", "M564 224c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v12h-88v-24h12c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v12H96V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v72c0 6.627 5.373 12 12 12h12v160H12c-6.627 0-12 5.373-12 12v72c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-12h88v24h-12c-6.627 0-12 5.373-12 12v72c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-12h224v12c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-12V224h12zM352 64h32v32h-32V64zm0 256h32v32h-32v-32zM64 352H32v-32h32v32zm0-256H32V64h32v32zm32 216v-12c0-6.627-5.373-12-12-12H72V128h12c6.627 0 12-5.373 12-12v-12h224v12c0 6.627 5.373 12 12 12h12v160h-12c-6.627 0-12 5.373-12 12v12H96zm128 136h-32v-32h32v32zm280-64h-12c-6.627 0-12 5.373-12 12v12H256v-12c0-6.627-5.373-12-12-12h-12v-24h88v12c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-12v-88h88v12c0 6.627 5.373 12 12 12h12v160zm40 64h-32v-32h32v32zm0-256h-32v-32h32v32z"],
- "paper-plane": [512, 512, [], "f1d8", "M440 6.5L24 246.4c-34.4 19.9-31.1 70.8 5.7 85.9L144 379.6V464c0 46.4 59.2 65.5 86.6 28.6l43.8-59.1 111.9 46.2c5.9 2.4 12.1 3.6 18.3 3.6 8.2 0 16.3-2.1 23.6-6.2 12.8-7.2 21.6-20 23.9-34.5l59.4-387.2c6.1-40.1-36.9-68.8-71.5-48.9zM192 464v-64.6l36.6 15.1L192 464zm212.6-28.7l-153.8-63.5L391 169.5c10.7-15.5-9.5-33.5-23.7-21.2L155.8 332.6 48 288 464 48l-59.4 387.3z"],
- "pause-circle": [512, 512, [], "f28b", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm96-280v160c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16zm-112 0v160c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16z"],
- "play-circle": [512, 512, [], "f144", "M371.7 238l-176-107c-15.8-8.8-35.7 2.5-35.7 21v208c0 18.4 19.8 29.8 35.7 21l176-101c16.4-9.1 16.4-32.8 0-42zM504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256z"],
- "plus-square": [448, 512, [], "f0fe", "M352 240v32c0 6.6-5.4 12-12 12h-88v88c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-88h-88c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h88v-88c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v88h88c6.6 0 12 5.4 12 12zm96-160v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"],
- "question-circle": [512, 512, [], "f059", "M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm107.244-255.2c0 67.052-72.421 68.084-72.421 92.863V300c0 6.627-5.373 12-12 12h-45.647c-6.627 0-12-5.373-12-12v-8.659c0-35.745 27.1-50.034 47.579-61.516 17.561-9.845 28.324-16.541 28.324-29.579 0-17.246-21.999-28.693-39.784-28.693-23.189 0-33.894 10.977-48.942 29.969-4.057 5.12-11.46 6.071-16.666 2.124l-27.824-21.098c-5.107-3.872-6.251-11.066-2.644-16.363C184.846 131.491 214.94 112 261.794 112c49.071 0 101.45 38.304 101.45 88.8zM298 368c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42z"],
- "registered": [512, 512, [], "f25d", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 448c-110.532 0-200-89.451-200-200 0-110.531 89.451-200 200-200 110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200zm110.442-81.791c-53.046-96.284-50.25-91.468-53.271-96.085 24.267-13.879 39.482-41.563 39.482-73.176 0-52.503-30.247-85.252-101.498-85.252h-78.667c-6.617 0-12 5.383-12 12V380c0 6.617 5.383 12 12 12h38.568c6.617 0 12-5.383 12-12v-83.663h31.958l47.515 89.303a11.98 11.98 0 0 0 10.593 6.36h42.81c9.14 0 14.914-9.799 10.51-17.791zM256.933 239.906h-33.875v-64.14h27.377c32.417 0 38.929 12.133 38.929 31.709-.001 20.913-11.518 32.431-32.431 32.431z"],
- "save": [448, 512, [], "f0c7", "M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM272 80v80H144V80h128zm122 352H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h42v104c0 13.255 10.745 24 24 24h176c13.255 0 24-10.745 24-24V83.882l78.243 78.243a6 6 0 0 1 1.757 4.243V426a6 6 0 0 1-6 6zM224 232c-48.523 0-88 39.477-88 88s39.477 88 88 88 88-39.477 88-88-39.477-88-88-88zm0 128c-22.056 0-40-17.944-40-40s17.944-40 40-40 40 17.944 40 40-17.944 40-40 40z"],
- "share-square": [576, 512, [], "f14d", "M561.938 158.06L417.94 14.092C387.926-15.922 336 5.097 336 48.032v57.198c-42.45 1.88-84.03 6.55-120.76 17.99-35.17 10.95-63.07 27.58-82.91 49.42C108.22 199.2 96 232.6 96 271.94c0 61.697 33.178 112.455 84.87 144.76 37.546 23.508 85.248-12.651 71.02-55.74-15.515-47.119-17.156-70.923 84.11-78.76V336c0 42.993 51.968 63.913 81.94 33.94l143.998-144c18.75-18.74 18.75-49.14 0-67.88zM384 336V232.16C255.309 234.082 166.492 255.35 206.31 376 176.79 357.55 144 324.08 144 271.94c0-109.334 129.14-118.947 240-119.85V48l144 144-144 144zm24.74 84.493a82.658 82.658 0 0 0 20.974-9.303c7.976-4.952 18.286.826 18.286 10.214V464c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h132c6.627 0 12 5.373 12 12v4.486c0 4.917-2.987 9.369-7.569 11.152-13.702 5.331-26.396 11.537-38.05 18.585a12.138 12.138 0 0 1-6.28 1.777H54a6 6 0 0 0-6 6v340a6 6 0 0 0 6 6h340a6 6 0 0 0 6-6v-25.966c0-5.37 3.579-10.059 8.74-11.541z"],
- "smile": [512, 512, [], "f118", "M256 56c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m0-48C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm64 136c-9.535 0-18.512 2.386-26.37 6.589h.017c12.735 0 23.059 10.324 23.059 23.059 0 12.735-10.324 23.059-23.059 23.059s-23.059-10.324-23.059-23.059v-.017C266.386 181.488 264 190.465 264 200c0 30.928 25.072 56 56 56s56-25.072 56-56-25.072-56-56-56zm-128 0c-9.535 0-18.512 2.386-26.37 6.589h.017c12.735 0 23.059 10.324 23.059 23.059 0 12.735-10.324 23.059-23.059 23.059-12.735 0-23.059-10.324-23.059-23.059v-.017C138.386 181.488 136 190.465 136 200c0 30.928 25.072 56 56 56s56-25.072 56-56-25.072-56-56-56zm195.372 182.219c18.819-25.592-19.856-54.017-38.67-28.438-50.135 68.177-135.229 68.18-185.367 0-18.828-25.601-57.478 2.861-38.67 28.438 69.298 94.231 193.323 94.351 262.707 0z"],
- "snowflake": [448, 512, [], "f2dc", "M438.237 355.927l-66.574-38.54 59.448-10.327c5.846-1.375 10.609-5.183 13.458-10.13 2.48-4.307 3.506-9.478 2.524-14.651-2.11-11.115-12.686-18.039-23.621-15.467l-85.423 31.115L255.914 256l82.136-41.926 85.423 31.115c10.936 2.572 21.512-4.352 23.621-15.467 2.111-11.115-5.046-22.209-15.981-24.781l-59.448-10.327 66.573-38.54c9.54-5.523 12.615-18.092 6.867-28.074-5.748-9.982-18.14-13.596-27.68-8.074l-66.574 38.54 20.805-56.787c3.246-10.782-2.758-22.542-13.413-26.268-10.654-3.725-21.922 1.997-25.168 12.779l-15.838 89.735-72.423 41.926V136l69.585-58.621c7.689-8.21 6.997-20.856-1.548-28.245-8.545-7.391-21.705-6.723-29.394 1.486l-38.644 46.46V20c0-11.046-9.318-20-20.813-20s-20.813 8.954-20.813 20v77.08l-38.644-46.46c-7.689-8.21-20.849-8.876-29.394-1.486-8.544 7.389-9.236 20.035-1.547 28.245L203.187 136v83.853l-72.423-41.926-15.838-89.736c-3.247-10.782-14.515-16.504-25.169-12.779-10.656 3.725-16.659 15.486-13.413 26.268l20.805 56.787-66.573-38.54c-9.54-5.523-21.933-1.908-27.68 8.074s-2.673 22.551 6.867 28.074l66.574 38.54-59.449 10.328C5.953 207.515-1.202 218.609.907 229.724c2.11 11.114 12.686 18.038 23.622 15.466l85.422-31.115L192.086 256l-82.136 41.926-85.423-31.115c-10.936-2.572-21.511 4.352-23.622 15.466-2.109 11.113 5.046 22.209 15.981 24.781l59.449 10.328-66.574 38.54C.223 361.449-2.852 374.018 2.896 384s18.14 13.597 27.68 8.074l66.574-38.54-20.805 56.786c-1.735 5.764-.828 11.805 2.02 16.751 2.48 4.307 6.433 7.784 11.392 9.517 10.655 3.725 21.923-1.997 25.169-12.779l15.838-89.736 72.423-41.926V376l-69.585 58.621c-7.69 8.21-6.997 20.855 1.547 28.245 8.544 7.388 21.705 6.723 29.394-1.487l38.644-46.46V492c0 11.046 9.318 20 20.813 20s20.813-8.954 20.813-20v-77.081l38.644 46.46c4.111 4.389 9.782 6.621 15.478 6.621 4.96 0 9.939-1.694 13.916-5.134 8.545-7.39 9.237-20.035 1.548-28.245L244.813 376v-83.853l72.423 41.926 15.838 89.736c3.246 10.782 14.514 16.504 25.168 12.779 10.653-3.726 16.659-15.487 13.412-26.268l-20.805-56.787 66.574 38.54c9.54 5.523 21.933 1.908 27.68-8.074 5.749-9.981 2.675-22.55-6.866-28.072z"],
- "square": [448, 512, [], "f0c8", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h340c3.3 0 6 2.7 6 6v340c0 3.3-2.7 6-6 6z"],
- "star": [576, 512, [], "f005", "M528.1 171.5L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"],
- "star-half": [576, 512, [], "f089", "M288 385.3l-124.3 65.4 23.7-138.4-100.6-98 139-20.2 62.2-126V0c-11.4 0-22.8 5.9-28.7 17.8L194 150.2 47.9 171.4c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.1 23 46 46.4 33.7L288 439.6v-54.3z"],
- "sticky-note": [448, 512, [], "f249", "M448 348.106V80c0-26.51-21.49-48-48-48H48C21.49 32 0 53.49 0 80v351.988c0 26.51 21.49 48 48 48h268.118a48 48 0 0 0 33.941-14.059l83.882-83.882A48 48 0 0 0 448 348.106zm-128 80v-76.118h76.118L320 428.106zM400 80v223.988H296c-13.255 0-24 10.745-24 24v104H48V80h352z"],
- "stop-circle": [512, 512, [], "f28d", "M504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256zm296-80v160c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16z"],
- "sun": [512, 512, [], "f185", "M220.116 487.936l-20.213-49.425a3.992 3.992 0 0 0-5.808-1.886l-45.404 28.104c-29.466 18.24-66.295-8.519-58.054-42.179l12.699-51.865a3.993 3.993 0 0 0-3.59-4.941l-53.251-3.951c-34.554-2.562-48.632-45.855-22.174-68.247L65.08 259.05a3.992 3.992 0 0 0 0-6.106l-40.76-34.497c-26.45-22.384-12.39-65.682 22.174-68.246l53.251-3.951a3.993 3.993 0 0 0 3.59-4.941L90.637 89.443c-8.239-33.656 28.581-60.42 58.054-42.179l45.403 28.104a3.993 3.993 0 0 0 5.808-1.887l20.213-49.425c13.116-32.071 58.638-32.081 71.758 0l20.212 49.424a3.994 3.994 0 0 0 5.809 1.887l45.403-28.104c29.464-18.236 66.297 8.513 58.054 42.179l-12.699 51.865a3.995 3.995 0 0 0 3.59 4.941l53.251 3.951c34.553 2.563 48.633 45.854 22.175 68.246l-40.76 34.497a3.993 3.993 0 0 0 0 6.107l40.76 34.496c26.511 22.441 12.322 65.689-22.175 68.247l-53.251 3.951a3.993 3.993 0 0 0-3.589 4.942l12.698 51.864c8.241 33.658-28.583 60.421-58.054 42.18l-45.403-28.104a3.994 3.994 0 0 0-5.809 1.887l-20.212 49.424c-13.159 32.178-58.675 31.993-71.757 0zm16.814-64.568l19.064 46.616 19.064-46.615c10.308-25.2 40.778-35.066 63.892-20.759l42.822 26.507-11.976-48.919c-6.475-26.444 12.38-52.339 39.487-54.349l50.226-3.726-38.444-32.536c-20.782-17.591-20.747-49.621.001-67.18l38.442-32.536-50.225-3.727c-27.151-2.015-45.95-27.948-39.488-54.349l11.978-48.919-42.823 26.507c-23.151 14.327-53.603 4.4-63.892-20.76l-19.064-46.615-19.064 46.617c-10.305 25.198-40.778 35.066-63.891 20.76l-42.823-26.508 11.977 48.918c6.474 26.446-12.381 52.338-39.488 54.35l-50.224 3.726 38.443 32.537c20.782 17.588 20.747 49.619 0 67.178L52.48 322.123l50.226 3.726c27.151 2.014 45.95 27.947 39.487 54.349l-11.977 48.919 42.823-26.507c23.188-14.355 53.622-4.352 63.891 20.758zM256 384c-70.58 0-128-57.421-128-128 0-70.58 57.42-128 128-128 70.579 0 128 57.42 128 128 0 70.579-57.421 128-128 128zm0-208c-44.112 0-80 35.888-80 80s35.888 80 80 80 80-35.888 80-80-35.888-80-80-80z"],
- "thumbs-down": [512, 512, [], "f165", "M466.27 225.31c4.674-22.647.864-44.538-8.99-62.99 2.958-23.868-4.021-48.565-17.34-66.99C438.986 39.423 404.117 0 327 0c-7 0-15 .01-22.22.01C201.195.01 168.997 40 128 40h-10.845c-5.64-4.975-13.042-8-21.155-8H32C14.327 32 0 46.327 0 64v240c0 17.673 14.327 32 32 32h64c11.842 0 22.175-6.438 27.708-16h7.052c19.146 16.953 46.013 60.653 68.76 83.4 13.667 13.667 10.153 108.6 71.76 108.6 57.58 0 95.27-31.936 95.27-104.73 0-18.41-3.93-33.73-8.85-46.54h36.48c48.602 0 85.82-41.565 85.82-85.58 0-19.15-4.96-34.99-13.73-49.84zM64 296c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm330.18 16.73H290.19c0 37.82 28.36 55.37 28.36 94.54 0 23.75 0 56.73-47.27 56.73-18.91-18.91-9.46-66.18-37.82-94.54C206.9 342.89 167.28 272 138.92 272H128V85.83c53.611 0 100.001-37.82 171.64-37.82h37.82c35.512 0 60.82 17.12 53.12 65.9 15.2 8.16 26.5 36.44 13.94 57.57 21.581 20.384 18.699 51.065 5.21 65.62 9.45 0 22.36 18.91 22.27 37.81-.09 18.91-16.71 37.82-37.82 37.82z"],
- "thumbs-up": [512, 512, [], "f164", "M466.27 286.69C475.04 271.84 480 256 480 236.85c0-44.015-37.218-85.58-85.82-85.58H357.7c4.92-12.81 8.85-28.13 8.85-46.54C366.55 31.936 328.86 0 271.28 0c-61.607 0-58.093 94.933-71.76 108.6-22.747 22.747-49.615 66.447-68.76 83.4H32c-17.673 0-32 14.327-32 32v240c0 17.673 14.327 32 32 32h64c14.893 0 27.408-10.174 30.978-23.95 44.509 1.001 75.06 39.94 177.802 39.94 7.22 0 15.22.01 22.22.01 77.117 0 111.986-39.423 112.94-95.33 13.319-18.425 20.299-43.122 17.34-66.99 9.854-18.452 13.664-40.343 8.99-62.99zm-61.75 53.83c12.56 21.13 1.26 49.41-13.94 57.57 7.7 48.78-17.608 65.9-53.12 65.9h-37.82c-71.639 0-118.029-37.82-171.64-37.82V240h10.92c28.36 0 67.98-70.89 94.54-97.46 28.36-28.36 18.91-75.63 37.82-94.54 47.27 0 47.27 32.98 47.27 56.73 0 39.17-28.36 56.72-28.36 94.54h103.99c21.11 0 37.73 18.91 37.82 37.82.09 18.9-12.82 37.81-22.27 37.81 13.489 14.555 16.371 45.236-5.21 65.62zM88 432c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z"],
- "times-circle": [512, 512, [], "f057", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm101.8-262.2L295.6 256l62.2 62.2c4.7 4.7 4.7 12.3 0 17l-22.6 22.6c-4.7 4.7-12.3 4.7-17 0L256 295.6l-62.2 62.2c-4.7 4.7-12.3 4.7-17 0l-22.6-22.6c-4.7-4.7-4.7-12.3 0-17l62.2-62.2-62.2-62.2c-4.7-4.7-4.7-12.3 0-17l22.6-22.6c4.7-4.7 12.3-4.7 17 0l62.2 62.2 62.2-62.2c4.7-4.7 12.3-4.7 17 0l22.6 22.6c4.7 4.7 4.7 12.3 0 17z"],
- "trash-alt": [448, 512, [], "f2ed", "M192 188v216c0 6.627-5.373 12-12 12h-24c-6.627 0-12-5.373-12-12V188c0-6.627 5.373-12 12-12h24c6.627 0 12 5.373 12 12zm100-12h-24c-6.627 0-12 5.373-12 12v216c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12V188c0-6.627-5.373-12-12-12zm132-96c13.255 0 24 10.745 24 24v12c0 6.627-5.373 12-12 12h-20v336c0 26.51-21.49 48-48 48H80c-26.51 0-48-21.49-48-48V128H12c-6.627 0-12-5.373-12-12v-12c0-13.255 10.745-24 24-24h74.411l34.018-56.696A48 48 0 0 1 173.589 0h100.823a48 48 0 0 1 41.16 23.304L349.589 80H424zm-269.611 0h139.223L276.16 50.913A6 6 0 0 0 271.015 48h-94.028a6 6 0 0 0-5.145 2.913L154.389 80zM368 128H80v330a6 6 0 0 0 6 6h276a6 6 0 0 0 6-6V128z"],
- "user": [512, 512, [], "f007", "M399.326 288.908C422.188 258.886 436 221.085 436 180 436 80.591 355.414 0 256 0 156.591 0 76 80.586 76 180c0 41.073 13.806 78.878 36.674 108.908C50.028 296.336 0 349.651 0 416v28.5C0 481.72 30.28 512 67.5 512h377c37.22 0 67.5-30.28 67.5-67.5V416c0-66.374-50.052-119.667-112.674-127.092zM256 48c72.902 0 132 59.098 132 132s-59.098 132-132 132-132-59.098-132-132S183.098 48 256 48zm208 396.5c0 10.77-8.73 19.5-19.5 19.5h-377c-10.77 0-19.5-8.73-19.5-19.5V416c0-44.183 35.817-80 80-80h38.14c55.486 31.968 124.026 32.087 179.72 0H384c44.183 0 80 35.817 80 80v28.5z"],
- "user-circle": [512, 512, [], "f2bd", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 34.48-8.706 66.909-24.04 95.213-13.403-26.393-37.525-47.542-67.384-56.572C378.19 273.809 385.5 249.468 385.5 224c0-71.569-57.919-129.5-129.5-129.5-71.569 0-129.5 57.919-129.5 129.5 0 25.468 7.31 49.809 20.924 70.641-29.821 9.018-53.962 30.142-67.385 56.572C64.706 322.911 56 290.482 56 256c0-110.531 89.451-200 200-200zm-80 168c0-44.183 35.817-80 80-80s80 35.817 80 80-35.817 80-80 80-80-35.817-80-80zm-59.927 174.943c1.519-33.998 29.554-61.097 63.927-61.097h14.171c38.337 20.889 85.337 20.881 123.659 0H332c34.373 0 62.408 27.099 63.927 61.097-77.746 76.114-202.156 76.065-279.854 0z"],
- "window-close": [512, 512, [], "f410", "M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 394c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h404c3.3 0 6 2.7 6 6v340zM356.5 194.6L295.1 256l61.4 61.4c4.6 4.6 4.6 12.1 0 16.8l-22.3 22.3c-4.6 4.6-12.1 4.6-16.8 0L256 295.1l-61.4 61.4c-4.6 4.6-12.1 4.6-16.8 0l-22.3-22.3c-4.6-4.6-4.6-12.1 0-16.8l61.4-61.4-61.4-61.4c-4.6-4.6-4.6-12.1 0-16.8l22.3-22.3c4.6-4.6 12.1-4.6 16.8 0l61.4 61.4 61.4-61.4c4.6-4.6 12.1-4.6 16.8 0l22.3 22.3c4.7 4.6 4.7 12.1 0 16.8z"],
- "window-maximize": [512, 512, [], "f2d0", "M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 394c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V192h416v234z"],
- "window-restore": [512, 512, [], "f2d2", "M464 0H144c-26.5 0-48 21.5-48 48v48H48c-26.5 0-48 21.5-48 48v320c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h48c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-96 464H48V256h320v208zm96-96h-48V144c0-26.5-21.5-48-48-48H144V48h320v320z"]
-};
-
-bunker(function () {
- define('far', icons);
-});
-
-}());
-(function () {
-'use strict';
-
-var _WINDOW = {};
-try {
- if (typeof window !== 'undefined') _WINDOW = window;
-
-} catch (e) {}
-
-var _ref = _WINDOW.navigator || {};
-var _ref$userAgent = _ref.userAgent;
-var userAgent = _ref$userAgent === undefined ? '' : _ref$userAgent;
-
-var WINDOW = _WINDOW;
-
-
-
-
-var IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');
-
-var NAMESPACE_IDENTIFIER = '___FONT_AWESOME___';
-
-
-
-
-
-
-
-var PRODUCTION = function () {
- try {
- return "production" === 'production';
- } catch (e) {
- return false;
- }
-}();
-
-var oneToTen = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
-var oneToTwenty = oneToTen.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);
-
-
-
-var RESERVED_CLASSES = ['xs', 'sm', 'lg', 'fw', 'ul', 'li', 'border', 'pull-left', 'pull-right', 'spin', 'pulse', 'rotate-90', 'rotate-180', 'rotate-270', 'flip-horizontal', 'flip-vertical', 'stack', 'stack-1x', 'stack-2x', 'inverse', 'layers', 'layers-text', 'layers-counter'].concat(oneToTen.map(function (n) {
- return n + 'x';
-})).concat(oneToTwenty.map(function (n) {
- return 'w-' + n;
-}));
-
-function bunker(fn) {
- try {
- fn();
- } catch (e) {
- if (!PRODUCTION) {
- throw e;
- }
- }
-}
-
-var w = WINDOW || {};
-
-if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};
-if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};
-if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};
-if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];
-
-var namespace = w[NAMESPACE_IDENTIFIER];
-
-var _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
-
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
-
- return target;
-};
-
-function define(prefix, icons) {
- var normalized = Object.keys(icons).reduce(function (acc, iconName) {
- var icon = icons[iconName];
- var expanded = !!icon.icon;
-
- if (expanded) {
- acc[icon.iconName] = icon.icon;
- } else {
- acc[iconName] = icon;
- }
- return acc;
- }, {});
-
- if (typeof namespace.hooks.addPack === 'function') {
- namespace.hooks.addPack(prefix, normalized);
- } else {
- namespace.styles[prefix] = _extends({}, namespace.styles[prefix] || {}, normalized);
- }
-
- /**
- * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
- * of new styles we needed to differentiate between them. Prefix `fa` is now an alias
- * for `fas` so we'll easy the upgrade process for our users by automatically defining
- * this as well.
- */
- if (prefix === 'fas') {
- define('fa', icons);
- }
-}
-
-var icons = {
- "address-book": [448, 512, [], "f2b9", "M436 160c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-20V48c0-26.51-21.49-48-48-48H80C53.49 0 32 21.49 32 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48h20c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-20v-64h20c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-20v-64h20zM224 96c53.019 0 96 42.981 96 96s-42.981 96-96 96-96-42.981-96-96 42.981-96 96-96zm128 304c0 26.51-21.49 48-48 48H144c-26.51 0-48-21.49-48-48v-48.711c0-20.994 13.644-39.553 33.683-45.815l22.954-7.173C173.563 312.413 198.198 320 224 320s50.437-7.587 71.363-21.699l22.954 7.173C338.356 311.736 352 330.295 352 351.289V400z"],
- "address-card": [512, 512, [], "f2bb", "M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-288 64c44.183 0 80 35.817 80 80s-35.817 80-80 80-80-35.817-80-80 35.817-80 80-80zm112 232c0 13.255-10.745 24-24 24H88c-13.255 0-24-10.745-24-24v-29.897a24 24 0 0 1 17.407-23.077l28.938-8.268C129.323 312.549 152.087 320 176 320s46.677-7.451 65.656-21.241l28.938 8.268A23.999 23.999 0 0 1 288 330.103V360zm160-52c0 6.627-5.373 12-12 12H332c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v8zm0-64c0 6.627-5.373 12-12 12H332c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v8zm0-64c0 6.627-5.373 12-12 12H332c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v8z"],
- "adjust": [512, 512, [], "f042", "M8 256c0 136.966 111.033 248 248 248s248-111.034 248-248S392.966 8 256 8 8 119.033 8 256zm248 184V72c101.705 0 184 82.311 184 184 0 101.705-82.311 184-184 184z"],
- "align-center": [448, 512, [], "f037", "M352 44v40c0 8.837-7.163 16-16 16H112c-8.837 0-16-7.163-16-16V44c0-8.837 7.163-16 16-16h224c8.837 0 16 7.163 16 16zM16 228h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 256h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm320-200H112c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16h224c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16z"],
- "align-justify": [448, 512, [], "f039", "M0 84V44c0-8.837 7.163-16 16-16h416c8.837 0 16 7.163 16 16v40c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16zm16 144h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 256h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0-128h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"],
- "align-left": [448, 512, [], "f036", "M288 44v40c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16V44c0-8.837 7.163-16 16-16h256c8.837 0 16 7.163 16 16zM0 172v40c0 8.837 7.163 16 16 16h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16zm16 312h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm256-200H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16h256c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16z"],
- "align-right": [448, 512, [], "f038", "M160 84V44c0-8.837 7.163-16 16-16h256c8.837 0 16 7.163 16 16v40c0 8.837-7.163 16-16 16H176c-8.837 0-16-7.163-16-16zM16 228h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 256h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm160-128h256c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H176c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"],
- "ambulance": [640, 512, [], "f0f9", "M592 0H272c-26.51 0-48 21.49-48 48v48h-44.118a48 48 0 0 0-33.941 14.059l-99.882 99.882A48 48 0 0 0 32 243.882V352h-8c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h40c0 53.019 42.981 96 96 96s96-42.981 96-96h128c0 53.019 42.981 96 96 96s96-42.981 96-96h40c13.255 0 24-10.745 24-24V48c0-26.51-21.49-48-48-48zM160 464c-26.467 0-48-21.533-48-48s21.533-48 48-48 48 21.533 48 48-21.533 48-48 48zm64-208H80v-12.118L179.882 144H224v112zm256 208c-26.467 0-48-21.533-48-48s21.533-48 48-48 48 21.533 48 48-21.533 48-48 48zm32-288v32c0 6.627-5.373 12-12 12h-56v56c0 6.627-5.373 12-12 12h-32c-6.627 0-12-5.373-12-12v-56h-56c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h56v-56c0-6.627 5.373-12 12-12h32c6.627 0 12 5.373 12 12v56h56c6.627 0 12 5.373 12 12z"],
- "american-sign-language-interpreting": [640, 512, [], "f2a3", "M290.547 189.039c-20.295-10.149-44.147-11.199-64.739-3.89 42.606 0 71.208 20.475 85.578 50.576 8.576 17.899-5.148 38.071-23.617 38.071 18.429 0 32.211 20.136 23.617 38.071-14.725 30.846-46.123 50.854-80.298 50.854-.557 0-94.471-8.615-94.471-8.615l-66.406 33.347c-9.384 4.693-19.815.379-23.895-7.781L1.86 290.747c-4.167-8.615-1.111-18.897 6.946-23.621l58.072-33.069L108 159.861c6.39-57.245 34.731-109.767 79.743-146.726 11.391-9.448 28.341-7.781 37.51 3.613 9.446 11.394 7.78 28.067-3.612 37.516-12.503 10.559-23.618 22.509-32.509 35.57 21.672-14.729 46.679-24.732 74.186-28.067 14.725-1.945 28.063 8.336 29.73 23.065 1.945 14.728-8.336 28.067-23.062 29.734-16.116 1.945-31.12 7.503-44.178 15.284 26.114-5.713 58.712-3.138 88.079 11.115 13.336 6.669 18.893 22.509 12.224 35.848-6.389 13.06-22.504 18.617-35.564 12.226zm-27.229 69.472c-6.112-12.505-18.338-20.286-32.231-20.286a35.46 35.46 0 0 0-35.565 35.57c0 21.428 17.808 35.57 35.565 35.57 13.893 0 26.119-7.781 32.231-20.286 4.446-9.449 13.614-15.006 23.339-15.284-9.725-.277-18.893-5.835-23.339-15.284zm374.821-37.237c4.168 8.615 1.111 18.897-6.946 23.621l-58.071 33.069L532 352.16c-6.39 57.245-34.731 109.767-79.743 146.726-10.932 9.112-27.799 8.144-37.51-3.613-9.446-11.394-7.78-28.067 3.613-37.516 12.503-10.559 23.617-22.509 32.508-35.57-21.672 14.729-46.679 24.732-74.186 28.067-10.021 2.506-27.552-5.643-29.73-23.065-1.945-14.728 8.336-28.067 23.062-29.734 16.116-1.946 31.12-7.503 44.178-15.284-26.114 5.713-58.712 3.138-88.079-11.115-13.336-6.669-18.893-22.509-12.224-35.848 6.389-13.061 22.505-18.619 35.565-12.227 20.295 10.149 44.147 11.199 64.739 3.89-42.606 0-71.208-20.475-85.578-50.576-8.576-17.899 5.148-38.071 23.617-38.071-18.429 0-32.211-20.136-23.617-38.071 14.033-29.396 44.039-50.887 81.966-50.854l92.803 8.615 66.406-33.347c9.408-4.704 19.828-.354 23.894 7.781l44.455 88.926zm-229.227-18.618c-13.893 0-26.119 7.781-32.231 20.286-4.446 9.449-13.614 15.006-23.339 15.284 9.725.278 18.893 5.836 23.339 15.284 6.112 12.505 18.338 20.286 32.231 20.286a35.46 35.46 0 0 0 35.565-35.57c0-21.429-17.808-35.57-35.565-35.57z"],
- "anchor": [576, 512, [], "f13d", "M12.971 352h32.394C67.172 454.735 181.944 512 288 512c106.229 0 220.853-57.38 242.635-160h32.394c10.691 0 16.045-12.926 8.485-20.485l-67.029-67.029c-4.686-4.686-12.284-4.686-16.971 0l-67.029 67.029c-7.56 7.56-2.206 20.485 8.485 20.485h35.146c-20.29 54.317-84.963 86.588-144.117 94.015V256h52c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-52v-5.47c37.281-13.178 63.995-48.725 64-90.518C384.005 43.772 341.605.738 289.37.01 235.723-.739 192 42.525 192 96c0 41.798 26.716 77.35 64 90.53V192h-52c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h52v190.015c-58.936-7.399-123.82-39.679-144.117-94.015h35.146c10.691 0 16.045-12.926 8.485-20.485l-67.029-67.029c-4.686-4.686-12.284-4.686-16.971 0L4.485 331.515C-3.074 339.074 2.28 352 12.971 352zM288 64c17.645 0 32 14.355 32 32s-14.355 32-32 32-32-14.355-32-32 14.355-32 32-32z"],
- "angle-double-down": [320, 512, [], "f103", "M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"],
- "angle-double-left": [448, 512, [], "f100", "M223.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L319.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L393.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34zm-192 34l136 136c9.4 9.4 24.6 9.4 33.9 0l22.6-22.6c9.4-9.4 9.4-24.6 0-33.9L127.9 256l96.4-96.4c9.4-9.4 9.4-24.6 0-33.9L201.7 103c-9.4-9.4-24.6-9.4-33.9 0l-136 136c-9.5 9.4-9.5 24.6-.1 34z"],
- "angle-double-right": [448, 512, [], "f101", "M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34zm192-34l-136-136c-9.4-9.4-24.6-9.4-33.9 0l-22.6 22.6c-9.4 9.4-9.4 24.6 0 33.9l96.4 96.4-96.4 96.4c-9.4 9.4-9.4 24.6 0 33.9l22.6 22.6c9.4 9.4 24.6 9.4 33.9 0l136-136c9.4-9.2 9.4-24.4 0-33.8z"],
- "angle-double-up": [320, 512, [], "f102", "M177 255.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 351.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 425.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1zm-34-192L7 199.7c-9.4 9.4-9.4 24.6 0 33.9l22.6 22.6c9.4 9.4 24.6 9.4 33.9 0l96.4-96.4 96.4 96.4c9.4 9.4 24.6 9.4 33.9 0l22.6-22.6c9.4-9.4 9.4-24.6 0-33.9l-136-136c-9.2-9.4-24.4-9.4-33.8 0z"],
- "angle-down": [320, 512, [], "f107", "M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z"],
- "angle-left": [256, 512, [], "f104", "M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"],
- "angle-right": [256, 512, [], "f105", "M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"],
- "angle-up": [320, 512, [], "f106", "M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z"],
- "archive": [512, 512, [], "f187", "M488 128H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h464c13.255 0 24 10.745 24 24v48c0 13.255-10.745 24-24 24zm-8 328V184c0-13.255-10.745-24-24-24H56c-13.255 0-24 10.745-24 24v272c0 13.255 10.745 24 24 24h400c13.255 0 24-10.745 24-24zM308 256H204c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12z"],
- "arrow-alt-circle-down": [512, 512, [], "f358", "M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zM212 140v116h-70.9c-10.7 0-16.1 13-8.5 20.5l114.9 114.3c4.7 4.7 12.2 4.7 16.9 0l114.9-114.3c7.6-7.6 2.2-20.5-8.5-20.5H300V140c0-6.6-5.4-12-12-12h-64c-6.6 0-12 5.4-12 12z"],
- "arrow-alt-circle-left": [512, 512, [], "f359", "M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zm116-292H256v-70.9c0-10.7-13-16.1-20.5-8.5L121.2 247.5c-4.7 4.7-4.7 12.2 0 16.9l114.3 114.9c7.6 7.6 20.5 2.2 20.5-8.5V300h116c6.6 0 12-5.4 12-12v-64c0-6.6-5.4-12-12-12z"],
- "arrow-alt-circle-right": [512, 512, [], "f35a", "M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zM140 300h116v70.9c0 10.7 13 16.1 20.5 8.5l114.3-114.9c4.7-4.7 4.7-12.2 0-16.9l-114.3-115c-7.6-7.6-20.5-2.2-20.5 8.5V212H140c-6.6 0-12 5.4-12 12v64c0 6.6 5.4 12 12 12z"],
- "arrow-alt-circle-up": [512, 512, [], "f35b", "M8 256C8 119 119 8 256 8s248 111 248 248-111 248-248 248S8 393 8 256zm292 116V256h70.9c10.7 0 16.1-13 8.5-20.5L264.5 121.2c-4.7-4.7-12.2-4.7-16.9 0l-115 114.3c-7.6 7.6-2.2 20.5 8.5 20.5H212v116c0 6.6 5.4 12 12 12h64c6.6 0 12-5.4 12-12z"],
- "arrow-circle-down": [512, 512, [], "f0ab", "M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-143.6-28.9L288 302.6V120c0-13.3-10.7-24-24-24h-16c-13.3 0-24 10.7-24 24v182.6l-72.4-75.5c-9.3-9.7-24.8-9.9-34.3-.4l-10.9 11c-9.4 9.4-9.4 24.6 0 33.9L239 404.3c9.4 9.4 24.6 9.4 33.9 0l132.7-132.7c9.4-9.4 9.4-24.6 0-33.9l-10.9-11c-9.5-9.5-25-9.3-34.3.4z"],
- "arrow-circle-left": [512, 512, [], "f0a8", "M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zm28.9-143.6L209.4 288H392c13.3 0 24-10.7 24-24v-16c0-13.3-10.7-24-24-24H209.4l75.5-72.4c9.7-9.3 9.9-24.8.4-34.3l-11-10.9c-9.4-9.4-24.6-9.4-33.9 0L107.7 239c-9.4 9.4-9.4 24.6 0 33.9l132.7 132.7c9.4 9.4 24.6 9.4 33.9 0l11-10.9c9.5-9.5 9.3-25-.4-34.3z"],
- "arrow-circle-right": [512, 512, [], "f0a9", "M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zm-28.9 143.6l75.5 72.4H120c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h182.6l-75.5 72.4c-9.7 9.3-9.9 24.8-.4 34.3l11 10.9c9.4 9.4 24.6 9.4 33.9 0L404.3 273c9.4-9.4 9.4-24.6 0-33.9L271.6 106.3c-9.4-9.4-24.6-9.4-33.9 0l-11 10.9c-9.5 9.6-9.3 25.1.4 34.4z"],
- "arrow-circle-up": [512, 512, [], "f0aa", "M8 256C8 119 119 8 256 8s248 111 248 248-111 248-248 248S8 393 8 256zm143.6 28.9l72.4-75.5V392c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V209.4l72.4 75.5c9.3 9.7 24.8 9.9 34.3.4l10.9-11c9.4-9.4 9.4-24.6 0-33.9L273 107.7c-9.4-9.4-24.6-9.4-33.9 0L106.3 240.4c-9.4 9.4-9.4 24.6 0 33.9l10.9 11c9.6 9.5 25.1 9.3 34.4-.4z"],
- "arrow-down": [448, 512, [], "f063", "M413.1 222.5l22.2 22.2c9.4 9.4 9.4 24.6 0 33.9L241 473c-9.4 9.4-24.6 9.4-33.9 0L12.7 278.6c-9.4-9.4-9.4-24.6 0-33.9l22.2-22.2c9.5-9.5 25-9.3 34.3.4L184 343.4V56c0-13.3 10.7-24 24-24h32c13.3 0 24 10.7 24 24v287.4l114.8-120.5c9.3-9.8 24.8-10 34.3-.4z"],
- "arrow-left": [448, 512, [], "f060", "M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"],
- "arrow-right": [448, 512, [], "f061", "M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"],
- "arrow-up": [448, 512, [], "f062", "M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9L413 289.4c-9.5 9.5-25 9.3-34.3-.4L264 168.6V456c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24V168.6L69.2 289.1c-9.3 9.8-24.8 10-34.3.4z"],
- "arrows-alt": [512, 512, [], "f0b2", "M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"],
- "arrows-alt-h": [512, 512, [], "f337", "M377.941 169.941V216H134.059v-46.059c0-21.382-25.851-32.09-40.971-16.971L7.029 239.029c-9.373 9.373-9.373 24.568 0 33.941l86.059 86.059c15.119 15.119 40.971 4.411 40.971-16.971V296h243.882v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.568 0-33.941l-86.059-86.059c-15.119-15.12-40.971-4.412-40.971 16.97z"],
- "arrows-alt-v": [256, 512, [], "f338", "M214.059 377.941H168V134.059h46.059c21.382 0 32.09-25.851 16.971-40.971L144.971 7.029c-9.373-9.373-24.568-9.373-33.941 0L24.971 93.088c-15.119 15.119-4.411 40.971 16.971 40.971H88v243.882H41.941c-21.382 0-32.09 25.851-16.971 40.971l86.059 86.059c9.373 9.373 24.568 9.373 33.941 0l86.059-86.059c15.12-15.119 4.412-40.971-16.97-40.971z"],
- "assistive-listening-systems": [512, 512, [], "f2a2", "M216 260c0 15.464-12.536 28-28 28s-28-12.536-28-28c0-44.112 35.888-80 80-80s80 35.888 80 80c0 15.464-12.536 28-28 28s-28-12.536-28-28c0-13.234-10.767-24-24-24s-24 10.766-24 24zm24-176c-97.047 0-176 78.953-176 176 0 15.464 12.536 28 28 28s28-12.536 28-28c0-66.168 53.832-120 120-120s120 53.832 120 120c0 75.164-71.009 70.311-71.997 143.622L288 404c0 28.673-23.327 52-52 52-15.464 0-28 12.536-28 28s12.536 28 28 28c59.475 0 107.876-48.328 108-107.774.595-34.428 72-48.24 72-144.226 0-97.047-78.953-176-176-176zm-80 236c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zM32 448c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm480-187.993c0-1.518-.012-3.025-.045-4.531C510.076 140.525 436.157 38.47 327.994 1.511c-14.633-4.998-30.549 2.809-35.55 17.442-5 14.633 2.81 30.549 17.442 35.55 85.906 29.354 144.61 110.513 146.077 201.953l.003.188c.026 1.118.033 2.236.033 3.363 0 15.464 12.536 28 28 28s28.001-12.536 28.001-28zM152.971 439.029l-80-80L39.03 392.97l80 80 33.941-33.941z"],
- "asterisk": [512, 512, [], "f069", "M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"],
- "at": [512, 512, [], "f1fa", "M256 8C118.941 8 8 118.919 8 256c0 137.059 110.919 248 248 248 48.154 0 95.342-14.14 135.408-40.223 12.005-7.815 14.625-24.288 5.552-35.372l-10.177-12.433c-7.671-9.371-21.179-11.667-31.373-5.129C325.92 429.757 291.314 440 256 440c-101.458 0-184-82.542-184-184S154.542 72 256 72c100.139 0 184 57.619 184 160 0 38.786-21.093 79.742-58.17 83.693-17.349-.454-16.91-12.857-13.476-30.024l23.433-121.11C394.653 149.75 383.308 136 368.225 136h-44.981a13.518 13.518 0 0 0-13.432 11.993l-.01.092c-14.697-17.901-40.448-21.775-59.971-21.775-74.58 0-137.831 62.234-137.831 151.46 0 65.303 36.785 105.87 96 105.87 26.984 0 57.369-15.637 74.991-38.333 9.522 34.104 40.613 34.103 70.71 34.103C462.609 379.41 504 307.798 504 232 504 95.653 394.023 8 256 8zm-21.68 304.43c-22.249 0-36.07-15.623-36.07-40.771 0-44.993 30.779-72.729 58.63-72.729 22.292 0 35.601 15.241 35.601 40.77 0 45.061-33.875 72.73-58.161 72.73z"],
- "audio-description": [512, 512, [], "f29e", "M162.925 238.709l8.822 30.655h-25.606l9.041-30.652c1.277-4.421 2.651-9.994 3.872-15.245 1.22 5.251 2.594 10.823 3.871 15.242zm166.474-32.099h-14.523v98.781h14.523c29.776 0 46.175-17.678 46.175-49.776 0-32.239-17.49-49.005-46.175-49.005zM512 112v288c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48zM245.459 336.139l-57.097-168A12.001 12.001 0 0 0 177 160h-35.894a12.001 12.001 0 0 0-11.362 8.139l-57.097 168C70.003 343.922 75.789 352 84.009 352h29.133a12 12 0 0 0 11.535-8.693l8.574-29.906h51.367l8.793 29.977A12 12 0 0 0 204.926 352h29.172c8.22 0 14.006-8.078 11.361-15.861zm184.701-80.525c0-58.977-37.919-95.614-98.96-95.614h-57.366c-6.627 0-12 5.373-12 12v168c0 6.627 5.373 12 12 12H331.2c61.041 0 98.96-36.933 98.96-96.386z"],
- "backward": [512, 512, [], "f04a", "M11.5 280.6l192 160c20.6 17.2 52.5 2.8 52.5-24.6V96c0-27.4-31.9-41.8-52.5-24.6l-192 160c-15.3 12.8-15.3 36.4 0 49.2zm256 0l192 160c20.6 17.2 52.5 2.8 52.5-24.6V96c0-27.4-31.9-41.8-52.5-24.6l-192 160c-15.3 12.8-15.3 36.4 0 49.2z"],
- "balance-scale": [640, 512, [], "f24e", "M352 448h168c13.255 0 24 10.745 24 24v16c0 13.255-10.745 24-24 24H120c-13.255 0-24-10.745-24-24v-16c0-13.255 10.745-24 24-24h168V153.324C264.469 143.04 246.836 121.778 241.603 96H120c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h135.999C270.594 12.57 293.828 0 320 0s49.406 12.57 64.001 32H520c13.255 0 24 10.745 24 24v16c0 13.255-10.745 24-24 24H398.397c-5.233 25.778-22.866 47.04-46.397 57.324V448zm287.981-112c.001-16.182 1.342-8.726-85.048-181.506-17.647-35.294-68.186-35.358-85.865 0C381.94 328.75 384.019 320.331 384.019 336H384c0 44.183 57.308 80 128 80s128-35.817 128-80h-.019zM512 176l72 144H440l72-144zM255.981 336c.001-16.182 1.342-8.726-85.048-181.506-17.647-35.294-68.186-35.358-85.865 0C-2.06 328.75.019 320.331.019 336H0c0 44.183 57.308 80 128 80s128-35.817 128-80h-.019zM128 176l72 144H56l72-144z"],
- "ban": [512, 512, [], "f05e", "M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z"],
- "barcode": [512, 512, [], "f02a", "M0 448V64h18v384H0zm26.857-.273V64H36v383.727h-9.143zm27.143 0V64h8.857v383.727H54zm44.857 0V64h8.857v383.727h-8.857zm36 0V64h17.714v383.727h-17.714zm44.857 0V64h8.857v383.727h-8.857zm18 0V64h8.857v383.727h-8.857zm18 0V64h8.857v383.727h-8.857zm35.715 0V64h18v383.727h-18zm44.857 0V64h18v383.727h-18zm35.999 0V64h18.001v383.727h-18.001zm36.001 0V64h18.001v383.727h-18.001zm26.857 0V64h18v383.727h-18zm45.143 0V64h26.857v383.727h-26.857zm35.714 0V64h9.143v383.727H476zm18 .273V64h18v384h-18z"],
- "bars": [448, 512, [], "f0c9", "M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"],
- "bath": [512, 512, [], "f2cd", "M488 256H80V112c0-17.645 14.355-32 32-32 11.351 0 21.332 5.945 27.015 14.88-16.492 25.207-14.687 59.576 6.838 83.035-4.176 4.713-4.021 11.916.491 16.428l11.314 11.314c4.686 4.686 12.284 4.686 16.971 0l95.03-95.029c4.686-4.686 4.686-12.284 0-16.971l-11.314-11.314c-4.512-4.512-11.715-4.666-16.428-.491-17.949-16.469-42.294-21.429-64.178-15.365C163.281 45.667 139.212 32 112 32c-44.112 0-80 35.888-80 80v144h-8c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h8v32c0 28.43 12.362 53.969 32 71.547V456c0 13.255 10.745 24 24 24h16c13.255 0 24-10.745 24-24v-8h256v8c0 13.255 10.745 24 24 24h16c13.255 0 24-10.745 24-24v-32.453c19.638-17.578 32-43.117 32-71.547v-32h8c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24z"],
- "battery-empty": [640, 512, [], "f244", "M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48z"],
- "battery-full": [640, 512, [], "f240", "M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48zm-48 96H96v128h416V192z"],
- "battery-half": [640, 512, [], "f242", "M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48zm-240 96H96v128h224V192z"],
- "battery-quarter": [640, 512, [], "f243", "M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48zm-336 96H96v128h128V192z"],
- "battery-three-quarters": [640, 512, [], "f241", "M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48zm-144 96H96v128h320V192z"],
- "bed": [576, 512, [], "f236", "M552 288c13.255 0 24 10.745 24 24v136h-96v-64H96v64H0V88c0-13.255 10.745-24 24-24h48c13.255 0 24 10.745 24 24v200h456zM192 96c-44.183 0-80 35.817-80 80s35.817 80 80 80 80-35.817 80-80-35.817-80-80-80zm384 128c0-53.019-42.981-96-96-96H312c-13.255 0-24 10.745-24 24v104h288v-32z"],
- "beer": [448, 512, [], "f0fc", "M368 96h-48V56c0-13.255-10.745-24-24-24H24C10.745 32 0 42.745 0 56v400c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24v-42.11l80.606-35.977C429.396 365.063 448 336.388 448 304.86V176c0-44.112-35.888-80-80-80zm16 208.86a16.018 16.018 0 0 1-9.479 14.611L320 343.805V160h48c8.822 0 16 7.178 16 16v128.86zM208 384c-8.836 0-16-7.164-16-16V144c0-8.836 7.164-16 16-16s16 7.164 16 16v224c0 8.836-7.164 16-16 16zm-96 0c-8.836 0-16-7.164-16-16V144c0-8.836 7.164-16 16-16s16 7.164 16 16v224c0 8.836-7.164 16-16 16z"],
- "bell": [448, 512, [], "f0f3", "M433.884 366.059C411.634 343.809 384 316.118 384 208c0-79.394-57.831-145.269-133.663-157.83A31.845 31.845 0 0 0 256 32c0-17.673-14.327-32-32-32s-32 14.327-32 32c0 6.75 2.095 13.008 5.663 18.17C121.831 62.731 64 128.606 64 208c0 108.118-27.643 135.809-49.893 158.059C-16.042 396.208 5.325 448 48.048 448H160c0 35.346 28.654 64 64 64s64-28.654 64-64h111.943c42.638 0 64.151-51.731 33.941-81.941zM224 472a8 8 0 0 1 0 16c-22.056 0-40-17.944-40-40h16c0 13.234 10.766 24 24 24z"],
- "bell-slash": [576, 512, [], "f1f6", "M78.107 366.059C47.958 396.208 69.325 448 112.048 448H224c0 35.346 28.654 64 64 64 35.346 0 64-28.654 64-64h32.685L127.848 221.379c-2.198 97.078-28.439 123.378-49.741 144.68zM264 448c0 13.234 10.766 24 24 24a8 8 0 0 1 0 16c-22.056 0-40-17.944-40-40h16zm305.896 43.733l-10.762 12.086c-8.915 10.012-24.333 10.967-34.437 2.133L8.256 54.393C-1.848 45.558-2.811 30.28 6.104 20.267L16.865 8.181C25.781-1.831 41.199-2.786 51.303 6.049l113.81 99.512c24.017-28.778 57.946-48.996 96.55-55.39A31.85 31.85 0 0 1 256 32c0-17.673 14.327-32 32-32s32 14.327 32 32c0 6.75-2.095 13.008-5.663 18.17C390.169 62.731 448 128.606 448 208c0 108.118 27.634 135.809 49.884 158.059 12.149 12.149 15.923 27.776 13.33 42.121l56.53 49.427c10.104 8.835 11.067 24.113 2.152 34.126z"],
- "bicycle": [640, 512, [], "f206", "M512.509 192.001c-16.373-.064-32.03 2.955-46.436 8.495l-77.68-125.153A24 24 0 0 0 368.001 64h-64c-8.837 0-16 7.163-16 16v16c0 8.837 7.163 16 16 16h50.649l14.896 24H256.002v-16c0-8.837-7.163-16-16-16h-87.459c-13.441 0-24.777 10.999-24.536 24.437.232 13.044 10.876 23.563 23.995 23.563h48.726l-29.417 47.52c-13.433-4.83-27.904-7.483-42.992-7.52C58.094 191.83.412 249.012.002 319.236-.413 390.279 57.055 448 128.002 448c59.642 0 109.758-40.793 123.967-96h52.033a24 24 0 0 0 20.406-11.367L410.37 201.77l14.938 24.067c-25.455 23.448-41.385 57.081-41.307 94.437.145 68.833 57.899 127.051 126.729 127.719 70.606.685 128.181-55.803 129.255-125.996 1.086-70.941-56.526-129.72-127.476-129.996zM186.75 265.772c9.727 10.529 16.673 23.661 19.642 38.228h-43.306l23.664-38.228zM128.002 400c-44.112 0-80-35.888-80-80s35.888-80 80-80c5.869 0 11.586.653 17.099 1.859l-45.505 73.509C89.715 331.327 101.213 352 120.002 352h81.3c-12.37 28.225-40.562 48-73.3 48zm162.63-96h-35.624c-3.96-31.756-19.556-59.894-42.383-80.026L237.371 184h127.547l-74.286 120zm217.057 95.886c-41.036-2.165-74.049-35.692-75.627-76.755-.812-21.121 6.633-40.518 19.335-55.263l44.433 71.586c4.66 7.508 14.524 9.816 22.032 5.156l13.594-8.437c7.508-4.66 9.817-14.524 5.156-22.032l-44.468-71.643a79.901 79.901 0 0 1 19.858-2.497c44.112 0 80 35.888 80 80-.001 45.54-38.252 82.316-84.313 79.885z"],
- "binoculars": [512, 512, [], "f1e5", "M192 104H96V56c0-13.255 10.745-24 24-24h48c13.255 0 24 10.745 24 24v48zm224-48c0-13.255-10.745-24-24-24h-48c-13.255 0-24 10.745-24 24v48h96V56zM0 456c0 13.255 10.745 24 24 24h120c13.255 0 24-10.745 24-24v-16H0v16zm88-328c-13.255 0-24 10.745-24 24C64 256 0 272 0 416h168V312c0-13.255 10.745-24 24-24V128H88zm256 328c0 13.255 10.745 24 24 24h120c13.255 0 24-10.745 24-24v-16H344v16zM216 128v160h80V128h-80zm128 288h168c0-144-64-160-64-264 0-13.255-10.745-24-24-24H320v160c13.255 0 24 10.745 24 24v104z"],
- "birthday-cake": [448, 512, [], "f1fd", "M448 384c-28.02 0-31.26-32-74.5-32-43.43 0-46.825 32-74.75 32-27.695 0-31.454-32-74.75-32-42.842 0-47.218 32-74.5 32-28.148 0-31.202-32-74.75-32-43.547 0-46.653 32-74.75 32v-80c0-26.5 21.5-48 48-48h16V112h64v144h64V112h64v144h64V112h64v144h16c26.5 0 48 21.5 48 48v80zm0 128H0v-96c43.356 0 46.767-32 74.75-32 27.951 0 31.253 32 74.75 32 42.843 0 47.217-32 74.5-32 28.148 0 31.201 32 74.75 32 43.357 0 46.767-32 74.75-32 27.488 0 31.252 32 74.5 32v96zM96 96c-17.75 0-32-14.25-32-32 0-31 32-23 32-64 12 0 32 29.5 32 56s-14.25 40-32 40zm128 0c-17.75 0-32-14.25-32-32 0-31 32-23 32-64 12 0 32 29.5 32 56s-14.25 40-32 40zm128 0c-17.75 0-32-14.25-32-32 0-31 32-23 32-64 12 0 32 29.5 32 56s-14.25 40-32 40z"],
- "blind": [384, 512, [], "f29d", "M380.15 510.837a8 8 0 0 1-10.989-2.687l-125.33-206.427a31.923 31.923 0 0 0 12.958-9.485l126.048 207.608a8 8 0 0 1-2.687 10.991zM142.803 314.338l-32.54 89.485 36.12 88.285c6.693 16.36 25.377 24.192 41.733 17.501 16.357-6.692 24.193-25.376 17.501-41.734l-62.814-153.537zM96 88c24.301 0 44-19.699 44-44S120.301 0 96 0 52 19.699 52 44s19.699 44 44 44zm154.837 169.128l-120-152c-4.733-5.995-11.75-9.108-18.837-9.112V96H80v.026c-7.146.003-14.217 3.161-18.944 9.24L0 183.766v95.694c0 13.455 11.011 24.791 24.464 24.536C37.505 303.748 48 293.1 48 280v-79.766l16-20.571v140.698L9.927 469.055c-6.04 16.609 2.528 34.969 19.138 41.009 16.602 6.039 34.968-2.524 41.009-19.138L136 309.638V202.441l-31.406-39.816a4 4 0 1 1 6.269-4.971l102.3 129.217c9.145 11.584 24.368 11.339 33.708 3.965 10.41-8.216 12.159-23.334 3.966-33.708z"],
- "bold": [384, 512, [], "f032", "M304.793 243.891c33.639-18.537 53.657-54.16 53.657-95.693 0-48.236-26.25-87.626-68.626-104.179C265.138 34.01 240.849 32 209.661 32H24c-8.837 0-16 7.163-16 16v33.049c0 8.837 7.163 16 16 16h33.113v318.53H24c-8.837 0-16 7.163-16 16V464c0 8.837 7.163 16 16 16h195.69c24.203 0 44.834-1.289 66.866-7.584C337.52 457.193 376 410.647 376 350.014c0-52.168-26.573-91.684-71.207-106.123zM142.217 100.809h67.444c16.294 0 27.536 2.019 37.525 6.717 15.828 8.479 24.906 26.502 24.906 49.446 0 35.029-20.32 56.79-53.029 56.79h-76.846V100.809zm112.642 305.475c-10.14 4.056-22.677 4.907-31.409 4.907h-81.233V281.943h84.367c39.645 0 63.057 25.38 63.057 63.057.001 28.425-13.66 52.483-34.782 61.284z"],
- "bolt": [320, 512, [], "f0e7", "M295.973 160H180.572L215.19 30.184C219.25 14.956 207.756 0 192 0H56C43.971 0 33.8 8.905 32.211 20.828l-31.996 240C-1.704 275.217 9.504 288 24.004 288h118.701L96.646 482.466C93.05 497.649 104.659 512 119.992 512c8.35 0 16.376-4.374 20.778-11.978l175.973-303.997c9.244-15.967-2.288-36.025-20.77-36.025z"],
- "bomb": [512, 512, [], "f1e2", "M440.5 88.5l-52 52L415 167c9.4 9.4 9.4 24.6 0 33.9l-17.4 17.4c11.8 26.1 18.4 55.1 18.4 85.6 0 114.9-93.1 208-208 208S0 418.9 0 304 93.1 96 208 96c30.5 0 59.5 6.6 85.6 18.4L311 97c9.4-9.4 24.6-9.4 33.9 0l26.5 26.5 52-52 17.1 17zM500 60h-24c-6.6 0-12 5.4-12 12s5.4 12 12 12h24c6.6 0 12-5.4 12-12s-5.4-12-12-12zM440 0c-6.6 0-12 5.4-12 12v24c0 6.6 5.4 12 12 12s12-5.4 12-12V12c0-6.6-5.4-12-12-12zm33.9 55l17-17c4.7-4.7 4.7-12.3 0-17-4.7-4.7-12.3-4.7-17 0l-17 17c-4.7 4.7-4.7 12.3 0 17 4.8 4.7 12.4 4.7 17 0zm-67.8 0c4.7 4.7 12.3 4.7 17 0 4.7-4.7 4.7-12.3 0-17l-17-17c-4.7-4.7-12.3-4.7-17 0-4.7 4.7-4.7 12.3 0 17l17 17zm67.8 34c-4.7-4.7-12.3-4.7-17 0-4.7 4.7-4.7 12.3 0 17l17 17c4.7 4.7 12.3 4.7 17 0 4.7-4.7 4.7-12.3 0-17l-17-17zM112 272c0-35.3 28.7-64 64-64 8.8 0 16-7.2 16-16s-7.2-16-16-16c-52.9 0-96 43.1-96 96 0 8.8 7.2 16 16 16s16-7.2 16-16z"],
- "book": [448, 512, [], "f02d", "M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"],
- "bookmark": [384, 512, [], "f02e", "M0 512V48C0 21.49 21.49 0 48 0h288c26.51 0 48 21.49 48 48v464L192 400 0 512z"],
- "braille": [640, 512, [], "f2a1", "M128 256c0 35.346-28.654 64-64 64S0 291.346 0 256s28.654-64 64-64 64 28.654 64 64zM64 384c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-352C28.654 32 0 60.654 0 96s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zm160 192c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0 160c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-352c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zm224 192c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0 160c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-352c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zm160 192c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0 160c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-320c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32z"],
- "briefcase": [512, 512, [], "f0b1", "M320 288h192v144c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V288h192v20c0 6.627 5.373 12 12 12h104c6.627 0 12-5.373 12-12v-20zm192-112v80H0v-80c0-26.51 21.49-48 48-48h80V80c0-26.51 21.49-48 48-48h160c26.51 0 48 21.49 48 48v48h80c26.51 0 48 21.49 48 48zM320 96H192v32h128V96z"],
- "bug": [512, 512, [], "f188", "M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"],
- "building": [448, 512, [], "f1ad", "M436 480h-20V24c0-13.255-10.745-24-24-24H56C42.745 0 32 10.745 32 24v456H12c-6.627 0-12 5.373-12 12v20h448v-20c0-6.627-5.373-12-12-12zM128 76c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12V76zm0 96c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40zm52 148h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12zm76 160h-64v-84c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v84zm64-172c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40zm0-96c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40zm0-96c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12V76c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40z"],
- "bullhorn": [576, 512, [], "f0a1", "M576 224c0-20.896-13.36-38.666-32-45.258V64c0-35.346-28.654-64-64-64-64.985 56-142.031 128-272 128H48c-26.51 0-48 21.49-48 48v96c0 26.51 21.49 48 48 48h43.263c-18.742 64.65 2.479 116.379 18.814 167.44 1.702 5.32 5.203 9.893 9.922 12.88 20.78 13.155 68.355 15.657 93.773 5.151 16.046-6.633 19.96-27.423 7.522-39.537-18.508-18.026-30.136-36.91-19.795-60.858a12.278 12.278 0 0 0-1.045-11.673c-16.309-24.679-3.581-62.107 28.517-72.752C346.403 327.887 418.591 395.081 480 448c35.346 0 64-28.654 64-64V269.258c18.64-6.592 32-24.362 32-45.258zm-96 139.855c-54.609-44.979-125.033-92.94-224-104.982v-69.747c98.967-12.042 169.391-60.002 224-104.982v279.711z"],
- "bullseye": [512, 512, [], "f140", "M256 72c101.689 0 184 82.295 184 184 0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-101.689 82.295-184 184-184m0-64C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 184c35.29 0 64 28.71 64 64s-28.71 64-64 64-64-28.71-64-64 28.71-64 64-64m0-64c-70.692 0-128 57.308-128 128s57.308 128 128 128 128-57.308 128-128-57.308-128-128-128z"],
- "bus": [512, 512, [], "f207", "M512 152v80c0 13.255-10.745 24-24 24h-8v168c0 13.255-10.745 24-24 24h-8v40c0 13.255-10.745 24-24 24h-48c-13.255 0-24-10.745-24-24v-40H160v40c0 13.255-10.745 24-24 24H88c-13.255 0-24-10.745-24-24v-40h-8c-13.255 0-24-10.745-24-24V256h-8c-13.255 0-24-10.745-24-24v-80c0-13.255 10.745-24 24-24h8V80C32 35.817 132.288 0 256 0s224 35.817 224 80v48h8c13.255 0 24 10.745 24 24zM112 320c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm288 0c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm32-56V120c0-13.255-10.745-24-24-24H104c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h304c13.255 0 24-10.745 24-24z"],
- "calculator": [448, 512, [], "f1ec", "M0 464V48C0 21.49 21.49 0 48 0h352c26.51 0 48 21.49 48 48v416c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48zm384-284V76c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v104c0 6.627 5.373 12 12 12h296c6.627 0 12-5.373 12-12zM128 308v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm256 128V268c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v168c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-256 0v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm128-128v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm0 128v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"],
- "calendar": [448, 512, [], "f133", "M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z"],
- "calendar-alt": [448, 512, [], "f073", "M436 160H12c-6.6 0-12-5.4-12-12v-36c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48v36c0 6.6-5.4 12-12 12zM12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm116 204c0-6.6-5.4-12-12-12H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-40zm0-128c0-6.6-5.4-12-12-12H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-40zm128 128c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-40zm0-128c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-40zm128 128c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-40zm0-128c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-40z"],
- "calendar-check": [448, 512, [], "f274", "M436 160H12c-6.627 0-12-5.373-12-12v-36c0-26.51 21.49-48 48-48h48V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h128V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h48c26.51 0 48 21.49 48 48v36c0 6.627-5.373 12-12 12zM12 192h424c6.627 0 12 5.373 12 12v260c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V204c0-6.627 5.373-12 12-12zm333.296 95.947l-28.169-28.398c-4.667-4.705-12.265-4.736-16.97-.068L194.12 364.665l-45.98-46.352c-4.667-4.705-12.266-4.736-16.971-.068l-28.397 28.17c-4.705 4.667-4.736 12.265-.068 16.97l82.601 83.269c4.667 4.705 12.265 4.736 16.97.068l142.953-141.805c4.705-4.667 4.736-12.265.068-16.97z"],
- "calendar-minus": [448, 512, [], "f272", "M436 160H12c-6.6 0-12-5.4-12-12v-36c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48v36c0 6.6-5.4 12-12 12zM12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm304 192c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12H132c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h184z"],
- "calendar-plus": [448, 512, [], "f271", "M436 160H12c-6.6 0-12-5.4-12-12v-36c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48v36c0 6.6-5.4 12-12 12zM12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm316 140c0-6.6-5.4-12-12-12h-60v-60c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v60h-60c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h60v60c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-60h60c6.6 0 12-5.4 12-12v-40z"],
- "calendar-times": [448, 512, [], "f273", "M436 160H12c-6.6 0-12-5.4-12-12v-36c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48v36c0 6.6-5.4 12-12 12zM12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm257.3 160l48.1-48.1c4.7-4.7 4.7-12.3 0-17l-28.3-28.3c-4.7-4.7-12.3-4.7-17 0L224 306.7l-48.1-48.1c-4.7-4.7-12.3-4.7-17 0l-28.3 28.3c-4.7 4.7-4.7 12.3 0 17l48.1 48.1-48.1 48.1c-4.7 4.7-4.7 12.3 0 17l28.3 28.3c4.7 4.7 12.3 4.7 17 0l48.1-48.1 48.1 48.1c4.7 4.7 12.3 4.7 17 0l28.3-28.3c4.7-4.7 4.7-12.3 0-17L269.3 352z"],
- "camera": [512, 512, [], "f030", "M512 144v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48h88l12.3-32.9c7-18.7 24.9-31.1 44.9-31.1h125.5c20 0 37.9 12.4 44.9 31.1L376 96h88c26.5 0 48 21.5 48 48zM376 288c0-66.2-53.8-120-120-120s-120 53.8-120 120 53.8 120 120 120 120-53.8 120-120zm-32 0c0 48.5-39.5 88-88 88s-88-39.5-88-88 39.5-88 88-88 88 39.5 88 88z"],
- "camera-retro": [512, 512, [], "f083", "M48 32C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48H48zm0 32h106c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H38c-3.3 0-6-2.7-6-6V80c0-8.8 7.2-16 16-16zm426 96H38c-3.3 0-6-2.7-6-6v-36c0-3.3 2.7-6 6-6h138l30.2-45.3c1.1-1.7 3-2.7 5-2.7H464c8.8 0 16 7.2 16 16v74c0 3.3-2.7 6-6 6zM256 424c-66.2 0-120-53.8-120-120s53.8-120 120-120 120 53.8 120 120-53.8 120-120 120zm0-208c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm-48 104c-8.8 0-16-7.2-16-16 0-35.3 28.7-64 64-64 8.8 0 16 7.2 16 16s-7.2 16-16 16c-17.6 0-32 14.4-32 32 0 8.8-7.2 16-16 16z"],
- "car": [512, 512, [], "f1b9", "M499.991 168h-54.815l-7.854-20.944c-9.192-24.513-25.425-45.351-46.942-60.263S343.651 64 317.472 64H194.528c-26.18 0-51.391 7.882-72.908 22.793-21.518 14.912-37.75 35.75-46.942 60.263L66.824 168H12.009c-8.191 0-13.974 8.024-11.384 15.795l8 24A12 12 0 0 0 20.009 216h28.815l-.052.14C29.222 227.093 16 247.997 16 272v48c0 16.225 6.049 31.029 16 42.309V424c0 13.255 10.745 24 24 24h48c13.255 0 24-10.745 24-24v-40h256v40c0 13.255 10.745 24 24 24h48c13.255 0 24-10.745 24-24v-61.691c9.951-11.281 16-26.085 16-42.309v-48c0-24.003-13.222-44.907-32.772-55.86l-.052-.14h28.815a12 12 0 0 0 11.384-8.205l8-24c2.59-7.771-3.193-15.795-11.384-15.795zm-365.388 1.528C143.918 144.689 168 128 194.528 128h122.944c26.528 0 50.61 16.689 59.925 41.528L391.824 208H120.176l14.427-38.472zM88 328c-17.673 0-32-14.327-32-32 0-17.673 14.327-32 32-32s48 30.327 48 48-30.327 16-48 16zm336 0c-17.673 0-48 1.673-48-16 0-17.673 30.327-48 48-48s32 14.327 32 32c0 17.673-14.327 32-32 32z"],
- "caret-down": [320, 512, [], "f0d7", "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"],
- "caret-left": [192, 512, [], "f0d9", "M192 127.338v257.324c0 17.818-21.543 26.741-34.142 14.142L29.196 270.142c-7.81-7.81-7.81-20.474 0-28.284l128.662-128.662c12.599-12.6 34.142-3.676 34.142 14.142z"],
- "caret-right": [192, 512, [], "f0da", "M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"],
- "caret-square-down": [448, 512, [], "f150", "M448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zM92.5 220.5l123 123c4.7 4.7 12.3 4.7 17 0l123-123c7.6-7.6 2.2-20.5-8.5-20.5H101c-10.7 0-16.1 12.9-8.5 20.5z"],
- "caret-square-left": [448, 512, [], "f191", "M400 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zM259.515 124.485l-123.03 123.03c-4.686 4.686-4.686 12.284 0 16.971l123.029 123.029c7.56 7.56 20.485 2.206 20.485-8.485V132.971c.001-10.691-12.925-16.045-20.484-8.486z"],
- "caret-square-right": [448, 512, [], "f152", "M48 32h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48zm140.485 355.515l123.029-123.029c4.686-4.686 4.686-12.284 0-16.971l-123.029-123.03c-7.56-7.56-20.485-2.206-20.485 8.485v246.059c0 10.691 12.926 16.045 20.485 8.486z"],
- "caret-square-up": [448, 512, [], "f151", "M0 432V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48zm355.515-140.485l-123.03-123.03c-4.686-4.686-12.284-4.686-16.971 0L92.485 291.515c-7.56 7.56-2.206 20.485 8.485 20.485h246.059c10.691 0 16.045-12.926 8.486-20.485z"],
- "caret-up": [320, 512, [], "f0d8", "M288.662 352H31.338c-17.818 0-26.741-21.543-14.142-34.142l128.662-128.662c7.81-7.81 20.474-7.81 28.284 0l128.662 128.662c12.6 12.599 3.676 34.142-14.142 34.142z"],
- "cart-arrow-down": [576, 512, [], "f218", "M504.717 320H211.572l6.545 32h268.418c15.401 0 26.816 14.301 23.403 29.319l-5.517 24.276C523.112 414.668 536 433.828 536 456c0 31.202-25.519 56.444-56.824 55.994-29.823-.429-54.35-24.631-55.155-54.447-.44-16.287 6.085-31.049 16.803-41.548H231.176C241.553 426.165 248 440.326 248 456c0 31.813-26.528 57.431-58.67 55.938-28.54-1.325-51.751-24.385-53.251-52.917-1.158-22.034 10.436-41.455 28.051-51.586L93.883 64H24C10.745 64 0 53.255 0 40V24C0 10.745 10.745 0 24 0h102.529c11.401 0 21.228 8.021 23.513 19.19L159.208 64H551.99c15.401 0 26.816 14.301 23.403 29.319l-47.273 208C525.637 312.246 515.923 320 504.717 320zM403.029 192H360v-60c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v60h-43.029c-10.691 0-16.045 12.926-8.485 20.485l67.029 67.029c4.686 4.686 12.284 4.686 16.971 0l67.029-67.029c7.559-7.559 2.205-20.485-8.486-20.485z"],
- "cart-plus": [576, 512, [], "f217", "M504.717 320H211.572l6.545 32h268.418c15.401 0 26.816 14.301 23.403 29.319l-5.517 24.276C523.112 414.668 536 433.828 536 456c0 31.202-25.519 56.444-56.824 55.994-29.823-.429-54.35-24.631-55.155-54.447-.44-16.287 6.085-31.049 16.803-41.548H231.176C241.553 426.165 248 440.326 248 456c0 31.813-26.528 57.431-58.67 55.938-28.54-1.325-51.751-24.385-53.251-52.917-1.158-22.034 10.436-41.455 28.051-51.586L93.883 64H24C10.745 64 0 53.255 0 40V24C0 10.745 10.745 0 24 0h102.529c11.401 0 21.228 8.021 23.513 19.19L159.208 64H551.99c15.401 0 26.816 14.301 23.403 29.319l-47.273 208C525.637 312.246 515.923 320 504.717 320zM408 168h-48v-40c0-8.837-7.163-16-16-16h-16c-8.837 0-16 7.163-16 16v40h-48c-8.837 0-16 7.163-16 16v16c0 8.837 7.163 16 16 16h48v40c0 8.837 7.163 16 16 16h16c8.837 0 16-7.163 16-16v-40h48c8.837 0 16-7.163 16-16v-16c0-8.837-7.163-16-16-16z"],
- "certificate": [512, 512, [], "f0a3", "M458.622 255.92l45.985-45.005c13.708-12.977 7.316-36.039-10.664-40.339l-62.65-15.99 17.661-62.015c4.991-17.838-11.829-34.663-29.661-29.671l-61.994 17.667-15.984-62.671C337.085.197 313.765-6.276 300.99 7.228L256 53.57 211.011 7.229c-12.63-13.351-36.047-7.234-40.325 10.668l-15.984 62.671-61.995-17.667C74.87 57.907 58.056 74.738 63.046 92.572l17.661 62.015-62.65 15.99C.069 174.878-6.31 197.944 7.392 210.915l45.985 45.005-45.985 45.004c-13.708 12.977-7.316 36.039 10.664 40.339l62.65 15.99-17.661 62.015c-4.991 17.838 11.829 34.663 29.661 29.671l61.994-17.667 15.984 62.671c4.439 18.575 27.696 24.018 40.325 10.668L256 458.61l44.989 46.001c12.5 13.488 35.987 7.486 40.325-10.668l15.984-62.671 61.994 17.667c17.836 4.994 34.651-11.837 29.661-29.671l-17.661-62.015 62.65-15.99c17.987-4.302 24.366-27.367 10.664-40.339l-45.984-45.004z"],
- "chart-area": [512, 512, [], "f1fe", "M500 384c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v308h436zM372.7 159.5L288 216l-85.3-113.7c-5.1-6.8-15.5-6.3-19.9 1L96 248v104h384l-89.9-187.8c-3.2-6.5-11.4-8.7-17.4-4.7z"],
- "chart-bar": [512, 512, [], "f080", "M500 384c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v308h436zm-308-44v-72c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v72c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0V204c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v136c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0V140c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v200c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0V108c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v232c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12z"],
- "chart-line": [512, 512, [], "f201", "M500 384c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v308h436zM456 96H344c-21.4 0-32.1 25.9-17 41l32.9 32.9-72 72.9-55.6-55.6c-4.7-4.7-12.2-4.7-16.9 0L96.4 305c-4.7 4.6-4.8 12.2-.2 16.9l28.5 29.4c4.7 4.8 12.4 4.9 17.1.1l82.1-82.1 55.5 55.5c4.7 4.7 12.3 4.7 17 0l109.2-109.2L439 249c15.1 15.1 41 4.4 41-17V120c0-13.3-10.7-24-24-24z"],
- "chart-pie": [576, 512, [], "f200", "M288 12.3V240h227.7c6.9 0 12.3-5.8 12-12.7-6.4-122.4-104.5-220.6-227-227-6.9-.3-12.7 5.1-12.7 12zM552.7 288c6.9 0 12.3 5.8 12 12.7-2.8 53.2-23.2 105.6-61.2 147.8-4.6 5.1-12.6 5.4-17.5.5L325 288h227.7zM401 433c4.8 4.8 4.7 12.8-.4 17.3-42.6 38.4-99 61.7-160.8 61.7C107.6 511.9-.2 403.8 0 271.5.2 143.4 100.8 38.9 227.3 32.3c6.9-.4 12.7 5.1 12.7 12V272l161 161z"],
- "check": [512, 512, [], "f00c", "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"],
- "check-circle": [512, 512, [], "f058", "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"],
- "check-square": [448, 512, [], "f14a", "M400 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zm-204.686-98.059l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.248-16.379-6.249-22.628 0L184 302.745l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.25 16.379 6.25 22.628.001z"],
- "chevron-circle-down": [512, 512, [], "f13a", "M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zM273 369.9l135.5-135.5c9.4-9.4 9.4-24.6 0-33.9l-17-17c-9.4-9.4-24.6-9.4-33.9 0L256 285.1 154.4 183.5c-9.4-9.4-24.6-9.4-33.9 0l-17 17c-9.4 9.4-9.4 24.6 0 33.9L239 369.9c9.4 9.4 24.6 9.4 34 0z"],
- "chevron-circle-left": [512, 512, [], "f137", "M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zM142.1 273l135.5 135.5c9.4 9.4 24.6 9.4 33.9 0l17-17c9.4-9.4 9.4-24.6 0-33.9L226.9 256l101.6-101.6c9.4-9.4 9.4-24.6 0-33.9l-17-17c-9.4-9.4-24.6-9.4-33.9 0L142.1 239c-9.4 9.4-9.4 24.6 0 34z"],
- "chevron-circle-right": [512, 512, [], "f138", "M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zm113.9 231L234.4 103.5c-9.4-9.4-24.6-9.4-33.9 0l-17 17c-9.4 9.4-9.4 24.6 0 33.9L285.1 256 183.5 357.6c-9.4 9.4-9.4 24.6 0 33.9l17 17c9.4 9.4 24.6 9.4 33.9 0L369.9 273c9.4-9.4 9.4-24.6 0-34z"],
- "chevron-circle-up": [512, 512, [], "f139", "M8 256C8 119 119 8 256 8s248 111 248 248-111 248-248 248S8 393 8 256zm231-113.9L103.5 277.6c-9.4 9.4-9.4 24.6 0 33.9l17 17c9.4 9.4 24.6 9.4 33.9 0L256 226.9l101.6 101.6c9.4 9.4 24.6 9.4 33.9 0l17-17c9.4-9.4 9.4-24.6 0-33.9L273 142.1c-9.4-9.4-24.6-9.4-34 0z"],
- "chevron-down": [448, 512, [], "f078", "M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"],
- "chevron-left": [320, 512, [], "f053", "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"],
- "chevron-right": [320, 512, [], "f054", "M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"],
- "chevron-up": [448, 512, [], "f077", "M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"],
- "child": [384, 512, [], "f1ae", "M120 72c0-39.765 32.235-72 72-72s72 32.235 72 72c0 39.764-32.235 72-72 72s-72-32.236-72-72zm254.627 1.373c-12.496-12.497-32.758-12.497-45.254 0L242.745 160H141.254L54.627 73.373c-12.496-12.497-32.758-12.497-45.254 0-12.497 12.497-12.497 32.758 0 45.255L104 213.254V480c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V368h16v112c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V213.254l94.627-94.627c12.497-12.497 12.497-32.757 0-45.254z"],
- "circle": [512, 512, [], "f111", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z"],
- "circle-notch": [512, 512, [], "f1ce", "M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z"],
- "clipboard": [384, 512, [], "f328", "M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z"],
- "clock": [512, 512, [], "f017", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm57.1 350.1L224.9 294c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v137.7l63.5 46.2c5.4 3.9 6.5 11.4 2.6 16.8l-28.2 38.8c-3.9 5.3-11.4 6.5-16.8 2.6z"],
- "clone": [512, 512, [], "f24d", "M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z"],
- "closed-captioning": [512, 512, [], "f20a", "M464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM218.1 287.7c2.8-2.5 7.1-2.1 9.2.9l19.5 27.7c1.7 2.4 1.5 5.6-.5 7.7-53.6 56.8-172.8 32.1-172.8-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7l-17.5 30.5c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2.1 48 51.1 70.5 92.3 32.6zm190.4 0c2.8-2.5 7.1-2.1 9.2.9l19.5 27.7c1.7 2.4 1.5 5.6-.5 7.7-53.5 56.9-172.7 32.1-172.7-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7L420 222.2c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2 0 48 51 70.5 92.2 32.6z"],
- "cloud": [640, 512, [], "f0c2", "M537.585 226.56C541.725 215.836 544 204.184 544 192c0-53.019-42.981-96-96-96-19.729 0-38.065 5.954-53.316 16.159C367.042 64.248 315.288 32 256 32c-88.366 0-160 71.634-160 160 0 2.728.07 5.439.204 8.133C40.171 219.845 0 273.227 0 336c0 79.529 64.471 144 144 144h368c70.692 0 128-57.308 128-128 0-61.93-43.983-113.586-102.415-125.44z"],
- "cloud-download-alt": [640, 512, [], "f381", "M640 352c0 70.692-57.308 128-128 128H144C64.471 480 0 415.529 0 336c0-62.773 40.171-116.155 96.204-135.867A163.68 163.68 0 0 1 96 192c0-88.366 71.634-160 160-160 59.288 0 111.042 32.248 138.684 80.159C409.935 101.954 428.271 96 448 96c53.019 0 96 42.981 96 96 0 12.184-2.275 23.836-6.415 34.56C596.017 238.414 640 290.07 640 352zm-246.627-64H328V176c0-8.837-7.164-16-16-16h-48c-8.836 0-16 7.163-16 16v112h-65.373c-14.254 0-21.393 17.234-11.314 27.314l105.373 105.373c6.248 6.248 16.379 6.248 22.627 0l105.373-105.373c10.08-10.08 2.941-27.314-11.313-27.314z"],
- "cloud-upload-alt": [640, 512, [], "f382", "M640 352c0 70.692-57.308 128-128 128H144C64.471 480 0 415.529 0 336c0-62.773 40.171-116.155 96.204-135.867A163.68 163.68 0 0 1 96 192c0-88.366 71.634-160 160-160 59.288 0 111.042 32.248 138.684 80.159C409.935 101.954 428.271 96 448 96c53.019 0 96 42.981 96 96 0 12.184-2.275 23.836-6.415 34.56C596.017 238.414 640 290.07 640 352zm-235.314-91.314L299.314 155.314c-6.248-6.248-16.379-6.248-22.627 0L171.314 260.686c-10.08 10.08-2.941 27.314 11.313 27.314H248v112c0 8.837 7.164 16 16 16h48c8.836 0 16-7.163 16-16V288h65.373c14.254 0 21.393-17.234 11.313-27.314z"],
- "code": [640, 512, [], "f121", "M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"],
- "code-branch": [384, 512, [], "f126", "M384 144c0-44.2-35.8-80-80-80s-80 35.8-80 80c0 36.4 24.3 67.1 57.5 76.8-.6 16.1-4.2 28.5-11 36.9-15.4 19.2-49.3 22.4-85.2 25.7-28.2 2.6-57.4 5.4-81.3 16.9v-144c32.5-10.2 56-40.5 56-76.3 0-44.2-35.8-80-80-80S0 35.8 0 80c0 35.8 23.5 66.1 56 76.3v199.3C23.5 365.9 0 396.2 0 432c0 44.2 35.8 80 80 80s80-35.8 80-80c0-34-21.2-63.1-51.2-74.6 3.1-5.2 7.8-9.8 14.9-13.4 16.2-8.2 40.4-10.4 66.1-12.8 42.2-3.9 90-8.4 118.2-43.4 14-17.4 21.1-39.8 21.6-67.9 31.6-10.8 54.4-40.7 54.4-75.9zM80 64c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16zm0 384c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm224-320c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16z"],
- "coffee": [640, 512, [], "f0f4", "M192 384h192c53 0 96-43 96-96h32c70.6 0 128-57.4 128-128S582.6 32 512 32H120c-13.3 0-24 10.7-24 24v232c0 53 43 96 96 96zM512 96c35.3 0 64 28.7 64 64s-28.7 64-64 64h-32V96h32zm47.7 384H48.3c-47.6 0-61-64-36-64h583.3c25 0 11.8 64-35.9 64z"],
- "cog": [512, 512, [], "f013", "M444.788 291.1l42.616 24.599c4.867 2.809 7.126 8.618 5.459 13.985-11.07 35.642-29.97 67.842-54.689 94.586a12.016 12.016 0 0 1-14.832 2.254l-42.584-24.595a191.577 191.577 0 0 1-60.759 35.13v49.182a12.01 12.01 0 0 1-9.377 11.718c-34.956 7.85-72.499 8.256-109.219.007-5.49-1.233-9.403-6.096-9.403-11.723v-49.184a191.555 191.555 0 0 1-60.759-35.13l-42.584 24.595a12.016 12.016 0 0 1-14.832-2.254c-24.718-26.744-43.619-58.944-54.689-94.586-1.667-5.366.592-11.175 5.459-13.985L67.212 291.1a193.48 193.48 0 0 1 0-70.199l-42.616-24.599c-4.867-2.809-7.126-8.618-5.459-13.985 11.07-35.642 29.97-67.842 54.689-94.586a12.016 12.016 0 0 1 14.832-2.254l42.584 24.595a191.577 191.577 0 0 1 60.759-35.13V25.759a12.01 12.01 0 0 1 9.377-11.718c34.956-7.85 72.499-8.256 109.219-.007 5.49 1.233 9.403 6.096 9.403 11.723v49.184a191.555 191.555 0 0 1 60.759 35.13l42.584-24.595a12.016 12.016 0 0 1 14.832 2.254c24.718 26.744 43.619 58.944 54.689 94.586 1.667 5.366-.592 11.175-5.459 13.985L444.788 220.9a193.485 193.485 0 0 1 0 70.2zM336 256c0-44.112-35.888-80-80-80s-80 35.888-80 80 35.888 80 80 80 80-35.888 80-80z"],
- "cogs": [640, 512, [], "f085", "M512.1 191l-8.2 14.3c-3 5.3-9.4 7.5-15.1 5.4-11.8-4.4-22.6-10.7-32.1-18.6-4.6-3.8-5.8-10.5-2.8-15.7l8.2-14.3c-6.9-8-12.3-17.3-15.9-27.4h-16.5c-6 0-11.2-4.3-12.2-10.3-2-12-2.1-24.6 0-37.1 1-6 6.2-10.4 12.2-10.4h16.5c3.6-10.1 9-19.4 15.9-27.4l-8.2-14.3c-3-5.2-1.9-11.9 2.8-15.7 9.5-7.9 20.4-14.2 32.1-18.6 5.7-2.1 12.1.1 15.1 5.4l8.2 14.3c10.5-1.9 21.2-1.9 31.7 0L552 6.3c3-5.3 9.4-7.5 15.1-5.4 11.8 4.4 22.6 10.7 32.1 18.6 4.6 3.8 5.8 10.5 2.8 15.7l-8.2 14.3c6.9 8 12.3 17.3 15.9 27.4h16.5c6 0 11.2 4.3 12.2 10.3 2 12 2.1 24.6 0 37.1-1 6-6.2 10.4-12.2 10.4h-16.5c-3.6 10.1-9 19.4-15.9 27.4l8.2 14.3c3 5.2 1.9 11.9-2.8 15.7-9.5 7.9-20.4 14.2-32.1 18.6-5.7 2.1-12.1-.1-15.1-5.4l-8.2-14.3c-10.4 1.9-21.2 1.9-31.7 0zm-10.5-58.8c38.5 29.6 82.4-14.3 52.8-52.8-38.5-29.7-82.4 14.3-52.8 52.8zM386.3 286.1l33.7 16.8c10.1 5.8 14.5 18.1 10.5 29.1-8.9 24.2-26.4 46.4-42.6 65.8-7.4 8.9-20.2 11.1-30.3 5.3l-29.1-16.8c-16 13.7-34.6 24.6-54.9 31.7v33.6c0 11.6-8.3 21.6-19.7 23.6-24.6 4.2-50.4 4.4-75.9 0-11.5-2-20-11.9-20-23.6V418c-20.3-7.2-38.9-18-54.9-31.7L74 403c-10 5.8-22.9 3.6-30.3-5.3-16.2-19.4-33.3-41.6-42.2-65.7-4-10.9.4-23.2 10.5-29.1l33.3-16.8c-3.9-20.9-3.9-42.4 0-63.4L12 205.8c-10.1-5.8-14.6-18.1-10.5-29 8.9-24.2 26-46.4 42.2-65.8 7.4-8.9 20.2-11.1 30.3-5.3l29.1 16.8c16-13.7 34.6-24.6 54.9-31.7V57.1c0-11.5 8.2-21.5 19.6-23.5 24.6-4.2 50.5-4.4 76-.1 11.5 2 20 11.9 20 23.6v33.6c20.3 7.2 38.9 18 54.9 31.7l29.1-16.8c10-5.8 22.9-3.6 30.3 5.3 16.2 19.4 33.2 41.6 42.1 65.8 4 10.9.1 23.2-10 29.1l-33.7 16.8c3.9 21 3.9 42.5 0 63.5zm-117.6 21.1c59.2-77-28.7-164.9-105.7-105.7-59.2 77 28.7 164.9 105.7 105.7zm243.4 182.7l-8.2 14.3c-3 5.3-9.4 7.5-15.1 5.4-11.8-4.4-22.6-10.7-32.1-18.6-4.6-3.8-5.8-10.5-2.8-15.7l8.2-14.3c-6.9-8-12.3-17.3-15.9-27.4h-16.5c-6 0-11.2-4.3-12.2-10.3-2-12-2.1-24.6 0-37.1 1-6 6.2-10.4 12.2-10.4h16.5c3.6-10.1 9-19.4 15.9-27.4l-8.2-14.3c-3-5.2-1.9-11.9 2.8-15.7 9.5-7.9 20.4-14.2 32.1-18.6 5.7-2.1 12.1.1 15.1 5.4l8.2 14.3c10.5-1.9 21.2-1.9 31.7 0l8.2-14.3c3-5.3 9.4-7.5 15.1-5.4 11.8 4.4 22.6 10.7 32.1 18.6 4.6 3.8 5.8 10.5 2.8 15.7l-8.2 14.3c6.9 8 12.3 17.3 15.9 27.4h16.5c6 0 11.2 4.3 12.2 10.3 2 12 2.1 24.6 0 37.1-1 6-6.2 10.4-12.2 10.4h-16.5c-3.6 10.1-9 19.4-15.9 27.4l8.2 14.3c3 5.2 1.9 11.9-2.8 15.7-9.5 7.9-20.4 14.2-32.1 18.6-5.7 2.1-12.1-.1-15.1-5.4l-8.2-14.3c-10.4 1.9-21.2 1.9-31.7 0zM501.6 431c38.5 29.6 82.4-14.3 52.8-52.8-38.5-29.6-82.4 14.3-52.8 52.8z"],
- "columns": [512, 512, [], "f0db", "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64V160h160v256zm224 0H288V160h160v256z"],
- "comment": [576, 512, [], "f075", "M576 240c0 115-129 208-288 208-48.3 0-93.9-8.6-133.9-23.8-40.3 31.2-89.8 50.3-142.4 55.7-5.2.6-10.2-2.8-11.5-7.7-1.3-5 2.7-8.1 6.6-11.8 19.3-18.4 42.7-32.8 51.9-94.6C21.9 330.9 0 287.3 0 240 0 125.1 129 32 288 32s288 93.1 288 208z"],
- "comment-alt": [576, 512, [], "f27a", "M576 240c0 115-129 208-288 208-48.3 0-93.9-8.6-133.9-23.8-40.3 31.2-89.8 50.3-142.4 55.7-5.2.6-10.2-2.8-11.5-7.7-1.3-5 2.7-8.1 6.6-11.8 19.3-18.4 42.7-32.8 51.9-94.6C21.9 330.9 0 287.3 0 240 0 125.1 129 32 288 32s288 93.1 288 208zm-416-48c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm128 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm128 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z"],
- "comments": [576, 512, [], "f086", "M224 358.857c-37.599 0-73.027-6.763-104.143-18.7-31.375 24.549-69.869 39.508-110.764 43.796a8.632 8.632 0 0 1-.89.047c-3.736 0-7.111-2.498-8.017-6.061-.98-3.961 2.088-6.399 5.126-9.305 15.017-14.439 33.222-25.79 40.342-74.297C17.015 266.886 0 232.622 0 195.429 0 105.16 100.297 32 224 32s224 73.159 224 163.429c-.001 90.332-100.297 163.428-224 163.428zm347.067 107.174c-13.944-13.127-30.849-23.446-37.46-67.543 68.808-64.568 52.171-156.935-37.674-207.065.031 1.334.066 2.667.066 4.006 0 122.493-129.583 216.394-284.252 211.222 38.121 30.961 93.989 50.492 156.252 50.492 34.914 0 67.811-6.148 96.704-17 29.134 22.317 64.878 35.916 102.853 39.814 3.786.395 7.363-1.973 8.27-5.467.911-3.601-1.938-5.817-4.759-8.459z"],
- "compass": [512, 512, [], "f14e", "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM307.446 120.844l-102.642 97.779a23.997 23.997 0 0 0-6.772 11.729l-33.359 137.779c-5.68 23.459 22.777 39.318 39.88 23.024l102.64-97.779a23.99 23.99 0 0 0 6.772-11.729l33.359-137.779c5.618-23.198-22.591-39.493-39.878-23.024zM256 224c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32z"],
- "compress": [448, 512, [], "f066", "M436 192H312c-13.3 0-24-10.7-24-24V44c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v84h84c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm-276-24V44c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v84H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24zm0 300V344c0-13.3-10.7-24-24-24H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-84h84c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12H312c-13.3 0-24 10.7-24 24v124c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12z"],
- "copy": [448, 512, [], "f0c5", "M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"],
- "copyright": [512, 512, [], "f1f9", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm117.134 346.753c-1.592 1.867-39.776 45.731-109.851 45.731-84.692 0-144.484-63.26-144.484-145.567 0-81.303 62.004-143.401 143.762-143.401 66.957 0 101.965 37.315 103.422 38.904a12 12 0 0 1 1.238 14.623l-22.38 34.655c-4.049 6.267-12.774 7.351-18.234 2.295-.233-.214-26.529-23.88-61.88-23.88-46.116 0-73.916 33.575-73.916 76.082 0 39.602 25.514 79.692 74.277 79.692 38.697 0 65.28-28.338 65.544-28.625 5.132-5.565 14.059-5.033 18.508 1.053l24.547 33.572a12.001 12.001 0 0 1-.553 14.866z"],
- "credit-card": [576, 512, [], "f09d", "M0 432c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V256H0v176zm192-68c0-6.6 5.4-12 12-12h136c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H204c-6.6 0-12-5.4-12-12v-40zm-128 0c0-6.6 5.4-12 12-12h72c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zM576 80v48H0V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48z"],
- "crop": [512, 512, [], "f125", "M488 352h-40V109.3l57-57c9.4-9.4 9.4-24.6 0-33.9L493.7 7c-9.4-9.4-24.6-9.4-33.9 0l-57 57H160V24c0-13.3-10.7-24-24-24H88C74.7 0 64 10.7 64 24v40H24C10.7 64 0 74.7 0 88v48c0 13.3 10.7 24 24 24h40v264c0 13.3 10.7 24 24 24h264v40c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24v-40h40c13.3 0 24-10.7 24-24v-48c0-13.3-10.7-24-24-24zM306.7 160L160 306.7V160h146.7zM205.3 352L352 205.3V352H205.3z"],
- "crosshairs": [512, 512, [], "f05b", "M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"],
- "cube": [512, 512, [], "f1b2", "M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z"],
- "cubes": [512, 512, [], "f1b3", "M488.6 250.2L392 214V105.5c0-15-9.3-28.4-23.4-33.7l-100-37.5c-8.1-3.1-17.1-3.1-25.3 0l-100 37.5c-14.1 5.3-23.4 18.7-23.4 33.7V214l-96.6 36.2C9.3 255.5 0 268.9 0 283.9V394c0 13.6 7.7 26.1 19.9 32.2l100 50c10.1 5.1 22.1 5.1 32.2 0l103.9-52 103.9 52c10.1 5.1 22.1 5.1 32.2 0l100-50c12.2-6.1 19.9-18.6 19.9-32.2V283.9c0-15-9.3-28.4-23.4-33.7zM358 214.8l-85 31.9v-68.2l85-37v73.3zM154 104.1l102-38.2 102 38.2v.6l-102 41.4-102-41.4v-.6zm84 291.1l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6zm240 112l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6z"],
- "cut": [448, 512, [], "f0c4", "M444.485 422.426c4.689 4.689 4.684 12.287 0 16.971-32.804 32.804-85.991 32.804-118.795 0L210.176 323.883l-24.859 24.859C189.63 359.657 192 371.552 192 384c0 53.019-42.981 96-96 96S0 437.019 0 384s42.981-96 96-96c4.536 0 8.995.322 13.363.93l32.93-32.93-32.93-32.93c-4.368.608-8.827.93-13.363.93-53.019 0-96-42.981-96-96s42.981-96 96-96 96 42.981 96 96c0 12.448-2.37 24.343-6.682 35.258l24.859 24.859L325.69 72.603c32.804-32.804 85.991-32.804 118.795 0 4.684 4.684 4.689 12.282 0 16.971L278.059 256l166.426 166.426zM96 96c-17.645 0-32 14.355-32 32s14.355 32 32 32 32-14.355 32-32-14.355-32-32-32m0 256c-17.645 0-32 14.355-32 32s14.355 32 32 32 32-14.355 32-32-14.355-32-32-32m112-108c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12z"],
- "database": [448, 512, [], "f1c0", "M448 73.143v45.714C448 159.143 347.667 192 224 192S0 159.143 0 118.857V73.143C0 32.857 100.333 0 224 0s224 32.857 224 73.143zM448 176v102.857C448 319.143 347.667 352 224 352S0 319.143 0 278.857V176c48.125 33.143 136.208 48.572 224 48.572S399.874 209.143 448 176zm0 160v102.857C448 479.143 347.667 512 224 512S0 479.143 0 438.857V336c48.125 33.143 136.208 48.572 224 48.572S399.874 369.143 448 336z"],
- "deaf": [512, 512, [], "f2a4", "M216 260c0 15.464-12.536 28-28 28s-28-12.536-28-28c0-44.112 35.888-80 80-80s80 35.888 80 80c0 15.464-12.536 28-28 28s-28-12.536-28-28c0-13.234-10.767-24-24-24s-24 10.766-24 24zm24-176c-97.047 0-176 78.953-176 176 0 15.464 12.536 28 28 28s28-12.536 28-28c0-66.168 53.832-120 120-120s120 53.832 120 120c0 75.164-71.009 70.311-71.997 143.622L288 404c0 28.673-23.327 52-52 52-15.464 0-28 12.536-28 28s12.536 28 28 28c59.475 0 107.876-48.328 108-107.774.595-34.428 72-48.24 72-144.226 0-97.047-78.953-176-176-176zm268.485-52.201L480.2 3.515c-4.687-4.686-12.284-4.686-16.971 0L376.2 90.544c-4.686 4.686-4.686 12.284 0 16.971l28.285 28.285c4.686 4.686 12.284 4.686 16.97 0l87.03-87.029c4.687-4.688 4.687-12.286 0-16.972zM168.97 314.745c-4.686-4.686-12.284-4.686-16.97 0L3.515 463.23c-4.686 4.686-4.686 12.284 0 16.971L31.8 508.485c4.687 4.686 12.284 4.686 16.971 0L197.256 360c4.686-4.686 4.686-12.284 0-16.971l-28.286-28.284z"],
- "desktop": [576, 512, [], "f108", "M528 0H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h192l-16 48h-72c-13.3 0-24 10.7-24 24s10.7 24 24 24h272c13.3 0 24-10.7 24-24s-10.7-24-24-24h-72l-16-48h192c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-16 352H64V64h448v288z"],
- "dollar-sign": [320, 512, [], "f155", "M113.411 169.375c0-23.337 21.536-38.417 54.865-38.417 26.726 0 54.116 12.263 76.461 28.333 5.88 4.229 14.13 2.354 17.575-4.017l23.552-43.549c2.649-4.898 1.596-10.991-2.575-14.68-24.281-21.477-59.135-34.09-91.289-37.806V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v49.832c-58.627 13.29-97.299 55.917-97.299 108.639 0 123.533 184.765 110.81 184.765 169.414 0 19.823-16.311 41.158-52.124 41.158-30.751 0-62.932-15.88-87.848-35.887-5.31-4.264-13.082-3.315-17.159 2.14l-30.389 40.667c-3.627 4.854-3.075 11.657 1.302 15.847 24.049 23.02 59.249 41.255 98.751 47.973V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-47.438c65.72-10.215 106.176-59.186 106.176-116.516.001-119.688-184.764-103.707-184.764-166.671z"],
- "dot-circle": [512, 512, [], "f192", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm80 248c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80z"],
- "download": [512, 512, [], "f019", "M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"],
- "edit": [576, 512, [], "f044", "M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z"],
- "eject": [448, 512, [], "f052", "M448 384v64c0 17.673-14.327 32-32 32H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h384c17.673 0 32 14.327 32 32zM48.053 320h351.886c41.651 0 63.581-49.674 35.383-80.435L259.383 47.558c-19.014-20.743-51.751-20.744-70.767 0L12.67 239.565C-15.475 270.268 6.324 320 48.053 320z"],
- "ellipsis-h": [512, 512, [], "f141", "M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"],
- "ellipsis-v": [192, 512, [], "f142", "M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z"],
- "envelope": [512, 512, [], "f0e0", "M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"],
- "envelope-open": [512, 512, [], "f2b6", "M512 464c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V200.724a48 48 0 0 1 18.387-37.776c24.913-19.529 45.501-35.365 164.2-121.511C199.412 29.17 232.797-.347 256 .003c23.198-.354 56.596 29.172 73.413 41.433 118.687 86.137 139.303 101.995 164.2 121.512A48 48 0 0 1 512 200.724V464zm-65.666-196.605c-2.563-3.728-7.7-4.595-11.339-1.907-22.845 16.873-55.462 40.705-105.582 77.079-16.825 12.266-50.21 41.781-73.413 41.43-23.211.344-56.559-29.143-73.413-41.43-50.114-36.37-82.734-60.204-105.582-77.079-3.639-2.688-8.776-1.821-11.339 1.907l-9.072 13.196a7.998 7.998 0 0 0 1.839 10.967c22.887 16.899 55.454 40.69 105.303 76.868 20.274 14.781 56.524 47.813 92.264 47.573 35.724.242 71.961-32.771 92.263-47.573 49.85-36.179 82.418-59.97 105.303-76.868a7.998 7.998 0 0 0 1.839-10.967l-9.071-13.196z"],
- "envelope-square": [448, 512, [], "f199", "M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM178.117 262.104C87.429 196.287 88.353 196.121 64 177.167V152c0-13.255 10.745-24 24-24h272c13.255 0 24 10.745 24 24v25.167c-24.371 18.969-23.434 19.124-114.117 84.938-10.5 7.655-31.392 26.12-45.883 25.894-14.503.218-35.367-18.227-45.883-25.895zM384 217.775V360c0 13.255-10.745 24-24 24H88c-13.255 0-24-10.745-24-24V217.775c13.958 10.794 33.329 25.236 95.303 70.214 14.162 10.341 37.975 32.145 64.694 32.01 26.887.134 51.037-22.041 64.72-32.025 61.958-44.965 81.325-59.406 95.283-70.199z"],
- "eraser": [512, 512, [], "f12d", "M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"],
- "euro-sign": [320, 512, [], "f153", "M310.706 413.765c-1.314-6.63-7.835-10.872-14.424-9.369-10.692 2.439-27.422 5.413-45.426 5.413-56.763 0-101.929-34.79-121.461-85.449h113.689a12 12 0 0 0 11.708-9.369l6.373-28.36c1.686-7.502-4.019-14.631-11.708-14.631H115.22c-1.21-14.328-1.414-28.287.137-42.245H261.95a12 12 0 0 0 11.723-9.434l6.512-29.755c1.638-7.484-4.061-14.566-11.723-14.566H130.184c20.633-44.991 62.69-75.03 117.619-75.03 14.486 0 28.564 2.25 37.851 4.145 6.216 1.268 12.347-2.498 14.002-8.623l11.991-44.368c1.822-6.741-2.465-13.616-9.326-14.917C290.217 34.912 270.71 32 249.635 32 152.451 32 74.03 92.252 45.075 176H12c-6.627 0-12 5.373-12 12v29.755c0 6.627 5.373 12 12 12h21.569c-1.009 13.607-1.181 29.287-.181 42.245H12c-6.627 0-12 5.373-12 12v28.36c0 6.627 5.373 12 12 12h30.114C67.139 414.692 145.264 480 249.635 480c26.301 0 48.562-4.544 61.101-7.788 6.167-1.595 10.027-7.708 8.788-13.957l-8.818-44.49z"],
- "exchange-alt": [512, 512, [], "f362", "M0 168v-16c0-13.255 10.745-24 24-24h360V80c0-21.367 25.899-32.042 40.971-16.971l80 80c9.372 9.373 9.372 24.569 0 33.941l-80 80C409.956 271.982 384 261.456 384 240v-48H24c-13.255 0-24-10.745-24-24zm488 152H128v-48c0-21.314-25.862-32.08-40.971-16.971l-80 80c-9.372 9.373-9.372 24.569 0 33.941l80 80C102.057 463.997 128 453.437 128 432v-48h360c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24z"],
- "exclamation": [192, 512, [], "f12a", "M176 432c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80zM25.26 25.199l13.6 272C39.499 309.972 50.041 320 62.83 320h66.34c12.789 0 23.331-10.028 23.97-22.801l13.6-272C167.425 11.49 156.496 0 142.77 0H49.23C35.504 0 24.575 11.49 25.26 25.199z"],
- "exclamation-circle": [512, 512, [], "f06a", "M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"],
- "exclamation-triangle": [576, 512, [], "f071", "M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"],
- "expand": [448, 512, [], "f065", "M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"],
- "expand-arrows-alt": [448, 512, [], "f31e", "M448.1 344v112c0 13.3-10.7 24-24 24h-112c-21.4 0-32.1-25.9-17-41l36.2-36.2L224 295.6 116.8 402.9 153 439c15.1 15.1 4.4 41-17 41H24c-13.3 0-24-10.7-24-24V344c0-21.4 25.9-32.1 41-17l36.2 36.2L184.5 256 77.2 148.7 41 185c-15.1 15.1-41 4.4-41-17V56c0-13.3 10.7-24 24-24h112c21.4 0 32.1 25.9 17 41l-36.2 36.2L224 216.4l107.3-107.3L295.1 73c-15.1-15.1-4.4-41 17-41h112c13.3 0 24 10.7 24 24v112c0 21.4-25.9 32.1-41 17l-36.2-36.2L263.6 256l107.3 107.3 36.2-36.2c15.1-15.2 41-4.5 41 16.9z"],
- "external-link-alt": [576, 512, [], "f35d", "M576 24v127.984c0 21.461-25.96 31.98-40.971 16.971l-35.707-35.709-243.523 243.523c-9.373 9.373-24.568 9.373-33.941 0l-22.627-22.627c-9.373-9.373-9.373-24.569 0-33.941L442.756 76.676l-35.703-35.705C391.982 25.9 402.656 0 424.024 0H552c13.255 0 24 10.745 24 24zM407.029 270.794l-16 16A23.999 23.999 0 0 0 384 303.765V448H64V128h264a24.003 24.003 0 0 0 16.97-7.029l16-16C376.089 89.851 365.381 64 344 64H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V287.764c0-21.382-25.852-32.09-40.971-16.97z"],
- "external-link-square-alt": [448, 512, [], "f360", "M448 80v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48zm-88 16H248.029c-21.313 0-32.08 25.861-16.971 40.971l31.984 31.987L67.515 364.485c-4.686 4.686-4.686 12.284 0 16.971l31.029 31.029c4.687 4.686 12.285 4.686 16.971 0l195.526-195.526 31.988 31.991C358.058 263.977 384 253.425 384 231.979V120c0-13.255-10.745-24-24-24z"],
- "eye": [576, 512, [], "f06e", "M569.354 231.631C512.969 135.949 407.81 72 288 72 168.14 72 63.004 135.994 6.646 231.631a47.999 47.999 0 0 0 0 48.739C63.031 376.051 168.19 440 288 440c119.86 0 224.996-63.994 281.354-159.631a47.997 47.997 0 0 0 0-48.738zM288 392c-75.162 0-136-60.827-136-136 0-75.162 60.826-136 136-136 75.162 0 136 60.826 136 136 0 75.162-60.826 136-136 136zm104-136c0 57.438-46.562 104-104 104s-104-46.562-104-104c0-17.708 4.431-34.379 12.236-48.973l-.001.032c0 23.651 19.173 42.823 42.824 42.823s42.824-19.173 42.824-42.823c0-23.651-19.173-42.824-42.824-42.824l-.032.001C253.621 156.431 270.292 152 288 152c57.438 0 104 46.562 104 104z"],
- "eye-dropper": [512, 512, [], "f1fb", "M177.38 206.64L39.03 344.97A24.01 24.01 0 0 0 32 361.94V424L0 480l32 32 56-32h62.06c6.36 0 12.47-2.53 16.97-7.03l138.35-138.33-128-128zm225.552 30.47l16.952 16.95c9.37 9.37 9.37 24.57 0 33.94l-40.973 40.97c-9.292 9.312-24.506 9.434-33.94 0L183.028 167.03c-9.37-9.37-9.37-24.57 0-33.94L224 92.12c9.289-9.309 24.502-9.438 33.94 0l16.992 16.99 82.606-82.601c35.19-35.19 92.5-35.5 128 0 40.49 48.08 29.66 98.34 0 128l-82.606 82.601z"],
- "eye-slash": [576, 512, [], "f070", "M286.693 391.984l32.579 46.542A333.958 333.958 0 0 1 288 440C168.19 440 63.031 376.051 6.646 280.369a47.999 47.999 0 0 1 0-48.739c24.023-40.766 56.913-75.775 96.024-102.537l57.077 81.539C154.736 224.82 152 240.087 152 256c0 74.736 60.135 135.282 134.693 135.984zm282.661-111.615c-31.667 53.737-78.747 97.46-135.175 125.475l.011.015 41.47 59.2c7.6 10.86 4.96 25.82-5.9 33.42l-13.11 9.18c-10.86 7.6-25.82 4.96-33.42-5.9L100.34 46.94c-7.6-10.86-4.96-25.82 5.9-33.42l13.11-9.18c10.86-7.6 25.82-4.96 33.42 5.9l51.038 72.617C230.68 75.776 258.905 72 288 72c119.81 0 224.969 63.949 281.354 159.631a48.002 48.002 0 0 1 0 48.738zM424 256c0-75.174-60.838-136-136-136-17.939 0-35.056 3.473-50.729 9.772l19.299 27.058c25.869-8.171 55.044-6.163 80.4 7.41h-.03c-23.65 0-42.82 19.17-42.82 42.82 0 23.626 19.147 42.82 42.82 42.82 23.65 0 42.82-19.17 42.82-42.82v-.03c18.462 34.49 16.312 77.914-8.25 110.95v.01l19.314 27.061C411.496 321.2 424 290.074 424 256zM262.014 356.727l-77.53-110.757c-5.014 52.387 29.314 98.354 77.53 110.757z"],
- "fast-backward": [512, 512, [], "f049", "M0 436V76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v151.9L235.5 71.4C256.1 54.3 288 68.6 288 96v131.9L459.5 71.4C480.1 54.3 512 68.6 512 96v320c0 27.4-31.9 41.7-52.5 24.6L288 285.3V416c0 27.4-31.9 41.7-52.5 24.6L64 285.3V436c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12z"],
- "fast-forward": [512, 512, [], "f050", "M512 76v360c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V284.1L276.5 440.6c-20.6 17.2-52.5 2.8-52.5-24.6V284.1L52.5 440.6C31.9 457.8 0 443.4 0 416V96c0-27.4 31.9-41.7 52.5-24.6L224 226.8V96c0-27.4 31.9-41.7 52.5-24.6L448 226.8V76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12z"],
- "fax": [512, 512, [], "f1ac", "M128 144v320c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V144c0-26.51 21.49-48 48-48h32c26.51 0 48 21.49 48 48zm384 64v256c0 26.51-21.49 48-48 48H192c-26.51 0-48-21.49-48-48V40c0-22.091 17.909-40 40-40h207.432a39.996 39.996 0 0 1 28.284 11.716l48.569 48.569A39.999 39.999 0 0 1 480 88.568v74.174c18.641 6.591 32 24.36 32 45.258zm-320-16h240V96h-24c-13.203 0-24-10.797-24-24V48H192v144zm96 204c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40zm0-128c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40zm128 128c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40zm0-128c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40z"],
- "female": [256, 512, [], "f182", "M128 0c35.346 0 64 28.654 64 64s-28.654 64-64 64c-35.346 0-64-28.654-64-64S92.654 0 128 0m119.283 354.179l-48-192A24 24 0 0 0 176 144h-11.36c-22.711 10.443-49.59 10.894-73.28 0H80a24 24 0 0 0-23.283 18.179l-48 192C4.935 369.305 16.383 384 32 384h56v104c0 13.255 10.745 24 24 24h32c13.255 0 24-10.745 24-24V384h56c15.591 0 27.071-14.671 23.283-29.821z"],
- "fighter-jet": [640, 512, [], "f0fb", "M544 224l-128-16-48-16h-24L227.158 44h39.509C278.333 44 288 41.375 288 38s-9.667-6-21.333-6H152v12h16v164h-48l-66.667-80H18.667L8 138.667V208h8v16h48v2.666l-64 8v42.667l64 8V288H16v16H8v69.333L18.667 384h34.667L120 304h48v164h-16v12h114.667c11.667 0 21.333-2.625 21.333-6s-9.667-6-21.333-6h-39.509L344 320h24l48-16 128-16c96-21.333 96-26.583 96-32 0-5.417 0-10.667-96-32z"],
- "file": [384, 512, [], "f15b", "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"],
- "file-alt": [384, 512, [], "f15c", "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm64 236c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-64c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-72v8c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm96-114.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"],
- "file-archive": [384, 512, [], "f1c6", "M224 136V0h-63.6v32h-32V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM95.9 32h32v32h-32V32zm32.3 384c-33.2 0-58-30.4-51.4-62.9L96.4 256v-32h32v-32h-32v-32h32v-32h-32V96h32V64h32v32h-32v32h32v32h-32v32h32v32h-32v32h22.1c5.7 0 10.7 4.1 11.8 9.7l17.3 87.7c6.4 32.4-18.4 62.6-51.4 62.6zm32.7-53c0 14.9-14.5 27-32.4 27S96 378 96 363c0-14.9 14.5-27 32.4-27s32.5 12.1 32.5 27zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"],
- "file-audio": [384, 512, [], "f1c7", "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm-64 268c0 10.7-12.9 16-20.5 8.5L104 376H76c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h28l35.5-36.5c7.6-7.6 20.5-2.2 20.5 8.5v136zm33.2-47.6c9.1-9.3 9.1-24.1 0-33.4-22.1-22.8 12.2-56.2 34.4-33.5 27.2 27.9 27.2 72.4 0 100.4-21.8 22.3-56.9-10.4-34.4-33.5zm86-117.1c54.4 55.9 54.4 144.8 0 200.8-21.8 22.4-57-10.3-34.4-33.5 36.2-37.2 36.3-96.5 0-133.8-22.1-22.8 12.3-56.3 34.4-33.5zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"],
- "file-code": [384, 512, [], "f1c9", "M384 121.941V128H256V0h6.059c6.365 0 12.47 2.529 16.971 7.029l97.941 97.941A24.005 24.005 0 0 1 384 121.941zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zM123.206 400.505a5.4 5.4 0 0 1-7.633.246l-64.866-60.812a5.4 5.4 0 0 1 0-7.879l64.866-60.812a5.4 5.4 0 0 1 7.633.246l19.579 20.885a5.4 5.4 0 0 1-.372 7.747L101.65 336l40.763 35.874a5.4 5.4 0 0 1 .372 7.747l-19.579 20.884zm51.295 50.479l-27.453-7.97a5.402 5.402 0 0 1-3.681-6.692l61.44-211.626a5.402 5.402 0 0 1 6.692-3.681l27.452 7.97a5.4 5.4 0 0 1 3.68 6.692l-61.44 211.626a5.397 5.397 0 0 1-6.69 3.681zm160.792-111.045l-64.866 60.812a5.4 5.4 0 0 1-7.633-.246l-19.58-20.885a5.4 5.4 0 0 1 .372-7.747L284.35 336l-40.763-35.874a5.4 5.4 0 0 1-.372-7.747l19.58-20.885a5.4 5.4 0 0 1 7.633-.246l64.866 60.812a5.4 5.4 0 0 1-.001 7.879z"],
- "file-excel": [384, 512, [], "f1c3", "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm60.1 106.5L224 336l60.1 93.5c5.1 8-.6 18.5-10.1 18.5h-34.9c-4.4 0-8.5-2.4-10.6-6.3C208.9 405.5 192 373 192 373c-6.4 14.8-10 20-36.6 68.8-2.1 3.9-6.1 6.3-10.5 6.3H110c-9.5 0-15.2-10.5-10.1-18.5l60.3-93.5-60.3-93.5c-5.2-8 .6-18.5 10.1-18.5h34.8c4.4 0 8.5 2.4 10.6 6.3 26.1 48.8 20 33.6 36.6 68.5 0 0 6.1-11.7 36.6-68.5 2.1-3.9 6.2-6.3 10.6-6.3H274c9.5-.1 15.2 10.4 10.1 18.4zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"],
- "file-image": [384, 512, [], "f1c5", "M384 121.941V128H256V0h6.059a24 24 0 0 1 16.97 7.029l97.941 97.941a24.002 24.002 0 0 1 7.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z"],
- "file-pdf": [384, 512, [], "f1c1", "M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z"],
- "file-powerpoint": [384, 512, [], "f1c4", "M193.7 271.2c8.8 0 15.5 2.7 20.3 8.1 9.6 10.9 9.8 32.7-.2 44.1-4.9 5.6-11.9 8.5-21.1 8.5h-26.9v-60.7h27.9zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm53 165.2c0 90.3-88.8 77.6-111.1 77.6V436c0 6.6-5.4 12-12 12h-30.8c-6.6 0-12-5.4-12-12V236.2c0-6.6 5.4-12 12-12h81c44.5 0 72.9 32.8 72.9 77z"],
- "file-video": [384, 512, [], "f1c8", "M384 121.941V128H256V0h6.059c6.365 0 12.47 2.529 16.971 7.029l97.941 97.941A24.005 24.005 0 0 1 384 121.941zM224 136V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248c-13.2 0-24-10.8-24-24zm96 144.016v111.963c0 21.445-25.943 31.998-40.971 16.971L224 353.941V392c0 13.255-10.745 24-24 24H88c-13.255 0-24-10.745-24-24V280c0-13.255 10.745-24 24-24h112c13.255 0 24 10.745 24 24v38.059l55.029-55.013c15.011-15.01 40.971-4.491 40.971 16.97z"],
- "file-word": [384, 512, [], "f1c2", "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm57.1 120H305c7.7 0 13.4 7.1 11.7 14.7l-38 168c-1.2 5.5-6.1 9.3-11.7 9.3h-38c-5.5 0-10.3-3.8-11.6-9.1-25.8-103.5-20.8-81.2-25.6-110.5h-.5c-1.1 14.3-2.4 17.4-25.6 110.5-1.3 5.3-6.1 9.1-11.6 9.1H117c-5.6 0-10.5-3.9-11.7-9.4l-37.8-168c-1.7-7.5 4-14.6 11.7-14.6h24.5c5.7 0 10.7 4 11.8 9.7 15.6 78 20.1 109.5 21 122.2 1.6-10.2 7.3-32.7 29.4-122.7 1.3-5.4 6.1-9.1 11.7-9.1h29.1c5.6 0 10.4 3.8 11.7 9.2 24 100.4 28.8 124 29.6 129.4-.2-11.2-2.6-17.8 21.6-129.2 1-5.6 5.9-9.5 11.5-9.5zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"],
- "film": [512, 512, [], "f008", "M488 64h-8v20c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V64H96v20c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12V64h-8C10.7 64 0 74.7 0 88v336c0 13.3 10.7 24 24 24h8v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h320v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h8c13.3 0 24-10.7 24-24V88c0-13.3-10.7-24-24-24zM96 372c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm272 208c0 6.6-5.4 12-12 12H156c-6.6 0-12-5.4-12-12v-96c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v96zm0-168c0 6.6-5.4 12-12 12H156c-6.6 0-12-5.4-12-12v-96c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v96zm112 152c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40z"],
- "filter": [512, 512, [], "f0b0", "M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"],
- "fire": [384, 512, [], "f06d", "M216 23.858c0-23.802-30.653-32.765-44.149-13.038C48 191.851 224 200 224 288c0 35.629-29.114 64.458-64.85 63.994C123.98 351.538 96 322.22 96 287.046v-85.51c0-21.703-26.471-32.225-41.432-16.504C27.801 213.158 0 261.332 0 320c0 105.869 86.131 192 192 192s192-86.131 192-192c0-170.29-168-193.003-168-296.142z"],
- "fire-extinguisher": [448, 512, [], "f134", "M434.027 26.329l-168 28C254.693 56.218 256 67.8 256 72h-58.332C208.353 36.108 181.446 0 144 0c-39.435 0-66.368 39.676-52.228 76.203-52.039 13.051-75.381 54.213-90.049 90.884-4.923 12.307 1.063 26.274 13.37 31.197 12.317 4.926 26.279-1.075 31.196-13.37C75.058 112.99 106.964 120 168 120v27.076c-41.543 10.862-72 49.235-72 94.129V488c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24V240c0-44.731-30.596-82.312-72-92.97V120h40c0 2.974-1.703 15.716 10.027 17.671l168 28C441.342 166.89 448 161.25 448 153.834V38.166c0-7.416-6.658-13.056-13.973-11.837zM144 72c-8.822 0-16-7.178-16-16s7.178-16 16-16 16 7.178 16 16-7.178 16-16 16z"],
- "flag": [512, 512, [], "f024", "M349.565 98.783C295.978 98.783 251.721 64 184.348 64c-24.955 0-47.309 4.384-68.045 12.013a55.947 55.947 0 0 0 3.586-23.562C118.117 24.015 94.806 1.206 66.338.048 34.345-1.254 8 24.296 8 56c0 19.026 9.497 35.825 24 45.945V488c0 13.255 10.745 24 24 24h16c13.255 0 24-10.745 24-24v-94.4c28.311-12.064 63.582-22.122 114.435-22.122 53.588 0 97.844 34.783 165.217 34.783 48.169 0 86.667-16.294 122.505-40.858C506.84 359.452 512 349.571 512 339.045v-243.1c0-23.393-24.269-38.87-45.485-29.016-34.338 15.948-76.454 31.854-116.95 31.854z"],
- "flag-checkered": [512, 512, [], "f11e", "M466.515 66.928C487.731 57.074 512 72.551 512 95.944v243.1c0 10.526-5.161 20.407-13.843 26.358-35.837 24.564-74.335 40.858-122.505 40.858-67.373 0-111.63-34.783-165.217-34.783-50.853 0-86.124 10.058-114.435 22.122V488c0 13.255-10.745 24-24 24H56c-13.255 0-24-10.745-24-24V101.945C17.497 91.825 8 75.026 8 56 8 24.296 34.345-1.254 66.338.048c28.468 1.158 51.779 23.968 53.551 52.404.52 8.342-.81 16.31-3.586 23.562C137.039 68.384 159.393 64 184.348 64c67.373 0 111.63 34.783 165.217 34.783 40.496 0 82.612-15.906 116.95-31.855zM96 134.63v70.49c29-10.67 51.18-17.83 73.6-20.91v-71.57c-23.5 2.17-40.44 9.79-73.6 21.99zm220.8 9.19c-26.417-4.672-49.886-13.979-73.6-21.34v67.42c24.175 6.706 47.566 16.444 73.6 22.31v-68.39zm-147.2 40.39v70.04c32.796-2.978 53.91-.635 73.6 3.8V189.9c-25.247-7.035-46.581-9.423-73.6-5.69zm73.6 142.23c26.338 4.652 49.732 13.927 73.6 21.34v-67.41c-24.277-6.746-47.54-16.45-73.6-22.32v68.39zM96 342.1c23.62-8.39 47.79-13.84 73.6-16.56v-71.29c-26.11 2.35-47.36 8.04-73.6 17.36v70.49zm368-221.6c-21.3 8.85-46.59 17.64-73.6 22.47v71.91c27.31-4.36 50.03-14.1 73.6-23.89V120.5zm0 209.96v-70.49c-22.19 14.2-48.78 22.61-73.6 26.02v71.58c25.07-2.38 48.49-11.04 73.6-27.11zM316.8 212.21v68.16c25.664 7.134 46.616 9.342 73.6 5.62v-71.11c-25.999 4.187-49.943 2.676-73.6-2.67z"],
- "flask": [448, 512, [], "f0c3", "M437.2 403.5L320 215V64h8c13.3 0 24-10.7 24-24V24c0-13.3-10.7-24-24-24H120c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h8v151L10.8 403.5C-18.5 450.6 15.3 512 70.9 512h306.2c55.7 0 89.4-61.5 60.1-108.5zM137.9 320l48.2-77.6c3.7-5.2 5.8-11.6 5.8-18.4V64h64v160c0 6.9 2.2 13.2 5.8 18.4l48.2 77.6h-172z"],
- "folder": [512, 512, [], "f07b", "M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"],
- "folder-open": [576, 512, [], "f07c", "M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z"],
- "font": [448, 512, [], "f031", "M152 416h-24.013l26.586-80.782H292.8L319.386 416H296c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h136c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-26.739L275.495 42.746A16 16 0 0 0 260.382 32h-72.766a16 16 0 0 0-15.113 10.746L42.739 416H16c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h136c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16zm64.353-271.778c4.348-15.216 6.61-28.156 7.586-34.644.839 6.521 2.939 19.476 7.727 34.706l41.335 124.006h-98.619l41.971-124.068z"],
- "forward": [512, 512, [], "f04e", "M500.5 231.4l-192-160C287.9 54.3 256 68.6 256 96v320c0 27.4 31.9 41.8 52.5 24.6l192-160c15.3-12.8 15.3-36.4 0-49.2zm-256 0l-192-160C31.9 54.3 0 68.6 0 96v320c0 27.4 31.9 41.8 52.5 24.6l192-160c15.3-12.8 15.3-36.4 0-49.2z"],
- "frown": [512, 512, [], "f119", "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-396-64c0 37.497 30.503 68 68 68s68-30.503 68-68-30.503-68-68-68-68 30.503-68 68zm160.5 0c0 37.221 30.279 67.5 67.5 67.5s67.5-30.279 67.5-67.5-30.279-67.5-67.5-67.5-67.5 30.279-67.5 67.5zm67.5-48a47.789 47.789 0 0 0-22.603 5.647h.015c10.916 0 19.765 8.849 19.765 19.765s-8.849 19.765-19.765 19.765-19.765-8.849-19.765-19.765v-.015A47.789 47.789 0 0 0 288 192c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48zm-160 0a47.789 47.789 0 0 0-22.603 5.647h.015c10.916 0 19.765 8.849 19.765 19.765s-8.849 19.765-19.765 19.765-19.765-8.849-19.765-19.765v-.015A47.789 47.789 0 0 0 128 192c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48zm192.551 212.66c-59.128-91.455-165.846-91.594-225.064 0-11.502 17.79 15.383 35.148 26.873 17.374 46.626-72.118 124.862-71.855 171.318 0 11.328 17.524 38.548.684 26.873-17.374z"],
- "futbol": [512, 512, [], "f1e3", "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-48 0l-.003-.282-26.064 22.741-62.679-58.5 16.454-84.355 34.303 3.072c-24.889-34.216-60.004-60.089-100.709-73.141l13.651 31.939L256 139l-74.953-41.525 13.651-31.939c-40.631 13.028-75.78 38.87-100.709 73.141l34.565-3.073 16.192 84.355-62.678 58.5-26.064-22.741-.003.282c0 43.015 13.497 83.952 38.472 117.991l7.704-33.897 85.138 10.447 36.301 77.826-29.902 17.786c40.202 13.122 84.29 13.148 124.572 0l-29.902-17.786 36.301-77.826 85.138-10.447 7.704 33.897C442.503 339.952 456 299.015 456 256zm-248.102 69.571l-29.894-91.312L256 177.732l77.996 56.527-29.622 91.312h-96.476z"],
- "gamepad": [640, 512, [], "f11b", "M480 96H160C71.6 96 0 167.6 0 256s71.6 160 160 160c44.8 0 85.2-18.4 114.2-48h91.5c29 29.6 69.5 48 114.2 48 88.4 0 160-71.6 160-160S568.4 96 480 96zM256 276c0 6.6-5.4 12-12 12h-52v52c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-52H76c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h52v-52c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h52c6.6 0 12 5.4 12 12v40zm184 68c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm80-80c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z"],
- "gavel": [512, 512, [], "f0e3", "M504.971 199.362l-22.627-22.627c-9.373-9.373-24.569-9.373-33.941 0l-5.657 5.657L329.608 69.255l5.657-5.657c9.373-9.373 9.373-24.569 0-33.941L312.638 7.029c-9.373-9.373-24.569-9.373-33.941 0L154.246 131.48c-9.373 9.373-9.373 24.569 0 33.941l22.627 22.627c9.373 9.373 24.569 9.373 33.941 0l5.657-5.657 39.598 39.598-81.04 81.04-5.657-5.657c-12.497-12.497-32.758-12.497-45.255 0L9.373 412.118c-12.497 12.497-12.497 32.758 0 45.255l45.255 45.255c12.497 12.497 32.758 12.497 45.255 0l114.745-114.745c12.497-12.497 12.497-32.758 0-45.255l-5.657-5.657 81.04-81.04 39.598 39.598-5.657 5.657c-9.373 9.373-9.373 24.569 0 33.941l22.627 22.627c9.373 9.373 24.569 9.373 33.941 0l124.451-124.451c9.372-9.372 9.372-24.568 0-33.941z"],
- "gem": [576, 512, [], "f3a5", "M485.5 0L576 160H474.9L405.7 0h79.8zm-128 0l69.2 160H149.3L218.5 0h139zm-267 0h79.8l-69.2 160H0L90.5 0zM0 192h100.7l123 251.7c1.5 3.1-2.7 5.9-5 3.3L0 192zm148.2 0h279.6l-137 318.2c-1 2.4-4.5 2.4-5.5 0L148.2 192zm204.1 251.7l123-251.7H576L357.3 446.9c-2.3 2.7-6.5-.1-5-3.2z"],
- "genderless": [288, 512, [], "f22d", "M144 176c44.1 0 80 35.9 80 80s-35.9 80-80 80-80-35.9-80-80 35.9-80 80-80m0-64C64.5 112 0 176.5 0 256s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144z"],
- "gift": [512, 512, [], "f06b", "M488 192h-64.512C438.72 175.003 448 152.566 448 128c0-52.935-43.065-96-96-96-41.997 0-68.742 20.693-95.992 54.15C226.671 50.192 199.613 32 160 32c-52.935 0-96 43.065-96 96 0 24.566 9.28 47.003 24.512 64H24c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h8v112c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V320h8c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24zm-208-32c24-56 55.324-64 72-64 17.645 0 32 14.355 32 32s-14.355 32-32 32h-72zM160 96c16.676 0 48 8 72 64h-72c-17.645 0-32-14.355-32-32s14.355-32 32-32zm48 128h96v184c0 13.255-10.745 24-24 24h-48c-13.255 0-24-10.745-24-24V224z"],
- "glass-martini": [512, 512, [], "f000", "M507.3 27.3c10-10 2.9-27.3-11.3-27.3H16C1.8 0-5.4 17.2 4.7 27.3L216 238.6V472h-92c-15.5 0-28 12.5-28 28 0 6.6 5.4 12 12 12h296c6.6 0 12-5.4 12-12 0-15.5-12.5-28-28-28h-92V238.6L507.3 27.3z"],
- "globe": [512, 512, [], "f0ac", "M364.215 192h131.43c5.439 20.419 8.354 41.868 8.354 64s-2.915 43.581-8.354 64h-131.43c5.154-43.049 4.939-86.746 0-128zM185.214 352c10.678 53.68 33.173 112.514 70.125 151.992.221.001.44.008.661.008s.44-.008.661-.008c37.012-39.543 59.467-98.414 70.125-151.992H185.214zm174.13-192h125.385C452.802 84.024 384.128 27.305 300.95 12.075c30.238 43.12 48.821 96.332 58.394 147.925zm-27.35 32H180.006c-5.339 41.914-5.345 86.037 0 128h151.989c5.339-41.915 5.345-86.037-.001-128zM152.656 352H27.271c31.926 75.976 100.6 132.695 183.778 147.925-30.246-43.136-48.823-96.35-58.393-147.925zm206.688 0c-9.575 51.605-28.163 104.814-58.394 147.925 83.178-15.23 151.852-71.949 183.778-147.925H359.344zm-32.558-192c-10.678-53.68-33.174-112.514-70.125-151.992-.221 0-.44-.008-.661-.008s-.44.008-.661.008C218.327 47.551 195.872 106.422 185.214 160h141.572zM16.355 192C10.915 212.419 8 233.868 8 256s2.915 43.581 8.355 64h131.43c-4.939-41.254-5.154-84.951 0-128H16.355zm136.301-32c9.575-51.602 28.161-104.81 58.394-147.925C127.872 27.305 59.198 84.024 27.271 160h125.385z"],
- "graduation-cap": [640, 512, [], "f19d", "M622.884 199.005l-275.817 85.1a96 96 0 0 1-54.134 0L92.398 222.232c-8.564 11.438-11.018 23.05-11.918 38.335C89.778 266.165 96 276.355 96 288c0 11.952-6.557 22.366-16.265 27.861l16.197 123.096c.63 4.786-3.1 9.043-7.932 9.043H40c-4.828 0-8.562-4.253-7.932-9.044L48.265 315.86C38.557 310.366 32 299.952 32 288c0-12.034 6.646-22.511 16.465-27.976.947-17.951 3.974-33.231 12.152-47.597l-43.502-13.422c-22.876-6.801-22.766-39.241 0-46.01l275.817-85.1a96 96 0 0 1 54.134 0l275.817 85.1c22.877 6.801 22.767 39.241.001 46.01zM356.503 314.682l-.207.064-.207.061a127.998 127.998 0 0 1-72.177 0l-.207-.061-.207-.064-150.914-46.57L120 352c0 35.346 89.543 64 200 64s200-28.654 200-64l-12.583-83.888-150.914 46.57z"],
- "h-square": [448, 512, [], "f0fd", "M448 80v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48zm-112 48h-32c-8.837 0-16 7.163-16 16v80H160v-80c0-8.837-7.163-16-16-16h-32c-8.837 0-16 7.163-16 16v224c0 8.837 7.163 16 16 16h32c8.837 0 16-7.163 16-16v-80h128v80c0 8.837 7.163 16 16 16h32c8.837 0 16-7.163 16-16V144c0-8.837-7.163-16-16-16z"],
- "hand-lizard": [576, 512, [], "f258", "M384 480h192V363.778a95.998 95.998 0 0 0-14.833-51.263L398.127 54.368A48 48 0 0 0 357.544 32H24C10.745 32 0 42.745 0 56v16c0 30.928 25.072 56 56 56h229.981c12.844 0 21.556 13.067 16.615 24.923l-21.41 51.385A32 32 0 0 1 251.648 224H128c-35.346 0-64 28.654-64 64v8c0 13.255 10.745 24 24 24h147.406a47.995 47.995 0 0 1 25.692 7.455l111.748 70.811A24.001 24.001 0 0 1 384 418.539V480z"],
- "hand-paper": [448, 512, [], "f256", "M408.781 128.007C386.356 127.578 368 146.36 368 168.79V256h-8V79.79c0-22.43-18.356-41.212-40.781-40.783C297.488 39.423 280 57.169 280 79v177h-8V40.79C272 18.36 253.644-.422 231.219.007 209.488.423 192 18.169 192 40v216h-8V80.79c0-22.43-18.356-41.212-40.781-40.783C121.488 40.423 104 58.169 104 80v235.992l-31.648-43.519c-12.993-17.866-38.009-21.817-55.877-8.823-17.865 12.994-21.815 38.01-8.822 55.877l125.601 172.705A48 48 0 0 0 172.073 512h197.59c22.274 0 41.622-15.324 46.724-37.006l26.508-112.66a192.011 192.011 0 0 0 5.104-43.975V168c.001-21.831-17.487-39.577-39.218-39.993z"],
- "hand-peace": [448, 512, [], "f25b", "M408 216c-22.092 0-40 17.909-40 40h-8v-32c0-22.091-17.908-40-40-40s-40 17.909-40 40v32h-8V48c0-26.51-21.49-48-48-48s-48 21.49-48 48v208h-13.572L92.688 78.449C82.994 53.774 55.134 41.63 30.461 51.324 5.787 61.017-6.356 88.877 3.337 113.551l74.765 190.342-31.09 24.872c-15.381 12.306-19.515 33.978-9.741 51.081l64 112A39.998 39.998 0 0 0 136 512h240c18.562 0 34.686-12.77 38.937-30.838l32-136A39.97 39.97 0 0 0 448 336v-80c0-22.091-17.908-40-40-40z"],
- "hand-point-down": [384, 512, [], "f0a7", "M91.826 467.2V317.966c-8.248 5.841-16.558 10.57-24.918 14.153C35.098 345.752-.014 322.222 0 288c.008-18.616 10.897-32.203 29.092-40 28.286-12.122 64.329-78.648 77.323-107.534 7.956-17.857 25.479-28.453 43.845-28.464l.001-.002h171.526c11.812 0 21.897 8.596 23.703 20.269 7.25 46.837 38.483 61.76 38.315 123.731-.007 2.724.195 13.254.195 16 0 50.654-22.122 81.574-71.263 72.6-9.297 18.597-39.486 30.738-62.315 16.45-21.177 24.645-53.896 22.639-70.944 6.299V467.2c0 24.15-20.201 44.8-43.826 44.8-23.283 0-43.826-21.35-43.826-44.8zM112 72V24c0-13.255 10.745-24 24-24h192c13.255 0 24 10.745 24 24v48c0 13.255-10.745 24-24 24H136c-13.255 0-24-10.745-24-24zm212-24c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z"],
- "hand-point-left": [512, 512, [], "f0a5", "M44.8 155.826h149.234c-5.841-8.248-10.57-16.558-14.153-24.918C166.248 99.098 189.778 63.986 224 64c18.616.008 32.203 10.897 40 29.092 12.122 28.286 78.648 64.329 107.534 77.323 17.857 7.956 28.453 25.479 28.464 43.845l.002.001v171.526c0 11.812-8.596 21.897-20.269 23.703-46.837 7.25-61.76 38.483-123.731 38.315-2.724-.007-13.254.195-16 .195-50.654 0-81.574-22.122-72.6-71.263-18.597-9.297-30.738-39.486-16.45-62.315-24.645-21.177-22.639-53.896-6.299-70.944H44.8c-24.15 0-44.8-20.201-44.8-43.826 0-23.283 21.35-43.826 44.8-43.826zM440 176h48c13.255 0 24 10.745 24 24v192c0 13.255-10.745 24-24 24h-48c-13.255 0-24-10.745-24-24V200c0-13.255 10.745-24 24-24zm24 212c11.046 0 20-8.954 20-20s-8.954-20-20-20-20 8.954-20 20 8.954 20 20 20z"],
- "hand-point-right": [512, 512, [], "f0a4", "M512 199.652c0 23.625-20.65 43.826-44.8 43.826h-99.851c16.34 17.048 18.346 49.766-6.299 70.944 14.288 22.829 2.147 53.017-16.45 62.315C353.574 425.878 322.654 448 272 448c-2.746 0-13.276-.203-16-.195-61.971.168-76.894-31.065-123.731-38.315C120.596 407.683 112 397.599 112 385.786V214.261l.002-.001c.011-18.366 10.607-35.889 28.464-43.845 28.886-12.994 95.413-49.038 107.534-77.323 7.797-18.194 21.384-29.084 40-29.092 34.222-.014 57.752 35.098 44.119 66.908-3.583 8.359-8.312 16.67-14.153 24.918H467.2c23.45 0 44.8 20.543 44.8 43.826zM96 200v192c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V200c0-13.255 10.745-24 24-24h48c13.255 0 24 10.745 24 24zM68 368c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z"],
- "hand-point-up": [384, 512, [], "f0a6", "M135.652 0c23.625 0 43.826 20.65 43.826 44.8v99.851c17.048-16.34 49.766-18.346 70.944 6.299 22.829-14.288 53.017-2.147 62.315 16.45C361.878 158.426 384 189.346 384 240c0 2.746-.203 13.276-.195 16 .168 61.971-31.065 76.894-38.315 123.731C343.683 391.404 333.599 400 321.786 400H150.261l-.001-.002c-18.366-.011-35.889-10.607-43.845-28.464C93.421 342.648 57.377 276.122 29.092 264 10.897 256.203.008 242.616 0 224c-.014-34.222 35.098-57.752 66.908-44.119 8.359 3.583 16.67 8.312 24.918 14.153V44.8c0-23.45 20.543-44.8 43.826-44.8zM136 416h192c13.255 0 24 10.745 24 24v48c0 13.255-10.745 24-24 24H136c-13.255 0-24-10.745-24-24v-48c0-13.255 10.745-24 24-24zm168 28c-11.046 0-20 8.954-20 20s8.954 20 20 20 20-8.954 20-20-8.954-20-20-20z"],
- "hand-pointer": [448, 512, [], "f25a", "M448 240v96c0 3.084-.356 6.159-1.063 9.162l-32 136C410.686 499.23 394.562 512 376 512H168a40.004 40.004 0 0 1-32.35-16.473l-127.997-176c-12.993-17.866-9.043-42.883 8.822-55.876 17.867-12.994 42.884-9.043 55.877 8.823L104 315.992V40c0-22.091 17.908-40 40-40s40 17.909 40 40v200h8v-40c0-22.091 17.908-40 40-40s40 17.909 40 40v40h8v-24c0-22.091 17.908-40 40-40s40 17.909 40 40v24h8c0-22.091 17.908-40 40-40s40 17.909 40 40zm-256 80h-8v96h8v-96zm88 0h-8v96h8v-96zm88 0h-8v96h8v-96z"],
- "hand-rock": [512, 512, [], "f255", "M512 128.79c0-26.322-20.861-48.344-47.18-48.783C437.935 79.558 416 101.217 416 128h-8V96.79c0-26.322-20.861-48.344-47.18-48.783C333.935 47.558 312 69.217 312 96v32h-8V80.79c0-26.322-20.861-48.344-47.18-48.783C229.935 31.558 208 53.217 208 80v48h-8V96.79c0-26.322-20.861-48.344-47.18-48.783C125.935 47.558 104 69.217 104 96v136l-8-7.111V176.79c0-26.322-20.861-48.344-47.18-48.783C21.935 127.558 0 149.217 0 176v66.445a95.998 95.998 0 0 0 32.221 71.751l111.668 99.261A47.999 47.999 0 0 1 160 449.333V456c0 13.255 10.745 24 24 24h240c13.255 0 24-10.745 24-24v-2.921a96.01 96.01 0 0 1 7.523-37.254l48.954-116.265A96.002 96.002 0 0 0 512 262.306V128.79z"],
- "hand-scissors": [512, 512, [], "f257", "M216 440c0-22.092 17.909-40 40-40v-8h-32c-22.091 0-40-17.908-40-40s17.909-40 40-40h32v-8H48c-26.51 0-48-21.49-48-48s21.49-48 48-48h208v-13.572l-177.551-69.74c-24.674-9.694-36.818-37.555-27.125-62.228 9.693-24.674 37.554-36.817 62.228-27.124l190.342 74.765 24.872-31.09c12.306-15.381 33.978-19.515 51.081-9.741l112 64A40.002 40.002 0 0 1 512 168v240c0 18.562-12.77 34.686-30.838 38.937l-136 32A39.982 39.982 0 0 1 336 480h-80c-22.091 0-40-17.908-40-40z"],
- "hand-spock": [512, 512, [], "f259", "M10.872 316.585c15.139-16.086 40.454-16.854 56.543-1.713L128 371.893v-79.405L88.995 120.865c-4.896-21.542 8.598-42.974 30.14-47.87 21.549-4.894 42.975 8.599 47.87 30.141L201.747 256h9.833L164.016 48.966c-4.946-21.531 8.498-42.994 30.028-47.94 21.532-4.95 42.994 8.498 47.94 30.028L293.664 256h15.105l48.425-193.702c5.357-21.432 27.075-34.462 48.507-29.104 21.432 5.358 34.463 27.075 29.104 48.507L391.231 256h11.08l30.768-129.265c5.117-21.491 26.685-34.768 48.177-29.647 21.491 5.117 34.765 26.686 29.647 48.177l-36.292 152.467A96.024 96.024 0 0 0 472 319.967v42.102a96.002 96.002 0 0 1-3.96 27.287l-26.174 88.287C435.825 498.022 417.101 512 395.846 512H179.172a48.002 48.002 0 0 1-32.898-13.046L12.585 373.128c-16.087-15.141-16.853-40.456-1.713-56.543z"],
- "handshake": [640, 512, [], "f2b5", "M72 112H24c-13.255 0-24 10.745-24 24v208c0 13.255 10.745 24 24 24h48c13.255 0 24-10.745 24-24V136c0-13.255-10.745-24-24-24zM48 340c-11.046 0-20-8.954-20-20s8.954-20 20-20 20 8.954 20 20-8.954 20-20 20zm568-228h-48c-13.255 0-24 10.745-24 24v208c0 13.255 10.745 24 24 24h48c13.255 0 24-10.745 24-24V136c0-13.255-10.745-24-24-24zm-24 228c-11.046 0-20-8.954-20-20s8.954-20 20-20 20 8.954 20 20-8.954 20-20 20zM485.94 92.67L528 140.74V320h-19.17c.56-14.96-4.38-28.98-14-39.71l-80.92-98.91c2.93-3.2 2.76-8.16-.38-11.16-2.82-2.7-7.08-2.92-10.14-.76-.42.3-60.35 62.93-60.35 62.93l-.2.21c-23.904 26.905-66.127 26.204-89.15-1.42-15.48-18.58-15.29-45.39.45-63.76l66.57-77.67C334.304 73.88 354.534 64 376.7 64h46.05a83.98 83.98 0 0 1 63.19 28.67zm-3.37 197.92c15.46 16.78 12.59 43.83-2.37 57.75-17.711 16.462-42.433 13.004-45.93 9.2 1.653 15.658-21.389 47.249-56.42 44.68-6.325 21.185-32.298 38.909-59.18 29.61-10.22 10.21-25.82 14.97-39.81 14.97-28.69 0-54.92-11.99-72.58-30.8L112 320V135.52l61.36-50.57A71.52 71.52 0 0 1 223.93 64h37.42c16.73 0 32.68 6.84 44.21 18.85l-63.57 74.16c-20.84 24.31-21.09 59.81-.59 84.42 29.375 35.247 83.007 35.853 113.31 1.92L402.82 193l79.75 97.59z"],
- "hashtag": [448, 512, [], "f292", "M440.667 182.109l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l14.623-81.891C377.123 38.754 371.468 32 363.997 32h-40.632a12 12 0 0 0-11.813 9.891L296.175 128H197.54l14.623-81.891C213.477 38.754 207.822 32 200.35 32h-40.632a12 12 0 0 0-11.813 9.891L132.528 128H53.432a12 12 0 0 0-11.813 9.891l-7.143 40C33.163 185.246 38.818 192 46.289 192h74.81L98.242 320H19.146a12 12 0 0 0-11.813 9.891l-7.143 40C-1.123 377.246 4.532 384 12.003 384h74.81L72.19 465.891C70.877 473.246 76.532 480 84.003 480h40.632a12 12 0 0 0 11.813-9.891L151.826 384h98.634l-14.623 81.891C234.523 473.246 240.178 480 247.65 480h40.632a12 12 0 0 0 11.813-9.891L315.472 384h79.096a12 12 0 0 0 11.813-9.891l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l22.857-128h79.096a12 12 0 0 0 11.813-9.891zM261.889 320h-98.634l22.857-128h98.634l-22.857 128z"],
- "hdd": [576, 512, [], "f0a0", "M576 304v96c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48v-96c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48zm-48-80a79.557 79.557 0 0 1 30.777 6.165L462.25 85.374A48.003 48.003 0 0 0 422.311 64H153.689a48 48 0 0 0-39.938 21.374L17.223 230.165A79.557 79.557 0 0 1 48 224h480zm-48 96c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm-96 0c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32z"],
- "heading": [512, 512, [], "f1dc", "M496 80V48c0-8.837-7.163-16-16-16H320c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h37.621v128H154.379V96H192c8.837 0 16-7.163 16-16V48c0-8.837-7.163-16-16-16H32c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h37.275v320H32c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h160c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-37.621V288H357.62v128H320c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h160c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-37.275V96H480c8.837 0 16-7.163 16-16z"],
- "headphones": [512, 512, [], "f025", "M256 32C114.52 32 0 146.496 0 288v48a32 32 0 0 0 17.689 28.622l14.383 7.191C34.083 431.903 83.421 480 144 480h24c13.255 0 24-10.745 24-24V280c0-13.255-10.745-24-24-24h-24c-31.342 0-59.671 12.879-80 33.627V288c0-105.869 86.131-192 192-192s192 86.131 192 192v1.627C427.671 268.879 399.342 256 368 256h-24c-13.255 0-24 10.745-24 24v176c0 13.255 10.745 24 24 24h24c60.579 0 109.917-48.098 111.928-108.187l14.382-7.191A32 32 0 0 0 512 336v-48c0-141.479-114.496-256-256-256z"],
- "heart": [576, 512, [], "f004", "M414.9 24C361.8 24 312 65.7 288 89.3 264 65.7 214.2 24 161.1 24 70.3 24 16 76.9 16 165.5c0 72.6 66.8 133.3 69.2 135.4l187 180.8c8.8 8.5 22.8 8.5 31.6 0l186.7-180.2c2.7-2.7 69.5-63.5 69.5-136C560 76.9 505.7 24 414.9 24z"],
- "heartbeat": [576, 512, [], "f21e", "M47.9 257C31.6 232.7 16 200.5 16 165.5 16 76.9 70.3 24 161.1 24 214.2 24 264 65.7 288 89.3 312 65.7 361.8 24 414.9 24 505.7 24 560 76.9 560 165.5c0 35-15.5 67.2-31.9 91.5H408l-26.4-58.6c-4.7-8.9-17.6-8.5-21.6.7l-53.3 134.6L235.4 120c-3.7-10.6-18.7-10.7-22.6-.2l-48 137.2H47.9zm348 32c-4.5 0-8.6-2.5-10.6-6.4l-12.8-32.5-56.9 142.8c-4.4 9.9-18.7 9.4-22.3-.9l-69.7-209.2-33.6 98.4c-1.7 4.7-6.2 7.8-11.2 7.8H73.4c5.3 5.7-12.8-12 198.9 192.6 8.8 8.5 22.8 8.5 31.6 0 204.3-197.2 191-184 199-192.6h-107z"],
- "history": [512, 512, [], "f1da", "M504 255.531c.253 136.64-111.18 248.372-247.82 248.468-59.015.042-113.223-20.53-155.822-54.911-11.077-8.94-11.905-25.541-1.839-35.607l11.267-11.267c8.609-8.609 22.353-9.551 31.891-1.984C173.062 425.135 212.781 440 256 440c101.705 0 184-82.311 184-184 0-101.705-82.311-184-184-184-48.814 0-93.149 18.969-126.068 49.932l50.754 50.754c10.08 10.08 2.941 27.314-11.313 27.314H24c-8.837 0-16-7.163-16-16V38.627c0-14.254 17.234-21.393 27.314-11.314l49.372 49.372C129.209 34.136 189.552 8 256 8c136.81 0 247.747 110.78 248 247.531zm-180.912 78.784l9.823-12.63c8.138-10.463 6.253-25.542-4.21-33.679L288 256.349V152c0-13.255-10.745-24-24-24h-16c-13.255 0-24 10.745-24 24v135.651l65.409 50.874c10.463 8.137 25.541 6.253 33.679-4.21z"],
- "home": [576, 512, [], "f015", "M488 312.7V456c0 13.3-10.7 24-24 24H348c-6.6 0-12-5.4-12-12V356c0-6.6-5.4-12-12-12h-72c-6.6 0-12 5.4-12 12v112c0 6.6-5.4 12-12 12H112c-13.3 0-24-10.7-24-24V312.7c0-3.6 1.6-7 4.4-9.3l188-154.8c4.4-3.6 10.8-3.6 15.3 0l188 154.8c2.7 2.3 4.3 5.7 4.3 9.3zm83.6-60.9L488 182.9V44.4c0-6.6-5.4-12-12-12h-56c-6.6 0-12 5.4-12 12V117l-89.5-73.7c-17.7-14.6-43.3-14.6-61 0L4.4 251.8c-5.1 4.2-5.8 11.8-1.6 16.9l25.5 31c4.2 5.1 11.8 5.8 16.9 1.6l235.2-193.7c4.4-3.6 10.8-3.6 15.3 0l235.2 193.7c5.1 4.2 12.7 3.5 16.9-1.6l25.5-31c4.2-5.2 3.4-12.7-1.7-16.9z"],
- "hospital": [448, 512, [], "f0f8", "M448 492v20H0v-20c0-6.627 5.373-12 12-12h20V120c0-13.255 10.745-24 24-24h88V24c0-13.255 10.745-24 24-24h112c13.255 0 24 10.745 24 24v72h88c13.255 0 24 10.745 24 24v360h20c6.627 0 12 5.373 12 12zM308 192h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zm-168 64h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12zm104 128h-40c-6.627 0-12 5.373-12 12v84h64v-84c0-6.627-5.373-12-12-12zm64-96h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zm-116 12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40zM182 96h26v26a6 6 0 0 0 6 6h20a6 6 0 0 0 6-6V96h26a6 6 0 0 0 6-6V70a6 6 0 0 0-6-6h-26V38a6 6 0 0 0-6-6h-20a6 6 0 0 0-6 6v26h-26a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6z"],
- "hourglass": [384, 512, [], "f254", "M360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64z"],
- "hourglass-end": [384, 512, [], "f253", "M360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64zM192 208c-57.787 0-104-66.518-104-144h208c0 77.945-46.51 144-104 144z"],
- "hourglass-half": [384, 512, [], "f252", "M360 0H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24zm-75.078 384H99.08c17.059-46.797 52.096-80 92.92-80 40.821 0 75.862 33.196 92.922 80zm.019-256H99.078C91.988 108.548 88 86.748 88 64h208c0 22.805-3.987 44.587-11.059 64z"],
- "hourglass-start": [384, 512, [], "f251", "M360 0H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24zm-64 448H88c0-77.458 46.204-144 104-144 57.786 0 104 66.517 104 144z"],
- "i-cursor": [256, 512, [], "f246", "M256 52.048V12.065C256 5.496 250.726.148 244.158.066 211.621-.344 166.469.011 128 37.959 90.266.736 46.979-.114 11.913.114 5.318.157 0 5.519 0 12.114v39.645c0 6.687 5.458 12.078 12.145 11.998C38.111 63.447 96 67.243 96 112.182V224H60c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h36v112c0 44.932-56.075 48.031-83.95 47.959C5.404 447.942 0 453.306 0 459.952v39.983c0 6.569 5.274 11.917 11.842 11.999 32.537.409 77.689.054 116.158-37.894 37.734 37.223 81.021 38.073 116.087 37.845 6.595-.043 11.913-5.405 11.913-12V460.24c0-6.687-5.458-12.078-12.145-11.998C217.889 448.553 160 444.939 160 400V288h36c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-36V112.182c0-44.932 56.075-48.213 83.95-48.142 6.646.018 12.05-5.346 12.05-11.992z"],
- "id-badge": [384, 512, [], "f2c1", "M0 464V48C0 21.49 21.49 0 48 0h288c26.51 0 48 21.49 48 48v416c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48zm192-144c53.019 0 96-42.981 96-96s-42.981-96-96-96-96 42.981-96 96 42.981 96 96 96zm94.317 17.474l-22.954-7.173C242.437 344.413 217.802 352 192 352s-50.437-7.587-71.363-21.699l-22.954 7.173C77.644 343.736 64 362.295 64 383.289V424c0 13.255 10.745 24 24 24h208c13.255 0 24-10.745 24-24v-40.711c0-20.994-13.644-39.553-33.683-45.815zM352 52v-8c0-6.627-5.373-12-12-12H44c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h296c6.627 0 12-5.373 12-12z"],
- "id-card": [512, 512, [], "f2c2", "M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM160 160c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64m79.589 154.53l-28.281-9.427C196.458 314.532 178.856 320 160 320s-36.458-5.468-51.309-14.897L80.41 314.53A24 24 0 0 0 64 337.298V360c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24v-22.702a24 24 0 0 0-16.411-22.768zM448 340v-8c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h136c6.627 0 12-5.373 12-12zm0-64v-8c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h136c6.627 0 12-5.373 12-12zm0-64v-8c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h136c6.627 0 12-5.373 12-12zm32-96v-8c0-6.627-5.373-12-12-12H44c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h424c6.627 0 12-5.373 12-12z"],
- "image": [512, 512, [], "f03e", "M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"],
- "images": [576, 512, [], "f302", "M480 416v16c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V176c0-26.51 21.49-48 48-48h16v208c0 44.112 35.888 80 80 80h336zm96-80V80c0-26.51-21.49-48-48-48H144c-26.51 0-48 21.49-48 48v256c0 26.51 21.49 48 48 48h384c26.51 0 48-21.49 48-48zM256 128c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-96 144l55.515-55.515c4.686-4.686 12.284-4.686 16.971 0L272 256l135.515-135.515c4.686-4.686 12.284-4.686 16.971 0L512 208v112H160v-48z"],
- "inbox": [576, 512, [], "f01c", "M567.938 243.908L462.25 85.374A48.003 48.003 0 0 0 422.311 64H153.689a48 48 0 0 0-39.938 21.374L8.062 243.908A47.994 47.994 0 0 0 0 270.533V400c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V270.533a47.994 47.994 0 0 0-8.062-26.625zM162.252 128h251.497l85.333 128H376l-32 64H232l-32-64H76.918l85.334-128z"],
- "indent": [448, 512, [], "f03c", "M0 84V44c0-8.837 7.163-16 16-16h416c8.837 0 16 7.163 16 16v40c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16zm176 144h256c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H176c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zM16 484h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm160-128h256c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H176c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm-52.687-111.313l-96-95.984C17.266 138.652 0 145.776 0 160.016v191.975c0 14.329 17.325 21.304 27.313 11.313l96-95.992c6.249-6.247 6.249-16.377 0-22.625z"],
- "industry": [512, 512, [], "f275", "M475.115 163.781L336 252.309v-68.28c0-18.916-20.931-30.399-36.885-20.248L160 252.309V56c0-13.255-10.745-24-24-24H24C10.745 32 0 42.745 0 56v400c0 13.255 10.745 24 24 24h464c13.255 0 24-10.745 24-24V184.029c0-18.917-20.931-30.399-36.885-20.248z"],
- "info": [192, 512, [], "f129", "M20 424.229h20V279.771H20c-11.046 0-20-8.954-20-20V212c0-11.046 8.954-20 20-20h112c11.046 0 20 8.954 20 20v212.229h20c11.046 0 20 8.954 20 20V492c0 11.046-8.954 20-20 20H20c-11.046 0-20-8.954-20-20v-47.771c0-11.046 8.954-20 20-20zM96 0C56.235 0 24 32.235 24 72s32.235 72 72 72 72-32.235 72-72S135.764 0 96 0z"],
- "info-circle": [512, 512, [], "f05a", "M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"],
- "italic": [320, 512, [], "f033", "M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z"],
- "key": [512, 512, [], "f084", "M512 176.001C512 273.203 433.202 352 336 352c-11.22 0-22.19-1.062-32.827-3.069l-24.012 27.014A23.999 23.999 0 0 1 261.223 384H224v40c0 13.255-10.745 24-24 24h-40v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-78.059c0-6.365 2.529-12.47 7.029-16.971l161.802-161.802C163.108 213.814 160 195.271 160 176 160 78.798 238.797.001 335.999 0 433.488-.001 512 78.511 512 176.001zM336 128c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z"],
- "keyboard": [576, 512, [], "f11c", "M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"],
- "language": [640, 512, [], "f1ab", "M304 416H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h280v320zm-120.676-72.622A12 12 0 0 0 194.839 352h22.863c8.22 0 14.007-8.078 11.362-15.861L171.61 167.085a12 12 0 0 0-11.362-8.139h-32.489a12.001 12.001 0 0 0-11.362 8.139L58.942 336.139C56.297 343.922 62.084 352 70.304 352h22.805a12 12 0 0 0 11.535-8.693l9.118-31.807h60.211l9.351 31.878zm-39.051-140.42s4.32 21.061 7.83 33.21l10.8 37.531h-38.07l11.07-37.531c3.51-12.15 7.83-33.21 7.83-33.21h.54zM616 416H336V96h280c13.255 0 24 10.745 24 24v272c0 13.255-10.745 24-24 24zm-36-228h-64v-16c0-6.627-5.373-12-12-12h-16c-6.627 0-12 5.373-12 12v16h-64c-6.627 0-12 5.373-12 12v16c0 6.627 5.373 12 12 12h114.106c-6.263 14.299-16.518 28.972-30.023 43.206-6.56-6.898-12.397-13.91-17.365-20.933-3.639-5.144-10.585-6.675-15.995-3.446l-7.28 4.346-6.498 3.879c-5.956 3.556-7.693 11.421-3.735 17.117 6.065 8.729 13.098 17.336 20.984 25.726-8.122 6.226-16.841 12.244-26.103 17.964-5.521 3.41-7.381 10.556-4.162 16.19l7.941 13.896c3.362 5.883 10.935 7.826 16.706 4.276 12.732-7.831 24.571-16.175 35.443-24.891 10.917 8.761 22.766 17.102 35.396 24.881 5.774 3.556 13.353 1.618 16.717-4.27l7.944-13.903c3.213-5.623 1.37-12.76-4.135-16.171a312.737 312.737 0 0 1-26.06-18.019c21.024-22.425 35.768-46.289 42.713-69.85H580c6.627 0 12-5.373 12-12v-16c0-6.625-5.373-11.998-12-11.998z"],
- "laptop": [640, 512, [], "f109", "M512 64v256H128V64h384m16-64H112C85.5 0 64 21.5 64 48v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm100 416H389.5c-3 0-5.5 2.1-5.9 5.1C381.2 436.3 368 448 352 448h-64c-16 0-29.2-11.7-31.6-26.9-.5-2.9-3-5.1-5.9-5.1H12c-6.6 0-12 5.4-12 12v36c0 26.5 21.5 48 48 48h544c26.5 0 48-21.5 48-48v-36c0-6.6-5.4-12-12-12z"],
- "leaf": [576, 512, [], "f06c", "M395.4 420.8c-43.4 21.6-91.9 34.4-140.8 34.4-82.2 0-151.1-40.1-151.1-40.1-16.1 0-35.4 64.9-63.3 64.9-27 0-40.2-24-40.2-38.5 0-33.1 63.6-58.9 63.6-77.3 0 0-12.5-21.2-12.5-59.2 0-101.2 81.3-173.4 172.6-203.3 65.9-21.6 206 3.5 250.7-38.5C492.1 47 500.8 32 527.8 32c36.3 0 48.2 93.2 48.2 120.3 0 110.9-54.5 206.5-180.6 268.5zm-254.3-75.6c63.5-89.9 144.5-128.8 257.7-120 8.8.7 16.5-5.9 17.2-14.7.7-8.8-5.9-16.5-14.7-17.2-124-9.6-215.9 33.9-286.3 133.5-5.1 7.2-3.4 17.2 3.8 22.3 7.2 5.1 17.2 3.4 22.3-3.9z"],
- "lemon": [512, 512, [], "f094", "M489.038 22.963C465.944-.13 434.648-5.93 413.947 6.129c-58.906 34.312-181.25-53.077-321.073 86.746S40.441 355.041 6.129 413.945c-12.059 20.702-6.26 51.999 16.833 75.093 23.095 23.095 54.392 28.891 75.095 16.832 58.901-34.31 181.246 53.079 321.068-86.743S471.56 156.96 505.871 98.056c12.059-20.702 6.261-51.999-16.833-75.093zM243.881 95.522c-58.189 14.547-133.808 90.155-148.358 148.358-1.817 7.27-8.342 12.124-15.511 12.124-1.284 0-2.59-.156-3.893-.481-8.572-2.144-13.784-10.83-11.642-19.403C81.901 166.427 166.316 81.93 236.119 64.478c8.575-2.143 17.261 3.069 19.403 11.642s-3.069 17.259-11.641 19.402z"],
- "level-down-alt": [320, 512, [], "f3be", "M313.553 392.331L209.587 504.334c-9.485 10.214-25.676 10.229-35.174 0L70.438 392.331C56.232 377.031 67.062 352 88.025 352H152V80H68.024a11.996 11.996 0 0 1-8.485-3.515l-56-56C-4.021 12.926 1.333 0 12.024 0H208c13.255 0 24 10.745 24 24v328h63.966c20.878 0 31.851 24.969 17.587 40.331z"],
- "level-up-alt": [320, 512, [], "f3bf", "M313.553 119.669L209.587 7.666c-9.485-10.214-25.676-10.229-35.174 0L70.438 119.669C56.232 134.969 67.062 160 88.025 160H152v272H68.024a11.996 11.996 0 0 0-8.485 3.515l-56 56C-4.021 499.074 1.333 512 12.024 512H208c13.255 0 24-10.745 24-24V160h63.966c20.878 0 31.851-24.969 17.587-40.331z"],
- "life-ring": [512, 512, [], "f1cd", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm173.696 119.559l-63.399 63.399c-10.987-18.559-26.67-34.252-45.255-45.255l63.399-63.399a218.396 218.396 0 0 1 45.255 45.255zM256 352c-53.019 0-96-42.981-96-96s42.981-96 96-96 96 42.981 96 96-42.981 96-96 96zM127.559 82.304l63.399 63.399c-18.559 10.987-34.252 26.67-45.255 45.255l-63.399-63.399a218.372 218.372 0 0 1 45.255-45.255zM82.304 384.441l63.399-63.399c10.987 18.559 26.67 34.252 45.255 45.255l-63.399 63.399a218.396 218.396 0 0 1-45.255-45.255zm302.137 45.255l-63.399-63.399c18.559-10.987 34.252-26.67 45.255-45.255l63.399 63.399a218.403 218.403 0 0 1-45.255 45.255z"],
- "lightbulb": [384, 512, [], "f0eb", "M272 428v28c0 10.449-6.68 19.334-16 22.629V488c0 13.255-10.745 24-24 24h-80c-13.255 0-24-10.745-24-24v-9.371c-9.32-3.295-16-12.18-16-22.629v-28c0-6.627 5.373-12 12-12h136c6.627 0 12 5.373 12 12zm-143.107-44c-9.907 0-18.826-6.078-22.376-15.327C67.697 267.541 16 277.731 16 176 16 78.803 94.805 0 192 0s176 78.803 176 176c0 101.731-51.697 91.541-90.516 192.673-3.55 9.249-12.47 15.327-22.376 15.327H128.893zM112 176c0-44.112 35.888-80 80-80 8.837 0 16-7.164 16-16s-7.163-16-16-16c-61.757 0-112 50.243-112 112 0 8.836 7.164 16 16 16s16-7.164 16-16z"],
- "link": [512, 512, [], "f0c1", "M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"],
- "lira-sign": [384, 512, [], "f195", "M371.994 256h-48.019C317.64 256 312 260.912 312 267.246 312 368 230.179 416 144 416V256.781l134.603-29.912A12 12 0 0 0 288 215.155v-40.976c0-7.677-7.109-13.38-14.603-11.714L144 191.219V160.78l134.603-29.912A12 12 0 0 0 288 119.154V78.179c0-7.677-7.109-13.38-14.603-11.714L144 95.219V44c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v68.997L9.397 125.131A12 12 0 0 0 0 136.845v40.976c0 7.677 7.109 13.38 14.603 11.714L64 178.558v30.439L9.397 221.131A12 12 0 0 0 0 232.845v40.976c0 7.677 7.109 13.38 14.603 11.714L64 274.558V468c0 6.627 5.373 12 12 12h79.583c134.091 0 223.255-77.834 228.408-211.592.261-6.782-5.211-12.408-11.997-12.408z"],
- "list": [512, 512, [], "f03a", "M128 116V76c0-8.837 7.163-16 16-16h352c8.837 0 16 7.163 16 16v40c0 8.837-7.163 16-16 16H144c-8.837 0-16-7.163-16-16zm16 176h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zM16 144h64c8.837 0 16-7.163 16-16V64c0-8.837-7.163-16-16-16H16C7.163 48 0 55.163 0 64v64c0 8.837 7.163 16 16 16zm0 160h64c8.837 0 16-7.163 16-16v-64c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v64c0 8.837 7.163 16 16 16zm0 160h64c8.837 0 16-7.163 16-16v-64c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v64c0 8.837 7.163 16 16 16z"],
- "list-alt": [512, 512, [], "f022", "M464 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zM128 120c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm288-136v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12z"],
- "list-ol": [512, 512, [], "f0cb", "M3.263 139.527c0-7.477 3.917-11.572 11.573-11.572h15.131V88.078c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.938C32.815 33.602 36.732 32 42.785 32H54.89c7.656 0 11.749 3.916 11.749 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.901c0 7.477-3.917 11.572-11.572 11.572H14.836c-7.656 0-11.573-4.095-11.573-11.572v-8.902zM2.211 304.591c0-47.278 50.955-56.383 50.955-69.165 0-7.18-5.954-8.755-9.28-8.755-3.153 0-6.479 1.051-9.455 3.852-5.079 4.903-10.507 7.004-16.111 2.451l-8.579-6.829c-5.779-4.553-7.18-9.805-2.803-15.409C13.592 201.981 26.025 192 47.387 192c19.437 0 44.476 10.506 44.476 39.573 0 38.347-46.753 46.402-48.679 56.909h39.049c7.529 0 11.557 4.027 11.557 11.382v8.755c0 7.354-4.028 11.382-11.557 11.382h-67.94c-7.005 0-12.083-4.028-12.083-11.382v-4.028zM5.654 454.61l5.603-9.28c3.853-6.654 9.105-7.004 15.584-3.152 4.903 2.101 9.63 3.152 14.359 3.152 10.155 0 14.358-3.502 14.358-8.23 0-6.654-5.604-9.106-15.934-9.106h-4.728c-5.954 0-9.28-2.101-12.258-7.88l-1.05-1.926c-2.451-4.728-1.226-9.806 2.801-14.884l5.604-7.004c6.829-8.405 12.257-13.483 12.257-13.483v-.35s-4.203 1.051-12.608 1.051H16.685c-7.53 0-11.383-4.028-11.383-11.382v-8.755c0-7.53 3.853-11.382 11.383-11.382h58.484c7.529 0 11.382 4.027 11.382 11.382v3.327c0 5.778-1.401 9.806-5.079 14.183l-17.509 20.137c19.611 5.078 28.716 20.487 28.716 34.845 0 21.363-14.358 44.126-48.503 44.126-16.636 0-28.192-4.728-35.896-9.455-5.779-4.202-6.304-9.805-2.626-15.934zM144 132h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"],
- "list-ul": [512, 512, [], "f0ca", "M96 96c0 26.51-21.49 48-48 48S0 122.51 0 96s21.49-48 48-48 48 21.49 48 48zM48 208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm0 160c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm96-236h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"],
- "location-arrow": [512, 512, [], "f124", "M443.683 4.529L27.818 196.418C-18.702 217.889-3.39 288 47.933 288H224v175.993c0 51.727 70.161 66.526 91.582 20.115L507.38 68.225c18.905-40.961-23.752-82.133-63.697-63.696z"],
- "lock": [448, 512, [], "f023", "M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"],
- "lock-open": [576, 512, [], "f3c1", "M423.5 0C339.5.3 272 69.5 272 153.5V224H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48h-48v-71.1c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v80c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-80C576 68 507.5-.3 423.5 0z"],
- "long-arrow-alt-down": [256, 512, [], "f309", "M168 345.941V44c0-6.627-5.373-12-12-12h-56c-6.627 0-12 5.373-12 12v301.941H41.941c-21.382 0-32.09 25.851-16.971 40.971l86.059 86.059c9.373 9.373 24.569 9.373 33.941 0l86.059-86.059c15.119-15.119 4.411-40.971-16.971-40.971H168z"],
- "long-arrow-alt-left": [448, 512, [], "f30a", "M134.059 296H436c6.627 0 12-5.373 12-12v-56c0-6.627-5.373-12-12-12H134.059v-46.059c0-21.382-25.851-32.09-40.971-16.971L7.029 239.029c-9.373 9.373-9.373 24.569 0 33.941l86.059 86.059c15.119 15.119 40.971 4.411 40.971-16.971V296z"],
- "long-arrow-alt-right": [448, 512, [], "f30b", "M313.941 216H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h301.941v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.569 0-33.941l-86.059-86.059c-15.119-15.119-40.971-4.411-40.971 16.971V216z"],
- "long-arrow-alt-up": [256, 512, [], "f30c", "M88 166.059V468c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12V166.059h46.059c21.382 0 32.09-25.851 16.971-40.971l-86.059-86.059c-9.373-9.373-24.569-9.373-33.941 0l-86.059 86.059c-15.119 15.119-4.411 40.971 16.971 40.971H88z"],
- "low-vision": [576, 512, [], "f2a8", "M569.344 231.631C512.96 135.949 407.81 72 288 72c-28.468 0-56.102 3.619-82.451 10.409L152.778 10.24c-7.601-10.858-22.564-13.5-33.423-5.9l-13.114 9.178c-10.86 7.601-13.502 22.566-5.9 33.426l43.131 58.395C89.449 131.73 40.228 174.683 6.682 231.581c-.01.017-.023.033-.034.05-8.765 14.875-8.964 33.528 0 48.739 38.5 65.332 99.742 115.862 172.859 141.349L55.316 244.302A272.194 272.194 0 0 1 83.61 208.39l119.4 170.58h.01l40.63 58.04a330.055 330.055 0 0 0 78.94 1.17l-189.98-271.4a277.628 277.628 0 0 1 38.777-21.563l251.836 356.544c7.601 10.858 22.564 13.499 33.423 5.9l13.114-9.178c10.86-7.601 13.502-22.567 5.9-33.426l-43.12-58.377-.007-.009c57.161-27.978 104.835-72.04 136.81-126.301a47.938 47.938 0 0 0 .001-48.739zM390.026 345.94l-19.066-27.23c24.682-32.567 27.711-76.353 8.8-111.68v.03c0 23.65-19.17 42.82-42.82 42.82-23.828 0-42.82-19.349-42.82-42.82 0-23.65 19.17-42.82 42.82-42.82h.03c-24.75-13.249-53.522-15.643-79.51-7.68l-19.068-27.237C253.758 123.306 270.488 120 288 120c75.162 0 136 60.826 136 136 0 34.504-12.833 65.975-33.974 89.94z"],
- "magic": [512, 512, [], "f0d0", "M101.1 505L7 410.9c-9.4-9.4-9.4-24.6 0-33.9L377 7c9.4-9.4 24.6-9.4 33.9 0l94.1 94.1c9.4 9.4 9.4 24.6 0 33.9L135 505c-9.3 9.3-24.5 9.3-33.9 0zM304 159.2l48.8 48.8 89.9-89.9-48.8-48.8-89.9 89.9zM138.9 39.3l-11.7 23.8-26.2 3.8c-4.7.7-6.6 6.5-3.2 9.8l19 18.5-4.5 26.1c-.8 4.7 4.1 8.3 8.3 6.1L144 115l23.4 12.3c4.2 2.2 9.1-1.4 8.3-6.1l-4.5-26.1 19-18.5c3.4-3.3 1.5-9.1-3.2-9.8L160.8 63l-11.7-23.8c-2-4.1-8.1-4.1-10.2.1zm97.7-20.7l-7.8 15.8-17.5 2.6c-3.1.5-4.4 4.3-2.1 6.5l12.6 12.3-3 17.4c-.5 3.1 2.8 5.5 5.6 4L240 69l15.6 8.2c2.8 1.5 6.1-.9 5.6-4l-3-17.4 12.6-12.3c2.3-2.2 1-6.1-2.1-6.5l-17.5-2.5-7.8-15.8c-1.4-3-5.4-3-6.8-.1zm-192 0l-7.8 15.8L19.3 37c-3.1.5-4.4 4.3-2.1 6.5l12.6 12.3-3 17.4c-.5 3.1 2.8 5.5 5.6 4L48 69l15.6 8.2c2.8 1.5 6.1-.9 5.6-4l-3-17.4 12.6-12.3c2.3-2.2 1-6.1-2.1-6.5l-17.5-2.5-7.8-15.8c-1.4-3-5.4-3-6.8-.1zm416 223.5l-7.8 15.8-17.5 2.5c-3.1.5-4.4 4.3-2.1 6.5l12.6 12.3-3 17.4c-.5 3.1 2.8 5.5 5.6 4l15.6-8.2 15.6 8.2c2.8 1.5 6.1-.9 5.6-4l-3-17.4 12.6-12.3c2.3-2.2 1-6.1-2.1-6.5l-17.5-2.5-7.8-15.8c-1.4-2.8-5.4-2.8-6.8 0z"],
- "magnet": [512, 512, [], "f076", "M164.1 160H12c-6.6 0-12-5.4-12-12V68c0-19.9 16.1-36 36-36h104c19.9 0 36 16.1 36 36v80c.1 6.6-5.3 12-11.9 12zm348-12V67.9c0-19.9-16.1-36-36-36h-104c-19.9 0-36 16.1-36 36v80c0 6.6 5.4 12 12 12h152c6.6.1 12-5.3 12-11.9zm-164 44c-6.6 0-12 5.4-12 12v52c0 128.1-160 127.9-160 0v-52c0-6.6-5.4-12-12-12h-152c-6.7 0-12 5.4-12 12.1.1 21.4.6 40.3 0 53.3C.1 408 136.3 504 256.9 504 377.5 504 512 408 512 257.3c-.6-12.8-.2-33 0-53.2 0-6.7-5.3-12.1-12-12.1H348.1z"],
- "male": [192, 512, [], "f183", "M96 0c35.346 0 64 28.654 64 64s-28.654 64-64 64-64-28.654-64-64S60.654 0 96 0m48 144h-11.36c-22.711 10.443-49.59 10.894-73.28 0H48c-26.51 0-48 21.49-48 48v136c0 13.255 10.745 24 24 24h16v136c0 13.255 10.745 24 24 24h64c13.255 0 24-10.745 24-24V352h16c13.255 0 24-10.745 24-24V192c0-26.51-21.49-48-48-48z"],
- "map": [576, 512, [], "f279", "M576 56.015v335.97a23.998 23.998 0 0 1-13.267 21.466l-128 64C418.948 485.344 400 473.992 400 455.985v-335.97a23.998 23.998 0 0 1 13.267-21.466l128-64C557.052 26.656 576 38.008 576 56.015zm-206.253 42.07l-144-64c-15.751-7-33.747 4.461-33.747 21.932v335.967a24 24 0 0 0 14.253 21.931l144 64c15.751 7 33.747-4.461 33.747-21.931V120.017a24 24 0 0 0-14.253-21.932zm-228.48-63.536l-128 63.985A23.998 23.998 0 0 0 0 120v335.985c0 18.007 18.948 29.359 34.733 21.466l128-63.985A23.998 23.998 0 0 0 176 392V56.015c0-18.007-18.948-29.359-34.733-21.466z"],
- "map-marker": [384, 512, [], "f041", "M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z"],
- "map-marker-alt": [384, 512, [], "f3c5", "M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"],
- "map-pin": [320, 512, [], "f276", "M192 300.813v172.82l-22.015 33.023c-4.75 7.125-15.219 7.125-19.969 0L128 473.633v-172.82a162.221 162.221 0 0 0 64 0zM160 0c79.529 0 144 64.471 144 144s-64.471 144-144 144S16 223.529 16 144 80.471 0 160 0M80 136c0-39.701 32.299-72 72-72a8 8 0 0 0 0-16c-48.523 0-88 39.477-88 88a8 8 0 0 0 16 0z"],
- "map-signs": [512, 512, [], "f277", "M487.515 104.485L439.03 152.97a23.998 23.998 0 0 1-16.97 7.029H56c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h160v-8c0-13.255 10.745-24 24-24h32c13.255 0 24 10.745 24 24v8h126.059a24 24 0 0 1 16.97 7.029l48.485 48.485c4.687 4.687 4.687 12.285.001 16.971zM216 368v120c0 13.255 10.745 24 24 24h32c13.255 0 24-10.745 24-24V368h-80zm240-144H296v-48h-80v48H89.941a24 24 0 0 0-16.97 7.029l-48.485 48.485c-4.686 4.686-4.686 12.284 0 16.971l48.485 48.485a23.998 23.998 0 0 0 16.97 7.029H456c13.255 0 24-10.745 24-24v-80C480 234.745 469.255 224 456 224z"],
- "mars": [384, 512, [], "f222", "M372 64h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-80.7 80.7c-22.2-14-48.5-22.1-76.7-22.1C64.5 160 0 224.5 0 304s64.5 144 144 144 144-64.5 144-144c0-28.2-8.1-54.5-22.1-76.7l80.7-80.7 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V76c0-6.6-5.4-12-12-12zM144 384c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"],
- "mars-double": [512, 512, [], "f227", "M340 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-48.7 48.7C198.5 72.1 172.2 64 144 64 64.5 64 0 128.5 0 208s64.5 144 144 144 144-64.5 144-144c0-28.2-8.1-54.5-22.1-76.7l48.7-48.7 16.9 16.9c2.4 2.4 5.5 3.5 8.4 3.5 6.2 0 12.1-4.8 12.1-12V12c0-6.6-5.4-12-12-12zM144 288c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80zm356-128.1h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-48.7 48.7c-18.2-11.4-39-18.9-61.5-21.3-2.1 21.8-8.2 43.3-18.4 63.3 1.1 0 2.2-.1 3.2-.1 44.1 0 80 35.9 80 80s-35.9 80-80 80-80-35.9-80-80c0-1.1 0-2.2.1-3.2-20 10.2-41.5 16.4-63.3 18.4C168.4 455.6 229.6 512 304 512c79.5 0 144-64.5 144-144 0-28.2-8.1-54.5-22.1-76.7l48.7-48.7 16.9 16.9c2.4 2.4 5.4 3.5 8.4 3.5 6.2 0 12.1-4.8 12.1-12v-79c0-6.7-5.4-12.1-12-12.1z"],
- "mars-stroke": [384, 512, [], "f229", "M372 64h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-17.5 17.5-14.1-14.1c-4.7-4.7-12.3-4.7-17 0L224.5 133c-4.7 4.7-4.7 12.3 0 17l14.1 14.1-18 18c-22.2-14-48.5-22.1-76.7-22.1C64.5 160 0 224.5 0 304s64.5 144 144 144 144-64.5 144-144c0-28.2-8.1-54.5-22.1-76.7l18-18 14.1 14.1c4.7 4.7 12.3 4.7 17 0l28.3-28.3c4.7-4.7 4.7-12.3 0-17L329.2 164l17.5-17.5 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V76c-.1-6.6-5.5-12-12.1-12zM144 384c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"],
- "mars-stroke-h": [480, 512, [], "f22b", "M476.2 247.5l-55.9-55.9c-7.6-7.6-20.5-2.2-20.5 8.5V224H376v-20c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v20h-27.6c-5.8-25.6-18.7-49.9-38.6-69.8C189.6 98 98.4 98 42.2 154.2c-56.2 56.2-56.2 147.4 0 203.6 56.2 56.2 147.4 56.2 203.6 0 19.9-19.9 32.8-44.2 38.6-69.8H312v20c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-20h23.9v23.9c0 10.7 12.9 16 20.5 8.5l55.9-55.9c4.6-4.7 4.6-12.3-.1-17zm-275.6 65.1c-31.2 31.2-81.9 31.2-113.1 0-31.2-31.2-31.2-81.9 0-113.1 31.2-31.2 81.9-31.2 113.1 0 31.2 31.1 31.2 81.9 0 113.1z"],
- "mars-stroke-v": [288, 512, [], "f22a", "M245.8 234.2c-19.9-19.9-44.2-32.8-69.8-38.6v-25.4h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20V81.4h23.9c10.7 0 16-12.9 8.5-20.5L152.5 5.1c-4.7-4.7-12.3-4.7-17 0L79.6 61c-7.6 7.6-2.2 20.5 8.5 20.5H112v24.7H92c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h20v25.4c-25.6 5.8-49.9 18.7-69.8 38.6-56.2 56.2-56.2 147.4 0 203.6 56.2 56.2 147.4 56.2 203.6 0 56.3-56.2 56.3-147.4 0-203.6zm-45.2 158.4c-31.2 31.2-81.9 31.2-113.1 0-31.2-31.2-31.2-81.9 0-113.1 31.2-31.2 81.9-31.2 113.1 0 31.2 31.1 31.2 81.9 0 113.1z"],
- "medkit": [512, 512, [], "f0fa", "M96 480h320V128h-32V80c0-26.51-21.49-48-48-48H176c-26.51 0-48 21.49-48 48v48H96v352zm96-384h128v32H192V96zm320 80v256c0 26.51-21.49 48-48 48h-16V128h16c26.51 0 48 21.49 48 48zM64 480H48c-26.51 0-48-21.49-48-48V176c0-26.51 21.49-48 48-48h16v352zm288-208v32c0 8.837-7.163 16-16 16h-48v48c0 8.837-7.163 16-16 16h-32c-8.837 0-16-7.163-16-16v-48h-48c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h48v-48c0-8.837 7.163-16 16-16h32c8.837 0 16 7.163 16 16v48h48c8.837 0 16 7.163 16 16z"],
- "meh": [512, 512, [], "f11a", "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-396-64c0 37.497 30.503 68 68 68s68-30.503 68-68-30.503-68-68-68-68 30.503-68 68zm160.5 0c0 37.221 30.279 67.5 67.5 67.5s67.5-30.279 67.5-67.5-30.279-67.5-67.5-67.5-67.5 30.279-67.5 67.5zm67.5-48a47.789 47.789 0 0 0-22.603 5.647h.015c10.916 0 19.765 8.849 19.765 19.765s-8.849 19.765-19.765 19.765-19.765-8.849-19.765-19.765v-.015A47.789 47.789 0 0 0 288 192c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48zm-160 0a47.789 47.789 0 0 0-22.603 5.647h.015c10.916 0 19.765 8.849 19.765 19.765s-8.849 19.765-19.765 19.765-19.765-8.849-19.765-19.765v-.015A47.789 47.789 0 0 0 128 192c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48zm160 208H176c-21.178 0-21.169 32 0 32h160c21.178 0 21.169-32 0-32z"],
- "mercury": [288, 512, [], "f223", "M288 208c0-44.2-19.9-83.7-51.2-110.1 2.5-1.8 4.9-3.8 7.2-5.8 24.7-21.2 39.8-48.8 43.2-78.8.9-7.1-4.7-13.3-11.9-13.3h-40.5C229 0 224.1 4.1 223 9.8c-2.4 12.5-9.6 24.3-20.7 33.8C187 56.8 166.3 64 144 64s-43-7.2-58.4-20.4C74.5 34.1 67.4 22.3 64.9 9.8 63.8 4.1 58.9 0 53.2 0H12.7C5.5 0-.1 6.2.8 13.3 4.2 43.4 19.2 71 44 92.2c2.3 2 4.7 3.9 7.2 5.8C19.9 124.3 0 163.8 0 208c0 68.5 47.9 125.9 112 140.4V400H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.5 112-71.9 112-140.4zm-224 0c0-44.1 35.9-80 80-80s80 35.9 80 80-35.9 80-80 80-80-35.9-80-80z"],
- "microchip": [512, 512, [], "f2db", "M416 48v416c0 26.51-21.49 48-48 48H144c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h224c26.51 0 48 21.49 48 48zm96 58v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42V88h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zm0 96v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42v-48h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zm0 96v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42v-48h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zm0 96v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42v-48h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zM30 376h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6zm0-96h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6zm0-96h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6zm0-96h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6z"],
- "microphone": [384, 512, [], "f130", "M96 256V96c0-53.019 42.981-96 96-96s96 42.981 96 96v160c0 53.019-42.981 96-96 96s-96-42.981-96-96zm252-56h-24c-6.627 0-12 5.373-12 12v42.68c0 66.217-53.082 120.938-119.298 121.318C126.213 376.38 72 322.402 72 256v-44c0-6.627-5.373-12-12-12H36c-6.627 0-12 5.373-12 12v44c0 84.488 62.693 154.597 144 166.278V468h-68c-6.627 0-12 5.373-12 12v20c0 6.627 5.373 12 12 12h184c6.627 0 12-5.373 12-12v-20c0-6.627-5.373-12-12-12h-68v-45.722c81.307-11.681 144-81.79 144-166.278v-44c0-6.627-5.373-12-12-12z"],
- "microphone-slash": [512, 512, [], "f131", "M421.45 285.195L376 239.746V212c0-6.627 5.373-12 12-12h24c6.627 0 12 5.373 12 12v44c0 9.957-.881 19.71-2.55 29.195zM352 96c0-53.019-42.981-96-96-96-32.574 0-61.354 16.227-78.71 41.035L352 215.746V96zm152.971 363.716L52.284 7.029c-9.373-9.373-24.569-9.373-33.941 0L7.029 18.343c-9.372 9.373-9.372 24.568 0 33.941L160 205.254v49.577c0 53.089 43.436 97.452 96.524 97.167 14.626-.078 28.471-3.44 40.854-9.366l17.746 17.746c-17.529 9.971-37.794 15.666-59.372 15.622C189.355 375.864 136 321.053 136 254.656V212c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v44c0 84.488 62.693 154.597 144 166.278V468h-68c-6.627 0-12 5.373-12 12v20c0 6.627 5.373 12 12 12h184c6.627 0 12-5.373 12-12v-20c0-6.627-5.373-12-12-12h-68v-45.722c25.625-3.682 49.396-13.172 69.942-27.083L459.717 504.97c9.373 9.373 24.569 9.373 33.941 0l11.313-11.313c9.372-9.373 9.372-24.568 0-33.941z"],
- "minus": [448, 512, [], "f068", "M424 318.2c13.3 0 24-10.7 24-24v-76.4c0-13.3-10.7-24-24-24H24c-13.3 0-24 10.7-24 24v76.4c0 13.3 10.7 24 24 24h400z"],
- "minus-circle": [512, 512, [], "f056", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zM124 296c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h264c6.6 0 12 5.4 12 12v56c0 6.6-5.4 12-12 12H124z"],
- "minus-square": [448, 512, [], "f146", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM92 296c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h264c6.6 0 12 5.4 12 12v56c0 6.6-5.4 12-12 12H92z"],
- "mobile": [320, 512, [], "f10b", "M272 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h224c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM160 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"],
- "mobile-alt": [320, 512, [], "f3cd", "M272 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h224c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM160 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm112-108c0 6.6-5.4 12-12 12H60c-6.6 0-12-5.4-12-12V60c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v312z"],
- "money-bill-alt": [640, 512, [], "f3d1", "M640 120v272c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h592c13.255 0 24 10.745 24 24zM96 384c0-35.346-28.654-64-64-64v64h64zm0-256H32v64c35.346 0 64-28.654 64-64zm304 128c0-53.021-35.816-96-80-96s-80 42.979-80 96c0 53.012 35.814 96 80 96 44.167 0 80-42.969 80-96zm208 64c-35.346 0-64 28.654-64 64h64v-64zm0-192h-64c0 35.346 28.654 64 64 64v-64zM277.563 299.527c0-7.477 3.917-11.572 11.573-11.572h15.131v-39.878c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.939c4.449-4.095 8.366-5.697 14.42-5.697h12.105c7.656 0 11.749 3.916 11.749 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.901c0 7.477-3.917 11.572-11.572 11.572h-67.293c-7.656 0-11.573-4.095-11.573-11.572v-8.9z"],
- "moon": [512, 512, [], "f186", "M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"],
- "motorcycle": [640, 512, [], "f21c", "M512.949 192.003c-14.862-.108-29.14 2.322-42.434 6.874L437.589 144H520c13.255 0 24-10.745 24-24V88c0-13.255-10.745-24-24-24h-45.311a24 24 0 0 0-17.839 7.945l-37.496 41.663-22.774-37.956A24 24 0 0 0 376 64h-80c-8.837 0-16 7.163-16 16v16c0 8.837 7.163 16 16 16h66.411l19.2 32H227.904c-17.727-23.073-44.924-40-99.904-40H72.54c-13.455 0-24.791 11.011-24.536 24.464C48.252 141.505 58.9 152 72 152h56c24.504 0 38.686 10.919 47.787 24.769l-11.291 20.529c-13.006-3.865-26.871-5.736-41.251-5.21C55.857 194.549 1.565 249.605.034 317.021-1.603 389.076 56.317 448 128 448c59.642 0 109.744-40.794 123.953-96h84.236c13.673 0 24.589-11.421 23.976-25.077-2.118-47.12 17.522-93.665 56.185-125.026l12.485 20.808c-27.646 23.654-45.097 58.88-44.831 98.179.47 69.556 57.203 126.452 126.758 127.11 71.629.678 129.839-57.487 129.234-129.099-.588-69.591-57.455-126.386-127.047-126.892zM128 400c-44.112 0-80-35.888-80-80s35.888-80 80-80c4.242 0 8.405.341 12.469.982L98.97 316.434C90.187 332.407 101.762 352 120 352h81.297c-12.37 28.225-40.56 48-73.297 48zm388.351-.116C470.272 402.337 432 365.554 432 320c0-21.363 8.434-40.781 22.125-55.144l49.412 82.352c4.546 7.577 14.375 10.034 21.952 5.488l13.72-8.232c7.577-4.546 10.034-14.375 5.488-21.952l-48.556-80.927A80.005 80.005 0 0 1 512 240c45.554 0 82.338 38.273 79.884 84.352-2.16 40.558-34.974 73.372-75.533 75.532z"],
- "mouse-pointer": [320, 512, [], "f245", "M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C18.729 472.71 0 463.554 0 447.977V18.299C0 1.899 19.921-6.096 30.277 5.443l284.412 292.542c11.472 11.179 3.007 31.141-12.5 31.141z"],
- "music": [512, 512, [], "f001", "M470.4 1.5l-304 96C153.1 101.7 144 114 144 128v264.6c-14.1-5.4-30.5-8.6-48-8.6-53 0-96 28.7-96 64s43 64 96 64 96-28.7 96-64V220.5l272-85.9v194c-14.1-5.4-30.5-8.6-48-8.6-53 0-96 28.7-96 64s43 64 96 64 96-28.7 96-64V32c0-21.7-21.1-37-41.6-30.5z"],
- "neuter": [288, 512, [], "f22c", "M288 176c0-79.5-64.5-144-144-144S0 96.5 0 176c0 68.5 47.9 125.9 112 140.4V468c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V316.4c64.1-14.5 112-71.9 112-140.4zm-144 80c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"],
- "newspaper": [576, 512, [], "f1ea", "M552 64H88c-13.255 0-24 10.745-24 24v8H24c-13.255 0-24 10.745-24 24v272c0 30.928 25.072 56 56 56h472c26.51 0 48-21.49 48-48V88c0-13.255-10.745-24-24-24zM56 400a8 8 0 0 1-8-8V144h16v248a8 8 0 0 1-8 8zm236-16H140c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h152c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12zm208 0H348c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h152c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12zm-208-96H140c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h152c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12zm208 0H348c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h152c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12zm0-96H140c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h360c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12z"],
- "object-group": [512, 512, [], "f247", "M480 128V96h20c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v20H64V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v40c0 6.627 5.373 12 12 12h20v320H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-20h384v20c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-20V128zM96 276V140c0-6.627 5.373-12 12-12h168c6.627 0 12 5.373 12 12v136c0 6.627-5.373 12-12 12H108c-6.627 0-12-5.373-12-12zm320 96c0 6.627-5.373 12-12 12H236c-6.627 0-12-5.373-12-12v-52h72c13.255 0 24-10.745 24-24v-72h84c6.627 0 12 5.373 12 12v136z"],
- "object-ungroup": [576, 512, [], "f248", "M64 320v26a6 6 0 0 1-6 6H6a6 6 0 0 1-6-6v-52a6 6 0 0 1 6-6h26V96H6a6 6 0 0 1-6-6V38a6 6 0 0 1 6-6h52a6 6 0 0 1 6 6v26h288V38a6 6 0 0 1 6-6h52a6 6 0 0 1 6 6v52a6 6 0 0 1-6 6h-26v192h26a6 6 0 0 1 6 6v52a6 6 0 0 1-6 6h-52a6 6 0 0 1-6-6v-26H64zm480-64v-32h26a6 6 0 0 0 6-6v-52a6 6 0 0 0-6-6h-52a6 6 0 0 0-6 6v26H408v72h8c13.255 0 24 10.745 24 24v64c0 13.255-10.745 24-24 24h-64c-13.255 0-24-10.745-24-24v-8H192v72h-26a6 6 0 0 0-6 6v52a6 6 0 0 0 6 6h52a6 6 0 0 0 6-6v-26h288v26a6 6 0 0 0 6 6h52a6 6 0 0 0 6-6v-52a6 6 0 0 0-6-6h-26V256z"],
- "outdent": [448, 512, [], "f03b", "M0 84V44c0-8.837 7.163-16 16-16h416c8.837 0 16 7.163 16 16v40c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16zm208 144h224c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H208c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zM16 484h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm192-128h224c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H208c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zM4.687 267.313l96 95.984C110.734 373.348 128 366.224 128 351.984V160.008c0-14.329-17.325-21.304-27.313-11.313l-96 95.992c-6.249 6.248-6.249 16.378 0 22.626z"],
- "paint-brush": [512, 512, [], "f1fc", "M269.9 364.6c1.4 6.4 2.1 13 2.1 19.7 0 81.2-54.2 127.7-134.8 127.7C41.5 512 0 435.1 0 347.6c10.4 7.1 46.9 36.5 58.7 36.5 7 0 13-4 15.5-10.6 23.6-62.2 66.5-76.5 112.9-77.4 15.6 33.8 46.1 59.6 82.8 68.5zM460.6 0c-14.4 0-27.9 6.4-38.2 15.7C228.2 190 208 194.1 208 245.4c0 48.8 40.5 90.6 90.2 90.6 59 0 93.2-43.4 200.6-244.8 7-13.7 13.2-28.5 13.2-43.9C512 19.7 487.3 0 460.6 0z"],
- "paper-plane": [512, 512, [], "f1d8", "M476 3.2L12.5 270.6c-18.1 10.4-15.8 35.6 2.2 43.2L121 358.4l287.3-253.2c5.5-4.9 13.3 2.6 8.6 8.3L176 407v80.5c0 23.6 28.5 32.9 42.5 15.8L282 426l124.6 52.2c14.2 6 30.4-2.9 33-18.2l72-432C515 7.8 493.3-6.8 476 3.2z"],
- "paperclip": [448, 512, [], "f0c6", "M43.246 466.142c-58.43-60.289-57.341-157.511 1.386-217.581L254.392 34c44.316-45.332 116.351-45.336 160.671 0 43.89 44.894 43.943 117.329 0 162.276L232.214 383.128c-29.855 30.537-78.633 30.111-107.982-.998-28.275-29.97-27.368-77.473 1.452-106.953l143.743-146.835c6.182-6.314 16.312-6.422 22.626-.241l22.861 22.379c6.315 6.182 6.422 16.312.241 22.626L171.427 319.927c-4.932 5.045-5.236 13.428-.648 18.292 4.372 4.634 11.245 4.711 15.688.165l182.849-186.851c19.613-20.062 19.613-52.725-.011-72.798-19.189-19.627-49.957-19.637-69.154 0L90.39 293.295c-34.763 35.56-35.299 93.12-1.191 128.313 34.01 35.093 88.985 35.137 123.058.286l172.06-175.999c6.177-6.319 16.307-6.433 22.626-.256l22.877 22.364c6.319 6.177 6.434 16.307.256 22.626l-172.06 175.998c-59.576 60.938-155.943 60.216-214.77-.485z"],
- "paragraph": [448, 512, [], "f1dd", "M408 32H177.531C88.948 32 16.045 103.335 16 191.918 15.956 280.321 87.607 352 176 352v104c0 13.255 10.745 24 24 24h32c13.255 0 24-10.745 24-24V112h32v344c0 13.255 10.745 24 24 24h32c13.255 0 24-10.745 24-24V112h40c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24z"],
- "paste": [448, 512, [], "f0ea", "M128 184c0-30.879 25.122-56 56-56h136V56c0-13.255-10.745-24-24-24h-80.61C204.306 12.89 183.637 0 160 0s-44.306 12.89-55.39 32H24C10.745 32 0 42.745 0 56v336c0 13.255 10.745 24 24 24h104V184zm32-144c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24zm184 248h104v200c0 13.255-10.745 24-24 24H184c-13.255 0-24-10.745-24-24V184c0-13.255 10.745-24 24-24h136v104c0 13.2 10.8 24 24 24zm104-38.059V256h-96v-96h6.059a24 24 0 0 1 16.97 7.029l65.941 65.941a24.002 24.002 0 0 1 7.03 16.971z"],
- "pause": [448, 512, [], "f04c", "M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"],
- "pause-circle": [512, 512, [], "f28b", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm-16 328c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16v160zm112 0c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16v160z"],
- "paw": [512, 512, [], "f1b0", "M85.231 330.958C36 330.958 0 273.792 0 231.5c0-28.292 16-58.042 49.538-58.042 49.231 0 85.231 57.458 85.231 99.75 0 28.292-15.692 57.75-49.538 57.75zm348 106.167c0 37.042-32 42.875-63.385 42.875-41.231 0-74.462-26.25-113.846-26.25-41.231 0-76.308 25.958-120.923 25.958-29.847 0-56.308-9.625-56.308-42.583C78.769 368 180.616 265.333 256 265.333s177.231 102.959 177.231 171.792zM182.462 203.792c-49.847 0-80-59.5-80-100.333C102.462 70.792 120.308 32 160 32c50.154 0 80 59.5 80 100.333 0 32.667-17.846 71.459-57.538 71.459zM272 132.333C272 91.5 301.846 32 352 32c39.692 0 57.539 38.792 57.539 71.458 0 40.833-30.154 100.333-80.001 100.333C289.846 203.792 272 165 272 132.333zM512 231.5c0 42.292-36 99.458-85.231 99.458-33.847 0-49.538-29.458-49.538-57.75 0-42.291 35.999-99.75 85.231-99.75C496 173.458 512 203.208 512 231.5z"],
- "pen-square": [448, 512, [], "f14b", "M400 480H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zM238.1 177.9L102.4 313.6l-6.3 57.1c-.8 7.6 5.6 14.1 13.3 13.3l57.1-6.3L302.2 242c2.3-2.3 2.3-6.1 0-8.5L246.7 178c-2.5-2.4-6.3-2.4-8.6-.1zM345 165.1L314.9 135c-9.4-9.4-24.6-9.4-33.9 0l-23.1 23.1c-2.3 2.3-2.3 6.1 0 8.5l55.5 55.5c2.3 2.3 6.1 2.3 8.5 0L345 199c9.3-9.3 9.3-24.5 0-33.9z"],
- "pencil-alt": [512, 512, [], "f303", "M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"],
- "percent": [448, 512, [], "f295", "M112 224c61.9 0 112-50.1 112-112S173.9 0 112 0 0 50.1 0 112s50.1 112 112 112zm0-160c26.5 0 48 21.5 48 48s-21.5 48-48 48-48-21.5-48-48 21.5-48 48-48zm224 224c-61.9 0-112 50.1-112 112s50.1 112 112 112 112-50.1 112-112-50.1-112-112-112zm0 160c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zM392.3.2l31.6-.1c19.4-.1 30.9 21.8 19.7 37.8L77.4 501.6a23.95 23.95 0 0 1-19.6 10.2l-33.4.1c-19.5 0-30.9-21.9-19.7-37.8l368-463.7C377.2 4 384.5.2 392.3.2z"],
- "phone": [512, 512, [], "f095", "M493.397 24.615l-104-23.997c-11.314-2.611-22.879 3.252-27.456 13.931l-48 111.997a24 24 0 0 0 6.862 28.029l60.617 49.596c-35.973 76.675-98.938 140.508-177.249 177.248l-49.596-60.616a24 24 0 0 0-28.029-6.862l-111.997 48C3.873 366.516-1.994 378.08.618 389.397l23.997 104C27.109 504.204 36.748 512 48 512c256.087 0 464-207.532 464-464 0-11.176-7.714-20.873-18.603-23.385z"],
- "phone-square": [448, 512, [], "f098", "M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM94 416c-7.033 0-13.057-4.873-14.616-11.627l-14.998-65a15 15 0 0 1 8.707-17.16l69.998-29.999a15 15 0 0 1 17.518 4.289l30.997 37.885c48.944-22.963 88.297-62.858 110.781-110.78l-37.886-30.997a15.001 15.001 0 0 1-4.289-17.518l30-69.998a15 15 0 0 1 17.16-8.707l65 14.998A14.997 14.997 0 0 1 384 126c0 160.292-129.945 290-290 290z"],
- "phone-volume": [384, 512, [], "f2a0", "M97.333 506.966c-129.874-129.874-129.681-340.252 0-469.933 5.698-5.698 14.527-6.632 21.263-2.422l64.817 40.513a17.187 17.187 0 0 1 6.849 20.958l-32.408 81.021a17.188 17.188 0 0 1-17.669 10.719l-55.81-5.58c-21.051 58.261-20.612 122.471 0 179.515l55.811-5.581a17.188 17.188 0 0 1 17.669 10.719l32.408 81.022a17.188 17.188 0 0 1-6.849 20.958l-64.817 40.513a17.19 17.19 0 0 1-21.264-2.422zM247.126 95.473c11.832 20.047 11.832 45.008 0 65.055-3.95 6.693-13.108 7.959-18.718 2.581l-5.975-5.726c-3.911-3.748-4.793-9.622-2.261-14.41a32.063 32.063 0 0 0 0-29.945c-2.533-4.788-1.65-10.662 2.261-14.41l5.975-5.726c5.61-5.378 14.768-4.112 18.718 2.581zm91.787-91.187c60.14 71.604 60.092 175.882 0 247.428-4.474 5.327-12.53 5.746-17.552.933l-5.798-5.557c-4.56-4.371-4.977-11.529-.93-16.379 49.687-59.538 49.646-145.933 0-205.422-4.047-4.85-3.631-12.008.93-16.379l5.798-5.557c5.022-4.813 13.078-4.394 17.552.933zm-45.972 44.941c36.05 46.322 36.108 111.149 0 157.546-4.39 5.641-12.697 6.251-17.856 1.304l-5.818-5.579c-4.4-4.219-4.998-11.095-1.285-15.931 26.536-34.564 26.534-82.572 0-117.134-3.713-4.836-3.115-11.711 1.285-15.931l5.818-5.579c5.159-4.947 13.466-4.337 17.856 1.304z"],
- "plane": [576, 512, [], "f072", "M472 200H360.211L256.013 5.711A12 12 0 0 0 245.793 0h-57.787c-7.85 0-13.586 7.413-11.616 15.011L209.624 200H99.766l-34.904-58.174A12 12 0 0 0 54.572 136H12.004c-7.572 0-13.252 6.928-11.767 14.353l21.129 105.648L.237 361.646c-1.485 7.426 4.195 14.354 11.768 14.353l42.568-.002c4.215 0 8.121-2.212 10.289-5.826L99.766 312h109.858L176.39 496.989c-1.97 7.599 3.766 15.011 11.616 15.011h57.787a12 12 0 0 0 10.22-5.711L360.212 312H472c57.438 0 104-25.072 104-56s-46.562-56-104-56z"],
- "play": [448, 512, [], "f04b", "M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"],
- "play-circle": [512, 512, [], "f144", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"],
- "plug": [384, 512, [], "f1e6", "M256 144V32c0-17.673 14.327-32 32-32s32 14.327 32 32v112h-64zm112 16H16c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h16v32c0 77.406 54.969 141.971 128 156.796V512h64v-99.204c73.031-14.825 128-79.39 128-156.796v-32h16c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16zm-240-16V32c0-17.673-14.327-32-32-32S64 14.327 64 32v112h64z"],
- "plus": [448, 512, [], "f067", "M448 294.2v-76.4c0-13.3-10.7-24-24-24H286.2V56c0-13.3-10.7-24-24-24h-76.4c-13.3 0-24 10.7-24 24v137.8H24c-13.3 0-24 10.7-24 24v76.4c0 13.3 10.7 24 24 24h137.8V456c0 13.3 10.7 24 24 24h76.4c13.3 0 24-10.7 24-24V318.2H424c13.3 0 24-10.7 24-24z"],
- "plus-circle": [512, 512, [], "f055", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"],
- "plus-square": [448, 512, [], "f0fe", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-32 252c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92H92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"],
- "podcast": [448, 512, [], "f2ce", "M267.429 488.563C262.286 507.573 242.858 512 224 512c-18.857 0-38.286-4.427-43.428-23.437C172.927 460.134 160 388.898 160 355.75c0-35.156 31.142-43.75 64-43.75s64 8.594 64 43.75c0 32.949-12.871 104.179-20.571 132.813zM156.867 288.554c-18.693-18.308-29.958-44.173-28.784-72.599 2.054-49.724 42.395-89.956 92.124-91.881C274.862 121.958 320 165.807 320 220c0 26.827-11.064 51.116-28.866 68.552-2.675 2.62-2.401 6.986.628 9.187 9.312 6.765 16.46 15.343 21.234 25.363 1.741 3.654 6.497 4.66 9.449 1.891 28.826-27.043 46.553-65.783 45.511-108.565-1.855-76.206-63.595-138.208-139.793-140.369C146.869 73.753 80 139.215 80 220c0 41.361 17.532 78.7 45.55 104.989 2.953 2.771 7.711 1.77 9.453-1.887 4.774-10.021 11.923-18.598 21.235-25.363 3.029-2.2 3.304-6.566.629-9.185zM224 0C100.204 0 0 100.185 0 224c0 89.992 52.602 165.647 125.739 201.408 4.333 2.118 9.267-1.544 8.535-6.31-2.382-15.512-4.342-30.946-5.406-44.339-.146-1.836-1.149-3.486-2.678-4.512-47.4-31.806-78.564-86.016-78.187-147.347.592-96.237 79.29-174.648 175.529-174.899C320.793 47.747 400 126.797 400 224c0 61.932-32.158 116.49-80.65 147.867-.999 14.037-3.069 30.588-5.624 47.23-.732 4.767 4.203 8.429 8.535 6.31C395.227 389.727 448 314.187 448 224 448 100.205 347.815 0 224 0zm0 160c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64z"],
- "pound-sign": [320, 512, [], "f154", "M308 352h-45.495c-6.627 0-12 5.373-12 12v50.848H128V288h84c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-84v-63.556c0-32.266 24.562-57.086 61.792-57.086 23.658 0 45.878 11.505 57.652 18.849 5.151 3.213 11.888 2.051 15.688-2.685l28.493-35.513c4.233-5.276 3.279-13.005-2.119-17.081C273.124 54.56 236.576 32 187.931 32 106.026 32 48 84.742 48 157.961V224H20c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h28v128H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h296c6.627 0 12-5.373 12-12V364c0-6.627-5.373-12-12-12z"],
- "power-off": [512, 512, [], "f011", "M400 54.1c63 45 104 118.6 104 201.9 0 136.8-110.8 247.7-247.5 248C120 504.3 8.2 393 8 256.4 7.9 173.1 48.9 99.3 111.8 54.2c11.7-8.3 28-4.8 35 7.7L162.6 90c5.9 10.5 3.1 23.8-6.6 31-41.5 30.8-68 79.6-68 134.9-.1 92.3 74.5 168.1 168 168.1 91.6 0 168.6-74.2 168-169.1-.3-51.8-24.7-101.8-68.1-134-9.7-7.2-12.4-20.5-6.5-30.9l15.8-28.1c7-12.4 23.2-16.1 34.8-7.8zM296 264V24c0-13.3-10.7-24-24-24h-32c-13.3 0-24 10.7-24 24v240c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24z"],
- "print": [512, 512, [], "f02f", "M464 192h-16V81.941a24 24 0 0 0-7.029-16.97L383.029 7.029A24 24 0 0 0 366.059 0H88C74.745 0 64 10.745 64 24v168H48c-26.51 0-48 21.49-48 48v132c0 6.627 5.373 12 12 12h52v104c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V384h52c6.627 0 12-5.373 12-12V240c0-26.51-21.49-48-48-48zm-80 256H128v-96h256v96zM128 224V64h192v40c0 13.2 10.8 24 24 24h40v96H128zm304 72c-13.254 0-24-10.746-24-24s10.746-24 24-24 24 10.746 24 24-10.746 24-24 24z"],
- "puzzle-piece": [576, 512, [], "f12e", "M519.442 288.651c-41.519 0-59.5 31.593-82.058 31.593C377.409 320.244 432 144 432 144s-196.288 80-196.288-3.297c0-35.827 36.288-46.25 36.288-85.985C272 19.216 243.885 0 210.539 0c-34.654 0-66.366 18.891-66.366 56.346 0 41.364 31.711 59.277 31.711 81.75C175.885 207.719 0 166.758 0 166.758v333.237s178.635 41.047 178.635-28.662c0-22.473-40-40.107-40-81.471 0-37.456 29.25-56.346 63.577-56.346 33.673 0 61.788 19.216 61.788 54.717 0 39.735-36.288 50.158-36.288 85.985 0 60.803 129.675 25.73 181.23 25.73 0 0-34.725-120.101 25.827-120.101 35.962 0 46.423 36.152 86.308 36.152C556.712 416 576 387.99 576 354.443c0-34.199-18.962-65.792-56.558-65.792z"],
- "qrcode": [448, 512, [], "f029", "M0 224h192V32H0v192zM64 96h64v64H64V96zm192-64v192h192V32H256zm128 128h-64V96h64v64zM0 480h192V288H0v192zm64-128h64v64H64v-64zm352-64h32v128h-96v-32h-32v96h-64V288h96v32h64v-32zm0 160h32v32h-32v-32zm-64 0h32v32h-32v-32z"],
- "question": [384, 512, [], "f128", "M202.021 0C122.202 0 70.503 32.703 29.914 91.026c-7.363 10.58-5.093 25.086 5.178 32.874l43.138 32.709c10.373 7.865 25.132 6.026 33.253-4.148 25.049-31.381 43.63-49.449 82.757-49.449 30.764 0 68.816 19.799 68.816 49.631 0 22.552-18.617 34.134-48.993 51.164-35.423 19.86-82.299 44.576-82.299 106.405V320c0 13.255 10.745 24 24 24h72.471c13.255 0 24-10.745 24-24v-5.773c0-42.86 125.268-44.645 125.268-160.627C377.504 66.256 286.902 0 202.021 0zM192 373.459c-38.196 0-69.271 31.075-69.271 69.271 0 38.195 31.075 69.27 69.271 69.27s69.271-31.075 69.271-69.271-31.075-69.27-69.271-69.27z"],
- "question-circle": [512, 512, [], "f059", "M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z"],
- "quote-left": [512, 512, [], "f10d", "M0 432V304C0 166.982 63.772 67.676 193.827 32.828 209.052 28.748 224 40.265 224 56.027v33.895c0 10.057-6.228 19.133-15.687 22.55C142.316 136.312 104 181.946 104 256h72c26.51 0 48 21.49 48 48v128c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48zm336 48h128c26.51 0 48-21.49 48-48V304c0-26.51-21.49-48-48-48h-72c0-74.054 38.316-119.688 104.313-143.528C505.772 109.055 512 99.979 512 89.922V56.027c0-15.762-14.948-27.279-30.173-23.199C351.772 67.676 288 166.982 288 304v128c0 26.51 21.49 48 48 48z"],
- "quote-right": [512, 512, [], "f10e", "M512 80v128c0 137.018-63.772 236.324-193.827 271.172-15.225 4.08-30.173-7.437-30.173-23.199v-33.895c0-10.057 6.228-19.133 15.687-22.55C369.684 375.688 408 330.054 408 256h-72c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h128c26.51 0 48 21.49 48 48zM176 32H48C21.49 32 0 53.49 0 80v128c0 26.51 21.49 48 48 48h72c0 74.054-38.316 119.688-104.313 143.528C6.228 402.945 0 412.021 0 422.078v33.895c0 15.762 14.948 27.279 30.173 23.199C160.228 444.324 224 345.018 224 208V80c0-26.51-21.49-48-48-48z"],
- "random": [512, 512, [], "f074", "M504.971 359.029c9.373 9.373 9.373 24.569 0 33.941l-80 79.984c-15.01 15.01-40.971 4.49-40.971-16.971V416h-58.785a12.004 12.004 0 0 1-8.773-3.812l-70.556-75.596 53.333-57.143L352 336h32v-39.981c0-21.438 25.943-31.998 40.971-16.971l80 79.981zM12 176h84l52.781 56.551 53.333-57.143-70.556-75.596A11.999 11.999 0 0 0 122.785 96H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12zm372 0v39.984c0 21.46 25.961 31.98 40.971 16.971l80-79.984c9.373-9.373 9.373-24.569 0-33.941l-80-79.981C409.943 24.021 384 34.582 384 56.019V96h-58.785a12.004 12.004 0 0 0-8.773 3.812L96 336H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h110.785c3.326 0 6.503-1.381 8.773-3.812L352 176h32z"],
- "recycle": [512, 512, [], "f1b8", "M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"],
- "redo": [512, 512, [], "f01e", "M500.333 0h-47.411c-6.853 0-12.314 5.729-11.986 12.574l3.966 82.759C399.416 41.899 331.672 8 256.001 8 119.34 8 7.899 119.526 8 256.187 8.101 393.068 119.096 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-33.971-33.971c-4.466-4.466-11.64-4.717-16.38-.543C341.308 415.448 300.606 432 256 432c-97.267 0-176-78.716-176-176 0-97.267 78.716-176 176-176 60.892 0 114.506 30.858 146.099 77.8l-101.525-4.865c-6.845-.328-12.574 5.133-12.574 11.986v47.411c0 6.627 5.373 12 12 12h200.333c6.627 0 12-5.373 12-12V12c0-6.627-5.373-12-12-12z"],
- "redo-alt": [512, 512, [], "f2f9", "M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"],
- "registered": [512, 512, [], "f25d", "M285.363 207.475c0 18.6-9.831 28.431-28.431 28.431h-29.876v-56.14h23.378c28.668 0 34.929 8.773 34.929 27.709zM504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM363.411 360.414c-46.729-84.825-43.299-78.636-44.702-80.98 23.432-15.172 37.945-42.979 37.945-74.486 0-54.244-31.5-89.252-105.498-89.252h-70.667c-13.255 0-24 10.745-24 24V372c0 13.255 10.745 24 24 24h22.567c13.255 0 24-10.745 24-24v-71.663h25.556l44.129 82.937a24.001 24.001 0 0 0 21.188 12.727h24.464c18.261-.001 29.829-19.591 21.018-35.587z"],
- "reply": [512, 512, [], "f3e5", "M8.309 189.836L184.313 37.851C199.719 24.546 224 35.347 224 56.015v80.053c160.629 1.839 288 34.032 288 186.258 0 61.441-39.581 122.309-83.333 154.132-13.653 9.931-33.111-2.533-28.077-18.631 45.344-145.012-21.507-183.51-176.59-185.742V360c0 20.7-24.3 31.453-39.687 18.164l-176.004-152c-11.071-9.562-11.086-26.753 0-36.328z"],
- "reply-all": [576, 512, [], "f122", "M136.309 189.836L312.313 37.851C327.72 24.546 352 35.348 352 56.015v82.763c129.182 10.231 224 52.212 224 183.548 0 61.441-39.582 122.309-83.333 154.132-13.653 9.931-33.111-2.533-28.077-18.631 38.512-123.162-3.922-169.482-112.59-182.015v84.175c0 20.701-24.3 31.453-39.687 18.164L136.309 226.164c-11.071-9.561-11.086-26.753 0-36.328zm-128 36.328L184.313 378.15C199.7 391.439 224 380.687 224 359.986v-15.818l-108.606-93.785A55.96 55.96 0 0 1 96 207.998a55.953 55.953 0 0 1 19.393-42.38L224 71.832V56.015c0-20.667-24.28-31.469-39.687-18.164L8.309 189.836c-11.086 9.575-11.071 26.767 0 36.328z"],
- "retweet": [640, 512, [], "f079", "M629.657 343.598L528.971 444.284c-9.373 9.372-24.568 9.372-33.941 0L394.343 343.598c-9.373-9.373-9.373-24.569 0-33.941l10.823-10.823c9.562-9.562 25.133-9.34 34.419.492L480 342.118V160H292.451a24.005 24.005 0 0 1-16.971-7.029l-16-16C244.361 121.851 255.069 96 276.451 96H520c13.255 0 24 10.745 24 24v222.118l40.416-42.792c9.285-9.831 24.856-10.054 34.419-.492l10.823 10.823c9.372 9.372 9.372 24.569-.001 33.941zm-265.138 15.431A23.999 23.999 0 0 0 347.548 352H160V169.881l40.416 42.792c9.286 9.831 24.856 10.054 34.419.491l10.822-10.822c9.373-9.373 9.373-24.569 0-33.941L144.971 67.716c-9.373-9.373-24.569-9.373-33.941 0L10.343 168.402c-9.373 9.373-9.373 24.569 0 33.941l10.822 10.822c9.562 9.562 25.133 9.34 34.419-.491L96 169.881V392c0 13.255 10.745 24 24 24h243.549c21.382 0 32.09-25.851 16.971-40.971l-16.001-16z"],
- "road": [576, 512, [], "f018", "M567.3 383.6L429.9 78.2C426 69.5 417.4 64 408 64h-96.1l1.9 18.8c.7 7.1-4.8 13.2-11.9 13.2H274c-7.1 0-12.7-6.2-11.9-13.2L264 64h-96c-9.4 0-18 5.5-21.9 14.2L8.7 383.6C3.2 395.8 0 409.6 0 424c0 13.3 10.7 24 24 24h213.6c-7.1 0-12.7-6.2-11.9-13.2l10.8-104c.6-6.1 5.8-10.8 11.9-10.8h79.2c6.1 0 11.3 4.6 11.9 10.8l10.8 104c.7 7.1-4.8 13.2-11.9 13.2H552c13.2 0 24-10.7 24-24 0-13.9-3-27.7-8.7-40.4zM254.7 154.8l3.3-32c.6-6.1 5.8-10.8 11.9-10.8h36.2c6.1 0 11.3 4.6 11.9 10.8l3.3 32c.7 7.1-4.8 13.2-11.9 13.2h-42.8c-7.1 0-12.7-6.2-11.9-13.2zM321.8 288h-67.6c-7.1 0-12.7-6.2-11.9-13.2l7.4-72c.6-6.1 5.8-10.8 11.9-10.8h52.7c6.1 0 11.3 4.6 11.9 10.8l7.4 72c.9 7-4.7 13.2-11.8 13.2z"],
- "rocket": [512, 512, [], "f135", "M505.1 19.1C503.8 13 499 8.2 492.9 6.9 460.7 0 435.5 0 410.4 0 307.2 0 245.3 55.2 199.1 128H94.9c-18.2 0-34.8 10.3-42.9 26.5L2.6 253.3c-8 16 3.6 34.7 21.5 34.7h95.1c-5.9 12.8-11.9 25.5-18 37.7-3.1 6.2-1.9 13.6 3 18.5l63.6 63.6c4.9 4.9 12.3 6.1 18.5 3 12.2-6.1 24.9-12 37.7-17.9V488c0 17.8 18.8 29.4 34.7 21.5l98.7-49.4c16.3-8.1 26.5-24.8 26.5-42.9V312.8c72.6-46.3 128-108.4 128-211.1.1-25.2.1-50.4-6.8-82.6zM400 160c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z"],
- "rss": [448, 512, [], "f09e", "M128.081 415.959c0 35.369-28.672 64.041-64.041 64.041S0 451.328 0 415.959s28.672-64.041 64.041-64.041 64.04 28.673 64.04 64.041zm175.66 47.25c-8.354-154.6-132.185-278.587-286.95-286.95C7.656 175.765 0 183.105 0 192.253v48.069c0 8.415 6.49 15.472 14.887 16.018 111.832 7.284 201.473 96.702 208.772 208.772.547 8.397 7.604 14.887 16.018 14.887h48.069c9.149.001 16.489-7.655 15.995-16.79zm144.249.288C439.596 229.677 251.465 40.445 16.503 32.01 7.473 31.686 0 38.981 0 48.016v48.068c0 8.625 6.835 15.645 15.453 15.999 191.179 7.839 344.627 161.316 352.465 352.465.353 8.618 7.373 15.453 15.999 15.453h48.068c9.034-.001 16.329-7.474 16.005-16.504z"],
- "rss-square": [448, 512, [], "f143", "M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM112 416c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm157.533 0h-34.335c-6.011 0-11.051-4.636-11.442-10.634-5.214-80.05-69.243-143.92-149.123-149.123-5.997-.39-10.633-5.431-10.633-11.441v-34.335c0-6.535 5.468-11.777 11.994-11.425 110.546 5.974 198.997 94.536 204.964 204.964.352 6.526-4.89 11.994-11.425 11.994zm103.027 0h-34.334c-6.161 0-11.175-4.882-11.427-11.038-5.598-136.535-115.204-246.161-251.76-251.76C68.882 152.949 64 147.935 64 141.774V107.44c0-6.454 5.338-11.664 11.787-11.432 167.83 6.025 302.21 141.191 308.205 308.205.232 6.449-4.978 11.787-11.432 11.787z"],
- "ruble-sign": [384, 512, [], "f158", "M239.36 320C324.48 320 384 260.542 384 175.071S324.48 32 239.36 32H76c-6.627 0-12 5.373-12 12v206.632H12c-6.627 0-12 5.373-12 12V308c0 6.627 5.373 12 12 12h52v32H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h52v52c0 6.627 5.373 12 12 12h58.56c6.627 0 12-5.373 12-12v-52H308c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H146.56v-32h92.8zm-92.8-219.252h78.72c46.72 0 74.88 29.11 74.88 74.323 0 45.832-28.16 75.561-76.16 75.561h-77.44V100.748z"],
- "rupee-sign": [320, 512, [], "f156", "M308 96c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v44.748c0 6.627 5.373 12 12 12h85.28c27.308 0 48.261 9.958 60.97 27.252H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h158.757c-6.217 36.086-32.961 58.632-74.757 58.632H12c-6.627 0-12 5.373-12 12v53.012c0 3.349 1.4 6.546 3.861 8.818l165.052 152.356a12.001 12.001 0 0 0 8.139 3.182h82.562c10.924 0 16.166-13.408 8.139-20.818L116.871 319.906c76.499-2.34 131.144-53.395 138.318-127.906H308c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-58.69c-3.486-11.541-8.28-22.246-14.252-32H308z"],
- "save": [448, 512, [], "f0c7", "M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"],
- "search": [512, 512, [], "f002", "M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"],
- "search-minus": [512, 512, [], "f010", "M304 192v32c0 6.6-5.4 12-12 12H124c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z"],
- "search-plus": [512, 512, [], "f00e", "M304 192v32c0 6.6-5.4 12-12 12h-56v56c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-56h-56c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h56v-56c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v56h56c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z"],
- "server": [512, 512, [], "f233", "M480 160H32c-17.673 0-32-14.327-32-32V64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24z"],
- "share": [512, 512, [], "f064", "M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"],
- "share-alt": [448, 512, [], "f1e0", "M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"],
- "share-alt-square": [448, 512, [], "f1e1", "M448 80v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48zM304 296c-14.562 0-27.823 5.561-37.783 14.671l-67.958-40.775a56.339 56.339 0 0 0 0-27.793l67.958-40.775C276.177 210.439 289.438 216 304 216c30.928 0 56-25.072 56-56s-25.072-56-56-56-56 25.072-56 56c0 4.797.605 9.453 1.74 13.897l-67.958 40.775C171.823 205.561 158.562 200 144 200c-30.928 0-56 25.072-56 56s25.072 56 56 56c14.562 0 27.823-5.561 37.783-14.671l67.958 40.775a56.088 56.088 0 0 0-1.74 13.897c0 30.928 25.072 56 56 56s56-25.072 56-56C360 321.072 334.928 296 304 296z"],
- "share-square": [576, 512, [], "f14d", "M568.482 177.448L424.479 313.433C409.3 327.768 384 317.14 384 295.985v-71.963c-144.575.97-205.566 35.113-164.775 171.353 4.483 14.973-12.846 26.567-25.006 17.33C155.252 383.105 120 326.488 120 269.339c0-143.937 117.599-172.5 264-173.312V24.012c0-21.174 25.317-31.768 40.479-17.448l144.003 135.988c10.02 9.463 10.028 25.425 0 34.896zM384 379.128V448H64V128h50.916a11.99 11.99 0 0 0 8.648-3.693c14.953-15.568 32.237-27.89 51.014-37.676C185.708 80.83 181.584 64 169.033 64H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48v-88.806c0-8.288-8.197-14.066-16.011-11.302a71.83 71.83 0 0 1-34.189 3.377c-7.27-1.046-13.8 4.514-13.8 11.859z"],
- "shekel-sign": [448, 512, [], "f20b", "M170.12 96H80v372c0 6.627-5.373 12-12 12H12c-6.627 0-12-5.373-12-12V44c0-6.627 5.373-12 12-12h168.36C265.48 32 325 89.6 325 175.071V359c0 6.627-5.373 12-12 12h-44c-13.255 0-24-10.745-24-24V170.323C245 125.11 216.839 96 170.12 96zM436 32h-56c-6.627 0-12 5.373-12 12v372h-90.12c-46.72 0-74.88-29.11-74.88-74.323V165c0-13.255-10.745-24-24-24h-44c-6.627 0-12 5.373-12 12v183.929C123 422.4 182.52 480 267.64 480H436c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12z"],
- "shield-alt": [512, 512, [], "f3ed", "M496 128c0 221.282-135.934 344.645-221.539 380.308a48 48 0 0 1-36.923 0C130.495 463.713 16 326.487 16 128a48 48 0 0 1 29.539-44.308l192-80a48 48 0 0 1 36.923 0l192 80A48 48 0 0 1 496 128zM256 446.313l.066.034c93.735-46.689 172.497-156.308 175.817-307.729L256 65.333v380.98z"],
- "ship": [640, 512, [], "f21a", "M496.616 372.639l70.012-70.012c16.899-16.9 9.942-45.771-12.836-53.092L512 236.102V96c0-17.673-14.327-32-32-32h-64V24c0-13.255-10.745-24-24-24H248c-13.255 0-24 10.745-24 24v40h-64c-17.673 0-32 14.327-32 32v140.102l-41.792 13.433c-22.753 7.313-29.754 36.173-12.836 53.092l70.012 70.012C125.828 416.287 85.587 448 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24 61.023 0 107.499-20.61 143.258-59.396C181.677 487.432 216.021 512 256 512h128c39.979 0 74.323-24.568 88.742-59.396C508.495 491.384 554.968 512 616 512c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24-60.817 0-101.542-31.001-119.384-75.361zM192 128h256v87.531l-118.208-37.995a31.995 31.995 0 0 0-19.584 0L192 215.531V128z"],
- "shopping-bag": [448, 512, [], "f290", "M352 160v-32C352 57.42 294.579 0 224 0 153.42 0 96 57.42 96 128v32H0v272c0 44.183 35.817 80 80 80h288c44.183 0 80-35.817 80-80V160h-96zm-192-32c0-35.29 28.71-64 64-64s64 28.71 64 64v32H160v-32zm160 120c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm-192 0c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24z"],
- "shopping-basket": [576, 512, [], "f291", "M576 216v16c0 13.255-10.745 24-24 24h-8l-26.113 182.788C514.509 462.435 494.257 480 470.37 480H105.63c-23.887 0-44.139-17.565-47.518-41.212L32 256h-8c-13.255 0-24-10.745-24-24v-16c0-13.255 10.745-24 24-24h67.341l106.78-146.821c10.395-14.292 30.407-17.453 44.701-7.058 14.293 10.395 17.453 30.408 7.058 44.701L170.477 192h235.046L326.12 82.821c-10.395-14.292-7.234-34.306 7.059-44.701 14.291-10.395 34.306-7.235 44.701 7.058L484.659 192H552c13.255 0 24 10.745 24 24zM312 392V280c0-13.255-10.745-24-24-24s-24 10.745-24 24v112c0 13.255 10.745 24 24 24s24-10.745 24-24zm112 0V280c0-13.255-10.745-24-24-24s-24 10.745-24 24v112c0 13.255 10.745 24 24 24s24-10.745 24-24zm-224 0V280c0-13.255-10.745-24-24-24s-24 10.745-24 24v112c0 13.255 10.745 24 24 24s24-10.745 24-24z"],
- "shopping-cart": [576, 512, [], "f07a", "M528.12 301.319l47.273-208C578.806 78.301 567.391 64 551.99 64H159.208l-9.166-44.81C147.758 8.021 137.93 0 126.529 0H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24h69.883l70.248 343.435C147.325 417.1 136 435.222 136 456c0 30.928 25.072 56 56 56s56-25.072 56-56c0-15.674-6.447-29.835-16.824-40h209.647C430.447 426.165 424 440.326 424 456c0 30.928 25.072 56 56 56s56-25.072 56-56c0-22.172-12.888-41.332-31.579-50.405l5.517-24.276c3.413-15.018-8.002-29.319-23.403-29.319H218.117l-6.545-32h293.145c11.206 0 20.92-7.754 23.403-18.681z"],
- "shower": [512, 512, [], "f2cc", "M389.66 135.6L231.6 293.66c-9.37 9.37-24.57 9.37-33.94 0l-11.32-11.32c-9.37-9.37-9.37-24.57 0-33.94l.11-.11c-34.03-40.21-35.16-98.94-3.39-140.38-11.97-7.55-26.14-11.91-41.3-11.91C98.88 96 64 130.88 64 173.76V480H0V173.76C0 95.59 63.59 32 141.76 32c36.93 0 70.61 14.2 95.86 37.42 35.9-11.51 76.5-4.5 106.67 21.03l.11-.11c9.37-9.37 24.57-9.37 33.94 0l11.32 11.32c9.37 9.37 9.37 24.57 0 33.94zM384 208c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm32 0c0-8.837 7.163-16 16-16s16 7.163 16 16-7.163 16-16 16-16-7.163-16-16zm96 0c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm-160 32c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm48-16c8.837 0 16 7.163 16 16s-7.163 16-16 16-16-7.163-16-16 7.163-16 16-16zm80 16c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm-160 32c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm32 0c0-8.837 7.163-16 16-16s16 7.163 16 16-7.163 16-16 16-16-7.163-16-16zm96 0c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm-128 32c0-8.837 7.163-16 16-16s16 7.163 16 16-7.163 16-16 16-16-7.163-16-16zm96 0c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm-96 32c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm64 0c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm-32 32c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm-32 32c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16z"],
- "sign-in-alt": [512, 512, [], "f2f6", "M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z"],
- "sign-language": [448, 512, [], "f2a7", "M91.434 483.987c-.307-16.018 13.109-29.129 29.13-29.129h62.293v-5.714H56.993c-16.021 0-29.437-13.111-29.13-29.129C28.16 404.491 40.835 392 56.428 392h126.429v-5.714H29.136c-16.021 0-29.437-13.111-29.13-29.129.297-15.522 12.973-28.013 28.566-28.013h154.286v-5.714H57.707c-16.021 0-29.437-13.111-29.13-29.129.297-15.522 12.973-28.013 28.566-28.013h168.566l-31.085-22.606c-12.762-9.281-15.583-27.149-6.302-39.912 9.281-12.761 27.15-15.582 39.912-6.302l123.361 89.715a34.287 34.287 0 0 1 14.12 27.728v141.136c0 15.91-10.946 29.73-26.433 33.374l-80.471 18.934a137.16 137.16 0 0 1-31.411 3.646H120c-15.593-.001-28.269-12.492-28.566-28.014zm73.249-225.701h36.423l-11.187-8.136c-18.579-13.511-20.313-40.887-3.17-56.536l-13.004-16.7c-9.843-12.641-28.43-15.171-40.88-5.088-12.065 9.771-14.133 27.447-4.553 39.75l36.371 46.71zm283.298-2.103l-5.003-152.452c-.518-15.771-13.722-28.136-29.493-27.619-15.773.518-28.137 13.722-27.619 29.493l1.262 38.415L283.565 11.019c-9.58-12.303-27.223-14.63-39.653-5.328-12.827 9.599-14.929 28.24-5.086 40.881l76.889 98.745-4.509 3.511-94.79-121.734c-9.58-12.303-27.223-14.63-39.653-5.328-12.827 9.599-14.929 28.24-5.086 40.881l94.443 121.288-4.509 3.511-77.675-99.754c-9.58-12.303-27.223-14.63-39.653-5.328-12.827 9.599-14.929 28.24-5.086 40.881l52.053 66.849c12.497-8.257 29.055-8.285 41.69.904l123.36 89.714c10.904 7.93 17.415 20.715 17.415 34.198v16.999l61.064-47.549a34.285 34.285 0 0 0 13.202-28.177z"],
- "sign-out-alt": [512, 512, [], "f2f5", "M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"],
- "signal": [640, 512, [], "f012", "M36 384h56c6.6 0 12 5.4 12 12v104c0 6.6-5.4 12-12 12H36c-6.6 0-12-5.4-12-12V396c0-6.6 5.4-12 12-12zm116-36v152c0 6.6 5.4 12 12 12h56c6.6 0 12-5.4 12-12V348c0-6.6-5.4-12-12-12h-56c-6.6 0-12 5.4-12 12zm128-80v232c0 6.6 5.4 12 12 12h56c6.6 0 12-5.4 12-12V268c0-6.6-5.4-12-12-12h-56c-6.6 0-12 5.4-12 12zm128-112v344c0 6.6 5.4 12 12 12h56c6.6 0 12-5.4 12-12V156c0-6.6-5.4-12-12-12h-56c-6.6 0-12 5.4-12 12zM536 12v488c0 6.6 5.4 12 12 12h56c6.6 0 12-5.4 12-12V12c0-6.6-5.4-12-12-12h-56c-6.6 0-12 5.4-12 12z"],
- "sitemap": [640, 512, [], "f0e8", "M616 320h-48v-48c0-22.056-17.944-40-40-40H344v-40h48c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H248c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h48v40H112c-22.056 0-40 17.944-40 40v48H24c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24V344c0-13.255-10.745-24-24-24h-48v-40h176v40h-48c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24V344c0-13.255-10.745-24-24-24h-48v-40h176v40h-48c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24V344c0-13.255-10.745-24-24-24z"],
- "sliders-h": [576, 512, [], "f1de", "M576 80v40c0 6.6-5.4 12-12 12H160v8c0 13.3-10.7 24-24 24h-16c-13.3 0-24-10.7-24-24v-8H12c-6.6 0-12-5.4-12-12V80c0-6.6 5.4-12 12-12h84v-8c0-13.3 10.7-24 24-24h16c13.3 0 24 10.7 24 24v8h404c6.6 0 12 5.4 12 12zm-12 148h-84v-8c0-13.3-10.7-24-24-24h-16c-13.3 0-24 10.7-24 24v8H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h404v8c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24v-8h84c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12zm0 160H288v-8c0-13.3-10.7-24-24-24h-16c-13.3 0-24 10.7-24 24v8H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h212v8c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24v-8h276c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12z"],
- "smile": [512, 512, [], "f118", "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-122.526 75.34c11.479-17.755-15.349-35.194-26.873-17.374-53.418 82.627-143.71 82.681-197.164 0-11.502-17.79-38.364-.401-26.873 17.374 66.014 102.107 184.795 102.265 250.91 0zM108 192c0 37.497 30.503 68 68 68s68-30.503 68-68-30.503-68-68-68-68 30.503-68 68zm160.5 0c0 37.221 30.279 67.5 67.5 67.5s67.5-30.279 67.5-67.5-30.279-67.5-67.5-67.5-67.5 30.279-67.5 67.5zm67.5-48a47.789 47.789 0 0 0-22.603 5.647h.015c10.916 0 19.765 8.849 19.765 19.765s-8.849 19.765-19.765 19.765-19.765-8.849-19.765-19.765v-.015A47.789 47.789 0 0 0 288 192c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48zm-160 0a47.789 47.789 0 0 0-22.603 5.647h.015c10.916 0 19.765 8.849 19.765 19.765s-8.849 19.765-19.765 19.765-19.765-8.849-19.765-19.765v-.015A47.789 47.789 0 0 0 128 192c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48z"],
- "snowflake": [448, 512, [], "f2dc", "M444.816 301.639a24.12 24.12 0 0 0 2.661-16.978c-2.725-12.966-15.339-21.245-28.174-18.492l-87.407 25.046L264 256l67.896-35.215 87.407 25.046c12.835 2.753 25.449-5.526 28.174-18.492 2.725-12.966-5.471-25.708-18.305-28.461l-47.477-7.137 53.077-30.956c11.363-6.627 15.257-21.306 8.696-32.785-6.561-11.479-21.091-15.412-32.454-8.785l-53.077 30.956 17.621-45.104c4.057-12.606-2.768-26.146-15.247-30.245-12.478-4.099-25.883 2.797-29.94 15.402l-22.232 88.99-60.38 35.215V144l65.175-63.945c8.778-9.852 7.987-25.027-1.766-33.894-9.753-8.867-24.775-8.068-33.552 1.784l-29.857 37.967V24c0-13.255-10.637-24-23.758-24s-23.758 10.745-23.758 24v61.912l-29.857-37.967c-8.779-9.852-23.799-10.652-33.552-1.784-9.753 8.867-10.543 24.042-1.766 33.894L200.242 144v70.431l-60.38-35.215-22.232-88.99c-4.057-12.605-17.462-19.501-29.94-15.402-12.478 4.099-19.304 17.64-15.247 30.245l17.62 45.104-53.077-30.956c-11.363-6.627-25.893-2.694-32.454 8.785s-2.667 26.157 8.696 32.785l53.077 30.956-47.477 7.137C5.993 201.634-2.203 214.375.523 227.341c2.725 12.965 15.339 21.245 28.174 18.492l87.407-25.046L184 256l-67.896 35.215-87.406-25.045c-12.835-2.753-25.449 5.526-28.174 18.492-2.725 12.967 5.47 25.708 18.305 28.461l47.477 7.137-53.077 30.956C1.866 357.843-2.027 372.521 4.533 384s21.091 15.412 32.454 8.785l53.077-30.956-17.62 45.104a24.157 24.157 0 0 0 2.022 19.428c2.831 4.953 7.416 8.909 13.224 10.816 12.478 4.099 25.883-2.797 29.94-15.402l22.232-88.99 60.38-35.215V368l-65.175 63.945c-8.778 9.852-7.987 25.027 1.766 33.894 9.754 8.868 24.774 8.068 33.552-1.784l29.857-37.967V488c0 13.255 10.637 24 23.758 24s23.758-10.745 23.758-24v-61.912l29.857 37.967A23.59 23.59 0 0 0 295.282 472a23.534 23.534 0 0 0 15.885-6.161c9.753-8.867 10.544-24.042 1.766-33.894L247.758 368v-70.431l60.38 35.215 22.232 88.99c4.057 12.605 17.462 19.501 29.94 15.402 12.479-4.099 19.304-17.64 15.247-30.245l-17.621-45.104 53.077 30.956c11.363 6.627 25.893 2.694 32.454-8.785s2.667-26.157-8.696-32.785l-53.077-30.956 47.477-7.137c6.86-1.469 12.394-5.793 15.645-11.481z"],
- "sort": [320, 512, [], "f0dc", "M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41zm255-105L177 64c-9.4-9.4-24.6-9.4-33.9 0L24 183c-15.1 15.1-4.4 41 17 41h238c21.4 0 32.1-25.9 17-41z"],
- "sort-alpha-down": [448, 512, [], "f15d", "M187.298 395.314l-79.984 80.002c-6.248 6.247-16.383 6.245-22.627 0L4.705 395.314C-5.365 385.244 1.807 368 16.019 368H64V48c0-8.837 7.163-16 16-16h32c8.837 0 16 7.163 16 16v320h47.984c14.241 0 21.363 17.264 11.314 27.314zm119.075-180.007A12 12 0 0 1 294.838 224h-35.717c-8.22 0-14.007-8.078-11.362-15.861l57.096-168A12 12 0 0 1 316.217 32h39.566c5.139 0 9.708 3.273 11.362 8.139l57.096 168C426.886 215.922 421.1 224 412.879 224h-35.735a12 12 0 0 1-11.515-8.622l-8.301-28.299h-42.863l-8.092 28.228zm22.857-78.697h13.367l-6.6-22.937-6.767 22.937zm12.575 287.323l67.451-95.698a12 12 0 0 0 2.192-6.913V300c0-6.627-5.373-12-12-12H274.522c-6.627 0-12 5.373-12 12v28.93c0 6.627 5.373 12 12 12h56.469c-.739.991-1.497 2.036-2.27 3.133l-67.203 95.205a12.001 12.001 0 0 0-2.196 6.92V468c0 6.627 5.373 12 12 12h129.355c6.627 0 12-5.373 12-12v-28.93c0-6.627-5.373-12-12-12h-61.146c.74-.993 1.5-2.039 2.274-3.137z"],
- "sort-alpha-up": [448, 512, [], "f15e", "M4.702 116.686l79.984-80.002c6.248-6.247 16.383-6.245 22.627 0l79.981 80.002c10.07 10.07 2.899 27.314-11.314 27.314H128v320c0 8.837-7.163 16-16 16H80c-8.837 0-16-7.163-16-16V144H16.016c-14.241 0-21.363-17.264-11.314-27.314zm301.671 98.621A12 12 0 0 1 294.838 224h-35.717c-8.22 0-14.007-8.078-11.362-15.861l57.096-168A12 12 0 0 1 316.217 32h39.566c5.139 0 9.708 3.273 11.362 8.139l57.096 168C426.886 215.922 421.1 224 412.879 224h-35.735a12 12 0 0 1-11.515-8.622l-8.301-28.299h-42.863l-8.092 28.228zm22.857-78.697h13.367l-6.6-22.937-6.767 22.937zm12.575 287.323l67.451-95.698a12 12 0 0 0 2.192-6.913V300c0-6.627-5.373-12-12-12H274.522c-6.627 0-12 5.373-12 12v28.93c0 6.627 5.373 12 12 12h56.469c-.739.991-1.497 2.036-2.27 3.133l-67.203 95.205a12.001 12.001 0 0 0-2.196 6.92V468c0 6.627 5.373 12 12 12h129.355c6.627 0 12-5.373 12-12v-28.93c0-6.627-5.373-12-12-12h-61.146c.74-.993 1.5-2.039 2.274-3.137z"],
- "sort-amount-down": [512, 512, [], "f160", "M187.298 395.314l-79.984 80.002c-6.248 6.247-16.383 6.245-22.627 0L4.705 395.314C-5.365 385.244 1.807 368 16.019 368H64V48c0-8.837 7.163-16 16-16h32c8.837 0 16 7.163 16 16v320h47.984c14.241 0 21.363 17.264 11.314 27.314zM240 96h256c8.837 0 16-7.163 16-16V48c0-8.837-7.163-16-16-16H240c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16zm-16 112v-32c0-8.837 7.163-16 16-16h192c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H240c-8.837 0-16-7.163-16-16zm0 256v-32c0-8.837 7.163-16 16-16h64c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-64c-8.837 0-16-7.163-16-16zm0-128v-32c0-8.837 7.163-16 16-16h128c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H240c-8.837 0-16-7.163-16-16z"],
- "sort-amount-up": [512, 512, [], "f161", "M4.702 116.686l79.984-80.002c6.248-6.247 16.383-6.245 22.627 0l79.981 80.002c10.07 10.07 2.899 27.314-11.314 27.314H128v320c0 8.837-7.163 16-16 16H80c-8.837 0-16-7.163-16-16V144H16.016c-14.241 0-21.363-17.264-11.314-27.314zM240 96h256c8.837 0 16-7.163 16-16V48c0-8.837-7.163-16-16-16H240c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16zm-16 112v-32c0-8.837 7.163-16 16-16h192c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H240c-8.837 0-16-7.163-16-16zm0 256v-32c0-8.837 7.163-16 16-16h64c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-64c-8.837 0-16-7.163-16-16zm0-128v-32c0-8.837 7.163-16 16-16h128c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H240c-8.837 0-16-7.163-16-16z"],
- "sort-down": [320, 512, [], "f0dd", "M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41z"],
- "sort-numeric-down": [448, 512, [], "f162", "M308.811 113.787l-19.448-20.795c-4.522-4.836-4.274-12.421.556-16.95l43.443-40.741a11.999 11.999 0 0 1 8.209-3.247h31.591c6.627 0 12 5.373 12 12v127.07h25.66c6.627 0 12 5.373 12 12v28.93c0 6.627-5.373 12-12 12H301.649c-6.627 0-12-5.373-12-12v-28.93c0-6.627 5.373-12 12-12h25.414v-57.938c-7.254 6.58-14.211 4.921-18.252.601zm-30.57 238.569c0-32.653 23.865-67.356 68.094-67.356 38.253 0 79.424 28.861 79.424 92.228 0 51.276-32.237 105.772-91.983 105.772-17.836 0-30.546-3.557-38.548-6.781-5.79-2.333-8.789-8.746-6.922-14.703l9.237-29.48c2.035-6.496 9.049-9.983 15.467-7.716 13.029 4.602 27.878 5.275 38.103-4.138-38.742 5.072-72.872-25.36-72.872-67.826zm92.273 19.338c0-22.285-15.302-36.505-25.835-36.505-8.642 0-13.164 7.965-13.164 15.832 0 5.669 1.815 24.168 25.168 24.168 9.973 0 13.377-2.154 13.744-2.731.021-.046.087-.291.087-.764zM175.984 368H128V48c0-8.837-7.163-16-16-16H80c-8.837 0-16 7.163-16 16v320H16.019c-14.212 0-21.384 17.244-11.314 27.314l79.981 80.002c6.245 6.245 16.38 6.247 22.627 0l79.984-80.002c10.05-10.05 2.928-27.314-11.313-27.314z"],
- "sort-numeric-up": [448, 512, [], "f163", "M308.811 113.787l-19.448-20.795c-4.522-4.836-4.274-12.421.556-16.95l43.443-40.741a11.999 11.999 0 0 1 8.209-3.247h31.591c6.627 0 12 5.373 12 12v127.07h25.66c6.627 0 12 5.373 12 12v28.93c0 6.627-5.373 12-12 12H301.649c-6.627 0-12-5.373-12-12v-28.93c0-6.627 5.373-12 12-12h25.414v-57.938c-7.254 6.58-14.211 4.921-18.252.601zm-30.57 238.569c0-32.653 23.865-67.356 68.094-67.356 38.253 0 79.424 28.861 79.424 92.228 0 51.276-32.237 105.772-91.983 105.772-17.836 0-30.546-3.557-38.548-6.781-5.79-2.333-8.789-8.746-6.922-14.703l9.237-29.48c2.035-6.496 9.049-9.983 15.467-7.716 13.029 4.602 27.878 5.275 38.103-4.138-38.742 5.072-72.872-25.36-72.872-67.826zm92.273 19.338c0-22.285-15.302-36.505-25.835-36.505-8.642 0-13.164 7.965-13.164 15.832 0 5.669 1.815 24.168 25.168 24.168 9.973 0 13.377-2.154 13.744-2.731.021-.046.087-.291.087-.764zM16.016 144H64v320c0 8.837 7.163 16 16 16h32c8.837 0 16-7.163 16-16V144h47.981c14.212 0 21.384-17.244 11.314-27.314l-79.981-80.002c-6.245-6.245-16.38-6.247-22.627 0L4.702 116.686C-5.347 126.736 1.775 144 16.016 144z"],
- "sort-up": [320, 512, [], "f0de", "M279 224H41c-21.4 0-32.1-25.9-17-41L143 64c9.4-9.4 24.6-9.4 33.9 0l119 119c15.2 15.1 4.5 41-16.9 41z"],
- "space-shuttle": [640, 512, [], "f197", "M592.604 208.244C559.735 192.836 515.777 184 472 184H186.327c-4.952-6.555-10.585-11.978-16.72-16H376C229.157 137.747 219.403 32 96.003 32H96v128H80V32c-26.51 0-48 28.654-48 64v64c-23.197 0-32 10.032-32 24v40c0 13.983 8.819 24 32 24v16c-23.197 0-32 10.032-32 24v40c0 13.983 8.819 24 32 24v64c0 35.346 21.49 64 48 64V352h16v128h.003c123.4 0 133.154-105.747 279.997-136H169.606c6.135-4.022 11.768-9.445 16.72-16H472c43.777 0 87.735-8.836 120.604-24.244C622.282 289.845 640 271.992 640 256s-17.718-33.845-47.396-47.756zM488 296a8 8 0 0 1-8-8v-64a8 8 0 0 1 8-8c31.909 0 31.942 80 0 80z"],
- "spinner": [512, 512, [], "f110", "M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"],
- "square": [448, 512, [], "f0c8", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"],
- "star": [576, 512, [], "f005", "M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"],
- "star-half": [576, 512, [], "f089", "M288 0c-11.4 0-22.8 5.9-28.7 17.8L194 150.2 47.9 171.4c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.1 23 46 46.4 33.7L288 439.6V0z"],
- "step-backward": [448, 512, [], "f048", "M64 468V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v176.4l195.5-181C352.1 22.3 384 36.6 384 64v384c0 27.4-31.9 41.7-52.5 24.6L136 292.7V468c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12z"],
- "step-forward": [448, 512, [], "f051", "M384 44v424c0 6.6-5.4 12-12 12h-48c-6.6 0-12-5.4-12-12V291.6l-195.5 181C95.9 489.7 64 475.4 64 448V64c0-27.4 31.9-41.7 52.5-24.6L312 219.3V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12z"],
- "stethoscope": [512, 512, [], "f0f1", "M512 176c0-35.659-29.164-64.507-64.941-63.993-34.21.492-62.296 28.357-63.043 62.562-.531 24.282 12.476 45.558 31.984 56.848V344c0 57.346-50.243 104-112 104-60.039 0-109.189-44.096-111.878-99.24C265.005 333.847 320 269.225 320 192V36.584c0-11.44-8.075-21.29-19.293-23.534L237.81.471c-12.997-2.599-25.641 5.83-28.241 18.827l-3.138 15.689c-2.6 12.997 5.83 25.641 18.827 28.241L256 69.376v121.4c0 52.852-42.203 96.707-95.053 97.22C107.58 288.513 64 245.25 64 192V69.376l30.742-6.149c12.997-2.6 21.427-15.243 18.827-28.241l-3.138-15.689C107.831 6.3 95.188-2.129 82.19.471L19.293 13.05C8.075 15.294 0 25.144 0 36.584V192c0 77.295 55.096 141.961 128.076 156.798C130.747 439.223 208.634 512 304 512c97.047 0 176-75.364 176-168V231.417c19.124-11.068 32-31.732 32-55.417zm-64-16c8.822 0 16 7.178 16 16s-7.178 16-16 16-16-7.178-16-16 7.178-16 16-16z"],
- "sticky-note": [448, 512, [], "f249", "M312 320h136V56c0-13.3-10.7-24-24-24H24C10.7 32 0 42.7 0 56v400c0 13.3 10.7 24 24 24h264V344c0-13.2 10.8-24 24-24zm129 55l-98 98c-4.5 4.5-10.6 7-17 7h-6V352h128v6.1c0 6.3-2.5 12.4-7 16.9z"],
- "stop": [448, 512, [], "f04d", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"],
- "stop-circle": [512, 512, [], "f28d", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"],
- "stopwatch": [448, 512, [], "f2f2", "M432 304c0 114.9-93.1 208-208 208S16 418.9 16 304c0-104 76.3-190.2 176-205.5V64h-28c-6.6 0-12-5.4-12-12V12c0-6.6 5.4-12 12-12h120c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-28v34.5c37.5 5.8 71.7 21.6 99.7 44.6l27.5-27.5c4.7-4.7 12.3-4.7 17 0l28.3 28.3c4.7 4.7 4.7 12.3 0 17l-29.4 29.4-.6.6C419.7 223.3 432 262.2 432 304zm-176 36V188.5c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12V340c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12z"],
- "street-view": [512, 512, [], "f21d", "M192 64c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64zm112 80h-11.36c-22.711 10.443-49.59 10.894-73.28 0H208c-26.51 0-48 21.49-48 48v104c0 13.255 10.745 24 24 24h16v104c0 13.255 10.745 24 24 24h64c13.255 0 24-10.745 24-24V320h16c13.255 0 24-10.745 24-24V192c0-26.51-21.49-48-48-48zm85.642 189.152a72.503 72.503 0 0 1-29.01 27.009C391.133 365.251 480 385.854 480 416c0 46.304-167.656 64-224 64-70.303 0-224-20.859-224-64 0-30.123 88.361-50.665 119.367-55.839a72.516 72.516 0 0 1-29.01-27.009C74.959 343.395 0 367.599 0 416c0 77.111 178.658 96 256 96 77.249 0 256-18.865 256-96 0-48.403-74.967-72.606-122.358-82.848z"],
- "strikethrough": [512, 512, [], "f0cc", "M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z"],
- "subscript": [512, 512, [], "f12c", "M395.198 416c3.461-10.526 18.796-21.28 36.265-32.425 16.625-10.605 35.467-22.626 50.341-38.862 17.458-19.054 25.944-40.175 25.944-64.567 0-60.562-50.702-88.146-97.81-88.146-42.491 0-76.378 22.016-94.432 50.447-4.654 7.329-2.592 17.036 4.623 21.865l30.328 20.296c7.032 4.706 16.46 3.084 21.63-3.614 8.022-10.394 18.818-18.225 31.667-18.225 19.387 0 26.266 12.901 26.266 23.948 0 36.159-119.437 57.023-119.437 160.024 0 6.654.561 13.014 1.415 19.331 1.076 7.964 7.834 13.928 15.87 13.928H496c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16H395.198zM272 256c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-62.399a16 16 0 0 1-13.541-7.478l-45.701-72.615c-2.297-3.352-4.422-6.969-6.195-10.209-1.65 3.244-3.647 6.937-5.874 10.582l-44.712 72.147a15.999 15.999 0 0 1-13.6 7.572H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h26.325l56.552-82.709L46.111 96H16C7.163 96 0 88.837 0 80V48c0-8.837 7.163-16 16-16h68.806a16 16 0 0 1 13.645 7.644l39.882 65.126c2.072 3.523 4.053 7.171 5.727 10.37 1.777-3.244 3.92-6.954 6.237-10.537l40.332-65.035A15.999 15.999 0 0 1 204.226 32H272c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-27.979l-52.69 75.671L249.974 256H272z"],
- "subway": [448, 512, [], "f239", "M448 96v256c0 51.815-61.624 96-130.022 96l62.98 49.721C386.905 502.417 383.562 512 376 512H72c-7.578 0-10.892-9.594-4.957-14.279L130.022 448C61.82 448 0 403.954 0 352V96C0 42.981 64 0 128 0h192c65 0 128 42.981 128 96zM200 232V120c0-13.255-10.745-24-24-24H72c-13.255 0-24 10.745-24 24v112c0 13.255 10.745 24 24 24h104c13.255 0 24-10.745 24-24zm200 0V120c0-13.255-10.745-24-24-24H272c-13.255 0-24 10.745-24 24v112c0 13.255 10.745 24 24 24h104c13.255 0 24-10.745 24-24zm-48 56c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm-256 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z"],
- "suitcase": [512, 512, [], "f0f2", "M96 480h320V128h-32V80c0-26.51-21.49-48-48-48H176c-26.51 0-48 21.49-48 48v48H96v352zm96-384h128v32H192V96zm320 80v256c0 26.51-21.49 48-48 48h-16V128h16c26.51 0 48 21.49 48 48zM64 480H48c-26.51 0-48-21.49-48-48V176c0-26.51 21.49-48 48-48h16v352z"],
- "sun": [512, 512, [], "f185", "M274.835 12.646l25.516 62.393c4.213 10.301 16.671 14.349 26.134 8.492l57.316-35.479c15.49-9.588 34.808 4.447 30.475 22.142l-16.03 65.475c-2.647 10.81 5.053 21.408 16.152 22.231l67.224 4.987c18.167 1.348 25.546 24.057 11.641 35.826L441.81 242.26c-8.495 7.19-8.495 20.289 0 27.479l51.454 43.548c13.906 11.769 6.527 34.478-11.641 35.826l-67.224 4.987c-11.099.823-18.799 11.421-16.152 22.231l16.03 65.475c4.332 17.695-14.986 31.73-30.475 22.142l-57.316-35.479c-9.463-5.858-21.922-1.81-26.134 8.492l-25.516 62.393c-6.896 16.862-30.774 16.862-37.67 0l-25.516-62.393c-4.213-10.301-16.671-14.349-26.134-8.492l-57.317 35.479c-15.49 9.588-34.808-4.447-30.475-22.142l16.03-65.475c2.647-10.81-5.053-21.408-16.152-22.231l-67.224-4.987c-18.167-1.348-25.546-24.057-11.641-35.826L70.19 269.74c8.495-7.19 8.495-20.289 0-27.479l-51.454-43.548c-13.906-11.769-6.527-34.478 11.641-35.826l67.224-4.987c11.099-.823 18.799-11.421 16.152-22.231l-16.03-65.475c-4.332-17.695 14.986-31.73 30.475-22.142l57.317 35.479c9.463 5.858 21.921 1.81 26.134-8.492l25.516-62.393c6.896-16.861 30.774-16.861 37.67 0zM392 256c0-74.991-61.01-136-136-136-74.991 0-136 61.009-136 136s61.009 136 136 136c74.99 0 136-61.009 136-136zm-32 0c0 57.346-46.654 104-104 104s-104-46.654-104-104 46.654-104 104-104 104 46.654 104 104z"],
- "superscript": [512, 512, [], "f12b", "M395.198 256c3.461-10.526 18.796-21.28 36.265-32.425 16.625-10.605 35.467-22.626 50.341-38.862 17.458-19.054 25.944-40.175 25.944-64.567 0-60.562-50.702-88.146-97.81-88.146-42.491 0-76.378 22.016-94.432 50.447-4.654 7.329-2.592 17.036 4.623 21.865l30.328 20.296c7.032 4.706 16.46 3.084 21.63-3.614 8.022-10.394 18.818-18.225 31.667-18.225 19.387 0 26.266 12.901 26.266 23.948 0 36.159-119.437 57.023-119.437 160.024 0 6.654.561 13.014 1.415 19.331 1.076 7.964 7.834 13.928 15.87 13.928H496c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16H395.198zM272 416c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-62.399a16 16 0 0 1-13.541-7.478l-45.701-72.615c-2.297-3.352-4.422-6.969-6.195-10.209-1.65 3.244-3.647 6.937-5.874 10.582l-44.712 72.147a15.999 15.999 0 0 1-13.6 7.572H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h26.325l56.552-82.709L46.111 256H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h68.806a16 16 0 0 1 13.645 7.644l39.882 65.126c2.072 3.523 4.053 7.171 5.727 10.37 1.777-3.244 3.92-6.954 6.237-10.537l40.332-65.035a16 16 0 0 1 13.598-7.567H272c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-27.979l-52.69 75.671L249.974 416H272z"],
- "sync": [512, 512, [], "f021", "M440.935 12.574l3.966 82.766C399.416 41.904 331.674 8 256 8 134.813 8 33.933 94.924 12.296 209.824 10.908 217.193 16.604 224 24.103 224h49.084c5.57 0 10.377-3.842 11.676-9.259C103.407 137.408 172.931 80 256 80c60.893 0 114.512 30.856 146.104 77.801l-101.53-4.865c-6.845-.328-12.574 5.133-12.574 11.986v47.411c0 6.627 5.373 12 12 12h200.333c6.627 0 12-5.373 12-12V12c0-6.627-5.373-12-12-12h-47.411c-6.853 0-12.315 5.729-11.987 12.574zM256 432c-60.895 0-114.517-30.858-146.109-77.805l101.868 4.871c6.845.327 12.573-5.134 12.573-11.986v-47.412c0-6.627-5.373-12-12-12H12c-6.627 0-12 5.373-12 12V500c0 6.627 5.373 12 12 12h47.385c6.863 0 12.328-5.745 11.985-12.599l-4.129-82.575C112.725 470.166 180.405 504 256 504c121.187 0 222.067-86.924 243.704-201.824 1.388-7.369-4.308-14.176-11.807-14.176h-49.084c-5.57 0-10.377 3.842-11.676 9.259C408.593 374.592 339.069 432 256 432z"],
- "sync-alt": [512, 512, [], "f2f1", "M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z"],
- "table": [512, 512, [], "f0ce", "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z"],
- "tablet": [448, 512, [], "f10a", "M400 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM224 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"],
- "tablet-alt": [448, 512, [], "f3fa", "M400 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM224 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm176-108c0 6.6-5.4 12-12 12H60c-6.6 0-12-5.4-12-12V60c0-6.6 5.4-12 12-12h328c6.6 0 12 5.4 12 12v312z"],
- "tachometer-alt": [576, 512, [], "f3fd", "M75.694 480a48.02 48.02 0 0 1-42.448-25.571C12.023 414.3 0 368.556 0 320 0 160.942 128.942 32 288 32s288 128.942 288 288c0 48.556-12.023 94.3-33.246 134.429A48.018 48.018 0 0 1 500.306 480H75.694zM512 288c-17.673 0-32 14.327-32 32 0 17.673 14.327 32 32 32s32-14.327 32-32c0-17.673-14.327-32-32-32zM288 128c17.673 0 32-14.327 32-32 0-17.673-14.327-32-32-32s-32 14.327-32 32c0 17.673 14.327 32 32 32zM64 288c-17.673 0-32 14.327-32 32 0 17.673 14.327 32 32 32s32-14.327 32-32c0-17.673-14.327-32-32-32zm65.608-158.392c-17.673 0-32 14.327-32 32 0 17.673 14.327 32 32 32s32-14.327 32-32c0-17.673-14.327-32-32-32zm316.784 0c-17.673 0-32 14.327-32 32 0 17.673 14.327 32 32 32s32-14.327 32-32c0-17.673-14.327-32-32-32zm-87.078 31.534c-12.627-4.04-26.133 2.92-30.173 15.544l-45.923 143.511C250.108 322.645 224 350.264 224 384c0 35.346 28.654 64 64 64 35.346 0 64-28.654 64-64 0-19.773-8.971-37.447-23.061-49.187l45.919-143.498c4.039-12.625-2.92-26.133-15.544-30.173z"],
- "tag": [512, 512, [], "f02b", "M0 252.118V48C0 21.49 21.49 0 48 0h204.118a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882L293.823 497.941c-18.745 18.745-49.137 18.745-67.882 0L14.059 286.059A48 48 0 0 1 0 252.118zM112 64c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z"],
- "tags": [640, 512, [], "f02c", "M497.941 225.941L286.059 14.059A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v204.118a48 48 0 0 0 14.059 33.941l211.882 211.882c18.744 18.745 49.136 18.746 67.882 0l204.118-204.118c18.745-18.745 18.745-49.137 0-67.882zM112 160c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm513.941 133.823L421.823 497.941c-18.745 18.745-49.137 18.745-67.882 0l-.36-.36L527.64 323.522c16.999-16.999 26.36-39.6 26.36-63.64s-9.362-46.641-26.36-63.64L331.397 0h48.721a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882z"],
- "tasks": [512, 512, [], "f0ae", "M208 132h288c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zM64 368c-26.5 0-48.6 21.5-48.6 48s22.1 48 48.6 48 48-21.5 48-48-21.5-48-48-48zm92.5-299l-72.2 72.2-15.6 15.6c-4.7 4.7-12.9 4.7-17.6 0L3.5 109.4c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.3c4.7-4.7 12.3-4.7 17 0l17 16.5c4.6 4.7 4.6 12.3-.1 17zm0 159.6l-72.2 72.2-15.7 15.7c-4.7 4.7-12.9 4.7-17.6 0L3.5 269c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.7c4.7-4.7 12.3-4.7 17 0l17 17c4.6 4.6 4.6 12.2-.1 16.9z"],
- "taxi": [512, 512, [], "f1ba", "M461.951 243.865l-21.816-87.268A79.885 79.885 0 0 0 362.522 96H352V56c0-13.255-10.745-24-24-24H184c-13.255 0-24 10.745-24 24v40h-10.522a79.885 79.885 0 0 0-77.612 60.597L50.05 243.865C25.515 252.823 8 276.366 8 304v48c0 20.207 9.374 38.214 24 49.943V456c0 13.255 10.745 24 24 24h48c13.255 0 24-10.745 24-24v-40h256v40c0 13.255 10.745 24 24 24h48c13.255 0 24-10.745 24-24v-54.057c14.626-11.729 24-29.737 24-49.943v-48c0-27.634-17.515-51.177-42.049-60.135zM149.478 160h213.045a15.975 15.975 0 0 1 15.522 12.12l16.97 67.88h-278.03l16.97-67.881A15.976 15.976 0 0 1 149.478 160zM132 336c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36zm320 0c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36z"],
- "terminal": [640, 512, [], "f120", "M257.981 272.971L63.638 467.314c-9.373 9.373-24.569 9.373-33.941 0L7.029 444.647c-9.357-9.357-9.375-24.522-.04-33.901L161.011 256 6.99 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L257.981 239.03c9.373 9.372 9.373 24.568 0 33.941zM640 456v-32c0-13.255-10.745-24-24-24H312c-13.255 0-24 10.745-24 24v32c0 13.255 10.745 24 24 24h304c13.255 0 24-10.745 24-24z"],
- "text-height": [576, 512, [], "f034", "M16 32h288c8.837 0 16 7.163 16 16v96c0 8.837-7.163 16-16 16h-35.496c-8.837 0-16-7.163-16-16V96h-54.761v320H232c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H88c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h34.257V96H67.496v48c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16V48c0-8.837 7.163-16 16-16zm475.308 4.685l79.995 80.001C581.309 126.693 574.297 144 559.99 144H512v224h48c15.639 0 20.635 17.991 11.313 27.314l-79.995 80.001c-6.247 6.247-16.381 6.245-22.626 0l-79.995-80.001C378.691 385.307 385.703 368 400.01 368H448V144h-48c-15.639 0-20.635-17.991-11.313-27.314l79.995-80.001c6.247-6.248 16.381-6.245 22.626 0z"],
- "text-width": [448, 512, [], "f035", "M16 32h416c8.837 0 16 7.163 16 16v96c0 8.837-7.163 16-16 16h-35.496c-8.837 0-16-7.163-16-16V96H261.743v128H296c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H152c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h34.257V96H67.496v48c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16V48c0-8.837 7.163-16 16-16zm427.315 340.682l-80.001-79.995C353.991 283.365 336 288.362 336 304v48H112v-47.99c0-14.307-17.307-21.319-27.314-11.313L4.685 372.692c-6.245 6.245-6.247 16.379 0 22.626l80.001 79.995C94.009 484.635 112 479.638 112 464v-48h224v47.99c0 14.307 17.307 21.319 27.314 11.313l80.001-79.995c6.245-6.245 6.248-16.379 0-22.626z"],
- "th": [512, 512, [], "f00a", "M149.333 56v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zm181.334 240v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm32-240v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24zm-32 80V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm-205.334 56H24c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm386.667-56H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm0 160H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zM181.333 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24z"],
- "th-large": [512, 512, [], "f009", "M296 32h192c13.255 0 24 10.745 24 24v160c0 13.255-10.745 24-24 24H296c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24zm-80 0H24C10.745 32 0 42.745 0 56v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24zM0 296v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm296 184h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H296c-13.255 0-24 10.745-24 24v160c0 13.255 10.745 24 24 24z"],
- "th-list": [512, 512, [], "f00b", "M149.333 216v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-80c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zM125.333 32H24C10.745 32 0 42.745 0 56v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24zm80 448H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm-24-424v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24zm24 264H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24z"],
- "thermometer-empty": [256, 512, [], "f2cb", "M192 384c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64zm32-84.653c19.912 22.563 32 52.194 32 84.653 0 70.696-57.303 128-128 128-.299 0-.609-.001-.909-.003C56.789 511.509-.357 453.636.002 383.333.166 351.135 12.225 321.755 32 299.347V96c0-53.019 42.981-96 96-96s96 42.981 96 96v203.347zM208 384c0-34.339-19.37-52.19-32-66.502V96c0-26.467-21.533-48-48-48S80 69.533 80 96v221.498c-12.732 14.428-31.825 32.1-31.999 66.08-.224 43.876 35.563 80.116 79.423 80.42L128 464c44.112 0 80-35.888 80-80z"],
- "thermometer-full": [256, 512, [], "f2c7", "M224 96c0-53.019-42.981-96-96-96S32 42.981 32 96v203.347C12.225 321.756.166 351.136.002 383.333c-.359 70.303 56.787 128.176 127.089 128.664.299.002.61.003.909.003 70.698 0 128-57.304 128-128 0-32.459-12.088-62.09-32-84.653V96zm-96 368l-.576-.002c-43.86-.304-79.647-36.544-79.423-80.42.173-33.98 19.266-51.652 31.999-66.08V96c0-26.467 21.533-48 48-48s48 21.533 48 48v221.498c12.63 14.312 32 32.164 32 66.502 0 44.112-35.888 80-80 80zm64-80c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-23.685 12.876-44.349 32-55.417V96c0-17.673 14.327-32 32-32s32 14.327 32 32v232.583c19.124 11.068 32 31.732 32 55.417z"],
- "thermometer-half": [256, 512, [], "f2c9", "M192 384c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-23.685 12.876-44.349 32-55.417V224c0-17.673 14.327-32 32-32s32 14.327 32 32v104.583c19.124 11.068 32 31.732 32 55.417zm32-84.653c19.912 22.563 32 52.194 32 84.653 0 70.696-57.303 128-128 128-.299 0-.609-.001-.909-.003C56.789 511.509-.357 453.636.002 383.333.166 351.135 12.225 321.755 32 299.347V96c0-53.019 42.981-96 96-96s96 42.981 96 96v203.347zM208 384c0-34.339-19.37-52.19-32-66.502V96c0-26.467-21.533-48-48-48S80 69.533 80 96v221.498c-12.732 14.428-31.825 32.1-31.999 66.08-.224 43.876 35.563 80.116 79.423 80.42L128 464c44.112 0 80-35.888 80-80z"],
- "thermometer-quarter": [256, 512, [], "f2ca", "M192 384c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-23.685 12.876-44.349 32-55.417V288c0-17.673 14.327-32 32-32s32 14.327 32 32v40.583c19.124 11.068 32 31.732 32 55.417zm32-84.653c19.912 22.563 32 52.194 32 84.653 0 70.696-57.303 128-128 128-.299 0-.609-.001-.909-.003C56.789 511.509-.357 453.636.002 383.333.166 351.135 12.225 321.755 32 299.347V96c0-53.019 42.981-96 96-96s96 42.981 96 96v203.347zM208 384c0-34.339-19.37-52.19-32-66.502V96c0-26.467-21.533-48-48-48S80 69.533 80 96v221.498c-12.732 14.428-31.825 32.1-31.999 66.08-.224 43.876 35.563 80.116 79.423 80.42L128 464c44.112 0 80-35.888 80-80z"],
- "thermometer-three-quarters": [256, 512, [], "f2c8", "M192 384c0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64 0-23.685 12.876-44.349 32-55.417V160c0-17.673 14.327-32 32-32s32 14.327 32 32v168.583c19.124 11.068 32 31.732 32 55.417zm32-84.653c19.912 22.563 32 52.194 32 84.653 0 70.696-57.303 128-128 128-.299 0-.609-.001-.909-.003C56.789 511.509-.357 453.636.002 383.333.166 351.135 12.225 321.755 32 299.347V96c0-53.019 42.981-96 96-96s96 42.981 96 96v203.347zM208 384c0-34.339-19.37-52.19-32-66.502V96c0-26.467-21.533-48-48-48S80 69.533 80 96v221.498c-12.732 14.428-31.825 32.1-31.999 66.08-.224 43.876 35.563 80.116 79.423 80.42L128 464c44.112 0 80-35.888 80-80z"],
- "thumbs-down": [512, 512, [], "f165", "M0 56v240c0 13.255 10.745 24 24 24h80c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H24C10.745 32 0 42.745 0 56zm40 200c0-13.255 10.745-24 24-24s24 10.745 24 24-10.745 24-24 24-24-10.745-24-24zm272 256c-20.183 0-29.485-39.293-33.931-57.795-5.206-21.666-10.589-44.07-25.393-58.902-32.469-32.524-49.503-73.967-89.117-113.111a11.98 11.98 0 0 1-3.558-8.521V59.901c0-6.541 5.243-11.878 11.783-11.998 15.831-.29 36.694-9.079 52.651-16.178C256.189 17.598 295.709.017 343.995 0h2.844c42.777 0 93.363.413 113.774 29.737 8.392 12.057 10.446 27.034 6.148 44.632 16.312 17.053 25.063 48.863 16.382 74.757 17.544 23.432 19.143 56.132 9.308 79.469l.11.11c11.893 11.949 19.523 31.259 19.439 49.197-.156 30.352-26.157 58.098-59.553 58.098H350.723C358.03 364.34 384 388.132 384 430.548 384 504 336 512 312 512z"],
- "thumbs-up": [512, 512, [], "f164", "M104 224H24c-13.255 0-24 10.745-24 24v240c0 13.255 10.745 24 24 24h80c13.255 0 24-10.745 24-24V248c0-13.255-10.745-24-24-24zM64 472c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zM384 81.452c0 42.416-25.97 66.208-33.277 94.548h101.723c33.397 0 59.397 27.746 59.553 58.098.084 17.938-7.546 37.249-19.439 49.197l-.11.11c9.836 23.337 8.237 56.037-9.308 79.469 8.681 25.895-.069 57.704-16.382 74.757 4.298 17.598 2.244 32.575-6.148 44.632C440.202 511.587 389.616 512 346.839 512l-2.845-.001c-48.287-.017-87.806-17.598-119.56-31.725-15.957-7.099-36.821-15.887-52.651-16.178-6.54-.12-11.783-5.457-11.783-11.998v-213.77c0-3.2 1.282-6.271 3.558-8.521 39.614-39.144 56.648-80.587 89.117-113.111 14.804-14.832 20.188-37.236 25.393-58.902C282.515 39.293 291.817 0 312 0c24 0 72 8 72 81.452z"],
- "thumbtack": [384, 512, [], "f08d", "M298.028 214.267L285.793 96H328c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H56C42.745 0 32 10.745 32 24v48c0 13.255 10.745 24 24 24h42.207L85.972 214.267C37.465 236.82 0 277.261 0 328c0 13.255 10.745 24 24 24h136v104.007c0 1.242.289 2.467.845 3.578l24 48c2.941 5.882 11.364 5.893 14.311 0l24-48a8.008 8.008 0 0 0 .845-3.578V352h136c13.255 0 24-10.745 24-24-.001-51.183-37.983-91.42-85.973-113.733z"],
- "ticket-alt": [576, 512, [], "f3ff", "M128 160h320v192H128V160zm400 96c0 26.51 21.49 48 48 48v96c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48v-96c26.51 0 48-21.49 48-48s-21.49-48-48-48v-96c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v96c-26.51 0-48 21.49-48 48zm-48-104c0-13.255-10.745-24-24-24H120c-13.255 0-24 10.745-24 24v208c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V152z"],
- "times": [384, 512, [], "f00d", "M323.1 441l53.9-53.9c9.4-9.4 9.4-24.5 0-33.9L279.8 256l97.2-97.2c9.4-9.4 9.4-24.5 0-33.9L323.1 71c-9.4-9.4-24.5-9.4-33.9 0L192 168.2 94.8 71c-9.4-9.4-24.5-9.4-33.9 0L7 124.9c-9.4 9.4-9.4 24.5 0 33.9l97.2 97.2L7 353.2c-9.4 9.4-9.4 24.5 0 33.9L60.9 441c9.4 9.4 24.5 9.4 33.9 0l97.2-97.2 97.2 97.2c9.3 9.3 24.5 9.3 33.9 0z"],
- "times-circle": [512, 512, [], "f057", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"],
- "tint": [384, 512, [], "f043", "M192 512c-98.435 0-178.087-79.652-178.087-178.087 0-111.196 101.194-154.065 148.522-311.825 9.104-30.116 51.099-28.778 59.13 0 47.546 158.486 148.522 200.069 148.522 311.825C370.087 432.348 290.435 512 192 512zm-42.522-171.826c-1.509-5.533-9.447-5.532-10.956 0-9.223 29.425-27.913 37.645-27.913 58.435C110.609 417.13 125.478 432 144 432s33.391-14.87 33.391-33.391c0-20.839-18.673-28.956-27.913-58.435z"],
- "toggle-off": [576, 512, [], "f204", "M384 64H192C85.961 64 0 149.961 0 256s85.961 192 192 192h192c106.039 0 192-85.961 192-192S490.039 64 384 64zM64 256c0-70.741 57.249-128 128-128 70.741 0 128 57.249 128 128 0 70.741-57.249 128-128 128-70.741 0-128-57.249-128-128zm320 128h-48.905c65.217-72.858 65.236-183.12 0-256H384c70.741 0 128 57.249 128 128 0 70.74-57.249 128-128 128z"],
- "toggle-on": [576, 512, [], "f205", "M576 256c0 106.039-85.961 192-192 192H192C85.961 448 0 362.039 0 256S85.961 64 192 64h192c106.039 0 192 85.961 192 192zM384 128c-70.741 0-128 57.249-128 128 0 70.741 57.249 128 128 128 70.741 0 128-57.249 128-128 0-70.741-57.249-128-128-128"],
- "trademark": [640, 512, [], "f25c", "M97.119 163.133H12c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h248.559c6.627 0 12 5.373 12 12v43.133c0 6.627-5.373 12-12 12H175.44V404c0 6.627-5.373 12-12 12h-54.322c-6.627 0-12-5.373-12-12V163.133zM329.825 96h65.425a12 12 0 0 1 11.346 8.093l43.759 127.068c7.161 20.588 16.111 52.812 16.111 52.812h.896s8.95-32.224 16.111-52.812l43.758-127.068A12 12 0 0 1 538.577 96h65.41a12 12 0 0 1 11.961 11.03l24.012 296c.567 6.987-4.951 12.97-11.961 12.97h-54.101a12 12 0 0 1-11.972-11.182l-9.082-132.93c-1.79-24.168 0-53.706 0-53.706h-.896s-10.741 33.566-17.902 53.706l-30.7 84.731a12 12 0 0 1-11.282 7.912h-50.302a12 12 0 0 1-11.282-7.912l-30.7-84.731c-7.161-20.14-17.903-53.706-17.903-53.706h-.895s1.79 29.538 0 53.706l-9.082 132.93c-.428 6.295-5.66 11.182-11.97 11.182H305.4c-7.017 0-12.536-5.994-11.959-12.987l24.425-296A11.999 11.999 0 0 1 329.825 96z"],
- "train": [448, 512, [], "f238", "M448 96v256c0 51.815-61.624 96-130.022 96l62.98 49.721C386.905 502.417 383.562 512 376 512H72c-7.578 0-10.892-9.594-4.957-14.279L130.022 448C61.82 448 0 403.954 0 352V96C0 42.981 64 0 128 0h192c65 0 128 42.981 128 96zm-48 136V120c0-13.255-10.745-24-24-24H72c-13.255 0-24 10.745-24 24v112c0 13.255 10.745 24 24 24h304c13.255 0 24-10.745 24-24zm-176 64c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56z"],
- "transgender": [384, 512, [], "f224", "M372 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-80.7 80.7C198.5 104.1 172.2 96 144 96 64.5 96 0 160.5 0 240c0 68.5 47.9 125.9 112 140.4V408H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v28c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-28h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-27.6c64.1-14.6 112-71.9 112-140.4 0-28.2-8.1-54.5-22.1-76.7l80.7-80.7 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V12c0-6.6-5.4-12-12-12zM144 320c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"],
- "transgender-alt": [480, 512, [], "f225", "M468 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-80.7 80.7C294.5 104.1 268.2 96 240 96c-28.2 0-54.5 8.1-76.7 22.1l-16.5-16.5 19.8-19.8c4.7-4.7 4.7-12.3 0-17l-28.3-28.3c-4.7-4.7-12.3-4.7-17 0l-19.8 19.8-19-19 16.9-16.9C107.1 12.9 101.7 0 91 0H12C5.4 0 0 5.4 0 12v79c0 10.7 12.9 16 20.5 8.5l16.9-16.9 19 19-19.8 19.8c-4.7 4.7-4.7 12.3 0 17l28.3 28.3c4.7 4.7 12.3 4.7 17 0l19.8-19.8 16.5 16.5C104.1 185.5 96 211.8 96 240c0 68.5 47.9 125.9 112 140.4V408h-36c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v28c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-28h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-27.6c64.1-14.6 112-71.9 112-140.4 0-28.2-8.1-54.5-22.1-76.7l80.7-80.7 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V12c0-6.6-5.4-12-12-12zM240 320c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"],
- "trash": [448, 512, [], "f1f8", "M0 84V56c0-13.3 10.7-24 24-24h112l9.4-18.7c4-8.2 12.3-13.3 21.4-13.3h114.3c9.1 0 17.4 5.1 21.5 13.3L312 32h112c13.3 0 24 10.7 24 24v28c0 6.6-5.4 12-12 12H12C5.4 96 0 90.6 0 84zm415.2 56.7L394.8 467c-1.6 25.3-22.6 45-47.9 45H101.1c-25.3 0-46.3-19.7-47.9-45L32.8 140.7c-.4-6.9 5.1-12.7 12-12.7h358.5c6.8 0 12.3 5.8 11.9 12.7z"],
- "trash-alt": [448, 512, [], "f2ed", "M0 84V56c0-13.3 10.7-24 24-24h112l9.4-18.7c4-8.2 12.3-13.3 21.4-13.3h114.3c9.1 0 17.4 5.1 21.5 13.3L312 32h112c13.3 0 24 10.7 24 24v28c0 6.6-5.4 12-12 12H12C5.4 96 0 90.6 0 84zm416 56v324c0 26.5-21.5 48-48 48H80c-26.5 0-48-21.5-48-48V140c0-6.6 5.4-12 12-12h360c6.6 0 12 5.4 12 12zm-272 68c0-8.8-7.2-16-16-16s-16 7.2-16 16v224c0 8.8 7.2 16 16 16s16-7.2 16-16V208zm96 0c0-8.8-7.2-16-16-16s-16 7.2-16 16v224c0 8.8 7.2 16 16 16s16-7.2 16-16V208zm96 0c0-8.8-7.2-16-16-16s-16 7.2-16 16v224c0 8.8 7.2 16 16 16s16-7.2 16-16V208z"],
- "tree": [384, 512, [], "f1bb", "M377.33 375.429L293.906 288H328c21.017 0 31.872-25.207 17.448-40.479L262.79 160H296c20.878 0 31.851-24.969 17.587-40.331l-104-112.003c-9.485-10.214-25.676-10.229-35.174 0l-104 112.003C56.206 134.969 67.037 160 88 160h33.21l-82.659 87.521C24.121 262.801 34.993 288 56 288h34.094L6.665 375.429C-7.869 390.655 2.925 416 24.025 416H144c0 32.781-11.188 49.26-33.995 67.506C98.225 492.93 104.914 512 120 512h144c15.086 0 21.776-19.069 9.995-28.494-19.768-15.814-33.992-31.665-33.995-67.496V416h119.97c21.05 0 31.929-25.309 17.36-40.571z"],
- "trophy": [576, 512, [], "f091", "M552 64H448V24c0-13.3-10.7-24-24-24H152c-13.3 0-24 10.7-24 24v40H24C10.7 64 0 74.7 0 88v56c0 35.7 22.5 72.4 61.9 100.7 31.5 22.7 69.8 37.1 110 41.7C203.3 338.5 240 360 240 360v72h-48c-35.3 0-64 20.7-64 56v12c0 6.6 5.4 12 12 12h296c6.6 0 12-5.4 12-12v-12c0-35.3-28.7-56-64-56h-48v-72s36.7-21.5 68.1-73.6c40.3-4.6 78.6-19 110-41.7 39.3-28.3 61.9-65 61.9-100.7V88c0-13.3-10.7-24-24-24zM99.3 192.8C74.9 175.2 64 155.6 64 144v-16h64.2c1 32.6 5.8 61.2 12.8 86.2-15.1-5.2-29.2-12.4-41.7-21.4zM512 144c0 16.1-17.7 36.1-35.3 48.8-12.5 9-26.7 16.2-41.8 21.4 7-25 11.8-53.6 12.8-86.2H512v16z"],
- "truck": [640, 512, [], "f0d1", "M592 0H272c-26.51 0-48 21.49-48 48v48h-44.118a48 48 0 0 0-33.941 14.059l-99.882 99.882A48 48 0 0 0 32 243.882V352h-8c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h40c0 53.019 42.981 96 96 96s96-42.981 96-96h128c0 53.019 42.981 96 96 96s96-42.981 96-96h40c13.255 0 24-10.745 24-24V48c0-26.51-21.49-48-48-48zM160 464c-26.467 0-48-21.533-48-48s21.533-48 48-48 48 21.533 48 48-21.533 48-48 48zm64-208H80v-12.118L179.882 144H224v112zm256 208c-26.467 0-48-21.533-48-48s21.533-48 48-48 48 21.533 48 48-21.533 48-48 48z"],
- "tty": [512, 512, [], "f1e4", "M5.37 103.822c138.532-138.532 362.936-138.326 501.262 0 6.078 6.078 7.074 15.496 2.583 22.681l-43.214 69.138a18.332 18.332 0 0 1-22.356 7.305l-86.422-34.569a18.335 18.335 0 0 1-11.434-18.846L351.741 90c-62.145-22.454-130.636-21.986-191.483 0l5.953 59.532a18.331 18.331 0 0 1-11.434 18.846l-86.423 34.568a18.334 18.334 0 0 1-22.356-7.305L2.787 126.502a18.333 18.333 0 0 1 2.583-22.68zM96 308v-40c0-6.627-5.373-12-12-12H44c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H92c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zM96 500v-40c0-6.627-5.373-12-12-12H44c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H140c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"],
- "tv": [640, 512, [], "f26c", "M592 0H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h245.1v32h-160c-17.7 0-32 14.3-32 32s14.3 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-160v-32H592c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-16 352H64V64h512v288z"],
- "umbrella": [576, 512, [], "f0e9", "M557.011 267.631c-51.432-45.217-107.572-43.698-158.567 30.731-5.298 7.861-14.906 7.165-19.736 0-2.483-3.624-32.218-60.808-90.708-60.808-45.766 0-70.542 31.378-90.709 60.808-4.829 7.165-14.436 7.861-19.734 0-50.904-74.285-106.613-76.406-158.567-30.731-10.21 8.264-20.912-1.109-18.696-9.481C32.146 134.573 158.516 64.612 288.001 64.612c128.793 0 256.546 69.961 287.706 193.538 2.206 8.322-8.426 17.793-18.696 9.481zM256 261.001V416c0 17.645-14.355 32-32 32s-32-14.355-32-32c0-17.673-14.327-32-32-32s-32 14.327-32 32c0 52.935 43.065 96 96 96s96-43.065 96-96V261.288c-21.836-10.806-45.425-9.737-64-.287zm64-211.007V32c0-17.673-14.327-32-32-32s-32 14.327-32 32v17.987a372.105 372.105 0 0 1 64 .007z"],
- "underline": [448, 512, [], "f0cd", "M224.264 388.24c-91.669 0-156.603-51.165-156.603-151.392V64H39.37c-8.837 0-16-7.163-16-16V16c0-8.837 7.163-16 16-16h137.39c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-28.813v172.848c0 53.699 28.314 79.444 76.317 79.444 46.966 0 75.796-25.434 75.796-79.965V64h-28.291c-8.837 0-16-7.163-16-16V16c0-8.837 7.163-16 16-16h136.868c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-28.291v172.848c0 99.405-64.881 151.392-156.082 151.392zM16 448h416c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16z"],
- "undo": [512, 512, [], "f0e2", "M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"],
- "undo-alt": [512, 512, [], "f2ea", "M255.545 8c-66.269.119-126.438 26.233-170.86 68.685L48.971 40.971C33.851 25.851 8 36.559 8 57.941V192c0 13.255 10.745 24 24 24h134.059c21.382 0 32.09-25.851 16.971-40.971l-41.75-41.75c30.864-28.899 70.801-44.907 113.23-45.273 92.398-.798 170.283 73.977 169.484 169.442C423.236 348.009 349.816 424 256 424c-41.127 0-79.997-14.678-110.63-41.556-4.743-4.161-11.906-3.908-16.368.553L89.34 422.659c-4.872 4.872-4.631 12.815.482 17.433C133.798 479.813 192.074 504 256 504c136.966 0 247.999-111.033 248-247.998C504.001 119.193 392.354 7.755 255.545 8z"],
- "universal-access": [512, 512, [], "f29a", "M256 48c114.953 0 208 93.029 208 208 0 114.953-93.029 208-208 208-114.953 0-208-93.029-208-208 0-114.953 93.029-208 208-208m0-40C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 56C149.961 64 64 149.961 64 256s85.961 192 192 192 192-85.961 192-192S362.039 64 256 64zm0 44c19.882 0 36 16.118 36 36s-16.118 36-36 36-36-16.118-36-36 16.118-36 36-36zm117.741 98.023c-28.712 6.779-55.511 12.748-82.14 15.807.851 101.023 12.306 123.052 25.037 155.621 3.617 9.26-.957 19.698-10.217 23.315-9.261 3.617-19.699-.957-23.316-10.217-8.705-22.308-17.086-40.636-22.261-78.549h-9.686c-5.167 37.851-13.534 56.208-22.262 78.549-3.615 9.255-14.05 13.836-23.315 10.217-9.26-3.617-13.834-14.056-10.217-23.315 12.713-32.541 24.185-54.541 25.037-155.621-26.629-3.058-53.428-9.027-82.141-15.807-8.6-2.031-13.926-10.648-11.895-19.249s10.647-13.926 19.249-11.895c96.686 22.829 124.283 22.783 220.775 0 8.599-2.03 17.218 3.294 19.249 11.895 2.029 8.601-3.297 17.219-11.897 19.249z"],
- "university": [512, 512, [], "f19c", "M480 128v16a8 8 0 0 1-8 8h-24v12c0 6.627-5.373 12-12 12H44c-6.627 0-12-5.373-12-12v-12H8a8 8 0 0 1-8-8v-16a8 8 0 0 1 4.941-7.392l232-88a7.996 7.996 0 0 1 6.118 0l232 88A8 8 0 0 1 480 128zm-24 304H24c-13.255 0-24 10.745-24 24v16a8 8 0 0 0 8 8h464a8 8 0 0 0 8-8v-16c0-13.255-10.745-24-24-24zM64 192v192H44c-6.627 0-12 5.373-12 12v20h416v-20c0-6.627-5.373-12-12-12h-20V192h-64v192h-32V192h-64v192h-32V192h-64v192h-32V192H64z"],
- "unlink": [512, 512, [], "f127", "M304.083 405.907c4.686 4.686 4.686 12.284 0 16.971l-44.674 44.674c-59.263 59.262-155.693 59.266-214.961 0-59.264-59.265-59.264-155.696 0-214.96l44.675-44.675c4.686-4.686 12.284-4.686 16.971 0l39.598 39.598c4.686 4.686 4.686 12.284 0 16.971l-44.675 44.674c-28.072 28.073-28.072 73.75 0 101.823 28.072 28.072 73.75 28.073 101.824 0l44.674-44.674c4.686-4.686 12.284-4.686 16.971 0l39.597 39.598zm-56.568-260.216c4.686 4.686 12.284 4.686 16.971 0l44.674-44.674c28.072-28.075 73.75-28.073 101.824 0 28.072 28.073 28.072 73.75 0 101.823l-44.675 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.598 39.598c4.686 4.686 12.284 4.686 16.971 0l44.675-44.675c59.265-59.265 59.265-155.695 0-214.96-59.266-59.264-155.695-59.264-214.961 0l-44.674 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.597 39.598zm234.828 359.28l22.627-22.627c9.373-9.373 9.373-24.569 0-33.941L63.598 7.029c-9.373-9.373-24.569-9.373-33.941 0L7.029 29.657c-9.373 9.373-9.373 24.569 0 33.941l441.373 441.373c9.373 9.372 24.569 9.372 33.941 0z"],
- "unlock": [448, 512, [], "f09c", "M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z"],
- "unlock-alt": [448, 512, [], "f13e", "M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48zM264 408c0 22.1-17.9 40-40 40s-40-17.9-40-40v-48c0-22.1 17.9-40 40-40s40 17.9 40 40v48z"],
- "upload": [512, 512, [], "f093", "M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"],
- "user": [512, 512, [], "f007", "M96 160C96 71.634 167.635 0 256 0s160 71.634 160 160-71.635 160-160 160S96 248.366 96 160zm304 192h-28.556c-71.006 42.713-159.912 42.695-230.888 0H112C50.144 352 0 402.144 0 464v24c0 13.255 10.745 24 24 24h464c13.255 0 24-10.745 24-24v-24c0-61.856-50.144-112-112-112z"],
- "user-circle": [512, 512, [], "f2bd", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zM144 208c0-61.856 50.144-112 112-112s112 50.144 112 112-50.144 112-112 112-112-50.144-112-112zm268.408 172.663c-80.346 100.411-232.375 100.53-312.817 0C117.003 362.973 141.218 352 168 352h18.204c44.03 21.336 95.495 21.368 139.592 0H344c26.782 0 50.997 10.973 68.408 28.663z"],
- "user-md": [448, 512, [], "f0f0", "M96 128C96 57.308 153.308 0 224 0s128 57.308 128 128-57.308 128-128 128S96 198.692 96 128zm256 160v33.61c36.471 7.433 64 39.756 64 78.39v49.441c0 11.44-8.075 21.29-19.293 23.534l-21.802 4.361c-6.499 1.3-12.821-2.915-14.12-9.414l-1.569-7.845c-1.3-6.499 2.915-12.821 9.414-14.12l15.37-3.074v-42.078c0-26.283-20.793-48.297-47.071-48.797C310.039 351.498 288 373.224 288 400v42.883l15.371 3.074c6.499 1.3 10.713 7.622 9.414 14.12l-1.569 7.845c-1.3 6.499-7.622 10.714-14.12 9.414l-21.802-4.361C264.075 470.732 256 460.882 256 449.441V400c0-38.634 27.529-70.957 64-78.39V288h-22.624c-45.669 20.945-99.331 21.749-146.752 0H128v66.025c28.495 7.361 49.359 33.906 47.931 64.977-1.506 32.778-28.097 59.392-60.874 60.926C78.383 481.644 48 452.303 48 416c0-29.767 20.427-54.852 48-61.975V288c-53.019 0-96 42.981-96 96v104c0 13.255 10.745 24 24 24h400c13.255 0 24-10.745 24-24V384c0-53.019-42.981-96-96-96zM80 416c0 17.645 14.355 32 32 32s32-14.355 32-32-14.355-32-32-32-32 14.355-32 32z"],
- "user-plus": [640, 512, [], "f234", "M616 332c0-6.627-5.373-12-12-12h-60v-60c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v60h-60c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h60v60c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-60h60c6.627 0 12-5.373 12-12v-40zM448 444v15c0 11.598-9.402 21-21 21H21c-11.598 0-21-9.402-21-21v-21c0-54.124 43.876-98 98-98h24.986c62.104 37.358 139.897 37.374 202.027 0H350a98.09 98.09 0 0 1 26 3.493V372c0 24.262 19.738 44 44 44h25.519c2.768 12.064 2.481 20.659 2.481 28zM84 172c0-77.32 62.68-140 140-140s140 62.68 140 140-62.68 140-140 140S84 249.32 84 172z"],
- "user-secret": [448, 512, [], "f21b", "M388.829 295.324l20.972-55.052c2.992-7.854-2.809-16.272-11.214-16.272H340.39c7.45-16.236 11.61-34.297 11.61-53.333 0-3.631-.16-7.224-.456-10.778C391.083 152.074 416 140.684 416 128c0-13.263-27.231-25.112-69.947-32.937-9.185-32.805-27.178-65.797-40.714-82.85-9.452-11.908-25.873-15.634-39.471-8.834l-27.557 13.779a31.997 31.997 0 0 1-28.622 0l-27.557-13.78c-13.599-6.799-30.02-3.074-39.471 8.834-13.536 17.053-31.529 50.045-40.714 82.85C59.231 102.888 32 114.737 32 128c0 12.684 24.917 24.074 64.456 31.889A129.362 129.362 0 0 0 96 170.667c0 19.037 4.159 37.098 11.608 53.333h-57.41c-8.615 0-14.423 8.809-11.029 16.727l22.906 53.447C25.799 307.882 0 342.925 0 384v104c0 13.255 10.745 24 24 24h400c13.255 0 24-10.745 24-24V384c0-39.97-24.43-74.231-59.171-88.676zM184 488l-48-192 48 24 24 40-24 128zm80 0l-24-128 24-40 48-24-48 192zm54.778-303.746c-.008.043-4.299 3.231-5.125 5.771-3.861 11.864-7.026 24.572-16.514 33.359-10.071 9.327-47.957 22.405-63.996-25.029-2.837-8.395-15.447-8.398-18.285 0-16.963 50.168-56.019 32.417-63.996 25.029-9.488-8.786-12.653-21.495-16.514-33.359-.826-2.54-5.118-5.728-5.125-5.771-.554-2.925-.981-5.884-1.22-8.85-.309-3.848 10.078-3.658 11.078-3.747 26.303-2.326 52.303-.579 78.023 5.497 2.563.606 11.553.529 13.793 0 25.72-6.076 51.72-7.824 78.023-5.497 1.002.089 11.387-.102 11.078 3.747-.239 2.966-.666 5.925-1.22 8.85z"],
- "user-times": [640, 512, [], "f235", "M599.681 411.397c4.686-4.686 4.686-12.284 0-16.971L557.255 352l42.426-42.426c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.971 0L512 306.745l-42.426-42.426c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971L466.745 352l-42.426 42.426c-4.686 4.686-4.686 12.284 0 16.971l28.284 28.284c4.686 4.686 12.284 4.686 16.971 0L512 397.255l42.426 42.426c4.686 4.686 12.284 4.686 16.971 0l28.284-28.284zM84 172c0-77.32 62.68-140 140-140s140 62.68 140 140-62.68 140-140 140S84 249.32 84 172zm359.737 299.645C439.904 476.712 433.843 480 427 480H21c-11.598 0-21-9.402-21-21v-21c0-54.124 43.876-98 98-98h24.986c62.104 37.358 139.897 37.374 202.027 0H350c23.366 0 44.818 8.183 61.658 21.832l-9.967 9.967c-17.156 17.156-17.156 45.07 0 62.225l28.284 28.284a43.946 43.946 0 0 0 13.762 9.337z"],
- "users": [640, 512, [], "f0c0", "M220 164c0-55.229 44.772-100 100-100s100 44.771 100 100-44.772 100-100 100-100-44.771-100-100zM48 208c0-44.183 35.817-80 80-80s80 35.817 80 80-35.817 80-80 80-80-35.817-80-80zm384 0c0-44.183 35.817-80 80-80s80 35.817 80 80-35.817 80-80 80-80-35.817-80-80zm-22 76c38.66 0 70 31.34 70 70v70c0 13.255-10.745 24-24 24H184c-13.255 0-24-10.745-24-24v-70c0-38.66 31.34-70 70-70h17.848c44.364 26.687 99.93 26.693 144.305 0H410m-282 70c0-11.975 2.081-23.472 5.889-34.156-21.93 1.152-44.122-4.121-63.611-15.844H56c-30.928 0-56 25.072-56 56v32c0 13.255 10.745 24 24 24h104v-62zm456-50h-14.278c-19.495 11.727-41.686 16.996-63.611 15.844A101.542 101.542 0 0 1 512 354v62h104c13.255 0 24-10.745 24-24v-32c0-30.928-25.072-56-56-56z"],
- "utensil-spoon": [512, 512, [], "f2e5", "M480.1 31.9c-55-55.1-164.9-34.5-227.8 28.5-49.3 49.3-55.1 110-28.8 160.4L9 413.2c-11.6 10.5-12.1 28.5-1 39.5L59.3 504c11 11 29.1 10.5 39.5-1.1l192.4-214.4c50.4 26.3 111.1 20.5 160.4-28.8 63-62.9 83.6-172.8 28.5-227.8z"],
- "utensils": [416, 512, [], "f2e7", "M207.9 15.2c.8 4.7 16.1 94.5 16.1 128.8 0 52.3-27.8 89.6-68.9 104.6L168 486.7c.7 13.7-10.2 25.3-24 25.3H80c-13.7 0-24.7-11.5-24-25.3l12.9-238.1C27.7 233.6 0 196.2 0 144 0 109.6 15.3 19.9 16.1 15.2 19.3-5.1 61.4-5.4 64 16.3v141.2c1.3 3.4 15.1 3.2 16 0 1.4-25.3 7.9-139.2 8-141.8 3.3-20.8 44.7-20.8 47.9 0 .2 2.7 6.6 116.5 8 141.8.9 3.2 14.8 3.4 16 0V16.3c2.6-21.6 44.8-21.4 48-1.1zm119.2 285.7l-15 185.1c-1.2 14 9.9 26 23.9 26h56c13.3 0 24-10.7 24-24V24c0-13.2-10.7-24-24-24-82.5 0-221.4 178.5-64.9 300.9z"],
- "venus": [288, 512, [], "f221", "M288 176c0-79.5-64.5-144-144-144S0 96.5 0 176c0 68.5 47.9 125.9 112 140.4V368H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.5 112-71.9 112-140.4zm-224 0c0-44.1 35.9-80 80-80s80 35.9 80 80-35.9 80-80 80-80-35.9-80-80z"],
- "venus-double": [512, 512, [], "f226", "M288 176c0-79.5-64.5-144-144-144S0 96.5 0 176c0 68.5 47.9 125.9 112 140.4V368H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.5 112-71.9 112-140.4zm-224 0c0-44.1 35.9-80 80-80s80 35.9 80 80-35.9 80-80 80-80-35.9-80-80zm336 140.4V368h36c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-36v36c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-36h-36c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h36v-51.6c-21.2-4.8-40.6-14.3-57.2-27.3 14-16.7 25-36 32.1-57.1 14.5 14.8 34.7 24 57.1 24 44.1 0 80-35.9 80-80s-35.9-80-80-80c-22.3 0-42.6 9.2-57.1 24-7.1-21.1-18-40.4-32.1-57.1C303.4 43.6 334.3 32 368 32c79.5 0 144 64.5 144 144 0 68.5-47.9 125.9-112 140.4z"],
- "venus-mars": [576, 512, [], "f228", "M564 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-48.7 48.7C422.5 72.1 396.2 64 368 64c-33.7 0-64.6 11.6-89.2 30.9 14 16.7 25 36 32.1 57.1 14.5-14.8 34.7-24 57.1-24 44.1 0 80 35.9 80 80s-35.9 80-80 80c-22.3 0-42.6-9.2-57.1-24-7.1 21.1-18 40.4-32.1 57.1 24.5 19.4 55.5 30.9 89.2 30.9 79.5 0 144-64.5 144-144 0-28.2-8.1-54.5-22.1-76.7l48.7-48.7 16.9 16.9c2.4 2.4 5.4 3.5 8.4 3.5 6.2 0 12.1-4.8 12.1-12V12c0-6.6-5.4-12-12-12zM144 64C64.5 64 0 128.5 0 208c0 68.5 47.9 125.9 112 140.4V400H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.6 112-71.9 112-140.4 0-79.5-64.5-144-144-144zm0 224c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"],
- "video": [576, 512, [], "f03d", "M528 64h-12.118a48 48 0 0 0-33.941 14.059L384 176v-64c0-26.51-21.49-48-48-48H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-64l97.941 97.941A48 48 0 0 0 515.882 448H528c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48z"],
- "volume-down": [384, 512, [], "f027", "M256 88.017v335.964c0 21.438-25.943 31.998-40.971 16.971L126.059 352H24c-13.255 0-24-10.745-24-24V184c0-13.255 10.745-24 24-24h102.059l88.971-88.954c15.01-15.01 40.97-4.49 40.97 16.971zM384 256c0-33.717-17.186-64.35-45.972-81.944-15.079-9.214-34.775-4.463-43.992 10.616s-4.464 34.775 10.615 43.992C314.263 234.538 320 244.757 320 256a32.056 32.056 0 0 1-13.802 26.332c-14.524 10.069-18.136 30.006-8.067 44.53 10.07 14.525 30.008 18.136 44.53 8.067C368.546 316.983 384 287.478 384 256z"],
- "volume-off": [256, 512, [], "f026", "M256 88.017v335.964c0 21.438-25.943 31.998-40.971 16.971L126.059 352H24c-13.255 0-24-10.745-24-24V184c0-13.255 10.745-24 24-24h102.059l88.971-88.954c15.01-15.01 40.97-4.49 40.97 16.971z"],
- "volume-up": [576, 512, [], "f028", "M256 88.017v335.964c0 21.438-25.943 31.998-40.971 16.971L126.059 352H24c-13.255 0-24-10.745-24-24V184c0-13.255 10.745-24 24-24h102.059l88.971-88.954c15.01-15.01 40.97-4.49 40.97 16.971zm182.056-77.876C422.982.92 403.283 5.668 394.061 20.745c-9.221 15.077-4.473 34.774 10.604 43.995C468.967 104.063 512 174.983 512 256c0 73.431-36.077 142.292-96.507 184.206-14.522 10.072-18.129 30.01-8.057 44.532 10.076 14.528 30.016 18.126 44.531 8.057C529.633 438.927 576 350.406 576 256c0-103.244-54.579-194.877-137.944-245.859zM480 256c0-68.547-36.15-129.777-91.957-163.901-15.076-9.22-34.774-4.471-43.994 10.607-9.22 15.078-4.471 34.774 10.607 43.994C393.067 170.188 416 211.048 416 256c0 41.964-20.62 81.319-55.158 105.276-14.521 10.073-18.128 30.01-8.056 44.532 6.216 8.96 16.185 13.765 26.322 13.765a31.862 31.862 0 0 0 18.21-5.709C449.091 377.953 480 318.938 480 256zm-96 0c0-33.717-17.186-64.35-45.972-81.944-15.079-9.214-34.775-4.463-43.992 10.616s-4.464 34.775 10.615 43.992C314.263 234.538 320 244.757 320 256a32.056 32.056 0 0 1-13.802 26.332c-14.524 10.069-18.136 30.006-8.067 44.53 10.07 14.525 30.008 18.136 44.53 8.067C368.546 316.983 384 287.478 384 256z"],
- "wheelchair": [512, 512, [], "f193", "M496.101 385.669l14.227 28.663c3.929 7.915.697 17.516-7.218 21.445l-65.465 32.886c-16.049 7.967-35.556 1.194-43.189-15.055L331.679 320H192c-15.925 0-29.426-11.71-31.679-27.475C126.433 55.308 128.38 70.044 128 64c0-36.358 30.318-65.635 67.052-63.929 33.271 1.545 60.048 28.905 60.925 62.201.868 32.933-23.152 60.423-54.608 65.039l4.67 32.69H336c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H215.182l4.572 32H352a32 32 0 0 1 28.962 18.392L438.477 396.8l36.178-18.349c7.915-3.929 17.517-.697 21.446 7.218zM311.358 352h-24.506c-7.788 54.204-54.528 96-110.852 96-61.757 0-112-50.243-112-112 0-41.505 22.694-77.809 56.324-97.156-3.712-25.965-6.844-47.86-9.488-66.333C45.956 198.464 0 261.963 0 336c0 97.047 78.953 176 176 176 71.87 0 133.806-43.308 161.11-105.192L311.358 352z"],
- "wifi": [640, 512, [], "f1eb", "M384 416c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64zm136.659-124.443c6.465-6.465 6.245-17.065-.564-23.167-113.793-101.985-286.526-101.869-400.19 0-6.809 6.102-7.029 16.702-.564 23.167l34.006 34.006c5.927 5.927 15.464 6.32 21.769.796 82.88-72.609 207.074-72.447 289.768 0 6.305 5.524 15.842 5.132 21.769-.796l34.006-34.006zm112.11-113.718c6.385-6.385 6.254-16.816-.35-22.973-175.768-163.86-449.134-163.8-624.837 0-6.604 6.157-6.735 16.589-.35 22.973l33.966 33.966c6.095 6.095 15.891 6.231 22.224.383 144.763-133.668 368.356-133.702 513.156 0 6.333 5.848 16.129 5.712 22.224-.383l33.967-33.966z"],
- "window-close": [512, 512, [], "f410", "M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-83.6 290.5c4.8 4.8 4.8 12.6 0 17.4l-40.5 40.5c-4.8 4.8-12.6 4.8-17.4 0L256 313.3l-66.5 67.1c-4.8 4.8-12.6 4.8-17.4 0l-40.5-40.5c-4.8-4.8-4.8-12.6 0-17.4l67.1-66.5-67.1-66.5c-4.8-4.8-4.8-12.6 0-17.4l40.5-40.5c4.8-4.8 12.6-4.8 17.4 0l66.5 67.1 66.5-67.1c4.8-4.8 12.6-4.8 17.4 0l40.5 40.5c4.8 4.8 4.8 12.6 0 17.4L313.3 256l67.1 66.5z"],
- "window-maximize": [512, 512, [], "f2d0", "M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-16 160H64v-84c0-6.6 5.4-12 12-12h360c6.6 0 12 5.4 12 12v84z"],
- "window-minimize": [512, 512, [], "f2d1", "M464 352H48c-26.5 0-48 21.5-48 48v32c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48v-32c0-26.5-21.5-48-48-48z"],
- "window-restore": [512, 512, [], "f2d2", "M512 48v288c0 26.5-21.5 48-48 48h-48V176c0-44.1-35.9-80-80-80H128V48c0-26.5 21.5-48 48-48h288c26.5 0 48 21.5 48 48zM384 176v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48h288c26.5 0 48 21.5 48 48zm-68 28c0-6.6-5.4-12-12-12H76c-6.6 0-12 5.4-12 12v52h252v-52z"],
- "won-sign": [576, 512, [], "f159", "M564 192c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-48.028l18.572-80.61c1.732-7.518-3.978-14.694-11.693-14.694h-46.107a11.998 11.998 0 0 0-11.736 9.5L450.73 128H340.839l-19.725-85.987a12 12 0 0 0-11.696-9.317H265.43a12 12 0 0 0-11.687 9.277L233.696 128H124.975L107.5 42.299a12 12 0 0 0-11.758-9.602H53.628c-7.686 0-13.39 7.124-11.709 14.624L60 128H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h62.342l7.171 32H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h83.856l40.927 182.624A12 12 0 0 0 148.492 480h56.767c5.583 0 10.428-3.85 11.689-9.288L259.335 288h55.086l42.386 182.712A12 12 0 0 0 368.496 480h56.826a12 12 0 0 0 11.694-9.306L479.108 288H564c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-70.146l7.373-32H564zm-425.976 0h80.757l-7.457 32h-66.776l-6.524-32zm45.796 150.029c-6.194 25.831-6.758 47.25-7.321 47.25h-1.126s-1.689-22.05-6.758-47.25L157.599 288h38.812l-12.591 54.029zM274.182 224l1.996-8.602c1.856-7.962 3.457-15.968 4.803-23.398h11.794c1.347 7.43 2.947 15.436 4.803 23.398l1.996 8.602h-25.392zm130.959 118.029c-5.068 25.2-6.758 47.25-6.758 47.25h-1.126c-.563 0-1.126-21.42-7.321-47.25L377.542 288h39.107l-11.508 54.029zM430.281 224h-67.42l-7.34-32h81.577l-6.817 32z"],
- "wrench": [512, 512, [], "f0ad", "M481.156 200c9.3 0 15.12 10.155 10.325 18.124C466.295 259.992 420.419 288 368 288c-79.222 0-143.501-63.974-143.997-143.079C223.505 65.469 288.548-.001 368.002 0c52.362.001 98.196 27.949 123.4 69.743C496.24 77.766 490.523 88 481.154 88H376l-40 56 40 56h105.156zm-171.649 93.003L109.255 493.255c-24.994 24.993-65.515 24.994-90.51 0-24.993-24.994-24.993-65.516 0-90.51L218.991 202.5c16.16 41.197 49.303 74.335 90.516 90.503zM104 432c0-13.255-10.745-24-24-24s-24 10.745-24 24 10.745 24 24 24 24-10.745 24-24z"],
- "yen-sign": [384, 512, [], "f157", "M351.208 32h-65.277a12 12 0 0 0-10.778 6.724l-55.39 113.163c-14.513 34.704-27.133 71.932-27.133 71.932h-1.262s-12.62-37.228-27.133-71.932l-55.39-113.163A11.997 11.997 0 0 0 98.068 32H32.792c-9.057 0-14.85 9.65-10.59 17.643L102.322 200H44c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h88.162L152 293.228V320H44c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h108v92c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-92h108c6.627 0 12-5.373 12-12v-32c0-6.627-5.373-12-12-12H232v-26.772L251.838 256H340c6.627 0 12-5.373 12-12v-32c0-6.627-5.373-12-12-12h-58.322l80.12-150.357C366.058 41.65 360.266 32 351.208 32z"]
-};
-
-bunker(function () {
- define('fas', icons);
-});
-
-}());
-(function () {
-'use strict';
-
-var noop = function noop() {};
-
-var _WINDOW = {};
-var _DOCUMENT = {};
-var _MUTATION_OBSERVER$1 = null;
-var _PERFORMANCE = { mark: noop, measure: noop };
-
-try {
- if (typeof window !== 'undefined') _WINDOW = window;
- if (typeof document !== 'undefined') _DOCUMENT = document;
- if (typeof MutationObserver !== 'undefined') _MUTATION_OBSERVER$1 = MutationObserver;
- if (typeof performance !== 'undefined') _PERFORMANCE = performance;
-} catch (e) {}
-
-var _ref = _WINDOW.navigator || {};
-var _ref$userAgent = _ref.userAgent;
-var userAgent = _ref$userAgent === undefined ? '' : _ref$userAgent;
-
-var WINDOW = _WINDOW;
-var DOCUMENT = _DOCUMENT;
-var MUTATION_OBSERVER = _MUTATION_OBSERVER$1;
-var PERFORMANCE = _PERFORMANCE;
-var IS_BROWSER = !!WINDOW.document;
-var IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');
-
-var NAMESPACE_IDENTIFIER = '___FONT_AWESOME___';
-var UNITS_IN_GRID = 16;
-var DEFAULT_FAMILY_PREFIX = 'fa';
-var DEFAULT_REPLACEMENT_CLASS = 'svg-inline--fa';
-var DATA_FA_PROCESSED = 'data-fa-processed';
-var DATA_FA_PSEUDO_ELEMENT = 'data-fa-pseudo-element';
-var HTML_CLASS_I2SVG_BASE_CLASS = 'fontawesome-i2svg';
-
-var PRODUCTION = function () {
- try {
- return "production" === 'production';
- } catch (e) {
- return false;
- }
-}();
-
-var oneToTen = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
-var oneToTwenty = oneToTen.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);
-
-var ATTRIBUTES_WATCHED_FOR_MUTATION = ['class', 'data-prefix', 'data-icon', 'data-fa-transform', 'data-fa-mask'];
-
-var RESERVED_CLASSES = ['xs', 'sm', 'lg', 'fw', 'ul', 'li', 'border', 'pull-left', 'pull-right', 'spin', 'pulse', 'rotate-90', 'rotate-180', 'rotate-270', 'flip-horizontal', 'flip-vertical', 'stack', 'stack-1x', 'stack-2x', 'inverse', 'layers', 'layers-text', 'layers-counter'].concat(oneToTen.map(function (n) {
- return n + 'x';
-})).concat(oneToTwenty.map(function (n) {
- return 'w-' + n;
-}));
-
-var classCallCheck = function (instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
-};
-
-var 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;
- };
-}();
-
-var defineProperty = function (obj, key, value) {
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
-
- return obj;
-};
-
-var _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
-
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
-
- return target;
-};
-
-
-
-var toConsumableArray = function (arr) {
- if (Array.isArray(arr)) {
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
-
- return arr2;
- } else {
- return Array.from(arr);
- }
-};
-
-var initial = WINDOW.FontAwesomeConfig || {};
-var initialKeys = Object.keys(initial);
-
-var _default = _extends({
- familyPrefix: DEFAULT_FAMILY_PREFIX,
- replacementClass: DEFAULT_REPLACEMENT_CLASS,
- autoReplaceSvg: true,
- autoAddCss: true,
- autoA11y: true,
- searchPseudoElements: false,
- observeMutations: true,
- keepOriginalSource: true,
- measurePerformance: false,
- showMissingIcons: true
-}, initial);
-
-if (!_default.autoReplaceSvg) _default.observeMutations = false;
-
-var config = _extends({}, _default);
-
-WINDOW.FontAwesomeConfig = config;
-
-function update(newConfig) {
- var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var _params$asNewDefault = params.asNewDefault,
- asNewDefault = _params$asNewDefault === undefined ? false : _params$asNewDefault;
-
- var validKeys = Object.keys(config);
- var ok = asNewDefault ? function (k) {
- return ~validKeys.indexOf(k) && !~initialKeys.indexOf(k);
- } : function (k) {
- return ~validKeys.indexOf(k);
- };
-
- Object.keys(newConfig).forEach(function (configKey) {
- if (ok(configKey)) config[configKey] = newConfig[configKey];
- });
-}
-
-function auto(value) {
- update({
- autoReplaceSvg: value,
- observeMutations: value
- });
-}
-
-var w = WINDOW || {};
-
-if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};
-if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};
-if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};
-if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];
-
-var namespace = w[NAMESPACE_IDENTIFIER];
-
-var functions = [];
-var listener = function listener() {
- DOCUMENT.removeEventListener('DOMContentLoaded', listener);
- loaded = 1;
- functions.map(function (fn) {
- return fn();
- });
-};
-
-var loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
-
-if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener);
-
-var domready = function (fn) {
- if (!DOCUMENT) return;
- loaded ? setTimeout(fn, 0) : functions.push(fn);
-};
-
-var d = UNITS_IN_GRID;
-
-var meaninglessTransform = {
- size: 16,
- x: 0,
- y: 0,
- rotate: 0,
- flipX: false,
- flipY: false
-};
-
-function isReserved(name) {
- return ~RESERVED_CLASSES.indexOf(name);
-}
-
-function bunker(fn) {
- try {
- fn();
- } catch (e) {
- if (!PRODUCTION) {
- throw e;
- }
- }
-}
-
-function insertCss(css) {
- if (!css) {
- return;
- }
-
- if (typeof DOCUMENT.createElement === 'undefined') {
- return;
- }
-
- var style = DOCUMENT.createElement('style');
- style.setAttribute('type', 'text/css');
- style.innerHTML = css;
-
- var headChildren = DOCUMENT.head.childNodes;
- var beforeChild = null;
-
- for (var i = headChildren.length - 1; i > -1; i--) {
- var child = headChildren[i];
- var tagName = (child.tagName || '').toUpperCase();
- if (['STYLE', 'LINK'].indexOf(tagName) > -1) {
- beforeChild = child;
- }
- }
-
- DOCUMENT.head.insertBefore(style, beforeChild);
-
- return css;
-}
-
-var _uniqueId = 0;
-
-function nextUniqueId() {
- _uniqueId++;
-
- return _uniqueId;
-}
-
-function toArray(obj) {
- var array = [];
-
- for (var i = (obj || []).length >>> 0; i--;) {
- array[i] = obj[i];
- }
-
- return array;
-}
-
-function classArray(node) {
- if (node.classList) {
- return toArray(node.classList);
- } else {
- return (node.getAttribute('class') || '').split(' ').filter(function (i) {
- return i;
- });
- }
-}
-
-function getIconName(familyPrefix, cls) {
- var parts = cls.split('-');
- var prefix = parts[0];
- var iconName = parts.slice(1).join('-');
-
- if (prefix === familyPrefix && iconName !== '' && !isReserved(iconName)) {
- return iconName;
- } else {
- return null;
- }
-}
-
-function htmlEscape(str) {
- return ('' + str).replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
-}
-
-function joinAttributes(attributes) {
- return Object.keys(attributes || {}).reduce(function (acc, attributeName) {
- return acc + (attributeName + '="' + htmlEscape(attributes[attributeName]) + '" ');
- }, '').trim();
-}
-
-function joinStyles(styles) {
- return Object.keys(styles || {}).reduce(function (acc, styleName) {
- return acc + (styleName + ': ' + styles[styleName] + ';');
- }, '');
-}
-
-function transformIsMeaningful(transform) {
- return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;
-}
-
-function transformForSvg(_ref) {
- var transform = _ref.transform,
- containerWidth = _ref.containerWidth,
- iconWidth = _ref.iconWidth;
-
- var outer = {
- transform: 'translate(' + containerWidth / 2 + ' 256)'
- };
- var innerTranslate = 'translate(' + transform.x * 32 + ', ' + transform.y * 32 + ') ';
- var innerScale = 'scale(' + transform.size / 16 * (transform.flipX ? -1 : 1) + ', ' + transform.size / 16 * (transform.flipY ? -1 : 1) + ') ';
- var innerRotate = 'rotate(' + transform.rotate + ' 0 0)';
- var inner = {
- transform: innerTranslate + ' ' + innerScale + ' ' + innerRotate
- };
- var path = {
- transform: 'translate(' + iconWidth / 2 * -1 + ' -256)'
- };
- return {
- outer: outer,
- inner: inner,
- path: path
- };
-}
-
-function transformForCss(_ref2) {
- var transform = _ref2.transform,
- _ref2$width = _ref2.width,
- width = _ref2$width === undefined ? UNITS_IN_GRID : _ref2$width,
- _ref2$height = _ref2.height,
- height = _ref2$height === undefined ? UNITS_IN_GRID : _ref2$height,
- _ref2$startCentered = _ref2.startCentered,
- startCentered = _ref2$startCentered === undefined ? false : _ref2$startCentered;
-
- var val = '';
-
- if (startCentered && IS_IE) {
- val += 'translate(' + (transform.x / d - width / 2) + 'em, ' + (transform.y / d - height / 2) + 'em) ';
- } else if (startCentered) {
- val += 'translate(calc(-50% + ' + transform.x / d + 'em), calc(-50% + ' + transform.y / d + 'em)) ';
- } else {
- val += 'translate(' + transform.x / d + 'em, ' + transform.y / d + 'em) ';
- }
-
- val += 'scale(' + transform.size / d * (transform.flipX ? -1 : 1) + ', ' + transform.size / d * (transform.flipY ? -1 : 1) + ') ';
- val += 'rotate(' + transform.rotate + 'deg) ';
-
- return val;
-}
-
-var ALL_SPACE = {
- x: 0,
- y: 0,
- width: '100%',
- height: '100%'
-};
-
-var makeIconMasking = function (_ref) {
- var children = _ref.children,
- attributes = _ref.attributes,
- main = _ref.main,
- mask = _ref.mask,
- transform = _ref.transform;
- var mainWidth = main.width,
- mainPath = main.icon;
- var maskWidth = mask.width,
- maskPath = mask.icon;
-
-
- var trans = transformForSvg({ transform: transform, containerWidth: maskWidth, iconWidth: mainWidth });
-
- var maskRect = {
- tag: 'rect',
- attributes: _extends({}, ALL_SPACE, {
- fill: 'white'
- })
- };
- var maskInnerGroup = {
- tag: 'g',
- attributes: _extends({}, trans.inner),
- children: [{ tag: 'path', attributes: _extends({}, mainPath.attributes, trans.path, { fill: 'black' }) }]
- };
- var maskOuterGroup = {
- tag: 'g',
- attributes: _extends({}, trans.outer),
- children: [maskInnerGroup]
- };
- var maskId = 'mask-' + nextUniqueId();
- var clipId = 'clip-' + nextUniqueId();
- var maskTag = {
- tag: 'mask',
- attributes: _extends({}, ALL_SPACE, {
- id: maskId,
- maskUnits: 'userSpaceOnUse',
- maskContentUnits: 'userSpaceOnUse'
- }),
- children: [maskRect, maskOuterGroup]
- };
- var defs = {
- tag: 'defs',
- children: [{ tag: 'clipPath', attributes: { id: clipId }, children: [maskPath] }, maskTag]
- };
-
- children.push(defs, { tag: 'rect', attributes: _extends({ fill: 'currentColor', 'clip-path': 'url(#' + clipId + ')', mask: 'url(#' + maskId + ')' }, ALL_SPACE) });
-
- return {
- children: children,
- attributes: attributes
- };
-};
-
-var makeIconStandard = function (_ref) {
- var children = _ref.children,
- attributes = _ref.attributes,
- main = _ref.main,
- transform = _ref.transform,
- styles = _ref.styles;
-
- var styleString = joinStyles(styles);
-
- if (styleString.length > 0) {
- attributes['style'] = styleString;
- }
-
- if (transformIsMeaningful(transform)) {
- var trans = transformForSvg({ transform: transform, containerWidth: main.width, iconWidth: main.width });
- children.push({
- tag: 'g',
- attributes: _extends({}, trans.outer),
- children: [{
- tag: 'g',
- attributes: _extends({}, trans.inner),
- children: [{
- tag: main.icon.tag,
- children: main.icon.children,
- attributes: _extends({}, main.icon.attributes, trans.path)
- }]
- }]
- });
- } else {
- children.push(main.icon);
- }
-
- return {
- children: children,
- attributes: attributes
- };
-};
-
-var asIcon = function (_ref) {
- var children = _ref.children,
- main = _ref.main,
- mask = _ref.mask,
- attributes = _ref.attributes,
- styles = _ref.styles,
- transform = _ref.transform;
-
- if (transformIsMeaningful(transform) && main.found && !mask.found) {
- var width = main.width,
- height = main.height;
-
- var offset = {
- x: width / height / 2,
- y: 0.5
- };
- attributes['style'] = joinStyles(_extends({}, styles, {
- 'transform-origin': offset.x + transform.x / 16 + 'em ' + (offset.y + transform.y / 16) + 'em'
- }));
- }
-
- return [{
- tag: 'svg',
- attributes: attributes,
- children: children
- }];
-};
-
-var asSymbol = function (_ref) {
- var prefix = _ref.prefix,
- iconName = _ref.iconName,
- children = _ref.children,
- attributes = _ref.attributes,
- symbol = _ref.symbol;
-
- var id = symbol === true ? prefix + '-' + config.familyPrefix + '-' + iconName : symbol;
-
- return [{
- tag: 'svg',
- attributes: {
- style: 'display: none;'
- },
- children: [{
- tag: 'symbol',
- attributes: _extends({}, attributes, { id: id }),
- children: children
- }]
- }];
-};
-
-function makeInlineSvgAbstract(params) {
- var _babelHelpers$extends;
-
- var _params$icons = params.icons,
- main = _params$icons.main,
- mask = _params$icons.mask,
- prefix = params.prefix,
- iconName = params.iconName,
- transform = params.transform,
- symbol = params.symbol,
- title = params.title,
- extra = params.extra;
-
- var _ref = mask.found ? mask : main,
- width = _ref.width,
- height = _ref.height;
-
- var widthClass = 'fa-w-' + Math.ceil(width / height * 16);
- var attrClass = [config.replacementClass, iconName ? config.familyPrefix + '-' + iconName : '', widthClass].concat(extra.classes).join(' ');
-
- var content = {
- children: [],
- attributes: _extends({}, extra.attributes, (_babelHelpers$extends = {}, defineProperty(_babelHelpers$extends, DATA_FA_PROCESSED, ''), defineProperty(_babelHelpers$extends, 'data-prefix', prefix), defineProperty(_babelHelpers$extends, 'data-icon', iconName), defineProperty(_babelHelpers$extends, 'class', attrClass), defineProperty(_babelHelpers$extends, 'role', 'img'), defineProperty(_babelHelpers$extends, 'xmlns', 'http://www.w3.org/2000/svg'), defineProperty(_babelHelpers$extends, 'viewBox', '0 0 ' + width + ' ' + height), _babelHelpers$extends))
- };
-
- if (title) content.children.push({ tag: 'title', attributes: { id: content.attributes['aria-labelledby'] || 'title-' + nextUniqueId() }, children: [title] });
-
- var args = _extends({}, content, {
- prefix: prefix,
- iconName: iconName,
- main: main,
- mask: mask,
- transform: transform,
- symbol: symbol,
- styles: extra.styles
- });
-
- var _ref2 = mask.found && main.found ? makeIconMasking(args) : makeIconStandard(args),
- children = _ref2.children,
- attributes = _ref2.attributes;
-
- args.children = children;
- args.attributes = attributes;
-
- if (symbol) {
- return asSymbol(args);
- } else {
- return asIcon(args);
- }
-}
-
-function makeLayersTextAbstract(params) {
- var _babelHelpers$extends2;
-
- var content = params.content,
- width = params.width,
- height = params.height,
- transform = params.transform,
- title = params.title,
- extra = params.extra;
-
-
- var attributes = _extends({}, extra.attributes, title ? { 'title': title } : {}, (_babelHelpers$extends2 = {}, defineProperty(_babelHelpers$extends2, DATA_FA_PROCESSED, ''), defineProperty(_babelHelpers$extends2, 'class', extra.classes.join(' ')), _babelHelpers$extends2));
-
- var styles = _extends({}, extra.styles);
-
- if (transformIsMeaningful(transform)) {
- styles['transform'] = transformForCss({ transform: transform, startCentered: true, width: width, height: height });
- styles['-webkit-transform'] = styles['transform'];
- }
-
- var styleString = joinStyles(styles);
-
- if (styleString.length > 0) {
- attributes['style'] = styleString;
- }
-
- var val = [];
-
- val.push({
- tag: 'span',
- attributes: attributes,
- children: [content]
- });
-
- if (title) {
- val.push({ tag: 'span', attributes: { class: 'sr-only' }, children: [title] });
- }
-
- return val;
-}
-
-var noop$2 = function noop() {};
-var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : { mark: noop$2, measure: noop$2 };
-var preamble = 'FA "5.0.2"';
-
-var begin = function begin(name) {
- p.mark(preamble + ' ' + name + ' begins');
- return function () {
- return end(name);
- };
-};
-
-var end = function end(name) {
- p.mark(preamble + ' ' + name + ' ends');
- p.measure(preamble + ' ' + name, preamble + ' ' + name + ' begins', preamble + ' ' + name + ' ends');
-};
-
-var perf = { begin: begin, end: end };
-
-'use strict';
-
-/**
- * Internal helper to bind a function known to have 4 arguments
- * to a given context.
- */
-var bindInternal4 = function bindInternal4 (func, thisContext) {
- return function (a, b, c, d) {
- return func.call(thisContext, a, b, c, d);
- };
-};
-
-'use strict';
-
-
-
-/**
- * # Reduce
- *
- * A fast object `.reduce()` implementation.
- *
- * @param {Object} subject The object to reduce over.
- * @param {Function} fn The reducer function.
- * @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
- * @param {Object} thisContext The context for the reducer.
- * @return {mixed} The final result.
- */
-var reduce = function fastReduceObject (subject, fn, initialValue, thisContext) {
- var keys = Object.keys(subject),
- length = keys.length,
- iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,
- i, key, result;
-
- if (initialValue === undefined) {
- i = 1;
- result = subject[keys[0]];
- }
- else {
- i = 0;
- result = initialValue;
- }
-
- for (; i < length; i++) {
- key = keys[i];
- result = iterator(result, subject[key], key, subject);
- }
-
- return result;
-};
-
-var styles$2 = namespace.styles;
-var shims = namespace.shims;
-
-
-var _byUnicode = {};
-var _byLigature = {};
-var _byOldName = {};
-
-var build = function build() {
- var lookup = function lookup(reducer) {
- return reduce(styles$2, function (o, style, prefix) {
- o[prefix] = reduce(style, reducer, {});
- return o;
- }, {});
- };
-
- _byUnicode = lookup(function (acc, icon, iconName) {
- acc[icon[3]] = iconName;
-
- return acc;
- });
-
- _byLigature = lookup(function (acc, icon, iconName) {
- var ligatures = icon[2];
-
- acc[iconName] = iconName;
-
- ligatures.forEach(function (ligature) {
- acc[ligature] = iconName;
- });
-
- return acc;
- });
-
- var hasRegular = 'far' in styles$2;
-
- _byOldName = reduce(shims, function (acc, shim) {
- var oldName = shim[0];
- var prefix = shim[1];
- var iconName = shim[2];
-
- if (prefix === 'far' && !hasRegular) {
- prefix = 'fas';
- }
-
- acc[oldName] = { prefix: prefix, iconName: iconName };
-
- return acc;
- }, {});
-};
-
-build();
-
-function byUnicode(prefix, unicode) {
- return _byUnicode[prefix][unicode];
-}
-
-function byLigature(prefix, ligature) {
- return _byLigature[prefix][ligature];
-}
-
-function byOldName(name) {
- return _byOldName[name] || { prefix: null, iconName: null };
-}
-
-var styles$1 = namespace.styles;
-
-
-var emptyCanonicalIcon = function emptyCanonicalIcon() {
- return { prefix: null, iconName: null, rest: [] };
-};
-
-function getCanonicalIcon(values) {
- return values.reduce(function (acc, cls) {
- var iconName = getIconName(config.familyPrefix, cls);
-
- if (styles$1[cls]) {
- acc.prefix = cls;
- } else if (iconName) {
- var shim = acc.prefix === 'fa' ? byOldName(iconName) : {};
-
- acc.iconName = shim.iconName || iconName;
- acc.prefix = shim.prefix || acc.prefix;
- } else if (cls !== config.replacementClass && cls.indexOf('fa-w-') !== 0) {
- acc.rest.push(cls);
- }
-
- return acc;
- }, emptyCanonicalIcon());
-}
-
-function iconFromMapping(mapping, prefix, iconName) {
- if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
- return {
- prefix: prefix,
- iconName: iconName,
- icon: mapping[prefix][iconName]
- };
- }
-}
-
-function toHtml(abstractNodes) {
- var tag = abstractNodes.tag,
- _abstractNodes$attrib = abstractNodes.attributes,
- attributes = _abstractNodes$attrib === undefined ? {} : _abstractNodes$attrib,
- _abstractNodes$childr = abstractNodes.children,
- children = _abstractNodes$childr === undefined ? [] : _abstractNodes$childr;
-
-
- if (typeof abstractNodes === 'string') {
- return htmlEscape(abstractNodes);
- } else {
- return '<' + tag + ' ' + joinAttributes(attributes) + '>' + children.map(toHtml).join('') + '</' + tag + '>';
- }
-}
-
-var noop$1 = function noop() {};
-
-function isReplaced(node) {
- var nodeClass = node.getAttribute ? node.getAttribute('class') : null;
-
- if (nodeClass) {
- return !!~nodeClass.toString().indexOf(config.replacementClass) || ~nodeClass.toString().indexOf('fa-layers-text');
- } else {
- return false;
- }
-}
-
-function getMutator() {
- if (config.autoReplaceSvg === true) {
- return mutators.replace;
- }
-
- var mutator = mutators[config.autoReplaceSvg];
-
- return mutator || mutators.replace;
-}
-
-var mutators = {
- replace: function replace(mutation) {
- var node = mutation[0];
- var abstract = mutation[1];
- var newOuterHTML = abstract.map(function (a) {
- return toHtml(a);
- }).join('\n');
-
- if (node.parentNode && node.outerHTML) {
- node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? '<!-- ' + node.outerHTML + ' -->' : '');
- } else if (node.parentNode) {
- var newNode = document.createElement('span');
- node.parentNode.replaceChild(newNode, node);
- newNode.outerHTML = newOuterHTML;
- }
- },
- nest: function nest(mutation) {
- var node = mutation[0];
- var abstract = mutation[1];
-
- // If we already have a replaced node we do not want to continue nesting within it.
- // Short-circuit to the standard replacement
- if (~classArray(node).indexOf(config.replacementClass)) {
- return mutators.replace(mutation);
- }
-
- var forSvg = new RegExp(config.familyPrefix + '-.*');
-
- delete abstract[0].attributes.style;
-
- var splitClasses = abstract[0].attributes.class.split(' ').reduce(function (acc, cls) {
- if (cls === config.replacementClass || cls.match(forSvg)) {
- acc.toSvg.push(cls);
- } else {
- acc.toNode.push(cls);
- }
-
- return acc;
- }, { toNode: [], toSvg: [] });
-
- abstract[0].attributes.class = splitClasses.toSvg.join(' ');
-
- var newInnerHTML = abstract.map(function (a) {
- return toHtml(a);
- }).join('\n');
- node.setAttribute('class', splitClasses.toNode.join(' '));
- node.setAttribute(DATA_FA_PROCESSED, '');
- node.innerHTML = newInnerHTML;
- }
-};
-
-function perform(mutations, callback) {
- var callbackFunction = typeof callback === 'function' ? callback : noop$1;
-
- if (mutations.length === 0) {
- callbackFunction();
- } else {
- var frame = WINDOW.requestAnimationFrame || function (op) {
- return op();
- };
-
- frame(function () {
- var mutator = getMutator();
- var mark = perf.begin('mutate');
-
- mutations.map(mutator);
-
- mark();
-
- callbackFunction();
- });
- }
-}
-
-var disabled = false;
-
-function disableObservation(operation) {
- disabled = true;
- operation();
- disabled = false;
-}
-
-function observe(options) {
- if (!MUTATION_OBSERVER) return;
-
- var treeCallback = options.treeCallback,
- nodeCallback = options.nodeCallback,
- pseudoElementsCallback = options.pseudoElementsCallback;
-
- var mo = new MUTATION_OBSERVER(function (objects) {
- if (disabled) return;
-
- toArray(objects).forEach(function (mutationRecord) {
- if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isReplaced(mutationRecord.addedNodes[0])) {
- if (config.searchPseudoElements) {
- pseudoElementsCallback(mutationRecord.target);
- }
-
- treeCallback(mutationRecord.target);
- }
-
- if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) {
- pseudoElementsCallback(mutationRecord.target.parentNode);
- }
-
- if (mutationRecord.type === 'attributes' && isReplaced(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {
- if (mutationRecord.attributeName === 'class') {
- var _getCanonicalIcon = getCanonicalIcon(classArray(mutationRecord.target)),
- prefix = _getCanonicalIcon.prefix,
- iconName = _getCanonicalIcon.iconName;
-
- if (prefix) mutationRecord.target.setAttribute('data-prefix', prefix);
- if (iconName) mutationRecord.target.setAttribute('data-icon', iconName);
- } else {
- nodeCallback(mutationRecord.target);
- }
- }
- });
- });
-
- if (!DOCUMENT.getElementsByTagName) return;
-
- mo.observe(DOCUMENT.getElementsByTagName('body')[0], {
- childList: true, attributes: true, characterData: true, subtree: true
- });
-}
-
-var styleParser = function (node) {
- var style = node.getAttribute('style');
-
- var val = [];
-
- if (style) {
- val = style.split(';').reduce(function (acc, style) {
- var styles = style.split(':');
- var prop = styles[0];
- var value = styles.slice(1);
-
- if (prop && value.length > 0) {
- acc[prop] = value.join(':').trim();
- }
-
- return acc;
- }, {});
- }
-
- return val;
-};
-
-function toHex(unicode) {
- var result = '';
-
- for (var i = 0; i < unicode.length; i++) {
- var hex = unicode.charCodeAt(i).toString(16);
- result += ('000' + hex).slice(-4);
- }
-
- return result;
-}
-
-var classParser = function (node) {
- var existingPrefix = node.getAttribute('data-prefix');
- var existingIconName = node.getAttribute('data-icon');
- var innerText = node.innerText !== undefined ? node.innerText.trim() : '';
-
- var val = getCanonicalIcon(classArray(node));
-
- if (existingPrefix && existingIconName) {
- val.prefix = existingPrefix;
- val.iconName = existingIconName;
- }
-
- if (val.prefix && innerText.length > 1) {
- val.iconName = byLigature(val.prefix, node.innerText);
- } else if (val.prefix && innerText.length === 1) {
- val.iconName = byUnicode(val.prefix, toHex(node.innerText));
- }
-
- return val;
-};
-
-var parseTransformString = function parseTransformString(transformString) {
- var transform = {
- size: 16,
- x: 0,
- y: 0,
- flipX: false,
- flipY: false,
- rotate: 0
- };
-
- if (!transformString) {
- return transform;
- } else {
- return transformString.toLowerCase().split(' ').reduce(function (acc, n) {
- var parts = n.toLowerCase().split('-');
- var first = parts[0];
- var rest = parts.slice(1).join('-');
-
- if (first && rest === 'h') {
- acc.flipX = true;
- return acc;
- }
-
- if (first && rest === 'v') {
- acc.flipY = true;
- return acc;
- }
-
- rest = parseFloat(rest);
-
- if (isNaN(rest)) {
- return acc;
- }
-
- switch (first) {
- case 'grow':
- acc.size = acc.size + rest;
- break;
- case 'shrink':
- acc.size = acc.size - rest;
- break;
- case 'left':
- acc.x = acc.x - rest;
- break;
- case 'right':
- acc.x = acc.x + rest;
- break;
- case 'up':
- acc.y = acc.y - rest;
- break;
- case 'down':
- acc.y = acc.y + rest;
- break;
- case 'rotate':
- acc.rotate = acc.rotate + rest;
- break;
- }
-
- return acc;
- }, transform);
- }
-};
-
-var transformParser = function (node) {
- return parseTransformString(node.getAttribute('data-fa-transform'));
-};
-
-var symbolParser = function (node) {
- var symbol = node.getAttribute('data-fa-symbol');
-
- return symbol === null ? false : symbol === '' ? true : symbol;
-};
-
-var attributesParser = function (node) {
- var extraAttributes = toArray(node.attributes).reduce(function (acc, attr) {
- if (acc.name !== 'class' && acc.name !== 'style') {
- acc[attr.name] = attr.value;
- }
- return acc;
- }, {});
-
- var title = node.getAttribute('title');
-
- if (config.autoA11y) {
- if (title) {
- extraAttributes['aria-labelledby'] = config.replacementClass + '-title-' + nextUniqueId();
- } else {
- extraAttributes['aria-hidden'] = 'true';
- }
- }
-
- return extraAttributes;
-};
-
-var maskParser = function (node) {
- var mask = node.getAttribute('data-fa-mask');
-
- if (!mask) {
- return emptyCanonicalIcon();
- } else {
- return getCanonicalIcon(mask.split(' ').map(function (i) {
- return i.trim();
- }));
- }
-};
-
-function parseMeta(node) {
- var _classParser = classParser(node),
- iconName = _classParser.iconName,
- prefix = _classParser.prefix,
- extraClasses = _classParser.rest;
-
- var extraStyles = styleParser(node);
- var transform = transformParser(node);
- var symbol = symbolParser(node);
- var extraAttributes = attributesParser(node);
- var mask = maskParser(node);
-
- return {
- iconName: iconName,
- title: node.getAttribute('title'),
- prefix: prefix,
- transform: transform,
- symbol: symbol,
- mask: mask,
- extra: {
- classes: extraClasses,
- styles: extraStyles,
- attributes: extraAttributes
- }
- };
-}
-
-function MissingIcon(error) {
- this.name = 'MissingIcon';
- this.message = error || 'Icon unavailable';
- this.stack = new Error().stack;
-}
-
-MissingIcon.prototype = Object.create(Error.prototype);
-MissingIcon.prototype.constructor = MissingIcon;
-
-var FILL = { fill: 'currentColor' };
-var ANIMATION_BASE = {
- attributeType: 'XML',
- repeatCount: 'indefinite',
- dur: '2s'
-};
-var RING = {
- tag: 'path',
- attributes: _extends({}, FILL, {
- d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z'
- })
-};
-var OPACITY_ANIMATE = _extends({}, ANIMATION_BASE, {
- attributeName: 'opacity'
-});
-var DOT = {
- tag: 'circle',
- attributes: _extends({}, FILL, {
- cx: '256',
- cy: '364',
- r: '28'
- }),
- children: [{ tag: 'animate', attributes: _extends({}, ANIMATION_BASE, { attributeName: 'r', values: '28;14;28;28;14;28;' }) }, { tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '1;0;1;1;0;1;' }) }]
-};
-var QUESTION = {
- tag: 'path',
- attributes: _extends({}, FILL, {
- opacity: '1',
- d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z'
- }),
- children: [{ tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '1;0;0;0;0;1;' }) }]
-};
-var EXCLAMATION = {
- tag: 'path',
- attributes: _extends({}, FILL, {
- opacity: '0',
- d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z'
- }),
- children: [{ tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '0;0;1;1;0;0;' }) }]
-};
-
-var missing = { tag: 'g', children: [RING, DOT, QUESTION, EXCLAMATION] };
-
-var styles = namespace.styles;
-
-var LAYERS_TEXT_CLASSNAME = 'fa-layers-text';
-var FONT_FAMILY_PATTERN = /Font Awesome 5 (Solid|Regular|Light|Brands)/;
-var STYLE_TO_PREFIX = {
- 'Solid': 'fas',
- 'Regular': 'far',
- 'Light': 'fal',
- 'Brands': 'fab'
-};
-
-function findIcon(iconName, prefix) {
- var val = {
- found: false,
- width: 512,
- height: 512,
- icon: missing
- };
-
- if (iconName && prefix && styles[prefix] && styles[prefix][iconName]) {
- var icon = styles[prefix][iconName];
- var width = icon[0];
- var height = icon[1];
- var vectorData = icon.slice(4);
-
- val = {
- found: true,
- width: width,
- height: height,
- icon: { tag: 'path', attributes: { fill: 'currentColor', d: vectorData[0] } }
- };
- } else if (iconName && prefix && !config.showMissingIcons) {
- throw new MissingIcon('Icon is missing for prefix ' + prefix + ' with icon name ' + iconName);
- }
-
- return val;
-}
-
-function generateSvgReplacementMutation(node, nodeMeta) {
- var iconName = nodeMeta.iconName,
- title = nodeMeta.title,
- prefix = nodeMeta.prefix,
- transform = nodeMeta.transform,
- symbol = nodeMeta.symbol,
- mask = nodeMeta.mask,
- extra = nodeMeta.extra;
-
-
- return [node, makeInlineSvgAbstract({
- icons: {
- main: findIcon(iconName, prefix),
- mask: findIcon(mask.iconName, mask.prefix)
- },
- prefix: prefix,
- iconName: iconName,
- transform: transform,
- symbol: symbol,
- mask: mask,
- title: title,
- extra: extra
- })];
-}
-
-function generateLayersText(node, nodeMeta) {
- var title = nodeMeta.title,
- transform = nodeMeta.transform,
- extra = nodeMeta.extra;
-
-
- var width = null;
- var height = null;
-
- if (IS_IE) {
- var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);
- var boundingClientRect = node.getBoundingClientRect();
- width = boundingClientRect.width / computedFontSize;
- height = boundingClientRect.height / computedFontSize;
- }
-
- if (config.autoA11y && !title) {
- extra.attributes['aria-hidden'] = 'true';
- }
-
- return [node, makeLayersTextAbstract({
- content: node.innerHTML,
- width: width,
- height: height,
- transform: transform,
- title: title,
- extra: extra
- })];
-}
-
-function generateMutation(node) {
- var nodeMeta = parseMeta(node);
-
- if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {
- return generateLayersText(node, nodeMeta);
- } else {
- return generateSvgReplacementMutation(node, nodeMeta);
- }
-}
-
-function remove(node) {
- if (typeof node.remove === 'function') {
- node.remove();
- } else if (node && node.parentNode) {
- node.parentNode.removeChild(node);
- }
-}
-
-function searchPseudoElements(root) {
- var end = perf.begin('searchPseudoElements');
-
- disableObservation(function () {
- toArray(root.querySelectorAll('*')).forEach(function (node) {
- [':before', ':after'].forEach(function (pos) {
- var styles = WINDOW.getComputedStyle(node, pos);
- var fontFamily = styles.getPropertyValue('font-family').match(FONT_FAMILY_PATTERN);
- var children = toArray(node.children);
- var pseudoElement = children.filter(function (c) {
- return c.getAttribute(DATA_FA_PSEUDO_ELEMENT) === pos;
- })[0];
-
- if (pseudoElement) {
- if (pseudoElement.nextSibling && pseudoElement.nextSibling.textContent.indexOf(DATA_FA_PSEUDO_ELEMENT)) {
- remove(pseudoElement.nextSibling);
- }
- remove(pseudoElement);
- pseudoElement = null;
- }
-
- if (fontFamily && !pseudoElement) {
- var content = styles.getPropertyValue('content');
- var i = DOCUMENT.createElement('i');
- i.setAttribute('class', '' + STYLE_TO_PREFIX[fontFamily[1]]);
- i.setAttribute(DATA_FA_PSEUDO_ELEMENT, pos);
- i.innerText = content.length === 3 ? content.substr(1, 1) : content;
- if (pos === ':before') {
- node.insertBefore(i, node.firstChild);
- } else {
- node.appendChild(i);
- }
- }
- });
- });
- });
-
- end();
-}
-
-function onTree(root) {
- var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
-
- var htmlClassList = DOCUMENT.documentElement.classList;
- var hclAdd = function hclAdd(suffix) {
- return htmlClassList.add(HTML_CLASS_I2SVG_BASE_CLASS + '-' + suffix);
- };
- var hclRemove = function hclRemove(suffix) {
- return htmlClassList.remove(HTML_CLASS_I2SVG_BASE_CLASS + '-' + suffix);
- };
- var prefixes = Object.keys(styles);
- var prefixesDomQuery = ['.' + LAYERS_TEXT_CLASSNAME + ':not([' + DATA_FA_PROCESSED + '])'].concat(prefixes.map(function (p) {
- return '.' + p + ':not([' + DATA_FA_PROCESSED + '])';
- })).join(', ');
-
- if (prefixesDomQuery.length === 0) {
- return;
- }
-
- var candidates = toArray(root.querySelectorAll(prefixesDomQuery));
-
- if (candidates.length > 0) {
- hclAdd('pending');
- hclRemove('complete');
- } else {
- return;
- }
-
- var mark = perf.begin('onTree');
-
- var mutations = candidates.reduce(function (acc, node) {
- try {
- var mutation = generateMutation(node);
-
- if (mutation) {
- acc.push(mutation);
- }
- } catch (e) {
- if (!PRODUCTION) {
- if (e instanceof MissingIcon) {
- console.error(e);
- }
- }
- }
-
- return acc;
- }, []);
-
- mark();
-
- perform(mutations, function () {
- hclAdd('active');
- hclAdd('complete');
- hclRemove('pending');
-
- if (typeof callback === 'function') callback();
- });
-}
-
-function onNode(node) {
- var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
-
- var mutation = generateMutation(node);
-
- if (mutation) {
- perform([mutation], callback);
- }
-}
-
-var baseStyles = "svg:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa{display:inline-block;font-size:inherit;height:1em;overflow:visible;vertical-align:-.125em}.svg-inline--fa.fa-lg{vertical-align:-.225em}.svg-inline--fa.fa-w-1{width:.0625em}.svg-inline--fa.fa-w-2{width:.125em}.svg-inline--fa.fa-w-3{width:.1875em}.svg-inline--fa.fa-w-4{width:.25em}.svg-inline--fa.fa-w-5{width:.3125em}.svg-inline--fa.fa-w-6{width:.375em}.svg-inline--fa.fa-w-7{width:.4375em}.svg-inline--fa.fa-w-8{width:.5em}.svg-inline--fa.fa-w-9{width:.5625em}.svg-inline--fa.fa-w-10{width:.625em}.svg-inline--fa.fa-w-11{width:.6875em}.svg-inline--fa.fa-w-12{width:.75em}.svg-inline--fa.fa-w-13{width:.8125em}.svg-inline--fa.fa-w-14{width:.875em}.svg-inline--fa.fa-w-15{width:.9375em}.svg-inline--fa.fa-w-16{width:1em}.svg-inline--fa.fa-w-17{width:1.0625em}.svg-inline--fa.fa-w-18{width:1.125em}.svg-inline--fa.fa-w-19{width:1.1875em}.svg-inline--fa.fa-w-20{width:1.25em}.svg-inline--fa.fa-pull-left{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right{margin-left:.3em;width:auto}.svg-inline--fa.fa-border{height:1.5em}.svg-inline--fa.fa-li{width:2em}.svg-inline--fa.fa-fw{width:1.25em}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-12.5%;width:1em}.fa-layers svg.svg-inline--fa{-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers-text{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter{background-color:#ff253a;border-radius:1em;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-bottom-right{bottom:0;right:0;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom right;transform-origin:bottom right}.fa-layers-bottom-left{bottom:0;left:0;right:auto;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom left;transform-origin:bottom left}.fa-layers-top-right{right:0;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-top-left{left:0;right:auto;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top left;transform-origin:top left}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;position:relative;width:2em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x{height:1em;width:1em}.svg-inline--fa.fa-stack-2x{height:2em;width:2em}.fa-inverse{color:#fff}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}";
-
-var css = function () {
- var dfp = DEFAULT_FAMILY_PREFIX;
- var drc = DEFAULT_REPLACEMENT_CLASS;
- var fp = config.familyPrefix;
- var rc = config.replacementClass;
- var s = baseStyles;
-
- if (fp !== dfp || rc !== drc) {
- var dPatt = new RegExp('\\.' + dfp + '\\-', 'g');
- var rPatt = new RegExp('\\.' + drc, 'g');
-
- s = s.replace(dPatt, '.' + fp + '-').replace(rPatt, '.' + rc);
- }
-
- return s;
-};
-
-function define(prefix, icons) {
- var normalized = Object.keys(icons).reduce(function (acc, iconName) {
- var icon = icons[iconName];
- var expanded = !!icon.icon;
-
- if (expanded) {
- acc[icon.iconName] = icon.icon;
- } else {
- acc[iconName] = icon;
- }
- return acc;
- }, {});
-
- if (typeof namespace.hooks.addPack === 'function') {
- namespace.hooks.addPack(prefix, normalized);
- } else {
- namespace.styles[prefix] = _extends({}, namespace.styles[prefix] || {}, normalized);
- }
-
- /**
- * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
- * of new styles we needed to differentiate between them. Prefix `fa` is now an alias
- * for `fas` so we'll easy the upgrade process for our users by automatically defining
- * this as well.
- */
- if (prefix === 'fas') {
- define('fa', icons);
- }
-}
-
-var Library = function () {
- function Library() {
- classCallCheck(this, Library);
-
- this.definitions = {};
- }
-
- createClass(Library, [{
- key: 'add',
- value: function add() {
- var _this = this;
-
- for (var _len = arguments.length, definitions = Array(_len), _key = 0; _key < _len; _key++) {
- definitions[_key] = arguments[_key];
- }
-
- var additions = definitions.reduce(this._pullDefinitions, {});
-
- Object.keys(additions).forEach(function (key) {
- _this.definitions[key] = _extends({}, _this.definitions[key] || {}, additions[key]);
- define(key, additions[key]);
- });
- }
- }, {
- key: 'reset',
- value: function reset() {
- this.definitions = {};
- }
- }, {
- key: '_pullDefinitions',
- value: function _pullDefinitions(additions, definition) {
- var normalized = definition.prefix && definition.iconName && definition.icon ? { 0: definition } : definition;
-
- Object.keys(normalized).map(function (key) {
- var _normalized$key = normalized[key],
- prefix = _normalized$key.prefix,
- iconName = _normalized$key.iconName,
- icon = _normalized$key.icon;
-
-
- if (!additions[prefix]) additions[prefix] = {};
-
- additions[prefix][iconName] = icon;
- });
-
- return additions;
- }
- }]);
- return Library;
-}();
-
-function prepIcon(icon) {
- var width = icon[0];
- var height = icon[1];
- var vectorData = icon.slice(4);
-
- return {
- found: true,
- width: width,
- height: height,
- icon: { tag: 'path', attributes: { fill: 'currentColor', d: vectorData[0] } }
- };
-}
-
-var _cssInserted = false;
-
-function ensureCss() {
- if (!config.autoAddCss) {
- return;
- }
-
- if (!_cssInserted) {
- insertCss(css());
- }
-
- _cssInserted = true;
-}
-
-function apiObject(val, abstractCreator) {
- Object.defineProperty(val, 'abstract', {
- get: abstractCreator
- });
-
- Object.defineProperty(val, 'html', {
- get: function get() {
- return val.abstract.map(function (a) {
- return toHtml(a);
- });
- }
- });
-
- Object.defineProperty(val, 'node', {
- get: function get() {
- if (!DOCUMENT.createElement) return;
-
- var container = DOCUMENT.createElement('div');
- container.innerHTML = val.html;
- return container.children;
- }
- });
-
- return val;
-}
-
-function findIconDefinition(params) {
- var _params$prefix = params.prefix,
- prefix = _params$prefix === undefined ? 'fa' : _params$prefix,
- iconName = params.iconName;
-
-
- if (!iconName) return;
-
- return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);
-}
-
-function resolveIcons(next) {
- return function (maybeIconDefinition) {
- var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});
-
- var mask = params.mask;
-
-
- if (mask) {
- mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});
- }
-
- return next(iconDefinition, _extends({}, params, { mask: mask }));
- };
-}
-
-var library = new Library();
-
-var api = {
- noAuto: function noAuto() {
- auto(false);
- },
-
-
- dom: {
- i2svg: function i2svg() {
- var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
- ensureCss();
-
- var _params$node = params.node,
- node = _params$node === undefined ? DOCUMENT : _params$node,
- _params$callback = params.callback,
- callback = _params$callback === undefined ? function () {} : _params$callback;
-
-
- if (config.searchPseudoElements) {
- searchPseudoElements(node);
- }
-
- onTree(node, callback);
- },
-
- css: css,
-
- insertCss: function insertCss$$1() {
- insertCss(css());
- }
- },
-
- library: library,
-
- parse: {
- transform: function transform(transformString) {
- return parseTransformString(transformString);
- }
- },
-
- findIconDefinition: findIconDefinition,
-
- icon: resolveIcons(function (iconDefinition) {
- var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var _params$transform = params.transform,
- transform = _params$transform === undefined ? meaninglessTransform : _params$transform,
- _params$symbol = params.symbol,
- symbol = _params$symbol === undefined ? false : _params$symbol,
- _params$mask = params.mask,
- mask = _params$mask === undefined ? null : _params$mask,
- _params$title = params.title,
- title = _params$title === undefined ? null : _params$title,
- _params$classes = params.classes,
- classes = _params$classes === undefined ? [] : _params$classes,
- _params$attributes = params.attributes,
- attributes = _params$attributes === undefined ? {} : _params$attributes,
- _params$styles = params.styles,
- styles = _params$styles === undefined ? {} : _params$styles;
-
-
- if (!iconDefinition) return;
-
- var prefix = iconDefinition.prefix,
- iconName = iconDefinition.iconName,
- icon = iconDefinition.icon;
-
-
- return apiObject(_extends({ type: 'icon' }, iconDefinition), function () {
- ensureCss();
-
- if (config.autoA11y) {
- if (title) {
- attributes['aria-labelledby'] = config.replacementClass + '-title-' + nextUniqueId();
- } else {
- attributes['aria-hidden'] = 'true';
- }
- }
-
- return makeInlineSvgAbstract({
- icons: {
- main: prepIcon(icon),
- mask: mask ? prepIcon(mask.icon) : { found: false, width: null, height: null, icon: {} }
- },
- prefix: prefix,
- iconName: iconName,
- transform: _extends({}, meaninglessTransform, transform),
- symbol: symbol,
- title: title,
- extra: {
- attributes: attributes,
- styles: styles,
- classes: classes
- }
- });
- });
- }),
-
- text: function text(content) {
- var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var _params$transform2 = params.transform,
- transform = _params$transform2 === undefined ? meaninglessTransform : _params$transform2,
- _params$title2 = params.title,
- title = _params$title2 === undefined ? null : _params$title2,
- _params$classes2 = params.classes,
- classes = _params$classes2 === undefined ? [] : _params$classes2,
- _params$attributes2 = params.attributes,
- attributes = _params$attributes2 === undefined ? {} : _params$attributes2,
- _params$styles2 = params.styles,
- styles = _params$styles2 === undefined ? {} : _params$styles2;
-
-
- return apiObject({ type: 'text', content: content }, function () {
- ensureCss();
-
- return makeLayersTextAbstract({
- content: content,
- transform: _extends({}, meaninglessTransform, transform),
- title: title,
- extra: {
- attributes: attributes,
- styles: styles,
- classes: [config.familyPrefix + '-layers-text'].concat(toConsumableArray(classes))
- }
- });
- });
- },
-
- layer: function layer(assembler) {
- return apiObject({ type: 'layer' }, function () {
- ensureCss();
-
- var children = [];
-
- assembler(function (args) {
- Array.isArray(args) ? children = args.map(function (a) {
- children = children.concat(a.abstract);
- }) : children = children.concat(args.abstract);
- });
-
- return [{
- tag: 'span',
- attributes: { class: config.familyPrefix + '-layers' },
- children: children
- }];
- });
- }
-};
-
-var autoReplace = function autoReplace() {
- if (config.autoReplaceSvg) api.dom.i2svg({ node: DOCUMENT });
-};
-
-function bootstrap() {
- if (IS_BROWSER) {
- if (!WINDOW.FontAwesome) {
- WINDOW.FontAwesome = api;
- }
-
- domready(function () {
- if (Object.keys(namespace.styles).length > 0) {
- autoReplace();
- }
-
- if (config.observeMutations && typeof MutationObserver === 'function') {
- observe({
- treeCallback: onTree,
- nodeCallback: onNode,
- pseudoElementsCallback: searchPseudoElements
- });
- }
- });
- }
-
- namespace.hooks = _extends({}, namespace.hooks, {
-
- addPack: function addPack(prefix, icons) {
- namespace.styles[prefix] = _extends({}, namespace.styles[prefix] || {}, icons);
-
- build();
- autoReplace();
- },
-
- addShims: function addShims(shims) {
- var _namespace$shims;
-
- (_namespace$shims = namespace.shims).push.apply(_namespace$shims, toConsumableArray(shims));
-
- build();
- autoReplace();
- }
- });
-}
-
-Object.defineProperty(api, 'config', {
- get: function get() {
- return config;
- },
-
- set: function set(newConfig) {
- update(newConfig);
- }
-});
-
-bunker(bootstrap);
-
-}());
diff --git a/debian/missing-sources/gauge-1.3.2.coffee b/debian/missing-sources/gauge-1.3.2.coffee
deleted file mode 100644
index 0121446c..00000000
--- a/debian/missing-sources/gauge-1.3.2.coffee
+++ /dev/null
@@ -1,615 +0,0 @@
-# Request Animation Frame Polyfill
-# CoffeeScript version of http://paulirish.com/2011/requestanimationframe-for-smart-animating/
-do () ->
- vendors = ['ms', 'moz', 'webkit', 'o']
- for vendor in vendors
- if window.requestAnimationFrame
- break
- window.requestAnimationFrame = window[vendor + 'RequestAnimationFrame']
- window.cancelAnimationFrame = window[vendor + 'CancelAnimationFrame'] or window[vendor + 'CancelRequestAnimationFrame']
-
- browserRequestAnimationFrame = null
- lastId = 0
- isCancelled = {}
-
- if not requestAnimationFrame
- window.requestAnimationFrame = (callback, element) ->
- currTime = new Date().getTime()
- timeToCall = Math.max(0, 16 - (currTime - lastTime))
- id = window.setTimeout(() ->
- callback(currTime + timeToCall)
- , timeToCall)
- lastTime = currTime + timeToCall
- return id
- # This implementation should only be used with the setTimeout()
- # version of window.requestAnimationFrame().
- window.cancelAnimationFrame = (id) ->
- clearTimeout(id)
- else if not window.cancelAnimationFrame
- browserRequestAnimationFrame = window.requestAnimationFrame
- window.requestAnimationFrame = (callback, element) ->
- myId = ++lastId
- browserRequestAnimationFrame(() ->
- if not isCancelled[myId]
- callback()
- , element)
- return myId
- window.cancelAnimationFrame = (id) ->
- isCancelled[id] = true
-
-String.prototype.hashCode = () ->
- hash = 0
- if this.length == 0
- return hash
- for i in [0...this.length]
- char = this.charCodeAt(i)
- hash = ((hash << 5) - hash) + char
- hash = hash & hash # Convert to 32bit integer
- return hash
-
-secondsToString = (sec) ->
- hr = Math.floor(sec / 3600)
- min = Math.floor((sec - (hr * 3600))/60)
- sec -= ((hr * 3600) + (min * 60))
- sec += ''
- min += ''
- while min.length < 2
- min = '0' + min
- while sec.length < 2
- sec = '0' + sec
- hr = if hr then hr + ':' else ''
- return hr + min + ':' + sec
-
-formatNumber = (num...) ->
- value = num[0]
- digits = 0 || num[1]
- return addCommas(value.toFixed(digits))
-
-mergeObjects = (obj1, obj2) ->
- out = {}
- for own key, val of obj1
- out[key] = val
- for own key, val of obj2
- out[key] = val
- return out
-
-addCommas = (nStr) ->
- nStr += ''
- x = nStr.split('.')
- x1 = x[0]
- x2 = ''
- if x.length > 1
- x2 = '.' + x[1]
- rgx = /(\d+)(\d{3})/
- while rgx.test(x1)
- x1 = x1.replace(rgx, '$1' + ',' + '$2')
- return x1 + x2
-
-cutHex = (nStr) ->
- if nStr.charAt(0) == "#"
- return nStr.substring(1,7)
- return nStr
-
-class ValueUpdater
- animationSpeed: 32
- constructor: (addToAnimationQueue=true, @clear=true) ->
- if addToAnimationQueue
- AnimationUpdater.add(@)
-
- update: (force=false) ->
- if force or @displayedValue != @value
- if @ctx and @clear
- @ctx.clearRect(0, 0, @canvas.width, @canvas.height)
- diff = @value - @displayedValue
- if Math.abs(diff / @animationSpeed) <= 0.001
- @displayedValue = @value
- else
- @displayedValue = @displayedValue + diff / @animationSpeed
- @render()
- return true
- return false
-
-class BaseGauge extends ValueUpdater
- displayScale: 1
-
- setTextField: (textField, fractionDigits) ->
- @textField = if textField instanceof TextRenderer then textField else new TextRenderer(textField, fractionDigits)
-
- setMinValue: (@minValue, updateStartValue=true) ->
- if updateStartValue
- @displayedValue = @minValue
- for gauge in @gp or []
- gauge.displayedValue = @minValue
-
- setOptions: (options=null) ->
- @options = mergeObjects(@options, options)
- if @textField
- @textField.el.style.fontSize = options.fontSize + 'px'
-
- if @options.angle > .5
- @options.angle = .5
- @configDisplayScale()
- return @
-
- configDisplayScale: () ->
- prevDisplayScale = @displayScale
-
- if @options.highDpiSupport == false
- delete @displayScale
- else
- devicePixelRatio = window.devicePixelRatio or 1
- backingStorePixelRatio =
- @ctx.webkitBackingStorePixelRatio or
- @ctx.mozBackingStorePixelRatio or
- @ctx.msBackingStorePixelRatio or
- @ctx.oBackingStorePixelRatio or
- @ctx.backingStorePixelRatio or 1
- @displayScale = devicePixelRatio / backingStorePixelRatio
-
- if @displayScale != prevDisplayScale
- width = @canvas.G__width or @canvas.width
- height = @canvas.G__height or @canvas.height
- @canvas.width = width * @displayScale
- @canvas.height = height * @displayScale
- @canvas.style.width = "#{width}px"
- @canvas.style.height = "#{height}px"
- @canvas.G__width = width
- @canvas.G__height = height
-
- return @
-
-class TextRenderer
- constructor: (@el, @fractionDigits) ->
-
- # Default behaviour, override to customize rendering
- render: (gauge) ->
- @el.innerHTML = formatNumber(gauge.displayedValue, @fractionDigits)
-
-class AnimatedText extends ValueUpdater
- displayedValue: 0
- value: 0
-
- setVal: (value) ->
- @value = 1 * value
-
- constructor: (@elem, @text=false) ->
- @value = 1 * @elem.innerHTML
- if @text
- @value = 0
- render: () ->
- if @text
- textVal = secondsToString(@displayedValue.toFixed(0))
- else
- textVal = addCommas(formatNumber(@displayedValue))
- @elem.innerHTML = textVal
-
-AnimatedTextFactory =
- create: (objList) ->
- out = []
- for elem in objList
- out.push(new AnimatedText(elem))
- return out
-
-class GaugePointer extends ValueUpdater
- displayedValue: 0
- value: 0
- options:
- strokeWidth: 0.035
- length: 0.1
- color: "#000000"
-
- constructor: (@gauge) ->
- @ctx = @gauge.ctx
- @canvas = @gauge.canvas
- super(false, false)
- @setOptions()
-
- setOptions: (options=null) ->
- @options = mergeObjects(@options, options)
- @length = 2*@gauge.radius * @gauge.options.radiusScale * @options.length
- @strokeWidth = @canvas.height * @options.strokeWidth
- @maxValue = @gauge.maxValue
- @minValue = @gauge.minValue
- @animationSpeed = @gauge.animationSpeed
- @options.angle = @gauge.options.angle
-
- render: () ->
- angle = @gauge.getAngle.call(@, @displayedValue)
-
- x = Math.round(@length * Math.cos(angle))
- y = Math.round(@length * Math.sin(angle))
-
- startX = Math.round(@strokeWidth * Math.cos(angle - Math.PI/2))
- startY = Math.round(@strokeWidth * Math.sin(angle - Math.PI/2))
-
- endX = Math.round(@strokeWidth * Math.cos(angle + Math.PI/2))
- endY = Math.round(@strokeWidth * Math.sin(angle + Math.PI/2))
-
- @ctx.fillStyle = @options.color
- @ctx.beginPath()
-
- @ctx.arc(0, 0, @strokeWidth, 0, Math.PI*2, true)
- @ctx.fill()
-
- @ctx.beginPath()
- @ctx.moveTo(startX, startY)
- @ctx.lineTo(x, y)
- @ctx.lineTo(endX, endY)
- @ctx.fill()
-
-class Bar
- constructor: (@elem) ->
- updateValues: (arrValues) ->
- @value = arrValues[0]
- @maxValue = arrValues[1]
- @avgValue = arrValues[2]
- @render()
-
- render: () ->
- if @textField
- @textField.text(formatNumber(@value))
-
- if @maxValue == 0
- @maxValue = @avgValue * 2
-
- valPercent = (@value / @maxValue) * 100
- avgPercent = (@avgValue / @maxValue) * 100
-
- $(".bar-value", @elem).css({"width": valPercent + "%"})
- $(".typical-value", @elem).css({"width": avgPercent + "%"})
-
-class Gauge extends BaseGauge
- elem: null
- value: [20] # we support multiple pointers
- maxValue: 80
- minValue: 0
- displayedAngle: 0
- displayedValue: 0
- lineWidth: 40
- paddingTop: 0.1
- paddingBottom: 0.1
- percentColors: null,
- options:
- colorStart: "#6fadcf"
- colorStop: undefined
- gradientType: 0 # 0 : radial, 1 : linear
- strokeColor: "#e0e0e0"
- pointer:
- length: 0.8
- strokeWidth: 0.035
- angle: 0.15
- lineWidth: 0.44
- radiusScale: 1.0
- fontSize: 40
- limitMax: false
- limitMin: false
-
- constructor: (@canvas) ->
- super()
- @percentColors = null
- @forceUpdate = true
- if typeof G_vmlCanvasManager != 'undefined'
- @canvas = window.G_vmlCanvasManager.initElement(@canvas)
- @ctx = @canvas.getContext('2d')
- # Set canvas size to parent size
- h = @canvas.clientHeight;
- w = @canvas.clientWidth;
- @canvas.height = h;
- @canvas.width = w;
- @gp = [new GaugePointer(@)]
- @setOptions()
- @render()
-
- setOptions: (options=null) ->
- super(options)
- @configPercentColors()
- @extraPadding = 0
- if @options.angle < 0
- phi = Math.PI*(1 + @options.angle)
- @extraPadding = Math.sin(phi)
- @availableHeight = @canvas.height * (1 - @paddingTop - @paddingBottom)
- @lineWidth = @availableHeight * @options.lineWidth # .2 - .7
- @radius = (@availableHeight - @lineWidth/2) / (1.0 + @extraPadding)
- @ctx.clearRect(0, 0, @canvas.width, @canvas.height)
- # @render()
- for gauge in @gp
- gauge.setOptions(@options.pointer)
- gauge.render()
- return @
-
- configPercentColors: () ->
- @percentColors = null;
- if (@options.percentColors != undefined)
- @percentColors = new Array()
- for i in [0..(@options.percentColors.length-1)]
- rval = parseInt((cutHex(@options.percentColors[i][1])).substring(0,2),16)
- gval = parseInt((cutHex(@options.percentColors[i][1])).substring(2,4),16)
- bval = parseInt((cutHex(@options.percentColors[i][1])).substring(4,6),16)
- @percentColors[i] = { pct: @options.percentColors[i][0], color: { r: rval, g: gval, b: bval } }
-
- set: (value) ->
- if not (value instanceof Array)
- value = [value]
- # check if we have enough GaugePointers initialized
- # lazy initialization
- if value.length > @gp.length
- for i in [0...(value.length - @gp.length)]
- gp = new GaugePointer(@)
- gp.setOptions(@options.pointer)
- @gp.push(gp)
- else if value.length < @gp.length
- # Delete redundant GaugePointers
- @gp = @gp.slice(@gp.length-value.length)
-
- # get max value and update pointer(s)
- i = 0
-
- for val in value
- # Limit pointer within min and max?
- if val > @maxValue
- if @options.limitMax
- val = @maxValue
- else
- @maxValue = val + 1
-
- else if val < @minValue
- if @options.limitMin
- val = @minValue
- else
- @minValue = val - 1
-
- @gp[i].value = val
- @gp[i++].setOptions({minValue: @minValue, maxValue: @maxValue, angle: @options.angle})
- @value = Math.max(Math.min(value[value.length - 1], @maxValue), @minValue) # TODO: Span maybe??
-
- # Force first .set()
- AnimationUpdater.run(@forceUpdate)
- @forceUpdate = false
-
- getAngle: (value) ->
- return (1 + @options.angle) * Math.PI + ((value - @minValue) / (@maxValue - @minValue)) * (1 - @options.angle * 2) * Math.PI
-
- getColorForPercentage: (pct, grad) ->
- if pct == 0
- color = @percentColors[0].color;
- else
- color = @percentColors[@percentColors.length - 1].color;
- for i in [0..(@percentColors.length - 1)]
- if (pct <= @percentColors[i].pct)
- if grad == true
- # Gradually change between colors
- startColor = @percentColors[i - 1] || @percentColors[0]
- endColor = @percentColors[i]
- rangePct = (pct - startColor.pct) / (endColor.pct - startColor.pct) # How far between both colors
- color = {
- r: Math.floor(startColor.color.r * (1 - rangePct) + endColor.color.r * rangePct),
- g: Math.floor(startColor.color.g * (1 - rangePct) + endColor.color.g * rangePct),
- b: Math.floor(startColor.color.b * (1 - rangePct) + endColor.color.b * rangePct)
- }
- else
- color = @percentColors[i].color
- break
- return 'rgb(' + [color.r, color.g, color.b].join(',') + ')'
-
- getColorForValue: (val, grad) ->
- pct = (val - @minValue) / (@maxValue - @minValue)
- return @getColorForPercentage(pct, grad);
-
- renderStaticLabels: (staticLabels, w, h, radius) ->
- @ctx.save()
- @ctx.translate(w, h)
-
- # Scale font size the hard way - assuming size comes first.
- font = staticLabels.font or "10px Times"
- re = /\d+\.?\d?/
- match = font.match(re)[0]
- rest = font.slice(match.length);
- fontsize = parseFloat(match) * this.displayScale;
- @ctx.font = fontsize + rest;
- @ctx.fillStyle = staticLabels.color || "#000000";
-
- @ctx.textBaseline = "bottom"
- @ctx.textAlign = "center"
- for value in staticLabels.labels
- # Draw labels depending on limitMin/Max
- if (not @options.limitMin or value >= @minValue) and (not @options.limitMax or value <= @maxValue)
- rotationAngle = @getAngle(value) - 3*Math.PI/2
- @ctx.rotate(rotationAngle)
- @ctx.fillText(formatNumber(value, staticLabels.fractionDigits), 0, -radius - @lineWidth/2)
- @ctx.rotate(-rotationAngle)
- @ctx.restore()
-
- render: () ->
- # Draw using canvas
- w = @canvas.width / 2
- h = @canvas.height*@paddingTop + @availableHeight - (@radius + @lineWidth/2)*@extraPadding
- displayedAngle = @getAngle(@displayedValue)
- if @textField
- @textField.render(@)
-
- @ctx.lineCap = "butt"
-
- radius = @radius * @options.radiusScale
- if (@options.staticLabels)
- @renderStaticLabels(@options.staticLabels, w, h, radius)
-
- if (@options.staticZones)
- @ctx.save()
- @ctx.translate(w, h)
- @ctx.lineWidth = @lineWidth
- for zone in @options.staticZones
- # Draw zones depending on limitMin/Max
- min = zone.min
- if @options.limitMin and min < @minValue
- min = @minValue
- max = zone.max
- if @options.limitMax and max > @maxValue
- max = @maxValue
- @ctx.strokeStyle = zone.strokeStyle
- @ctx.beginPath()
- @ctx.arc(0, 0, radius, @getAngle(min), @getAngle(max), false)
- @ctx.stroke()
- @ctx.restore()
-
- else
- if @options.customFillStyle != undefined
- fillStyle = @options.customFillStyle(@)
- else if @percentColors != null
- fillStyle = @getColorForValue(@displayedValue, true)
- else if @options.colorStop != undefined
- if @options.gradientType == 0
- fillStyle = this.ctx.createRadialGradient(w, h, 9, w, h, 70);
- else
- fillStyle = this.ctx.createLinearGradient(0, 0, w, 0);
- fillStyle.addColorStop(0, @options.colorStart)
- fillStyle.addColorStop(1, @options.colorStop)
- else
- fillStyle = @options.colorStart
- @ctx.strokeStyle = fillStyle
-
- @ctx.beginPath()
- @ctx.arc(w, h, radius, (1 + @options.angle) * Math.PI, displayedAngle, false)
- @ctx.lineWidth = @lineWidth
- @ctx.stroke()
-
- @ctx.strokeStyle = @options.strokeColor
- @ctx.beginPath()
- @ctx.arc(w, h, radius, displayedAngle, (2 - @options.angle) * Math.PI, false)
- @ctx.stroke()
-
-
- # Draw pointers from (w, h)
- @ctx.translate(w, h)
- for gauge in @gp
- gauge.update(true)
- @ctx.translate(-w, -h)
-
-
-class BaseDonut extends BaseGauge
- lineWidth: 15
- displayedValue: 0
- value: 33
- maxValue: 80
- minValue: 0
-
- options:
- lineWidth: 0.10
- colorStart: "#6f6ea0"
- colorStop: "#c0c0db"
- strokeColor: "#eeeeee"
- shadowColor: "#d5d5d5"
- angle: 0.35
- radiusScale: 1.0
-
- constructor: (@canvas) ->
- super()
- if typeof G_vmlCanvasManager != 'undefined'
- @canvas = window.G_vmlCanvasManager.initElement(@canvas)
- @ctx = @canvas.getContext('2d')
- @setOptions()
- @render()
-
- getAngle: (value) ->
- return (1 - @options.angle) * Math.PI + ((value - @minValue) / (@maxValue - @minValue)) * ((2 + @options.angle) - (1 - @options.angle)) * Math.PI
-
- setOptions: (options=null) ->
- super(options)
- @lineWidth = @canvas.height * @options.lineWidth
- @radius = @options.radiusScale * (@canvas.height / 2 - @lineWidth/2)
- return @
-
- set: (value) ->
- @value = value
- if @value > @maxValue
- @maxValue = @value * 1.1
- AnimationUpdater.run()
-
- render: () ->
- displayedAngle = @getAngle(@displayedValue)
- w = @canvas.width / 2
- h = @canvas.height / 2
-
- if @textField
- @textField.render(@)
-
- grdFill = @ctx.createRadialGradient(w, h, 39, w, h, 70)
- grdFill.addColorStop(0, @options.colorStart)
- grdFill.addColorStop(1, @options.colorStop)
-
- start = @radius - @lineWidth / 2
- stop = @radius + @lineWidth / 2
-
- @ctx.strokeStyle = @options.strokeColor
- @ctx.beginPath()
- @ctx.arc(w, h, @radius, (1 - @options.angle) * Math.PI, (2 + @options.angle) * Math.PI, false)
- @ctx.lineWidth = @lineWidth
- @ctx.lineCap = "round"
- @ctx.stroke()
-
- @ctx.strokeStyle = grdFill
- @ctx.beginPath()
- @ctx.arc(w, h, @radius, (1 - @options.angle) * Math.PI, displayedAngle, false)
- @ctx.stroke()
-
-
-class Donut extends BaseDonut
- strokeGradient: (w, h, start, stop) ->
- grd = @ctx.createRadialGradient(w, h, start, w, h, stop)
- grd.addColorStop(0, @options.shadowColor)
- grd.addColorStop(0.12, @options._orgStrokeColor)
- grd.addColorStop(0.88, @options._orgStrokeColor)
- grd.addColorStop(1, @options.shadowColor)
- return grd
-
- setOptions: (options=null) ->
- super(options)
- w = @canvas.width / 2
- h = @canvas.height / 2
- start = @radius - @lineWidth / 2
- stop = @radius + @lineWidth / 2
- @options._orgStrokeColor = @options.strokeColor
- @options.strokeColor = @strokeGradient(w, h, start, stop)
- return @
-
-window.AnimationUpdater =
- elements: []
- animId: null
-
- addAll: (list) ->
- for elem in list
- AnimationUpdater.elements.push(elem)
-
- add: (object) ->
- AnimationUpdater.elements.push(object)
-
- run: (force=false) ->
- animationFinished = true
- for elem in AnimationUpdater.elements
- if elem.update(force is true)
- animationFinished = false
- if not animationFinished
- AnimationUpdater.animId = requestAnimationFrame(AnimationUpdater.run)
- else
- cancelAnimationFrame(AnimationUpdater.animId)
-
-if typeof window.define == 'function' && window.define.amd?
- define(() ->
- {
- Gauge: Gauge,
- Donut: Donut,
- BaseDonut: BaseDonut,
- TextRenderer: TextRenderer
- }
- )
-else if typeof module != 'undefined' && module.exports?
- module.exports = {
- Gauge: Gauge,
- Donut: Donut,
- BaseDonut: BaseDonut,
- TextRenderer: TextRenderer
- }
-else
- window.Gauge = Gauge
- window.Donut = Donut
- window.BaseDonut = BaseDonut
- window.TextRenderer = TextRenderer
diff --git a/debian/missing-sources/gauge-1.3.2.js b/debian/missing-sources/gauge-1.3.2.js
deleted file mode 120000
index dcf36b8f..00000000
--- a/debian/missing-sources/gauge-1.3.2.js
+++ /dev/null
@@ -1 +0,0 @@
-gauge-1.3.2.coffee \ No newline at end of file
diff --git a/debian/missing-sources/jquery-2.2.4.js b/debian/missing-sources/jquery-2.2.4.js
deleted file mode 100644
index 5c3c456a..00000000
--- a/debian/missing-sources/jquery-2.2.4.js
+++ /dev/null
@@ -1,9814 +0,0 @@
-/*!
- * jQuery JavaScript Library v2.2.4
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2016-05-20T17:23Z
- */
-
-(function( global, factory ) {
-
- if ( typeof module === "object" && typeof module.exports === "object" ) {
- // For CommonJS and CommonJS-like environments where a proper `window`
- // is present, execute the factory and get jQuery.
- // For environments that do not have a `window` with a `document`
- // (such as Node.js), expose a factory as module.exports.
- // This accentuates the need for the creation of a real `window`.
- // e.g. var jQuery = require("jquery")(window);
- // See ticket #14549 for more info.
- module.exports = global.document ?
- factory( global, true ) :
- function( w ) {
- if ( !w.document ) {
- throw new Error( "jQuery requires a window with a document" );
- }
- return factory( w );
- };
- } else {
- factory( global );
- }
-
-// Pass this if window is not defined yet
-}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
-
-// Support: Firefox 18+
-// Can't be in strict mode, several libs including ASP.NET trace
-// the stack via arguments.caller.callee and Firefox dies if
-// you try to trace through "use strict" call chains. (#13335)
-//"use strict";
-var arr = [];
-
-var document = window.document;
-
-var slice = arr.slice;
-
-var concat = arr.concat;
-
-var push = arr.push;
-
-var indexOf = arr.indexOf;
-
-var class2type = {};
-
-var toString = class2type.toString;
-
-var hasOwn = class2type.hasOwnProperty;
-
-var support = {};
-
-
-
-var
- version = "2.2.4",
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
-
- // The jQuery object is actually just the init constructor 'enhanced'
- // Need init if jQuery is called (just allow error to be thrown if not included)
- return new jQuery.fn.init( selector, context );
- },
-
- // Support: Android<4.1
- // Make sure we trim BOM and NBSP
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- };
-
-jQuery.fn = jQuery.prototype = {
-
- // The current version of jQuery being used
- jquery: version,
-
- constructor: jQuery,
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- toArray: function() {
- return slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num != null ?
-
- // Return just the one element from the set
- ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
-
- // Return all the elements in a clean array
- slice.call( this );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- each: function( callback ) {
- return jQuery.each( this, callback );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map( this, function( elem, i ) {
- return callback.call( elem, i, elem );
- } ) );
- },
-
- slice: function() {
- return this.pushStack( slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
- },
-
- end: function() {
- return this.prevObject || this.constructor();
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: push,
- sort: arr.sort,
- splice: arr.splice
-};
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[ 0 ] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
-
- // Skip the boolean and the target
- target = arguments[ i ] || {};
- i++;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
- target = {};
- }
-
- // Extend jQuery itself if only one argument is passed
- if ( i === length ) {
- target = this;
- i--;
- }
-
- for ( ; i < length; i++ ) {
-
- // Only deal with non-null/undefined values
- if ( ( options = arguments[ i ] ) != null ) {
-
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
- ( copyIsArray = jQuery.isArray( copy ) ) ) ) {
-
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray( src ) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject( src ) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend( {
-
- // Unique for each copy of jQuery on the page
- expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
-
- // Assume jQuery is ready without the ready module
- isReady: true,
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- noop: function() {},
-
- isFunction: function( obj ) {
- return jQuery.type( obj ) === "function";
- },
-
- isArray: Array.isArray,
-
- isWindow: function( obj ) {
- return obj != null && obj === obj.window;
- },
-
- isNumeric: function( obj ) {
-
- // parseFloat NaNs numeric-cast false positives (null|true|false|"")
- // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
- // subtraction forces infinities to NaN
- // adding 1 corrects loss of precision from parseFloat (#15100)
- var realStringObj = obj && obj.toString();
- return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
- },
-
- isPlainObject: function( obj ) {
- var key;
-
- // Not plain objects:
- // - Any object or value whose internal [[Class]] property is not "[object Object]"
- // - DOM nodes
- // - window
- if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !hasOwn.call( obj, "constructor" ) &&
- !hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) {
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own
- for ( key in obj ) {}
-
- return key === undefined || hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return obj + "";
- }
-
- // Support: Android<4.0, iOS<6 (functionish RegExp)
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ toString.call( obj ) ] || "object" :
- typeof obj;
- },
-
- // Evaluates a script in a global context
- globalEval: function( code ) {
- var script,
- indirect = eval;
-
- code = jQuery.trim( code );
-
- if ( code ) {
-
- // If the code includes a valid, prologue position
- // strict mode pragma, execute code by injecting a
- // script tag into the document.
- if ( code.indexOf( "use strict" ) === 1 ) {
- script = document.createElement( "script" );
- script.text = code;
- document.head.appendChild( script ).parentNode.removeChild( script );
- } else {
-
- // Otherwise, avoid the DOM node creation, insertion
- // and removal by using an indirect global eval
-
- indirect( code );
- }
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Support: IE9-11+
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- each: function( obj, callback ) {
- var length, i = 0;
-
- if ( isArrayLike( obj ) ) {
- length = obj.length;
- for ( ; i < length; i++ ) {
- if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
- break;
- }
- }
- }
-
- return obj;
- },
-
- // Support: Android<4.1
- trim: function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArrayLike( Object( arr ) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- return arr == null ? -1 : indexOf.call( arr, elem, i );
- },
-
- merge: function( first, second ) {
- var len = +second.length,
- j = 0,
- i = first.length;
-
- for ( ; j < len; j++ ) {
- first[ i++ ] = second[ j ];
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, invert ) {
- var callbackInverse,
- matches = [],
- i = 0,
- length = elems.length,
- callbackExpect = !invert;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- callbackInverse = !callback( elems[ i ], i );
- if ( callbackInverse !== callbackExpect ) {
- matches.push( elems[ i ] );
- }
- }
-
- return matches;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var length, value,
- i = 0,
- ret = [];
-
- // Go through the array, translating each of the items to their new values
- if ( isArrayLike( elems ) ) {
- length = elems.length;
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret.push( value );
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret.push( value );
- }
- }
- }
-
- // Flatten any nested arrays
- return concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var tmp, args, proxy;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- now: Date.now,
-
- // jQuery.support is not used in Core but other projects attach their
- // properties to it so it needs to exist.
- support: support
-} );
-
-// JSHint would error on this code due to the Symbol not being defined in ES5.
-// Defining this global in .jshintrc would create a danger of using the global
-// unguarded in another place, it seems safer to just disable JSHint for these
-// three lines.
-/* jshint ignore: start */
-if ( typeof Symbol === "function" ) {
- jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
-}
-/* jshint ignore: end */
-
-// Populate the class2type map
-jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
-function( i, name ) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-} );
-
-function isArrayLike( obj ) {
-
- // Support: iOS 8.2 (not reproducible in simulator)
- // `in` check used to prevent JIT error (gh-2145)
- // hasOwn isn't used here due to false negatives
- // regarding Nodelist length in IE
- var length = !!obj && "length" in obj && obj.length,
- type = jQuery.type( obj );
-
- if ( type === "function" || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- return type === "array" || length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj;
-}
-var Sizzle =
-/*!
- * Sizzle CSS Selector Engine v2.2.1
- * http://sizzlejs.com/
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2015-10-17
- */
-(function( window ) {
-
-var i,
- support,
- Expr,
- getText,
- isXML,
- tokenize,
- compile,
- select,
- outermostContext,
- sortInput,
- hasDuplicate,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsHTML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
-
- // Instance-specific data
- expando = "sizzle" + 1 * new Date(),
- preferredDoc = window.document,
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
- sortOrder = function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- }
- return 0;
- },
-
- // General-purpose constants
- MAX_NEGATIVE = 1 << 31,
-
- // Instance methods
- hasOwn = ({}).hasOwnProperty,
- arr = [],
- pop = arr.pop,
- push_native = arr.push,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf as it's faster than native
- // http://jsperf.com/thor-indexof-vs-for/5
- indexOf = function( list, elem ) {
- var i = 0,
- len = list.length;
- for ( ; i < len; i++ ) {
- if ( list[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
-
- // Regular expressions
-
- // http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
-
- // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
- attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
- // Operator (capture 2)
- "*([*^$|!~]?=)" + whitespace +
- // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
- "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
- "*\\]",
-
- pseudos = ":(" + identifier + ")(?:\\((" +
- // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
- // 1. quoted (capture 3; capture 4 or capture 5)
- "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
- // 2. simple (capture 6)
- "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
- // 3. anything else (capture 2)
- ".*" +
- ")\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rwhitespace = new RegExp( whitespace + "+", "g" ),
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
-
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + identifier + ")" ),
- "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
- "TAG": new RegExp( "^(" + identifier + "|[*])" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rnative = /^[^{]+\{\s*\[native \w/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rsibling = /[+~]/,
- rescape = /'|\\/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
- funescape = function( _, escaped, escapedWhitespace ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- // Support: Firefox<24
- // Workaround erroneous numeric interpretation of +"0x"
- return high !== high || escapedWhitespace ?
- escaped :
- high < 0 ?
- // BMP codepoint
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- },
-
- // Used for iframes
- // See setDocument()
- // Removing the function wrapper causes a "Permission Denied"
- // error in IE
- unloadHandler = function() {
- setDocument();
- };
-
-// Optimize for push.apply( _, NodeList )
-try {
- push.apply(
- (arr = slice.call( preferredDoc.childNodes )),
- preferredDoc.childNodes
- );
- // Support: Android<4.0
- // Detect silently failing push.apply
- arr[ preferredDoc.childNodes.length ].nodeType;
-} catch ( e ) {
- push = { apply: arr.length ?
-
- // Leverage slice if possible
- function( target, els ) {
- push_native.apply( target, slice.call(els) );
- } :
-
- // Support: IE<9
- // Otherwise append directly
- function( target, els ) {
- var j = target.length,
- i = 0;
- // Can't trust NodeList.length
- while ( (target[j++] = els[i++]) ) {}
- target.length = j - 1;
- }
- };
-}
-
-function Sizzle( selector, context, results, seed ) {
- var m, i, elem, nid, nidselect, match, groups, newSelector,
- newContext = context && context.ownerDocument,
-
- // nodeType defaults to 9, since context defaults to document
- nodeType = context ? context.nodeType : 9;
-
- results = results || [];
-
- // Return early from calls with invalid selector or context
- if ( typeof selector !== "string" || !selector ||
- nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
-
- return results;
- }
-
- // Try to shortcut find operations (as opposed to filters) in HTML documents
- if ( !seed ) {
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
- context = context || document;
-
- if ( documentIsHTML ) {
-
- // If the selector is sufficiently simple, try using a "get*By*" DOM method
- // (excepting DocumentFragment context, where the methods don't exist)
- if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
-
- // ID selector
- if ( (m = match[1]) ) {
-
- // Document context
- if ( nodeType === 9 ) {
- if ( (elem = context.getElementById( m )) ) {
-
- // Support: IE, Opera, Webkit
- // TODO: identify versions
- // getElementById can match elements by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
-
- // Element context
- } else {
-
- // Support: IE, Opera, Webkit
- // TODO: identify versions
- // getElementById can match elements by name instead of ID
- if ( newContext && (elem = newContext.getElementById( m )) &&
- contains( context, elem ) &&
- elem.id === m ) {
-
- results.push( elem );
- return results;
- }
- }
-
- // Type selector
- } else if ( match[2] ) {
- push.apply( results, context.getElementsByTagName( selector ) );
- return results;
-
- // Class selector
- } else if ( (m = match[3]) && support.getElementsByClassName &&
- context.getElementsByClassName ) {
-
- push.apply( results, context.getElementsByClassName( m ) );
- return results;
- }
- }
-
- // Take advantage of querySelectorAll
- if ( support.qsa &&
- !compilerCache[ selector + " " ] &&
- (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
-
- if ( nodeType !== 1 ) {
- newContext = context;
- newSelector = selector;
-
- // qSA looks outside Element context, which is not what we want
- // Thanks to Andrew Dupont for this workaround technique
- // Support: IE <=8
- // Exclude object elements
- } else if ( context.nodeName.toLowerCase() !== "object" ) {
-
- // Capture the context ID, setting it first if necessary
- if ( (nid = context.getAttribute( "id" )) ) {
- nid = nid.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", (nid = expando) );
- }
-
- // Prefix every selector in the list
- groups = tokenize( selector );
- i = groups.length;
- nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']";
- while ( i-- ) {
- groups[i] = nidselect + " " + toSelector( groups[i] );
- }
- newSelector = groups.join( "," );
-
- // Expand context for sibling selectors
- newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
- context;
- }
-
- if ( newSelector ) {
- try {
- push.apply( results,
- newContext.querySelectorAll( newSelector )
- );
- return results;
- } catch ( qsaError ) {
- } finally {
- if ( nid === expando ) {
- context.removeAttribute( "id" );
- }
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {function(string, object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var keys = [];
-
- function cache( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key + " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key + " " ] = value);
- }
- return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return !!fn( div );
- } catch (e) {
- return false;
- } finally {
- // Remove from its parent by default
- if ( div.parentNode ) {
- div.parentNode.removeChild( div );
- }
- // release memory in IE
- div = null;
- }
-}
-
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied
- */
-function addHandle( attrs, handler ) {
- var arr = attrs.split("|"),
- i = arr.length;
-
- while ( i-- ) {
- Expr.attrHandle[ arr[i] ] = handler;
- }
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
- */
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
- ( ~b.sourceIndex || MAX_NEGATIVE ) -
- ( ~a.sourceIndex || MAX_NEGATIVE );
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
-/**
- * Returns a function to use in pseudos for input types
- * @param {String} type
- */
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for buttons
- * @param {String} type
- */
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for positionals
- * @param {Function} fn
- */
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Checks a node for validity as a Sizzle context
- * @param {Element|Object=} context
- * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
- */
-function testContext( context ) {
- return context && typeof context.getElementsByTagName !== "undefined" && context;
-}
-
-// Expose support vars for convenience
-support = Sizzle.support = {};
-
-/**
- * Detects XML nodes
- * @param {Element|Object} elem An element or a document
- * @returns {Boolean} True iff elem is a non-HTML XML node
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var hasCompare, parent,
- doc = node ? node.ownerDocument || node : preferredDoc;
-
- // Return early if doc is invalid or already selected
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Update global variables
- document = doc;
- docElem = document.documentElement;
- documentIsHTML = !isXML( document );
-
- // Support: IE 9-11, Edge
- // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
- if ( (parent = document.defaultView) && parent.top !== parent ) {
- // Support: IE 11
- if ( parent.addEventListener ) {
- parent.addEventListener( "unload", unloadHandler, false );
-
- // Support: IE 9 - 10 only
- } else if ( parent.attachEvent ) {
- parent.attachEvent( "onunload", unloadHandler );
- }
- }
-
- /* Attributes
- ---------------------------------------------------------------------- */
-
- // Support: IE<8
- // Verify that getAttribute really returns attributes and not properties
- // (excepting IE8 booleans)
- support.attributes = assert(function( div ) {
- div.className = "i";
- return !div.getAttribute("className");
- });
-
- /* getElement(s)By*
- ---------------------------------------------------------------------- */
-
- // Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert(function( div ) {
- div.appendChild( document.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Support: IE<9
- support.getElementsByClassName = rnative.test( document.getElementsByClassName );
-
- // Support: IE<10
- // Check if getElementById returns elements by name
- // The broken getElementById methods don't pick up programatically-set names,
- // so use a roundabout getElementsByName test
- support.getById = assert(function( div ) {
- docElem.appendChild( div ).id = expando;
- return !document.getElementsByName || !document.getElementsByName( expando ).length;
- });
-
- // ID find and filter
- if ( support.getById ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
- var m = context.getElementById( id );
- return m ? [ m ] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- // Support: IE6/7
- // getElementById is not reliable as a find shortcut
- delete Expr.find["ID"];
-
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== "undefined" &&
- elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.getElementsByTagName ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== "undefined" ) {
- return context.getElementsByTagName( tag );
-
- // DocumentFragment nodes don't have gEBTN
- } else if ( support.qsa ) {
- return context.querySelectorAll( tag );
- }
- } :
-
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- while ( (elem = results[i++]) ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Class
- Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- /* QSA/matchesSelector
- ---------------------------------------------------------------------- */
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21)
- // We allow this because of a bug in IE8/9 that throws an error
- // whenever `document.activeElement` is accessed on an iframe
- // So, we allow :focus to pass through QSA all the time to avoid the IE error
- // See http://bugs.jquery.com/ticket/13378
- rbuggyQSA = [];
-
- if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explicitly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
- "<select id='" + expando + "-\r\\' msallowcapture=''>" +
- "<option selected=''></option></select>";
-
- // Support: IE8, Opera 11-12.16
- // Nothing should be selected when empty strings follow ^= or $= or *=
- // The test attribute must be unknown in Opera but "safe" for WinRT
- // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
- if ( div.querySelectorAll("[msallowcapture^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
- }
-
- // Support: IE8
- // Boolean attributes and "value" are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
- }
-
- // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
- if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
- rbuggyQSA.push("~=");
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
-
- // Support: Safari 8+, iOS 8+
- // https://bugs.webkit.org/show_bug.cgi?id=136851
- // In-page `selector#id sibing-combinator selector` fails
- if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
- rbuggyQSA.push(".#.+[+~]");
- }
- });
-
- assert(function( div ) {
- // Support: Windows 8 Native Apps
- // The type and name attributes are restricted during .innerHTML assignment
- var input = document.createElement("input");
- input.setAttribute( "type", "hidden" );
- div.appendChild( input ).setAttribute( "name", "D" );
-
- // Support: IE8
- // Enforce case-sensitivity of name attribute
- if ( div.querySelectorAll("[name=d]").length ) {
- rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
- docElem.webkitMatchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
-
- /* Contains
- ---------------------------------------------------------------------- */
- hasCompare = rnative.test( docElem.compareDocumentPosition );
-
- // Element contains another
- // Purposefully self-exclusive
- // As in, an element does not contain itself
- contains = hasCompare || rnative.test( docElem.contains ) ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- /* Sorting
- ---------------------------------------------------------------------- */
-
- // Document order sorting
- sortOrder = hasCompare ?
- function( a, b ) {
-
- // Flag for duplicate removal
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- // Sort on method existence if only one input has compareDocumentPosition
- var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
- if ( compare ) {
- return compare;
- }
-
- // Calculate position if both inputs belong to the same document
- compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
- a.compareDocumentPosition( b ) :
-
- // Otherwise we know they are disconnected
- 1;
-
- // Disconnected nodes
- if ( compare & 1 ||
- (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
-
- // Choose the first element that is related to our preferred document
- if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
- return -1;
- }
- if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
- return 1;
- }
-
- // Maintain original order
- return sortInput ?
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
- 0;
- }
-
- return compare & 4 ? -1 : 1;
- } :
- function( a, b ) {
- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // Parentless nodes are either documents or disconnected
- if ( !aup || !bup ) {
- return a === document ? -1 :
- b === document ? 1 :
- aup ? -1 :
- bup ? 1 :
- sortInput ?
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- return document;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- if ( support.matchesSelector && documentIsHTML &&
- !compilerCache[ expr + " " ] &&
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
-
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch (e) {}
- }
-
- return Sizzle( expr, document, null, [ elem ] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- var fn = Expr.attrHandle[ name.toLowerCase() ],
- // Don't get fooled by Object.prototype properties (jQuery #13807)
- val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
- fn( elem, name, !documentIsHTML ) :
- undefined;
-
- return val !== undefined ?
- val :
- support.attributes || !documentIsHTML ?
- elem.getAttribute( name ) :
- (val = elem.getAttributeNode(name)) && val.specified ?
- val.value :
- null;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Document sorting and removing duplicates
- * @param {ArrayLike} results
- */
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- j = 0,
- i = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- sortInput = !support.sortStable && results.slice( 0 );
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- while ( (elem = results[i++]) ) {
- if ( elem === results[ i ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- // Clear input after sorting to release objects
- // See https://github.com/jquery/sizzle/pull/225
- sortInput = null;
-
- return results;
-};
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- while ( (node = elem[i++]) ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (jQuery #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- attrHandle: {},
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[6] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[3] ) {
- match[2] = match[4] || match[5] || "";
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeNameSelector ) {
- var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
- return nodeNameSelector === "*" ?
- function() { return true; } :
- function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.slice( -check.length ) === check :
- operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, uniqueCache, outerCache, node, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType,
- diff = false;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ?
- node.nodeName.toLowerCase() === name :
- node.nodeType === 1 ) {
-
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
-
- // Seek `elem` from a previously-cached index
-
- // ...in a gzip-friendly way
- node = parent;
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- cache = uniqueCache[ type ] || [];
- nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
- diff = nodeIndex && cache[ 2 ];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- } else {
- // Use previously-cached element index if available
- if ( useCache ) {
- // ...in a gzip-friendly way
- node = elem;
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- cache = uniqueCache[ type ] || [];
- nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
- diff = nodeIndex;
- }
-
- // xml :nth-child(...)
- // or :nth-last-child(...) or :nth(-last)?-of-type(...)
- if ( diff === false ) {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ?
- node.nodeName.toLowerCase() === name :
- node.nodeType === 1 ) &&
- ++diff ) {
-
- // Cache the index of each encountered element
- if ( useCache ) {
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- uniqueCache[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- // Don't keep the element (issue #299)
- input[0] = null;
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- text = text.replace( runescape, funescape );
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifier
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsHTML ?
- elem.lang :
- elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
- // but not by others (comment: 8; processing instruction: 7; etc.)
- // nodeType < 6 works because attributes (2) do not appear as children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeType < 6 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
-
- // Support: IE<8
- // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-// Easy API for creating new setFilters
-function setFilters() {}
-setFilters.prototype = Expr.filters = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( (tokens = []) );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- });
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- type: type,
- matches: match
- });
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-};
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var oldCache, uniqueCache, outerCache,
- newCache = [ dirruns, doneName ];
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
-
- if ( (oldCache = uniqueCache[ dir ]) &&
- oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
-
- // Assign to newCache so results back-propagate to previous elements
- return (newCache[ 2 ] = oldCache[ 2 ]);
- } else {
- // Reuse newcache so results back-propagate to previous elements
- uniqueCache[ dir ] = newCache;
-
- // A match means we're done; a fail means we have to keep checking
- if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- // Avoid hanging onto element (issue #299)
- checkContext = null;
- return ret;
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector(
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
- tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
- ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- var bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, outermost ) {
- var elem, j, matcher,
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- setMatched = [],
- contextBackup = outermostContext,
- // We must always have either seed elements or outermost context
- elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
- // Use integer dirruns iff this is the outermost matcher
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
- len = elems.length;
-
- if ( outermost ) {
- outermostContext = context === document || context || outermost;
- }
-
- // Add elements passing elementMatchers directly to results
- // Support: IE<9, Safari
- // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
- for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- j = 0;
- if ( !context && elem.ownerDocument !== document ) {
- setDocument( elem );
- xml = !documentIsHTML;
- }
- while ( (matcher = elementMatchers[j++]) ) {
- if ( matcher( elem, context || document, xml) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // `i` is now the count of elements visited above, and adding it to `matchedCount`
- // makes the latter nonnegative.
- matchedCount += i;
-
- // Apply set filters to unmatched elements
- // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
- // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
- // no element matchers and no seed.
- // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
- // case, which will result in a "00" `matchedCount` that differs from `i` but is also
- // numerically zero.
- if ( bySet && i !== matchedCount ) {
- j = 0;
- while ( (matcher = setMatchers[j++]) ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !match ) {
- match = tokenize( selector );
- }
- i = match.length;
- while ( i-- ) {
- cached = matcherFromTokens( match[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
-
- // Save selector and tokenization
- cached.selector = selector;
- }
- return cached;
-};
-
-/**
- * A low-level selection function that works with Sizzle's compiled
- * selector functions
- * @param {String|Function} selector A selector or a pre-compiled
- * selector function built with Sizzle.compile
- * @param {Element} context
- * @param {Array} [results]
- * @param {Array} [seed] A set of elements to match against
- */
-select = Sizzle.select = function( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- compiled = typeof selector === "function" && selector,
- match = !seed && tokenize( (selector = compiled.selector || selector) );
-
- results = results || [];
-
- // Try to minimize operations if there is only one selector in the list and no seed
- // (the latter of which guarantees us context)
- if ( match.length === 1 ) {
-
- // Reduce context if the leading compound selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- support.getById && context.nodeType === 9 && documentIsHTML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
- if ( !context ) {
- return results;
-
- // Precompiled matchers will still verify ancestry, so step up a level
- } else if ( compiled ) {
- context = context.parentNode;
- }
-
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
- while ( i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, seed );
- return results;
- }
-
- break;
- }
- }
- }
- }
-
- // Compile and execute a filtering function if one is not provided
- // Provide `match` to avoid retokenization if we modified the selector above
- ( compiled || compile( selector, match ) )(
- seed,
- context,
- !documentIsHTML,
- results,
- !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
- );
- return results;
-};
-
-// One-time assignments
-
-// Sort stability
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
-
-// Support: Chrome 14-35+
-// Always assume duplicates if they aren't passed to the comparison function
-support.detectDuplicates = !!hasDuplicate;
-
-// Initialize against the default document
-setDocument();
-
-// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
-// Detached nodes confoundingly follow *each other*
-support.sortDetached = assert(function( div1 ) {
- // Should return 1, but returns 4 (following)
- return div1.compareDocumentPosition( document.createElement("div") ) & 1;
-});
-
-// Support: IE<8
-// Prevent attribute/property "interpolation"
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !assert(function( div ) {
- div.innerHTML = "<a href='#'></a>";
- return div.firstChild.getAttribute("href") === "#" ;
-}) ) {
- addHandle( "type|href|height|width", function( elem, name, isXML ) {
- if ( !isXML ) {
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
- }
- });
-}
-
-// Support: IE<9
-// Use defaultValue in place of getAttribute("value")
-if ( !support.attributes || !assert(function( div ) {
- div.innerHTML = "<input/>";
- div.firstChild.setAttribute( "value", "" );
- return div.firstChild.getAttribute( "value" ) === "";
-}) ) {
- addHandle( "value", function( elem, name, isXML ) {
- if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
- return elem.defaultValue;
- }
- });
-}
-
-// Support: IE<9
-// Use getAttributeNode to fetch booleans when getAttribute lies
-if ( !assert(function( div ) {
- return div.getAttribute("disabled") == null;
-}) ) {
- addHandle( booleans, function( elem, name, isXML ) {
- var val;
- if ( !isXML ) {
- return elem[ name ] === true ? name.toLowerCase() :
- (val = elem.getAttributeNode( name )) && val.specified ?
- val.value :
- null;
- }
- });
-}
-
-return Sizzle;
-
-})( window );
-
-
-
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[ ":" ] = jQuery.expr.pseudos;
-jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-
-var dir = function( elem, dir, until ) {
- var matched = [],
- truncate = until !== undefined;
-
- while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
- if ( elem.nodeType === 1 ) {
- if ( truncate && jQuery( elem ).is( until ) ) {
- break;
- }
- matched.push( elem );
- }
- }
- return matched;
-};
-
-
-var siblings = function( n, elem ) {
- var matched = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- matched.push( n );
- }
- }
-
- return matched;
-};
-
-
-var rneedsContext = jQuery.expr.match.needsContext;
-
-var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ );
-
-
-
-var risSimple = /^.[^:#\[\.,]*$/;
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, not ) {
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep( elements, function( elem, i ) {
- /* jshint -W018 */
- return !!qualifier.call( elem, i, elem ) !== not;
- } );
-
- }
-
- if ( qualifier.nodeType ) {
- return jQuery.grep( elements, function( elem ) {
- return ( elem === qualifier ) !== not;
- } );
-
- }
-
- if ( typeof qualifier === "string" ) {
- if ( risSimple.test( qualifier ) ) {
- return jQuery.filter( qualifier, elements, not );
- }
-
- qualifier = jQuery.filter( qualifier, elements );
- }
-
- return jQuery.grep( elements, function( elem ) {
- return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
- } );
-}
-
-jQuery.filter = function( expr, elems, not ) {
- var elem = elems[ 0 ];
-
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 && elem.nodeType === 1 ?
- jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
- jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
- return elem.nodeType === 1;
- } ) );
-};
-
-jQuery.fn.extend( {
- find: function( selector ) {
- var i,
- len = this.length,
- ret = [],
- self = this;
-
- if ( typeof selector !== "string" ) {
- return this.pushStack( jQuery( selector ).filter( function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- } ) );
- }
-
- for ( i = 0; i < len; i++ ) {
- jQuery.find( selector, self[ i ], ret );
- }
-
- // Needed because $( selector, context ) becomes $( context ).find( selector )
- ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
- ret.selector = this.selector ? this.selector + " " + selector : selector;
- return ret;
- },
- filter: function( selector ) {
- return this.pushStack( winnow( this, selector || [], false ) );
- },
- not: function( selector ) {
- return this.pushStack( winnow( this, selector || [], true ) );
- },
- is: function( selector ) {
- return !!winnow(
- this,
-
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- typeof selector === "string" && rneedsContext.test( selector ) ?
- jQuery( selector ) :
- selector || [],
- false
- ).length;
- }
-} );
-
-
-// Initialize a jQuery object
-
-
-// A central reference to the root jQuery(document)
-var rootjQuery,
-
- // A simple way to check for HTML strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- init = jQuery.fn.init = function( selector, context, root ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Method init() accepts an alternate rootjQuery
- // so migrate can support jQuery.sub (gh-2101)
- root = root || rootjQuery;
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector[ 0 ] === "<" &&
- selector[ selector.length - 1 ] === ">" &&
- selector.length >= 3 ) {
-
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && ( match[ 1 ] || !context ) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[ 1 ] ) {
- context = context instanceof jQuery ? context[ 0 ] : context;
-
- // Option to run scripts is true for back-compat
- // Intentionally let the error be thrown if parseHTML is not present
- jQuery.merge( this, jQuery.parseHTML(
- match[ 1 ],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
-
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[ 2 ] );
-
- // Support: Blackberry 4.6
- // gEBID returns nodes no longer in the document (#6963)
- if ( elem && elem.parentNode ) {
-
- // Inject the element directly into the jQuery object
- this.length = 1;
- this[ 0 ] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || root ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[ 0 ] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return root.ready !== undefined ?
- root.ready( selector ) :
-
- // Execute immediately if ready is not present
- selector( jQuery );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- };
-
-// Give the init function the jQuery prototype for later instantiation
-init.prototype = jQuery.fn;
-
-// Initialize central reference
-rootjQuery = jQuery( document );
-
-
-var rparentsprev = /^(?:parents|prev(?:Until|All))/,
-
- // Methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend( {
- has: function( target ) {
- var targets = jQuery( target, this ),
- l = targets.length;
-
- return this.filter( function() {
- var i = 0;
- for ( ; i < l; i++ ) {
- if ( jQuery.contains( this, targets[ i ] ) ) {
- return true;
- }
- }
- } );
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- matched = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
-
- // Always skip document fragments
- if ( cur.nodeType < 11 && ( pos ?
- pos.index( cur ) > -1 :
-
- // Don't pass non-elements to Sizzle
- cur.nodeType === 1 &&
- jQuery.find.matchesSelector( cur, selectors ) ) ) {
-
- matched.push( cur );
- break;
- }
- }
- }
-
- return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
- },
-
- // Determine the position of an element within the set
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
- }
-
- // Index in selector
- if ( typeof elem === "string" ) {
- return indexOf.call( jQuery( elem ), this[ 0 ] );
- }
-
- // Locate the position of the desired element
- return indexOf.call( this,
-
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[ 0 ] : elem
- );
- },
-
- add: function( selector, context ) {
- return this.pushStack(
- jQuery.uniqueSort(
- jQuery.merge( this.get(), jQuery( selector, context ) )
- )
- );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- }
-} );
-
-function sibling( cur, dir ) {
- while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
- return cur;
-}
-
-jQuery.each( {
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return siblings( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return siblings( elem.firstChild );
- },
- contents: function( elem ) {
- return elem.contentDocument || jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var matched = jQuery.map( this, fn, until );
-
- if ( name.slice( -5 ) !== "Until" ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- matched = jQuery.filter( selector, matched );
- }
-
- if ( this.length > 1 ) {
-
- // Remove duplicates
- if ( !guaranteedUnique[ name ] ) {
- jQuery.uniqueSort( matched );
- }
-
- // Reverse order for parents* and prev-derivatives
- if ( rparentsprev.test( name ) ) {
- matched.reverse();
- }
- }
-
- return this.pushStack( matched );
- };
-} );
-var rnotwhite = ( /\S+/g );
-
-
-
-// Convert String-formatted options into Object-formatted ones
-function createOptions( options ) {
- var object = {};
- jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- } );
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- createOptions( options ) :
- jQuery.extend( {}, options );
-
- var // Flag to know if list is currently firing
- firing,
-
- // Last fire value for non-forgettable lists
- memory,
-
- // Flag to know if list was already fired
- fired,
-
- // Flag to prevent firing
- locked,
-
- // Actual callback list
- list = [],
-
- // Queue of execution data for repeatable lists
- queue = [],
-
- // Index of currently firing callback (modified by add/remove as needed)
- firingIndex = -1,
-
- // Fire callbacks
- fire = function() {
-
- // Enforce single-firing
- locked = options.once;
-
- // Execute callbacks for all pending executions,
- // respecting firingIndex overrides and runtime changes
- fired = firing = true;
- for ( ; queue.length; firingIndex = -1 ) {
- memory = queue.shift();
- while ( ++firingIndex < list.length ) {
-
- // Run callback and check for early termination
- if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
- options.stopOnFalse ) {
-
- // Jump to end and forget the data so .add doesn't re-fire
- firingIndex = list.length;
- memory = false;
- }
- }
- }
-
- // Forget the data if we're done with it
- if ( !options.memory ) {
- memory = false;
- }
-
- firing = false;
-
- // Clean up if we're done firing for good
- if ( locked ) {
-
- // Keep an empty list if we have data for future add calls
- if ( memory ) {
- list = [];
-
- // Otherwise, this object is spent
- } else {
- list = "";
- }
- }
- },
-
- // Actual Callbacks object
- self = {
-
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
-
- // If we have memory from a past run, we should fire after adding
- if ( memory && !firing ) {
- firingIndex = list.length - 1;
- queue.push( memory );
- }
-
- ( function add( args ) {
- jQuery.each( args, function( _, arg ) {
- if ( jQuery.isFunction( arg ) ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
-
- // Inspect recursively
- add( arg );
- }
- } );
- } )( arguments );
-
- if ( memory && !firing ) {
- fire();
- }
- }
- return this;
- },
-
- // Remove a callback from the list
- remove: function() {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
-
- // Handle firing indexes
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- } );
- return this;
- },
-
- // Check if a given callback is in the list.
- // If no argument is given, return whether or not list has callbacks attached.
- has: function( fn ) {
- return fn ?
- jQuery.inArray( fn, list ) > -1 :
- list.length > 0;
- },
-
- // Remove all callbacks from the list
- empty: function() {
- if ( list ) {
- list = [];
- }
- return this;
- },
-
- // Disable .fire and .add
- // Abort any current/pending executions
- // Clear all callbacks and values
- disable: function() {
- locked = queue = [];
- list = memory = "";
- return this;
- },
- disabled: function() {
- return !list;
- },
-
- // Disable .fire
- // Also disable .add unless we have memory (since it would have no effect)
- // Abort any pending executions
- lock: function() {
- locked = queue = [];
- if ( !memory ) {
- list = memory = "";
- }
- return this;
- },
- locked: function() {
- return !!locked;
- },
-
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( !locked ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- queue.push( args );
- if ( !firing ) {
- fire();
- }
- }
- return this;
- },
-
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
-
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-
-
-jQuery.extend( {
-
- Deferred: function( func ) {
- var tuples = [
-
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks( "memory" ) ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred( function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
-
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[ 1 ] ]( function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .progress( newDefer.notify )
- .done( newDefer.resolve )
- .fail( newDefer.reject );
- } else {
- newDefer[ tuple[ 0 ] + "With" ](
- this === promise ? newDefer.promise() : this,
- fn ? [ returned ] : arguments
- );
- }
- } );
- } );
- fns = null;
- } ).promise();
- },
-
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[ 1 ] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add( function() {
-
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[ 0 ] ] = function() {
- deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
- } );
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 ||
- ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred.
- // If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
- if ( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // Add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .progress( updateFunc( i, progressContexts, progressValues ) )
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject );
- } else {
- --remaining;
- }
- }
- }
-
- // If we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-} );
-
-
-// The deferred used on DOM ready
-var readyList;
-
-jQuery.fn.ready = function( fn ) {
-
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
-};
-
-jQuery.extend( {
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.triggerHandler ) {
- jQuery( document ).triggerHandler( "ready" );
- jQuery( document ).off( "ready" );
- }
- }
-} );
-
-/**
- * The ready event handler and self cleanup method
- */
-function completed() {
- document.removeEventListener( "DOMContentLoaded", completed );
- window.removeEventListener( "load", completed );
- jQuery.ready();
-}
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called
- // after the browser event has already occurred.
- // Support: IE9-10 only
- // Older IE sometimes signals "interactive" too soon
- if ( document.readyState === "complete" ||
- ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
-
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- window.setTimeout( jQuery.ready );
-
- } else {
-
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", completed );
- }
- }
- return readyList.promise( obj );
-};
-
-// Kick off the DOM ready check even if the user does not
-jQuery.ready.promise();
-
-
-
-
-// Multifunctional method to get and set values of a collection
-// The value/s can optionally be executed if it's a function
-var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- len = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- access( elems, fn, i, key[ i ], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
-
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < len; i++ ) {
- fn(
- elems[ i ], key, raw ?
- value :
- value.call( elems[ i ], i, fn( elems[ i ], key ) )
- );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- len ? fn( elems[ 0 ], key ) : emptyGet;
-};
-var acceptData = function( owner ) {
-
- // Accepts only:
- // - Node
- // - Node.ELEMENT_NODE
- // - Node.DOCUMENT_NODE
- // - Object
- // - Any
- /* jshint -W018 */
- return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
-};
-
-
-
-
-function Data() {
- this.expando = jQuery.expando + Data.uid++;
-}
-
-Data.uid = 1;
-
-Data.prototype = {
-
- register: function( owner, initial ) {
- var value = initial || {};
-
- // If it is a node unlikely to be stringify-ed or looped over
- // use plain assignment
- if ( owner.nodeType ) {
- owner[ this.expando ] = value;
-
- // Otherwise secure it in a non-enumerable, non-writable property
- // configurability must be true to allow the property to be
- // deleted with the delete operator
- } else {
- Object.defineProperty( owner, this.expando, {
- value: value,
- writable: true,
- configurable: true
- } );
- }
- return owner[ this.expando ];
- },
- cache: function( owner ) {
-
- // We can accept data for non-element nodes in modern browsers,
- // but we should not, see #8335.
- // Always return an empty object.
- if ( !acceptData( owner ) ) {
- return {};
- }
-
- // Check if the owner object already has a cache
- var value = owner[ this.expando ];
-
- // If not, create one
- if ( !value ) {
- value = {};
-
- // We can accept data for non-element nodes in modern browsers,
- // but we should not, see #8335.
- // Always return an empty object.
- if ( acceptData( owner ) ) {
-
- // If it is a node unlikely to be stringify-ed or looped over
- // use plain assignment
- if ( owner.nodeType ) {
- owner[ this.expando ] = value;
-
- // Otherwise secure it in a non-enumerable property
- // configurable must be true to allow the property to be
- // deleted when data is removed
- } else {
- Object.defineProperty( owner, this.expando, {
- value: value,
- configurable: true
- } );
- }
- }
- }
-
- return value;
- },
- set: function( owner, data, value ) {
- var prop,
- cache = this.cache( owner );
-
- // Handle: [ owner, key, value ] args
- if ( typeof data === "string" ) {
- cache[ data ] = value;
-
- // Handle: [ owner, { properties } ] args
- } else {
-
- // Copy the properties one-by-one to the cache object
- for ( prop in data ) {
- cache[ prop ] = data[ prop ];
- }
- }
- return cache;
- },
- get: function( owner, key ) {
- return key === undefined ?
- this.cache( owner ) :
- owner[ this.expando ] && owner[ this.expando ][ key ];
- },
- access: function( owner, key, value ) {
- var stored;
-
- // In cases where either:
- //
- // 1. No key was specified
- // 2. A string key was specified, but no value provided
- //
- // Take the "read" path and allow the get method to determine
- // which value to return, respectively either:
- //
- // 1. The entire cache object
- // 2. The data stored at the key
- //
- if ( key === undefined ||
- ( ( key && typeof key === "string" ) && value === undefined ) ) {
-
- stored = this.get( owner, key );
-
- return stored !== undefined ?
- stored : this.get( owner, jQuery.camelCase( key ) );
- }
-
- // When the key is not a string, or both a key and value
- // are specified, set or extend (existing objects) with either:
- //
- // 1. An object of properties
- // 2. A key and value
- //
- this.set( owner, key, value );
-
- // Since the "set" path can have two possible entry points
- // return the expected data based on which path was taken[*]
- return value !== undefined ? value : key;
- },
- remove: function( owner, key ) {
- var i, name, camel,
- cache = owner[ this.expando ];
-
- if ( cache === undefined ) {
- return;
- }
-
- if ( key === undefined ) {
- this.register( owner );
-
- } else {
-
- // Support array or space separated string of keys
- if ( jQuery.isArray( key ) ) {
-
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = key.concat( key.map( jQuery.camelCase ) );
- } else {
- camel = jQuery.camelCase( key );
-
- // Try the string as a key before any manipulation
- if ( key in cache ) {
- name = [ key, camel ];
- } else {
-
- // If a key with the spaces exists, use it.
- // Otherwise, create an array by matching non-whitespace
- name = camel;
- name = name in cache ?
- [ name ] : ( name.match( rnotwhite ) || [] );
- }
- }
-
- i = name.length;
-
- while ( i-- ) {
- delete cache[ name[ i ] ];
- }
- }
-
- // Remove the expando if there's no more data
- if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
-
- // Support: Chrome <= 35-45+
- // Webkit & Blink performance suffers when deleting properties
- // from DOM nodes, so set to undefined instead
- // https://code.google.com/p/chromium/issues/detail?id=378607
- if ( owner.nodeType ) {
- owner[ this.expando ] = undefined;
- } else {
- delete owner[ this.expando ];
- }
- }
- },
- hasData: function( owner ) {
- var cache = owner[ this.expando ];
- return cache !== undefined && !jQuery.isEmptyObject( cache );
- }
-};
-var dataPriv = new Data();
-
-var dataUser = new Data();
-
-
-
-// Implementation Summary
-//
-// 1. Enforce API surface and semantic compatibility with 1.9.x branch
-// 2. Improve the module's maintainability by reducing the storage
-// paths to a single mechanism.
-// 3. Use the same single mechanism to support "private" and "user" data.
-// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
-// 5. Avoid exposing implementation details on user objects (eg. expando properties)
-// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
-
-var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
- rmultiDash = /[A-Z]/g;
-
-function dataAttr( elem, key, data ) {
- var name;
-
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
- name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
-
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch ( e ) {}
-
- // Make sure we set the data so it isn't changed later
- dataUser.set( elem, key, data );
- } else {
- data = undefined;
- }
- }
- return data;
-}
-
-jQuery.extend( {
- hasData: function( elem ) {
- return dataUser.hasData( elem ) || dataPriv.hasData( elem );
- },
-
- data: function( elem, name, data ) {
- return dataUser.access( elem, name, data );
- },
-
- removeData: function( elem, name ) {
- dataUser.remove( elem, name );
- },
-
- // TODO: Now that all calls to _data and _removeData have been replaced
- // with direct calls to dataPriv methods, these can be deprecated.
- _data: function( elem, name, data ) {
- return dataPriv.access( elem, name, data );
- },
-
- _removeData: function( elem, name ) {
- dataPriv.remove( elem, name );
- }
-} );
-
-jQuery.fn.extend( {
- data: function( key, value ) {
- var i, name, data,
- elem = this[ 0 ],
- attrs = elem && elem.attributes;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = dataUser.get( elem );
-
- if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
- i = attrs.length;
- while ( i-- ) {
-
- // Support: IE11+
- // The attrs elements can be null (#14894)
- if ( attrs[ i ] ) {
- name = attrs[ i ].name;
- if ( name.indexOf( "data-" ) === 0 ) {
- name = jQuery.camelCase( name.slice( 5 ) );
- dataAttr( elem, name, data[ name ] );
- }
- }
- }
- dataPriv.set( elem, "hasDataAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each( function() {
- dataUser.set( this, key );
- } );
- }
-
- return access( this, function( value ) {
- var data, camelKey;
-
- // The calling jQuery object (element matches) is not empty
- // (and therefore has an element appears at this[ 0 ]) and the
- // `value` parameter was not undefined. An empty jQuery object
- // will result in `undefined` for elem = this[ 0 ] which will
- // throw an exception if an attempt to read a data cache is made.
- if ( elem && value === undefined ) {
-
- // Attempt to get data from the cache
- // with the key as-is
- data = dataUser.get( elem, key ) ||
-
- // Try to find dashed key if it exists (gh-2779)
- // This is for 2.2.x only
- dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() );
-
- if ( data !== undefined ) {
- return data;
- }
-
- camelKey = jQuery.camelCase( key );
-
- // Attempt to get data from the cache
- // with the key camelized
- data = dataUser.get( elem, camelKey );
- if ( data !== undefined ) {
- return data;
- }
-
- // Attempt to "discover" the data in
- // HTML5 custom data-* attrs
- data = dataAttr( elem, camelKey, undefined );
- if ( data !== undefined ) {
- return data;
- }
-
- // We tried really hard, but the data doesn't exist.
- return;
- }
-
- // Set the data...
- camelKey = jQuery.camelCase( key );
- this.each( function() {
-
- // First, attempt to store a copy or reference of any
- // data that might've been store with a camelCased key.
- var data = dataUser.get( this, camelKey );
-
- // For HTML5 data-* attribute interop, we have to
- // store property names with dashes in a camelCase form.
- // This might not apply to all properties...*
- dataUser.set( this, camelKey, value );
-
- // *... In the case of properties that might _actually_
- // have dashes, we need to also store a copy of that
- // unchanged property.
- if ( key.indexOf( "-" ) > -1 && data !== undefined ) {
- dataUser.set( this, key, value );
- }
- } );
- }, null, value, arguments.length > 1, null, true );
- },
-
- removeData: function( key ) {
- return this.each( function() {
- dataUser.remove( this, key );
- } );
- }
-} );
-
-
-jQuery.extend( {
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = dataPriv.get( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray( data ) ) {
- queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // Clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // Not public - generate a queueHooks object, or return the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
- empty: jQuery.Callbacks( "once memory" ).add( function() {
- dataPriv.remove( elem, [ type + "queue", key ] );
- } )
- } );
- }
-} );
-
-jQuery.fn.extend( {
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[ 0 ], type );
- }
-
- return data === undefined ?
- this :
- this.each( function() {
- var queue = jQuery.queue( this, type, data );
-
- // Ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- } );
- },
- dequeue: function( type ) {
- return this.each( function() {
- jQuery.dequeue( this, type );
- } );
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
-
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while ( i-- ) {
- tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-} );
-var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
-
-var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
-
-
-var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
-
-var isHidden = function( elem, el ) {
-
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" ||
- !jQuery.contains( elem.ownerDocument, elem );
- };
-
-
-
-function adjustCSS( elem, prop, valueParts, tween ) {
- var adjusted,
- scale = 1,
- maxIterations = 20,
- currentValue = tween ?
- function() { return tween.cur(); } :
- function() { return jQuery.css( elem, prop, "" ); },
- initial = currentValue(),
- unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
-
- // Starting value computation is required for potential unit mismatches
- initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
- rcssNum.exec( jQuery.css( elem, prop ) );
-
- if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
-
- // Trust units reported by jQuery.css
- unit = unit || initialInUnit[ 3 ];
-
- // Make sure we update the tween properties later on
- valueParts = valueParts || [];
-
- // Iteratively approximate from a nonzero starting point
- initialInUnit = +initial || 1;
-
- do {
-
- // If previous iteration zeroed out, double until we get *something*.
- // Use string for doubling so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- initialInUnit = initialInUnit / scale;
- jQuery.style( elem, prop, initialInUnit + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // Break the loop if scale is unchanged or perfect, or if we've just had enough.
- } while (
- scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
- );
- }
-
- if ( valueParts ) {
- initialInUnit = +initialInUnit || +initial || 0;
-
- // Apply relative offset (+=/-=) if specified
- adjusted = valueParts[ 1 ] ?
- initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
- +valueParts[ 2 ];
- if ( tween ) {
- tween.unit = unit;
- tween.start = initialInUnit;
- tween.end = adjusted;
- }
- }
- return adjusted;
-}
-var rcheckableType = ( /^(?:checkbox|radio)$/i );
-
-var rtagName = ( /<([\w:-]+)/ );
-
-var rscriptType = ( /^$|\/(?:java|ecma)script/i );
-
-
-
-// We have to close these tags to support XHTML (#13200)
-var wrapMap = {
-
- // Support: IE9
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
-
- // XHTML parsers do not magically insert elements in the
- // same way that tag soup parsers do. So we cannot shorten
- // this by omitting <tbody> or other required elements.
- thead: [ 1, "<table>", "</table>" ],
- col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
-
- _default: [ 0, "", "" ]
-};
-
-// Support: IE9
-wrapMap.optgroup = wrapMap.option;
-
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-
-function getAll( context, tag ) {
-
- // Support: IE9-11+
- // Use typeof to avoid zero-argument method invocation on host objects (#15151)
- var ret = typeof context.getElementsByTagName !== "undefined" ?
- context.getElementsByTagName( tag || "*" ) :
- typeof context.querySelectorAll !== "undefined" ?
- context.querySelectorAll( tag || "*" ) :
- [];
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], ret ) :
- ret;
-}
-
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
- var i = 0,
- l = elems.length;
-
- for ( ; i < l; i++ ) {
- dataPriv.set(
- elems[ i ],
- "globalEval",
- !refElements || dataPriv.get( refElements[ i ], "globalEval" )
- );
- }
-}
-
-
-var rhtml = /<|&#?\w+;/;
-
-function buildFragment( elems, context, scripts, selection, ignored ) {
- var elem, tmp, tag, wrap, contains, j,
- fragment = context.createDocumentFragment(),
- nodes = [],
- i = 0,
- l = elems.length;
-
- for ( ; i < l; i++ ) {
- elem = elems[ i ];
-
- if ( elem || elem === 0 ) {
-
- // Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
-
- // Support: Android<4.1, PhantomJS<2
- // push.apply(_, arraylike) throws on ancient WebKit
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
- // Convert non-html into a text node
- } else if ( !rhtml.test( elem ) ) {
- nodes.push( context.createTextNode( elem ) );
-
- // Convert html into DOM nodes
- } else {
- tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
-
- // Deserialize a standard representation
- tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
- tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
-
- // Descend through wrappers to the right content
- j = wrap[ 0 ];
- while ( j-- ) {
- tmp = tmp.lastChild;
- }
-
- // Support: Android<4.1, PhantomJS<2
- // push.apply(_, arraylike) throws on ancient WebKit
- jQuery.merge( nodes, tmp.childNodes );
-
- // Remember the top-level container
- tmp = fragment.firstChild;
-
- // Ensure the created nodes are orphaned (#12392)
- tmp.textContent = "";
- }
- }
- }
-
- // Remove wrapper from fragment
- fragment.textContent = "";
-
- i = 0;
- while ( ( elem = nodes[ i++ ] ) ) {
-
- // Skip elements already in the context collection (trac-4087)
- if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
- if ( ignored ) {
- ignored.push( elem );
- }
- continue;
- }
-
- contains = jQuery.contains( elem.ownerDocument, elem );
-
- // Append to fragment
- tmp = getAll( fragment.appendChild( elem ), "script" );
-
- // Preserve script evaluation history
- if ( contains ) {
- setGlobalEval( tmp );
- }
-
- // Capture executables
- if ( scripts ) {
- j = 0;
- while ( ( elem = tmp[ j++ ] ) ) {
- if ( rscriptType.test( elem.type || "" ) ) {
- scripts.push( elem );
- }
- }
- }
- }
-
- return fragment;
-}
-
-
-( function() {
- var fragment = document.createDocumentFragment(),
- div = fragment.appendChild( document.createElement( "div" ) ),
- input = document.createElement( "input" );
-
- // Support: Android 4.0-4.3, Safari<=5.1
- // Check state lost if the name is set (#11217)
- // Support: Windows Web Apps (WWA)
- // `name` and `type` must use .setAttribute for WWA (#14901)
- input.setAttribute( "type", "radio" );
- input.setAttribute( "checked", "checked" );
- input.setAttribute( "name", "t" );
-
- div.appendChild( input );
-
- // Support: Safari<=5.1, Android<4.2
- // Older WebKit doesn't clone checked state correctly in fragments
- support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<=11+
- // Make sure textarea (and checkbox) defaultValue is properly cloned
- div.innerHTML = "<textarea>x</textarea>";
- support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
-} )();
-
-
-var
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-// Support: IE9
-// See #13393 for more info
-function safeActiveElement() {
- try {
- return document.activeElement;
- } catch ( err ) { }
-}
-
-function on( elem, types, selector, data, fn, one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
-
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
-
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- on( elem, type, selector, data, types[ type ], one );
- }
- return elem;
- }
-
- if ( data == null && fn == null ) {
-
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
-
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
-
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return elem;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
-
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
-
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return elem.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- } );
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
-
- var handleObjIn, eventHandle, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = dataPriv.get( elem );
-
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !( events = elemData.events ) ) {
- events = elemData.events = {};
- }
- if ( !( eventHandle = elemData.handle ) ) {
- eventHandle = elemData.handle = function( e ) {
-
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
- jQuery.event.dispatch.apply( elem, arguments ) : undefined;
- };
- }
-
- // Handle multiple events separated by a space
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[ t ] ) || [];
- type = origType = tmp[ 1 ];
- namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
-
- // There *must* be a type, no attaching namespace-only handlers
- if ( !type ) {
- continue;
- }
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend( {
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join( "." )
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !( handlers = events[ type ] ) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener if the special events handler returns false
- if ( !special.setup ||
- special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
-
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var j, origCount, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
-
- if ( !elemData || !( events = elemData.events ) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[ t ] ) || [];
- type = origType = tmp[ 1 ];
- namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[ 2 ] &&
- new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector ||
- selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown ||
- special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
-
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove data and the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- dataPriv.remove( elem, "handle events" );
- }
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, j, ret, matched, handleObj,
- handlerQueue = [],
- args = slice.call( arguments ),
- handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[ 0 ] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( ( handleObj = matched.handlers[ j++ ] ) &&
- !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or 2) have namespace(s)
- // a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
- handleObj.handler ).apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( ( event.result = ret ) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var i, matches, sel, handleObj,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Support (at least): Chrome, IE9
- // Find delegate handlers
- // Black-hole SVG <use> instance trees (#13180)
- //
- // Support: Firefox<=42+
- // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
- if ( delegateCount && cur.nodeType &&
- ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
-
- for ( ; cur !== this; cur = cur.parentNode || this ) {
-
- // Don't check non-elements (#13208)
- // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
- if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) {
- matches = [];
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
-
- // Don't conflict with Object.prototype properties (#13203)
- sel = handleObj.selector + " ";
-
- if ( matches[ sel ] === undefined ) {
- matches[ sel ] = handleObj.needsContext ?
- jQuery( sel, this ).index( cur ) > -1 :
- jQuery.find( sel, this, null, [ cur ] ).length;
- }
- if ( matches[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push( { elem: cur, handlers: matches } );
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( delegateCount < handlers.length ) {
- handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );
- }
-
- return handlerQueue;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " +
- "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split( " " ),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " +
- "screenX screenY toElement" ).split( " " ),
- filter: function( event, original ) {
- var eventDoc, doc, body,
- button = original.button;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX +
- ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
- ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY +
- ( doc && doc.scrollTop || body && body.scrollTop || 0 ) -
- ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop, copy,
- type = event.type,
- originalEvent = event,
- fixHook = this.fixHooks[ type ];
-
- if ( !fixHook ) {
- this.fixHooks[ type ] = fixHook =
- rmouseEvent.test( type ) ? this.mouseHooks :
- rkeyEvent.test( type ) ? this.keyHooks :
- {};
- }
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = new jQuery.Event( originalEvent );
-
- i = copy.length;
- while ( i-- ) {
- prop = copy[ i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Support: Cordova 2.5 (WebKit) (#13255)
- // All events should have a target; Cordova deviceready doesn't
- if ( !event.target ) {
- event.target = document;
- }
-
- // Support: Safari 6.0+, Chrome<28
- // Target should not be a text node (#504, #13143)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
- },
-
- special: {
- load: {
-
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
- focus: {
-
- // Fire native event if possible so blur/focus sequence is correct
- trigger: function() {
- if ( this !== safeActiveElement() && this.focus ) {
- this.focus();
- return false;
- }
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- if ( this === safeActiveElement() && this.blur ) {
- this.blur();
- return false;
- }
- },
- delegateType: "focusout"
- },
- click: {
-
- // For checkbox, fire native event so checked state will be right
- trigger: function() {
- if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
- this.click();
- return false;
- }
- },
-
- // For cross-browser consistency, don't fire native .click() on links
- _default: function( event ) {
- return jQuery.nodeName( event.target, "a" );
- }
- },
-
- beforeunload: {
- postDispatch: function( event ) {
-
- // Support: Firefox 20+
- // Firefox doesn't alert if the returnValue field is not set.
- if ( event.result !== undefined && event.originalEvent ) {
- event.originalEvent.returnValue = event.result;
- }
- }
- }
- }
-};
-
-jQuery.removeEvent = function( elem, type, handle ) {
-
- // This "if" is needed for plain objects
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle );
- }
-};
-
-jQuery.Event = function( src, props ) {
-
- // Allow instantiation without the 'new' keyword
- if ( !( this instanceof jQuery.Event ) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = src.defaultPrevented ||
- src.defaultPrevented === undefined &&
-
- // Support: Android<4.0
- src.returnValue === false ?
- returnTrue :
- returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- constructor: jQuery.Event,
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse,
- isSimulated: false,
-
- preventDefault: function() {
- var e = this.originalEvent;
-
- this.isDefaultPrevented = returnTrue;
-
- if ( e && !this.isSimulated ) {
- e.preventDefault();
- }
- },
- stopPropagation: function() {
- var e = this.originalEvent;
-
- this.isPropagationStopped = returnTrue;
-
- if ( e && !this.isSimulated ) {
- e.stopPropagation();
- }
- },
- stopImmediatePropagation: function() {
- var e = this.originalEvent;
-
- this.isImmediatePropagationStopped = returnTrue;
-
- if ( e && !this.isSimulated ) {
- e.stopImmediatePropagation();
- }
-
- this.stopPropagation();
- }
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-// so that event delegation works in jQuery.
-// Do the same for pointerenter/pointerleave and pointerover/pointerout
-//
-// Support: Safari 7 only
-// Safari sends mouseenter too often; see:
-// https://code.google.com/p/chromium/issues/detail?id=470258
-// for the description of the bug (it existed in older Chrome versions as well).
-jQuery.each( {
- mouseenter: "mouseover",
- mouseleave: "mouseout",
- pointerenter: "pointerover",
- pointerleave: "pointerout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var ret,
- target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj;
-
- // For mouseenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-} );
-
-jQuery.fn.extend( {
- on: function( types, selector, data, fn ) {
- return on( this, types, selector, data, fn );
- },
- one: function( types, selector, data, fn ) {
- return on( this, types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- var handleObj, type;
- if ( types && types.preventDefault && types.handleObj ) {
-
- // ( event ) dispatched jQuery.Event
- handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ?
- handleObj.origType + "." + handleObj.namespace :
- handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
-
- // ( types-object [, selector] )
- for ( type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
-
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each( function() {
- jQuery.event.remove( this, types, fn, selector );
- } );
- }
-} );
-
-
-var
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
-
- // Support: IE 10-11, Edge 10240+
- // In IE/Edge using regex groups here causes severe slowdowns.
- // See https://connect.microsoft.com/IE/feedback/details/1736512/
- rnoInnerhtml = /<script|<style|<link/i,
-
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptTypeMasked = /^true\/(.*)/,
- rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
-
-// Manipulating tables requires a tbody
-function manipulationTarget( elem, content ) {
- return jQuery.nodeName( elem, "table" ) &&
- jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
-
- elem.getElementsByTagName( "tbody" )[ 0 ] ||
- elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) :
- elem;
-}
-
-// Replace/restore the type attribute of script elements for safe DOM manipulation
-function disableScript( elem ) {
- elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
- return elem;
-}
-function restoreScript( elem ) {
- var match = rscriptTypeMasked.exec( elem.type );
-
- if ( match ) {
- elem.type = match[ 1 ];
- } else {
- elem.removeAttribute( "type" );
- }
-
- return elem;
-}
-
-function cloneCopyEvent( src, dest ) {
- var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
-
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- // 1. Copy private data: events, handlers, etc.
- if ( dataPriv.hasData( src ) ) {
- pdataOld = dataPriv.access( src );
- pdataCur = dataPriv.set( dest, pdataOld );
- events = pdataOld.events;
-
- if ( events ) {
- delete pdataCur.handle;
- pdataCur.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ] );
- }
- }
- }
- }
-
- // 2. Copy user data
- if ( dataUser.hasData( src ) ) {
- udataOld = dataUser.access( src );
- udataCur = jQuery.extend( {}, udataOld );
-
- dataUser.set( dest, udataCur );
- }
-}
-
-// Fix IE bugs, see support tests
-function fixInput( src, dest ) {
- var nodeName = dest.nodeName.toLowerCase();
-
- // Fails to persist the checked state of a cloned checkbox or radio button.
- if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
- dest.checked = src.checked;
-
- // Fails to return the selected option to the default selected state when cloning options
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
- }
-}
-
-function domManip( collection, args, callback, ignored ) {
-
- // Flatten any nested arrays
- args = concat.apply( [], args );
-
- var fragment, first, scripts, hasScripts, node, doc,
- i = 0,
- l = collection.length,
- iNoClone = l - 1,
- value = args[ 0 ],
- isFunction = jQuery.isFunction( value );
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( isFunction ||
- ( l > 1 && typeof value === "string" &&
- !support.checkClone && rchecked.test( value ) ) ) {
- return collection.each( function( index ) {
- var self = collection.eq( index );
- if ( isFunction ) {
- args[ 0 ] = value.call( this, index, self.html() );
- }
- domManip( self, args, callback, ignored );
- } );
- }
-
- if ( l ) {
- fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
- first = fragment.firstChild;
-
- if ( fragment.childNodes.length === 1 ) {
- fragment = first;
- }
-
- // Require either new content or an interest in ignored elements to invoke the callback
- if ( first || ignored ) {
- scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
- hasScripts = scripts.length;
-
- // Use the original fragment for the last item
- // instead of the first because it can end up
- // being emptied incorrectly in certain situations (#8070).
- for ( ; i < l; i++ ) {
- node = fragment;
-
- if ( i !== iNoClone ) {
- node = jQuery.clone( node, true, true );
-
- // Keep references to cloned scripts for later restoration
- if ( hasScripts ) {
-
- // Support: Android<4.1, PhantomJS<2
- // push.apply(_, arraylike) throws on ancient WebKit
- jQuery.merge( scripts, getAll( node, "script" ) );
- }
- }
-
- callback.call( collection[ i ], node, i );
- }
-
- if ( hasScripts ) {
- doc = scripts[ scripts.length - 1 ].ownerDocument;
-
- // Reenable scripts
- jQuery.map( scripts, restoreScript );
-
- // Evaluate executable scripts on first document insertion
- for ( i = 0; i < hasScripts; i++ ) {
- node = scripts[ i ];
- if ( rscriptType.test( node.type || "" ) &&
- !dataPriv.access( node, "globalEval" ) &&
- jQuery.contains( doc, node ) ) {
-
- if ( node.src ) {
-
- // Optional AJAX dependency, but won't run scripts if not present
- if ( jQuery._evalUrl ) {
- jQuery._evalUrl( node.src );
- }
- } else {
- jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
- }
- }
- }
- }
- }
- }
-
- return collection;
-}
-
-function remove( elem, selector, keepData ) {
- var node,
- nodes = selector ? jQuery.filter( selector, elem ) : elem,
- i = 0;
-
- for ( ; ( node = nodes[ i ] ) != null; i++ ) {
- if ( !keepData && node.nodeType === 1 ) {
- jQuery.cleanData( getAll( node ) );
- }
-
- if ( node.parentNode ) {
- if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
- setGlobalEval( getAll( node, "script" ) );
- }
- node.parentNode.removeChild( node );
- }
- }
-
- return elem;
-}
-
-jQuery.extend( {
- htmlPrefilter: function( html ) {
- return html.replace( rxhtmlTag, "<$1></$2>" );
- },
-
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var i, l, srcElements, destElements,
- clone = elem.cloneNode( true ),
- inPage = jQuery.contains( elem.ownerDocument, elem );
-
- // Fix IE cloning issues
- if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
- !jQuery.isXMLDoc( elem ) ) {
-
- // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
- destElements = getAll( clone );
- srcElements = getAll( elem );
-
- for ( i = 0, l = srcElements.length; i < l; i++ ) {
- fixInput( srcElements[ i ], destElements[ i ] );
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- if ( deepDataAndEvents ) {
- srcElements = srcElements || getAll( elem );
- destElements = destElements || getAll( clone );
-
- for ( i = 0, l = srcElements.length; i < l; i++ ) {
- cloneCopyEvent( srcElements[ i ], destElements[ i ] );
- }
- } else {
- cloneCopyEvent( elem, clone );
- }
- }
-
- // Preserve script evaluation history
- destElements = getAll( clone, "script" );
- if ( destElements.length > 0 ) {
- setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
- }
-
- // Return the cloned set
- return clone;
- },
-
- cleanData: function( elems ) {
- var data, elem, type,
- special = jQuery.event.special,
- i = 0;
-
- for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
- if ( acceptData( elem ) ) {
- if ( ( data = elem[ dataPriv.expando ] ) ) {
- if ( data.events ) {
- for ( type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
- }
-
- // Support: Chrome <= 35-45+
- // Assign undefined instead of using delete, see Data#remove
- elem[ dataPriv.expando ] = undefined;
- }
- if ( elem[ dataUser.expando ] ) {
-
- // Support: Chrome <= 35-45+
- // Assign undefined instead of using delete, see Data#remove
- elem[ dataUser.expando ] = undefined;
- }
- }
- }
- }
-} );
-
-jQuery.fn.extend( {
-
- // Keep domManip exposed until 3.0 (gh-2225)
- domManip: domManip,
-
- detach: function( selector ) {
- return remove( this, selector, true );
- },
-
- remove: function( selector ) {
- return remove( this, selector );
- },
-
- text: function( value ) {
- return access( this, function( value ) {
- return value === undefined ?
- jQuery.text( this ) :
- this.empty().each( function() {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- this.textContent = value;
- }
- } );
- }, null, value, arguments.length );
- },
-
- append: function() {
- return domManip( this, arguments, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- var target = manipulationTarget( this, elem );
- target.appendChild( elem );
- }
- } );
- },
-
- prepend: function() {
- return domManip( this, arguments, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- var target = manipulationTarget( this, elem );
- target.insertBefore( elem, target.firstChild );
- }
- } );
- },
-
- before: function() {
- return domManip( this, arguments, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this );
- }
- } );
- },
-
- after: function() {
- return domManip( this, arguments, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- }
- } );
- },
-
- empty: function() {
- var elem,
- i = 0;
-
- for ( ; ( elem = this[ i ] ) != null; i++ ) {
- if ( elem.nodeType === 1 ) {
-
- // Prevent memory leaks
- jQuery.cleanData( getAll( elem, false ) );
-
- // Remove any remaining nodes
- elem.textContent = "";
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map( function() {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- } );
- },
-
- html: function( value ) {
- return access( this, function( value ) {
- var elem = this[ 0 ] || {},
- i = 0,
- l = this.length;
-
- if ( value === undefined && elem.nodeType === 1 ) {
- return elem.innerHTML;
- }
-
- // See if we can take a shortcut and just use innerHTML
- if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
-
- value = jQuery.htmlPrefilter( value );
-
- try {
- for ( ; i < l; i++ ) {
- elem = this[ i ] || {};
-
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- elem.innerHTML = value;
- }
- }
-
- elem = 0;
-
- // If using innerHTML throws an exception, use the fallback method
- } catch ( e ) {}
- }
-
- if ( elem ) {
- this.empty().append( value );
- }
- }, null, value, arguments.length );
- },
-
- replaceWith: function() {
- var ignored = [];
-
- // Make the changes, replacing each non-ignored context element with the new content
- return domManip( this, arguments, function( elem ) {
- var parent = this.parentNode;
-
- if ( jQuery.inArray( this, ignored ) < 0 ) {
- jQuery.cleanData( getAll( this ) );
- if ( parent ) {
- parent.replaceChild( elem, this );
- }
- }
-
- // Force callback invocation
- }, ignored );
- }
-} );
-
-jQuery.each( {
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var elems,
- ret = [],
- insert = jQuery( selector ),
- last = insert.length - 1,
- i = 0;
-
- for ( ; i <= last; i++ ) {
- elems = i === last ? this : this.clone( true );
- jQuery( insert[ i ] )[ original ]( elems );
-
- // Support: QtWebKit
- // .get() because push.apply(_, arraylike) throws
- push.apply( ret, elems.get() );
- }
-
- return this.pushStack( ret );
- };
-} );
-
-
-var iframe,
- elemdisplay = {
-
- // Support: Firefox
- // We have to pre-define these values for FF (#10227)
- HTML: "block",
- BODY: "block"
- };
-
-/**
- * Retrieve the actual display of a element
- * @param {String} name nodeName of the element
- * @param {Object} doc Document object
- */
-
-// Called only from within defaultDisplay
-function actualDisplay( name, doc ) {
- var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
-
- display = jQuery.css( elem[ 0 ], "display" );
-
- // We don't have any data stored on the element,
- // so use "detach" method as fast way to get rid of the element
- elem.detach();
-
- return display;
-}
-
-/**
- * Try to determine the default display value of an element
- * @param {String} nodeName
- */
-function defaultDisplay( nodeName ) {
- var doc = document,
- display = elemdisplay[ nodeName ];
-
- if ( !display ) {
- display = actualDisplay( nodeName, doc );
-
- // If the simple way fails, read from inside an iframe
- if ( display === "none" || !display ) {
-
- // Use the already-created iframe if possible
- iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) )
- .appendTo( doc.documentElement );
-
- // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
- doc = iframe[ 0 ].contentDocument;
-
- // Support: IE
- doc.write();
- doc.close();
-
- display = actualDisplay( nodeName, doc );
- iframe.detach();
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
- }
-
- return display;
-}
-var rmargin = ( /^margin/ );
-
-var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
-
-var getStyles = function( elem ) {
-
- // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
- // IE throws on elements created in popups
- // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
- var view = elem.ownerDocument.defaultView;
-
- if ( !view || !view.opener ) {
- view = window;
- }
-
- return view.getComputedStyle( elem );
- };
-
-var swap = function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
-};
-
-
-var documentElement = document.documentElement;
-
-
-
-( function() {
- var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
- container = document.createElement( "div" ),
- div = document.createElement( "div" );
-
- // Finish early in limited (non-browser) environments
- if ( !div.style ) {
- return;
- }
-
- // Support: IE9-11+
- // Style of cloned element affects source element cloned (#8908)
- div.style.backgroundClip = "content-box";
- div.cloneNode( true ).style.backgroundClip = "";
- support.clearCloneStyle = div.style.backgroundClip === "content-box";
-
- container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
- "padding:0;margin-top:1px;position:absolute";
- container.appendChild( div );
-
- // Executing both pixelPosition & boxSizingReliable tests require only one layout
- // so they're executed at the same time to save the second computation.
- function computeStyleTests() {
- div.style.cssText =
-
- // Support: Firefox<29, Android 2.3
- // Vendor-prefix box-sizing
- "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;" +
- "position:relative;display:block;" +
- "margin:auto;border:1px;padding:1px;" +
- "top:1%;width:50%";
- div.innerHTML = "";
- documentElement.appendChild( container );
-
- var divStyle = window.getComputedStyle( div );
- pixelPositionVal = divStyle.top !== "1%";
- reliableMarginLeftVal = divStyle.marginLeft === "2px";
- boxSizingReliableVal = divStyle.width === "4px";
-
- // Support: Android 4.0 - 4.3 only
- // Some styles come back with percentage values, even though they shouldn't
- div.style.marginRight = "50%";
- pixelMarginRightVal = divStyle.marginRight === "4px";
-
- documentElement.removeChild( container );
- }
-
- jQuery.extend( support, {
- pixelPosition: function() {
-
- // This test is executed only once but we still do memoizing
- // since we can use the boxSizingReliable pre-computing.
- // No need to check if the test was already performed, though.
- computeStyleTests();
- return pixelPositionVal;
- },
- boxSizingReliable: function() {
- if ( boxSizingReliableVal == null ) {
- computeStyleTests();
- }
- return boxSizingReliableVal;
- },
- pixelMarginRight: function() {
-
- // Support: Android 4.0-4.3
- // We're checking for boxSizingReliableVal here instead of pixelMarginRightVal
- // since that compresses better and they're computed together anyway.
- if ( boxSizingReliableVal == null ) {
- computeStyleTests();
- }
- return pixelMarginRightVal;
- },
- reliableMarginLeft: function() {
-
- // Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
- if ( boxSizingReliableVal == null ) {
- computeStyleTests();
- }
- return reliableMarginLeftVal;
- },
- reliableMarginRight: function() {
-
- // Support: Android 2.3
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. (#3333)
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // This support function is only executed once so no memoizing is needed.
- var ret,
- marginDiv = div.appendChild( document.createElement( "div" ) );
-
- // Reset CSS: box-sizing; display; margin; border; padding
- marginDiv.style.cssText = div.style.cssText =
-
- // Support: Android 2.3
- // Vendor-prefix box-sizing
- "-webkit-box-sizing:content-box;box-sizing:content-box;" +
- "display:block;margin:0;border:0;padding:0";
- marginDiv.style.marginRight = marginDiv.style.width = "0";
- div.style.width = "1px";
- documentElement.appendChild( container );
-
- ret = !parseFloat( window.getComputedStyle( marginDiv ).marginRight );
-
- documentElement.removeChild( container );
- div.removeChild( marginDiv );
-
- return ret;
- }
- } );
-} )();
-
-
-function curCSS( elem, name, computed ) {
- var width, minWidth, maxWidth, ret,
- style = elem.style;
-
- computed = computed || getStyles( elem );
- ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
-
- // Support: Opera 12.1x only
- // Fall back to style even without computed
- // computed is undefined for elems on document fragments
- if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {
- ret = jQuery.style( elem, name );
- }
-
- // Support: IE9
- // getPropertyValue is only needed for .css('filter') (#12537)
- if ( computed ) {
-
- // A tribute to the "awesome hack by Dean Edwards"
- // Android Browser returns percentage for some values,
- // but width seems to be reliably pixels.
- // This is against the CSSOM draft spec:
- // http://dev.w3.org/csswg/cssom/#resolved-values
- if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
-
- // Remember the original values
- width = style.width;
- minWidth = style.minWidth;
- maxWidth = style.maxWidth;
-
- // Put in the new values to get a computed value out
- style.minWidth = style.maxWidth = style.width = ret;
- ret = computed.width;
-
- // Revert the changed values
- style.width = width;
- style.minWidth = minWidth;
- style.maxWidth = maxWidth;
- }
- }
-
- return ret !== undefined ?
-
- // Support: IE9-11+
- // IE returns zIndex value as an integer.
- ret + "" :
- ret;
-}
-
-
-function addGetHookIf( conditionFn, hookFn ) {
-
- // Define the hook, we'll check on the first run if it's really needed.
- return {
- get: function() {
- if ( conditionFn() ) {
-
- // Hook not needed (or it's not possible to use it due
- // to missing dependency), remove it.
- delete this.get;
- return;
- }
-
- // Hook needed; redefine it so that the support test is not executed again.
- return ( this.get = hookFn ).apply( this, arguments );
- }
- };
-}
-
-
-var
-
- // Swappable if display is none or starts with table
- // except "table", "table-cell", or "table-caption"
- // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
- rdisplayswap = /^(none|table(?!-c[ea]).+)/,
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
- cssNormalTransform = {
- letterSpacing: "0",
- fontWeight: "400"
- },
-
- cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
- emptyStyle = document.createElement( "div" ).style;
-
-// Return a css property mapped to a potentially vendor prefixed property
-function vendorPropName( name ) {
-
- // Shortcut for names that are not vendor prefixed
- if ( name in emptyStyle ) {
- return name;
- }
-
- // Check for vendor prefixed names
- var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
- i = cssPrefixes.length;
-
- while ( i-- ) {
- name = cssPrefixes[ i ] + capName;
- if ( name in emptyStyle ) {
- return name;
- }
- }
-}
-
-function setPositiveNumber( elem, value, subtract ) {
-
- // Any relative (+/-) values have already been
- // normalized at this point
- var matches = rcssNum.exec( value );
- return matches ?
-
- // Guard against undefined "subtract", e.g., when used as in cssHooks
- Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
- value;
-}
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
- var i = extra === ( isBorderBox ? "border" : "content" ) ?
-
- // If we already have the right measurement, avoid augmentation
- 4 :
-
- // Otherwise initialize for horizontal or vertical properties
- name === "width" ? 1 : 0,
-
- val = 0;
-
- for ( ; i < 4; i += 2 ) {
-
- // Both box models exclude margin, so add it if we want it
- if ( extra === "margin" ) {
- val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
- }
-
- if ( isBorderBox ) {
-
- // border-box includes padding, so remove it if we want content
- if ( extra === "content" ) {
- val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
- }
-
- // At this point, extra isn't border nor margin, so remove border
- if ( extra !== "margin" ) {
- val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- } else {
-
- // At this point, extra isn't content, so add padding
- val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
-
- // At this point, extra isn't content nor padding, so add border
- if ( extra !== "padding" ) {
- val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- }
- }
-
- return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
-
- // Start with offset property, which is equivalent to the border-box value
- var valueIsBorderBox = true,
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- styles = getStyles( elem ),
- isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
-
- // Some non-html elements return undefined for offsetWidth, so check for null/undefined
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
- if ( val <= 0 || val == null ) {
-
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name, styles );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test( val ) ) {
- return val;
- }
-
- // Check for style in case a browser which returns unreliable values
- // for getComputedStyle silently falls back to the reliable elem.style
- valueIsBorderBox = isBorderBox &&
- ( support.boxSizingReliable() || val === elem.style[ name ] );
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
- }
-
- // Use the active box-sizing model to add/subtract irrelevant styles
- return ( val +
- augmentWidthOrHeight(
- elem,
- name,
- extra || ( isBorderBox ? "border" : "content" ),
- valueIsBorderBox,
- styles
- )
- ) + "px";
-}
-
-function showHide( elements, show ) {
- var display, elem, hidden,
- values = [],
- index = 0,
- length = elements.length;
-
- for ( ; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
-
- values[ index ] = dataPriv.get( elem, "olddisplay" );
- display = elem.style.display;
- if ( show ) {
-
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !values[ index ] && display === "none" ) {
- elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( elem.style.display === "" && isHidden( elem ) ) {
- values[ index ] = dataPriv.access(
- elem,
- "olddisplay",
- defaultDisplay( elem.nodeName )
- );
- }
- } else {
- hidden = isHidden( elem );
-
- if ( display !== "none" || !hidden ) {
- dataPriv.set(
- elem,
- "olddisplay",
- hidden ? display : jQuery.css( elem, "display" )
- );
- }
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( index = 0; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
- elem.style.display = show ? values[ index ] || "" : "none";
- }
- }
-
- return elements;
-}
-
-jQuery.extend( {
-
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
-
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity" );
- return ret === "" ? "1" : ret;
- }
- }
- }
- },
-
- // Don't automatically add "px" to these possibly-unitless properties
- cssNumber: {
- "animationIterationCount": true,
- "columnCount": true,
- "fillOpacity": true,
- "flexGrow": true,
- "flexShrink": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "order": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- "float": "cssFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
-
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, hooks,
- origName = jQuery.camelCase( name ),
- style = elem.style;
-
- name = jQuery.cssProps[ origName ] ||
- ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
-
- // Gets hook for the prefixed version, then unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // Convert "+=" or "-=" to relative numbers (#7345)
- if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
- value = adjustCSS( elem, name, ret );
-
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that null and NaN values aren't set (#7116)
- if ( value == null || value !== value ) {
- return;
- }
-
- // If a number was passed in, add the unit (except for certain CSS properties)
- if ( type === "number" ) {
- value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
- }
-
- // Support: IE9-11+
- // background-* props affect original clone's values
- if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
- style[ name ] = "inherit";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !( "set" in hooks ) ||
- ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
-
- style[ name ] = value;
- }
-
- } else {
-
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks &&
- ( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
-
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, extra, styles ) {
- var val, num, hooks,
- origName = jQuery.camelCase( name );
-
- // Make sure that we're working with the right name
- name = jQuery.cssProps[ origName ] ||
- ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
-
- // Try prefixed name followed by the unprefixed name
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks ) {
- val = hooks.get( elem, true, extra );
- }
-
- // Otherwise, if a way to get the computed value exists, use that
- if ( val === undefined ) {
- val = curCSS( elem, name, styles );
- }
-
- // Convert "normal" to computed value
- if ( val === "normal" && name in cssNormalTransform ) {
- val = cssNormalTransform[ name ];
- }
-
- // Make numeric if forced or a qualifier was provided and val looks numeric
- if ( extra === "" || extra ) {
- num = parseFloat( val );
- return extra === true || isFinite( num ) ? num || 0 : val;
- }
- return val;
- }
-} );
-
-jQuery.each( [ "height", "width" ], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- if ( computed ) {
-
- // Certain elements can have dimension info if we invisibly show them
- // but it must have a current display style that would benefit
- return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
- elem.offsetWidth === 0 ?
- swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- } ) :
- getWidthOrHeight( elem, name, extra );
- }
- },
-
- set: function( elem, value, extra ) {
- var matches,
- styles = extra && getStyles( elem ),
- subtract = extra && augmentWidthOrHeight(
- elem,
- name,
- extra,
- jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
- styles
- );
-
- // Convert to pixels if value adjustment is needed
- if ( subtract && ( matches = rcssNum.exec( value ) ) &&
- ( matches[ 3 ] || "px" ) !== "px" ) {
-
- elem.style[ name ] = value;
- value = jQuery.css( elem, name );
- }
-
- return setPositiveNumber( elem, value, subtract );
- }
- };
-} );
-
-jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
- function( elem, computed ) {
- if ( computed ) {
- return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
- elem.getBoundingClientRect().left -
- swap( elem, { marginLeft: 0 }, function() {
- return elem.getBoundingClientRect().left;
- } )
- ) + "px";
- }
- }
-);
-
-// Support: Android 2.3
-jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
- function( elem, computed ) {
- if ( computed ) {
- return swap( elem, { "display": "inline-block" },
- curCSS, [ elem, "marginRight" ] );
- }
- }
-);
-
-// These hooks are used by animate to expand properties
-jQuery.each( {
- margin: "",
- padding: "",
- border: "Width"
-}, function( prefix, suffix ) {
- jQuery.cssHooks[ prefix + suffix ] = {
- expand: function( value ) {
- var i = 0,
- expanded = {},
-
- // Assumes a single number if not a string
- parts = typeof value === "string" ? value.split( " " ) : [ value ];
-
- for ( ; i < 4; i++ ) {
- expanded[ prefix + cssExpand[ i ] + suffix ] =
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
- }
-
- return expanded;
- }
- };
-
- if ( !rmargin.test( prefix ) ) {
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
- }
-} );
-
-jQuery.fn.extend( {
- css: function( name, value ) {
- return access( this, function( elem, name, value ) {
- var styles, len,
- map = {},
- i = 0;
-
- if ( jQuery.isArray( name ) ) {
- styles = getStyles( elem );
- len = name.length;
-
- for ( ; i < len; i++ ) {
- map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
- }
-
- return map;
- }
-
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- }, name, value, arguments.length > 1 );
- },
- show: function() {
- return showHide( this, true );
- },
- hide: function() {
- return showHide( this );
- },
- toggle: function( state ) {
- if ( typeof state === "boolean" ) {
- return state ? this.show() : this.hide();
- }
-
- return this.each( function() {
- if ( isHidden( this ) ) {
- jQuery( this ).show();
- } else {
- jQuery( this ).hide();
- }
- } );
- }
-} );
-
-
-function Tween( elem, options, prop, end, easing ) {
- return new Tween.prototype.init( elem, options, prop, end, easing );
-}
-jQuery.Tween = Tween;
-
-Tween.prototype = {
- constructor: Tween,
- init: function( elem, options, prop, end, easing, unit ) {
- this.elem = elem;
- this.prop = prop;
- this.easing = easing || jQuery.easing._default;
- this.options = options;
- this.start = this.now = this.cur();
- this.end = end;
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
- },
- cur: function() {
- var hooks = Tween.propHooks[ this.prop ];
-
- return hooks && hooks.get ?
- hooks.get( this ) :
- Tween.propHooks._default.get( this );
- },
- run: function( percent ) {
- var eased,
- hooks = Tween.propHooks[ this.prop ];
-
- if ( this.options.duration ) {
- this.pos = eased = jQuery.easing[ this.easing ](
- percent, this.options.duration * percent, 0, 1, this.options.duration
- );
- } else {
- this.pos = eased = percent;
- }
- this.now = ( this.end - this.start ) * eased + this.start;
-
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- if ( hooks && hooks.set ) {
- hooks.set( this );
- } else {
- Tween.propHooks._default.set( this );
- }
- return this;
- }
-};
-
-Tween.prototype.init.prototype = Tween.prototype;
-
-Tween.propHooks = {
- _default: {
- get: function( tween ) {
- var result;
-
- // Use a property on the element directly when it is not a DOM element,
- // or when there is no matching style property that exists.
- if ( tween.elem.nodeType !== 1 ||
- tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
- return tween.elem[ tween.prop ];
- }
-
- // Passing an empty string as a 3rd parameter to .css will automatically
- // attempt a parseFloat and fallback to a string if the parse fails.
- // Simple values such as "10px" are parsed to Float;
- // complex values such as "rotate(1rad)" are returned as-is.
- result = jQuery.css( tween.elem, tween.prop, "" );
-
- // Empty strings, null, undefined and "auto" are converted to 0.
- return !result || result === "auto" ? 0 : result;
- },
- set: function( tween ) {
-
- // Use step hook for back compat.
- // Use cssHook if its there.
- // Use .style if available and use plain properties where available.
- if ( jQuery.fx.step[ tween.prop ] ) {
- jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.nodeType === 1 &&
- ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
- jQuery.cssHooks[ tween.prop ] ) ) {
- jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
- } else {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
- }
-};
-
-// Support: IE9
-// Panic based approach to setting things on disconnected nodes
-Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
- set: function( tween ) {
- if ( tween.elem.nodeType && tween.elem.parentNode ) {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
-};
-
-jQuery.easing = {
- linear: function( p ) {
- return p;
- },
- swing: function( p ) {
- return 0.5 - Math.cos( p * Math.PI ) / 2;
- },
- _default: "swing"
-};
-
-jQuery.fx = Tween.prototype.init;
-
-// Back Compat <1.8 extension point
-jQuery.fx.step = {};
-
-
-
-
-var
- fxNow, timerId,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rrun = /queueHooks$/;
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- window.setTimeout( function() {
- fxNow = undefined;
- } );
- return ( fxNow = jQuery.now() );
-}
-
-// Generate parameters to create a standard animation
-function genFx( type, includeWidth ) {
- var which,
- i = 0,
- attrs = { height: type };
-
- // If we include width, step value is 1 to do all cssExpand values,
- // otherwise step value is 2 to skip over Left and Right
- includeWidth = includeWidth ? 1 : 0;
- for ( ; i < 4 ; i += 2 - includeWidth ) {
- which = cssExpand[ i ];
- attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
- }
-
- if ( includeWidth ) {
- attrs.opacity = attrs.width = type;
- }
-
- return attrs;
-}
-
-function createTween( value, prop, animation ) {
- var tween,
- collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
- index = 0,
- length = collection.length;
- for ( ; index < length; index++ ) {
- if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
-
- // We're done with this property
- return tween;
- }
- }
-}
-
-function defaultPrefilter( elem, props, opts ) {
- /* jshint validthis: true */
- var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
- anim = this,
- orig = {},
- style = elem.style,
- hidden = elem.nodeType && isHidden( elem ),
- dataShow = dataPriv.get( elem, "fxshow" );
-
- // Handle queue: false promises
- if ( !opts.queue ) {
- hooks = jQuery._queueHooks( elem, "fx" );
- if ( hooks.unqueued == null ) {
- hooks.unqueued = 0;
- oldfire = hooks.empty.fire;
- hooks.empty.fire = function() {
- if ( !hooks.unqueued ) {
- oldfire();
- }
- };
- }
- hooks.unqueued++;
-
- anim.always( function() {
-
- // Ensure the complete handler is called before this completes
- anim.always( function() {
- hooks.unqueued--;
- if ( !jQuery.queue( elem, "fx" ).length ) {
- hooks.empty.fire();
- }
- } );
- } );
- }
-
- // Height/width overflow pass
- if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
-
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE9-10 do not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- display = jQuery.css( elem, "display" );
-
- // Test default display if display is currently "none"
- checkDisplay = display === "none" ?
- dataPriv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
-
- if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
- style.display = "inline-block";
- }
- }
-
- if ( opts.overflow ) {
- style.overflow = "hidden";
- anim.always( function() {
- style.overflow = opts.overflow[ 0 ];
- style.overflowX = opts.overflow[ 1 ];
- style.overflowY = opts.overflow[ 2 ];
- } );
- }
-
- // show/hide pass
- for ( prop in props ) {
- value = props[ prop ];
- if ( rfxtypes.exec( value ) ) {
- delete props[ prop ];
- toggle = toggle || value === "toggle";
- if ( value === ( hidden ? "hide" : "show" ) ) {
-
- // If there is dataShow left over from a stopped hide or show
- // and we are going to proceed with show, we should pretend to be hidden
- if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
- hidden = true;
- } else {
- continue;
- }
- }
- orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
-
- // Any non-fx value stops us from restoring the original display value
- } else {
- display = undefined;
- }
- }
-
- if ( !jQuery.isEmptyObject( orig ) ) {
- if ( dataShow ) {
- if ( "hidden" in dataShow ) {
- hidden = dataShow.hidden;
- }
- } else {
- dataShow = dataPriv.access( elem, "fxshow", {} );
- }
-
- // Store state if its toggle - enables .stop().toggle() to "reverse"
- if ( toggle ) {
- dataShow.hidden = !hidden;
- }
- if ( hidden ) {
- jQuery( elem ).show();
- } else {
- anim.done( function() {
- jQuery( elem ).hide();
- } );
- }
- anim.done( function() {
- var prop;
-
- dataPriv.remove( elem, "fxshow" );
- for ( prop in orig ) {
- jQuery.style( elem, prop, orig[ prop ] );
- }
- } );
- for ( prop in orig ) {
- tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
-
- if ( !( prop in dataShow ) ) {
- dataShow[ prop ] = tween.start;
- if ( hidden ) {
- tween.end = tween.start;
- tween.start = prop === "width" || prop === "height" ? 1 : 0;
- }
- }
- }
-
- // If this is a noop like .hide().hide(), restore an overwritten display value
- } else if ( ( display === "none" ? defaultDisplay( elem.nodeName ) : display ) === "inline" ) {
- style.display = display;
- }
-}
-
-function propFilter( props, specialEasing ) {
- var index, name, easing, value, hooks;
-
- // camelCase, specialEasing and expand cssHook pass
- for ( index in props ) {
- name = jQuery.camelCase( index );
- easing = specialEasing[ name ];
- value = props[ index ];
- if ( jQuery.isArray( value ) ) {
- easing = value[ 1 ];
- value = props[ index ] = value[ 0 ];
- }
-
- if ( index !== name ) {
- props[ name ] = value;
- delete props[ index ];
- }
-
- hooks = jQuery.cssHooks[ name ];
- if ( hooks && "expand" in hooks ) {
- value = hooks.expand( value );
- delete props[ name ];
-
- // Not quite $.extend, this won't overwrite existing keys.
- // Reusing 'index' because we have the correct "name"
- for ( index in value ) {
- if ( !( index in props ) ) {
- props[ index ] = value[ index ];
- specialEasing[ index ] = easing;
- }
- }
- } else {
- specialEasing[ name ] = easing;
- }
- }
-}
-
-function Animation( elem, properties, options ) {
- var result,
- stopped,
- index = 0,
- length = Animation.prefilters.length,
- deferred = jQuery.Deferred().always( function() {
-
- // Don't match elem in the :animated selector
- delete tick.elem;
- } ),
- tick = function() {
- if ( stopped ) {
- return false;
- }
- var currentTime = fxNow || createFxNow(),
- remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
-
- // Support: Android 2.3
- // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
- temp = remaining / animation.duration || 0,
- percent = 1 - temp,
- index = 0,
- length = animation.tweens.length;
-
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( percent );
- }
-
- deferred.notifyWith( elem, [ animation, percent, remaining ] );
-
- if ( percent < 1 && length ) {
- return remaining;
- } else {
- deferred.resolveWith( elem, [ animation ] );
- return false;
- }
- },
- animation = deferred.promise( {
- elem: elem,
- props: jQuery.extend( {}, properties ),
- opts: jQuery.extend( true, {
- specialEasing: {},
- easing: jQuery.easing._default
- }, options ),
- originalProperties: properties,
- originalOptions: options,
- startTime: fxNow || createFxNow(),
- duration: options.duration,
- tweens: [],
- createTween: function( prop, end ) {
- var tween = jQuery.Tween( elem, animation.opts, prop, end,
- animation.opts.specialEasing[ prop ] || animation.opts.easing );
- animation.tweens.push( tween );
- return tween;
- },
- stop: function( gotoEnd ) {
- var index = 0,
-
- // If we are going to the end, we want to run all the tweens
- // otherwise we skip this part
- length = gotoEnd ? animation.tweens.length : 0;
- if ( stopped ) {
- return this;
- }
- stopped = true;
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( 1 );
- }
-
- // Resolve when we played the last frame; otherwise, reject
- if ( gotoEnd ) {
- deferred.notifyWith( elem, [ animation, 1, 0 ] );
- deferred.resolveWith( elem, [ animation, gotoEnd ] );
- } else {
- deferred.rejectWith( elem, [ animation, gotoEnd ] );
- }
- return this;
- }
- } ),
- props = animation.props;
-
- propFilter( props, animation.opts.specialEasing );
-
- for ( ; index < length ; index++ ) {
- result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
- if ( result ) {
- if ( jQuery.isFunction( result.stop ) ) {
- jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
- jQuery.proxy( result.stop, result );
- }
- return result;
- }
- }
-
- jQuery.map( props, createTween, animation );
-
- if ( jQuery.isFunction( animation.opts.start ) ) {
- animation.opts.start.call( elem, animation );
- }
-
- jQuery.fx.timer(
- jQuery.extend( tick, {
- elem: elem,
- anim: animation,
- queue: animation.opts.queue
- } )
- );
-
- // attach callbacks from options
- return animation.progress( animation.opts.progress )
- .done( animation.opts.done, animation.opts.complete )
- .fail( animation.opts.fail )
- .always( animation.opts.always );
-}
-
-jQuery.Animation = jQuery.extend( Animation, {
- tweeners: {
- "*": [ function( prop, value ) {
- var tween = this.createTween( prop, value );
- adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
- return tween;
- } ]
- },
-
- tweener: function( props, callback ) {
- if ( jQuery.isFunction( props ) ) {
- callback = props;
- props = [ "*" ];
- } else {
- props = props.match( rnotwhite );
- }
-
- var prop,
- index = 0,
- length = props.length;
-
- for ( ; index < length ; index++ ) {
- prop = props[ index ];
- Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
- Animation.tweeners[ prop ].unshift( callback );
- }
- },
-
- prefilters: [ defaultPrefilter ],
-
- prefilter: function( callback, prepend ) {
- if ( prepend ) {
- Animation.prefilters.unshift( callback );
- } else {
- Animation.prefilters.push( callback );
- }
- }
-} );
-
-jQuery.speed = function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ?
- opt.duration : opt.duration in jQuery.fx.speeds ?
- jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // Normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function() {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- }
- };
-
- return opt;
-};
-
-jQuery.fn.extend( {
- fadeTo: function( speed, to, easing, callback ) {
-
- // Show any hidden elements after setting opacity to 0
- return this.filter( isHidden ).css( "opacity", 0 ).show()
-
- // Animate to the value specified
- .end().animate( { opacity: to }, speed, easing, callback );
- },
- animate: function( prop, speed, easing, callback ) {
- var empty = jQuery.isEmptyObject( prop ),
- optall = jQuery.speed( speed, easing, callback ),
- doAnimation = function() {
-
- // Operate on a copy of prop so per-property easing won't be lost
- var anim = Animation( this, jQuery.extend( {}, prop ), optall );
-
- // Empty animations, or finishing resolves immediately
- if ( empty || dataPriv.get( this, "finish" ) ) {
- anim.stop( true );
- }
- };
- doAnimation.finish = doAnimation;
-
- return empty || optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
- stop: function( type, clearQueue, gotoEnd ) {
- var stopQueue = function( hooks ) {
- var stop = hooks.stop;
- delete hooks.stop;
- stop( gotoEnd );
- };
-
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each( function() {
- var dequeue = true,
- index = type != null && type + "queueHooks",
- timers = jQuery.timers,
- data = dataPriv.get( this );
-
- if ( index ) {
- if ( data[ index ] && data[ index ].stop ) {
- stopQueue( data[ index ] );
- }
- } else {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
- stopQueue( data[ index ] );
- }
- }
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this &&
- ( type == null || timers[ index ].queue === type ) ) {
-
- timers[ index ].anim.stop( gotoEnd );
- dequeue = false;
- timers.splice( index, 1 );
- }
- }
-
- // Start the next in the queue if the last step wasn't forced.
- // Timers currently will call their complete callbacks, which
- // will dequeue but only if they were gotoEnd.
- if ( dequeue || !gotoEnd ) {
- jQuery.dequeue( this, type );
- }
- } );
- },
- finish: function( type ) {
- if ( type !== false ) {
- type = type || "fx";
- }
- return this.each( function() {
- var index,
- data = dataPriv.get( this ),
- queue = data[ type + "queue" ],
- hooks = data[ type + "queueHooks" ],
- timers = jQuery.timers,
- length = queue ? queue.length : 0;
-
- // Enable finishing flag on private data
- data.finish = true;
-
- // Empty the queue first
- jQuery.queue( this, type, [] );
-
- if ( hooks && hooks.stop ) {
- hooks.stop.call( this, true );
- }
-
- // Look for any active animations, and finish them
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
- timers[ index ].anim.stop( true );
- timers.splice( index, 1 );
- }
- }
-
- // Look for any animations in the old queue and finish them
- for ( index = 0; index < length; index++ ) {
- if ( queue[ index ] && queue[ index ].finish ) {
- queue[ index ].finish.call( this );
- }
- }
-
- // Turn off finishing flag
- delete data.finish;
- } );
- }
-} );
-
-jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
- var cssFn = jQuery.fn[ name ];
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return speed == null || typeof speed === "boolean" ?
- cssFn.apply( this, arguments ) :
- this.animate( genFx( name, true ), speed, easing, callback );
- };
-} );
-
-// Generate shortcuts for custom animations
-jQuery.each( {
- slideDown: genFx( "show" ),
- slideUp: genFx( "hide" ),
- slideToggle: genFx( "toggle" ),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-} );
-
-jQuery.timers = [];
-jQuery.fx.tick = function() {
- var timer,
- i = 0,
- timers = jQuery.timers;
-
- fxNow = jQuery.now();
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
-
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- fxNow = undefined;
-};
-
-jQuery.fx.timer = function( timer ) {
- jQuery.timers.push( timer );
- if ( timer() ) {
- jQuery.fx.start();
- } else {
- jQuery.timers.pop();
- }
-};
-
-jQuery.fx.interval = 13;
-jQuery.fx.start = function() {
- if ( !timerId ) {
- timerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
- }
-};
-
-jQuery.fx.stop = function() {
- window.clearInterval( timerId );
-
- timerId = null;
-};
-
-jQuery.fx.speeds = {
- slow: 600,
- fast: 200,
-
- // Default speed
- _default: 400
-};
-
-
-// Based off of the plugin by Clint Helfers, with permission.
-// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
-jQuery.fn.delay = function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = window.setTimeout( next, time );
- hooks.stop = function() {
- window.clearTimeout( timeout );
- };
- } );
-};
-
-
-( function() {
- var input = document.createElement( "input" ),
- select = document.createElement( "select" ),
- opt = select.appendChild( document.createElement( "option" ) );
-
- input.type = "checkbox";
-
- // Support: iOS<=5.1, Android<=4.2+
- // Default value for a checkbox should be "on"
- support.checkOn = input.value !== "";
-
- // Support: IE<=11+
- // Must access selectedIndex to make default options select
- support.optSelected = opt.selected;
-
- // Support: Android<=2.3
- // Options inside disabled selects are incorrectly marked as disabled
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Support: IE<=11+
- // An input loses its value after becoming a radio
- input = document.createElement( "input" );
- input.value = "t";
- input.type = "radio";
- support.radioValue = input.value === "t";
-} )();
-
-
-var boolHook,
- attrHandle = jQuery.expr.attrHandle;
-
-jQuery.fn.extend( {
- attr: function( name, value ) {
- return access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each( function() {
- jQuery.removeAttr( this, name );
- } );
- }
-} );
-
-jQuery.extend( {
- attr: function( elem, name, value ) {
- var ret, hooks,
- nType = elem.nodeType;
-
- // Don't get/set attributes on text, comment and attribute nodes
- if ( nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === "undefined" ) {
- return jQuery.prop( elem, name, value );
- }
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] ||
- ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
- }
-
- if ( value !== undefined ) {
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
- return;
- }
-
- if ( hooks && "set" in hooks &&
- ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
- return ret;
- }
-
- elem.setAttribute( name, value + "" );
- return value;
- }
-
- if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
- return ret;
- }
-
- ret = jQuery.find.attr( elem, name );
-
- // Non-existent attributes return null, we normalize to undefined
- return ret == null ? undefined : ret;
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- if ( !support.radioValue && value === "radio" &&
- jQuery.nodeName( elem, "input" ) ) {
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- }
- },
-
- removeAttr: function( elem, value ) {
- var name, propName,
- i = 0,
- attrNames = value && value.match( rnotwhite );
-
- if ( attrNames && elem.nodeType === 1 ) {
- while ( ( name = attrNames[ i++ ] ) ) {
- propName = jQuery.propFix[ name ] || name;
-
- // Boolean attributes get special treatment (#10870)
- if ( jQuery.expr.match.bool.test( name ) ) {
-
- // Set corresponding property to false
- elem[ propName ] = false;
- }
-
- elem.removeAttribute( name );
- }
- }
- }
-} );
-
-// Hooks for boolean attributes
-boolHook = {
- set: function( elem, value, name ) {
- if ( value === false ) {
-
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else {
- elem.setAttribute( name, name );
- }
- return name;
- }
-};
-jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
- var getter = attrHandle[ name ] || jQuery.find.attr;
-
- attrHandle[ name ] = function( elem, name, isXML ) {
- var ret, handle;
- if ( !isXML ) {
-
- // Avoid an infinite loop by temporarily removing this function from the getter
- handle = attrHandle[ name ];
- attrHandle[ name ] = ret;
- ret = getter( elem, name, isXML ) != null ?
- name.toLowerCase() :
- null;
- attrHandle[ name ] = handle;
- }
- return ret;
- };
-} );
-
-
-
-
-var rfocusable = /^(?:input|select|textarea|button)$/i,
- rclickable = /^(?:a|area)$/i;
-
-jQuery.fn.extend( {
- prop: function( name, value ) {
- return access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- return this.each( function() {
- delete this[ jQuery.propFix[ name ] || name ];
- } );
- }
-} );
-
-jQuery.extend( {
- prop: function( elem, name, value ) {
- var ret, hooks,
- nType = elem.nodeType;
-
- // Don't get/set properties on text, comment and attribute nodes
- if ( nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
-
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- if ( hooks && "set" in hooks &&
- ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
- return ret;
- }
-
- return ( elem[ name ] = value );
- }
-
- if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
- return ret;
- }
-
- return elem[ name ];
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
-
- // elem.tabIndex doesn't always return the
- // correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- // Use proper attribute retrieval(#12072)
- var tabindex = jQuery.find.attr( elem, "tabindex" );
-
- return tabindex ?
- parseInt( tabindex, 10 ) :
- rfocusable.test( elem.nodeName ) ||
- rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- -1;
- }
- }
- },
-
- propFix: {
- "for": "htmlFor",
- "class": "className"
- }
-} );
-
-// Support: IE <=11 only
-// Accessing the selectedIndex property
-// forces the browser to respect setting selected
-// on the option
-// The getter ensures a default option is selected
-// when in an optgroup
-if ( !support.optSelected ) {
- jQuery.propHooks.selected = {
- get: function( elem ) {
- var parent = elem.parentNode;
- if ( parent && parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- return null;
- },
- set: function( elem ) {
- var parent = elem.parentNode;
- if ( parent ) {
- parent.selectedIndex;
-
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- }
- };
-}
-
-jQuery.each( [
- "tabIndex",
- "readOnly",
- "maxLength",
- "cellSpacing",
- "cellPadding",
- "rowSpan",
- "colSpan",
- "useMap",
- "frameBorder",
- "contentEditable"
-], function() {
- jQuery.propFix[ this.toLowerCase() ] = this;
-} );
-
-
-
-
-var rclass = /[\t\r\n\f]/g;
-
-function getClass( elem ) {
- return elem.getAttribute && elem.getAttribute( "class" ) || "";
-}
-
-jQuery.fn.extend( {
- addClass: function( value ) {
- var classes, elem, cur, curValue, clazz, j, finalValue,
- i = 0;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each( function( j ) {
- jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
- } );
- }
-
- if ( typeof value === "string" && value ) {
- classes = value.match( rnotwhite ) || [];
-
- while ( ( elem = this[ i++ ] ) ) {
- curValue = getClass( elem );
- cur = elem.nodeType === 1 &&
- ( " " + curValue + " " ).replace( rclass, " " );
-
- if ( cur ) {
- j = 0;
- while ( ( clazz = classes[ j++ ] ) ) {
- if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
- cur += clazz + " ";
- }
- }
-
- // Only assign if different to avoid unneeded rendering.
- finalValue = jQuery.trim( cur );
- if ( curValue !== finalValue ) {
- elem.setAttribute( "class", finalValue );
- }
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classes, elem, cur, curValue, clazz, j, finalValue,
- i = 0;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each( function( j ) {
- jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
- } );
- }
-
- if ( !arguments.length ) {
- return this.attr( "class", "" );
- }
-
- if ( typeof value === "string" && value ) {
- classes = value.match( rnotwhite ) || [];
-
- while ( ( elem = this[ i++ ] ) ) {
- curValue = getClass( elem );
-
- // This expression is here for better compressibility (see addClass)
- cur = elem.nodeType === 1 &&
- ( " " + curValue + " " ).replace( rclass, " " );
-
- if ( cur ) {
- j = 0;
- while ( ( clazz = classes[ j++ ] ) ) {
-
- // Remove *all* instances
- while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
- cur = cur.replace( " " + clazz + " ", " " );
- }
- }
-
- // Only assign if different to avoid unneeded rendering.
- finalValue = jQuery.trim( cur );
- if ( curValue !== finalValue ) {
- elem.setAttribute( "class", finalValue );
- }
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value;
-
- if ( typeof stateVal === "boolean" && type === "string" ) {
- return stateVal ? this.addClass( value ) : this.removeClass( value );
- }
-
- if ( jQuery.isFunction( value ) ) {
- return this.each( function( i ) {
- jQuery( this ).toggleClass(
- value.call( this, i, getClass( this ), stateVal ),
- stateVal
- );
- } );
- }
-
- return this.each( function() {
- var className, i, self, classNames;
-
- if ( type === "string" ) {
-
- // Toggle individual class names
- i = 0;
- self = jQuery( this );
- classNames = value.match( rnotwhite ) || [];
-
- while ( ( className = classNames[ i++ ] ) ) {
-
- // Check each className given, space separated list
- if ( self.hasClass( className ) ) {
- self.removeClass( className );
- } else {
- self.addClass( className );
- }
- }
-
- // Toggle whole class name
- } else if ( value === undefined || type === "boolean" ) {
- className = getClass( this );
- if ( className ) {
-
- // Store className if set
- dataPriv.set( this, "__className__", className );
- }
-
- // If the element has a class name or if we're passed `false`,
- // then remove the whole classname (if there was one, the above saved it).
- // Otherwise bring back whatever was previously saved (if anything),
- // falling back to the empty string if nothing was stored.
- if ( this.setAttribute ) {
- this.setAttribute( "class",
- className || value === false ?
- "" :
- dataPriv.get( this, "__className__" ) || ""
- );
- }
- }
- } );
- },
-
- hasClass: function( selector ) {
- var className, elem,
- i = 0;
-
- className = " " + selector + " ";
- while ( ( elem = this[ i++ ] ) ) {
- if ( elem.nodeType === 1 &&
- ( " " + getClass( elem ) + " " ).replace( rclass, " " )
- .indexOf( className ) > -1
- ) {
- return true;
- }
- }
-
- return false;
- }
-} );
-
-
-
-
-var rreturn = /\r/g,
- rspaces = /[\x20\t\r\n\f]+/g;
-
-jQuery.fn.extend( {
- val: function( value ) {
- var hooks, ret, isFunction,
- elem = this[ 0 ];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] ||
- jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks &&
- "get" in hooks &&
- ( ret = hooks.get( elem, "value" ) ) !== undefined
- ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
-
- // Handle most common string cases
- ret.replace( rreturn, "" ) :
-
- // Handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each( function( i ) {
- var val;
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, jQuery( this ).val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
-
- } else if ( typeof val === "number" ) {
- val += "";
-
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map( val, function( value ) {
- return value == null ? "" : value + "";
- } );
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- } );
- }
-} );
-
-jQuery.extend( {
- valHooks: {
- option: {
- get: function( elem ) {
-
- var val = jQuery.find.attr( elem, "value" );
- return val != null ?
- val :
-
- // Support: IE10-11+
- // option.text throws exceptions (#14686, #14858)
- // Strip and collapse whitespace
- // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
- jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
- }
- },
- select: {
- get: function( elem ) {
- var value, option,
- options = elem.options,
- index = elem.selectedIndex,
- one = elem.type === "select-one" || index < 0,
- values = one ? null : [],
- max = one ? index + 1 : options.length,
- i = index < 0 ?
- max :
- one ? index : 0;
-
- // Loop through all the selected options
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // IE8-9 doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
-
- // Don't return options that are disabled or in a disabled optgroup
- ( support.optDisabled ?
- !option.disabled : option.getAttribute( "disabled" ) === null ) &&
- ( !option.parentNode.disabled ||
- !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var optionSet, option,
- options = elem.options,
- values = jQuery.makeArray( value ),
- i = options.length;
-
- while ( i-- ) {
- option = options[ i ];
- if ( option.selected =
- jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
- ) {
- optionSet = true;
- }
- }
-
- // Force browsers to behave consistently when non-matching value is set
- if ( !optionSet ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- }
-} );
-
-// Radios and checkboxes getter/setter
-jQuery.each( [ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
- }
- }
- };
- if ( !support.checkOn ) {
- jQuery.valHooks[ this ].get = function( elem ) {
- return elem.getAttribute( "value" ) === null ? "on" : elem.value;
- };
- }
-} );
-
-
-
-
-// Return jQuery for attributes-only inclusion
-
-
-var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
-
-jQuery.extend( jQuery.event, {
-
- trigger: function( event, data, elem, onlyHandlers ) {
-
- var i, cur, tmp, bubbleType, ontype, handle, special,
- eventPath = [ elem || document ],
- type = hasOwn.call( event, "type" ) ? event.type : event,
- namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
-
- cur = tmp = elem = elem || document;
-
- // Don't do events on text and comment nodes
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
- return;
- }
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf( "." ) > -1 ) {
-
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split( "." );
- type = namespaces.shift();
- namespaces.sort();
- }
- ontype = type.indexOf( ":" ) < 0 && "on" + type;
-
- // Caller can pass in a jQuery.Event object, Object, or just an event type string
- event = event[ jQuery.expando ] ?
- event :
- new jQuery.Event( type, typeof event === "object" && event );
-
- // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
- event.isTrigger = onlyHandlers ? 2 : 3;
- event.namespace = namespaces.join( "." );
- event.rnamespace = event.namespace ?
- new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
- null;
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data == null ?
- [ event ] :
- jQuery.makeArray( data, [ event ] );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- if ( !rfocusMorph.test( bubbleType + type ) ) {
- cur = cur.parentNode;
- }
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push( cur );
- tmp = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( tmp === ( elem.ownerDocument || document ) ) {
- eventPath.push( tmp.defaultView || tmp.parentWindow || window );
- }
- }
-
- // Fire handlers on the event path
- i = 0;
- while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
-
- event.type = i > 1 ?
- bubbleType :
- special.bindType || type;
-
- // jQuery handler
- handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
- dataPriv.get( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
-
- // Native handler
- handle = ontype && cur[ ontype ];
- if ( handle && handle.apply && acceptData( cur ) ) {
- event.result = handle.apply( cur, data );
- if ( event.result === false ) {
- event.preventDefault();
- }
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( ( !special._default ||
- special._default.apply( eventPath.pop(), data ) === false ) &&
- acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Don't do default actions on window, that's where global variables be (#6170)
- if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- tmp = elem[ ontype ];
-
- if ( tmp ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- elem[ type ]();
- jQuery.event.triggered = undefined;
-
- if ( tmp ) {
- elem[ ontype ] = tmp;
- }
- }
- }
- }
-
- return event.result;
- },
-
- // Piggyback on a donor event to simulate a different one
- // Used only for `focus(in | out)` events
- simulate: function( type, elem, event ) {
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- {
- type: type,
- isSimulated: true
- }
- );
-
- jQuery.event.trigger( e, null, elem );
- }
-
-} );
-
-jQuery.fn.extend( {
-
- trigger: function( type, data ) {
- return this.each( function() {
- jQuery.event.trigger( type, data, this );
- } );
- },
- triggerHandler: function( type, data ) {
- var elem = this[ 0 ];
- if ( elem ) {
- return jQuery.event.trigger( type, data, elem, true );
- }
- }
-} );
-
-
-jQuery.each( ( "blur focus focusin focusout load resize scroll unload click dblclick " +
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu" ).split( " " ),
- function( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-} );
-
-jQuery.fn.extend( {
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- }
-} );
-
-
-
-
-support.focusin = "onfocusin" in window;
-
-
-// Support: Firefox
-// Firefox doesn't have focus(in | out) events
-// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
-//
-// Support: Chrome, Safari
-// focus(in | out) events fire after focus & blur events,
-// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
-// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
-if ( !support.focusin ) {
- jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler on the document while someone wants focusin/focusout
- var handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- var doc = this.ownerDocument || this,
- attaches = dataPriv.access( doc, fix );
-
- if ( !attaches ) {
- doc.addEventListener( orig, handler, true );
- }
- dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
- },
- teardown: function() {
- var doc = this.ownerDocument || this,
- attaches = dataPriv.access( doc, fix ) - 1;
-
- if ( !attaches ) {
- doc.removeEventListener( orig, handler, true );
- dataPriv.remove( doc, fix );
-
- } else {
- dataPriv.access( doc, fix, attaches );
- }
- }
- };
- } );
-}
-var location = window.location;
-
-var nonce = jQuery.now();
-
-var rquery = ( /\?/ );
-
-
-
-// Support: Android 2.3
-// Workaround failure to string-cast null input
-jQuery.parseJSON = function( data ) {
- return JSON.parse( data + "" );
-};
-
-
-// Cross-browser xml parsing
-jQuery.parseXML = function( data ) {
- var xml;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
-
- // Support: IE9
- try {
- xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
- } catch ( e ) {
- xml = undefined;
- }
-
- if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
-};
-
-
-var
- rhash = /#.*$/,
- rts = /([?&])_=[^&]*/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
-
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = "*/".concat( "*" ),
-
- // Anchor tag for parsing the document origin
- originAnchor = document.createElement( "a" );
- originAnchor.href = location.href;
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- var dataType,
- i = 0,
- dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
-
- if ( jQuery.isFunction( func ) ) {
-
- // For each dataType in the dataTypeExpression
- while ( ( dataType = dataTypes[ i++ ] ) ) {
-
- // Prepend if requested
- if ( dataType[ 0 ] === "+" ) {
- dataType = dataType.slice( 1 ) || "*";
- ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
-
- // Otherwise append
- } else {
- ( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
- }
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
-
- var inspected = {},
- seekingTransport = ( structure === transports );
-
- function inspect( dataType ) {
- var selected;
- inspected[ dataType ] = true;
- jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
- var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
- if ( typeof dataTypeOrTransport === "string" &&
- !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
-
- options.dataTypes.unshift( dataTypeOrTransport );
- inspect( dataTypeOrTransport );
- return false;
- } else if ( seekingTransport ) {
- return !( selected = dataTypeOrTransport );
- }
- } );
- return selected;
- }
-
- return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var key, deep,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
-
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-
- return target;
-}
-
-/* Handles responses to an ajax request:
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
-
- var ct, type, finalDataType, firstDataType,
- contents = s.contents,
- dataTypes = s.dataTypes;
-
- // Remove auto dataType and get content-type in the process
- while ( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
-
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
-
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-/* Chain conversions given the request and the original response
- * Also sets the responseXXX fields on the jqXHR instance
- */
-function ajaxConvert( s, response, jqXHR, isSuccess ) {
- var conv2, current, conv, tmp, prev,
- converters = {},
-
- // Work with a copy of dataTypes in case we need to modify it for conversion
- dataTypes = s.dataTypes.slice();
-
- // Create converters map with lowercased keys
- if ( dataTypes[ 1 ] ) {
- for ( conv in s.converters ) {
- converters[ conv.toLowerCase() ] = s.converters[ conv ];
- }
- }
-
- current = dataTypes.shift();
-
- // Convert to each sequential dataType
- while ( current ) {
-
- if ( s.responseFields[ current ] ) {
- jqXHR[ s.responseFields[ current ] ] = response;
- }
-
- // Apply the dataFilter if provided
- if ( !prev && isSuccess && s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- prev = current;
- current = dataTypes.shift();
-
- if ( current ) {
-
- // There's only work to do if current dataType is non-auto
- if ( current === "*" ) {
-
- current = prev;
-
- // Convert response if prev dataType is non-auto and differs from current
- } else if ( prev !== "*" && prev !== current ) {
-
- // Seek a direct converter
- conv = converters[ prev + " " + current ] || converters[ "* " + current ];
-
- // If none found, seek a pair
- if ( !conv ) {
- for ( conv2 in converters ) {
-
- // If conv2 outputs current
- tmp = conv2.split( " " );
- if ( tmp[ 1 ] === current ) {
-
- // If prev can be converted to accepted input
- conv = converters[ prev + " " + tmp[ 0 ] ] ||
- converters[ "* " + tmp[ 0 ] ];
- if ( conv ) {
-
- // Condense equivalence converters
- if ( conv === true ) {
- conv = converters[ conv2 ];
-
- // Otherwise, insert the intermediate dataType
- } else if ( converters[ conv2 ] !== true ) {
- current = tmp[ 0 ];
- dataTypes.unshift( tmp[ 1 ] );
- }
- break;
- }
- }
- }
- }
-
- // Apply converter (if not an equivalence)
- if ( conv !== true ) {
-
- // Unless errors are allowed to bubble, catch and return them
- if ( conv && s.throws ) {
- response = conv( response );
- } else {
- try {
- response = conv( response );
- } catch ( e ) {
- return {
- state: "parsererror",
- error: conv ? e : "No conversion from " + prev + " to " + current
- };
- }
- }
- }
- }
- }
- }
-
- return { state: "success", data: response };
-}
-
-jQuery.extend( {
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {},
-
- ajaxSettings: {
- url: location.href,
- type: "GET",
- isLocal: rlocalProtocol.test( location.protocol ),
- global: true,
- processData: true,
- async: true,
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- throws: false,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- "*": allTypes,
- text: "text/plain",
- html: "text/html",
- xml: "application/xml, text/xml",
- json: "application/json, text/javascript"
- },
-
- contents: {
- xml: /\bxml\b/,
- html: /\bhtml/,
- json: /\bjson\b/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText",
- json: "responseJSON"
- },
-
- // Data converters
- // Keys separate source (or catchall "*") and destination types with a single space
- converters: {
-
- // Convert anything to text
- "* text": String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- url: true,
- context: true
- }
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- return settings ?
-
- // Building a settings object
- ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
-
- // Extending ajaxSettings
- ajaxExtend( jQuery.ajaxSettings, target );
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var transport,
-
- // URL without anti-cache param
- cacheURL,
-
- // Response headers
- responseHeadersString,
- responseHeaders,
-
- // timeout handle
- timeoutTimer,
-
- // Url cleanup var
- urlAnchor,
-
- // To know if global events are to be dispatched
- fireGlobals,
-
- // Loop variable
- i,
-
- // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
-
- // Callbacks context
- callbackContext = s.context || s,
-
- // Context for global events is callbackContext if it is a DOM node or jQuery collection
- globalEventContext = s.context &&
- ( callbackContext.nodeType || callbackContext.jquery ) ?
- jQuery( callbackContext ) :
- jQuery.event,
-
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks( "once memory" ),
-
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
-
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
-
- // The jqXHR state
- state = 0,
-
- // Default abort message
- strAbort = "canceled",
-
- // Fake xhr
- jqXHR = {
- readyState: 0,
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
- responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match == null ? null : match;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- var lname = name.toLowerCase();
- if ( !state ) {
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Status-dependent callbacks
- statusCode: function( map ) {
- var code;
- if ( map ) {
- if ( state < 2 ) {
- for ( code in map ) {
-
- // Lazy-add the new callback in a way that preserves old ones
- statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
- }
- } else {
-
- // Execute the appropriate callbacks
- jqXHR.always( map[ jqXHR.status ] );
- }
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- var finalText = statusText || strAbort;
- if ( transport ) {
- transport.abort( finalText );
- }
- done( 0, finalText );
- return this;
- }
- };
-
- // Attach deferreds
- deferred.promise( jqXHR ).complete = completeDeferred.add;
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (prefilters might expect it)
- // Handle falsy url in the settings object (#10093: consistency with old signature)
- // We also use the url parameter if available
- s.url = ( ( url || s.url || location.href ) + "" ).replace( rhash, "" )
- .replace( rprotocol, location.protocol + "//" );
-
- // Alias method option to type as per ticket #12004
- s.type = options.method || options.type || s.method || s.type;
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
-
- // A cross-domain request is in order when the origin doesn't match the current origin.
- if ( s.crossDomain == null ) {
- urlAnchor = document.createElement( "a" );
-
- // Support: IE8-11+
- // IE throws exception if url is malformed, e.g. http://example.com:80x/
- try {
- urlAnchor.href = s.url;
-
- // Support: IE8-11+
- // Anchor's host property isn't correctly set when s.url is relative
- urlAnchor.href = urlAnchor.href;
- s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
- urlAnchor.protocol + "//" + urlAnchor.host;
- } catch ( e ) {
-
- // If there is an error parsing the URL, assume it is crossDomain,
- // it can be rejected by the transport if it is invalid
- s.crossDomain = true;
- }
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefilter, stop there
- if ( state === 2 ) {
- return jqXHR;
- }
-
- // We can fire global events as of now if asked to
- // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
- fireGlobals = jQuery.event && s.global;
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger( "ajaxStart" );
- }
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Save the URL in case we're toying with the If-Modified-Since
- // and/or If-None-Match header later on
- cacheURL = s.url;
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
-
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
- s.url = rts.test( cacheURL ) ?
-
- // If there is already a '_' parameter, set its value
- cacheURL.replace( rts, "$1_=" + nonce++ ) :
-
- // Otherwise add one to the end
- cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
- }
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- if ( jQuery.lastModified[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
- }
- if ( jQuery.etag[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
- s.accepts[ s.dataTypes[ 0 ] ] +
- ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend &&
- ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
-
- // Abort if not done already and return
- return jqXHR.abort();
- }
-
- // Aborting is no longer a cancellation
- strAbort = "abort";
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
-
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
-
- // If request was aborted inside ajaxSend, stop there
- if ( state === 2 ) {
- return jqXHR;
- }
-
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = window.setTimeout( function() {
- jqXHR.abort( "timeout" );
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch ( e ) {
-
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
-
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- // Callback for when everything is done
- function done( status, nativeStatusText, responses, headers ) {
- var isSuccess, success, error, response, modified,
- statusText = nativeStatusText;
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- window.clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- // Determine if successful
- isSuccess = status >= 200 && status < 300 || status === 304;
-
- // Get response data
- if ( responses ) {
- response = ajaxHandleResponses( s, jqXHR, responses );
- }
-
- // Convert no matter what (that way responseXXX fields are always set)
- response = ajaxConvert( s, response, jqXHR, isSuccess );
-
- // If successful, handle type chaining
- if ( isSuccess ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- modified = jqXHR.getResponseHeader( "Last-Modified" );
- if ( modified ) {
- jQuery.lastModified[ cacheURL ] = modified;
- }
- modified = jqXHR.getResponseHeader( "etag" );
- if ( modified ) {
- jQuery.etag[ cacheURL ] = modified;
- }
- }
-
- // if no content
- if ( status === 204 || s.type === "HEAD" ) {
- statusText = "nocontent";
-
- // if not modified
- } else if ( status === 304 ) {
- statusText = "notmodified";
-
- // If we have data, let's convert it
- } else {
- statusText = response.state;
- success = response.data;
- error = response.error;
- isSuccess = !error;
- }
- } else {
-
- // Extract error from statusText and normalize for non-aborts
- error = statusText;
- if ( status || !statusText ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = ( nativeStatusText || statusText ) + "";
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
-
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger( "ajaxStop" );
- }
- }
- }
-
- return jqXHR;
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- },
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- }
-} );
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
-
- // Shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- // The url can be an options object (which then must have .url)
- return jQuery.ajax( jQuery.extend( {
- url: url,
- type: method,
- dataType: type,
- data: data,
- success: callback
- }, jQuery.isPlainObject( url ) && url ) );
- };
-} );
-
-
-jQuery._evalUrl = function( url ) {
- return jQuery.ajax( {
- url: url,
-
- // Make this explicit, since user can override this through ajaxSetup (#11264)
- type: "GET",
- dataType: "script",
- async: false,
- global: false,
- "throws": true
- } );
-};
-
-
-jQuery.fn.extend( {
- wrapAll: function( html ) {
- var wrap;
-
- if ( jQuery.isFunction( html ) ) {
- return this.each( function( i ) {
- jQuery( this ).wrapAll( html.call( this, i ) );
- } );
- }
-
- if ( this[ 0 ] ) {
-
- // The elements to wrap the target around
- wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
-
- if ( this[ 0 ].parentNode ) {
- wrap.insertBefore( this[ 0 ] );
- }
-
- wrap.map( function() {
- var elem = this;
-
- while ( elem.firstElementChild ) {
- elem = elem.firstElementChild;
- }
-
- return elem;
- } ).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each( function( i ) {
- jQuery( this ).wrapInner( html.call( this, i ) );
- } );
- }
-
- return this.each( function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- } );
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each( function( i ) {
- jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );
- } );
- },
-
- unwrap: function() {
- return this.parent().each( function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- } ).end();
- }
-} );
-
-
-jQuery.expr.filters.hidden = function( elem ) {
- return !jQuery.expr.filters.visible( elem );
-};
-jQuery.expr.filters.visible = function( elem ) {
-
- // Support: Opera <= 12.12
- // Opera reports offsetWidths and offsetHeights less than zero on some elements
- // Use OR instead of AND as the element is not visible if either is true
- // See tickets #10406 and #13132
- return elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0;
-};
-
-
-
-
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
- rsubmittable = /^(?:input|select|textarea|keygen)/i;
-
-function buildParams( prefix, obj, traditional, add ) {
- var name;
-
- if ( jQuery.isArray( obj ) ) {
-
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
-
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
-
- // Item is non-scalar (array or object), encode its numeric index.
- buildParams(
- prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
- v,
- traditional,
- add
- );
- }
- } );
-
- } else if ( !traditional && jQuery.type( obj ) === "object" ) {
-
- // Serialize object item.
- for ( name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
-
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-
-// Serialize an array of form elements or a set of
-// key/values into a query string
-jQuery.param = function( a, traditional ) {
- var prefix,
- s = [],
- add = function( key, value ) {
-
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
-
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- } );
-
- } else {
-
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
-};
-
-jQuery.fn.extend( {
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
- serializeArray: function() {
- return this.map( function() {
-
- // Can add propHook for "elements" to filter or add form elements
- var elements = jQuery.prop( this, "elements" );
- return elements ? jQuery.makeArray( elements ) : this;
- } )
- .filter( function() {
- var type = this.type;
-
- // Use .is( ":disabled" ) so that fieldset[disabled] works
- return this.name && !jQuery( this ).is( ":disabled" ) &&
- rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
- ( this.checked || !rcheckableType.test( type ) );
- } )
- .map( function( i, elem ) {
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val ) {
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- } ) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- } ).get();
- }
-} );
-
-
-jQuery.ajaxSettings.xhr = function() {
- try {
- return new window.XMLHttpRequest();
- } catch ( e ) {}
-};
-
-var xhrSuccessStatus = {
-
- // File protocol always yields status code 0, assume 200
- 0: 200,
-
- // Support: IE9
- // #1450: sometimes IE returns 1223 when it should be 204
- 1223: 204
- },
- xhrSupported = jQuery.ajaxSettings.xhr();
-
-support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
-support.ajax = xhrSupported = !!xhrSupported;
-
-jQuery.ajaxTransport( function( options ) {
- var callback, errorCallback;
-
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( support.cors || xhrSupported && !options.crossDomain ) {
- return {
- send: function( headers, complete ) {
- var i,
- xhr = options.xhr();
-
- xhr.open(
- options.type,
- options.url,
- options.async,
- options.username,
- options.password
- );
-
- // Apply custom fields if provided
- if ( options.xhrFields ) {
- for ( i in options.xhrFields ) {
- xhr[ i ] = options.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( options.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( options.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
- headers[ "X-Requested-With" ] = "XMLHttpRequest";
- }
-
- // Set headers
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
-
- // Callback
- callback = function( type ) {
- return function() {
- if ( callback ) {
- callback = errorCallback = xhr.onload =
- xhr.onerror = xhr.onabort = xhr.onreadystatechange = null;
-
- if ( type === "abort" ) {
- xhr.abort();
- } else if ( type === "error" ) {
-
- // Support: IE9
- // On a manual native abort, IE9 throws
- // errors on any property access that is not readyState
- if ( typeof xhr.status !== "number" ) {
- complete( 0, "error" );
- } else {
- complete(
-
- // File: protocol always yields status 0; see #8605, #14207
- xhr.status,
- xhr.statusText
- );
- }
- } else {
- complete(
- xhrSuccessStatus[ xhr.status ] || xhr.status,
- xhr.statusText,
-
- // Support: IE9 only
- // IE9 has no XHR2 but throws on binary (trac-11426)
- // For XHR2 non-text, let the caller handle it (gh-2498)
- ( xhr.responseType || "text" ) !== "text" ||
- typeof xhr.responseText !== "string" ?
- { binary: xhr.response } :
- { text: xhr.responseText },
- xhr.getAllResponseHeaders()
- );
- }
- }
- };
- };
-
- // Listen to events
- xhr.onload = callback();
- errorCallback = xhr.onerror = callback( "error" );
-
- // Support: IE9
- // Use onreadystatechange to replace onabort
- // to handle uncaught aborts
- if ( xhr.onabort !== undefined ) {
- xhr.onabort = errorCallback;
- } else {
- xhr.onreadystatechange = function() {
-
- // Check readyState before timeout as it changes
- if ( xhr.readyState === 4 ) {
-
- // Allow onerror to be called first,
- // but that will not handle a native abort
- // Also, save errorCallback to a variable
- // as xhr.onerror cannot be accessed
- window.setTimeout( function() {
- if ( callback ) {
- errorCallback();
- }
- } );
- }
- };
- }
-
- // Create the abort callback
- callback = callback( "abort" );
-
- try {
-
- // Do send the request (this may raise an exception)
- xhr.send( options.hasContent && options.data || null );
- } catch ( e ) {
-
- // #14683: Only rethrow if this hasn't been notified as an error yet
- if ( callback ) {
- throw e;
- }
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback();
- }
- }
- };
- }
-} );
-
-
-
-
-// Install script dataType
-jQuery.ajaxSetup( {
- accepts: {
- script: "text/javascript, application/javascript, " +
- "application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /\b(?:java|ecma)script\b/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-} );
-
-// Handle cache's special case and crossDomain
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- }
-} );
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function( s ) {
-
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
- var script, callback;
- return {
- send: function( _, complete ) {
- script = jQuery( "<script>" ).prop( {
- charset: s.scriptCharset,
- src: s.url
- } ).on(
- "load error",
- callback = function( evt ) {
- script.remove();
- callback = null;
- if ( evt ) {
- complete( evt.type === "error" ? 404 : 200, evt.type );
- }
- }
- );
-
- // Use native DOM manipulation to avoid our domManip AJAX trickery
- document.head.appendChild( script[ 0 ] );
- },
- abort: function() {
- if ( callback ) {
- callback();
- }
- }
- };
- }
-} );
-
-
-
-
-var oldCallbacks = [],
- rjsonp = /(=)\?(?=&|$)|\?\?/;
-
-// Default jsonp settings
-jQuery.ajaxSetup( {
- jsonp: "callback",
- jsonpCallback: function() {
- var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
- this[ callback ] = true;
- return callback;
- }
-} );
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var callbackName, overwritten, responseContainer,
- jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
- "url" :
- typeof s.data === "string" &&
- ( s.contentType || "" )
- .indexOf( "application/x-www-form-urlencoded" ) === 0 &&
- rjsonp.test( s.data ) && "data"
- );
-
- // Handle iff the expected data type is "jsonp" or we have a parameter to set
- if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
-
- // Get callback name, remembering preexisting value associated with it
- callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
- s.jsonpCallback() :
- s.jsonpCallback;
-
- // Insert callback into url or form data
- if ( jsonProp ) {
- s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
- } else if ( s.jsonp !== false ) {
- s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
- }
-
- // Use data converter to retrieve json after script execution
- s.converters[ "script json" ] = function() {
- if ( !responseContainer ) {
- jQuery.error( callbackName + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // Force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Install callback
- overwritten = window[ callbackName ];
- window[ callbackName ] = function() {
- responseContainer = arguments;
- };
-
- // Clean-up function (fires after converters)
- jqXHR.always( function() {
-
- // If previous value didn't exist - remove it
- if ( overwritten === undefined ) {
- jQuery( window ).removeProp( callbackName );
-
- // Otherwise restore preexisting value
- } else {
- window[ callbackName ] = overwritten;
- }
-
- // Save back as free
- if ( s[ callbackName ] ) {
-
- // Make sure that re-using the options doesn't screw things around
- s.jsonpCallback = originalSettings.jsonpCallback;
-
- // Save the callback name for future use
- oldCallbacks.push( callbackName );
- }
-
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( overwritten ) ) {
- overwritten( responseContainer[ 0 ] );
- }
-
- responseContainer = overwritten = undefined;
- } );
-
- // Delegate to script
- return "script";
- }
-} );
-
-
-
-
-// Argument "data" should be string of html
-// context (optional): If specified, the fragment will be created in this context,
-// defaults to document
-// keepScripts (optional): If true, will include scripts passed in the html string
-jQuery.parseHTML = function( data, context, keepScripts ) {
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- keepScripts = context;
- context = false;
- }
- context = context || document;
-
- var parsed = rsingleTag.exec( data ),
- scripts = !keepScripts && [];
-
- // Single tag
- if ( parsed ) {
- return [ context.createElement( parsed[ 1 ] ) ];
- }
-
- parsed = buildFragment( [ data ], context, scripts );
-
- if ( scripts && scripts.length ) {
- jQuery( scripts ).remove();
- }
-
- return jQuery.merge( [], parsed.childNodes );
-};
-
-
-// Keep a copy of the old load method
-var _load = jQuery.fn.load;
-
-/**
- * Load a url into a page
- */
-jQuery.fn.load = function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
- }
-
- var selector, type, response,
- self = this,
- off = url.indexOf( " " );
-
- if ( off > -1 ) {
- selector = jQuery.trim( url.slice( off ) );
- url = url.slice( 0, off );
- }
-
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
-
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( params && typeof params === "object" ) {
- type = "POST";
- }
-
- // If we have elements to modify, make the request
- if ( self.length > 0 ) {
- jQuery.ajax( {
- url: url,
-
- // If "type" variable is undefined, then "GET" method will be used.
- // Make value of this field explicit since
- // user can override it through ajaxSetup method
- type: type || "GET",
- dataType: "html",
- data: params
- } ).done( function( responseText ) {
-
- // Save response for use in complete callback
- response = arguments;
-
- self.html( selector ?
-
- // If a selector was specified, locate the right elements in a dummy div
- // Exclude scripts to avoid IE 'Permission Denied' errors
- jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
-
- // Otherwise use the full result
- responseText );
-
- // If the request succeeds, this function gets "data", "status", "jqXHR"
- // but they are ignored because response was set above.
- // If it fails, this function gets "jqXHR", "status", "error"
- } ).always( callback && function( jqXHR, status ) {
- self.each( function() {
- callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
- } );
- } );
- }
-
- return this;
-};
-
-
-
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( [
- "ajaxStart",
- "ajaxStop",
- "ajaxComplete",
- "ajaxError",
- "ajaxSuccess",
- "ajaxSend"
-], function( i, type ) {
- jQuery.fn[ type ] = function( fn ) {
- return this.on( type, fn );
- };
-} );
-
-
-
-
-jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep( jQuery.timers, function( fn ) {
- return elem === fn.elem;
- } ).length;
-};
-
-
-
-
-/**
- * Gets a window from an element
- */
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
-}
-
-jQuery.offset = {
- setOffset: function( elem, options, i ) {
- var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
- position = jQuery.css( elem, "position" ),
- curElem = jQuery( elem ),
- props = {};
-
- // Set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- curOffset = curElem.offset();
- curCSSTop = jQuery.css( elem, "top" );
- curCSSLeft = jQuery.css( elem, "left" );
- calculatePosition = ( position === "absolute" || position === "fixed" ) &&
- ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
-
- // Need to be able to calculate position if either
- // top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
-
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
-
- // Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
- options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
-
- } else {
- curElem.css( props );
- }
- }
-};
-
-jQuery.fn.extend( {
- offset: function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each( function( i ) {
- jQuery.offset.setOffset( this, options, i );
- } );
- }
-
- var docElem, win,
- elem = this[ 0 ],
- box = { top: 0, left: 0 },
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return;
- }
-
- docElem = doc.documentElement;
-
- // Make sure it's not a disconnected DOM node
- if ( !jQuery.contains( docElem, elem ) ) {
- return box;
- }
-
- box = elem.getBoundingClientRect();
- win = getWindow( doc );
- return {
- top: box.top + win.pageYOffset - docElem.clientTop,
- left: box.left + win.pageXOffset - docElem.clientLeft
- };
- },
-
- position: function() {
- if ( !this[ 0 ] ) {
- return;
- }
-
- var offsetParent, offset,
- elem = this[ 0 ],
- parentOffset = { top: 0, left: 0 };
-
- // Fixed elements are offset from window (parentOffset = {top:0, left: 0},
- // because it is its only offset parent
- if ( jQuery.css( elem, "position" ) === "fixed" ) {
-
- // Assume getBoundingClientRect is there when computed position is fixed
- offset = elem.getBoundingClientRect();
-
- } else {
-
- // Get *real* offsetParent
- offsetParent = this.offsetParent();
-
- // Get correct offsets
- offset = this.offset();
- if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
- parentOffset = offsetParent.offset();
- }
-
- // Add offsetParent borders
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
- }
-
- // Subtract parent offsets and element margins
- return {
- top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
- left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
- };
- },
-
- // This method will return documentElement in the following cases:
- // 1) For the element inside the iframe without offsetParent, this method will return
- // documentElement of the parent window
- // 2) For the hidden or detached element
- // 3) For body or html element, i.e. in case of the html node - it will return itself
- //
- // but those exceptions were never presented as a real life use-cases
- // and might be considered as more preferable results.
- //
- // This logic, however, is not guaranteed and can change at any point in the future
- offsetParent: function() {
- return this.map( function() {
- var offsetParent = this.offsetParent;
-
- while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
- offsetParent = offsetParent.offsetParent;
- }
-
- return offsetParent || documentElement;
- } );
- }
-} );
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
- var top = "pageYOffset" === prop;
-
- jQuery.fn[ method ] = function( val ) {
- return access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? win[ prop ] : elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : win.pageXOffset,
- top ? val : win.pageYOffset
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length );
- };
-} );
-
-// Support: Safari<7-8+, Chrome<37-44+
-// Add the top/left cssHooks using jQuery.fn.position
-// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
-// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280
-// getComputedStyle returns percent when specified for top/left/bottom/right;
-// rather than make the css module depend on the offset module, just check for it here
-jQuery.each( [ "top", "left" ], function( i, prop ) {
- jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
- function( elem, computed ) {
- if ( computed ) {
- computed = curCSS( elem, prop );
-
- // If curCSS returns percentage, fallback to offset
- return rnumnonpx.test( computed ) ?
- jQuery( elem ).position()[ prop ] + "px" :
- computed;
- }
- }
- );
-} );
-
-
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
- function( defaultExtra, funcName ) {
-
- // Margin is only for outerHeight, outerWidth
- jQuery.fn[ funcName ] = function( margin, value ) {
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
-
- return access( this, function( elem, type, value ) {
- var doc;
-
- if ( jQuery.isWindow( elem ) ) {
-
- // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
- // isn't a whole lot we can do. See pull request at this URL for discussion:
- // https://github.com/jquery/jquery/pull/764
- return elem.document.documentElement[ "client" + name ];
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- doc = elem.documentElement;
-
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
- // whichever is greatest
- return Math.max(
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
- elem.body[ "offset" + name ], doc[ "offset" + name ],
- doc[ "client" + name ]
- );
- }
-
- return value === undefined ?
-
- // Get width or height on the element, requesting but not forcing parseFloat
- jQuery.css( elem, type, extra ) :
-
- // Set width or height on the element
- jQuery.style( elem, type, value, extra );
- }, type, chainable ? margin : undefined, chainable, null );
- };
- } );
-} );
-
-
-jQuery.fn.extend( {
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
-
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length === 1 ?
- this.off( selector, "**" ) :
- this.off( types, selector || "**", fn );
- },
- size: function() {
- return this.length;
- }
-} );
-
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
-
-
-
-// Register as a named AMD module, since jQuery can be concatenated with other
-// files that may use define, but not via a proper concatenation script that
-// understands anonymous AMD modules. A named AMD is safest and most robust
-// way to register. Lowercase jquery is used because AMD module names are
-// derived from file names, and jQuery is normally delivered in a lowercase
-// file name. Do this after creating the global so that if an AMD module wants
-// to call noConflict to hide this version of jQuery, it will work.
-
-// Note that for maximum portability, libraries that are not jQuery should
-// declare themselves as anonymous modules, and avoid setting a global if an
-// AMD loader is present. jQuery is a special case. For more information, see
-// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
-
-if ( typeof define === "function" && define.amd ) {
- define( "jquery", [], function() {
- return jQuery;
- } );
-}
-
-
-
-var
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$;
-
-jQuery.noConflict = function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
-};
-
-// Expose jQuery and $ identifiers, even in AMD
-// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
-// and CommonJS for browser emulators (#13566)
-if ( !noGlobal ) {
- window.jQuery = window.$ = jQuery;
-}
-
-return jQuery;
-}));
diff --git a/debian/missing-sources/jquery.easypiechart-97b5824.js b/debian/missing-sources/jquery.easypiechart-97b5824.js
deleted file mode 100644
index 5ac3dc1b..00000000
--- a/debian/missing-sources/jquery.easypiechart-97b5824.js
+++ /dev/null
@@ -1,364 +0,0 @@
-/**!
- * easy-pie-chart
- * Lightweight plugin to render simple, animated and retina optimized pie charts
- *
- * @license
- * @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de)
- * @version 2.1.7
- **/
-
-(function (root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module unless amdModuleId is set
- define(["jquery"], function (a0) {
- return (factory(a0));
- });
- } else if (typeof exports === 'object') {
- // Node. Does not work with strict CommonJS, but
- // only CommonJS-like environments that support module.exports,
- // like Node.
- module.exports = factory(require("jquery"));
- } else {
- factory(jQuery);
- }
-}(this, function ($) {
-
-/**
- * Renderer to render the chart on a canvas object
- * @param {DOMElement} el DOM element to host the canvas (root of the plugin)
- * @param {object} options options object of the plugin
- */
-var CanvasRenderer = function(el, options) {
- var cachedBackground;
- var canvas = document.createElement('canvas');
-
- el.appendChild(canvas);
-
- if (typeof(G_vmlCanvasManager) === 'object') {
- G_vmlCanvasManager.initElement(canvas);
- }
-
- var ctx = canvas.getContext('2d');
-
- canvas.width = canvas.height = options.size;
-
- // canvas on retina devices
- var scaleBy = 1;
- if (window.devicePixelRatio > 1) {
- scaleBy = window.devicePixelRatio;
- canvas.style.width = canvas.style.height = [options.size, 'px'].join('');
- canvas.width = canvas.height = options.size * scaleBy;
- ctx.scale(scaleBy, scaleBy);
- }
-
- // move 0,0 coordinates to the center
- ctx.translate(options.size / 2, options.size / 2);
-
- // rotate canvas -90deg
- ctx.rotate((-1 / 2 + options.rotate / 180) * Math.PI);
-
- var radius = (options.size - options.lineWidth) / 2;
- if (options.scaleColor && options.scaleLength) {
- radius -= options.scaleLength + 2; // 2 is the distance between scale and bar
- }
-
- // IE polyfill for Date
- Date.now = Date.now || function() {
- return +(new Date());
- };
-
- /**
- * Draw a circle around the center of the canvas
- * @param {strong} color Valid CSS color string
- * @param {number} lineWidth Width of the line in px
- * @param {number} percent Percentage to draw (float between -1 and 1)
- */
- var drawCircle = function(color, lineWidth, percent) {
- percent = Math.min(Math.max(-1, percent || 0), 1);
- var isNegative = percent <= 0 ? true : false;
-
- ctx.beginPath();
- ctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, isNegative);
-
- ctx.strokeStyle = color;
- ctx.lineWidth = lineWidth;
-
- ctx.stroke();
- };
-
- /**
- * Draw the scale of the chart
- */
- var drawScale = function() {
- var offset;
- var length;
-
- ctx.lineWidth = 1;
- ctx.fillStyle = options.scaleColor;
-
- ctx.save();
- for (var i = 24; i > 0; --i) {
- if (i % 6 === 0) {
- length = options.scaleLength;
- offset = 0;
- } else {
- length = options.scaleLength * 0.6;
- offset = options.scaleLength - length;
- }
- ctx.fillRect(-options.size/2 + offset, 0, length, 1);
- ctx.rotate(Math.PI / 12);
- }
- ctx.restore();
- };
-
- /**
- * Request animation frame wrapper with polyfill
- * @return {function} Request animation frame method or timeout fallback
- */
- var reqAnimationFrame = (function() {
- return window.requestAnimationFrame ||
- window.webkitRequestAnimationFrame ||
- window.mozRequestAnimationFrame ||
- function(callback) {
- window.setTimeout(callback, 1000 / 60);
- };
- }());
-
- /**
- * Draw the background of the plugin including the scale and the track
- */
- var drawBackground = function() {
- if(options.scaleColor) drawScale();
- if(options.trackColor) drawCircle(options.trackColor, options.trackWidth || options.lineWidth, 1);
- };
-
- /**
- * Canvas accessor
- */
- this.getCanvas = function() {
- return canvas;
- };
-
- /**
- * Canvas 2D context 'ctx' accessor
- */
- this.getCtx = function() {
- return ctx;
- };
-
- /**
- * Clear the complete canvas
- */
- this.clear = function() {
- ctx.clearRect(options.size / -2, options.size / -2, options.size, options.size);
- };
-
- /**
- * Draw the complete chart
- * @param {number} percent Percent shown by the chart between -100 and 100
- */
- this.draw = function(percent) {
- // do we need to render a background
- if (!!options.scaleColor || !!options.trackColor) {
- // getImageData and putImageData are supported
- if (ctx.getImageData && ctx.putImageData) {
- if (!cachedBackground) {
- drawBackground();
- cachedBackground = ctx.getImageData(0, 0, options.size * scaleBy, options.size * scaleBy);
- } else {
- ctx.putImageData(cachedBackground, 0, 0);
- }
- } else {
- this.clear();
- drawBackground();
- }
- } else {
- this.clear();
- }
-
- ctx.lineCap = options.lineCap;
-
- // if barcolor is a function execute it and pass the percent as a value
- var color;
- if (typeof(options.barColor) === 'function') {
- color = options.barColor(percent);
- } else {
- color = options.barColor;
- }
-
- // draw bar
- drawCircle(color, options.lineWidth, percent / 100);
- }.bind(this);
-
- /**
- * Animate from some percent to some other percentage
- * @param {number} from Starting percentage
- * @param {number} to Final percentage
- */
- this.animate = function(from, to) {
- var startTime = Date.now();
- options.onStart(from, to);
- var animation = function() {
- var process = Math.min(Date.now() - startTime, options.animate.duration);
- var currentValue = options.easing(this, process, from, to - from, options.animate.duration);
- this.draw(currentValue);
- options.onStep(from, to, currentValue);
- if (process >= options.animate.duration) {
- options.onStop(from, to);
- } else {
- reqAnimationFrame(animation);
- }
- }.bind(this);
-
- reqAnimationFrame(animation);
- }.bind(this);
-};
-
-var EasyPieChart = function(el, opts) {
- var defaultOptions = {
- barColor: '#ef1e25',
- trackColor: '#f9f9f9',
- scaleColor: '#dfe0e0',
- scaleLength: 5,
- lineCap: 'round',
- lineWidth: 3,
- trackWidth: undefined,
- size: 110,
- rotate: 0,
- animate: {
- duration: 1000,
- enabled: true
- },
- easing: function (x, t, b, c, d) { // more can be found here: http://gsgd.co.uk/sandbox/jquery/easing/
- t = t / (d/2);
- if (t < 1) {
- return c / 2 * t * t + b;
- }
- return -c/2 * ((--t)*(t-2) - 1) + b;
- },
- onStart: function(from, to) {
- return;
- },
- onStep: function(from, to, currentValue) {
- return;
- },
- onStop: function(from, to) {
- return;
- }
- };
-
- // detect present renderer
- if (typeof(CanvasRenderer) !== 'undefined') {
- defaultOptions.renderer = CanvasRenderer;
- } else if (typeof(SVGRenderer) !== 'undefined') {
- defaultOptions.renderer = SVGRenderer;
- } else {
- throw new Error('Please load either the SVG- or the CanvasRenderer');
- }
-
- var options = {};
- var currentValue = 0;
-
- /**
- * Initialize the plugin by creating the options object and initialize rendering
- */
- var init = function() {
- this.el = el;
- this.options = options;
-
- // merge user options into default options
- for (var i in defaultOptions) {
- if (defaultOptions.hasOwnProperty(i)) {
- options[i] = opts && typeof(opts[i]) !== 'undefined' ? opts[i] : defaultOptions[i];
- if (typeof(options[i]) === 'function') {
- options[i] = options[i].bind(this);
- }
- }
- }
-
- // check for jQuery easing
- if (typeof(options.easing) === 'string' && typeof(jQuery) !== 'undefined' && jQuery.isFunction(jQuery.easing[options.easing])) {
- options.easing = jQuery.easing[options.easing];
- } else {
- options.easing = defaultOptions.easing;
- }
-
- // process earlier animate option to avoid bc breaks
- if (typeof(options.animate) === 'number') {
- options.animate = {
- duration: options.animate,
- enabled: true
- };
- }
-
- if (typeof(options.animate) === 'boolean' && !options.animate) {
- options.animate = {
- duration: 1000,
- enabled: options.animate
- };
- }
-
- // create renderer
- this.renderer = new options.renderer(el, options);
-
- // initial draw
- this.renderer.draw(currentValue);
-
- // initial update
- if (el.dataset && el.dataset.percent) {
- this.update(parseFloat(el.dataset.percent));
- } else if (el.getAttribute && el.getAttribute('data-percent')) {
- this.update(parseFloat(el.getAttribute('data-percent')));
- }
- }.bind(this);
-
- /**
- * Update the value of the chart
- * @param {number} newValue Number between 0 and 100
- * @return {object} Instance of the plugin for method chaining
- */
- this.update = function(newValue) {
- newValue = parseFloat(newValue);
- if (options.animate.enabled) {
- this.renderer.animate(currentValue, newValue);
- } else {
- this.renderer.draw(newValue);
- }
- currentValue = newValue;
- return this;
- }.bind(this);
-
- /**
- * Disable animation
- * @return {object} Instance of the plugin for method chaining
- */
- this.disableAnimation = function() {
- options.animate.enabled = false;
- return this;
- };
-
- /**
- * Enable animation
- * @return {object} Instance of the plugin for method chaining
- */
- this.enableAnimation = function() {
- options.animate.enabled = true;
- return this;
- };
-
- init();
-};
-
-$.fn.easyPieChart = function(options) {
- return this.each(function() {
- var instanceOptions;
-
- if (!$.data(this, 'easyPieChart')) {
- instanceOptions = $.extend({}, options, $(this).data());
- $.data(this, 'easyPieChart', new EasyPieChart(this, instanceOptions));
- }
- });
-};
-
-
-}));
diff --git a/debian/missing-sources/jquery.peity-3.2.0.js b/debian/missing-sources/jquery.peity-3.2.0.js
deleted file mode 100644
index 8c4c9a52..00000000
--- a/debian/missing-sources/jquery.peity-3.2.0.js
+++ /dev/null
@@ -1,383 +0,0 @@
-// Peity jQuery plugin version 3.2.0
-// (c) 2015 Ben Pickles
-//
-// http://benpickles.github.io/peity
-//
-// Released under MIT license.
-(function($, document, Math, undefined) {
- var peity = $.fn.peity = function(type, options) {
- if (svgSupported) {
- this.each(function() {
- var $this = $(this)
- var chart = $this.data('_peity')
-
- if (chart) {
- if (type) chart.type = type
- $.extend(chart.opts, options)
- } else {
- chart = new Peity(
- $this,
- type,
- $.extend({},
- peity.defaults[type],
- $this.data('peity'),
- options)
- )
-
- $this
- .change(function() { chart.draw() })
- .data('_peity', chart)
- }
-
- chart.draw()
- });
- }
-
- return this;
- };
-
- var Peity = function($el, type, opts) {
- this.$el = $el
- this.type = type
- this.opts = opts
- }
-
- var PeityPrototype = Peity.prototype
-
- var svgElement = PeityPrototype.svgElement = function(tag, attrs) {
- return $(
- document.createElementNS('http://www.w3.org/2000/svg', tag)
- ).attr(attrs)
- }
-
- // https://gist.github.com/madrobby/3201472
- var svgSupported = 'createElementNS' in document && svgElement('svg', {})[0].createSVGRect
-
- PeityPrototype.draw = function() {
- var opts = this.opts
- peity.graphers[this.type].call(this, opts)
- if (opts.after) opts.after.call(this, opts)
- }
-
- PeityPrototype.fill = function() {
- var fill = this.opts.fill
-
- return $.isFunction(fill)
- ? fill
- : function(_, i) { return fill[i % fill.length] }
- }
-
- PeityPrototype.prepare = function(width, height) {
- if (!this.$svg) {
- this.$el.hide().after(
- this.$svg = svgElement('svg', {
- "class": "peity"
- })
- )
- }
-
- return this.$svg
- .empty()
- .data('peity', this)
- .attr({
- height: height,
- width: width
- })
- }
-
- PeityPrototype.values = function() {
- return $.map(this.$el.text().split(this.opts.delimiter), function(value) {
- return parseFloat(value)
- })
- }
-
- peity.defaults = {}
- peity.graphers = {}
-
- peity.register = function(type, defaults, grapher) {
- this.defaults[type] = defaults
- this.graphers[type] = grapher
- }
-
- peity.register(
- 'pie',
- {
- fill: ['#ff9900', '#fff4dd', '#ffc66e'],
- radius: 8
- },
- function(opts) {
- if (!opts.delimiter) {
- var delimiter = this.$el.text().match(/[^0-9\.]/)
- opts.delimiter = delimiter ? delimiter[0] : ","
- }
-
- var values = $.map(this.values(), function(n) {
- return n > 0 ? n : 0
- })
-
- if (opts.delimiter == "/") {
- var v1 = values[0]
- var v2 = values[1]
- values = [v1, Math.max(0, v2 - v1)]
- }
-
- var i = 0
- var length = values.length
- var sum = 0
-
- for (; i < length; i++) {
- sum += values[i]
- }
-
- if (!sum) {
- length = 2
- sum = 1
- values = [0, 1]
- }
-
- var diameter = opts.radius * 2
-
- var $svg = this.prepare(
- opts.width || diameter,
- opts.height || diameter
- )
-
- var width = $svg.width()
- , height = $svg.height()
- , cx = width / 2
- , cy = height / 2
-
- var radius = Math.min(cx, cy)
- , innerRadius = opts.innerRadius
-
- if (this.type == 'donut' && !innerRadius) {
- innerRadius = radius * 0.5
- }
-
- var pi = Math.PI
- var fill = this.fill()
-
- var scale = this.scale = function(value, radius) {
- var radians = value / sum * pi * 2 - pi / 2
-
- return [
- radius * Math.cos(radians) + cx,
- radius * Math.sin(radians) + cy
- ]
- }
-
- var cumulative = 0
-
- for (i = 0; i < length; i++) {
- var value = values[i]
- , portion = value / sum
- , $node
-
- if (portion == 0) continue
-
- if (portion == 1) {
- if (innerRadius) {
- var x2 = cx - 0.01
- , y1 = cy - radius
- , y2 = cy - innerRadius
-
- $node = svgElement('path', {
- d: [
- 'M', cx, y1,
- 'A', radius, radius, 0, 1, 1, x2, y1,
- 'L', x2, y2,
- 'A', innerRadius, innerRadius, 0, 1, 0, cx, y2
- ].join(' ')
- })
- } else {
- $node = svgElement('circle', {
- cx: cx,
- cy: cy,
- r: radius
- })
- }
- } else {
- var cumulativePlusValue = cumulative + value
-
- var d = ['M'].concat(
- scale(cumulative, radius),
- 'A', radius, radius, 0, portion > 0.5 ? 1 : 0, 1,
- scale(cumulativePlusValue, radius),
- 'L'
- )
-
- if (innerRadius) {
- d = d.concat(
- scale(cumulativePlusValue, innerRadius),
- 'A', innerRadius, innerRadius, 0, portion > 0.5 ? 1 : 0, 0,
- scale(cumulative, innerRadius)
- )
- } else {
- d.push(cx, cy)
- }
-
- cumulative += value
-
- $node = svgElement('path', {
- d: d.join(" ")
- })
- }
-
- $node.attr('fill', fill.call(this, value, i, values))
-
- $svg.append($node)
- }
- }
- )
-
- peity.register(
- 'donut',
- $.extend(true, {}, peity.defaults.pie),
- function(opts) {
- peity.graphers.pie.call(this, opts)
- }
- )
-
- peity.register(
- "line",
- {
- delimiter: ",",
- fill: "#c6d9fd",
- height: 16,
- min: 0,
- stroke: "#4d89f9",
- strokeWidth: 1,
- width: 32
- },
- function(opts) {
- var values = this.values()
- if (values.length == 1) values.push(values[0])
- var max = Math.max.apply(Math, opts.max == undefined ? values : values.concat(opts.max))
- , min = Math.min.apply(Math, opts.min == undefined ? values : values.concat(opts.min))
-
- var $svg = this.prepare(opts.width, opts.height)
- , strokeWidth = opts.strokeWidth
- , width = $svg.width()
- , height = $svg.height() - strokeWidth
- , diff = max - min
-
- var xScale = this.x = function(input) {
- return input * (width / (values.length - 1))
- }
-
- var yScale = this.y = function(input) {
- var y = height
-
- if (diff) {
- y -= ((input - min) / diff) * height
- }
-
- return y + strokeWidth / 2
- }
-
- var zero = yScale(Math.max(min, 0))
- , coords = [0, zero]
-
- for (var i = 0; i < values.length; i++) {
- coords.push(
- xScale(i),
- yScale(values[i])
- )
- }
-
- coords.push(width, zero)
-
- if (opts.fill) {
- $svg.append(
- svgElement('polygon', {
- fill: opts.fill,
- points: coords.join(' ')
- })
- )
- }
-
- if (strokeWidth) {
- $svg.append(
- svgElement('polyline', {
- fill: 'none',
- points: coords.slice(2, coords.length - 2).join(' '),
- stroke: opts.stroke,
- 'stroke-width': strokeWidth,
- 'stroke-linecap': 'square'
- })
- )
- }
- }
- );
-
- peity.register(
- 'bar',
- {
- delimiter: ",",
- fill: ["#4D89F9"],
- height: 16,
- min: 0,
- padding: 0.1,
- width: 32
- },
- function(opts) {
- var values = this.values()
- , max = Math.max.apply(Math, opts.max == undefined ? values : values.concat(opts.max))
- , min = Math.min.apply(Math, opts.min == undefined ? values : values.concat(opts.min))
-
- var $svg = this.prepare(opts.width, opts.height)
- , width = $svg.width()
- , height = $svg.height()
- , diff = max - min
- , padding = opts.padding
- , fill = this.fill()
-
- var xScale = this.x = function(input) {
- return input * width / values.length
- }
-
- var yScale = this.y = function(input) {
- return height - (
- diff
- ? ((input - min) / diff) * height
- : 1
- )
- }
-
- for (var i = 0; i < values.length; i++) {
- var x = xScale(i + padding)
- , w = xScale(i + 1 - padding) - x
- , value = values[i]
- , valueY = yScale(value)
- , y1 = valueY
- , y2 = valueY
- , h
-
- if (!diff) {
- h = 1
- } else if (value < 0) {
- y1 = yScale(Math.min(max, 0))
- } else {
- y2 = yScale(Math.max(min, 0))
- }
-
- h = y2 - y1
-
- if (h == 0) {
- h = 1
- if (max > 0 && diff) y1--
- }
-
- $svg.append(
- svgElement('rect', {
- fill: fill.call(this, value, i, values),
- x: x,
- y: y1,
- width: w,
- height: h
- })
- )
- }
- }
- );
-})(jQuery, document, Math);
diff --git a/debian/missing-sources/jquery.sparkline-2.1.2.js b/debian/missing-sources/jquery.sparkline-2.1.2.js
deleted file mode 100644
index 721e03b7..00000000
--- a/debian/missing-sources/jquery.sparkline-2.1.2.js
+++ /dev/null
@@ -1,3054 +0,0 @@
-/**
-*
-* jquery.sparkline.js
-*
-* v2.1.2
-* (c) Splunk, Inc
-* Contact: Gareth Watts (gareth@splunk.com)
-* http://omnipotent.net/jquery.sparkline/
-*
-* Generates inline sparkline charts from data supplied either to the method
-* or inline in HTML
-*
-* Compatible with Internet Explorer 6.0+ and modern browsers equipped with the canvas tag
-* (Firefox 2.0+, Safari, Opera, etc)
-*
-* License: New BSD License
-*
-* Copyright (c) 2012, Splunk Inc.
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without modification,
-* are permitted provided that the following conditions are met:
-*
-* * Redistributions of source code must retain the above copyright notice,
-* this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following disclaimer in the documentation
-* and/or other materials provided with the distribution.
-* * Neither the name of Splunk Inc nor the names of its contributors may
-* be used to endorse or promote products derived from this software without
-* specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-* SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*
-* Usage:
-* $(selector).sparkline(values, options)
-*
-* If values is undefined or set to 'html' then the data values are read from the specified tag:
-* <p>Sparkline: <span class="sparkline">1,4,6,6,8,5,3,5</span></p>
-* $('.sparkline').sparkline();
-* There must be no spaces in the enclosed data set
-*
-* Otherwise values must be an array of numbers or null values
-* <p>Sparkline: <span id="sparkline1">This text replaced if the browser is compatible</span></p>
-* $('#sparkline1').sparkline([1,4,6,6,8,5,3,5])
-* $('#sparkline2').sparkline([1,4,6,null,null,5,3,5])
-*
-* Values can also be specified in an HTML comment, or as a values attribute:
-* <p>Sparkline: <span class="sparkline"><!--1,4,6,6,8,5,3,5 --></span></p>
-* <p>Sparkline: <span class="sparkline" values="1,4,6,6,8,5,3,5"></span></p>
-* $('.sparkline').sparkline();
-*
-* For line charts, x values can also be specified:
-* <p>Sparkline: <span class="sparkline">1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5</span></p>
-* $('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], [8.7,5], [9,3], [10,5] ])
-*
-* By default, options should be passed in as teh second argument to the sparkline function:
-* $('.sparkline').sparkline([1,2,3,4], {type: 'bar'})
-*
-* Options can also be set by passing them on the tag itself. This feature is disabled by default though
-* as there's a slight performance overhead:
-* $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true})
-* <p>Sparkline: <span class="sparkline" sparkType="bar" sparkBarColor="red">loading</span></p>
-* Prefix all options supplied as tag attribute with "spark" (configurable by setting tagOptionPrefix)
-*
-* Supported options:
-* lineColor - Color of the line used for the chart
-* fillColor - Color used to fill in the chart - Set to '' or false for a transparent chart
-* width - Width of the chart - Defaults to 3 times the number of values in pixels
-* height - Height of the chart - Defaults to the height of the containing element
-* chartRangeMin - Specify the minimum value to use for the Y range of the chart - Defaults to the minimum value supplied
-* chartRangeMax - Specify the maximum value to use for the Y range of the chart - Defaults to the maximum value supplied
-* chartRangeClip - Clip out of range values to the max/min specified by chartRangeMin and chartRangeMax
-* chartRangeMinX - Specify the minimum value to use for the X range of the chart - Defaults to the minimum value supplied
-* chartRangeMaxX - Specify the maximum value to use for the X range of the chart - Defaults to the maximum value supplied
-* composite - If true then don't erase any existing chart attached to the tag, but draw
-* another chart over the top - Note that width and height are ignored if an
-* existing chart is detected.
-* tagValuesAttribute - Name of tag attribute to check for data values - Defaults to 'values'
-* enableTagOptions - Whether to check tags for sparkline options
-* tagOptionPrefix - Prefix used for options supplied as tag attributes - Defaults to 'spark'
-* disableHiddenCheck - If set to true, then the plugin will assume that charts will never be drawn into a
-* hidden dom element, avoding a browser reflow
-* disableInteraction - If set to true then all mouseover/click interaction behaviour will be disabled,
-* making the plugin perform much like it did in 1.x
-* disableTooltips - If set to true then tooltips will be disabled - Defaults to false (tooltips enabled)
-* disableHighlight - If set to true then highlighting of selected chart elements on mouseover will be disabled
-* defaults to false (highlights enabled)
-* highlightLighten - Factor to lighten/darken highlighted chart values by - Defaults to 1.4 for a 40% increase
-* tooltipContainer - Specify which DOM element the tooltip should be rendered into - defaults to document.body
-* tooltipClassname - Optional CSS classname to apply to tooltips - If not specified then a default style will be applied
-* tooltipOffsetX - How many pixels away from the mouse pointer to render the tooltip on the X axis
-* tooltipOffsetY - How many pixels away from the mouse pointer to render the tooltip on the r axis
-* tooltipFormatter - Optional callback that allows you to override the HTML displayed in the tooltip
-* callback is given arguments of (sparkline, options, fields)
-* tooltipChartTitle - If specified then the tooltip uses the string specified by this setting as a title
-* tooltipFormat - A format string or SPFormat object (or an array thereof for multiple entries)
-* to control the format of the tooltip
-* tooltipPrefix - A string to prepend to each field displayed in a tooltip
-* tooltipSuffix - A string to append to each field displayed in a tooltip
-* tooltipSkipNull - If true then null values will not have a tooltip displayed (defaults to true)
-* tooltipValueLookups - An object or range map to map field values to tooltip strings
-* (eg. to map -1 to "Lost", 0 to "Draw", and 1 to "Win")
-* numberFormatter - Optional callback for formatting numbers in tooltips
-* numberDigitGroupSep - Character to use for group separator in numbers "1,234" - Defaults to ","
-* numberDecimalMark - Character to use for the decimal point when formatting numbers - Defaults to "."
-* numberDigitGroupCount - Number of digits between group separator - Defaults to 3
-*
-* There are 7 types of sparkline, selected by supplying a "type" option of 'line' (default),
-* 'bar', 'tristate', 'bullet', 'discrete', 'pie' or 'box'
-* line - Line chart. Options:
-* spotColor - Set to '' to not end each line in a circular spot
-* minSpotColor - If set, color of spot at minimum value
-* maxSpotColor - If set, color of spot at maximum value
-* spotRadius - Radius in pixels
-* lineWidth - Width of line in pixels
-* normalRangeMin
-* normalRangeMax - If set draws a filled horizontal bar between these two values marking the "normal"
-* or expected range of values
-* normalRangeColor - Color to use for the above bar
-* drawNormalOnTop - Draw the normal range above the chart fill color if true
-* defaultPixelsPerValue - Defaults to 3 pixels of width for each value in the chart
-* highlightSpotColor - The color to use for drawing a highlight spot on mouseover - Set to null to disable
-* highlightLineColor - The color to use for drawing a highlight line on mouseover - Set to null to disable
-* valueSpots - Specify which points to draw spots on, and in which color. Accepts a range map
-*
-* bar - Bar chart. Options:
-* barColor - Color of bars for postive values
-* negBarColor - Color of bars for negative values
-* zeroColor - Color of bars with zero values
-* nullColor - Color of bars with null values - Defaults to omitting the bar entirely
-* barWidth - Width of bars in pixels
-* colorMap - Optional mappnig of values to colors to override the *BarColor values above
-* can be an Array of values to control the color of individual bars or a range map
-* to specify colors for individual ranges of values
-* barSpacing - Gap between bars in pixels
-* zeroAxis - Centers the y-axis around zero if true
-*
-* tristate - Charts values of win (>0), lose (<0) or draw (=0)
-* posBarColor - Color of win values
-* negBarColor - Color of lose values
-* zeroBarColor - Color of draw values
-* barWidth - Width of bars in pixels
-* barSpacing - Gap between bars in pixels
-* colorMap - Optional mappnig of values to colors to override the *BarColor values above
-* can be an Array of values to control the color of individual bars or a range map
-* to specify colors for individual ranges of values
-*
-* discrete - Options:
-* lineHeight - Height of each line in pixels - Defaults to 30% of the graph height
-* thesholdValue - Values less than this value will be drawn using thresholdColor instead of lineColor
-* thresholdColor
-*
-* bullet - Values for bullet graphs msut be in the order: target, performance, range1, range2, range3, ...
-* options:
-* targetColor - The color of the vertical target marker
-* targetWidth - The width of the target marker in pixels
-* performanceColor - The color of the performance measure horizontal bar
-* rangeColors - Colors to use for each qualitative range background color
-*
-* pie - Pie chart. Options:
-* sliceColors - An array of colors to use for pie slices
-* offset - Angle in degrees to offset the first slice - Try -90 or +90
-* borderWidth - Width of border to draw around the pie chart, in pixels - Defaults to 0 (no border)
-* borderColor - Color to use for the pie chart border - Defaults to #000
-*
-* box - Box plot. Options:
-* raw - Set to true to supply pre-computed plot points as values
-* values should be: low_outlier, low_whisker, q1, median, q3, high_whisker, high_outlier
-* When set to false you can supply any number of values and the box plot will
-* be computed for you. Default is false.
-* showOutliers - Set to true (default) to display outliers as circles
-* outlierIQR - Interquartile range used to determine outliers. Default 1.5
-* boxLineColor - Outline color of the box
-* boxFillColor - Fill color for the box
-* whiskerColor - Line color used for whiskers
-* outlierLineColor - Outline color of outlier circles
-* outlierFillColor - Fill color of the outlier circles
-* spotRadius - Radius of outlier circles
-* medianColor - Line color of the median line
-* target - Draw a target cross hair at the supplied value (default undefined)
-*
-*
-*
-* Examples:
-* $('#sparkline1').sparkline(myvalues, { lineColor: '#f00', fillColor: false });
-* $('.barsparks').sparkline('html', { type:'bar', height:'40px', barWidth:5 });
-* $('#tristate').sparkline([1,1,-1,1,0,0,-1], { type:'tristate' }):
-* $('#discrete').sparkline([1,3,4,5,5,3,4,5], { type:'discrete' });
-* $('#bullet').sparkline([10,12,12,9,7], { type:'bullet' });
-* $('#pie').sparkline([1,1,2], { type:'pie' });
-*/
-
-/*jslint regexp: true, browser: true, jquery: true, white: true, nomen: false, plusplus: false, maxerr: 500, indent: 4 */
-
-(function(document, Math, undefined) { // performance/minified-size optimization
-(function(factory) {
- if(typeof define === 'function' && define.amd) {
- define(['jquery'], factory);
- } else if (jQuery && !jQuery.fn.sparkline) {
- factory(jQuery);
- }
-}
-(function($) {
- 'use strict';
-
- var UNSET_OPTION = {},
- getDefaults, createClass, SPFormat, clipval, quartile, normalizeValue, normalizeValues,
- remove, isNumber, all, sum, addCSS, ensureArray, formatNumber, RangeMap,
- MouseHandler, Tooltip, barHighlightMixin,
- line, bar, tristate, discrete, bullet, pie, box, defaultStyles, initStyles,
- VShape, VCanvas_base, VCanvas_canvas, VCanvas_vml, pending, shapeCount = 0;
-
- /**
- * Default configuration settings
- */
- getDefaults = function () {
- return {
- // Settings common to most/all chart types
- common: {
- type: 'line',
- lineColor: '#00f',
- fillColor: '#cdf',
- defaultPixelsPerValue: 3,
- width: 'auto',
- height: 'auto',
- composite: false,
- tagValuesAttribute: 'values',
- tagOptionsPrefix: 'spark',
- enableTagOptions: false,
- enableHighlight: true,
- highlightLighten: 1.4,
- tooltipSkipNull: true,
- tooltipPrefix: '',
- tooltipSuffix: '',
- disableHiddenCheck: false,
- numberFormatter: false,
- numberDigitGroupCount: 3,
- numberDigitGroupSep: ',',
- numberDecimalMark: '.',
- disableTooltips: false,
- disableInteraction: false
- },
- // Defaults for line charts
- line: {
- spotColor: '#f80',
- highlightSpotColor: '#5f5',
- highlightLineColor: '#f22',
- spotRadius: 1.5,
- minSpotColor: '#f80',
- maxSpotColor: '#f80',
- lineWidth: 1,
- normalRangeMin: undefined,
- normalRangeMax: undefined,
- normalRangeColor: '#ccc',
- drawNormalOnTop: false,
- chartRangeMin: undefined,
- chartRangeMax: undefined,
- chartRangeMinX: undefined,
- chartRangeMaxX: undefined,
- tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{y}}{{suffix}}')
- },
- // Defaults for bar charts
- bar: {
- barColor: '#3366cc',
- negBarColor: '#f44',
- stackedBarColor: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',
- '#dd4477', '#0099c6', '#990099'],
- zeroColor: undefined,
- nullColor: undefined,
- zeroAxis: true,
- barWidth: 4,
- barSpacing: 1,
- chartRangeMax: undefined,
- chartRangeMin: undefined,
- chartRangeClip: false,
- colorMap: undefined,
- tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{value}}{{suffix}}')
- },
- // Defaults for tristate charts
- tristate: {
- barWidth: 4,
- barSpacing: 1,
- posBarColor: '#6f6',
- negBarColor: '#f44',
- zeroBarColor: '#999',
- colorMap: {},
- tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{value:map}}'),
- tooltipValueLookups: { map: { '-1': 'Loss', '0': 'Draw', '1': 'Win' } }
- },
- // Defaults for discrete charts
- discrete: {
- lineHeight: 'auto',
- thresholdColor: undefined,
- thresholdValue: 0,
- chartRangeMax: undefined,
- chartRangeMin: undefined,
- chartRangeClip: false,
- tooltipFormat: new SPFormat('{{prefix}}{{value}}{{suffix}}')
- },
- // Defaults for bullet charts
- bullet: {
- targetColor: '#f33',
- targetWidth: 3, // width of the target bar in pixels
- performanceColor: '#33f',
- rangeColors: ['#d3dafe', '#a8b6ff', '#7f94ff'],
- base: undefined, // set this to a number to change the base start number
- tooltipFormat: new SPFormat('{{fieldkey:fields}} - {{value}}'),
- tooltipValueLookups: { fields: {r: 'Range', p: 'Performance', t: 'Target'} }
- },
- // Defaults for pie charts
- pie: {
- offset: 0,
- sliceColors: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',
- '#dd4477', '#0099c6', '#990099'],
- borderWidth: 0,
- borderColor: '#000',
- tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{value}} ({{percent.1}}%)')
- },
- // Defaults for box plots
- box: {
- raw: false,
- boxLineColor: '#000',
- boxFillColor: '#cdf',
- whiskerColor: '#000',
- outlierLineColor: '#333',
- outlierFillColor: '#fff',
- medianColor: '#f00',
- showOutliers: true,
- outlierIQR: 1.5,
- spotRadius: 1.5,
- target: undefined,
- targetColor: '#4a2',
- chartRangeMax: undefined,
- chartRangeMin: undefined,
- tooltipFormat: new SPFormat('{{field:fields}}: {{value}}'),
- tooltipFormatFieldlistKey: 'field',
- tooltipValueLookups: { fields: { lq: 'Lower Quartile', med: 'Median',
- uq: 'Upper Quartile', lo: 'Left Outlier', ro: 'Right Outlier',
- lw: 'Left Whisker', rw: 'Right Whisker'} }
- }
- };
- };
-
- // You can have tooltips use a css class other than jqstooltip by specifying tooltipClassname
- defaultStyles = '.jqstooltip { ' +
- 'position: absolute;' +
- 'left: 0px;' +
- 'top: 0px;' +
- 'visibility: hidden;' +
- 'background: rgb(0, 0, 0) transparent;' +
- 'background-color: rgba(0,0,0,0.6);' +
- 'filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);' +
- '-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";' +
- 'color: white;' +
- 'font: 10px arial, san serif;' +
- 'text-align: left;' +
- 'white-space: nowrap;' +
- 'padding: 5px;' +
- 'border: 1px solid white;' +
- 'z-index: 10000;' +
- '}' +
- '.jqsfield { ' +
- 'color: white;' +
- 'font: 10px arial, san serif;' +
- 'text-align: left;' +
- '}';
-
- /**
- * Utilities
- */
-
- createClass = function (/* [baseclass, [mixin, ...]], definition */) {
- var Class, args;
- Class = function () {
- this.init.apply(this, arguments);
- };
- if (arguments.length > 1) {
- if (arguments[0]) {
- Class.prototype = $.extend(new arguments[0](), arguments[arguments.length - 1]);
- Class._super = arguments[0].prototype;
- } else {
- Class.prototype = arguments[arguments.length - 1];
- }
- if (arguments.length > 2) {
- args = Array.prototype.slice.call(arguments, 1, -1);
- args.unshift(Class.prototype);
- $.extend.apply($, args);
- }
- } else {
- Class.prototype = arguments[0];
- }
- Class.prototype.cls = Class;
- return Class;
- };
-
- /**
- * Wraps a format string for tooltips
- * {{x}}
- * {{x.2}
- * {{x:months}}
- */
- $.SPFormatClass = SPFormat = createClass({
- fre: /\{\{([\w.]+?)(:(.+?))?\}\}/g,
- precre: /(\w+)\.(\d+)/,
-
- init: function (format, fclass) {
- this.format = format;
- this.fclass = fclass;
- },
-
- render: function (fieldset, lookups, options) {
- var self = this,
- fields = fieldset,
- match, token, lookupkey, fieldvalue, prec;
- return this.format.replace(this.fre, function () {
- var lookup;
- token = arguments[1];
- lookupkey = arguments[3];
- match = self.precre.exec(token);
- if (match) {
- prec = match[2];
- token = match[1];
- } else {
- prec = false;
- }
- fieldvalue = fields[token];
- if (fieldvalue === undefined) {
- return '';
- }
- if (lookupkey && lookups && lookups[lookupkey]) {
- lookup = lookups[lookupkey];
- if (lookup.get) { // RangeMap
- return lookups[lookupkey].get(fieldvalue) || fieldvalue;
- } else {
- return lookups[lookupkey][fieldvalue] || fieldvalue;
- }
- }
- if (isNumber(fieldvalue)) {
- if (options.get('numberFormatter')) {
- fieldvalue = options.get('numberFormatter')(fieldvalue);
- } else {
- fieldvalue = formatNumber(fieldvalue, prec,
- options.get('numberDigitGroupCount'),
- options.get('numberDigitGroupSep'),
- options.get('numberDecimalMark'));
- }
- }
- return fieldvalue;
- });
- }
- });
-
- // convience method to avoid needing the new operator
- $.spformat = function(format, fclass) {
- return new SPFormat(format, fclass);
- };
-
- clipval = function (val, min, max) {
- if (val < min) {
- return min;
- }
- if (val > max) {
- return max;
- }
- return val;
- };
-
- quartile = function (values, q) {
- var vl;
- if (q === 2) {
- vl = Math.floor(values.length / 2);
- return values.length % 2 ? values[vl] : (values[vl-1] + values[vl]) / 2;
- } else {
- if (values.length % 2 ) { // odd
- vl = (values.length * q + q) / 4;
- return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1];
- } else { //even
- vl = (values.length * q + 2) / 4;
- return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1];
-
- }
- }
- };
-
- normalizeValue = function (val) {
- var nf;
- switch (val) {
- case 'undefined':
- val = undefined;
- break;
- case 'null':
- val = null;
- break;
- case 'true':
- val = true;
- break;
- case 'false':
- val = false;
- break;
- default:
- nf = parseFloat(val);
- if (val == nf) {
- val = nf;
- }
- }
- return val;
- };
-
- normalizeValues = function (vals) {
- var i, result = [];
- for (i = vals.length; i--;) {
- result[i] = normalizeValue(vals[i]);
- }
- return result;
- };
-
- remove = function (vals, filter) {
- var i, vl, result = [];
- for (i = 0, vl = vals.length; i < vl; i++) {
- if (vals[i] !== filter) {
- result.push(vals[i]);
- }
- }
- return result;
- };
-
- isNumber = function (num) {
- return !isNaN(parseFloat(num)) && isFinite(num);
- };
-
- formatNumber = function (num, prec, groupsize, groupsep, decsep) {
- var p, i;
- num = (prec === false ? parseFloat(num).toString() : num.toFixed(prec)).split('');
- p = (p = $.inArray('.', num)) < 0 ? num.length : p;
- if (p < num.length) {
- num[p] = decsep;
- }
- for (i = p - groupsize; i > 0; i -= groupsize) {
- num.splice(i, 0, groupsep);
- }
- return num.join('');
- };
-
- // determine if all values of an array match a value
- // returns true if the array is empty
- all = function (val, arr, ignoreNull) {
- var i;
- for (i = arr.length; i--; ) {
- if (ignoreNull && arr[i] === null) continue;
- if (arr[i] !== val) {
- return false;
- }
- }
- return true;
- };
-
- // sums the numeric values in an array, ignoring other values
- sum = function (vals) {
- var total = 0, i;
- for (i = vals.length; i--;) {
- total += typeof vals[i] === 'number' ? vals[i] : 0;
- }
- return total;
- };
-
- ensureArray = function (val) {
- return $.isArray(val) ? val : [val];
- };
-
- // http://paulirish.com/2008/bookmarklet-inject-new-css-rules/
- addCSS = function(css) {
- var tag;
- //if ('\v' == 'v') /* ie only */ {
- if (document.createStyleSheet) {
- document.createStyleSheet().cssText = css;
- } else {
- tag = document.createElement('style');
- tag.type = 'text/css';
- document.getElementsByTagName('head')[0].appendChild(tag);
- tag[(typeof document.body.style.WebkitAppearance == 'string') /* webkit only */ ? 'innerText' : 'innerHTML'] = css;
- }
- };
-
- // Provide a cross-browser interface to a few simple drawing primitives
- $.fn.simpledraw = function (width, height, useExisting, interact) {
- var target, mhandler;
- if (useExisting && (target = this.data('_jqs_vcanvas'))) {
- return target;
- }
-
- if ($.fn.sparkline.canvas === false) {
- // We've already determined that neither Canvas nor VML are available
- return false;
-
- } else if ($.fn.sparkline.canvas === undefined) {
- // No function defined yet -- need to see if we support Canvas or VML
- var el = document.createElement('canvas');
- if (!!(el.getContext && el.getContext('2d'))) {
- // Canvas is available
- $.fn.sparkline.canvas = function(width, height, target, interact) {
- return new VCanvas_canvas(width, height, target, interact);
- };
- } else if (document.namespaces && !document.namespaces.v) {
- // VML is available
- document.namespaces.add('v', 'urn:schemas-microsoft-com:vml', '#default#VML');
- $.fn.sparkline.canvas = function(width, height, target, interact) {
- return new VCanvas_vml(width, height, target);
- };
- } else {
- // Neither Canvas nor VML are available
- $.fn.sparkline.canvas = false;
- return false;
- }
- }
-
- if (width === undefined) {
- width = $(this).innerWidth();
- }
- if (height === undefined) {
- height = $(this).innerHeight();
- }
-
- target = $.fn.sparkline.canvas(width, height, this, interact);
-
- mhandler = $(this).data('_jqs_mhandler');
- if (mhandler) {
- mhandler.registerCanvas(target);
- }
- return target;
- };
-
- $.fn.cleardraw = function () {
- var target = this.data('_jqs_vcanvas');
- if (target) {
- target.reset();
- }
- };
-
- $.RangeMapClass = RangeMap = createClass({
- init: function (map) {
- var key, range, rangelist = [];
- for (key in map) {
- if (map.hasOwnProperty(key) && typeof key === 'string' && key.indexOf(':') > -1) {
- range = key.split(':');
- range[0] = range[0].length === 0 ? -Infinity : parseFloat(range[0]);
- range[1] = range[1].length === 0 ? Infinity : parseFloat(range[1]);
- range[2] = map[key];
- rangelist.push(range);
- }
- }
- this.map = map;
- this.rangelist = rangelist || false;
- },
-
- get: function (value) {
- var rangelist = this.rangelist,
- i, range, result;
- if ((result = this.map[value]) !== undefined) {
- return result;
- }
- if (rangelist) {
- for (i = rangelist.length; i--;) {
- range = rangelist[i];
- if (range[0] <= value && range[1] >= value) {
- return range[2];
- }
- }
- }
- return undefined;
- }
- });
-
- // Convenience function
- $.range_map = function(map) {
- return new RangeMap(map);
- };
-
- MouseHandler = createClass({
- init: function (el, options) {
- var $el = $(el);
- this.$el = $el;
- this.options = options;
- this.currentPageX = 0;
- this.currentPageY = 0;
- this.el = el;
- this.splist = [];
- this.tooltip = null;
- this.over = false;
- this.displayTooltips = !options.get('disableTooltips');
- this.highlightEnabled = !options.get('disableHighlight');
- },
-
- registerSparkline: function (sp) {
- this.splist.push(sp);
- if (this.over) {
- this.updateDisplay();
- }
- },
-
- registerCanvas: function (canvas) {
- var $canvas = $(canvas.canvas);
- this.canvas = canvas;
- this.$canvas = $canvas;
- $canvas.mouseenter($.proxy(this.mouseenter, this));
- $canvas.mouseleave($.proxy(this.mouseleave, this));
- $canvas.click($.proxy(this.mouseclick, this));
- },
-
- reset: function (removeTooltip) {
- this.splist = [];
- if (this.tooltip && removeTooltip) {
- this.tooltip.remove();
- this.tooltip = undefined;
- }
- },
-
- mouseclick: function (e) {
- var clickEvent = $.Event('sparklineClick');
- clickEvent.originalEvent = e;
- clickEvent.sparklines = this.splist;
- this.$el.trigger(clickEvent);
- },
-
- mouseenter: function (e) {
- $(document.body).unbind('mousemove.jqs');
- $(document.body).bind('mousemove.jqs', $.proxy(this.mousemove, this));
- this.over = true;
- this.currentPageX = e.pageX;
- this.currentPageY = e.pageY;
- this.currentEl = e.target;
- if (!this.tooltip && this.displayTooltips) {
- this.tooltip = new Tooltip(this.options);
- this.tooltip.updatePosition(e.pageX, e.pageY);
- }
- this.updateDisplay();
- },
-
- mouseleave: function () {
- $(document.body).unbind('mousemove.jqs');
- var splist = this.splist,
- spcount = splist.length,
- needsRefresh = false,
- sp, i;
- this.over = false;
- this.currentEl = null;
-
- if (this.tooltip) {
- this.tooltip.remove();
- this.tooltip = null;
- }
-
- for (i = 0; i < spcount; i++) {
- sp = splist[i];
- if (sp.clearRegionHighlight()) {
- needsRefresh = true;
- }
- }
-
- if (needsRefresh) {
- this.canvas.render();
- }
- },
-
- mousemove: function (e) {
- this.currentPageX = e.pageX;
- this.currentPageY = e.pageY;
- this.currentEl = e.target;
- if (this.tooltip) {
- this.tooltip.updatePosition(e.pageX, e.pageY);
- }
- this.updateDisplay();
- },
-
- updateDisplay: function () {
- var splist = this.splist,
- spcount = splist.length,
- needsRefresh = false,
- offset = this.$canvas.offset(),
- localX = this.currentPageX - offset.left,
- localY = this.currentPageY - offset.top,
- tooltiphtml, sp, i, result, changeEvent;
- if (!this.over) {
- return;
- }
- for (i = 0; i < spcount; i++) {
- sp = splist[i];
- result = sp.setRegionHighlight(this.currentEl, localX, localY);
- if (result) {
- needsRefresh = true;
- }
- }
- if (needsRefresh) {
- changeEvent = $.Event('sparklineRegionChange');
- changeEvent.sparklines = this.splist;
- this.$el.trigger(changeEvent);
- if (this.tooltip) {
- tooltiphtml = '';
- for (i = 0; i < spcount; i++) {
- sp = splist[i];
- tooltiphtml += sp.getCurrentRegionTooltip();
- }
- this.tooltip.setContent(tooltiphtml);
- }
- if (!this.disableHighlight) {
- this.canvas.render();
- }
- }
- if (result === null) {
- this.mouseleave();
- }
- }
- });
-
-
- Tooltip = createClass({
- sizeStyle: 'position: static !important;' +
- 'display: block !important;' +
- 'visibility: hidden !important;' +
- 'float: left !important;',
-
- init: function (options) {
- var tooltipClassname = options.get('tooltipClassname', 'jqstooltip'),
- sizetipStyle = this.sizeStyle,
- offset;
- this.container = options.get('tooltipContainer') || document.body;
- this.tooltipOffsetX = options.get('tooltipOffsetX', 10);
- this.tooltipOffsetY = options.get('tooltipOffsetY', 12);
- // remove any previous lingering tooltip
- $('#jqssizetip').remove();
- $('#jqstooltip').remove();
- this.sizetip = $('<div/>', {
- id: 'jqssizetip',
- style: sizetipStyle,
- 'class': tooltipClassname
- });
- this.tooltip = $('<div/>', {
- id: 'jqstooltip',
- 'class': tooltipClassname
- }).appendTo(this.container);
- // account for the container's location
- offset = this.tooltip.offset();
- this.offsetLeft = offset.left;
- this.offsetTop = offset.top;
- this.hidden = true;
- $(window).unbind('resize.jqs scroll.jqs');
- $(window).bind('resize.jqs scroll.jqs', $.proxy(this.updateWindowDims, this));
- this.updateWindowDims();
- },
-
- updateWindowDims: function () {
- this.scrollTop = $(window).scrollTop();
- this.scrollLeft = $(window).scrollLeft();
- this.scrollRight = this.scrollLeft + $(window).width();
- this.updatePosition();
- },
-
- getSize: function (content) {
- this.sizetip.html(content).appendTo(this.container);
- this.width = this.sizetip.width() + 1;
- this.height = this.sizetip.height();
- this.sizetip.remove();
- },
-
- setContent: function (content) {
- if (!content) {
- this.tooltip.css('visibility', 'hidden');
- this.hidden = true;
- return;
- }
- this.getSize(content);
- this.tooltip.html(content)
- .css({
- 'width': this.width,
- 'height': this.height,
- 'visibility': 'visible'
- });
- if (this.hidden) {
- this.hidden = false;
- this.updatePosition();
- }
- },
-
- updatePosition: function (x, y) {
- if (x === undefined) {
- if (this.mousex === undefined) {
- return;
- }
- x = this.mousex - this.offsetLeft;
- y = this.mousey - this.offsetTop;
-
- } else {
- this.mousex = x = x - this.offsetLeft;
- this.mousey = y = y - this.offsetTop;
- }
- if (!this.height || !this.width || this.hidden) {
- return;
- }
-
- y -= this.height + this.tooltipOffsetY;
- x += this.tooltipOffsetX;
-
- if (y < this.scrollTop) {
- y = this.scrollTop;
- }
- if (x < this.scrollLeft) {
- x = this.scrollLeft;
- } else if (x + this.width > this.scrollRight) {
- x = this.scrollRight - this.width;
- }
-
- this.tooltip.css({
- 'left': x,
- 'top': y
- });
- },
-
- remove: function () {
- this.tooltip.remove();
- this.sizetip.remove();
- this.sizetip = this.tooltip = undefined;
- $(window).unbind('resize.jqs scroll.jqs');
- }
- });
-
- initStyles = function() {
- addCSS(defaultStyles);
- };
-
- $(initStyles);
-
- pending = [];
- $.fn.sparkline = function (userValues, userOptions) {
- return this.each(function () {
- var options = new $.fn.sparkline.options(this, userOptions),
- $this = $(this),
- render, i;
- render = function () {
- var values, width, height, tmp, mhandler, sp, vals;
- if (userValues === 'html' || userValues === undefined) {
- vals = this.getAttribute(options.get('tagValuesAttribute'));
- if (vals === undefined || vals === null) {
- vals = $this.html();
- }
- values = vals.replace(/(^\s*<!--)|(-->\s*$)|\s+/g, '').split(',');
- } else {
- values = userValues;
- }
-
- width = options.get('width') === 'auto' ? values.length * options.get('defaultPixelsPerValue') : options.get('width');
- if (options.get('height') === 'auto') {
- if (!options.get('composite') || !$.data(this, '_jqs_vcanvas')) {
- // must be a better way to get the line height
- tmp = document.createElement('span');
- tmp.innerHTML = 'a';
- $this.html(tmp);
- height = $(tmp).innerHeight() || $(tmp).height();
- $(tmp).remove();
- tmp = null;
- }
- } else {
- height = options.get('height');
- }
-
- if (!options.get('disableInteraction')) {
- mhandler = $.data(this, '_jqs_mhandler');
- if (!mhandler) {
- mhandler = new MouseHandler(this, options);
- $.data(this, '_jqs_mhandler', mhandler);
- } else if (!options.get('composite')) {
- mhandler.reset();
- }
- } else {
- mhandler = false;
- }
-
- if (options.get('composite') && !$.data(this, '_jqs_vcanvas')) {
- if (!$.data(this, '_jqs_errnotify')) {
- alert('Attempted to attach a composite sparkline to an element with no existing sparkline');
- $.data(this, '_jqs_errnotify', true);
- }
- return;
- }
-
- sp = new $.fn.sparkline[options.get('type')](this, values, options, width, height);
-
- sp.render();
-
- if (mhandler) {
- mhandler.registerSparkline(sp);
- }
- };
- if (($(this).html() && !options.get('disableHiddenCheck') && $(this).is(':hidden')) || !$(this).parents('body').length) {
- if (!options.get('composite') && $.data(this, '_jqs_pending')) {
- // remove any existing references to the element
- for (i = pending.length; i; i--) {
- if (pending[i - 1][0] == this) {
- pending.splice(i - 1, 1);
- }
- }
- }
- pending.push([this, render]);
- $.data(this, '_jqs_pending', true);
- } else {
- render.call(this);
- }
- });
- };
-
- $.fn.sparkline.defaults = getDefaults();
-
-
- $.sparkline_display_visible = function () {
- var el, i, pl;
- var done = [];
- for (i = 0, pl = pending.length; i < pl; i++) {
- el = pending[i][0];
- if ($(el).is(':visible') && !$(el).parents().is(':hidden')) {
- pending[i][1].call(el);
- $.data(pending[i][0], '_jqs_pending', false);
- done.push(i);
- } else if (!$(el).closest('html').length && !$.data(el, '_jqs_pending')) {
- // element has been inserted and removed from the DOM
- // If it was not yet inserted into the dom then the .data request
- // will return true.
- // removing from the dom causes the data to be removed.
- $.data(pending[i][0], '_jqs_pending', false);
- done.push(i);
- }
- }
- for (i = done.length; i; i--) {
- pending.splice(done[i - 1], 1);
- }
- };
-
-
- /**
- * User option handler
- */
- $.fn.sparkline.options = createClass({
- init: function (tag, userOptions) {
- var extendedOptions, defaults, base, tagOptionType;
- this.userOptions = userOptions = userOptions || {};
- this.tag = tag;
- this.tagValCache = {};
- defaults = $.fn.sparkline.defaults;
- base = defaults.common;
- this.tagOptionsPrefix = userOptions.enableTagOptions && (userOptions.tagOptionsPrefix || base.tagOptionsPrefix);
-
- tagOptionType = this.getTagSetting('type');
- if (tagOptionType === UNSET_OPTION) {
- extendedOptions = defaults[userOptions.type || base.type];
- } else {
- extendedOptions = defaults[tagOptionType];
- }
- this.mergedOptions = $.extend({}, base, extendedOptions, userOptions);
- },
-
-
- getTagSetting: function (key) {
- var prefix = this.tagOptionsPrefix,
- val, i, pairs, keyval;
- if (prefix === false || prefix === undefined) {
- return UNSET_OPTION;
- }
- if (this.tagValCache.hasOwnProperty(key)) {
- val = this.tagValCache.key;
- } else {
- val = this.tag.getAttribute(prefix + key);
- if (val === undefined || val === null) {
- val = UNSET_OPTION;
- } else if (val.substr(0, 1) === '[') {
- val = val.substr(1, val.length - 2).split(',');
- for (i = val.length; i--;) {
- val[i] = normalizeValue(val[i].replace(/(^\s*)|(\s*$)/g, ''));
- }
- } else if (val.substr(0, 1) === '{') {
- pairs = val.substr(1, val.length - 2).split(',');
- val = {};
- for (i = pairs.length; i--;) {
- keyval = pairs[i].split(':', 2);
- val[keyval[0].replace(/(^\s*)|(\s*$)/g, '')] = normalizeValue(keyval[1].replace(/(^\s*)|(\s*$)/g, ''));
- }
- } else {
- val = normalizeValue(val);
- }
- this.tagValCache.key = val;
- }
- return val;
- },
-
- get: function (key, defaultval) {
- var tagOption = this.getTagSetting(key),
- result;
- if (tagOption !== UNSET_OPTION) {
- return tagOption;
- }
- return (result = this.mergedOptions[key]) === undefined ? defaultval : result;
- }
- });
-
-
- $.fn.sparkline._base = createClass({
- disabled: false,
-
- init: function (el, values, options, width, height) {
- this.el = el;
- this.$el = $(el);
- this.values = values;
- this.options = options;
- this.width = width;
- this.height = height;
- this.currentRegion = undefined;
- },
-
- /**
- * Setup the canvas
- */
- initTarget: function () {
- var interactive = !this.options.get('disableInteraction');
- if (!(this.target = this.$el.simpledraw(this.width, this.height, this.options.get('composite'), interactive))) {
- this.disabled = true;
- } else {
- this.canvasWidth = this.target.pixelWidth;
- this.canvasHeight = this.target.pixelHeight;
- }
- },
-
- /**
- * Actually render the chart to the canvas
- */
- render: function () {
- if (this.disabled) {
- this.el.innerHTML = '';
- return false;
- }
- return true;
- },
-
- /**
- * Return a region id for a given x/y co-ordinate
- */
- getRegion: function (x, y) {
- },
-
- /**
- * Highlight an item based on the moused-over x,y co-ordinate
- */
- setRegionHighlight: function (el, x, y) {
- var currentRegion = this.currentRegion,
- highlightEnabled = !this.options.get('disableHighlight'),
- newRegion;
- if (x > this.canvasWidth || y > this.canvasHeight || x < 0 || y < 0) {
- return null;
- }
- newRegion = this.getRegion(el, x, y);
- if (currentRegion !== newRegion) {
- if (currentRegion !== undefined && highlightEnabled) {
- this.removeHighlight();
- }
- this.currentRegion = newRegion;
- if (newRegion !== undefined && highlightEnabled) {
- this.renderHighlight();
- }
- return true;
- }
- return false;
- },
-
- /**
- * Reset any currently highlighted item
- */
- clearRegionHighlight: function () {
- if (this.currentRegion !== undefined) {
- this.removeHighlight();
- this.currentRegion = undefined;
- return true;
- }
- return false;
- },
-
- renderHighlight: function () {
- this.changeHighlight(true);
- },
-
- removeHighlight: function () {
- this.changeHighlight(false);
- },
-
- changeHighlight: function (highlight) {},
-
- /**
- * Fetch the HTML to display as a tooltip
- */
- getCurrentRegionTooltip: function () {
- var options = this.options,
- header = '',
- entries = [],
- fields, formats, formatlen, fclass, text, i,
- showFields, showFieldsKey, newFields, fv,
- formatter, format, fieldlen, j;
- if (this.currentRegion === undefined) {
- return '';
- }
- fields = this.getCurrentRegionFields();
- formatter = options.get('tooltipFormatter');
- if (formatter) {
- return formatter(this, options, fields);
- }
- if (options.get('tooltipChartTitle')) {
- header += '<div class="jqs jqstitle">' + options.get('tooltipChartTitle') + '</div>\n';
- }
- formats = this.options.get('tooltipFormat');
- if (!formats) {
- return '';
- }
- if (!$.isArray(formats)) {
- formats = [formats];
- }
- if (!$.isArray(fields)) {
- fields = [fields];
- }
- showFields = this.options.get('tooltipFormatFieldlist');
- showFieldsKey = this.options.get('tooltipFormatFieldlistKey');
- if (showFields && showFieldsKey) {
- // user-selected ordering of fields
- newFields = [];
- for (i = fields.length; i--;) {
- fv = fields[i][showFieldsKey];
- if ((j = $.inArray(fv, showFields)) != -1) {
- newFields[j] = fields[i];
- }
- }
- fields = newFields;
- }
- formatlen = formats.length;
- fieldlen = fields.length;
- for (i = 0; i < formatlen; i++) {
- format = formats[i];
- if (typeof format === 'string') {
- format = new SPFormat(format);
- }
- fclass = format.fclass || 'jqsfield';
- for (j = 0; j < fieldlen; j++) {
- if (!fields[j].isNull || !options.get('tooltipSkipNull')) {
- $.extend(fields[j], {
- prefix: options.get('tooltipPrefix'),
- suffix: options.get('tooltipSuffix')
- });
- text = format.render(fields[j], options.get('tooltipValueLookups'), options);
- entries.push('<div class="' + fclass + '">' + text + '</div>');
- }
- }
- }
- if (entries.length) {
- return header + entries.join('\n');
- }
- return '';
- },
-
- getCurrentRegionFields: function () {},
-
- calcHighlightColor: function (color, options) {
- var highlightColor = options.get('highlightColor'),
- lighten = options.get('highlightLighten'),
- parse, mult, rgbnew, i;
- if (highlightColor) {
- return highlightColor;
- }
- if (lighten) {
- // extract RGB values
- parse = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(color) || /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);
- if (parse) {
- rgbnew = [];
- mult = color.length === 4 ? 16 : 1;
- for (i = 0; i < 3; i++) {
- rgbnew[i] = clipval(Math.round(parseInt(parse[i + 1], 16) * mult * lighten), 0, 255);
- }
- return 'rgb(' + rgbnew.join(',') + ')';
- }
-
- }
- return color;
- }
-
- });
-
- barHighlightMixin = {
- changeHighlight: function (highlight) {
- var currentRegion = this.currentRegion,
- target = this.target,
- shapeids = this.regionShapes[currentRegion],
- newShapes;
- // will be null if the region value was null
- if (shapeids) {
- newShapes = this.renderRegion(currentRegion, highlight);
- if ($.isArray(newShapes) || $.isArray(shapeids)) {
- target.replaceWithShapes(shapeids, newShapes);
- this.regionShapes[currentRegion] = $.map(newShapes, function (newShape) {
- return newShape.id;
- });
- } else {
- target.replaceWithShape(shapeids, newShapes);
- this.regionShapes[currentRegion] = newShapes.id;
- }
- }
- },
-
- render: function () {
- var values = this.values,
- target = this.target,
- regionShapes = this.regionShapes,
- shapes, ids, i, j;
-
- if (!this.cls._super.render.call(this)) {
- return;
- }
- for (i = values.length; i--;) {
- shapes = this.renderRegion(i);
- if (shapes) {
- if ($.isArray(shapes)) {
- ids = [];
- for (j = shapes.length; j--;) {
- shapes[j].append();
- ids.push(shapes[j].id);
- }
- regionShapes[i] = ids;
- } else {
- shapes.append();
- regionShapes[i] = shapes.id; // store just the shapeid
- }
- } else {
- // null value
- regionShapes[i] = null;
- }
- }
- target.render();
- }
- };
-
- /**
- * Line charts
- */
- $.fn.sparkline.line = line = createClass($.fn.sparkline._base, {
- type: 'line',
-
- init: function (el, values, options, width, height) {
- line._super.init.call(this, el, values, options, width, height);
- this.vertices = [];
- this.regionMap = [];
- this.xvalues = [];
- this.yvalues = [];
- this.yminmax = [];
- this.hightlightSpotId = null;
- this.lastShapeId = null;
- this.initTarget();
- },
-
- getRegion: function (el, x, y) {
- var i,
- regionMap = this.regionMap; // maps regions to value positions
- for (i = regionMap.length; i--;) {
- if (regionMap[i] !== null && x >= regionMap[i][0] && x <= regionMap[i][1]) {
- return regionMap[i][2];
- }
- }
- return undefined;
- },
-
- getCurrentRegionFields: function () {
- var currentRegion = this.currentRegion;
- return {
- isNull: this.yvalues[currentRegion] === null,
- x: this.xvalues[currentRegion],
- y: this.yvalues[currentRegion],
- color: this.options.get('lineColor'),
- fillColor: this.options.get('fillColor'),
- offset: currentRegion
- };
- },
-
- renderHighlight: function () {
- var currentRegion = this.currentRegion,
- target = this.target,
- vertex = this.vertices[currentRegion],
- options = this.options,
- spotRadius = options.get('spotRadius'),
- highlightSpotColor = options.get('highlightSpotColor'),
- highlightLineColor = options.get('highlightLineColor'),
- highlightSpot, highlightLine;
-
- if (!vertex) {
- return;
- }
- if (spotRadius && highlightSpotColor) {
- highlightSpot = target.drawCircle(vertex[0], vertex[1],
- spotRadius, undefined, highlightSpotColor);
- this.highlightSpotId = highlightSpot.id;
- target.insertAfterShape(this.lastShapeId, highlightSpot);
- }
- if (highlightLineColor) {
- highlightLine = target.drawLine(vertex[0], this.canvasTop, vertex[0],
- this.canvasTop + this.canvasHeight, highlightLineColor);
- this.highlightLineId = highlightLine.id;
- target.insertAfterShape(this.lastShapeId, highlightLine);
- }
- },
-
- removeHighlight: function () {
- var target = this.target;
- if (this.highlightSpotId) {
- target.removeShapeId(this.highlightSpotId);
- this.highlightSpotId = null;
- }
- if (this.highlightLineId) {
- target.removeShapeId(this.highlightLineId);
- this.highlightLineId = null;
- }
- },
-
- scanValues: function () {
- var values = this.values,
- valcount = values.length,
- xvalues = this.xvalues,
- yvalues = this.yvalues,
- yminmax = this.yminmax,
- i, val, isStr, isArray, sp;
- for (i = 0; i < valcount; i++) {
- val = values[i];
- isStr = typeof(values[i]) === 'string';
- isArray = typeof(values[i]) === 'object' && values[i] instanceof Array;
- sp = isStr && values[i].split(':');
- if (isStr && sp.length === 2) { // x:y
- xvalues.push(Number(sp[0]));
- yvalues.push(Number(sp[1]));
- yminmax.push(Number(sp[1]));
- } else if (isArray) {
- xvalues.push(val[0]);
- yvalues.push(val[1]);
- yminmax.push(val[1]);
- } else {
- xvalues.push(i);
- if (values[i] === null || values[i] === 'null') {
- yvalues.push(null);
- } else {
- yvalues.push(Number(val));
- yminmax.push(Number(val));
- }
- }
- }
- if (this.options.get('xvalues')) {
- xvalues = this.options.get('xvalues');
- }
-
- this.maxy = this.maxyorg = Math.max.apply(Math, yminmax);
- this.miny = this.minyorg = Math.min.apply(Math, yminmax);
-
- this.maxx = Math.max.apply(Math, xvalues);
- this.minx = Math.min.apply(Math, xvalues);
-
- this.xvalues = xvalues;
- this.yvalues = yvalues;
- this.yminmax = yminmax;
-
- },
-
- processRangeOptions: function () {
- var options = this.options,
- normalRangeMin = options.get('normalRangeMin'),
- normalRangeMax = options.get('normalRangeMax');
-
- if (normalRangeMin !== undefined) {
- if (normalRangeMin < this.miny) {
- this.miny = normalRangeMin;
- }
- if (normalRangeMax > this.maxy) {
- this.maxy = normalRangeMax;
- }
- }
- if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.miny)) {
- this.miny = options.get('chartRangeMin');
- }
- if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.maxy)) {
- this.maxy = options.get('chartRangeMax');
- }
- if (options.get('chartRangeMinX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX') < this.minx)) {
- this.minx = options.get('chartRangeMinX');
- }
- if (options.get('chartRangeMaxX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMaxX') > this.maxx)) {
- this.maxx = options.get('chartRangeMaxX');
- }
-
- },
-
- drawNormalRange: function (canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey) {
- var normalRangeMin = this.options.get('normalRangeMin'),
- normalRangeMax = this.options.get('normalRangeMax'),
- ytop = canvasTop + Math.round(canvasHeight - (canvasHeight * ((normalRangeMax - this.miny) / rangey))),
- height = Math.round((canvasHeight * (normalRangeMax - normalRangeMin)) / rangey);
- this.target.drawRect(canvasLeft, ytop, canvasWidth, height, undefined, this.options.get('normalRangeColor')).append();
- },
-
- render: function () {
- var options = this.options,
- target = this.target,
- canvasWidth = this.canvasWidth,
- canvasHeight = this.canvasHeight,
- vertices = this.vertices,
- spotRadius = options.get('spotRadius'),
- regionMap = this.regionMap,
- rangex, rangey, yvallast,
- canvasTop, canvasLeft,
- vertex, path, paths, x, y, xnext, xpos, xposnext,
- last, next, yvalcount, lineShapes, fillShapes, plen,
- valueSpots, hlSpotsEnabled, color, xvalues, yvalues, i;
-
- if (!line._super.render.call(this)) {
- return;
- }
-
- this.scanValues();
- this.processRangeOptions();
-
- xvalues = this.xvalues;
- yvalues = this.yvalues;
-
- if (!this.yminmax.length || this.yvalues.length < 2) {
- // empty or all null valuess
- return;
- }
-
- canvasTop = canvasLeft = 0;
-
- rangex = this.maxx - this.minx === 0 ? 1 : this.maxx - this.minx;
- rangey = this.maxy - this.miny === 0 ? 1 : this.maxy - this.miny;
- yvallast = this.yvalues.length - 1;
-
- if (spotRadius && (canvasWidth < (spotRadius * 4) || canvasHeight < (spotRadius * 4))) {
- spotRadius = 0;
- }
- if (spotRadius) {
- // adjust the canvas size as required so that spots will fit
- hlSpotsEnabled = options.get('highlightSpotColor') && !options.get('disableInteraction');
- if (hlSpotsEnabled || options.get('minSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.miny)) {
- canvasHeight -= Math.ceil(spotRadius);
- }
- if (hlSpotsEnabled || options.get('maxSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.maxy)) {
- canvasHeight -= Math.ceil(spotRadius);
- canvasTop += Math.ceil(spotRadius);
- }
- if (hlSpotsEnabled ||
- ((options.get('minSpotColor') || options.get('maxSpotColor')) && (yvalues[0] === this.miny || yvalues[0] === this.maxy))) {
- canvasLeft += Math.ceil(spotRadius);
- canvasWidth -= Math.ceil(spotRadius);
- }
- if (hlSpotsEnabled || options.get('spotColor') ||
- (options.get('minSpotColor') || options.get('maxSpotColor') &&
- (yvalues[yvallast] === this.miny || yvalues[yvallast] === this.maxy))) {
- canvasWidth -= Math.ceil(spotRadius);
- }
- }
-
-
- canvasHeight--;
-
- if (options.get('normalRangeMin') !== undefined && !options.get('drawNormalOnTop')) {
- this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);
- }
-
- path = [];
- paths = [path];
- last = next = null;
- yvalcount = yvalues.length;
- for (i = 0; i < yvalcount; i++) {
- x = xvalues[i];
- xnext = xvalues[i + 1];
- y = yvalues[i];
- xpos = canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex));
- xposnext = i < yvalcount - 1 ? canvasLeft + Math.round((xnext - this.minx) * (canvasWidth / rangex)) : canvasWidth;
- next = xpos + ((xposnext - xpos) / 2);
- regionMap[i] = [last || 0, next, i];
- last = next;
- if (y === null) {
- if (i) {
- if (yvalues[i - 1] !== null) {
- path = [];
- paths.push(path);
- }
- vertices.push(null);
- }
- } else {
- if (y < this.miny) {
- y = this.miny;
- }
- if (y > this.maxy) {
- y = this.maxy;
- }
- if (!path.length) {
- // previous value was null
- path.push([xpos, canvasTop + canvasHeight]);
- }
- vertex = [xpos, canvasTop + Math.round(canvasHeight - (canvasHeight * ((y - this.miny) / rangey)))];
- path.push(vertex);
- vertices.push(vertex);
- }
- }
-
- lineShapes = [];
- fillShapes = [];
- plen = paths.length;
- for (i = 0; i < plen; i++) {
- path = paths[i];
- if (path.length) {
- if (options.get('fillColor')) {
- path.push([path[path.length - 1][0], (canvasTop + canvasHeight)]);
- fillShapes.push(path.slice(0));
- path.pop();
- }
- // if there's only a single point in this path, then we want to display it
- // as a vertical line which means we keep path[0] as is
- if (path.length > 2) {
- // else we want the first value
- path[0] = [path[0][0], path[1][1]];
- }
- lineShapes.push(path);
- }
- }
-
- // draw the fill first, then optionally the normal range, then the line on top of that
- plen = fillShapes.length;
- for (i = 0; i < plen; i++) {
- target.drawShape(fillShapes[i],
- options.get('fillColor'), options.get('fillColor')).append();
- }
-
- if (options.get('normalRangeMin') !== undefined && options.get('drawNormalOnTop')) {
- this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);
- }
-
- plen = lineShapes.length;
- for (i = 0; i < plen; i++) {
- target.drawShape(lineShapes[i], options.get('lineColor'), undefined,
- options.get('lineWidth')).append();
- }
-
- if (spotRadius && options.get('valueSpots')) {
- valueSpots = options.get('valueSpots');
- if (valueSpots.get === undefined) {
- valueSpots = new RangeMap(valueSpots);
- }
- for (i = 0; i < yvalcount; i++) {
- color = valueSpots.get(yvalues[i]);
- if (color) {
- target.drawCircle(canvasLeft + Math.round((xvalues[i] - this.minx) * (canvasWidth / rangex)),
- canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[i] - this.miny) / rangey))),
- spotRadius, undefined,
- color).append();
- }
- }
-
- }
- if (spotRadius && options.get('spotColor') && yvalues[yvallast] !== null) {
- target.drawCircle(canvasLeft + Math.round((xvalues[xvalues.length - 1] - this.minx) * (canvasWidth / rangex)),
- canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[yvallast] - this.miny) / rangey))),
- spotRadius, undefined,
- options.get('spotColor')).append();
- }
- if (this.maxy !== this.minyorg) {
- if (spotRadius && options.get('minSpotColor')) {
- x = xvalues[$.inArray(this.minyorg, yvalues)];
- target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),
- canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.minyorg - this.miny) / rangey))),
- spotRadius, undefined,
- options.get('minSpotColor')).append();
- }
- if (spotRadius && options.get('maxSpotColor')) {
- x = xvalues[$.inArray(this.maxyorg, yvalues)];
- target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),
- canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.maxyorg - this.miny) / rangey))),
- spotRadius, undefined,
- options.get('maxSpotColor')).append();
- }
- }
-
- this.lastShapeId = target.getLastShapeId();
- this.canvasTop = canvasTop;
- target.render();
- }
- });
-
- /**
- * Bar charts
- */
- $.fn.sparkline.bar = bar = createClass($.fn.sparkline._base, barHighlightMixin, {
- type: 'bar',
-
- init: function (el, values, options, width, height) {
- var barWidth = parseInt(options.get('barWidth'), 10),
- barSpacing = parseInt(options.get('barSpacing'), 10),
- chartRangeMin = options.get('chartRangeMin'),
- chartRangeMax = options.get('chartRangeMax'),
- chartRangeClip = options.get('chartRangeClip'),
- stackMin = Infinity,
- stackMax = -Infinity,
- isStackString, groupMin, groupMax, stackRanges,
- numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax,
- stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf;
- bar._super.init.call(this, el, values, options, width, height);
-
- // scan values to determine whether to stack bars
- for (i = 0, vlen = values.length; i < vlen; i++) {
- val = values[i];
- isStackString = typeof(val) === 'string' && val.indexOf(':') > -1;
- if (isStackString || $.isArray(val)) {
- stacked = true;
- if (isStackString) {
- val = values[i] = normalizeValues(val.split(':'));
- }
- val = remove(val, null); // min/max will treat null as zero
- groupMin = Math.min.apply(Math, val);
- groupMax = Math.max.apply(Math, val);
- if (groupMin < stackMin) {
- stackMin = groupMin;
- }
- if (groupMax > stackMax) {
- stackMax = groupMax;
- }
- }
- }
-
- this.stacked = stacked;
- this.regionShapes = {};
- this.barWidth = barWidth;
- this.barSpacing = barSpacing;
- this.totalBarWidth = barWidth + barSpacing;
- this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);
-
- this.initTarget();
-
- if (chartRangeClip) {
- clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin;
- clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax;
- }
-
- numValues = [];
- stackRanges = stacked ? [] : numValues;
- var stackTotals = [];
- var stackRangesNeg = [];
- for (i = 0, vlen = values.length; i < vlen; i++) {
- if (stacked) {
- vlist = values[i];
- values[i] = svals = [];
- stackTotals[i] = 0;
- stackRanges[i] = stackRangesNeg[i] = 0;
- for (j = 0, slen = vlist.length; j < slen; j++) {
- val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j];
- if (val !== null) {
- if (val > 0) {
- stackTotals[i] += val;
- }
- if (stackMin < 0 && stackMax > 0) {
- if (val < 0) {
- stackRangesNeg[i] += Math.abs(val);
- } else {
- stackRanges[i] += val;
- }
- } else {
- stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin));
- }
- numValues.push(val);
- }
- }
- } else {
- val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i];
- val = values[i] = normalizeValue(val);
- if (val !== null) {
- numValues.push(val);
- }
- }
- }
- this.max = max = Math.max.apply(Math, numValues);
- this.min = min = Math.min.apply(Math, numValues);
- this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max;
- this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min;
-
- if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) {
- min = options.get('chartRangeMin');
- }
- if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) {
- max = options.get('chartRangeMax');
- }
-
- this.zeroAxis = zeroAxis = options.get('zeroAxis', true);
- if (min <= 0 && max >= 0 && zeroAxis) {
- xaxisOffset = 0;
- } else if (zeroAxis == false) {
- xaxisOffset = min;
- } else if (min > 0) {
- xaxisOffset = min;
- } else {
- xaxisOffset = max;
- }
- this.xaxisOffset = xaxisOffset;
-
- range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - min;
-
- // as we plot zero/min values a single pixel line, we add a pixel to all other
- // values - Reduce the effective canvas size to suit
- this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1;
-
- if (min < xaxisOffset) {
- yMaxCalc = (stacked && max >= 0) ? stackMax : max;
- yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight;
- if (yoffset !== Math.ceil(yoffset)) {
- this.canvasHeightEf -= 2;
- yoffset = Math.ceil(yoffset);
- }
- } else {
- yoffset = this.canvasHeight;
- }
- this.yoffset = yoffset;
-
- if ($.isArray(options.get('colorMap'))) {
- this.colorMapByIndex = options.get('colorMap');
- this.colorMapByValue = null;
- } else {
- this.colorMapByIndex = null;
- this.colorMapByValue = options.get('colorMap');
- if (this.colorMapByValue && this.colorMapByValue.get === undefined) {
- this.colorMapByValue = new RangeMap(this.colorMapByValue);
- }
- }
-
- this.range = range;
- },
-
- getRegion: function (el, x, y) {
- var result = Math.floor(x / this.totalBarWidth);
- return (result < 0 || result >= this.values.length) ? undefined : result;
- },
-
- getCurrentRegionFields: function () {
- var currentRegion = this.currentRegion,
- values = ensureArray(this.values[currentRegion]),
- result = [],
- value, i;
- for (i = values.length; i--;) {
- value = values[i];
- result.push({
- isNull: value === null,
- value: value,
- color: this.calcColor(i, value, currentRegion),
- offset: currentRegion
- });
- }
- return result;
- },
-
- calcColor: function (stacknum, value, valuenum) {
- var colorMapByIndex = this.colorMapByIndex,
- colorMapByValue = this.colorMapByValue,
- options = this.options,
- color, newColor;
- if (this.stacked) {
- color = options.get('stackedBarColor');
- } else {
- color = (value < 0) ? options.get('negBarColor') : options.get('barColor');
- }
- if (value === 0 && options.get('zeroColor') !== undefined) {
- color = options.get('zeroColor');
- }
- if (colorMapByValue && (newColor = colorMapByValue.get(value))) {
- color = newColor;
- } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {
- color = colorMapByIndex[valuenum];
- }
- return $.isArray(color) ? color[stacknum % color.length] : color;
- },
-
- /**
- * Render bar(s) for a region
- */
- renderRegion: function (valuenum, highlight) {
- var vals = this.values[valuenum],
- options = this.options,
- xaxisOffset = this.xaxisOffset,
- result = [],
- range = this.range,
- stacked = this.stacked,
- target = this.target,
- x = valuenum * this.totalBarWidth,
- canvasHeightEf = this.canvasHeightEf,
- yoffset = this.yoffset,
- y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin;
-
- vals = $.isArray(vals) ? vals : [vals];
- valcount = vals.length;
- val = vals[0];
- isNull = all(null, vals);
- allMin = all(xaxisOffset, vals, true);
-
- if (isNull) {
- if (options.get('nullColor')) {
- color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options);
- y = (yoffset > 0) ? yoffset - 1 : yoffset;
- return target.drawRect(x, y, this.barWidth - 1, 0, color, color);
- } else {
- return undefined;
- }
- }
- yoffsetNeg = yoffset;
- for (i = 0; i < valcount; i++) {
- val = vals[i];
-
- if (stacked && val === xaxisOffset) {
- if (!allMin || minPlotted) {
- continue;
- }
- minPlotted = true;
- }
-
- if (range > 0) {
- height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))) + 1;
- } else {
- height = 1;
- }
- if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) {
- y = yoffsetNeg;
- yoffsetNeg += height;
- } else {
- y = yoffset - height;
- yoffset -= height;
- }
- color = this.calcColor(i, val, valuenum);
- if (highlight) {
- color = this.calcHighlightColor(color, options);
- }
- result.push(target.drawRect(x, y, this.barWidth - 1, height - 1, color, color));
- }
- if (result.length === 1) {
- return result[0];
- }
- return result;
- }
- });
-
- /**
- * Tristate charts
- */
- $.fn.sparkline.tristate = tristate = createClass($.fn.sparkline._base, barHighlightMixin, {
- type: 'tristate',
-
- init: function (el, values, options, width, height) {
- var barWidth = parseInt(options.get('barWidth'), 10),
- barSpacing = parseInt(options.get('barSpacing'), 10);
- tristate._super.init.call(this, el, values, options, width, height);
-
- this.regionShapes = {};
- this.barWidth = barWidth;
- this.barSpacing = barSpacing;
- this.totalBarWidth = barWidth + barSpacing;
- this.values = $.map(values, Number);
- this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);
-
- if ($.isArray(options.get('colorMap'))) {
- this.colorMapByIndex = options.get('colorMap');
- this.colorMapByValue = null;
- } else {
- this.colorMapByIndex = null;
- this.colorMapByValue = options.get('colorMap');
- if (this.colorMapByValue && this.colorMapByValue.get === undefined) {
- this.colorMapByValue = new RangeMap(this.colorMapByValue);
- }
- }
- this.initTarget();
- },
-
- getRegion: function (el, x, y) {
- return Math.floor(x / this.totalBarWidth);
- },
-
- getCurrentRegionFields: function () {
- var currentRegion = this.currentRegion;
- return {
- isNull: this.values[currentRegion] === undefined,
- value: this.values[currentRegion],
- color: this.calcColor(this.values[currentRegion], currentRegion),
- offset: currentRegion
- };
- },
-
- calcColor: function (value, valuenum) {
- var values = this.values,
- options = this.options,
- colorMapByIndex = this.colorMapByIndex,
- colorMapByValue = this.colorMapByValue,
- color, newColor;
-
- if (colorMapByValue && (newColor = colorMapByValue.get(value))) {
- color = newColor;
- } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {
- color = colorMapByIndex[valuenum];
- } else if (values[valuenum] < 0) {
- color = options.get('negBarColor');
- } else if (values[valuenum] > 0) {
- color = options.get('posBarColor');
- } else {
- color = options.get('zeroBarColor');
- }
- return color;
- },
-
- renderRegion: function (valuenum, highlight) {
- var values = this.values,
- options = this.options,
- target = this.target,
- canvasHeight, height, halfHeight,
- x, y, color;
-
- canvasHeight = target.pixelHeight;
- halfHeight = Math.round(canvasHeight / 2);
-
- x = valuenum * this.totalBarWidth;
- if (values[valuenum] < 0) {
- y = halfHeight;
- height = halfHeight - 1;
- } else if (values[valuenum] > 0) {
- y = 0;
- height = halfHeight - 1;
- } else {
- y = halfHeight - 1;
- height = 2;
- }
- color = this.calcColor(values[valuenum], valuenum);
- if (color === null) {
- return;
- }
- if (highlight) {
- color = this.calcHighlightColor(color, options);
- }
- return target.drawRect(x, y, this.barWidth - 1, height - 1, color, color);
- }
- });
-
- /**
- * Discrete charts
- */
- $.fn.sparkline.discrete = discrete = createClass($.fn.sparkline._base, barHighlightMixin, {
- type: 'discrete',
-
- init: function (el, values, options, width, height) {
- discrete._super.init.call(this, el, values, options, width, height);
-
- this.regionShapes = {};
- this.values = values = $.map(values, Number);
- this.min = Math.min.apply(Math, values);
- this.max = Math.max.apply(Math, values);
- this.range = this.max - this.min;
- this.width = width = options.get('width') === 'auto' ? values.length * 2 : this.width;
- this.interval = Math.floor(width / values.length);
- this.itemWidth = width / values.length;
- if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.min)) {
- this.min = options.get('chartRangeMin');
- }
- if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.max)) {
- this.max = options.get('chartRangeMax');
- }
- this.initTarget();
- if (this.target) {
- this.lineHeight = options.get('lineHeight') === 'auto' ? Math.round(this.canvasHeight * 0.3) : options.get('lineHeight');
- }
- },
-
- getRegion: function (el, x, y) {
- return Math.floor(x / this.itemWidth);
- },
-
- getCurrentRegionFields: function () {
- var currentRegion = this.currentRegion;
- return {
- isNull: this.values[currentRegion] === undefined,
- value: this.values[currentRegion],
- offset: currentRegion
- };
- },
-
- renderRegion: function (valuenum, highlight) {
- var values = this.values,
- options = this.options,
- min = this.min,
- max = this.max,
- range = this.range,
- interval = this.interval,
- target = this.target,
- canvasHeight = this.canvasHeight,
- lineHeight = this.lineHeight,
- pheight = canvasHeight - lineHeight,
- ytop, val, color, x;
-
- val = clipval(values[valuenum], min, max);
- x = valuenum * interval;
- ytop = Math.round(pheight - pheight * ((val - min) / range));
- color = (options.get('thresholdColor') && val < options.get('thresholdValue')) ? options.get('thresholdColor') : options.get('lineColor');
- if (highlight) {
- color = this.calcHighlightColor(color, options);
- }
- return target.drawLine(x, ytop, x, ytop + lineHeight, color);
- }
- });
-
- /**
- * Bullet charts
- */
- $.fn.sparkline.bullet = bullet = createClass($.fn.sparkline._base, {
- type: 'bullet',
-
- init: function (el, values, options, width, height) {
- var min, max, vals;
- bullet._super.init.call(this, el, values, options, width, height);
-
- // values: target, performance, range1, range2, range3
- this.values = values = normalizeValues(values);
- // target or performance could be null
- vals = values.slice();
- vals[0] = vals[0] === null ? vals[2] : vals[0];
- vals[1] = values[1] === null ? vals[2] : vals[1];
- min = Math.min.apply(Math, values);
- max = Math.max.apply(Math, values);
- if (options.get('base') === undefined) {
- min = min < 0 ? min : 0;
- } else {
- min = options.get('base');
- }
- this.min = min;
- this.max = max;
- this.range = max - min;
- this.shapes = {};
- this.valueShapes = {};
- this.regiondata = {};
- this.width = width = options.get('width') === 'auto' ? '4.0em' : width;
- this.target = this.$el.simpledraw(width, height, options.get('composite'));
- if (!values.length) {
- this.disabled = true;
- }
- this.initTarget();
- },
-
- getRegion: function (el, x, y) {
- var shapeid = this.target.getShapeAt(el, x, y);
- return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;
- },
-
- getCurrentRegionFields: function () {
- var currentRegion = this.currentRegion;
- return {
- fieldkey: currentRegion.substr(0, 1),
- value: this.values[currentRegion.substr(1)],
- region: currentRegion
- };
- },
-
- changeHighlight: function (highlight) {
- var currentRegion = this.currentRegion,
- shapeid = this.valueShapes[currentRegion],
- shape;
- delete this.shapes[shapeid];
- switch (currentRegion.substr(0, 1)) {
- case 'r':
- shape = this.renderRange(currentRegion.substr(1), highlight);
- break;
- case 'p':
- shape = this.renderPerformance(highlight);
- break;
- case 't':
- shape = this.renderTarget(highlight);
- break;
- }
- this.valueShapes[currentRegion] = shape.id;
- this.shapes[shape.id] = currentRegion;
- this.target.replaceWithShape(shapeid, shape);
- },
-
- renderRange: function (rn, highlight) {
- var rangeval = this.values[rn],
- rangewidth = Math.round(this.canvasWidth * ((rangeval - this.min) / this.range)),
- color = this.options.get('rangeColors')[rn - 2];
- if (highlight) {
- color = this.calcHighlightColor(color, this.options);
- }
- return this.target.drawRect(0, 0, rangewidth - 1, this.canvasHeight - 1, color, color);
- },
-
- renderPerformance: function (highlight) {
- var perfval = this.values[1],
- perfwidth = Math.round(this.canvasWidth * ((perfval - this.min) / this.range)),
- color = this.options.get('performanceColor');
- if (highlight) {
- color = this.calcHighlightColor(color, this.options);
- }
- return this.target.drawRect(0, Math.round(this.canvasHeight * 0.3), perfwidth - 1,
- Math.round(this.canvasHeight * 0.4) - 1, color, color);
- },
-
- renderTarget: function (highlight) {
- var targetval = this.values[0],
- x = Math.round(this.canvasWidth * ((targetval - this.min) / this.range) - (this.options.get('targetWidth') / 2)),
- targettop = Math.round(this.canvasHeight * 0.10),
- targetheight = this.canvasHeight - (targettop * 2),
- color = this.options.get('targetColor');
- if (highlight) {
- color = this.calcHighlightColor(color, this.options);
- }
- return this.target.drawRect(x, targettop, this.options.get('targetWidth') - 1, targetheight - 1, color, color);
- },
-
- render: function () {
- var vlen = this.values.length,
- target = this.target,
- i, shape;
- if (!bullet._super.render.call(this)) {
- return;
- }
- for (i = 2; i < vlen; i++) {
- shape = this.renderRange(i).append();
- this.shapes[shape.id] = 'r' + i;
- this.valueShapes['r' + i] = shape.id;
- }
- if (this.values[1] !== null) {
- shape = this.renderPerformance().append();
- this.shapes[shape.id] = 'p1';
- this.valueShapes.p1 = shape.id;
- }
- if (this.values[0] !== null) {
- shape = this.renderTarget().append();
- this.shapes[shape.id] = 't0';
- this.valueShapes.t0 = shape.id;
- }
- target.render();
- }
- });
-
- /**
- * Pie charts
- */
- $.fn.sparkline.pie = pie = createClass($.fn.sparkline._base, {
- type: 'pie',
-
- init: function (el, values, options, width, height) {
- var total = 0, i;
-
- pie._super.init.call(this, el, values, options, width, height);
-
- this.shapes = {}; // map shape ids to value offsets
- this.valueShapes = {}; // maps value offsets to shape ids
- this.values = values = $.map(values, Number);
-
- if (options.get('width') === 'auto') {
- this.width = this.height;
- }
-
- if (values.length > 0) {
- for (i = values.length; i--;) {
- total += values[i];
- }
- }
- this.total = total;
- this.initTarget();
- this.radius = Math.floor(Math.min(this.canvasWidth, this.canvasHeight) / 2);
- },
-
- getRegion: function (el, x, y) {
- var shapeid = this.target.getShapeAt(el, x, y);
- return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;
- },
-
- getCurrentRegionFields: function () {
- var currentRegion = this.currentRegion;
- return {
- isNull: this.values[currentRegion] === undefined,
- value: this.values[currentRegion],
- percent: this.values[currentRegion] / this.total * 100,
- color: this.options.get('sliceColors')[currentRegion % this.options.get('sliceColors').length],
- offset: currentRegion
- };
- },
-
- changeHighlight: function (highlight) {
- var currentRegion = this.currentRegion,
- newslice = this.renderSlice(currentRegion, highlight),
- shapeid = this.valueShapes[currentRegion];
- delete this.shapes[shapeid];
- this.target.replaceWithShape(shapeid, newslice);
- this.valueShapes[currentRegion] = newslice.id;
- this.shapes[newslice.id] = currentRegion;
- },
-
- renderSlice: function (valuenum, highlight) {
- var target = this.target,
- options = this.options,
- radius = this.radius,
- borderWidth = options.get('borderWidth'),
- offset = options.get('offset'),
- circle = 2 * Math.PI,
- values = this.values,
- total = this.total,
- next = offset ? (2*Math.PI)*(offset/360) : 0,
- start, end, i, vlen, color;
-
- vlen = values.length;
- for (i = 0; i < vlen; i++) {
- start = next;
- end = next;
- if (total > 0) { // avoid divide by zero
- end = next + (circle * (values[i] / total));
- }
- if (valuenum === i) {
- color = options.get('sliceColors')[i % options.get('sliceColors').length];
- if (highlight) {
- color = this.calcHighlightColor(color, options);
- }
-
- return target.drawPieSlice(radius, radius, radius - borderWidth, start, end, undefined, color);
- }
- next = end;
- }
- },
-
- render: function () {
- var target = this.target,
- values = this.values,
- options = this.options,
- radius = this.radius,
- borderWidth = options.get('borderWidth'),
- shape, i;
-
- if (!pie._super.render.call(this)) {
- return;
- }
- if (borderWidth) {
- target.drawCircle(radius, radius, Math.floor(radius - (borderWidth / 2)),
- options.get('borderColor'), undefined, borderWidth).append();
- }
- for (i = values.length; i--;) {
- if (values[i]) { // don't render zero values
- shape = this.renderSlice(i).append();
- this.valueShapes[i] = shape.id; // store just the shapeid
- this.shapes[shape.id] = i;
- }
- }
- target.render();
- }
- });
-
- /**
- * Box plots
- */
- $.fn.sparkline.box = box = createClass($.fn.sparkline._base, {
- type: 'box',
-
- init: function (el, values, options, width, height) {
- box._super.init.call(this, el, values, options, width, height);
- this.values = $.map(values, Number);
- this.width = options.get('width') === 'auto' ? '4.0em' : width;
- this.initTarget();
- if (!this.values.length) {
- this.disabled = 1;
- }
- },
-
- /**
- * Simulate a single region
- */
- getRegion: function () {
- return 1;
- },
-
- getCurrentRegionFields: function () {
- var result = [
- { field: 'lq', value: this.quartiles[0] },
- { field: 'med', value: this.quartiles[1] },
- { field: 'uq', value: this.quartiles[2] }
- ];
- if (this.loutlier !== undefined) {
- result.push({ field: 'lo', value: this.loutlier});
- }
- if (this.routlier !== undefined) {
- result.push({ field: 'ro', value: this.routlier});
- }
- if (this.lwhisker !== undefined) {
- result.push({ field: 'lw', value: this.lwhisker});
- }
- if (this.rwhisker !== undefined) {
- result.push({ field: 'rw', value: this.rwhisker});
- }
- return result;
- },
-
- render: function () {
- var target = this.target,
- values = this.values,
- vlen = values.length,
- options = this.options,
- canvasWidth = this.canvasWidth,
- canvasHeight = this.canvasHeight,
- minValue = options.get('chartRangeMin') === undefined ? Math.min.apply(Math, values) : options.get('chartRangeMin'),
- maxValue = options.get('chartRangeMax') === undefined ? Math.max.apply(Math, values) : options.get('chartRangeMax'),
- canvasLeft = 0,
- lwhisker, loutlier, iqr, q1, q2, q3, rwhisker, routlier, i,
- size, unitSize;
-
- if (!box._super.render.call(this)) {
- return;
- }
-
- if (options.get('raw')) {
- if (options.get('showOutliers') && values.length > 5) {
- loutlier = values[0];
- lwhisker = values[1];
- q1 = values[2];
- q2 = values[3];
- q3 = values[4];
- rwhisker = values[5];
- routlier = values[6];
- } else {
- lwhisker = values[0];
- q1 = values[1];
- q2 = values[2];
- q3 = values[3];
- rwhisker = values[4];
- }
- } else {
- values.sort(function (a, b) { return a - b; });
- q1 = quartile(values, 1);
- q2 = quartile(values, 2);
- q3 = quartile(values, 3);
- iqr = q3 - q1;
- if (options.get('showOutliers')) {
- lwhisker = rwhisker = undefined;
- for (i = 0; i < vlen; i++) {
- if (lwhisker === undefined && values[i] > q1 - (iqr * options.get('outlierIQR'))) {
- lwhisker = values[i];
- }
- if (values[i] < q3 + (iqr * options.get('outlierIQR'))) {
- rwhisker = values[i];
- }
- }
- loutlier = values[0];
- routlier = values[vlen - 1];
- } else {
- lwhisker = values[0];
- rwhisker = values[vlen - 1];
- }
- }
- this.quartiles = [q1, q2, q3];
- this.lwhisker = lwhisker;
- this.rwhisker = rwhisker;
- this.loutlier = loutlier;
- this.routlier = routlier;
-
- unitSize = canvasWidth / (maxValue - minValue + 1);
- if (options.get('showOutliers')) {
- canvasLeft = Math.ceil(options.get('spotRadius'));
- canvasWidth -= 2 * Math.ceil(options.get('spotRadius'));
- unitSize = canvasWidth / (maxValue - minValue + 1);
- if (loutlier < lwhisker) {
- target.drawCircle((loutlier - minValue) * unitSize + canvasLeft,
- canvasHeight / 2,
- options.get('spotRadius'),
- options.get('outlierLineColor'),
- options.get('outlierFillColor')).append();
- }
- if (routlier > rwhisker) {
- target.drawCircle((routlier - minValue) * unitSize + canvasLeft,
- canvasHeight / 2,
- options.get('spotRadius'),
- options.get('outlierLineColor'),
- options.get('outlierFillColor')).append();
- }
- }
-
- // box
- target.drawRect(
- Math.round((q1 - minValue) * unitSize + canvasLeft),
- Math.round(canvasHeight * 0.1),
- Math.round((q3 - q1) * unitSize),
- Math.round(canvasHeight * 0.8),
- options.get('boxLineColor'),
- options.get('boxFillColor')).append();
- // left whisker
- target.drawLine(
- Math.round((lwhisker - minValue) * unitSize + canvasLeft),
- Math.round(canvasHeight / 2),
- Math.round((q1 - minValue) * unitSize + canvasLeft),
- Math.round(canvasHeight / 2),
- options.get('lineColor')).append();
- target.drawLine(
- Math.round((lwhisker - minValue) * unitSize + canvasLeft),
- Math.round(canvasHeight / 4),
- Math.round((lwhisker - minValue) * unitSize + canvasLeft),
- Math.round(canvasHeight - canvasHeight / 4),
- options.get('whiskerColor')).append();
- // right whisker
- target.drawLine(Math.round((rwhisker - minValue) * unitSize + canvasLeft),
- Math.round(canvasHeight / 2),
- Math.round((q3 - minValue) * unitSize + canvasLeft),
- Math.round(canvasHeight / 2),
- options.get('lineColor')).append();
- target.drawLine(
- Math.round((rwhisker - minValue) * unitSize + canvasLeft),
- Math.round(canvasHeight / 4),
- Math.round((rwhisker - minValue) * unitSize + canvasLeft),
- Math.round(canvasHeight - canvasHeight / 4),
- options.get('whiskerColor')).append();
- // median line
- target.drawLine(
- Math.round((q2 - minValue) * unitSize + canvasLeft),
- Math.round(canvasHeight * 0.1),
- Math.round((q2 - minValue) * unitSize + canvasLeft),
- Math.round(canvasHeight * 0.9),
- options.get('medianColor')).append();
- if (options.get('target')) {
- size = Math.ceil(options.get('spotRadius'));
- target.drawLine(
- Math.round((options.get('target') - minValue) * unitSize + canvasLeft),
- Math.round((canvasHeight / 2) - size),
- Math.round((options.get('target') - minValue) * unitSize + canvasLeft),
- Math.round((canvasHeight / 2) + size),
- options.get('targetColor')).append();
- target.drawLine(
- Math.round((options.get('target') - minValue) * unitSize + canvasLeft - size),
- Math.round(canvasHeight / 2),
- Math.round((options.get('target') - minValue) * unitSize + canvasLeft + size),
- Math.round(canvasHeight / 2),
- options.get('targetColor')).append();
- }
- target.render();
- }
- });
-
- // Setup a very simple "virtual canvas" to make drawing the few shapes we need easier
- // This is accessible as $(foo).simpledraw()
-
- VShape = createClass({
- init: function (target, id, type, args) {
- this.target = target;
- this.id = id;
- this.type = type;
- this.args = args;
- },
- append: function () {
- this.target.appendShape(this);
- return this;
- }
- });
-
- VCanvas_base = createClass({
- _pxregex: /(\d+)(px)?\s*$/i,
-
- init: function (width, height, target) {
- if (!width) {
- return;
- }
- this.width = width;
- this.height = height;
- this.target = target;
- this.lastShapeId = null;
- if (target[0]) {
- target = target[0];
- }
- $.data(target, '_jqs_vcanvas', this);
- },
-
- drawLine: function (x1, y1, x2, y2, lineColor, lineWidth) {
- return this.drawShape([[x1, y1], [x2, y2]], lineColor, lineWidth);
- },
-
- drawShape: function (path, lineColor, fillColor, lineWidth) {
- return this._genShape('Shape', [path, lineColor, fillColor, lineWidth]);
- },
-
- drawCircle: function (x, y, radius, lineColor, fillColor, lineWidth) {
- return this._genShape('Circle', [x, y, radius, lineColor, fillColor, lineWidth]);
- },
-
- drawPieSlice: function (x, y, radius, startAngle, endAngle, lineColor, fillColor) {
- return this._genShape('PieSlice', [x, y, radius, startAngle, endAngle, lineColor, fillColor]);
- },
-
- drawRect: function (x, y, width, height, lineColor, fillColor) {
- return this._genShape('Rect', [x, y, width, height, lineColor, fillColor]);
- },
-
- getElement: function () {
- return this.canvas;
- },
-
- /**
- * Return the most recently inserted shape id
- */
- getLastShapeId: function () {
- return this.lastShapeId;
- },
-
- /**
- * Clear and reset the canvas
- */
- reset: function () {
- alert('reset not implemented');
- },
-
- _insert: function (el, target) {
- $(target).html(el);
- },
-
- /**
- * Calculate the pixel dimensions of the canvas
- */
- _calculatePixelDims: function (width, height, canvas) {
- // XXX This should probably be a configurable option
- var match;
- match = this._pxregex.exec(height);
- if (match) {
- this.pixelHeight = match[1];
- } else {
- this.pixelHeight = $(canvas).height();
- }
- match = this._pxregex.exec(width);
- if (match) {
- this.pixelWidth = match[1];
- } else {
- this.pixelWidth = $(canvas).width();
- }
- },
-
- /**
- * Generate a shape object and id for later rendering
- */
- _genShape: function (shapetype, shapeargs) {
- var id = shapeCount++;
- shapeargs.unshift(id);
- return new VShape(this, id, shapetype, shapeargs);
- },
-
- /**
- * Add a shape to the end of the render queue
- */
- appendShape: function (shape) {
- alert('appendShape not implemented');
- },
-
- /**
- * Replace one shape with another
- */
- replaceWithShape: function (shapeid, shape) {
- alert('replaceWithShape not implemented');
- },
-
- /**
- * Insert one shape after another in the render queue
- */
- insertAfterShape: function (shapeid, shape) {
- alert('insertAfterShape not implemented');
- },
-
- /**
- * Remove a shape from the queue
- */
- removeShapeId: function (shapeid) {
- alert('removeShapeId not implemented');
- },
-
- /**
- * Find a shape at the specified x/y co-ordinates
- */
- getShapeAt: function (el, x, y) {
- alert('getShapeAt not implemented');
- },
-
- /**
- * Render all queued shapes onto the canvas
- */
- render: function () {
- alert('render not implemented');
- }
- });
-
- VCanvas_canvas = createClass(VCanvas_base, {
- init: function (width, height, target, interact) {
- VCanvas_canvas._super.init.call(this, width, height, target);
- this.canvas = document.createElement('canvas');
- if (target[0]) {
- target = target[0];
- }
- $.data(target, '_jqs_vcanvas', this);
- $(this.canvas).css({ display: 'inline-block', width: width, height: height, verticalAlign: 'top' });
- this._insert(this.canvas, target);
- this._calculatePixelDims(width, height, this.canvas);
- this.canvas.width = this.pixelWidth;
- this.canvas.height = this.pixelHeight;
- this.interact = interact;
- this.shapes = {};
- this.shapeseq = [];
- this.currentTargetShapeId = undefined;
- $(this.canvas).css({width: this.pixelWidth, height: this.pixelHeight});
- },
-
- _getContext: function (lineColor, fillColor, lineWidth) {
- var context = this.canvas.getContext('2d');
- if (lineColor !== undefined) {
- context.strokeStyle = lineColor;
- }
- context.lineWidth = lineWidth === undefined ? 1 : lineWidth;
- if (fillColor !== undefined) {
- context.fillStyle = fillColor;
- }
- return context;
- },
-
- reset: function () {
- var context = this._getContext();
- context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);
- this.shapes = {};
- this.shapeseq = [];
- this.currentTargetShapeId = undefined;
- },
-
- _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {
- var context = this._getContext(lineColor, fillColor, lineWidth),
- i, plen;
- context.beginPath();
- context.moveTo(path[0][0] + 0.5, path[0][1] + 0.5);
- for (i = 1, plen = path.length; i < plen; i++) {
- context.lineTo(path[i][0] + 0.5, path[i][1] + 0.5); // the 0.5 offset gives us crisp pixel-width lines
- }
- if (lineColor !== undefined) {
- context.stroke();
- }
- if (fillColor !== undefined) {
- context.fill();
- }
- if (this.targetX !== undefined && this.targetY !== undefined &&
- context.isPointInPath(this.targetX, this.targetY)) {
- this.currentTargetShapeId = shapeid;
- }
- },
-
- _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {
- var context = this._getContext(lineColor, fillColor, lineWidth);
- context.beginPath();
- context.arc(x, y, radius, 0, 2 * Math.PI, false);
- if (this.targetX !== undefined && this.targetY !== undefined &&
- context.isPointInPath(this.targetX, this.targetY)) {
- this.currentTargetShapeId = shapeid;
- }
- if (lineColor !== undefined) {
- context.stroke();
- }
- if (fillColor !== undefined) {
- context.fill();
- }
- },
-
- _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {
- var context = this._getContext(lineColor, fillColor);
- context.beginPath();
- context.moveTo(x, y);
- context.arc(x, y, radius, startAngle, endAngle, false);
- context.lineTo(x, y);
- context.closePath();
- if (lineColor !== undefined) {
- context.stroke();
- }
- if (fillColor) {
- context.fill();
- }
- if (this.targetX !== undefined && this.targetY !== undefined &&
- context.isPointInPath(this.targetX, this.targetY)) {
- this.currentTargetShapeId = shapeid;
- }
- },
-
- _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {
- return this._drawShape(shapeid, [[x, y], [x + width, y], [x + width, y + height], [x, y + height], [x, y]], lineColor, fillColor);
- },
-
- appendShape: function (shape) {
- this.shapes[shape.id] = shape;
- this.shapeseq.push(shape.id);
- this.lastShapeId = shape.id;
- return shape.id;
- },
-
- replaceWithShape: function (shapeid, shape) {
- var shapeseq = this.shapeseq,
- i;
- this.shapes[shape.id] = shape;
- for (i = shapeseq.length; i--;) {
- if (shapeseq[i] == shapeid) {
- shapeseq[i] = shape.id;
- }
- }
- delete this.shapes[shapeid];
- },
-
- replaceWithShapes: function (shapeids, shapes) {
- var shapeseq = this.shapeseq,
- shapemap = {},
- sid, i, first;
-
- for (i = shapeids.length; i--;) {
- shapemap[shapeids[i]] = true;
- }
- for (i = shapeseq.length; i--;) {
- sid = shapeseq[i];
- if (shapemap[sid]) {
- shapeseq.splice(i, 1);
- delete this.shapes[sid];
- first = i;
- }
- }
- for (i = shapes.length; i--;) {
- shapeseq.splice(first, 0, shapes[i].id);
- this.shapes[shapes[i].id] = shapes[i];
- }
-
- },
-
- insertAfterShape: function (shapeid, shape) {
- var shapeseq = this.shapeseq,
- i;
- for (i = shapeseq.length; i--;) {
- if (shapeseq[i] === shapeid) {
- shapeseq.splice(i + 1, 0, shape.id);
- this.shapes[shape.id] = shape;
- return;
- }
- }
- },
-
- removeShapeId: function (shapeid) {
- var shapeseq = this.shapeseq,
- i;
- for (i = shapeseq.length; i--;) {
- if (shapeseq[i] === shapeid) {
- shapeseq.splice(i, 1);
- break;
- }
- }
- delete this.shapes[shapeid];
- },
-
- getShapeAt: function (el, x, y) {
- this.targetX = x;
- this.targetY = y;
- this.render();
- return this.currentTargetShapeId;
- },
-
- render: function () {
- var shapeseq = this.shapeseq,
- shapes = this.shapes,
- shapeCount = shapeseq.length,
- context = this._getContext(),
- shapeid, shape, i;
- context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);
- for (i = 0; i < shapeCount; i++) {
- shapeid = shapeseq[i];
- shape = shapes[shapeid];
- this['_draw' + shape.type].apply(this, shape.args);
- }
- if (!this.interact) {
- // not interactive so no need to keep the shapes array
- this.shapes = {};
- this.shapeseq = [];
- }
- }
-
- });
-
- VCanvas_vml = createClass(VCanvas_base, {
- init: function (width, height, target) {
- var groupel;
- VCanvas_vml._super.init.call(this, width, height, target);
- if (target[0]) {
- target = target[0];
- }
- $.data(target, '_jqs_vcanvas', this);
- this.canvas = document.createElement('span');
- $(this.canvas).css({ display: 'inline-block', position: 'relative', overflow: 'hidden', width: width, height: height, margin: '0px', padding: '0px', verticalAlign: 'top'});
- this._insert(this.canvas, target);
- this._calculatePixelDims(width, height, this.canvas);
- this.canvas.width = this.pixelWidth;
- this.canvas.height = this.pixelHeight;
- groupel = '<v:group coordorigin="0 0" coordsize="' + this.pixelWidth + ' ' + this.pixelHeight + '"' +
- ' style="position:absolute;top:0;left:0;width:' + this.pixelWidth + 'px;height=' + this.pixelHeight + 'px;"></v:group>';
- this.canvas.insertAdjacentHTML('beforeEnd', groupel);
- this.group = $(this.canvas).children()[0];
- this.rendered = false;
- this.prerender = '';
- },
-
- _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {
- var vpath = [],
- initial, stroke, fill, closed, vel, plen, i;
- for (i = 0, plen = path.length; i < plen; i++) {
- vpath[i] = '' + (path[i][0]) + ',' + (path[i][1]);
- }
- initial = vpath.splice(0, 1);
- lineWidth = lineWidth === undefined ? 1 : lineWidth;
- stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="' + lineWidth + 'px" strokeColor="' + lineColor + '" ';
- fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" ';
- closed = vpath[0] === vpath[vpath.length - 1] ? 'x ' : '';
- vel = '<v:shape coordorigin="0 0" coordsize="' + this.pixelWidth + ' ' + this.pixelHeight + '" ' +
- ' id="jqsshape' + shapeid + '" ' +
- stroke +
- fill +
- ' style="position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;" ' +
- ' path="m ' + initial + ' l ' + vpath.join(', ') + ' ' + closed + 'e">' +
- ' </v:shape>';
- return vel;
- },
-
- _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {
- var stroke, fill, vel;
- x -= radius;
- y -= radius;
- stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="' + lineWidth + 'px" strokeColor="' + lineColor + '" ';
- fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" ';
- vel = '<v:oval ' +
- ' id="jqsshape' + shapeid + '" ' +
- stroke +
- fill +
- ' style="position:absolute;top:' + y + 'px; left:' + x + 'px; width:' + (radius * 2) + 'px; height:' + (radius * 2) + 'px"></v:oval>';
- return vel;
-
- },
-
- _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {
- var vpath, startx, starty, endx, endy, stroke, fill, vel;
- if (startAngle === endAngle) {
- return ''; // VML seems to have problem when start angle equals end angle.
- }
- if ((endAngle - startAngle) === (2 * Math.PI)) {
- startAngle = 0.0; // VML seems to have a problem when drawing a full circle that doesn't start 0
- endAngle = (2 * Math.PI);
- }
-
- startx = x + Math.round(Math.cos(startAngle) * radius);
- starty = y + Math.round(Math.sin(startAngle) * radius);
- endx = x + Math.round(Math.cos(endAngle) * radius);
- endy = y + Math.round(Math.sin(endAngle) * radius);
-
- if (startx === endx && starty === endy) {
- if ((endAngle - startAngle) < Math.PI) {
- // Prevent very small slices from being mistaken as a whole pie
- return '';
- }
- // essentially going to be the entire circle, so ignore startAngle
- startx = endx = x + radius;
- starty = endy = y;
- }
-
- if (startx === endx && starty === endy && (endAngle - startAngle) < Math.PI) {
- return '';
- }
-
- vpath = [x - radius, y - radius, x + radius, y + radius, startx, starty, endx, endy];
- stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="1px" strokeColor="' + lineColor + '" ';
- fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" ';
- vel = '<v:shape coordorigin="0 0" coordsize="' + this.pixelWidth + ' ' + this.pixelHeight + '" ' +
- ' id="jqsshape' + shapeid + '" ' +
- stroke +
- fill +
- ' style="position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;" ' +
- ' path="m ' + x + ',' + y + ' wa ' + vpath.join(', ') + ' x e">' +
- ' </v:shape>';
- return vel;
- },
-
- _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {
- return this._drawShape(shapeid, [[x, y], [x, y + height], [x + width, y + height], [x + width, y], [x, y]], lineColor, fillColor);
- },
-
- reset: function () {
- this.group.innerHTML = '';
- },
-
- appendShape: function (shape) {
- var vel = this['_draw' + shape.type].apply(this, shape.args);
- if (this.rendered) {
- this.group.insertAdjacentHTML('beforeEnd', vel);
- } else {
- this.prerender += vel;
- }
- this.lastShapeId = shape.id;
- return shape.id;
- },
-
- replaceWithShape: function (shapeid, shape) {
- var existing = $('#jqsshape' + shapeid),
- vel = this['_draw' + shape.type].apply(this, shape.args);
- existing[0].outerHTML = vel;
- },
-
- replaceWithShapes: function (shapeids, shapes) {
- // replace the first shapeid with all the new shapes then toast the remaining old shapes
- var existing = $('#jqsshape' + shapeids[0]),
- replace = '',
- slen = shapes.length,
- i;
- for (i = 0; i < slen; i++) {
- replace += this['_draw' + shapes[i].type].apply(this, shapes[i].args);
- }
- existing[0].outerHTML = replace;
- for (i = 1; i < shapeids.length; i++) {
- $('#jqsshape' + shapeids[i]).remove();
- }
- },
-
- insertAfterShape: function (shapeid, shape) {
- var existing = $('#jqsshape' + shapeid),
- vel = this['_draw' + shape.type].apply(this, shape.args);
- existing[0].insertAdjacentHTML('afterEnd', vel);
- },
-
- removeShapeId: function (shapeid) {
- var existing = $('#jqsshape' + shapeid);
- this.group.removeChild(existing[0]);
- },
-
- getShapeAt: function (el, x, y) {
- var shapeid = el.id.substr(8);
- return shapeid;
- },
-
- render: function () {
- if (!this.rendered) {
- // batch the intial render into a single repaint
- this.group.innerHTML = this.prerender;
- this.rendered = true;
- }
- }
- });
-
-}))}(document, Math));
diff --git a/debian/missing-sources/lz-string-1.4.4.js b/debian/missing-sources/lz-string-1.4.4.js
deleted file mode 100644
index 2c4a11a1..00000000
--- a/debian/missing-sources/lz-string-1.4.4.js
+++ /dev/null
@@ -1,501 +0,0 @@
-// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>
-// This work is free. You can redistribute it and/or modify it
-// under the terms of the WTFPL, Version 2
-// For more information see LICENSE.txt or http://www.wtfpl.net/
-//
-// For more information, the home page:
-// http://pieroxy.net/blog/pages/lz-string/testing.html
-//
-// LZ-based compression algorithm, version 1.4.4
-var LZString = (function() {
-
-// private property
-var f = String.fromCharCode;
-var keyStrBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
-var keyStrUriSafe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$";
-var baseReverseDic = {};
-
-function getBaseValue(alphabet, character) {
- if (!baseReverseDic[alphabet]) {
- baseReverseDic[alphabet] = {};
- for (var i=0 ; i<alphabet.length ; i++) {
- baseReverseDic[alphabet][alphabet.charAt(i)] = i;
- }
- }
- return baseReverseDic[alphabet][character];
-}
-
-var LZString = {
- compressToBase64 : function (input) {
- if (input == null) return "";
- var res = LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);});
- switch (res.length % 4) { // To produce valid Base64
- default: // When could this happen ?
- case 0 : return res;
- case 1 : return res+"===";
- case 2 : return res+"==";
- case 3 : return res+"=";
- }
- },
-
- decompressFromBase64 : function (input) {
- if (input == null) return "";
- if (input == "") return null;
- return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrBase64, input.charAt(index)); });
- },
-
- compressToUTF16 : function (input) {
- if (input == null) return "";
- return LZString._compress(input, 15, function(a){return f(a+32);}) + " ";
- },
-
- decompressFromUTF16: function (compressed) {
- if (compressed == null) return "";
- if (compressed == "") return null;
- return LZString._decompress(compressed.length, 16384, function(index) { return compressed.charCodeAt(index) - 32; });
- },
-
- //compress into uint8array (UCS-2 big endian format)
- compressToUint8Array: function (uncompressed) {
- var compressed = LZString.compress(uncompressed);
- var buf=new Uint8Array(compressed.length*2); // 2 bytes per character
-
- for (var i=0, TotalLen=compressed.length; i<TotalLen; i++) {
- var current_value = compressed.charCodeAt(i);
- buf[i*2] = current_value >>> 8;
- buf[i*2+1] = current_value % 256;
- }
- return buf;
- },
-
- //decompress from uint8array (UCS-2 big endian format)
- decompressFromUint8Array:function (compressed) {
- if (compressed===null || compressed===undefined){
- return LZString.decompress(compressed);
- } else {
- var buf=new Array(compressed.length/2); // 2 bytes per character
- for (var i=0, TotalLen=buf.length; i<TotalLen; i++) {
- buf[i]=compressed[i*2]*256+compressed[i*2+1];
- }
-
- var result = [];
- buf.forEach(function (c) {
- result.push(f(c));
- });
- return LZString.decompress(result.join(''));
-
- }
-
- },
-
-
- //compress into a string that is already URI encoded
- compressToEncodedURIComponent: function (input) {
- if (input == null) return "";
- return LZString._compress(input, 6, function(a){return keyStrUriSafe.charAt(a);});
- },
-
- //decompress from an output of compressToEncodedURIComponent
- decompressFromEncodedURIComponent:function (input) {
- if (input == null) return "";
- if (input == "") return null;
- input = input.replace(/ /g, "+");
- return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrUriSafe, input.charAt(index)); });
- },
-
- compress: function (uncompressed) {
- return LZString._compress(uncompressed, 16, function(a){return f(a);});
- },
- _compress: function (uncompressed, bitsPerChar, getCharFromInt) {
- if (uncompressed == null) return "";
- var i, value,
- context_dictionary= {},
- context_dictionaryToCreate= {},
- context_c="",
- context_wc="",
- context_w="",
- context_enlargeIn= 2, // Compensate for the first entry which should not count
- context_dictSize= 3,
- context_numBits= 2,
- context_data=[],
- context_data_val=0,
- context_data_position=0,
- ii;
-
- for (ii = 0; ii < uncompressed.length; ii += 1) {
- context_c = uncompressed.charAt(ii);
- if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {
- context_dictionary[context_c] = context_dictSize++;
- context_dictionaryToCreate[context_c] = true;
- }
-
- context_wc = context_w + context_c;
- if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {
- context_w = context_wc;
- } else {
- if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {
- if (context_w.charCodeAt(0)<256) {
- for (i=0 ; i<context_numBits ; i++) {
- context_data_val = (context_data_val << 1);
- if (context_data_position == bitsPerChar-1) {
- context_data_position = 0;
- context_data.push(getCharFromInt(context_data_val));
- context_data_val = 0;
- } else {
- context_data_position++;
- }
- }
- value = context_w.charCodeAt(0);
- for (i=0 ; i<8 ; i++) {
- context_data_val = (context_data_val << 1) | (value&1);
- if (context_data_position == bitsPerChar-1) {
- context_data_position = 0;
- context_data.push(getCharFromInt(context_data_val));
- context_data_val = 0;
- } else {
- context_data_position++;
- }
- value = value >> 1;
- }
- } else {
- value = 1;
- for (i=0 ; i<context_numBits ; i++) {
- context_data_val = (context_data_val << 1) | value;
- if (context_data_position ==bitsPerChar-1) {
- context_data_position = 0;
- context_data.push(getCharFromInt(context_data_val));
- context_data_val = 0;
- } else {
- context_data_position++;
- }
- value = 0;
- }
- value = context_w.charCodeAt(0);
- for (i=0 ; i<16 ; i++) {
- context_data_val = (context_data_val << 1) | (value&1);
- if (context_data_position == bitsPerChar-1) {
- context_data_position = 0;
- context_data.push(getCharFromInt(context_data_val));
- context_data_val = 0;
- } else {
- context_data_position++;
- }
- value = value >> 1;
- }
- }
- context_enlargeIn--;
- if (context_enlargeIn == 0) {
- context_enlargeIn = Math.pow(2, context_numBits);
- context_numBits++;
- }
- delete context_dictionaryToCreate[context_w];
- } else {
- value = context_dictionary[context_w];
- for (i=0 ; i<context_numBits ; i++) {
- context_data_val = (context_data_val << 1) | (value&1);
- if (context_data_position == bitsPerChar-1) {
- context_data_position = 0;
- context_data.push(getCharFromInt(context_data_val));
- context_data_val = 0;
- } else {
- context_data_position++;
- }
- value = value >> 1;
- }
-
-
- }
- context_enlargeIn--;
- if (context_enlargeIn == 0) {
- context_enlargeIn = Math.pow(2, context_numBits);
- context_numBits++;
- }
- // Add wc to the dictionary.
- context_dictionary[context_wc] = context_dictSize++;
- context_w = String(context_c);
- }
- }
-
- // Output the code for w.
- if (context_w !== "") {
- if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {
- if (context_w.charCodeAt(0)<256) {
- for (i=0 ; i<context_numBits ; i++) {
- context_data_val = (context_data_val << 1);
- if (context_data_position == bitsPerChar-1) {
- context_data_position = 0;
- context_data.push(getCharFromInt(context_data_val));
- context_data_val = 0;
- } else {
- context_data_position++;
- }
- }
- value = context_w.charCodeAt(0);
- for (i=0 ; i<8 ; i++) {
- context_data_val = (context_data_val << 1) | (value&1);
- if (context_data_position == bitsPerChar-1) {
- context_data_position = 0;
- context_data.push(getCharFromInt(context_data_val));
- context_data_val = 0;
- } else {
- context_data_position++;
- }
- value = value >> 1;
- }
- } else {
- value = 1;
- for (i=0 ; i<context_numBits ; i++) {
- context_data_val = (context_data_val << 1) | value;
- if (context_data_position == bitsPerChar-1) {
- context_data_position = 0;
- context_data.push(getCharFromInt(context_data_val));
- context_data_val = 0;
- } else {
- context_data_position++;
- }
- value = 0;
- }
- value = context_w.charCodeAt(0);
- for (i=0 ; i<16 ; i++) {
- context_data_val = (context_data_val << 1) | (value&1);
- if (context_data_position == bitsPerChar-1) {
- context_data_position = 0;
- context_data.push(getCharFromInt(context_data_val));
- context_data_val = 0;
- } else {
- context_data_position++;
- }
- value = value >> 1;
- }
- }
- context_enlargeIn--;
- if (context_enlargeIn == 0) {
- context_enlargeIn = Math.pow(2, context_numBits);
- context_numBits++;
- }
- delete context_dictionaryToCreate[context_w];
- } else {
- value = context_dictionary[context_w];
- for (i=0 ; i<context_numBits ; i++) {
- context_data_val = (context_data_val << 1) | (value&1);
- if (context_data_position == bitsPerChar-1) {
- context_data_position = 0;
- context_data.push(getCharFromInt(context_data_val));
- context_data_val = 0;
- } else {
- context_data_position++;
- }
- value = value >> 1;
- }
-
-
- }
- context_enlargeIn--;
- if (context_enlargeIn == 0) {
- context_enlargeIn = Math.pow(2, context_numBits);
- context_numBits++;
- }
- }
-
- // Mark the end of the stream
- value = 2;
- for (i=0 ; i<context_numBits ; i++) {
- context_data_val = (context_data_val << 1) | (value&1);
- if (context_data_position == bitsPerChar-1) {
- context_data_position = 0;
- context_data.push(getCharFromInt(context_data_val));
- context_data_val = 0;
- } else {
- context_data_position++;
- }
- value = value >> 1;
- }
-
- // Flush the last char
- while (true) {
- context_data_val = (context_data_val << 1);
- if (context_data_position == bitsPerChar-1) {
- context_data.push(getCharFromInt(context_data_val));
- break;
- }
- else context_data_position++;
- }
- return context_data.join('');
- },
-
- decompress: function (compressed) {
- if (compressed == null) return "";
- if (compressed == "") return null;
- return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });
- },
-
- _decompress: function (length, resetValue, getNextValue) {
- var dictionary = [],
- next,
- enlargeIn = 4,
- dictSize = 4,
- numBits = 3,
- entry = "",
- result = [],
- i,
- w,
- bits, resb, maxpower, power,
- c,
- data = {val:getNextValue(0), position:resetValue, index:1};
-
- for (i = 0; i < 3; i += 1) {
- dictionary[i] = i;
- }
-
- bits = 0;
- maxpower = Math.pow(2,2);
- power=1;
- while (power!=maxpower) {
- resb = data.val & data.position;
- data.position >>= 1;
- if (data.position == 0) {
- data.position = resetValue;
- data.val = getNextValue(data.index++);
- }
- bits |= (resb>0 ? 1 : 0) * power;
- power <<= 1;
- }
-
- switch (next = bits) {
- case 0:
- bits = 0;
- maxpower = Math.pow(2,8);
- power=1;
- while (power!=maxpower) {
- resb = data.val & data.position;
- data.position >>= 1;
- if (data.position == 0) {
- data.position = resetValue;
- data.val = getNextValue(data.index++);
- }
- bits |= (resb>0 ? 1 : 0) * power;
- power <<= 1;
- }
- c = f(bits);
- break;
- case 1:
- bits = 0;
- maxpower = Math.pow(2,16);
- power=1;
- while (power!=maxpower) {
- resb = data.val & data.position;
- data.position >>= 1;
- if (data.position == 0) {
- data.position = resetValue;
- data.val = getNextValue(data.index++);
- }
- bits |= (resb>0 ? 1 : 0) * power;
- power <<= 1;
- }
- c = f(bits);
- break;
- case 2:
- return "";
- }
- dictionary[3] = c;
- w = c;
- result.push(c);
- while (true) {
- if (data.index > length) {
- return "";
- }
-
- bits = 0;
- maxpower = Math.pow(2,numBits);
- power=1;
- while (power!=maxpower) {
- resb = data.val & data.position;
- data.position >>= 1;
- if (data.position == 0) {
- data.position = resetValue;
- data.val = getNextValue(data.index++);
- }
- bits |= (resb>0 ? 1 : 0) * power;
- power <<= 1;
- }
-
- switch (c = bits) {
- case 0:
- bits = 0;
- maxpower = Math.pow(2,8);
- power=1;
- while (power!=maxpower) {
- resb = data.val & data.position;
- data.position >>= 1;
- if (data.position == 0) {
- data.position = resetValue;
- data.val = getNextValue(data.index++);
- }
- bits |= (resb>0 ? 1 : 0) * power;
- power <<= 1;
- }
-
- dictionary[dictSize++] = f(bits);
- c = dictSize-1;
- enlargeIn--;
- break;
- case 1:
- bits = 0;
- maxpower = Math.pow(2,16);
- power=1;
- while (power!=maxpower) {
- resb = data.val & data.position;
- data.position >>= 1;
- if (data.position == 0) {
- data.position = resetValue;
- data.val = getNextValue(data.index++);
- }
- bits |= (resb>0 ? 1 : 0) * power;
- power <<= 1;
- }
- dictionary[dictSize++] = f(bits);
- c = dictSize-1;
- enlargeIn--;
- break;
- case 2:
- return result.join('');
- }
-
- if (enlargeIn == 0) {
- enlargeIn = Math.pow(2, numBits);
- numBits++;
- }
-
- if (dictionary[c]) {
- entry = dictionary[c];
- } else {
- if (c === dictSize) {
- entry = w + w.charAt(0);
- } else {
- return null;
- }
- }
- result.push(entry);
-
- // Add w+entry[0] to the dictionary.
- dictionary[dictSize++] = w + entry.charAt(0);
- enlargeIn--;
-
- w = entry;
-
- if (enlargeIn == 0) {
- enlargeIn = Math.pow(2, numBits);
- numBits++;
- }
-
- }
- }
-};
- return LZString;
-})();
-
-if (typeof define === 'function' && define.amd) {
- define(function () { return LZString; });
-} else if( typeof module !== 'undefined' && module != null ) {
- module.exports = LZString
-}
diff --git a/debian/missing-sources/morris-0.5.1.css b/debian/missing-sources/morris-0.5.1.css
deleted file mode 100644
index 209f0915..00000000
--- a/debian/missing-sources/morris-0.5.1.css
+++ /dev/null
@@ -1,2 +0,0 @@
-.morris-hover{position:absolute;z-index:1000}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255,255,255,0.8);border:solid 2px rgba(230,230,230,0.8);font-family:sans-serif;font-size:12px;text-align:center}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0}
-.morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0}
diff --git a/debian/missing-sources/morris-0.5.1.js b/debian/missing-sources/morris-0.5.1.js
deleted file mode 100644
index 3a1a8308..00000000
--- a/debian/missing-sources/morris-0.5.1.js
+++ /dev/null
@@ -1,1892 +0,0 @@
-/* @license
-morris.js v0.5.0
-Copyright 2014 Olly Smith All rights reserved.
-Licensed under the BSD-2-Clause License.
-*/
-
-
-(function() {
- var $, Morris, minutesSpecHelper, secondsSpecHelper,
- __slice = [].slice,
- __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
- __hasProp = {}.hasOwnProperty,
- __extends = 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; },
- __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
-
- Morris = window.Morris = {};
-
- $ = jQuery;
-
- Morris.EventEmitter = (function() {
- function EventEmitter() {}
-
- EventEmitter.prototype.on = function(name, handler) {
- if (this.handlers == null) {
- this.handlers = {};
- }
- if (this.handlers[name] == null) {
- this.handlers[name] = [];
- }
- this.handlers[name].push(handler);
- return this;
- };
-
- EventEmitter.prototype.fire = function() {
- var args, handler, name, _i, _len, _ref, _results;
- name = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
- if ((this.handlers != null) && (this.handlers[name] != null)) {
- _ref = this.handlers[name];
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- handler = _ref[_i];
- _results.push(handler.apply(null, args));
- }
- return _results;
- }
- };
-
- return EventEmitter;
-
- })();
-
- Morris.commas = function(num) {
- var absnum, intnum, ret, strabsnum;
- if (num != null) {
- ret = num < 0 ? "-" : "";
- absnum = Math.abs(num);
- intnum = Math.floor(absnum).toFixed(0);
- ret += intnum.replace(/(?=(?:\d{3})+$)(?!^)/g, ',');
- strabsnum = absnum.toString();
- if (strabsnum.length > intnum.length) {
- ret += strabsnum.slice(intnum.length);
- }
- return ret;
- } else {
- return '-';
- }
- };
-
- Morris.pad2 = function(number) {
- return (number < 10 ? '0' : '') + number;
- };
-
- Morris.Grid = (function(_super) {
- __extends(Grid, _super);
-
- function Grid(options) {
- this.resizeHandler = __bind(this.resizeHandler, this);
- var _this = this;
- if (typeof options.element === 'string') {
- this.el = $(document.getElementById(options.element));
- } else {
- this.el = $(options.element);
- }
- if ((this.el == null) || this.el.length === 0) {
- throw new Error("Graph container element not found");
- }
- if (this.el.css('position') === 'static') {
- this.el.css('position', 'relative');
- }
- this.options = $.extend({}, this.gridDefaults, this.defaults || {}, options);
- if (typeof this.options.units === 'string') {
- this.options.postUnits = options.units;
- }
- this.raphael = new Raphael(this.el[0]);
- this.elementWidth = null;
- this.elementHeight = null;
- this.dirty = false;
- this.selectFrom = null;
- if (this.init) {
- this.init();
- }
- this.setData(this.options.data);
- this.el.bind('mousemove', function(evt) {
- var left, offset, right, width, x;
- offset = _this.el.offset();
- x = evt.pageX - offset.left;
- if (_this.selectFrom) {
- left = _this.data[_this.hitTest(Math.min(x, _this.selectFrom))]._x;
- right = _this.data[_this.hitTest(Math.max(x, _this.selectFrom))]._x;
- width = right - left;
- return _this.selectionRect.attr({
- x: left,
- width: width
- });
- } else {
- return _this.fire('hovermove', x, evt.pageY - offset.top);
- }
- });
- this.el.bind('mouseleave', function(evt) {
- if (_this.selectFrom) {
- _this.selectionRect.hide();
- _this.selectFrom = null;
- }
- return _this.fire('hoverout');
- });
- this.el.bind('touchstart touchmove touchend', function(evt) {
- var offset, touch;
- touch = evt.originalEvent.touches[0] || evt.originalEvent.changedTouches[0];
- offset = _this.el.offset();
- return _this.fire('hovermove', touch.pageX - offset.left, touch.pageY - offset.top);
- });
- this.el.bind('click', function(evt) {
- var offset;
- offset = _this.el.offset();
- return _this.fire('gridclick', evt.pageX - offset.left, evt.pageY - offset.top);
- });
- if (this.options.rangeSelect) {
- this.selectionRect = this.raphael.rect(0, 0, 0, this.el.innerHeight()).attr({
- fill: this.options.rangeSelectColor,
- stroke: false
- }).toBack().hide();
- this.el.bind('mousedown', function(evt) {
- var offset;
- offset = _this.el.offset();
- return _this.startRange(evt.pageX - offset.left);
- });
- this.el.bind('mouseup', function(evt) {
- var offset;
- offset = _this.el.offset();
- _this.endRange(evt.pageX - offset.left);
- return _this.fire('hovermove', evt.pageX - offset.left, evt.pageY - offset.top);
- });
- }
- if (this.options.resize) {
- $(window).bind('resize', function(evt) {
- if (_this.timeoutId != null) {
- window.clearTimeout(_this.timeoutId);
- }
- return _this.timeoutId = window.setTimeout(_this.resizeHandler, 100);
- });
- }
- this.el.css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)');
- if (this.postInit) {
- this.postInit();
- }
- }
-
- Grid.prototype.gridDefaults = {
- dateFormat: null,
- axes: true,
- grid: true,
- gridLineColor: '#aaa',
- gridStrokeWidth: 0.5,
- gridTextColor: '#888',
- gridTextSize: 12,
- gridTextFamily: 'sans-serif',
- gridTextWeight: 'normal',
- hideHover: false,
- yLabelFormat: null,
- xLabelAngle: 0,
- numLines: 5,
- padding: 25,
- parseTime: true,
- postUnits: '',
- preUnits: '',
- ymax: 'auto',
- ymin: 'auto 0',
- goals: [],
- goalStrokeWidth: 1.0,
- goalLineColors: ['#666633', '#999966', '#cc6666', '#663333'],
- events: [],
- eventStrokeWidth: 1.0,
- eventLineColors: ['#005a04', '#ccffbb', '#3a5f0b', '#005502'],
- rangeSelect: null,
- rangeSelectColor: '#eef',
- resize: false
- };
-
- Grid.prototype.setData = function(data, redraw) {
- var e, idx, index, maxGoal, minGoal, ret, row, step, total, y, ykey, ymax, ymin, yval, _ref;
- if (redraw == null) {
- redraw = true;
- }
- this.options.data = data;
- if ((data == null) || data.length === 0) {
- this.data = [];
- this.raphael.clear();
- if (this.hover != null) {
- this.hover.hide();
- }
- return;
- }
- ymax = this.cumulative ? 0 : null;
- ymin = this.cumulative ? 0 : null;
- if (this.options.goals.length > 0) {
- minGoal = Math.min.apply(Math, this.options.goals);
- maxGoal = Math.max.apply(Math, this.options.goals);
- ymin = ymin != null ? Math.min(ymin, minGoal) : minGoal;
- ymax = ymax != null ? Math.max(ymax, maxGoal) : maxGoal;
- }
- this.data = (function() {
- var _i, _len, _results;
- _results = [];
- for (index = _i = 0, _len = data.length; _i < _len; index = ++_i) {
- row = data[index];
- ret = {
- src: row
- };
- ret.label = row[this.options.xkey];
- if (this.options.parseTime) {
- ret.x = Morris.parseDate(ret.label);
- if (this.options.dateFormat) {
- ret.label = this.options.dateFormat(ret.x);
- } else if (typeof ret.label === 'number') {
- ret.label = new Date(ret.label).toString();
- }
- } else {
- ret.x = index;
- if (this.options.xLabelFormat) {
- ret.label = this.options.xLabelFormat(ret);
- }
- }
- total = 0;
- ret.y = (function() {
- var _j, _len1, _ref, _results1;
- _ref = this.options.ykeys;
- _results1 = [];
- for (idx = _j = 0, _len1 = _ref.length; _j < _len1; idx = ++_j) {
- ykey = _ref[idx];
- yval = row[ykey];
- if (typeof yval === 'string') {
- yval = parseFloat(yval);
- }
- if ((yval != null) && typeof yval !== 'number') {
- yval = null;
- }
- if (yval != null) {
- if (this.cumulative) {
- total += yval;
- } else {
- if (ymax != null) {
- ymax = Math.max(yval, ymax);
- ymin = Math.min(yval, ymin);
- } else {
- ymax = ymin = yval;
- }
- }
- }
- if (this.cumulative && (total != null)) {
- ymax = Math.max(total, ymax);
- ymin = Math.min(total, ymin);
- }
- _results1.push(yval);
- }
- return _results1;
- }).call(this);
- _results.push(ret);
- }
- return _results;
- }).call(this);
- if (this.options.parseTime) {
- this.data = this.data.sort(function(a, b) {
- return (a.x > b.x) - (b.x > a.x);
- });
- }
- this.xmin = this.data[0].x;
- this.xmax = this.data[this.data.length - 1].x;
- this.events = [];
- if (this.options.events.length > 0) {
- if (this.options.parseTime) {
- this.events = (function() {
- var _i, _len, _ref, _results;
- _ref = this.options.events;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- e = _ref[_i];
- _results.push(Morris.parseDate(e));
- }
- return _results;
- }).call(this);
- } else {
- this.events = this.options.events;
- }
- this.xmax = Math.max(this.xmax, Math.max.apply(Math, this.events));
- this.xmin = Math.min(this.xmin, Math.min.apply(Math, this.events));
- }
- if (this.xmin === this.xmax) {
- this.xmin -= 1;
- this.xmax += 1;
- }
- this.ymin = this.yboundary('min', ymin);
- this.ymax = this.yboundary('max', ymax);
- if (this.ymin === this.ymax) {
- if (ymin) {
- this.ymin -= 1;
- }
- this.ymax += 1;
- }
- if (((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'y') || this.options.grid === true) {
- if (this.options.ymax === this.gridDefaults.ymax && this.options.ymin === this.gridDefaults.ymin) {
- this.grid = this.autoGridLines(this.ymin, this.ymax, this.options.numLines);
- this.ymin = Math.min(this.ymin, this.grid[0]);
- this.ymax = Math.max(this.ymax, this.grid[this.grid.length - 1]);
- } else {
- step = (this.ymax - this.ymin) / (this.options.numLines - 1);
- this.grid = (function() {
- var _i, _ref1, _ref2, _results;
- _results = [];
- for (y = _i = _ref1 = this.ymin, _ref2 = this.ymax; step > 0 ? _i <= _ref2 : _i >= _ref2; y = _i += step) {
- _results.push(y);
- }
- return _results;
- }).call(this);
- }
- }
- this.dirty = true;
- if (redraw) {
- return this.redraw();
- }
- };
-
- Grid.prototype.yboundary = function(boundaryType, currentValue) {
- var boundaryOption, suggestedValue;
- boundaryOption = this.options["y" + boundaryType];
- if (typeof boundaryOption === 'string') {
- if (boundaryOption.slice(0, 4) === 'auto') {
- if (boundaryOption.length > 5) {
- suggestedValue = parseInt(boundaryOption.slice(5), 10);
- if (currentValue == null) {
- return suggestedValue;
- }
- return Math[boundaryType](currentValue, suggestedValue);
- } else {
- if (currentValue != null) {
- return currentValue;
- } else {
- return 0;
- }
- }
- } else {
- return parseInt(boundaryOption, 10);
- }
- } else {
- return boundaryOption;
- }
- };
-
- Grid.prototype.autoGridLines = function(ymin, ymax, nlines) {
- var gmax, gmin, grid, smag, span, step, unit, y, ymag;
- span = ymax - ymin;
- ymag = Math.floor(Math.log(span) / Math.log(10));
- unit = Math.pow(10, ymag);
- gmin = Math.floor(ymin / unit) * unit;
- gmax = Math.ceil(ymax / unit) * unit;
- step = (gmax - gmin) / (nlines - 1);
- if (unit === 1 && step > 1 && Math.ceil(step) !== step) {
- step = Math.ceil(step);
- gmax = gmin + step * (nlines - 1);
- }
- if (gmin < 0 && gmax > 0) {
- gmin = Math.floor(ymin / step) * step;
- gmax = Math.ceil(ymax / step) * step;
- }
- if (step < 1) {
- smag = Math.floor(Math.log(step) / Math.log(10));
- grid = (function() {
- var _i, _results;
- _results = [];
- for (y = _i = gmin; step > 0 ? _i <= gmax : _i >= gmax; y = _i += step) {
- _results.push(parseFloat(y.toFixed(1 - smag)));
- }
- return _results;
- })();
- } else {
- grid = (function() {
- var _i, _results;
- _results = [];
- for (y = _i = gmin; step > 0 ? _i <= gmax : _i >= gmax; y = _i += step) {
- _results.push(y);
- }
- return _results;
- })();
- }
- return grid;
- };
-
- Grid.prototype._calc = function() {
- var bottomOffsets, gridLine, h, i, w, yLabelWidths, _ref, _ref1;
- w = this.el.width();
- h = this.el.height();
- if (this.elementWidth !== w || this.elementHeight !== h || this.dirty) {
- this.elementWidth = w;
- this.elementHeight = h;
- this.dirty = false;
- this.left = this.options.padding;
- this.right = this.elementWidth - this.options.padding;
- this.top = this.options.padding;
- this.bottom = this.elementHeight - this.options.padding;
- if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'y') {
- yLabelWidths = (function() {
- var _i, _len, _ref1, _results;
- _ref1 = this.grid;
- _results = [];
- for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
- gridLine = _ref1[_i];
- _results.push(this.measureText(this.yAxisFormat(gridLine)).width);
- }
- return _results;
- }).call(this);
- this.left += Math.max.apply(Math, yLabelWidths);
- }
- if ((_ref1 = this.options.axes) === true || _ref1 === 'both' || _ref1 === 'x') {
- bottomOffsets = (function() {
- var _i, _ref2, _results;
- _results = [];
- for (i = _i = 0, _ref2 = this.data.length; 0 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 0 <= _ref2 ? ++_i : --_i) {
- _results.push(this.measureText(this.data[i].text, -this.options.xLabelAngle).height);
- }
- return _results;
- }).call(this);
- this.bottom -= Math.max.apply(Math, bottomOffsets);
- }
- this.width = Math.max(1, this.right - this.left);
- this.height = Math.max(1, this.bottom - this.top);
- this.dx = this.width / (this.xmax - this.xmin);
- this.dy = this.height / (this.ymax - this.ymin);
- if (this.calc) {
- return this.calc();
- }
- }
- };
-
- Grid.prototype.transY = function(y) {
- return this.bottom - (y - this.ymin) * this.dy;
- };
-
- Grid.prototype.transX = function(x) {
- if (this.data.length === 1) {
- return (this.left + this.right) / 2;
- } else {
- return this.left + (x - this.xmin) * this.dx;
- }
- };
-
- Grid.prototype.redraw = function() {
- this.raphael.clear();
- this._calc();
- this.drawGrid();
- this.drawGoals();
- this.drawEvents();
- if (this.draw) {
- return this.draw();
- }
- };
-
- Grid.prototype.measureText = function(text, angle) {
- var ret, tt;
- if (angle == null) {
- angle = 0;
- }
- tt = this.raphael.text(100, 100, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).rotate(angle);
- ret = tt.getBBox();
- tt.remove();
- return ret;
- };
-
- Grid.prototype.yAxisFormat = function(label) {
- return this.yLabelFormat(label);
- };
-
- Grid.prototype.yLabelFormat = function(label) {
- if (typeof this.options.yLabelFormat === 'function') {
- return this.options.yLabelFormat(label);
- } else {
- return "" + this.options.preUnits + (Morris.commas(label)) + this.options.postUnits;
- }
- };
-
- Grid.prototype.drawGrid = function() {
- var lineY, y, _i, _len, _ref, _ref1, _ref2, _results;
- if (this.options.grid === false && ((_ref = this.options.axes) !== true && _ref !== 'both' && _ref !== 'y')) {
- return;
- }
- _ref1 = this.grid;
- _results = [];
- for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
- lineY = _ref1[_i];
- y = this.transY(lineY);
- if ((_ref2 = this.options.axes) === true || _ref2 === 'both' || _ref2 === 'y') {
- this.drawYAxisLabel(this.left - this.options.padding / 2, y, this.yAxisFormat(lineY));
- }
- if (this.options.grid) {
- _results.push(this.drawGridLine("M" + this.left + "," + y + "H" + (this.left + this.width)));
- } else {
- _results.push(void 0);
- }
- }
- return _results;
- };
-
- Grid.prototype.drawGoals = function() {
- var color, goal, i, _i, _len, _ref, _results;
- _ref = this.options.goals;
- _results = [];
- for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
- goal = _ref[i];
- color = this.options.goalLineColors[i % this.options.goalLineColors.length];
- _results.push(this.drawGoal(goal, color));
- }
- return _results;
- };
-
- Grid.prototype.drawEvents = function() {
- var color, event, i, _i, _len, _ref, _results;
- _ref = this.events;
- _results = [];
- for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
- event = _ref[i];
- color = this.options.eventLineColors[i % this.options.eventLineColors.length];
- _results.push(this.drawEvent(event, color));
- }
- return _results;
- };
-
- Grid.prototype.drawGoal = function(goal, color) {
- return this.raphael.path("M" + this.left + "," + (this.transY(goal)) + "H" + this.right).attr('stroke', color).attr('stroke-width', this.options.goalStrokeWidth);
- };
-
- Grid.prototype.drawEvent = function(event, color) {
- return this.raphael.path("M" + (this.transX(event)) + "," + this.bottom + "V" + this.top).attr('stroke', color).attr('stroke-width', this.options.eventStrokeWidth);
- };
-
- Grid.prototype.drawYAxisLabel = function(xPos, yPos, text) {
- return this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor).attr('text-anchor', 'end');
- };
-
- Grid.prototype.drawGridLine = function(path) {
- return this.raphael.path(path).attr('stroke', this.options.gridLineColor).attr('stroke-width', this.options.gridStrokeWidth);
- };
-
- Grid.prototype.startRange = function(x) {
- this.hover.hide();
- this.selectFrom = x;
- return this.selectionRect.attr({
- x: x,
- width: 0
- }).show();
- };
-
- Grid.prototype.endRange = function(x) {
- var end, start;
- if (this.selectFrom) {
- start = Math.min(this.selectFrom, x);
- end = Math.max(this.selectFrom, x);
- this.options.rangeSelect.call(this.el, {
- start: this.data[this.hitTest(start)].x,
- end: this.data[this.hitTest(end)].x
- });
- return this.selectFrom = null;
- }
- };
-
- Grid.prototype.resizeHandler = function() {
- this.timeoutId = null;
- this.raphael.setSize(this.el.width(), this.el.height());
- return this.redraw();
- };
-
- return Grid;
-
- })(Morris.EventEmitter);
-
- Morris.parseDate = function(date) {
- var isecs, m, msecs, n, o, offsetmins, p, q, r, ret, secs;
- if (typeof date === 'number') {
- return date;
- }
- m = date.match(/^(\d+) Q(\d)$/);
- n = date.match(/^(\d+)-(\d+)$/);
- o = date.match(/^(\d+)-(\d+)-(\d+)$/);
- p = date.match(/^(\d+) W(\d+)$/);
- q = date.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/);
- r = date.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/);
- if (m) {
- return new Date(parseInt(m[1], 10), parseInt(m[2], 10) * 3 - 1, 1).getTime();
- } else if (n) {
- return new Date(parseInt(n[1], 10), parseInt(n[2], 10) - 1, 1).getTime();
- } else if (o) {
- return new Date(parseInt(o[1], 10), parseInt(o[2], 10) - 1, parseInt(o[3], 10)).getTime();
- } else if (p) {
- ret = new Date(parseInt(p[1], 10), 0, 1);
- if (ret.getDay() !== 4) {
- ret.setMonth(0, 1 + ((4 - ret.getDay()) + 7) % 7);
- }
- return ret.getTime() + parseInt(p[2], 10) * 604800000;
- } else if (q) {
- if (!q[6]) {
- return new Date(parseInt(q[1], 10), parseInt(q[2], 10) - 1, parseInt(q[3], 10), parseInt(q[4], 10), parseInt(q[5], 10)).getTime();
- } else {
- offsetmins = 0;
- if (q[6] !== 'Z') {
- offsetmins = parseInt(q[8], 10) * 60 + parseInt(q[9], 10);
- if (q[7] === '+') {
- offsetmins = 0 - offsetmins;
- }
- }
- return Date.UTC(parseInt(q[1], 10), parseInt(q[2], 10) - 1, parseInt(q[3], 10), parseInt(q[4], 10), parseInt(q[5], 10) + offsetmins);
- }
- } else if (r) {
- secs = parseFloat(r[6]);
- isecs = Math.floor(secs);
- msecs = Math.round((secs - isecs) * 1000);
- if (!r[8]) {
- return new Date(parseInt(r[1], 10), parseInt(r[2], 10) - 1, parseInt(r[3], 10), parseInt(r[4], 10), parseInt(r[5], 10), isecs, msecs).getTime();
- } else {
- offsetmins = 0;
- if (r[8] !== 'Z') {
- offsetmins = parseInt(r[10], 10) * 60 + parseInt(r[11], 10);
- if (r[9] === '+') {
- offsetmins = 0 - offsetmins;
- }
- }
- return Date.UTC(parseInt(r[1], 10), parseInt(r[2], 10) - 1, parseInt(r[3], 10), parseInt(r[4], 10), parseInt(r[5], 10) + offsetmins, isecs, msecs);
- }
- } else {
- return new Date(parseInt(date, 10), 0, 1).getTime();
- }
- };
-
- Morris.Hover = (function() {
- Hover.defaults = {
- "class": 'morris-hover morris-default-style'
- };
-
- function Hover(options) {
- if (options == null) {
- options = {};
- }
- this.options = $.extend({}, Morris.Hover.defaults, options);
- this.el = $("<div class='" + this.options["class"] + "'></div>");
- this.el.hide();
- this.options.parent.append(this.el);
- }
-
- Hover.prototype.update = function(html, x, y) {
- if (!html) {
- return this.hide();
- } else {
- this.html(html);
- this.show();
- return this.moveTo(x, y);
- }
- };
-
- Hover.prototype.html = function(content) {
- return this.el.html(content);
- };
-
- Hover.prototype.moveTo = function(x, y) {
- var hoverHeight, hoverWidth, left, parentHeight, parentWidth, top;
- parentWidth = this.options.parent.innerWidth();
- parentHeight = this.options.parent.innerHeight();
- hoverWidth = this.el.outerWidth();
- hoverHeight = this.el.outerHeight();
- left = Math.min(Math.max(0, x - hoverWidth / 2), parentWidth - hoverWidth);
- if (y != null) {
- top = y - hoverHeight - 10;
- if (top < 0) {
- top = y + 10;
- if (top + hoverHeight > parentHeight) {
- top = parentHeight / 2 - hoverHeight / 2;
- }
- }
- } else {
- top = parentHeight / 2 - hoverHeight / 2;
- }
- return this.el.css({
- left: left + "px",
- top: parseInt(top) + "px"
- });
- };
-
- Hover.prototype.show = function() {
- return this.el.show();
- };
-
- Hover.prototype.hide = function() {
- return this.el.hide();
- };
-
- return Hover;
-
- })();
-
- Morris.Line = (function(_super) {
- __extends(Line, _super);
-
- function Line(options) {
- this.hilight = __bind(this.hilight, this);
- this.onHoverOut = __bind(this.onHoverOut, this);
- this.onHoverMove = __bind(this.onHoverMove, this);
- this.onGridClick = __bind(this.onGridClick, this);
- if (!(this instanceof Morris.Line)) {
- return new Morris.Line(options);
- }
- Line.__super__.constructor.call(this, options);
- }
-
- Line.prototype.init = function() {
- if (this.options.hideHover !== 'always') {
- this.hover = new Morris.Hover({
- parent: this.el
- });
- this.on('hovermove', this.onHoverMove);
- this.on('hoverout', this.onHoverOut);
- return this.on('gridclick', this.onGridClick);
- }
- };
-
- Line.prototype.defaults = {
- lineWidth: 3,
- pointSize: 4,
- lineColors: ['#0b62a4', '#7A92A3', '#4da74d', '#afd8f8', '#edc240', '#cb4b4b', '#9440ed'],
- pointStrokeWidths: [1],
- pointStrokeColors: ['#ffffff'],
- pointFillColors: [],
- smooth: true,
- xLabels: 'auto',
- xLabelFormat: null,
- xLabelMargin: 24,
- hideHover: false
- };
-
- Line.prototype.calc = function() {
- this.calcPoints();
- return this.generatePaths();
- };
-
- Line.prototype.calcPoints = function() {
- var row, y, _i, _len, _ref, _results;
- _ref = this.data;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- row = _ref[_i];
- row._x = this.transX(row.x);
- row._y = (function() {
- var _j, _len1, _ref1, _results1;
- _ref1 = row.y;
- _results1 = [];
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
- y = _ref1[_j];
- if (y != null) {
- _results1.push(this.transY(y));
- } else {
- _results1.push(y);
- }
- }
- return _results1;
- }).call(this);
- _results.push(row._ymax = Math.min.apply(Math, [this.bottom].concat((function() {
- var _j, _len1, _ref1, _results1;
- _ref1 = row._y;
- _results1 = [];
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
- y = _ref1[_j];
- if (y != null) {
- _results1.push(y);
- }
- }
- return _results1;
- })())));
- }
- return _results;
- };
-
- Line.prototype.hitTest = function(x) {
- var index, r, _i, _len, _ref;
- if (this.data.length === 0) {
- return null;
- }
- _ref = this.data.slice(1);
- for (index = _i = 0, _len = _ref.length; _i < _len; index = ++_i) {
- r = _ref[index];
- if (x < (r._x + this.data[index]._x) / 2) {
- break;
- }
- }
- return index;
- };
-
- Line.prototype.onGridClick = function(x, y) {
- var index;
- index = this.hitTest(x);
- return this.fire('click', index, this.data[index].src, x, y);
- };
-
- Line.prototype.onHoverMove = function(x, y) {
- var index;
- index = this.hitTest(x);
- return this.displayHoverForRow(index);
- };
-
- Line.prototype.onHoverOut = function() {
- if (this.options.hideHover !== false) {
- return this.displayHoverForRow(null);
- }
- };
-
- Line.prototype.displayHoverForRow = function(index) {
- var _ref;
- if (index != null) {
- (_ref = this.hover).update.apply(_ref, this.hoverContentForRow(index));
- return this.hilight(index);
- } else {
- this.hover.hide();
- return this.hilight();
- }
- };
-
- Line.prototype.hoverContentForRow = function(index) {
- var content, j, row, y, _i, _len, _ref;
- row = this.data[index];
- content = "<div class='morris-hover-row-label'>" + row.label + "</div>";
- _ref = row.y;
- for (j = _i = 0, _len = _ref.length; _i < _len; j = ++_i) {
- y = _ref[j];
- content += "<div class='morris-hover-point' style='color: " + (this.colorFor(row, j, 'label')) + "'>\n " + this.options.labels[j] + ":\n " + (this.yLabelFormat(y)) + "\n</div>";
- }
- if (typeof this.options.hoverCallback === 'function') {
- content = this.options.hoverCallback(index, this.options, content, row.src);
- }
- return [content, row._x, row._ymax];
- };
-
- Line.prototype.generatePaths = function() {
- var coords, i, r, smooth;
- return this.paths = (function() {
- var _i, _ref, _ref1, _results;
- _results = [];
- for (i = _i = 0, _ref = this.options.ykeys.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
- smooth = typeof this.options.smooth === "boolean" ? this.options.smooth : (_ref1 = this.options.ykeys[i], __indexOf.call(this.options.smooth, _ref1) >= 0);
- coords = (function() {
- var _j, _len, _ref2, _results1;
- _ref2 = this.data;
- _results1 = [];
- for (_j = 0, _len = _ref2.length; _j < _len; _j++) {
- r = _ref2[_j];
- if (r._y[i] !== void 0) {
- _results1.push({
- x: r._x,
- y: r._y[i]
- });
- }
- }
- return _results1;
- }).call(this);
- if (coords.length > 1) {
- _results.push(Morris.Line.createPath(coords, smooth, this.bottom));
- } else {
- _results.push(null);
- }
- }
- return _results;
- }).call(this);
- };
-
- Line.prototype.draw = function() {
- var _ref;
- if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'x') {
- this.drawXAxis();
- }
- this.drawSeries();
- if (this.options.hideHover === false) {
- return this.displayHoverForRow(this.data.length - 1);
- }
- };
-
- Line.prototype.drawXAxis = function() {
- var drawLabel, l, labels, prevAngleMargin, prevLabelMargin, row, ypos, _i, _len, _results,
- _this = this;
- ypos = this.bottom + this.options.padding / 2;
- prevLabelMargin = null;
- prevAngleMargin = null;
- drawLabel = function(labelText, xpos) {
- var label, labelBox, margin, offset, textBox;
- label = _this.drawXAxisLabel(_this.transX(xpos), ypos, labelText);
- textBox = label.getBBox();
- label.transform("r" + (-_this.options.xLabelAngle));
- labelBox = label.getBBox();
- label.transform("t0," + (labelBox.height / 2) + "...");
- if (_this.options.xLabelAngle !== 0) {
- offset = -0.5 * textBox.width * Math.cos(_this.options.xLabelAngle * Math.PI / 180.0);
- label.transform("t" + offset + ",0...");
- }
- labelBox = label.getBBox();
- if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < _this.el.width()) {
- if (_this.options.xLabelAngle !== 0) {
- margin = 1.25 * _this.options.gridTextSize / Math.sin(_this.options.xLabelAngle * Math.PI / 180.0);
- prevAngleMargin = labelBox.x - margin;
- }
- return prevLabelMargin = labelBox.x - _this.options.xLabelMargin;
- } else {
- return label.remove();
- }
- };
- if (this.options.parseTime) {
- if (this.data.length === 1 && this.options.xLabels === 'auto') {
- labels = [[this.data[0].label, this.data[0].x]];
- } else {
- labels = Morris.labelSeries(this.xmin, this.xmax, this.width, this.options.xLabels, this.options.xLabelFormat);
- }
- } else {
- labels = (function() {
- var _i, _len, _ref, _results;
- _ref = this.data;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- row = _ref[_i];
- _results.push([row.label, row.x]);
- }
- return _results;
- }).call(this);
- }
- labels.reverse();
- _results = [];
- for (_i = 0, _len = labels.length; _i < _len; _i++) {
- l = labels[_i];
- _results.push(drawLabel(l[0], l[1]));
- }
- return _results;
- };
-
- Line.prototype.drawSeries = function() {
- var i, _i, _j, _ref, _ref1, _results;
- this.seriesPoints = [];
- for (i = _i = _ref = this.options.ykeys.length - 1; _ref <= 0 ? _i <= 0 : _i >= 0; i = _ref <= 0 ? ++_i : --_i) {
- this._drawLineFor(i);
- }
- _results = [];
- for (i = _j = _ref1 = this.options.ykeys.length - 1; _ref1 <= 0 ? _j <= 0 : _j >= 0; i = _ref1 <= 0 ? ++_j : --_j) {
- _results.push(this._drawPointFor(i));
- }
- return _results;
- };
-
- Line.prototype._drawPointFor = function(index) {
- var circle, row, _i, _len, _ref, _results;
- this.seriesPoints[index] = [];
- _ref = this.data;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- row = _ref[_i];
- circle = null;
- if (row._y[index] != null) {
- circle = this.drawLinePoint(row._x, row._y[index], this.colorFor(row, index, 'point'), index);
- }
- _results.push(this.seriesPoints[index].push(circle));
- }
- return _results;
- };
-
- Line.prototype._drawLineFor = function(index) {
- var path;
- path = this.paths[index];
- if (path !== null) {
- return this.drawLinePath(path, this.colorFor(null, index, 'line'), index);
- }
- };
-
- Line.createPath = function(coords, smooth, bottom) {
- var coord, g, grads, i, ix, lg, path, prevCoord, x1, x2, y1, y2, _i, _len;
- path = "";
- if (smooth) {
- grads = Morris.Line.gradients(coords);
- }
- prevCoord = {
- y: null
- };
- for (i = _i = 0, _len = coords.length; _i < _len; i = ++_i) {
- coord = coords[i];
- if (coord.y != null) {
- if (prevCoord.y != null) {
- if (smooth) {
- g = grads[i];
- lg = grads[i - 1];
- ix = (coord.x - prevCoord.x) / 4;
- x1 = prevCoord.x + ix;
- y1 = Math.min(bottom, prevCoord.y + ix * lg);
- x2 = coord.x - ix;
- y2 = Math.min(bottom, coord.y - ix * g);
- path += "C" + x1 + "," + y1 + "," + x2 + "," + y2 + "," + coord.x + "," + coord.y;
- } else {
- path += "L" + coord.x + "," + coord.y;
- }
- } else {
- if (!smooth || (grads[i] != null)) {
- path += "M" + coord.x + "," + coord.y;
- }
- }
- }
- prevCoord = coord;
- }
- return path;
- };
-
- Line.gradients = function(coords) {
- var coord, grad, i, nextCoord, prevCoord, _i, _len, _results;
- grad = function(a, b) {
- return (a.y - b.y) / (a.x - b.x);
- };
- _results = [];
- for (i = _i = 0, _len = coords.length; _i < _len; i = ++_i) {
- coord = coords[i];
- if (coord.y != null) {
- nextCoord = coords[i + 1] || {
- y: null
- };
- prevCoord = coords[i - 1] || {
- y: null
- };
- if ((prevCoord.y != null) && (nextCoord.y != null)) {
- _results.push(grad(prevCoord, nextCoord));
- } else if (prevCoord.y != null) {
- _results.push(grad(prevCoord, coord));
- } else if (nextCoord.y != null) {
- _results.push(grad(coord, nextCoord));
- } else {
- _results.push(null);
- }
- } else {
- _results.push(null);
- }
- }
- return _results;
- };
-
- Line.prototype.hilight = function(index) {
- var i, _i, _j, _ref, _ref1;
- if (this.prevHilight !== null && this.prevHilight !== index) {
- for (i = _i = 0, _ref = this.seriesPoints.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
- if (this.seriesPoints[i][this.prevHilight]) {
- this.seriesPoints[i][this.prevHilight].animate(this.pointShrinkSeries(i));
- }
- }
- }
- if (index !== null && this.prevHilight !== index) {
- for (i = _j = 0, _ref1 = this.seriesPoints.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) {
- if (this.seriesPoints[i][index]) {
- this.seriesPoints[i][index].animate(this.pointGrowSeries(i));
- }
- }
- }
- return this.prevHilight = index;
- };
-
- Line.prototype.colorFor = function(row, sidx, type) {
- if (typeof this.options.lineColors === 'function') {
- return this.options.lineColors.call(this, row, sidx, type);
- } else if (type === 'point') {
- return this.options.pointFillColors[sidx % this.options.pointFillColors.length] || this.options.lineColors[sidx % this.options.lineColors.length];
- } else {
- return this.options.lineColors[sidx % this.options.lineColors.length];
- }
- };
-
- Line.prototype.drawXAxisLabel = function(xPos, yPos, text) {
- return this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor);
- };
-
- Line.prototype.drawLinePath = function(path, lineColor, lineIndex) {
- return this.raphael.path(path).attr('stroke', lineColor).attr('stroke-width', this.lineWidthForSeries(lineIndex));
- };
-
- Line.prototype.drawLinePoint = function(xPos, yPos, pointColor, lineIndex) {
- return this.raphael.circle(xPos, yPos, this.pointSizeForSeries(lineIndex)).attr('fill', pointColor).attr('stroke-width', this.pointStrokeWidthForSeries(lineIndex)).attr('stroke', this.pointStrokeColorForSeries(lineIndex));
- };
-
- Line.prototype.pointStrokeWidthForSeries = function(index) {
- return this.options.pointStrokeWidths[index % this.options.pointStrokeWidths.length];
- };
-
- Line.prototype.pointStrokeColorForSeries = function(index) {
- return this.options.pointStrokeColors[index % this.options.pointStrokeColors.length];
- };
-
- Line.prototype.lineWidthForSeries = function(index) {
- if (this.options.lineWidth instanceof Array) {
- return this.options.lineWidth[index % this.options.lineWidth.length];
- } else {
- return this.options.lineWidth;
- }
- };
-
- Line.prototype.pointSizeForSeries = function(index) {
- if (this.options.pointSize instanceof Array) {
- return this.options.pointSize[index % this.options.pointSize.length];
- } else {
- return this.options.pointSize;
- }
- };
-
- Line.prototype.pointGrowSeries = function(index) {
- return Raphael.animation({
- r: this.pointSizeForSeries(index) + 3
- }, 25, 'linear');
- };
-
- Line.prototype.pointShrinkSeries = function(index) {
- return Raphael.animation({
- r: this.pointSizeForSeries(index)
- }, 25, 'linear');
- };
-
- return Line;
-
- })(Morris.Grid);
-
- Morris.labelSeries = function(dmin, dmax, pxwidth, specName, xLabelFormat) {
- var d, d0, ddensity, name, ret, s, spec, t, _i, _len, _ref;
- ddensity = 200 * (dmax - dmin) / pxwidth;
- d0 = new Date(dmin);
- spec = Morris.LABEL_SPECS[specName];
- if (spec === void 0) {
- _ref = Morris.AUTO_LABEL_ORDER;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- name = _ref[_i];
- s = Morris.LABEL_SPECS[name];
- if (ddensity >= s.span) {
- spec = s;
- break;
- }
- }
- }
- if (spec === void 0) {
- spec = Morris.LABEL_SPECS["second"];
- }
- if (xLabelFormat) {
- spec = $.extend({}, spec, {
- fmt: xLabelFormat
- });
- }
- d = spec.start(d0);
- ret = [];
- while ((t = d.getTime()) <= dmax) {
- if (t >= dmin) {
- ret.push([spec.fmt(d), t]);
- }
- spec.incr(d);
- }
- return ret;
- };
-
- minutesSpecHelper = function(interval) {
- return {
- span: interval * 60 * 1000,
- start: function(d) {
- return new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours());
- },
- fmt: function(d) {
- return "" + (Morris.pad2(d.getHours())) + ":" + (Morris.pad2(d.getMinutes()));
- },
- incr: function(d) {
- return d.setUTCMinutes(d.getUTCMinutes() + interval);
- }
- };
- };
-
- secondsSpecHelper = function(interval) {
- return {
- span: interval * 1000,
- start: function(d) {
- return new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes());
- },
- fmt: function(d) {
- return "" + (Morris.pad2(d.getHours())) + ":" + (Morris.pad2(d.getMinutes())) + ":" + (Morris.pad2(d.getSeconds()));
- },
- incr: function(d) {
- return d.setUTCSeconds(d.getUTCSeconds() + interval);
- }
- };
- };
-
- Morris.LABEL_SPECS = {
- "decade": {
- span: 172800000000,
- start: function(d) {
- return new Date(d.getFullYear() - d.getFullYear() % 10, 0, 1);
- },
- fmt: function(d) {
- return "" + (d.getFullYear());
- },
- incr: function(d) {
- return d.setFullYear(d.getFullYear() + 10);
- }
- },
- "year": {
- span: 17280000000,
- start: function(d) {
- return new Date(d.getFullYear(), 0, 1);
- },
- fmt: function(d) {
- return "" + (d.getFullYear());
- },
- incr: function(d) {
- return d.setFullYear(d.getFullYear() + 1);
- }
- },
- "month": {
- span: 2419200000,
- start: function(d) {
- return new Date(d.getFullYear(), d.getMonth(), 1);
- },
- fmt: function(d) {
- return "" + (d.getFullYear()) + "-" + (Morris.pad2(d.getMonth() + 1));
- },
- incr: function(d) {
- return d.setMonth(d.getMonth() + 1);
- }
- },
- "week": {
- span: 604800000,
- start: function(d) {
- return new Date(d.getFullYear(), d.getMonth(), d.getDate());
- },
- fmt: function(d) {
- return "" + (d.getFullYear()) + "-" + (Morris.pad2(d.getMonth() + 1)) + "-" + (Morris.pad2(d.getDate()));
- },
- incr: function(d) {
- return d.setDate(d.getDate() + 7);
- }
- },
- "day": {
- span: 86400000,
- start: function(d) {
- return new Date(d.getFullYear(), d.getMonth(), d.getDate());
- },
- fmt: function(d) {
- return "" + (d.getFullYear()) + "-" + (Morris.pad2(d.getMonth() + 1)) + "-" + (Morris.pad2(d.getDate()));
- },
- incr: function(d) {
- return d.setDate(d.getDate() + 1);
- }
- },
- "hour": minutesSpecHelper(60),
- "30min": minutesSpecHelper(30),
- "15min": minutesSpecHelper(15),
- "10min": minutesSpecHelper(10),
- "5min": minutesSpecHelper(5),
- "minute": minutesSpecHelper(1),
- "30sec": secondsSpecHelper(30),
- "15sec": secondsSpecHelper(15),
- "10sec": secondsSpecHelper(10),
- "5sec": secondsSpecHelper(5),
- "second": secondsSpecHelper(1)
- };
-
- Morris.AUTO_LABEL_ORDER = ["decade", "year", "month", "week", "day", "hour", "30min", "15min", "10min", "5min", "minute", "30sec", "15sec", "10sec", "5sec", "second"];
-
- Morris.Area = (function(_super) {
- var areaDefaults;
-
- __extends(Area, _super);
-
- areaDefaults = {
- fillOpacity: 'auto',
- behaveLikeLine: false
- };
-
- function Area(options) {
- var areaOptions;
- if (!(this instanceof Morris.Area)) {
- return new Morris.Area(options);
- }
- areaOptions = $.extend({}, areaDefaults, options);
- this.cumulative = !areaOptions.behaveLikeLine;
- if (areaOptions.fillOpacity === 'auto') {
- areaOptions.fillOpacity = areaOptions.behaveLikeLine ? .8 : 1;
- }
- Area.__super__.constructor.call(this, areaOptions);
- }
-
- Area.prototype.calcPoints = function() {
- var row, total, y, _i, _len, _ref, _results;
- _ref = this.data;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- row = _ref[_i];
- row._x = this.transX(row.x);
- total = 0;
- row._y = (function() {
- var _j, _len1, _ref1, _results1;
- _ref1 = row.y;
- _results1 = [];
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
- y = _ref1[_j];
- if (this.options.behaveLikeLine) {
- _results1.push(this.transY(y));
- } else {
- total += y || 0;
- _results1.push(this.transY(total));
- }
- }
- return _results1;
- }).call(this);
- _results.push(row._ymax = Math.max.apply(Math, row._y));
- }
- return _results;
- };
-
- Area.prototype.drawSeries = function() {
- var i, range, _i, _j, _k, _len, _ref, _ref1, _results, _results1, _results2;
- this.seriesPoints = [];
- if (this.options.behaveLikeLine) {
- range = (function() {
- _results = [];
- for (var _i = 0, _ref = this.options.ykeys.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; 0 <= _ref ? _i++ : _i--){ _results.push(_i); }
- return _results;
- }).apply(this);
- } else {
- range = (function() {
- _results1 = [];
- for (var _j = _ref1 = this.options.ykeys.length - 1; _ref1 <= 0 ? _j <= 0 : _j >= 0; _ref1 <= 0 ? _j++ : _j--){ _results1.push(_j); }
- return _results1;
- }).apply(this);
- }
- _results2 = [];
- for (_k = 0, _len = range.length; _k < _len; _k++) {
- i = range[_k];
- this._drawFillFor(i);
- this._drawLineFor(i);
- _results2.push(this._drawPointFor(i));
- }
- return _results2;
- };
-
- Area.prototype._drawFillFor = function(index) {
- var path;
- path = this.paths[index];
- if (path !== null) {
- path = path + ("L" + (this.transX(this.xmax)) + "," + this.bottom + "L" + (this.transX(this.xmin)) + "," + this.bottom + "Z");
- return this.drawFilledPath(path, this.fillForSeries(index));
- }
- };
-
- Area.prototype.fillForSeries = function(i) {
- var color;
- color = Raphael.rgb2hsl(this.colorFor(this.data[i], i, 'line'));
- return Raphael.hsl(color.h, this.options.behaveLikeLine ? color.s * 0.9 : color.s * 0.75, Math.min(0.98, this.options.behaveLikeLine ? color.l * 1.2 : color.l * 1.25));
- };
-
- Area.prototype.drawFilledPath = function(path, fill) {
- return this.raphael.path(path).attr('fill', fill).attr('fill-opacity', this.options.fillOpacity).attr('stroke', 'none');
- };
-
- return Area;
-
- })(Morris.Line);
-
- Morris.Bar = (function(_super) {
- __extends(Bar, _super);
-
- function Bar(options) {
- this.onHoverOut = __bind(this.onHoverOut, this);
- this.onHoverMove = __bind(this.onHoverMove, this);
- this.onGridClick = __bind(this.onGridClick, this);
- if (!(this instanceof Morris.Bar)) {
- return new Morris.Bar(options);
- }
- Bar.__super__.constructor.call(this, $.extend({}, options, {
- parseTime: false
- }));
- }
-
- Bar.prototype.init = function() {
- this.cumulative = this.options.stacked;
- if (this.options.hideHover !== 'always') {
- this.hover = new Morris.Hover({
- parent: this.el
- });
- this.on('hovermove', this.onHoverMove);
- this.on('hoverout', this.onHoverOut);
- return this.on('gridclick', this.onGridClick);
- }
- };
-
- Bar.prototype.defaults = {
- barSizeRatio: 0.75,
- barGap: 3,
- barColors: ['#0b62a4', '#7a92a3', '#4da74d', '#afd8f8', '#edc240', '#cb4b4b', '#9440ed'],
- barOpacity: 1.0,
- barRadius: [0, 0, 0, 0],
- xLabelMargin: 50
- };
-
- Bar.prototype.calc = function() {
- var _ref;
- this.calcBars();
- if (this.options.hideHover === false) {
- return (_ref = this.hover).update.apply(_ref, this.hoverContentForRow(this.data.length - 1));
- }
- };
-
- Bar.prototype.calcBars = function() {
- var idx, row, y, _i, _len, _ref, _results;
- _ref = this.data;
- _results = [];
- for (idx = _i = 0, _len = _ref.length; _i < _len; idx = ++_i) {
- row = _ref[idx];
- row._x = this.left + this.width * (idx + 0.5) / this.data.length;
- _results.push(row._y = (function() {
- var _j, _len1, _ref1, _results1;
- _ref1 = row.y;
- _results1 = [];
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
- y = _ref1[_j];
- if (y != null) {
- _results1.push(this.transY(y));
- } else {
- _results1.push(null);
- }
- }
- return _results1;
- }).call(this));
- }
- return _results;
- };
-
- Bar.prototype.draw = function() {
- var _ref;
- if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'x') {
- this.drawXAxis();
- }
- return this.drawSeries();
- };
-
- Bar.prototype.drawXAxis = function() {
- var i, label, labelBox, margin, offset, prevAngleMargin, prevLabelMargin, row, textBox, ypos, _i, _ref, _results;
- ypos = this.bottom + (this.options.xAxisLabelTopPadding || this.options.padding / 2);
- prevLabelMargin = null;
- prevAngleMargin = null;
- _results = [];
- for (i = _i = 0, _ref = this.data.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
- row = this.data[this.data.length - 1 - i];
- label = this.drawXAxisLabel(row._x, ypos, row.label);
- textBox = label.getBBox();
- label.transform("r" + (-this.options.xLabelAngle));
- labelBox = label.getBBox();
- label.transform("t0," + (labelBox.height / 2) + "...");
- if (this.options.xLabelAngle !== 0) {
- offset = -0.5 * textBox.width * Math.cos(this.options.xLabelAngle * Math.PI / 180.0);
- label.transform("t" + offset + ",0...");
- }
- if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < this.el.width()) {
- if (this.options.xLabelAngle !== 0) {
- margin = 1.25 * this.options.gridTextSize / Math.sin(this.options.xLabelAngle * Math.PI / 180.0);
- prevAngleMargin = labelBox.x - margin;
- }
- _results.push(prevLabelMargin = labelBox.x - this.options.xLabelMargin);
- } else {
- _results.push(label.remove());
- }
- }
- return _results;
- };
-
- Bar.prototype.drawSeries = function() {
- var barWidth, bottom, groupWidth, idx, lastTop, left, leftPadding, numBars, row, sidx, size, spaceLeft, top, ypos, zeroPos;
- groupWidth = this.width / this.options.data.length;
- numBars = this.options.stacked ? 1 : this.options.ykeys.length;
- barWidth = (groupWidth * this.options.barSizeRatio - this.options.barGap * (numBars - 1)) / numBars;
- if (this.options.barSize) {
- barWidth = Math.min(barWidth, this.options.barSize);
- }
- spaceLeft = groupWidth - barWidth * numBars - this.options.barGap * (numBars - 1);
- leftPadding = spaceLeft / 2;
- zeroPos = this.ymin <= 0 && this.ymax >= 0 ? this.transY(0) : null;
- return this.bars = (function() {
- var _i, _len, _ref, _results;
- _ref = this.data;
- _results = [];
- for (idx = _i = 0, _len = _ref.length; _i < _len; idx = ++_i) {
- row = _ref[idx];
- lastTop = 0;
- _results.push((function() {
- var _j, _len1, _ref1, _results1;
- _ref1 = row._y;
- _results1 = [];
- for (sidx = _j = 0, _len1 = _ref1.length; _j < _len1; sidx = ++_j) {
- ypos = _ref1[sidx];
- if (ypos !== null) {
- if (zeroPos) {
- top = Math.min(ypos, zeroPos);
- bottom = Math.max(ypos, zeroPos);
- } else {
- top = ypos;
- bottom = this.bottom;
- }
- left = this.left + idx * groupWidth + leftPadding;
- if (!this.options.stacked) {
- left += sidx * (barWidth + this.options.barGap);
- }
- size = bottom - top;
- if (this.options.verticalGridCondition && this.options.verticalGridCondition(row.x)) {
- this.drawBar(this.left + idx * groupWidth, this.top, groupWidth, Math.abs(this.top - this.bottom), this.options.verticalGridColor, this.options.verticalGridOpacity, this.options.barRadius);
- }
- if (this.options.stacked) {
- top -= lastTop;
- }
- this.drawBar(left, top, barWidth, size, this.colorFor(row, sidx, 'bar'), this.options.barOpacity, this.options.barRadius);
- _results1.push(lastTop += size);
- } else {
- _results1.push(null);
- }
- }
- return _results1;
- }).call(this));
- }
- return _results;
- }).call(this);
- };
-
- Bar.prototype.colorFor = function(row, sidx, type) {
- var r, s;
- if (typeof this.options.barColors === 'function') {
- r = {
- x: row.x,
- y: row.y[sidx],
- label: row.label
- };
- s = {
- index: sidx,
- key: this.options.ykeys[sidx],
- label: this.options.labels[sidx]
- };
- return this.options.barColors.call(this, r, s, type);
- } else {
- return this.options.barColors[sidx % this.options.barColors.length];
- }
- };
-
- Bar.prototype.hitTest = function(x) {
- if (this.data.length === 0) {
- return null;
- }
- x = Math.max(Math.min(x, this.right), this.left);
- return Math.min(this.data.length - 1, Math.floor((x - this.left) / (this.width / this.data.length)));
- };
-
- Bar.prototype.onGridClick = function(x, y) {
- var index;
- index = this.hitTest(x);
- return this.fire('click', index, this.data[index].src, x, y);
- };
-
- Bar.prototype.onHoverMove = function(x, y) {
- var index, _ref;
- index = this.hitTest(x);
- return (_ref = this.hover).update.apply(_ref, this.hoverContentForRow(index));
- };
-
- Bar.prototype.onHoverOut = function() {
- if (this.options.hideHover !== false) {
- return this.hover.hide();
- }
- };
-
- Bar.prototype.hoverContentForRow = function(index) {
- var content, j, row, x, y, _i, _len, _ref;
- row = this.data[index];
- content = "<div class='morris-hover-row-label'>" + row.label + "</div>";
- _ref = row.y;
- for (j = _i = 0, _len = _ref.length; _i < _len; j = ++_i) {
- y = _ref[j];
- content += "<div class='morris-hover-point' style='color: " + (this.colorFor(row, j, 'label')) + "'>\n " + this.options.labels[j] + ":\n " + (this.yLabelFormat(y)) + "\n</div>";
- }
- if (typeof this.options.hoverCallback === 'function') {
- content = this.options.hoverCallback(index, this.options, content, row.src);
- }
- x = this.left + (index + 0.5) * this.width / this.data.length;
- return [content, x];
- };
-
- Bar.prototype.drawXAxisLabel = function(xPos, yPos, text) {
- var label;
- return label = this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor);
- };
-
- Bar.prototype.drawBar = function(xPos, yPos, width, height, barColor, opacity, radiusArray) {
- var maxRadius, path;
- maxRadius = Math.max.apply(Math, radiusArray);
- if (maxRadius === 0 || maxRadius > height) {
- path = this.raphael.rect(xPos, yPos, width, height);
- } else {
- path = this.raphael.path(this.roundedRect(xPos, yPos, width, height, radiusArray));
- }
- return path.attr('fill', barColor).attr('fill-opacity', opacity).attr('stroke', 'none');
- };
-
- Bar.prototype.roundedRect = function(x, y, w, h, r) {
- if (r == null) {
- r = [0, 0, 0, 0];
- }
- return ["M", x, r[0] + y, "Q", x, y, x + r[0], y, "L", x + w - r[1], y, "Q", x + w, y, x + w, y + r[1], "L", x + w, y + h - r[2], "Q", x + w, y + h, x + w - r[2], y + h, "L", x + r[3], y + h, "Q", x, y + h, x, y + h - r[3], "Z"];
- };
-
- return Bar;
-
- })(Morris.Grid);
-
- Morris.Donut = (function(_super) {
- __extends(Donut, _super);
-
- Donut.prototype.defaults = {
- colors: ['#0B62A4', '#3980B5', '#679DC6', '#95BBD7', '#B0CCE1', '#095791', '#095085', '#083E67', '#052C48', '#042135'],
- backgroundColor: '#FFFFFF',
- labelColor: '#000000',
- formatter: Morris.commas,
- resize: false
- };
-
- function Donut(options) {
- this.resizeHandler = __bind(this.resizeHandler, this);
- this.select = __bind(this.select, this);
- this.click = __bind(this.click, this);
- var _this = this;
- if (!(this instanceof Morris.Donut)) {
- return new Morris.Donut(options);
- }
- this.options = $.extend({}, this.defaults, options);
- if (typeof options.element === 'string') {
- this.el = $(document.getElementById(options.element));
- } else {
- this.el = $(options.element);
- }
- if (this.el === null || this.el.length === 0) {
- throw new Error("Graph placeholder not found.");
- }
- if (options.data === void 0 || options.data.length === 0) {
- return;
- }
- this.raphael = new Raphael(this.el[0]);
- if (this.options.resize) {
- $(window).bind('resize', function(evt) {
- if (_this.timeoutId != null) {
- window.clearTimeout(_this.timeoutId);
- }
- return _this.timeoutId = window.setTimeout(_this.resizeHandler, 100);
- });
- }
- this.setData(options.data);
- }
-
- Donut.prototype.redraw = function() {
- var C, cx, cy, i, idx, last, max_value, min, next, seg, total, value, w, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
- this.raphael.clear();
- cx = this.el.width() / 2;
- cy = this.el.height() / 2;
- w = (Math.min(cx, cy) - 10) / 3;
- total = 0;
- _ref = this.values;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- value = _ref[_i];
- total += value;
- }
- min = 5 / (2 * w);
- C = 1.9999 * Math.PI - min * this.data.length;
- last = 0;
- idx = 0;
- this.segments = [];
- _ref1 = this.values;
- for (i = _j = 0, _len1 = _ref1.length; _j < _len1; i = ++_j) {
- value = _ref1[i];
- next = last + min + C * (value / total);
- seg = new Morris.DonutSegment(cx, cy, w * 2, w, last, next, this.data[i].color || this.options.colors[idx % this.options.colors.length], this.options.backgroundColor, idx, this.raphael);
- seg.render();
- this.segments.push(seg);
- seg.on('hover', this.select);
- seg.on('click', this.click);
- last = next;
- idx += 1;
- }
- this.text1 = this.drawEmptyDonutLabel(cx, cy - 10, this.options.labelColor, 15, 800);
- this.text2 = this.drawEmptyDonutLabel(cx, cy + 10, this.options.labelColor, 14);
- max_value = Math.max.apply(Math, this.values);
- idx = 0;
- _ref2 = this.values;
- _results = [];
- for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
- value = _ref2[_k];
- if (value === max_value) {
- this.select(idx);
- break;
- }
- _results.push(idx += 1);
- }
- return _results;
- };
-
- Donut.prototype.setData = function(data) {
- var row;
- this.data = data;
- this.values = (function() {
- var _i, _len, _ref, _results;
- _ref = this.data;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- row = _ref[_i];
- _results.push(parseFloat(row.value));
- }
- return _results;
- }).call(this);
- return this.redraw();
- };
-
- Donut.prototype.click = function(idx) {
- return this.fire('click', idx, this.data[idx]);
- };
-
- Donut.prototype.select = function(idx) {
- var row, s, segment, _i, _len, _ref;
- _ref = this.segments;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- s = _ref[_i];
- s.deselect();
- }
- segment = this.segments[idx];
- segment.select();
- row = this.data[idx];
- return this.setLabels(row.label, this.options.formatter(row.value, row));
- };
-
- Donut.prototype.setLabels = function(label1, label2) {
- var inner, maxHeightBottom, maxHeightTop, maxWidth, text1bbox, text1scale, text2bbox, text2scale;
- inner = (Math.min(this.el.width() / 2, this.el.height() / 2) - 10) * 2 / 3;
- maxWidth = 1.8 * inner;
- maxHeightTop = inner / 2;
- maxHeightBottom = inner / 3;
- this.text1.attr({
- text: label1,
- transform: ''
- });
- text1bbox = this.text1.getBBox();
- text1scale = Math.min(maxWidth / text1bbox.width, maxHeightTop / text1bbox.height);
- this.text1.attr({
- transform: "S" + text1scale + "," + text1scale + "," + (text1bbox.x + text1bbox.width / 2) + "," + (text1bbox.y + text1bbox.height)
- });
- this.text2.attr({
- text: label2,
- transform: ''
- });
- text2bbox = this.text2.getBBox();
- text2scale = Math.min(maxWidth / text2bbox.width, maxHeightBottom / text2bbox.height);
- return this.text2.attr({
- transform: "S" + text2scale + "," + text2scale + "," + (text2bbox.x + text2bbox.width / 2) + "," + text2bbox.y
- });
- };
-
- Donut.prototype.drawEmptyDonutLabel = function(xPos, yPos, color, fontSize, fontWeight) {
- var text;
- text = this.raphael.text(xPos, yPos, '').attr('font-size', fontSize).attr('fill', color);
- if (fontWeight != null) {
- text.attr('font-weight', fontWeight);
- }
- return text;
- };
-
- Donut.prototype.resizeHandler = function() {
- this.timeoutId = null;
- this.raphael.setSize(this.el.width(), this.el.height());
- return this.redraw();
- };
-
- return Donut;
-
- })(Morris.EventEmitter);
-
- Morris.DonutSegment = (function(_super) {
- __extends(DonutSegment, _super);
-
- function DonutSegment(cx, cy, inner, outer, p0, p1, color, backgroundColor, index, raphael) {
- this.cx = cx;
- this.cy = cy;
- this.inner = inner;
- this.outer = outer;
- this.color = color;
- this.backgroundColor = backgroundColor;
- this.index = index;
- this.raphael = raphael;
- this.deselect = __bind(this.deselect, this);
- this.select = __bind(this.select, this);
- this.sin_p0 = Math.sin(p0);
- this.cos_p0 = Math.cos(p0);
- this.sin_p1 = Math.sin(p1);
- this.cos_p1 = Math.cos(p1);
- this.is_long = (p1 - p0) > Math.PI ? 1 : 0;
- this.path = this.calcSegment(this.inner + 3, this.inner + this.outer - 5);
- this.selectedPath = this.calcSegment(this.inner + 3, this.inner + this.outer);
- this.hilight = this.calcArc(this.inner);
- }
-
- DonutSegment.prototype.calcArcPoints = function(r) {
- return [this.cx + r * this.sin_p0, this.cy + r * this.cos_p0, this.cx + r * this.sin_p1, this.cy + r * this.cos_p1];
- };
-
- DonutSegment.prototype.calcSegment = function(r1, r2) {
- var ix0, ix1, iy0, iy1, ox0, ox1, oy0, oy1, _ref, _ref1;
- _ref = this.calcArcPoints(r1), ix0 = _ref[0], iy0 = _ref[1], ix1 = _ref[2], iy1 = _ref[3];
- _ref1 = this.calcArcPoints(r2), ox0 = _ref1[0], oy0 = _ref1[1], ox1 = _ref1[2], oy1 = _ref1[3];
- return ("M" + ix0 + "," + iy0) + ("A" + r1 + "," + r1 + ",0," + this.is_long + ",0," + ix1 + "," + iy1) + ("L" + ox1 + "," + oy1) + ("A" + r2 + "," + r2 + ",0," + this.is_long + ",1," + ox0 + "," + oy0) + "Z";
- };
-
- DonutSegment.prototype.calcArc = function(r) {
- var ix0, ix1, iy0, iy1, _ref;
- _ref = this.calcArcPoints(r), ix0 = _ref[0], iy0 = _ref[1], ix1 = _ref[2], iy1 = _ref[3];
- return ("M" + ix0 + "," + iy0) + ("A" + r + "," + r + ",0," + this.is_long + ",0," + ix1 + "," + iy1);
- };
-
- DonutSegment.prototype.render = function() {
- var _this = this;
- this.arc = this.drawDonutArc(this.hilight, this.color);
- return this.seg = this.drawDonutSegment(this.path, this.color, this.backgroundColor, function() {
- return _this.fire('hover', _this.index);
- }, function() {
- return _this.fire('click', _this.index);
- });
- };
-
- DonutSegment.prototype.drawDonutArc = function(path, color) {
- return this.raphael.path(path).attr({
- stroke: color,
- 'stroke-width': 2,
- opacity: 0
- });
- };
-
- DonutSegment.prototype.drawDonutSegment = function(path, fillColor, strokeColor, hoverFunction, clickFunction) {
- return this.raphael.path(path).attr({
- fill: fillColor,
- stroke: strokeColor,
- 'stroke-width': 3
- }).hover(hoverFunction).click(clickFunction);
- };
-
- DonutSegment.prototype.select = function() {
- if (!this.selected) {
- this.seg.animate({
- path: this.selectedPath
- }, 150, '<>');
- this.arc.animate({
- opacity: 1
- }, 150, '<>');
- return this.selected = true;
- }
- };
-
- DonutSegment.prototype.deselect = function() {
- if (this.selected) {
- this.seg.animate({
- path: this.path
- }, 150, '<>');
- this.arc.animate({
- opacity: 0
- }, 150, '<>');
- return this.selected = false;
- }
- };
-
- return DonutSegment;
-
- })(Morris.EventEmitter);
-
-}).call(this);
diff --git a/debian/missing-sources/pako-1.0.6.js b/debian/missing-sources/pako-1.0.6.js
deleted file mode 100644
index fc92282a..00000000
--- a/debian/missing-sources/pako-1.0.6.js
+++ /dev/null
@@ -1,6809 +0,0 @@
-/* pako 1.0.6 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
-'use strict';
-
-
-var zlib_deflate = require('./zlib/deflate');
-var utils = require('./utils/common');
-var strings = require('./utils/strings');
-var msg = require('./zlib/messages');
-var ZStream = require('./zlib/zstream');
-
-var toString = Object.prototype.toString;
-
-/* Public constants ==========================================================*/
-/* ===========================================================================*/
-
-var Z_NO_FLUSH = 0;
-var Z_FINISH = 4;
-
-var Z_OK = 0;
-var Z_STREAM_END = 1;
-var Z_SYNC_FLUSH = 2;
-
-var Z_DEFAULT_COMPRESSION = -1;
-
-var Z_DEFAULT_STRATEGY = 0;
-
-var Z_DEFLATED = 8;
-
-/* ===========================================================================*/
-
-
-/**
- * class Deflate
- *
- * Generic JS-style wrapper for zlib calls. If you don't need
- * streaming behaviour - use more simple functions: [[deflate]],
- * [[deflateRaw]] and [[gzip]].
- **/
-
-/* internal
- * Deflate.chunks -> Array
- *
- * Chunks of output data, if [[Deflate#onData]] not overridden.
- **/
-
-/**
- * Deflate.result -> Uint8Array|Array
- *
- * Compressed result, generated by default [[Deflate#onData]]
- * and [[Deflate#onEnd]] handlers. Filled after you push last chunk
- * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you
- * push a chunk with explicit flush (call [[Deflate#push]] with
- * `Z_SYNC_FLUSH` param).
- **/
-
-/**
- * Deflate.err -> Number
- *
- * Error code after deflate finished. 0 (Z_OK) on success.
- * You will not need it in real life, because deflate errors
- * are possible only on wrong options or bad `onData` / `onEnd`
- * custom handlers.
- **/
-
-/**
- * Deflate.msg -> String
- *
- * Error message, if [[Deflate.err]] != 0
- **/
-
-
-/**
- * new Deflate(options)
- * - options (Object): zlib deflate options.
- *
- * Creates new deflator instance with specified params. Throws exception
- * on bad params. Supported options:
- *
- * - `level`
- * - `windowBits`
- * - `memLevel`
- * - `strategy`
- * - `dictionary`
- *
- * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
- * for more information on these.
- *
- * Additional options, for internal needs:
- *
- * - `chunkSize` - size of generated data chunks (16K by default)
- * - `raw` (Boolean) - do raw deflate
- * - `gzip` (Boolean) - create gzip wrapper
- * - `to` (String) - if equal to 'string', then result will be "binary string"
- * (each char code [0..255])
- * - `header` (Object) - custom header for gzip
- * - `text` (Boolean) - true if compressed data believed to be text
- * - `time` (Number) - modification time, unix timestamp
- * - `os` (Number) - operation system code
- * - `extra` (Array) - array of bytes with extra data (max 65536)
- * - `name` (String) - file name (binary string)
- * - `comment` (String) - comment (binary string)
- * - `hcrc` (Boolean) - true if header crc should be added
- *
- * ##### Example:
- *
- * ```javascript
- * var pako = require('pako')
- * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
- * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
- *
- * var deflate = new pako.Deflate({ level: 3});
- *
- * deflate.push(chunk1, false);
- * deflate.push(chunk2, true); // true -> last chunk
- *
- * if (deflate.err) { throw new Error(deflate.err); }
- *
- * console.log(deflate.result);
- * ```
- **/
-function Deflate(options) {
- if (!(this instanceof Deflate)) return new Deflate(options);
-
- this.options = utils.assign({
- level: Z_DEFAULT_COMPRESSION,
- method: Z_DEFLATED,
- chunkSize: 16384,
- windowBits: 15,
- memLevel: 8,
- strategy: Z_DEFAULT_STRATEGY,
- to: ''
- }, options || {});
-
- var opt = this.options;
-
- if (opt.raw && (opt.windowBits > 0)) {
- opt.windowBits = -opt.windowBits;
- }
-
- else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {
- opt.windowBits += 16;
- }
-
- this.err = 0; // error code, if happens (0 = Z_OK)
- this.msg = ''; // error message
- this.ended = false; // used to avoid multiple onEnd() calls
- this.chunks = []; // chunks of compressed data
-
- this.strm = new ZStream();
- this.strm.avail_out = 0;
-
- var status = zlib_deflate.deflateInit2(
- this.strm,
- opt.level,
- opt.method,
- opt.windowBits,
- opt.memLevel,
- opt.strategy
- );
-
- if (status !== Z_OK) {
- throw new Error(msg[status]);
- }
-
- if (opt.header) {
- zlib_deflate.deflateSetHeader(this.strm, opt.header);
- }
-
- if (opt.dictionary) {
- var dict;
- // Convert data if needed
- if (typeof opt.dictionary === 'string') {
- // If we need to compress text, change encoding to utf8.
- dict = strings.string2buf(opt.dictionary);
- } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {
- dict = new Uint8Array(opt.dictionary);
- } else {
- dict = opt.dictionary;
- }
-
- status = zlib_deflate.deflateSetDictionary(this.strm, dict);
-
- if (status !== Z_OK) {
- throw new Error(msg[status]);
- }
-
- this._dict_set = true;
- }
-}
-
-/**
- * Deflate#push(data[, mode]) -> Boolean
- * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be
- * converted to utf8 byte sequence.
- * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
- * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.
- *
- * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with
- * new compressed chunks. Returns `true` on success. The last data block must have
- * mode Z_FINISH (or `true`). That will flush internal pending buffers and call
- * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you
- * can use mode Z_SYNC_FLUSH, keeping the compression context.
- *
- * On fail call [[Deflate#onEnd]] with error code and return false.
- *
- * We strongly recommend to use `Uint8Array` on input for best speed (output
- * array format is detected automatically). Also, don't skip last param and always
- * use the same type in your code (boolean or number). That will improve JS speed.
- *
- * For regular `Array`-s make sure all elements are [0..255].
- *
- * ##### Example
- *
- * ```javascript
- * push(chunk, false); // push one of data chunks
- * ...
- * push(chunk, true); // push last chunk
- * ```
- **/
-Deflate.prototype.push = function (data, mode) {
- var strm = this.strm;
- var chunkSize = this.options.chunkSize;
- var status, _mode;
-
- if (this.ended) { return false; }
-
- _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);
-
- // Convert data if needed
- if (typeof data === 'string') {
- // If we need to compress text, change encoding to utf8.
- strm.input = strings.string2buf(data);
- } else if (toString.call(data) === '[object ArrayBuffer]') {
- strm.input = new Uint8Array(data);
- } else {
- strm.input = data;
- }
-
- strm.next_in = 0;
- strm.avail_in = strm.input.length;
-
- do {
- if (strm.avail_out === 0) {
- strm.output = new utils.Buf8(chunkSize);
- strm.next_out = 0;
- strm.avail_out = chunkSize;
- }
- status = zlib_deflate.deflate(strm, _mode); /* no bad return value */
-
- if (status !== Z_STREAM_END && status !== Z_OK) {
- this.onEnd(status);
- this.ended = true;
- return false;
- }
- if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {
- if (this.options.to === 'string') {
- this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));
- } else {
- this.onData(utils.shrinkBuf(strm.output, strm.next_out));
- }
- }
- } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);
-
- // Finalize on the last chunk.
- if (_mode === Z_FINISH) {
- status = zlib_deflate.deflateEnd(this.strm);
- this.onEnd(status);
- this.ended = true;
- return status === Z_OK;
- }
-
- // callback interim results if Z_SYNC_FLUSH.
- if (_mode === Z_SYNC_FLUSH) {
- this.onEnd(Z_OK);
- strm.avail_out = 0;
- return true;
- }
-
- return true;
-};
-
-
-/**
- * Deflate#onData(chunk) -> Void
- * - chunk (Uint8Array|Array|String): output data. Type of array depends
- * on js engine support. When string output requested, each chunk
- * will be string.
- *
- * By default, stores data blocks in `chunks[]` property and glue
- * those in `onEnd`. Override this handler, if you need another behaviour.
- **/
-Deflate.prototype.onData = function (chunk) {
- this.chunks.push(chunk);
-};
-
-
-/**
- * Deflate#onEnd(status) -> Void
- * - status (Number): deflate status. 0 (Z_OK) on success,
- * other if not.
- *
- * Called once after you tell deflate that the input stream is
- * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)
- * or if an error happened. By default - join collected chunks,
- * free memory and fill `results` / `err` properties.
- **/
-Deflate.prototype.onEnd = function (status) {
- // On success - join
- if (status === Z_OK) {
- if (this.options.to === 'string') {
- this.result = this.chunks.join('');
- } else {
- this.result = utils.flattenChunks(this.chunks);
- }
- }
- this.chunks = [];
- this.err = status;
- this.msg = this.strm.msg;
-};
-
-
-/**
- * deflate(data[, options]) -> Uint8Array|Array|String
- * - data (Uint8Array|Array|String): input data to compress.
- * - options (Object): zlib deflate options.
- *
- * Compress `data` with deflate algorithm and `options`.
- *
- * Supported options are:
- *
- * - level
- * - windowBits
- * - memLevel
- * - strategy
- * - dictionary
- *
- * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
- * for more information on these.
- *
- * Sugar (options):
- *
- * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
- * negative windowBits implicitly.
- * - `to` (String) - if equal to 'string', then result will be "binary string"
- * (each char code [0..255])
- *
- * ##### Example:
- *
- * ```javascript
- * var pako = require('pako')
- * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);
- *
- * console.log(pako.deflate(data));
- * ```
- **/
-function deflate(input, options) {
- var deflator = new Deflate(options);
-
- deflator.push(input, true);
-
- // That will never happens, if you don't cheat with options :)
- if (deflator.err) { throw deflator.msg || msg[deflator.err]; }
-
- return deflator.result;
-}
-
-
-/**
- * deflateRaw(data[, options]) -> Uint8Array|Array|String
- * - data (Uint8Array|Array|String): input data to compress.
- * - options (Object): zlib deflate options.
- *
- * The same as [[deflate]], but creates raw data, without wrapper
- * (header and adler32 crc).
- **/
-function deflateRaw(input, options) {
- options = options || {};
- options.raw = true;
- return deflate(input, options);
-}
-
-
-/**
- * gzip(data[, options]) -> Uint8Array|Array|String
- * - data (Uint8Array|Array|String): input data to compress.
- * - options (Object): zlib deflate options.
- *
- * The same as [[deflate]], but create gzip wrapper instead of
- * deflate one.
- **/
-function gzip(input, options) {
- options = options || {};
- options.gzip = true;
- return deflate(input, options);
-}
-
-
-exports.Deflate = Deflate;
-exports.deflate = deflate;
-exports.deflateRaw = deflateRaw;
-exports.gzip = gzip;
-
-},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(require,module,exports){
-'use strict';
-
-
-var zlib_inflate = require('./zlib/inflate');
-var utils = require('./utils/common');
-var strings = require('./utils/strings');
-var c = require('./zlib/constants');
-var msg = require('./zlib/messages');
-var ZStream = require('./zlib/zstream');
-var GZheader = require('./zlib/gzheader');
-
-var toString = Object.prototype.toString;
-
-/**
- * class Inflate
- *
- * Generic JS-style wrapper for zlib calls. If you don't need
- * streaming behaviour - use more simple functions: [[inflate]]
- * and [[inflateRaw]].
- **/
-
-/* internal
- * inflate.chunks -> Array
- *
- * Chunks of output data, if [[Inflate#onData]] not overridden.
- **/
-
-/**
- * Inflate.result -> Uint8Array|Array|String
- *
- * Uncompressed result, generated by default [[Inflate#onData]]
- * and [[Inflate#onEnd]] handlers. Filled after you push last chunk
- * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you
- * push a chunk with explicit flush (call [[Inflate#push]] with
- * `Z_SYNC_FLUSH` param).
- **/
-
-/**
- * Inflate.err -> Number
- *
- * Error code after inflate finished. 0 (Z_OK) on success.
- * Should be checked if broken data possible.
- **/
-
-/**
- * Inflate.msg -> String
- *
- * Error message, if [[Inflate.err]] != 0
- **/
-
-
-/**
- * new Inflate(options)
- * - options (Object): zlib inflate options.
- *
- * Creates new inflator instance with specified params. Throws exception
- * on bad params. Supported options:
- *
- * - `windowBits`
- * - `dictionary`
- *
- * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
- * for more information on these.
- *
- * Additional options, for internal needs:
- *
- * - `chunkSize` - size of generated data chunks (16K by default)
- * - `raw` (Boolean) - do raw inflate
- * - `to` (String) - if equal to 'string', then result will be converted
- * from utf8 to utf16 (javascript) string. When string output requested,
- * chunk length can differ from `chunkSize`, depending on content.
- *
- * By default, when no options set, autodetect deflate/gzip data format via
- * wrapper header.
- *
- * ##### Example:
- *
- * ```javascript
- * var pako = require('pako')
- * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
- * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
- *
- * var inflate = new pako.Inflate({ level: 3});
- *
- * inflate.push(chunk1, false);
- * inflate.push(chunk2, true); // true -> last chunk
- *
- * if (inflate.err) { throw new Error(inflate.err); }
- *
- * console.log(inflate.result);
- * ```
- **/
-function Inflate(options) {
- if (!(this instanceof Inflate)) return new Inflate(options);
-
- this.options = utils.assign({
- chunkSize: 16384,
- windowBits: 0,
- to: ''
- }, options || {});
-
- var opt = this.options;
-
- // Force window size for `raw` data, if not set directly,
- // because we have no header for autodetect.
- if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {
- opt.windowBits = -opt.windowBits;
- if (opt.windowBits === 0) { opt.windowBits = -15; }
- }
-
- // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate
- if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&
- !(options && options.windowBits)) {
- opt.windowBits += 32;
- }
-
- // Gzip header has no info about windows size, we can do autodetect only
- // for deflate. So, if window size not set, force it to max when gzip possible
- if ((opt.windowBits > 15) && (opt.windowBits < 48)) {
- // bit 3 (16) -> gzipped data
- // bit 4 (32) -> autodetect gzip/deflate
- if ((opt.windowBits & 15) === 0) {
- opt.windowBits |= 15;
- }
- }
-
- this.err = 0; // error code, if happens (0 = Z_OK)
- this.msg = ''; // error message
- this.ended = false; // used to avoid multiple onEnd() calls
- this.chunks = []; // chunks of compressed data
-
- this.strm = new ZStream();
- this.strm.avail_out = 0;
-
- var status = zlib_inflate.inflateInit2(
- this.strm,
- opt.windowBits
- );
-
- if (status !== c.Z_OK) {
- throw new Error(msg[status]);
- }
-
- this.header = new GZheader();
-
- zlib_inflate.inflateGetHeader(this.strm, this.header);
-}
-
-/**
- * Inflate#push(data[, mode]) -> Boolean
- * - data (Uint8Array|Array|ArrayBuffer|String): input data
- * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
- * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.
- *
- * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with
- * new output chunks. Returns `true` on success. The last data block must have
- * mode Z_FINISH (or `true`). That will flush internal pending buffers and call
- * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you
- * can use mode Z_SYNC_FLUSH, keeping the decompression context.
- *
- * On fail call [[Inflate#onEnd]] with error code and return false.
- *
- * We strongly recommend to use `Uint8Array` on input for best speed (output
- * format is detected automatically). Also, don't skip last param and always
- * use the same type in your code (boolean or number). That will improve JS speed.
- *
- * For regular `Array`-s make sure all elements are [0..255].
- *
- * ##### Example
- *
- * ```javascript
- * push(chunk, false); // push one of data chunks
- * ...
- * push(chunk, true); // push last chunk
- * ```
- **/
-Inflate.prototype.push = function (data, mode) {
- var strm = this.strm;
- var chunkSize = this.options.chunkSize;
- var dictionary = this.options.dictionary;
- var status, _mode;
- var next_out_utf8, tail, utf8str;
- var dict;
-
- // Flag to properly process Z_BUF_ERROR on testing inflate call
- // when we check that all output data was flushed.
- var allowBufError = false;
-
- if (this.ended) { return false; }
- _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);
-
- // Convert data if needed
- if (typeof data === 'string') {
- // Only binary strings can be decompressed on practice
- strm.input = strings.binstring2buf(data);
- } else if (toString.call(data) === '[object ArrayBuffer]') {
- strm.input = new Uint8Array(data);
- } else {
- strm.input = data;
- }
-
- strm.next_in = 0;
- strm.avail_in = strm.input.length;
-
- do {
- if (strm.avail_out === 0) {
- strm.output = new utils.Buf8(chunkSize);
- strm.next_out = 0;
- strm.avail_out = chunkSize;
- }
-
- status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */
-
- if (status === c.Z_NEED_DICT && dictionary) {
- // Convert data if needed
- if (typeof dictionary === 'string') {
- dict = strings.string2buf(dictionary);
- } else if (toString.call(dictionary) === '[object ArrayBuffer]') {
- dict = new Uint8Array(dictionary);
- } else {
- dict = dictionary;
- }
-
- status = zlib_inflate.inflateSetDictionary(this.strm, dict);
-
- }
-
- if (status === c.Z_BUF_ERROR && allowBufError === true) {
- status = c.Z_OK;
- allowBufError = false;
- }
-
- if (status !== c.Z_STREAM_END && status !== c.Z_OK) {
- this.onEnd(status);
- this.ended = true;
- return false;
- }
-
- if (strm.next_out) {
- if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {
-
- if (this.options.to === 'string') {
-
- next_out_utf8 = strings.utf8border(strm.output, strm.next_out);
-
- tail = strm.next_out - next_out_utf8;
- utf8str = strings.buf2string(strm.output, next_out_utf8);
-
- // move tail
- strm.next_out = tail;
- strm.avail_out = chunkSize - tail;
- if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }
-
- this.onData(utf8str);
-
- } else {
- this.onData(utils.shrinkBuf(strm.output, strm.next_out));
- }
- }
- }
-
- // When no more input data, we should check that internal inflate buffers
- // are flushed. The only way to do it when avail_out = 0 - run one more
- // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.
- // Here we set flag to process this error properly.
- //
- // NOTE. Deflate does not return error in this case and does not needs such
- // logic.
- if (strm.avail_in === 0 && strm.avail_out === 0) {
- allowBufError = true;
- }
-
- } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);
-
- if (status === c.Z_STREAM_END) {
- _mode = c.Z_FINISH;
- }
-
- // Finalize on the last chunk.
- if (_mode === c.Z_FINISH) {
- status = zlib_inflate.inflateEnd(this.strm);
- this.onEnd(status);
- this.ended = true;
- return status === c.Z_OK;
- }
-
- // callback interim results if Z_SYNC_FLUSH.
- if (_mode === c.Z_SYNC_FLUSH) {
- this.onEnd(c.Z_OK);
- strm.avail_out = 0;
- return true;
- }
-
- return true;
-};
-
-
-/**
- * Inflate#onData(chunk) -> Void
- * - chunk (Uint8Array|Array|String): output data. Type of array depends
- * on js engine support. When string output requested, each chunk
- * will be string.
- *
- * By default, stores data blocks in `chunks[]` property and glue
- * those in `onEnd`. Override this handler, if you need another behaviour.
- **/
-Inflate.prototype.onData = function (chunk) {
- this.chunks.push(chunk);
-};
-
-
-/**
- * Inflate#onEnd(status) -> Void
- * - status (Number): inflate status. 0 (Z_OK) on success,
- * other if not.
- *
- * Called either after you tell inflate that the input stream is
- * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)
- * or if an error happened. By default - join collected chunks,
- * free memory and fill `results` / `err` properties.
- **/
-Inflate.prototype.onEnd = function (status) {
- // On success - join
- if (status === c.Z_OK) {
- if (this.options.to === 'string') {
- // Glue & convert here, until we teach pako to send
- // utf8 aligned strings to onData
- this.result = this.chunks.join('');
- } else {
- this.result = utils.flattenChunks(this.chunks);
- }
- }
- this.chunks = [];
- this.err = status;
- this.msg = this.strm.msg;
-};
-
-
-/**
- * inflate(data[, options]) -> Uint8Array|Array|String
- * - data (Uint8Array|Array|String): input data to decompress.
- * - options (Object): zlib inflate options.
- *
- * Decompress `data` with inflate/ungzip and `options`. Autodetect
- * format via wrapper header by default. That's why we don't provide
- * separate `ungzip` method.
- *
- * Supported options are:
- *
- * - windowBits
- *
- * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
- * for more information.
- *
- * Sugar (options):
- *
- * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
- * negative windowBits implicitly.
- * - `to` (String) - if equal to 'string', then result will be converted
- * from utf8 to utf16 (javascript) string. When string output requested,
- * chunk length can differ from `chunkSize`, depending on content.
- *
- *
- * ##### Example:
- *
- * ```javascript
- * var pako = require('pako')
- * , input = pako.deflate([1,2,3,4,5,6,7,8,9])
- * , output;
- *
- * try {
- * output = pako.inflate(input);
- * } catch (err)
- * console.log(err);
- * }
- * ```
- **/
-function inflate(input, options) {
- var inflator = new Inflate(options);
-
- inflator.push(input, true);
-
- // That will never happens, if you don't cheat with options :)
- if (inflator.err) { throw inflator.msg || msg[inflator.err]; }
-
- return inflator.result;
-}
-
-
-/**
- * inflateRaw(data[, options]) -> Uint8Array|Array|String
- * - data (Uint8Array|Array|String): input data to decompress.
- * - options (Object): zlib inflate options.
- *
- * The same as [[inflate]], but creates raw data, without wrapper
- * (header and adler32 crc).
- **/
-function inflateRaw(input, options) {
- options = options || {};
- options.raw = true;
- return inflate(input, options);
-}
-
-
-/**
- * ungzip(data[, options]) -> Uint8Array|Array|String
- * - data (Uint8Array|Array|String): input data to decompress.
- * - options (Object): zlib inflate options.
- *
- * Just shortcut to [[inflate]], because it autodetects format
- * by header.content. Done for convenience.
- **/
-
-
-exports.Inflate = Inflate;
-exports.inflate = inflate;
-exports.inflateRaw = inflateRaw;
-exports.ungzip = inflate;
-
-},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(require,module,exports){
-'use strict';
-
-
-var TYPED_OK = (typeof Uint8Array !== 'undefined') &&
- (typeof Uint16Array !== 'undefined') &&
- (typeof Int32Array !== 'undefined');
-
-function _has(obj, key) {
- return Object.prototype.hasOwnProperty.call(obj, key);
-}
-
-exports.assign = function (obj /*from1, from2, from3, ...*/) {
- var sources = Array.prototype.slice.call(arguments, 1);
- while (sources.length) {
- var source = sources.shift();
- if (!source) { continue; }
-
- if (typeof source !== 'object') {
- throw new TypeError(source + 'must be non-object');
- }
-
- for (var p in source) {
- if (_has(source, p)) {
- obj[p] = source[p];
- }
- }
- }
-
- return obj;
-};
-
-
-// reduce buffer size, avoiding mem copy
-exports.shrinkBuf = function (buf, size) {
- if (buf.length === size) { return buf; }
- if (buf.subarray) { return buf.subarray(0, size); }
- buf.length = size;
- return buf;
-};
-
-
-var fnTyped = {
- arraySet: function (dest, src, src_offs, len, dest_offs) {
- if (src.subarray && dest.subarray) {
- dest.set(src.subarray(src_offs, src_offs + len), dest_offs);
- return;
- }
- // Fallback to ordinary array
- for (var i = 0; i < len; i++) {
- dest[dest_offs + i] = src[src_offs + i];
- }
- },
- // Join array of chunks to single array.
- flattenChunks: function (chunks) {
- var i, l, len, pos, chunk, result;
-
- // calculate data length
- len = 0;
- for (i = 0, l = chunks.length; i < l; i++) {
- len += chunks[i].length;
- }
-
- // join chunks
- result = new Uint8Array(len);
- pos = 0;
- for (i = 0, l = chunks.length; i < l; i++) {
- chunk = chunks[i];
- result.set(chunk, pos);
- pos += chunk.length;
- }
-
- return result;
- }
-};
-
-var fnUntyped = {
- arraySet: function (dest, src, src_offs, len, dest_offs) {
- for (var i = 0; i < len; i++) {
- dest[dest_offs + i] = src[src_offs + i];
- }
- },
- // Join array of chunks to single array.
- flattenChunks: function (chunks) {
- return [].concat.apply([], chunks);
- }
-};
-
-
-// Enable/Disable typed arrays use, for testing
-//
-exports.setTyped = function (on) {
- if (on) {
- exports.Buf8 = Uint8Array;
- exports.Buf16 = Uint16Array;
- exports.Buf32 = Int32Array;
- exports.assign(exports, fnTyped);
- } else {
- exports.Buf8 = Array;
- exports.Buf16 = Array;
- exports.Buf32 = Array;
- exports.assign(exports, fnUntyped);
- }
-};
-
-exports.setTyped(TYPED_OK);
-
-},{}],4:[function(require,module,exports){
-// String encode/decode helpers
-'use strict';
-
-
-var utils = require('./common');
-
-
-// Quick check if we can use fast array to bin string conversion
-//
-// - apply(Array) can fail on Android 2.2
-// - apply(Uint8Array) can fail on iOS 5.1 Safari
-//
-var STR_APPLY_OK = true;
-var STR_APPLY_UIA_OK = true;
-
-try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }
-try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }
-
-
-// Table with utf8 lengths (calculated by first byte of sequence)
-// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
-// because max possible codepoint is 0x10ffff
-var _utf8len = new utils.Buf8(256);
-for (var q = 0; q < 256; q++) {
- _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);
-}
-_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start
-
-
-// convert string to array (typed, when possible)
-exports.string2buf = function (str) {
- var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;
-
- // count binary size
- for (m_pos = 0; m_pos < str_len; m_pos++) {
- c = str.charCodeAt(m_pos);
- if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
- c2 = str.charCodeAt(m_pos + 1);
- if ((c2 & 0xfc00) === 0xdc00) {
- c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
- m_pos++;
- }
- }
- buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
- }
-
- // allocate buffer
- buf = new utils.Buf8(buf_len);
-
- // convert
- for (i = 0, m_pos = 0; i < buf_len; m_pos++) {
- c = str.charCodeAt(m_pos);
- if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
- c2 = str.charCodeAt(m_pos + 1);
- if ((c2 & 0xfc00) === 0xdc00) {
- c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
- m_pos++;
- }
- }
- if (c < 0x80) {
- /* one byte */
- buf[i++] = c;
- } else if (c < 0x800) {
- /* two bytes */
- buf[i++] = 0xC0 | (c >>> 6);
- buf[i++] = 0x80 | (c & 0x3f);
- } else if (c < 0x10000) {
- /* three bytes */
- buf[i++] = 0xE0 | (c >>> 12);
- buf[i++] = 0x80 | (c >>> 6 & 0x3f);
- buf[i++] = 0x80 | (c & 0x3f);
- } else {
- /* four bytes */
- buf[i++] = 0xf0 | (c >>> 18);
- buf[i++] = 0x80 | (c >>> 12 & 0x3f);
- buf[i++] = 0x80 | (c >>> 6 & 0x3f);
- buf[i++] = 0x80 | (c & 0x3f);
- }
- }
-
- return buf;
-};
-
-// Helper (used in 2 places)
-function buf2binstring(buf, len) {
- // use fallback for big arrays to avoid stack overflow
- if (len < 65537) {
- if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {
- return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));
- }
- }
-
- var result = '';
- for (var i = 0; i < len; i++) {
- result += String.fromCharCode(buf[i]);
- }
- return result;
-}
-
-
-// Convert byte array to binary string
-exports.buf2binstring = function (buf) {
- return buf2binstring(buf, buf.length);
-};
-
-
-// Convert binary string (typed, when possible)
-exports.binstring2buf = function (str) {
- var buf = new utils.Buf8(str.length);
- for (var i = 0, len = buf.length; i < len; i++) {
- buf[i] = str.charCodeAt(i);
- }
- return buf;
-};
-
-
-// convert array to string
-exports.buf2string = function (buf, max) {
- var i, out, c, c_len;
- var len = max || buf.length;
-
- // Reserve max possible length (2 words per char)
- // NB: by unknown reasons, Array is significantly faster for
- // String.fromCharCode.apply than Uint16Array.
- var utf16buf = new Array(len * 2);
-
- for (out = 0, i = 0; i < len;) {
- c = buf[i++];
- // quick process ascii
- if (c < 0x80) { utf16buf[out++] = c; continue; }
-
- c_len = _utf8len[c];
- // skip 5 & 6 byte codes
- if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }
-
- // apply mask on first byte
- c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
- // join the rest
- while (c_len > 1 && i < len) {
- c = (c << 6) | (buf[i++] & 0x3f);
- c_len--;
- }
-
- // terminated by end of string?
- if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }
-
- if (c < 0x10000) {
- utf16buf[out++] = c;
- } else {
- c -= 0x10000;
- utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
- utf16buf[out++] = 0xdc00 | (c & 0x3ff);
- }
- }
-
- return buf2binstring(utf16buf, out);
-};
-
-
-// Calculate max possible position in utf8 buffer,
-// that will not break sequence. If that's not possible
-// - (very small limits) return max size as is.
-//
-// buf[] - utf8 bytes array
-// max - length limit (mandatory);
-exports.utf8border = function (buf, max) {
- var pos;
-
- max = max || buf.length;
- if (max > buf.length) { max = buf.length; }
-
- // go back from last position, until start of sequence found
- pos = max - 1;
- while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }
-
- // Very small and broken sequence,
- // return max, because we should return something anyway.
- if (pos < 0) { return max; }
-
- // If we came to start of buffer - that means buffer is too small,
- // return max too.
- if (pos === 0) { return max; }
-
- return (pos + _utf8len[buf[pos]] > max) ? pos : max;
-};
-
-},{"./common":3}],5:[function(require,module,exports){
-'use strict';
-
-// Note: adler32 takes 12% for level 0 and 2% for level 6.
-// It isn't worth it to make additional optimizations as in original.
-// Small size is preferable.
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-function adler32(adler, buf, len, pos) {
- var s1 = (adler & 0xffff) |0,
- s2 = ((adler >>> 16) & 0xffff) |0,
- n = 0;
-
- while (len !== 0) {
- // Set limit ~ twice less than 5552, to keep
- // s2 in 31-bits, because we force signed ints.
- // in other case %= will fail.
- n = len > 2000 ? 2000 : len;
- len -= n;
-
- do {
- s1 = (s1 + buf[pos++]) |0;
- s2 = (s2 + s1) |0;
- } while (--n);
-
- s1 %= 65521;
- s2 %= 65521;
- }
-
- return (s1 | (s2 << 16)) |0;
-}
-
-
-module.exports = adler32;
-
-},{}],6:[function(require,module,exports){
-'use strict';
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-module.exports = {
-
- /* Allowed flush values; see deflate() and inflate() below for details */
- Z_NO_FLUSH: 0,
- Z_PARTIAL_FLUSH: 1,
- Z_SYNC_FLUSH: 2,
- Z_FULL_FLUSH: 3,
- Z_FINISH: 4,
- Z_BLOCK: 5,
- Z_TREES: 6,
-
- /* Return codes for the compression/decompression functions. Negative values
- * are errors, positive values are used for special but normal events.
- */
- Z_OK: 0,
- Z_STREAM_END: 1,
- Z_NEED_DICT: 2,
- Z_ERRNO: -1,
- Z_STREAM_ERROR: -2,
- Z_DATA_ERROR: -3,
- //Z_MEM_ERROR: -4,
- Z_BUF_ERROR: -5,
- //Z_VERSION_ERROR: -6,
-
- /* compression levels */
- Z_NO_COMPRESSION: 0,
- Z_BEST_SPEED: 1,
- Z_BEST_COMPRESSION: 9,
- Z_DEFAULT_COMPRESSION: -1,
-
-
- Z_FILTERED: 1,
- Z_HUFFMAN_ONLY: 2,
- Z_RLE: 3,
- Z_FIXED: 4,
- Z_DEFAULT_STRATEGY: 0,
-
- /* Possible values of the data_type field (though see inflate()) */
- Z_BINARY: 0,
- Z_TEXT: 1,
- //Z_ASCII: 1, // = Z_TEXT (deprecated)
- Z_UNKNOWN: 2,
-
- /* The deflate compression method */
- Z_DEFLATED: 8
- //Z_NULL: null // Use -1 or null inline, depending on var type
-};
-
-},{}],7:[function(require,module,exports){
-'use strict';
-
-// Note: we can't get significant speed boost here.
-// So write code to minimize size - no pregenerated tables
-// and array tools dependencies.
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-// Use ordinary array, since untyped makes no boost here
-function makeTable() {
- var c, table = [];
-
- for (var n = 0; n < 256; n++) {
- c = n;
- for (var k = 0; k < 8; k++) {
- c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
- }
- table[n] = c;
- }
-
- return table;
-}
-
-// Create table on load. Just 255 signed longs. Not a problem.
-var crcTable = makeTable();
-
-
-function crc32(crc, buf, len, pos) {
- var t = crcTable,
- end = pos + len;
-
- crc ^= -1;
-
- for (var i = pos; i < end; i++) {
- crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
- }
-
- return (crc ^ (-1)); // >>> 0;
-}
-
-
-module.exports = crc32;
-
-},{}],8:[function(require,module,exports){
-'use strict';
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-var utils = require('../utils/common');
-var trees = require('./trees');
-var adler32 = require('./adler32');
-var crc32 = require('./crc32');
-var msg = require('./messages');
-
-/* Public constants ==========================================================*/
-/* ===========================================================================*/
-
-
-/* Allowed flush values; see deflate() and inflate() below for details */
-var Z_NO_FLUSH = 0;
-var Z_PARTIAL_FLUSH = 1;
-//var Z_SYNC_FLUSH = 2;
-var Z_FULL_FLUSH = 3;
-var Z_FINISH = 4;
-var Z_BLOCK = 5;
-//var Z_TREES = 6;
-
-
-/* Return codes for the compression/decompression functions. Negative values
- * are errors, positive values are used for special but normal events.
- */
-var Z_OK = 0;
-var Z_STREAM_END = 1;
-//var Z_NEED_DICT = 2;
-//var Z_ERRNO = -1;
-var Z_STREAM_ERROR = -2;
-var Z_DATA_ERROR = -3;
-//var Z_MEM_ERROR = -4;
-var Z_BUF_ERROR = -5;
-//var Z_VERSION_ERROR = -6;
-
-
-/* compression levels */
-//var Z_NO_COMPRESSION = 0;
-//var Z_BEST_SPEED = 1;
-//var Z_BEST_COMPRESSION = 9;
-var Z_DEFAULT_COMPRESSION = -1;
-
-
-var Z_FILTERED = 1;
-var Z_HUFFMAN_ONLY = 2;
-var Z_RLE = 3;
-var Z_FIXED = 4;
-var Z_DEFAULT_STRATEGY = 0;
-
-/* Possible values of the data_type field (though see inflate()) */
-//var Z_BINARY = 0;
-//var Z_TEXT = 1;
-//var Z_ASCII = 1; // = Z_TEXT
-var Z_UNKNOWN = 2;
-
-
-/* The deflate compression method */
-var Z_DEFLATED = 8;
-
-/*============================================================================*/
-
-
-var MAX_MEM_LEVEL = 9;
-/* Maximum value for memLevel in deflateInit2 */
-var MAX_WBITS = 15;
-/* 32K LZ77 window */
-var DEF_MEM_LEVEL = 8;
-
-
-var LENGTH_CODES = 29;
-/* number of length codes, not counting the special END_BLOCK code */
-var LITERALS = 256;
-/* number of literal bytes 0..255 */
-var L_CODES = LITERALS + 1 + LENGTH_CODES;
-/* number of Literal or Length codes, including the END_BLOCK code */
-var D_CODES = 30;
-/* number of distance codes */
-var BL_CODES = 19;
-/* number of codes used to transfer the bit lengths */
-var HEAP_SIZE = 2 * L_CODES + 1;
-/* maximum heap size */
-var MAX_BITS = 15;
-/* All codes must not exceed MAX_BITS bits */
-
-var MIN_MATCH = 3;
-var MAX_MATCH = 258;
-var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);
-
-var PRESET_DICT = 0x20;
-
-var INIT_STATE = 42;
-var EXTRA_STATE = 69;
-var NAME_STATE = 73;
-var COMMENT_STATE = 91;
-var HCRC_STATE = 103;
-var BUSY_STATE = 113;
-var FINISH_STATE = 666;
-
-var BS_NEED_MORE = 1; /* block not completed, need more input or more output */
-var BS_BLOCK_DONE = 2; /* block flush performed */
-var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */
-var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */
-
-var OS_CODE = 0x03; // Unix :) . Don't detect, use this default.
-
-function err(strm, errorCode) {
- strm.msg = msg[errorCode];
- return errorCode;
-}
-
-function rank(f) {
- return ((f) << 1) - ((f) > 4 ? 9 : 0);
-}
-
-function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }
-
-
-/* =========================================================================
- * Flush as much pending output as possible. All deflate() output goes
- * through this function so some applications may wish to modify it
- * to avoid allocating a large strm->output buffer and copying into it.
- * (See also read_buf()).
- */
-function flush_pending(strm) {
- var s = strm.state;
-
- //_tr_flush_bits(s);
- var len = s.pending;
- if (len > strm.avail_out) {
- len = strm.avail_out;
- }
- if (len === 0) { return; }
-
- utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);
- strm.next_out += len;
- s.pending_out += len;
- strm.total_out += len;
- strm.avail_out -= len;
- s.pending -= len;
- if (s.pending === 0) {
- s.pending_out = 0;
- }
-}
-
-
-function flush_block_only(s, last) {
- trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);
- s.block_start = s.strstart;
- flush_pending(s.strm);
-}
-
-
-function put_byte(s, b) {
- s.pending_buf[s.pending++] = b;
-}
-
-
-/* =========================================================================
- * Put a short in the pending buffer. The 16-bit value is put in MSB order.
- * IN assertion: the stream state is correct and there is enough room in
- * pending_buf.
- */
-function putShortMSB(s, b) {
-// put_byte(s, (Byte)(b >> 8));
-// put_byte(s, (Byte)(b & 0xff));
- s.pending_buf[s.pending++] = (b >>> 8) & 0xff;
- s.pending_buf[s.pending++] = b & 0xff;
-}
-
-
-/* ===========================================================================
- * Read a new buffer from the current input stream, update the adler32
- * and total number of bytes read. All deflate() input goes through
- * this function so some applications may wish to modify it to avoid
- * allocating a large strm->input buffer and copying from it.
- * (See also flush_pending()).
- */
-function read_buf(strm, buf, start, size) {
- var len = strm.avail_in;
-
- if (len > size) { len = size; }
- if (len === 0) { return 0; }
-
- strm.avail_in -= len;
-
- // zmemcpy(buf, strm->next_in, len);
- utils.arraySet(buf, strm.input, strm.next_in, len, start);
- if (strm.state.wrap === 1) {
- strm.adler = adler32(strm.adler, buf, len, start);
- }
-
- else if (strm.state.wrap === 2) {
- strm.adler = crc32(strm.adler, buf, len, start);
- }
-
- strm.next_in += len;
- strm.total_in += len;
-
- return len;
-}
-
-
-/* ===========================================================================
- * Set match_start to the longest match starting at the given string and
- * return its length. Matches shorter or equal to prev_length are discarded,
- * in which case the result is equal to prev_length and match_start is
- * garbage.
- * IN assertions: cur_match is the head of the hash chain for the current
- * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
- * OUT assertion: the match length is not greater than s->lookahead.
- */
-function longest_match(s, cur_match) {
- var chain_length = s.max_chain_length; /* max hash chain length */
- var scan = s.strstart; /* current string */
- var match; /* matched string */
- var len; /* length of current match */
- var best_len = s.prev_length; /* best match length so far */
- var nice_match = s.nice_match; /* stop if match long enough */
- var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?
- s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;
-
- var _win = s.window; // shortcut
-
- var wmask = s.w_mask;
- var prev = s.prev;
-
- /* Stop when cur_match becomes <= limit. To simplify the code,
- * we prevent matches with the string of window index 0.
- */
-
- var strend = s.strstart + MAX_MATCH;
- var scan_end1 = _win[scan + best_len - 1];
- var scan_end = _win[scan + best_len];
-
- /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
- * It is easy to get rid of this optimization if necessary.
- */
- // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
- /* Do not waste too much time if we already have a good match: */
- if (s.prev_length >= s.good_match) {
- chain_length >>= 2;
- }
- /* Do not look for matches beyond the end of the input. This is necessary
- * to make deflate deterministic.
- */
- if (nice_match > s.lookahead) { nice_match = s.lookahead; }
-
- // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
- do {
- // Assert(cur_match < s->strstart, "no future");
- match = cur_match;
-
- /* Skip to next match if the match length cannot increase
- * or if the match length is less than 2. Note that the checks below
- * for insufficient lookahead only occur occasionally for performance
- * reasons. Therefore uninitialized memory will be accessed, and
- * conditional jumps will be made that depend on those values.
- * However the length of the match is limited to the lookahead, so
- * the output of deflate is not affected by the uninitialized values.
- */
-
- if (_win[match + best_len] !== scan_end ||
- _win[match + best_len - 1] !== scan_end1 ||
- _win[match] !== _win[scan] ||
- _win[++match] !== _win[scan + 1]) {
- continue;
- }
-
- /* The check at best_len-1 can be removed because it will be made
- * again later. (This heuristic is not always a win.)
- * It is not necessary to compare scan[2] and match[2] since they
- * are always equal when the other bytes match, given that
- * the hash keys are equal and that HASH_BITS >= 8.
- */
- scan += 2;
- match++;
- // Assert(*scan == *match, "match[2]?");
-
- /* We check for insufficient lookahead only every 8th comparison;
- * the 256th check will be made at strstart+258.
- */
- do {
- /*jshint noempty:false*/
- } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
- _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
- _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
- _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
- scan < strend);
-
- // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
- len = MAX_MATCH - (strend - scan);
- scan = strend - MAX_MATCH;
-
- if (len > best_len) {
- s.match_start = cur_match;
- best_len = len;
- if (len >= nice_match) {
- break;
- }
- scan_end1 = _win[scan + best_len - 1];
- scan_end = _win[scan + best_len];
- }
- } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);
-
- if (best_len <= s.lookahead) {
- return best_len;
- }
- return s.lookahead;
-}
-
-
-/* ===========================================================================
- * Fill the window when the lookahead becomes insufficient.
- * Updates strstart and lookahead.
- *
- * IN assertion: lookahead < MIN_LOOKAHEAD
- * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
- * At least one byte has been read, or avail_in == 0; reads are
- * performed for at least two bytes (required for the zip translate_eol
- * option -- not supported here).
- */
-function fill_window(s) {
- var _w_size = s.w_size;
- var p, n, m, more, str;
-
- //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
-
- do {
- more = s.window_size - s.lookahead - s.strstart;
-
- // JS ints have 32 bit, block below not needed
- /* Deal with !@#$% 64K limit: */
- //if (sizeof(int) <= 2) {
- // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
- // more = wsize;
- //
- // } else if (more == (unsigned)(-1)) {
- // /* Very unlikely, but possible on 16 bit machine if
- // * strstart == 0 && lookahead == 1 (input done a byte at time)
- // */
- // more--;
- // }
- //}
-
-
- /* If the window is almost full and there is insufficient lookahead,
- * move the upper half to the lower one to make room in the upper half.
- */
- if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {
-
- utils.arraySet(s.window, s.window, _w_size, _w_size, 0);
- s.match_start -= _w_size;
- s.strstart -= _w_size;
- /* we now have strstart >= MAX_DIST */
- s.block_start -= _w_size;
-
- /* Slide the hash table (could be avoided with 32 bit values
- at the expense of memory usage). We slide even when level == 0
- to keep the hash table consistent if we switch back to level > 0
- later. (Using level 0 permanently is not an optimal usage of
- zlib, so we don't care about this pathological case.)
- */
-
- n = s.hash_size;
- p = n;
- do {
- m = s.head[--p];
- s.head[p] = (m >= _w_size ? m - _w_size : 0);
- } while (--n);
-
- n = _w_size;
- p = n;
- do {
- m = s.prev[--p];
- s.prev[p] = (m >= _w_size ? m - _w_size : 0);
- /* If n is not on any hash chain, prev[n] is garbage but
- * its value will never be used.
- */
- } while (--n);
-
- more += _w_size;
- }
- if (s.strm.avail_in === 0) {
- break;
- }
-
- /* If there was no sliding:
- * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
- * more == window_size - lookahead - strstart
- * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
- * => more >= window_size - 2*WSIZE + 2
- * In the BIG_MEM or MMAP case (not yet supported),
- * window_size == input_size + MIN_LOOKAHEAD &&
- * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
- * Otherwise, window_size == 2*WSIZE so more >= 2.
- * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
- */
- //Assert(more >= 2, "more < 2");
- n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);
- s.lookahead += n;
-
- /* Initialize the hash value now that we have some input: */
- if (s.lookahead + s.insert >= MIN_MATCH) {
- str = s.strstart - s.insert;
- s.ins_h = s.window[str];
-
- /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */
- s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;
-//#if MIN_MATCH != 3
-// Call update_hash() MIN_MATCH-3 more times
-//#endif
- while (s.insert) {
- /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
- s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;
-
- s.prev[str & s.w_mask] = s.head[s.ins_h];
- s.head[s.ins_h] = str;
- str++;
- s.insert--;
- if (s.lookahead + s.insert < MIN_MATCH) {
- break;
- }
- }
- }
- /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
- * but this is not important since only literal bytes will be emitted.
- */
-
- } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);
-
- /* If the WIN_INIT bytes after the end of the current data have never been
- * written, then zero those bytes in order to avoid memory check reports of
- * the use of uninitialized (or uninitialised as Julian writes) bytes by
- * the longest match routines. Update the high water mark for the next
- * time through here. WIN_INIT is set to MAX_MATCH since the longest match
- * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
- */
-// if (s.high_water < s.window_size) {
-// var curr = s.strstart + s.lookahead;
-// var init = 0;
-//
-// if (s.high_water < curr) {
-// /* Previous high water mark below current data -- zero WIN_INIT
-// * bytes or up to end of window, whichever is less.
-// */
-// init = s.window_size - curr;
-// if (init > WIN_INIT)
-// init = WIN_INIT;
-// zmemzero(s->window + curr, (unsigned)init);
-// s->high_water = curr + init;
-// }
-// else if (s->high_water < (ulg)curr + WIN_INIT) {
-// /* High water mark at or above current data, but below current data
-// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
-// * to end of window, whichever is less.
-// */
-// init = (ulg)curr + WIN_INIT - s->high_water;
-// if (init > s->window_size - s->high_water)
-// init = s->window_size - s->high_water;
-// zmemzero(s->window + s->high_water, (unsigned)init);
-// s->high_water += init;
-// }
-// }
-//
-// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
-// "not enough room for search");
-}
-
-/* ===========================================================================
- * Copy without compression as much as possible from the input stream, return
- * the current block state.
- * This function does not insert new strings in the dictionary since
- * uncompressible data is probably not useful. This function is used
- * only for the level=0 compression option.
- * NOTE: this function should be optimized to avoid extra copying from
- * window to pending_buf.
- */
-function deflate_stored(s, flush) {
- /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
- * to pending_buf_size, and each stored block has a 5 byte header:
- */
- var max_block_size = 0xffff;
-
- if (max_block_size > s.pending_buf_size - 5) {
- max_block_size = s.pending_buf_size - 5;
- }
-
- /* Copy as much as possible from input to output: */
- for (;;) {
- /* Fill the window as much as possible: */
- if (s.lookahead <= 1) {
-
- //Assert(s->strstart < s->w_size+MAX_DIST(s) ||
- // s->block_start >= (long)s->w_size, "slide too late");
-// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||
-// s.block_start >= s.w_size)) {
-// throw new Error("slide too late");
-// }
-
- fill_window(s);
- if (s.lookahead === 0 && flush === Z_NO_FLUSH) {
- return BS_NEED_MORE;
- }
-
- if (s.lookahead === 0) {
- break;
- }
- /* flush the current block */
- }
- //Assert(s->block_start >= 0L, "block gone");
-// if (s.block_start < 0) throw new Error("block gone");
-
- s.strstart += s.lookahead;
- s.lookahead = 0;
-
- /* Emit a stored block if pending_buf will be full: */
- var max_start = s.block_start + max_block_size;
-
- if (s.strstart === 0 || s.strstart >= max_start) {
- /* strstart == 0 is possible when wraparound on 16-bit machine */
- s.lookahead = s.strstart - max_start;
- s.strstart = max_start;
- /*** FLUSH_BLOCK(s, 0); ***/
- flush_block_only(s, false);
- if (s.strm.avail_out === 0) {
- return BS_NEED_MORE;
- }
- /***/
-
-
- }
- /* Flush if we may have to slide, otherwise block_start may become
- * negative and the data will be gone:
- */
- if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {
- /*** FLUSH_BLOCK(s, 0); ***/
- flush_block_only(s, false);
- if (s.strm.avail_out === 0) {
- return BS_NEED_MORE;
- }
- /***/
- }
- }
-
- s.insert = 0;
-
- if (flush === Z_FINISH) {
- /*** FLUSH_BLOCK(s, 1); ***/
- flush_block_only(s, true);
- if (s.strm.avail_out === 0) {
- return BS_FINISH_STARTED;
- }
- /***/
- return BS_FINISH_DONE;
- }
-
- if (s.strstart > s.block_start) {
- /*** FLUSH_BLOCK(s, 0); ***/
- flush_block_only(s, false);
- if (s.strm.avail_out === 0) {
- return BS_NEED_MORE;
- }
- /***/
- }
-
- return BS_NEED_MORE;
-}
-
-/* ===========================================================================
- * Compress as much as possible from the input stream, return the current
- * block state.
- * This function does not perform lazy evaluation of matches and inserts
- * new strings in the dictionary only for unmatched strings or for short
- * matches. It is used only for the fast compression options.
- */
-function deflate_fast(s, flush) {
- var hash_head; /* head of the hash chain */
- var bflush; /* set if current block must be flushed */
-
- for (;;) {
- /* Make sure that we always have enough lookahead, except
- * at the end of the input file. We need MAX_MATCH bytes
- * for the next match, plus MIN_MATCH bytes to insert the
- * string following the next match.
- */
- if (s.lookahead < MIN_LOOKAHEAD) {
- fill_window(s);
- if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
- return BS_NEED_MORE;
- }
- if (s.lookahead === 0) {
- break; /* flush the current block */
- }
- }
-
- /* Insert the string window[strstart .. strstart+2] in the
- * dictionary, and set hash_head to the head of the hash chain:
- */
- hash_head = 0/*NIL*/;
- if (s.lookahead >= MIN_MATCH) {
- /*** INSERT_STRING(s, s.strstart, hash_head); ***/
- s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
- hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
- s.head[s.ins_h] = s.strstart;
- /***/
- }
-
- /* Find the longest match, discarding those <= prev_length.
- * At this point we have always match_length < MIN_MATCH
- */
- if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {
- /* To simplify the code, we prevent matches with the string
- * of window index 0 (in particular we have to avoid a match
- * of the string with itself at the start of the input file).
- */
- s.match_length = longest_match(s, hash_head);
- /* longest_match() sets match_start */
- }
- if (s.match_length >= MIN_MATCH) {
- // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only
-
- /*** _tr_tally_dist(s, s.strstart - s.match_start,
- s.match_length - MIN_MATCH, bflush); ***/
- bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);
-
- s.lookahead -= s.match_length;
-
- /* Insert new strings in the hash table only if the match length
- * is not too large. This saves time but degrades compression.
- */
- if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {
- s.match_length--; /* string at strstart already in table */
- do {
- s.strstart++;
- /*** INSERT_STRING(s, s.strstart, hash_head); ***/
- s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
- hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
- s.head[s.ins_h] = s.strstart;
- /***/
- /* strstart never exceeds WSIZE-MAX_MATCH, so there are
- * always MIN_MATCH bytes ahead.
- */
- } while (--s.match_length !== 0);
- s.strstart++;
- } else
- {
- s.strstart += s.match_length;
- s.match_length = 0;
- s.ins_h = s.window[s.strstart];
- /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */
- s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;
-
-//#if MIN_MATCH != 3
-// Call UPDATE_HASH() MIN_MATCH-3 more times
-//#endif
- /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
- * matter since it will be recomputed at next deflate call.
- */
- }
- } else {
- /* No match, output a literal byte */
- //Tracevv((stderr,"%c", s.window[s.strstart]));
- /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
- bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
-
- s.lookahead--;
- s.strstart++;
- }
- if (bflush) {
- /*** FLUSH_BLOCK(s, 0); ***/
- flush_block_only(s, false);
- if (s.strm.avail_out === 0) {
- return BS_NEED_MORE;
- }
- /***/
- }
- }
- s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);
- if (flush === Z_FINISH) {
- /*** FLUSH_BLOCK(s, 1); ***/
- flush_block_only(s, true);
- if (s.strm.avail_out === 0) {
- return BS_FINISH_STARTED;
- }
- /***/
- return BS_FINISH_DONE;
- }
- if (s.last_lit) {
- /*** FLUSH_BLOCK(s, 0); ***/
- flush_block_only(s, false);
- if (s.strm.avail_out === 0) {
- return BS_NEED_MORE;
- }
- /***/
- }
- return BS_BLOCK_DONE;
-}
-
-/* ===========================================================================
- * Same as above, but achieves better compression. We use a lazy
- * evaluation for matches: a match is finally adopted only if there is
- * no better match at the next window position.
- */
-function deflate_slow(s, flush) {
- var hash_head; /* head of hash chain */
- var bflush; /* set if current block must be flushed */
-
- var max_insert;
-
- /* Process the input block. */
- for (;;) {
- /* Make sure that we always have enough lookahead, except
- * at the end of the input file. We need MAX_MATCH bytes
- * for the next match, plus MIN_MATCH bytes to insert the
- * string following the next match.
- */
- if (s.lookahead < MIN_LOOKAHEAD) {
- fill_window(s);
- if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
- return BS_NEED_MORE;
- }
- if (s.lookahead === 0) { break; } /* flush the current block */
- }
-
- /* Insert the string window[strstart .. strstart+2] in the
- * dictionary, and set hash_head to the head of the hash chain:
- */
- hash_head = 0/*NIL*/;
- if (s.lookahead >= MIN_MATCH) {
- /*** INSERT_STRING(s, s.strstart, hash_head); ***/
- s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
- hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
- s.head[s.ins_h] = s.strstart;
- /***/
- }
-
- /* Find the longest match, discarding those <= prev_length.
- */
- s.prev_length = s.match_length;
- s.prev_match = s.match_start;
- s.match_length = MIN_MATCH - 1;
-
- if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&
- s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {
- /* To simplify the code, we prevent matches with the string
- * of window index 0 (in particular we have to avoid a match
- * of the string with itself at the start of the input file).
- */
- s.match_length = longest_match(s, hash_head);
- /* longest_match() sets match_start */
-
- if (s.match_length <= 5 &&
- (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {
-
- /* If prev_match is also MIN_MATCH, match_start is garbage
- * but we will ignore the current match anyway.
- */
- s.match_length = MIN_MATCH - 1;
- }
- }
- /* If there was a match at the previous step and the current
- * match is not better, output the previous match:
- */
- if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {
- max_insert = s.strstart + s.lookahead - MIN_MATCH;
- /* Do not insert strings in hash table beyond this. */
-
- //check_match(s, s.strstart-1, s.prev_match, s.prev_length);
-
- /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
- s.prev_length - MIN_MATCH, bflush);***/
- bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);
- /* Insert in hash table all strings up to the end of the match.
- * strstart-1 and strstart are already inserted. If there is not
- * enough lookahead, the last two strings are not inserted in
- * the hash table.
- */
- s.lookahead -= s.prev_length - 1;
- s.prev_length -= 2;
- do {
- if (++s.strstart <= max_insert) {
- /*** INSERT_STRING(s, s.strstart, hash_head); ***/
- s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
- hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
- s.head[s.ins_h] = s.strstart;
- /***/
- }
- } while (--s.prev_length !== 0);
- s.match_available = 0;
- s.match_length = MIN_MATCH - 1;
- s.strstart++;
-
- if (bflush) {
- /*** FLUSH_BLOCK(s, 0); ***/
- flush_block_only(s, false);
- if (s.strm.avail_out === 0) {
- return BS_NEED_MORE;
- }
- /***/
- }
-
- } else if (s.match_available) {
- /* If there was no match at the previous position, output a
- * single literal. If there was a match but the current match
- * is longer, truncate the previous match to a single literal.
- */
- //Tracevv((stderr,"%c", s->window[s->strstart-1]));
- /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
- bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);
-
- if (bflush) {
- /*** FLUSH_BLOCK_ONLY(s, 0) ***/
- flush_block_only(s, false);
- /***/
- }
- s.strstart++;
- s.lookahead--;
- if (s.strm.avail_out === 0) {
- return BS_NEED_MORE;
- }
- } else {
- /* There is no previous match to compare with, wait for
- * the next step to decide.
- */
- s.match_available = 1;
- s.strstart++;
- s.lookahead--;
- }
- }
- //Assert (flush != Z_NO_FLUSH, "no flush?");
- if (s.match_available) {
- //Tracevv((stderr,"%c", s->window[s->strstart-1]));
- /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
- bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);
-
- s.match_available = 0;
- }
- s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;
- if (flush === Z_FINISH) {
- /*** FLUSH_BLOCK(s, 1); ***/
- flush_block_only(s, true);
- if (s.strm.avail_out === 0) {
- return BS_FINISH_STARTED;
- }
- /***/
- return BS_FINISH_DONE;
- }
- if (s.last_lit) {
- /*** FLUSH_BLOCK(s, 0); ***/
- flush_block_only(s, false);
- if (s.strm.avail_out === 0) {
- return BS_NEED_MORE;
- }
- /***/
- }
-
- return BS_BLOCK_DONE;
-}
-
-
-/* ===========================================================================
- * For Z_RLE, simply look for runs of bytes, generate matches only of distance
- * one. Do not maintain a hash table. (It will be regenerated if this run of
- * deflate switches away from Z_RLE.)
- */
-function deflate_rle(s, flush) {
- var bflush; /* set if current block must be flushed */
- var prev; /* byte at distance one to match */
- var scan, strend; /* scan goes up to strend for length of run */
-
- var _win = s.window;
-
- for (;;) {
- /* Make sure that we always have enough lookahead, except
- * at the end of the input file. We need MAX_MATCH bytes
- * for the longest run, plus one for the unrolled loop.
- */
- if (s.lookahead <= MAX_MATCH) {
- fill_window(s);
- if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {
- return BS_NEED_MORE;
- }
- if (s.lookahead === 0) { break; } /* flush the current block */
- }
-
- /* See how many times the previous byte repeats */
- s.match_length = 0;
- if (s.lookahead >= MIN_MATCH && s.strstart > 0) {
- scan = s.strstart - 1;
- prev = _win[scan];
- if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {
- strend = s.strstart + MAX_MATCH;
- do {
- /*jshint noempty:false*/
- } while (prev === _win[++scan] && prev === _win[++scan] &&
- prev === _win[++scan] && prev === _win[++scan] &&
- prev === _win[++scan] && prev === _win[++scan] &&
- prev === _win[++scan] && prev === _win[++scan] &&
- scan < strend);
- s.match_length = MAX_MATCH - (strend - scan);
- if (s.match_length > s.lookahead) {
- s.match_length = s.lookahead;
- }
- }
- //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
- }
-
- /* Emit match if have run of MIN_MATCH or longer, else emit literal */
- if (s.match_length >= MIN_MATCH) {
- //check_match(s, s.strstart, s.strstart - 1, s.match_length);
-
- /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/
- bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);
-
- s.lookahead -= s.match_length;
- s.strstart += s.match_length;
- s.match_length = 0;
- } else {
- /* No match, output a literal byte */
- //Tracevv((stderr,"%c", s->window[s->strstart]));
- /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
- bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
-
- s.lookahead--;
- s.strstart++;
- }
- if (bflush) {
- /*** FLUSH_BLOCK(s, 0); ***/
- flush_block_only(s, false);
- if (s.strm.avail_out === 0) {
- return BS_NEED_MORE;
- }
- /***/
- }
- }
- s.insert = 0;
- if (flush === Z_FINISH) {
- /*** FLUSH_BLOCK(s, 1); ***/
- flush_block_only(s, true);
- if (s.strm.avail_out === 0) {
- return BS_FINISH_STARTED;
- }
- /***/
- return BS_FINISH_DONE;
- }
- if (s.last_lit) {
- /*** FLUSH_BLOCK(s, 0); ***/
- flush_block_only(s, false);
- if (s.strm.avail_out === 0) {
- return BS_NEED_MORE;
- }
- /***/
- }
- return BS_BLOCK_DONE;
-}
-
-/* ===========================================================================
- * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.
- * (It will be regenerated if this run of deflate switches away from Huffman.)
- */
-function deflate_huff(s, flush) {
- var bflush; /* set if current block must be flushed */
-
- for (;;) {
- /* Make sure that we have a literal to write. */
- if (s.lookahead === 0) {
- fill_window(s);
- if (s.lookahead === 0) {
- if (flush === Z_NO_FLUSH) {
- return BS_NEED_MORE;
- }
- break; /* flush the current block */
- }
- }
-
- /* Output a literal byte */
- s.match_length = 0;
- //Tracevv((stderr,"%c", s->window[s->strstart]));
- /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
- bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
- s.lookahead--;
- s.strstart++;
- if (bflush) {
- /*** FLUSH_BLOCK(s, 0); ***/
- flush_block_only(s, false);
- if (s.strm.avail_out === 0) {
- return BS_NEED_MORE;
- }
- /***/
- }
- }
- s.insert = 0;
- if (flush === Z_FINISH) {
- /*** FLUSH_BLOCK(s, 1); ***/
- flush_block_only(s, true);
- if (s.strm.avail_out === 0) {
- return BS_FINISH_STARTED;
- }
- /***/
- return BS_FINISH_DONE;
- }
- if (s.last_lit) {
- /*** FLUSH_BLOCK(s, 0); ***/
- flush_block_only(s, false);
- if (s.strm.avail_out === 0) {
- return BS_NEED_MORE;
- }
- /***/
- }
- return BS_BLOCK_DONE;
-}
-
-/* Values for max_lazy_match, good_match and max_chain_length, depending on
- * the desired pack level (0..9). The values given below have been tuned to
- * exclude worst case performance for pathological files. Better values may be
- * found for specific files.
- */
-function Config(good_length, max_lazy, nice_length, max_chain, func) {
- this.good_length = good_length;
- this.max_lazy = max_lazy;
- this.nice_length = nice_length;
- this.max_chain = max_chain;
- this.func = func;
-}
-
-var configuration_table;
-
-configuration_table = [
- /* good lazy nice chain */
- new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */
- new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */
- new Config(4, 5, 16, 8, deflate_fast), /* 2 */
- new Config(4, 6, 32, 32, deflate_fast), /* 3 */
-
- new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */
- new Config(8, 16, 32, 32, deflate_slow), /* 5 */
- new Config(8, 16, 128, 128, deflate_slow), /* 6 */
- new Config(8, 32, 128, 256, deflate_slow), /* 7 */
- new Config(32, 128, 258, 1024, deflate_slow), /* 8 */
- new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */
-];
-
-
-/* ===========================================================================
- * Initialize the "longest match" routines for a new zlib stream
- */
-function lm_init(s) {
- s.window_size = 2 * s.w_size;
-
- /*** CLEAR_HASH(s); ***/
- zero(s.head); // Fill with NIL (= 0);
-
- /* Set the default configuration parameters:
- */
- s.max_lazy_match = configuration_table[s.level].max_lazy;
- s.good_match = configuration_table[s.level].good_length;
- s.nice_match = configuration_table[s.level].nice_length;
- s.max_chain_length = configuration_table[s.level].max_chain;
-
- s.strstart = 0;
- s.block_start = 0;
- s.lookahead = 0;
- s.insert = 0;
- s.match_length = s.prev_length = MIN_MATCH - 1;
- s.match_available = 0;
- s.ins_h = 0;
-}
-
-
-function DeflateState() {
- this.strm = null; /* pointer back to this zlib stream */
- this.status = 0; /* as the name implies */
- this.pending_buf = null; /* output still pending */
- this.pending_buf_size = 0; /* size of pending_buf */
- this.pending_out = 0; /* next pending byte to output to the stream */
- this.pending = 0; /* nb of bytes in the pending buffer */
- this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */
- this.gzhead = null; /* gzip header information to write */
- this.gzindex = 0; /* where in extra, name, or comment */
- this.method = Z_DEFLATED; /* can only be DEFLATED */
- this.last_flush = -1; /* value of flush param for previous deflate call */
-
- this.w_size = 0; /* LZ77 window size (32K by default) */
- this.w_bits = 0; /* log2(w_size) (8..16) */
- this.w_mask = 0; /* w_size - 1 */
-
- this.window = null;
- /* Sliding window. Input bytes are read into the second half of the window,
- * and move to the first half later to keep a dictionary of at least wSize
- * bytes. With this organization, matches are limited to a distance of
- * wSize-MAX_MATCH bytes, but this ensures that IO is always
- * performed with a length multiple of the block size.
- */
-
- this.window_size = 0;
- /* Actual size of window: 2*wSize, except when the user input buffer
- * is directly used as sliding window.
- */
-
- this.prev = null;
- /* Link to older string with same hash index. To limit the size of this
- * array to 64K, this link is maintained only for the last 32K strings.
- * An index in this array is thus a window index modulo 32K.
- */
-
- this.head = null; /* Heads of the hash chains or NIL. */
-
- this.ins_h = 0; /* hash index of string to be inserted */
- this.hash_size = 0; /* number of elements in hash table */
- this.hash_bits = 0; /* log2(hash_size) */
- this.hash_mask = 0; /* hash_size-1 */
-
- this.hash_shift = 0;
- /* Number of bits by which ins_h must be shifted at each input
- * step. It must be such that after MIN_MATCH steps, the oldest
- * byte no longer takes part in the hash key, that is:
- * hash_shift * MIN_MATCH >= hash_bits
- */
-
- this.block_start = 0;
- /* Window position at the beginning of the current output block. Gets
- * negative when the window is moved backwards.
- */
-
- this.match_length = 0; /* length of best match */
- this.prev_match = 0; /* previous match */
- this.match_available = 0; /* set if previous match exists */
- this.strstart = 0; /* start of string to insert */
- this.match_start = 0; /* start of matching string */
- this.lookahead = 0; /* number of valid bytes ahead in window */
-
- this.prev_length = 0;
- /* Length of the best match at previous step. Matches not greater than this
- * are discarded. This is used in the lazy match evaluation.
- */
-
- this.max_chain_length = 0;
- /* To speed up deflation, hash chains are never searched beyond this
- * length. A higher limit improves compression ratio but degrades the
- * speed.
- */
-
- this.max_lazy_match = 0;
- /* Attempt to find a better match only when the current match is strictly
- * smaller than this value. This mechanism is used only for compression
- * levels >= 4.
- */
- // That's alias to max_lazy_match, don't use directly
- //this.max_insert_length = 0;
- /* Insert new strings in the hash table only if the match length is not
- * greater than this length. This saves time but degrades compression.
- * max_insert_length is used only for compression levels <= 3.
- */
-
- this.level = 0; /* compression level (1..9) */
- this.strategy = 0; /* favor or force Huffman coding*/
-
- this.good_match = 0;
- /* Use a faster search when the previous match is longer than this */
-
- this.nice_match = 0; /* Stop searching when current match exceeds this */
-
- /* used by trees.c: */
-
- /* Didn't use ct_data typedef below to suppress compiler warning */
-
- // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
- // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
- // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
-
- // Use flat array of DOUBLE size, with interleaved fata,
- // because JS does not support effective
- this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);
- this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);
- this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);
- zero(this.dyn_ltree);
- zero(this.dyn_dtree);
- zero(this.bl_tree);
-
- this.l_desc = null; /* desc. for literal tree */
- this.d_desc = null; /* desc. for distance tree */
- this.bl_desc = null; /* desc. for bit length tree */
-
- //ush bl_count[MAX_BITS+1];
- this.bl_count = new utils.Buf16(MAX_BITS + 1);
- /* number of codes at each bit length for an optimal tree */
-
- //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */
- this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */
- zero(this.heap);
-
- this.heap_len = 0; /* number of elements in the heap */
- this.heap_max = 0; /* element of largest frequency */
- /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
- * The same heap array is used to build all trees.
- */
-
- this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];
- zero(this.depth);
- /* Depth of each subtree used as tie breaker for trees of equal frequency
- */
-
- this.l_buf = 0; /* buffer index for literals or lengths */
-
- this.lit_bufsize = 0;
- /* Size of match buffer for literals/lengths. There are 4 reasons for
- * limiting lit_bufsize to 64K:
- * - frequencies can be kept in 16 bit counters
- * - if compression is not successful for the first block, all input
- * data is still in the window so we can still emit a stored block even
- * when input comes from standard input. (This can also be done for
- * all blocks if lit_bufsize is not greater than 32K.)
- * - if compression is not successful for a file smaller than 64K, we can
- * even emit a stored file instead of a stored block (saving 5 bytes).
- * This is applicable only for zip (not gzip or zlib).
- * - creating new Huffman trees less frequently may not provide fast
- * adaptation to changes in the input data statistics. (Take for
- * example a binary file with poorly compressible code followed by
- * a highly compressible string table.) Smaller buffer sizes give
- * fast adaptation but have of course the overhead of transmitting
- * trees more frequently.
- * - I can't count above 4
- */
-
- this.last_lit = 0; /* running index in l_buf */
-
- this.d_buf = 0;
- /* Buffer index for distances. To simplify the code, d_buf and l_buf have
- * the same number of elements. To use different lengths, an extra flag
- * array would be necessary.
- */
-
- this.opt_len = 0; /* bit length of current block with optimal trees */
- this.static_len = 0; /* bit length of current block with static trees */
- this.matches = 0; /* number of string matches in current block */
- this.insert = 0; /* bytes at end of window left to insert */
-
-
- this.bi_buf = 0;
- /* Output buffer. bits are inserted starting at the bottom (least
- * significant bits).
- */
- this.bi_valid = 0;
- /* Number of valid bits in bi_buf. All bits above the last valid bit
- * are always zero.
- */
-
- // Used for window memory init. We safely ignore it for JS. That makes
- // sense only for pointers and memory check tools.
- //this.high_water = 0;
- /* High water mark offset in window for initialized bytes -- bytes above
- * this are set to zero in order to avoid memory check warnings when
- * longest match routines access bytes past the input. This is then
- * updated to the new high water mark.
- */
-}
-
-
-function deflateResetKeep(strm) {
- var s;
-
- if (!strm || !strm.state) {
- return err(strm, Z_STREAM_ERROR);
- }
-
- strm.total_in = strm.total_out = 0;
- strm.data_type = Z_UNKNOWN;
-
- s = strm.state;
- s.pending = 0;
- s.pending_out = 0;
-
- if (s.wrap < 0) {
- s.wrap = -s.wrap;
- /* was made negative by deflate(..., Z_FINISH); */
- }
- s.status = (s.wrap ? INIT_STATE : BUSY_STATE);
- strm.adler = (s.wrap === 2) ?
- 0 // crc32(0, Z_NULL, 0)
- :
- 1; // adler32(0, Z_NULL, 0)
- s.last_flush = Z_NO_FLUSH;
- trees._tr_init(s);
- return Z_OK;
-}
-
-
-function deflateReset(strm) {
- var ret = deflateResetKeep(strm);
- if (ret === Z_OK) {
- lm_init(strm.state);
- }
- return ret;
-}
-
-
-function deflateSetHeader(strm, head) {
- if (!strm || !strm.state) { return Z_STREAM_ERROR; }
- if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }
- strm.state.gzhead = head;
- return Z_OK;
-}
-
-
-function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {
- if (!strm) { // === Z_NULL
- return Z_STREAM_ERROR;
- }
- var wrap = 1;
-
- if (level === Z_DEFAULT_COMPRESSION) {
- level = 6;
- }
-
- if (windowBits < 0) { /* suppress zlib wrapper */
- wrap = 0;
- windowBits = -windowBits;
- }
-
- else if (windowBits > 15) {
- wrap = 2; /* write gzip wrapper instead */
- windowBits -= 16;
- }
-
-
- if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||
- windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
- strategy < 0 || strategy > Z_FIXED) {
- return err(strm, Z_STREAM_ERROR);
- }
-
-
- if (windowBits === 8) {
- windowBits = 9;
- }
- /* until 256-byte window bug fixed */
-
- var s = new DeflateState();
-
- strm.state = s;
- s.strm = strm;
-
- s.wrap = wrap;
- s.gzhead = null;
- s.w_bits = windowBits;
- s.w_size = 1 << s.w_bits;
- s.w_mask = s.w_size - 1;
-
- s.hash_bits = memLevel + 7;
- s.hash_size = 1 << s.hash_bits;
- s.hash_mask = s.hash_size - 1;
- s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);
-
- s.window = new utils.Buf8(s.w_size * 2);
- s.head = new utils.Buf16(s.hash_size);
- s.prev = new utils.Buf16(s.w_size);
-
- // Don't need mem init magic for JS.
- //s.high_water = 0; /* nothing written to s->window yet */
-
- s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
-
- s.pending_buf_size = s.lit_bufsize * 4;
-
- //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
- //s->pending_buf = (uchf *) overlay;
- s.pending_buf = new utils.Buf8(s.pending_buf_size);
-
- // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)
- //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
- s.d_buf = 1 * s.lit_bufsize;
-
- //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
- s.l_buf = (1 + 2) * s.lit_bufsize;
-
- s.level = level;
- s.strategy = strategy;
- s.method = method;
-
- return deflateReset(strm);
-}
-
-function deflateInit(strm, level) {
- return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);
-}
-
-
-function deflate(strm, flush) {
- var old_flush, s;
- var beg, val; // for gzip header write only
-
- if (!strm || !strm.state ||
- flush > Z_BLOCK || flush < 0) {
- return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;
- }
-
- s = strm.state;
-
- if (!strm.output ||
- (!strm.input && strm.avail_in !== 0) ||
- (s.status === FINISH_STATE && flush !== Z_FINISH)) {
- return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);
- }
-
- s.strm = strm; /* just in case */
- old_flush = s.last_flush;
- s.last_flush = flush;
-
- /* Write the header */
- if (s.status === INIT_STATE) {
-
- if (s.wrap === 2) { // GZIP header
- strm.adler = 0; //crc32(0L, Z_NULL, 0);
- put_byte(s, 31);
- put_byte(s, 139);
- put_byte(s, 8);
- if (!s.gzhead) { // s->gzhead == Z_NULL
- put_byte(s, 0);
- put_byte(s, 0);
- put_byte(s, 0);
- put_byte(s, 0);
- put_byte(s, 0);
- put_byte(s, s.level === 9 ? 2 :
- (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
- 4 : 0));
- put_byte(s, OS_CODE);
- s.status = BUSY_STATE;
- }
- else {
- put_byte(s, (s.gzhead.text ? 1 : 0) +
- (s.gzhead.hcrc ? 2 : 0) +
- (!s.gzhead.extra ? 0 : 4) +
- (!s.gzhead.name ? 0 : 8) +
- (!s.gzhead.comment ? 0 : 16)
- );
- put_byte(s, s.gzhead.time & 0xff);
- put_byte(s, (s.gzhead.time >> 8) & 0xff);
- put_byte(s, (s.gzhead.time >> 16) & 0xff);
- put_byte(s, (s.gzhead.time >> 24) & 0xff);
- put_byte(s, s.level === 9 ? 2 :
- (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
- 4 : 0));
- put_byte(s, s.gzhead.os & 0xff);
- if (s.gzhead.extra && s.gzhead.extra.length) {
- put_byte(s, s.gzhead.extra.length & 0xff);
- put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);
- }
- if (s.gzhead.hcrc) {
- strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);
- }
- s.gzindex = 0;
- s.status = EXTRA_STATE;
- }
- }
- else // DEFLATE header
- {
- var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;
- var level_flags = -1;
-
- if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {
- level_flags = 0;
- } else if (s.level < 6) {
- level_flags = 1;
- } else if (s.level === 6) {
- level_flags = 2;
- } else {
- level_flags = 3;
- }
- header |= (level_flags << 6);
- if (s.strstart !== 0) { header |= PRESET_DICT; }
- header += 31 - (header % 31);
-
- s.status = BUSY_STATE;
- putShortMSB(s, header);
-
- /* Save the adler32 of the preset dictionary: */
- if (s.strstart !== 0) {
- putShortMSB(s, strm.adler >>> 16);
- putShortMSB(s, strm.adler & 0xffff);
- }
- strm.adler = 1; // adler32(0L, Z_NULL, 0);
- }
- }
-
-//#ifdef GZIP
- if (s.status === EXTRA_STATE) {
- if (s.gzhead.extra/* != Z_NULL*/) {
- beg = s.pending; /* start of bytes to update crc */
-
- while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {
- if (s.pending === s.pending_buf_size) {
- if (s.gzhead.hcrc && s.pending > beg) {
- strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
- }
- flush_pending(strm);
- beg = s.pending;
- if (s.pending === s.pending_buf_size) {
- break;
- }
- }
- put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);
- s.gzindex++;
- }
- if (s.gzhead.hcrc && s.pending > beg) {
- strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
- }
- if (s.gzindex === s.gzhead.extra.length) {
- s.gzindex = 0;
- s.status = NAME_STATE;
- }
- }
- else {
- s.status = NAME_STATE;
- }
- }
- if (s.status === NAME_STATE) {
- if (s.gzhead.name/* != Z_NULL*/) {
- beg = s.pending; /* start of bytes to update crc */
- //int val;
-
- do {
- if (s.pending === s.pending_buf_size) {
- if (s.gzhead.hcrc && s.pending > beg) {
- strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
- }
- flush_pending(strm);
- beg = s.pending;
- if (s.pending === s.pending_buf_size) {
- val = 1;
- break;
- }
- }
- // JS specific: little magic to add zero terminator to end of string
- if (s.gzindex < s.gzhead.name.length) {
- val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;
- } else {
- val = 0;
- }
- put_byte(s, val);
- } while (val !== 0);
-
- if (s.gzhead.hcrc && s.pending > beg) {
- strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
- }
- if (val === 0) {
- s.gzindex = 0;
- s.status = COMMENT_STATE;
- }
- }
- else {
- s.status = COMMENT_STATE;
- }
- }
- if (s.status === COMMENT_STATE) {
- if (s.gzhead.comment/* != Z_NULL*/) {
- beg = s.pending; /* start of bytes to update crc */
- //int val;
-
- do {
- if (s.pending === s.pending_buf_size) {
- if (s.gzhead.hcrc && s.pending > beg) {
- strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
- }
- flush_pending(strm);
- beg = s.pending;
- if (s.pending === s.pending_buf_size) {
- val = 1;
- break;
- }
- }
- // JS specific: little magic to add zero terminator to end of string
- if (s.gzindex < s.gzhead.comment.length) {
- val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;
- } else {
- val = 0;
- }
- put_byte(s, val);
- } while (val !== 0);
-
- if (s.gzhead.hcrc && s.pending > beg) {
- strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
- }
- if (val === 0) {
- s.status = HCRC_STATE;
- }
- }
- else {
- s.status = HCRC_STATE;
- }
- }
- if (s.status === HCRC_STATE) {
- if (s.gzhead.hcrc) {
- if (s.pending + 2 > s.pending_buf_size) {
- flush_pending(strm);
- }
- if (s.pending + 2 <= s.pending_buf_size) {
- put_byte(s, strm.adler & 0xff);
- put_byte(s, (strm.adler >> 8) & 0xff);
- strm.adler = 0; //crc32(0L, Z_NULL, 0);
- s.status = BUSY_STATE;
- }
- }
- else {
- s.status = BUSY_STATE;
- }
- }
-//#endif
-
- /* Flush as much pending output as possible */
- if (s.pending !== 0) {
- flush_pending(strm);
- if (strm.avail_out === 0) {
- /* Since avail_out is 0, deflate will be called again with
- * more output space, but possibly with both pending and
- * avail_in equal to zero. There won't be anything to do,
- * but this is not an error situation so make sure we
- * return OK instead of BUF_ERROR at next call of deflate:
- */
- s.last_flush = -1;
- return Z_OK;
- }
-
- /* Make sure there is something to do and avoid duplicate consecutive
- * flushes. For repeated and useless calls with Z_FINISH, we keep
- * returning Z_STREAM_END instead of Z_BUF_ERROR.
- */
- } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&
- flush !== Z_FINISH) {
- return err(strm, Z_BUF_ERROR);
- }
-
- /* User must not provide more input after the first FINISH: */
- if (s.status === FINISH_STATE && strm.avail_in !== 0) {
- return err(strm, Z_BUF_ERROR);
- }
-
- /* Start a new block or continue the current one.
- */
- if (strm.avail_in !== 0 || s.lookahead !== 0 ||
- (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {
- var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :
- (s.strategy === Z_RLE ? deflate_rle(s, flush) :
- configuration_table[s.level].func(s, flush));
-
- if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {
- s.status = FINISH_STATE;
- }
- if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {
- if (strm.avail_out === 0) {
- s.last_flush = -1;
- /* avoid BUF_ERROR next call, see above */
- }
- return Z_OK;
- /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
- * of deflate should use the same flush parameter to make sure
- * that the flush is complete. So we don't have to output an
- * empty block here, this will be done at next call. This also
- * ensures that for a very small output buffer, we emit at most
- * one empty block.
- */
- }
- if (bstate === BS_BLOCK_DONE) {
- if (flush === Z_PARTIAL_FLUSH) {
- trees._tr_align(s);
- }
- else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */
-
- trees._tr_stored_block(s, 0, 0, false);
- /* For a full flush, this empty block will be recognized
- * as a special marker by inflate_sync().
- */
- if (flush === Z_FULL_FLUSH) {
- /*** CLEAR_HASH(s); ***/ /* forget history */
- zero(s.head); // Fill with NIL (= 0);
-
- if (s.lookahead === 0) {
- s.strstart = 0;
- s.block_start = 0;
- s.insert = 0;
- }
- }
- }
- flush_pending(strm);
- if (strm.avail_out === 0) {
- s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */
- return Z_OK;
- }
- }
- }
- //Assert(strm->avail_out > 0, "bug2");
- //if (strm.avail_out <= 0) { throw new Error("bug2");}
-
- if (flush !== Z_FINISH) { return Z_OK; }
- if (s.wrap <= 0) { return Z_STREAM_END; }
-
- /* Write the trailer */
- if (s.wrap === 2) {
- put_byte(s, strm.adler & 0xff);
- put_byte(s, (strm.adler >> 8) & 0xff);
- put_byte(s, (strm.adler >> 16) & 0xff);
- put_byte(s, (strm.adler >> 24) & 0xff);
- put_byte(s, strm.total_in & 0xff);
- put_byte(s, (strm.total_in >> 8) & 0xff);
- put_byte(s, (strm.total_in >> 16) & 0xff);
- put_byte(s, (strm.total_in >> 24) & 0xff);
- }
- else
- {
- putShortMSB(s, strm.adler >>> 16);
- putShortMSB(s, strm.adler & 0xffff);
- }
-
- flush_pending(strm);
- /* If avail_out is zero, the application will call deflate again
- * to flush the rest.
- */
- if (s.wrap > 0) { s.wrap = -s.wrap; }
- /* write the trailer only once! */
- return s.pending !== 0 ? Z_OK : Z_STREAM_END;
-}
-
-function deflateEnd(strm) {
- var status;
-
- if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
- return Z_STREAM_ERROR;
- }
-
- status = strm.state.status;
- if (status !== INIT_STATE &&
- status !== EXTRA_STATE &&
- status !== NAME_STATE &&
- status !== COMMENT_STATE &&
- status !== HCRC_STATE &&
- status !== BUSY_STATE &&
- status !== FINISH_STATE
- ) {
- return err(strm, Z_STREAM_ERROR);
- }
-
- strm.state = null;
-
- return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;
-}
-
-
-/* =========================================================================
- * Initializes the compression dictionary from the given byte
- * sequence without producing any compressed output.
- */
-function deflateSetDictionary(strm, dictionary) {
- var dictLength = dictionary.length;
-
- var s;
- var str, n;
- var wrap;
- var avail;
- var next;
- var input;
- var tmpDict;
-
- if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
- return Z_STREAM_ERROR;
- }
-
- s = strm.state;
- wrap = s.wrap;
-
- if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {
- return Z_STREAM_ERROR;
- }
-
- /* when using zlib wrappers, compute Adler-32 for provided dictionary */
- if (wrap === 1) {
- /* adler32(strm->adler, dictionary, dictLength); */
- strm.adler = adler32(strm.adler, dictionary, dictLength, 0);
- }
-
- s.wrap = 0; /* avoid computing Adler-32 in read_buf */
-
- /* if dictionary would fill window, just replace the history */
- if (dictLength >= s.w_size) {
- if (wrap === 0) { /* already empty otherwise */
- /*** CLEAR_HASH(s); ***/
- zero(s.head); // Fill with NIL (= 0);
- s.strstart = 0;
- s.block_start = 0;
- s.insert = 0;
- }
- /* use the tail */
- // dictionary = dictionary.slice(dictLength - s.w_size);
- tmpDict = new utils.Buf8(s.w_size);
- utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);
- dictionary = tmpDict;
- dictLength = s.w_size;
- }
- /* insert dictionary into window and hash */
- avail = strm.avail_in;
- next = strm.next_in;
- input = strm.input;
- strm.avail_in = dictLength;
- strm.next_in = 0;
- strm.input = dictionary;
- fill_window(s);
- while (s.lookahead >= MIN_MATCH) {
- str = s.strstart;
- n = s.lookahead - (MIN_MATCH - 1);
- do {
- /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
- s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;
-
- s.prev[str & s.w_mask] = s.head[s.ins_h];
-
- s.head[s.ins_h] = str;
- str++;
- } while (--n);
- s.strstart = str;
- s.lookahead = MIN_MATCH - 1;
- fill_window(s);
- }
- s.strstart += s.lookahead;
- s.block_start = s.strstart;
- s.insert = s.lookahead;
- s.lookahead = 0;
- s.match_length = s.prev_length = MIN_MATCH - 1;
- s.match_available = 0;
- strm.next_in = next;
- strm.input = input;
- strm.avail_in = avail;
- s.wrap = wrap;
- return Z_OK;
-}
-
-
-exports.deflateInit = deflateInit;
-exports.deflateInit2 = deflateInit2;
-exports.deflateReset = deflateReset;
-exports.deflateResetKeep = deflateResetKeep;
-exports.deflateSetHeader = deflateSetHeader;
-exports.deflate = deflate;
-exports.deflateEnd = deflateEnd;
-exports.deflateSetDictionary = deflateSetDictionary;
-exports.deflateInfo = 'pako deflate (from Nodeca project)';
-
-/* Not implemented
-exports.deflateBound = deflateBound;
-exports.deflateCopy = deflateCopy;
-exports.deflateParams = deflateParams;
-exports.deflatePending = deflatePending;
-exports.deflatePrime = deflatePrime;
-exports.deflateTune = deflateTune;
-*/
-
-},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(require,module,exports){
-'use strict';
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-function GZheader() {
- /* true if compressed data believed to be text */
- this.text = 0;
- /* modification time */
- this.time = 0;
- /* extra flags (not used when writing a gzip file) */
- this.xflags = 0;
- /* operating system */
- this.os = 0;
- /* pointer to extra field or Z_NULL if none */
- this.extra = null;
- /* extra field length (valid if extra != Z_NULL) */
- this.extra_len = 0; // Actually, we don't need it in JS,
- // but leave for few code modifications
-
- //
- // Setup limits is not necessary because in js we should not preallocate memory
- // for inflate use constant limit in 65536 bytes
- //
-
- /* space at extra (only when reading header) */
- // this.extra_max = 0;
- /* pointer to zero-terminated file name or Z_NULL */
- this.name = '';
- /* space at name (only when reading header) */
- // this.name_max = 0;
- /* pointer to zero-terminated comment or Z_NULL */
- this.comment = '';
- /* space at comment (only when reading header) */
- // this.comm_max = 0;
- /* true if there was or will be a header crc */
- this.hcrc = 0;
- /* true when done reading gzip header (not used when writing a gzip file) */
- this.done = false;
-}
-
-module.exports = GZheader;
-
-},{}],10:[function(require,module,exports){
-'use strict';
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-// See state defs from inflate.js
-var BAD = 30; /* got a data error -- remain here until reset */
-var TYPE = 12; /* i: waiting for type bits, including last-flag bit */
-
-/*
- Decode literal, length, and distance codes and write out the resulting
- literal and match bytes until either not enough input or output is
- available, an end-of-block is encountered, or a data error is encountered.
- When large enough input and output buffers are supplied to inflate(), for
- example, a 16K input buffer and a 64K output buffer, more than 95% of the
- inflate execution time is spent in this routine.
-
- Entry assumptions:
-
- state.mode === LEN
- strm.avail_in >= 6
- strm.avail_out >= 258
- start >= strm.avail_out
- state.bits < 8
-
- On return, state.mode is one of:
-
- LEN -- ran out of enough output space or enough available input
- TYPE -- reached end of block code, inflate() to interpret next block
- BAD -- error in block data
-
- Notes:
-
- - The maximum input bits used by a length/distance pair is 15 bits for the
- length code, 5 bits for the length extra, 15 bits for the distance code,
- and 13 bits for the distance extra. This totals 48 bits, or six bytes.
- Therefore if strm.avail_in >= 6, then there is enough input to avoid
- checking for available input while decoding.
-
- - The maximum bytes that a single length/distance pair can output is 258
- bytes, which is the maximum length that can be coded. inflate_fast()
- requires strm.avail_out >= 258 for each loop to avoid checking for
- output space.
- */
-module.exports = function inflate_fast(strm, start) {
- var state;
- var _in; /* local strm.input */
- var last; /* have enough input while in < last */
- var _out; /* local strm.output */
- var beg; /* inflate()'s initial strm.output */
- var end; /* while out < end, enough space available */
-//#ifdef INFLATE_STRICT
- var dmax; /* maximum distance from zlib header */
-//#endif
- var wsize; /* window size or zero if not using window */
- var whave; /* valid bytes in the window */
- var wnext; /* window write index */
- // Use `s_window` instead `window`, avoid conflict with instrumentation tools
- var s_window; /* allocated sliding window, if wsize != 0 */
- var hold; /* local strm.hold */
- var bits; /* local strm.bits */
- var lcode; /* local strm.lencode */
- var dcode; /* local strm.distcode */
- var lmask; /* mask for first level of length codes */
- var dmask; /* mask for first level of distance codes */
- var here; /* retrieved table entry */
- var op; /* code bits, operation, extra bits, or */
- /* window position, window bytes to copy */
- var len; /* match length, unused bytes */
- var dist; /* match distance */
- var from; /* where to copy match from */
- var from_source;
-
-
- var input, output; // JS specific, because we have no pointers
-
- /* copy state to local variables */
- state = strm.state;
- //here = state.here;
- _in = strm.next_in;
- input = strm.input;
- last = _in + (strm.avail_in - 5);
- _out = strm.next_out;
- output = strm.output;
- beg = _out - (start - strm.avail_out);
- end = _out + (strm.avail_out - 257);
-//#ifdef INFLATE_STRICT
- dmax = state.dmax;
-//#endif
- wsize = state.wsize;
- whave = state.whave;
- wnext = state.wnext;
- s_window = state.window;
- hold = state.hold;
- bits = state.bits;
- lcode = state.lencode;
- dcode = state.distcode;
- lmask = (1 << state.lenbits) - 1;
- dmask = (1 << state.distbits) - 1;
-
-
- /* decode literals and length/distances until end-of-block or not enough
- input data or output space */
-
- top:
- do {
- if (bits < 15) {
- hold += input[_in++] << bits;
- bits += 8;
- hold += input[_in++] << bits;
- bits += 8;
- }
-
- here = lcode[hold & lmask];
-
- dolen:
- for (;;) { // Goto emulation
- op = here >>> 24/*here.bits*/;
- hold >>>= op;
- bits -= op;
- op = (here >>> 16) & 0xff/*here.op*/;
- if (op === 0) { /* literal */
- //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
- // "inflate: literal '%c'\n" :
- // "inflate: literal 0x%02x\n", here.val));
- output[_out++] = here & 0xffff/*here.val*/;
- }
- else if (op & 16) { /* length base */
- len = here & 0xffff/*here.val*/;
- op &= 15; /* number of extra bits */
- if (op) {
- if (bits < op) {
- hold += input[_in++] << bits;
- bits += 8;
- }
- len += hold & ((1 << op) - 1);
- hold >>>= op;
- bits -= op;
- }
- //Tracevv((stderr, "inflate: length %u\n", len));
- if (bits < 15) {
- hold += input[_in++] << bits;
- bits += 8;
- hold += input[_in++] << bits;
- bits += 8;
- }
- here = dcode[hold & dmask];
-
- dodist:
- for (;;) { // goto emulation
- op = here >>> 24/*here.bits*/;
- hold >>>= op;
- bits -= op;
- op = (here >>> 16) & 0xff/*here.op*/;
-
- if (op & 16) { /* distance base */
- dist = here & 0xffff/*here.val*/;
- op &= 15; /* number of extra bits */
- if (bits < op) {
- hold += input[_in++] << bits;
- bits += 8;
- if (bits < op) {
- hold += input[_in++] << bits;
- bits += 8;
- }
- }
- dist += hold & ((1 << op) - 1);
-//#ifdef INFLATE_STRICT
- if (dist > dmax) {
- strm.msg = 'invalid distance too far back';
- state.mode = BAD;
- break top;
- }
-//#endif
- hold >>>= op;
- bits -= op;
- //Tracevv((stderr, "inflate: distance %u\n", dist));
- op = _out - beg; /* max distance in output */
- if (dist > op) { /* see if copy from window */
- op = dist - op; /* distance back in window */
- if (op > whave) {
- if (state.sane) {
- strm.msg = 'invalid distance too far back';
- state.mode = BAD;
- break top;
- }
-
-// (!) This block is disabled in zlib defaults,
-// don't enable it for binary compatibility
-//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
-// if (len <= op - whave) {
-// do {
-// output[_out++] = 0;
-// } while (--len);
-// continue top;
-// }
-// len -= op - whave;
-// do {
-// output[_out++] = 0;
-// } while (--op > whave);
-// if (op === 0) {
-// from = _out - dist;
-// do {
-// output[_out++] = output[from++];
-// } while (--len);
-// continue top;
-// }
-//#endif
- }
- from = 0; // window index
- from_source = s_window;
- if (wnext === 0) { /* very common case */
- from += wsize - op;
- if (op < len) { /* some from window */
- len -= op;
- do {
- output[_out++] = s_window[from++];
- } while (--op);
- from = _out - dist; /* rest from output */
- from_source = output;
- }
- }
- else if (wnext < op) { /* wrap around window */
- from += wsize + wnext - op;
- op -= wnext;
- if (op < len) { /* some from end of window */
- len -= op;
- do {
- output[_out++] = s_window[from++];
- } while (--op);
- from = 0;
- if (wnext < len) { /* some from start of window */
- op = wnext;
- len -= op;
- do {
- output[_out++] = s_window[from++];
- } while (--op);
- from = _out - dist; /* rest from output */
- from_source = output;
- }
- }
- }
- else { /* contiguous in window */
- from += wnext - op;
- if (op < len) { /* some from window */
- len -= op;
- do {
- output[_out++] = s_window[from++];
- } while (--op);
- from = _out - dist; /* rest from output */
- from_source = output;
- }
- }
- while (len > 2) {
- output[_out++] = from_source[from++];
- output[_out++] = from_source[from++];
- output[_out++] = from_source[from++];
- len -= 3;
- }
- if (len) {
- output[_out++] = from_source[from++];
- if (len > 1) {
- output[_out++] = from_source[from++];
- }
- }
- }
- else {
- from = _out - dist; /* copy direct from output */
- do { /* minimum length is three */
- output[_out++] = output[from++];
- output[_out++] = output[from++];
- output[_out++] = output[from++];
- len -= 3;
- } while (len > 2);
- if (len) {
- output[_out++] = output[from++];
- if (len > 1) {
- output[_out++] = output[from++];
- }
- }
- }
- }
- else if ((op & 64) === 0) { /* 2nd level distance code */
- here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
- continue dodist;
- }
- else {
- strm.msg = 'invalid distance code';
- state.mode = BAD;
- break top;
- }
-
- break; // need to emulate goto via "continue"
- }
- }
- else if ((op & 64) === 0) { /* 2nd level length code */
- here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
- continue dolen;
- }
- else if (op & 32) { /* end-of-block */
- //Tracevv((stderr, "inflate: end of block\n"));
- state.mode = TYPE;
- break top;
- }
- else {
- strm.msg = 'invalid literal/length code';
- state.mode = BAD;
- break top;
- }
-
- break; // need to emulate goto via "continue"
- }
- } while (_in < last && _out < end);
-
- /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
- len = bits >> 3;
- _in -= len;
- bits -= len << 3;
- hold &= (1 << bits) - 1;
-
- /* update state and return */
- strm.next_in = _in;
- strm.next_out = _out;
- strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
- strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
- state.hold = hold;
- state.bits = bits;
- return;
-};
-
-},{}],11:[function(require,module,exports){
-'use strict';
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-var utils = require('../utils/common');
-var adler32 = require('./adler32');
-var crc32 = require('./crc32');
-var inflate_fast = require('./inffast');
-var inflate_table = require('./inftrees');
-
-var CODES = 0;
-var LENS = 1;
-var DISTS = 2;
-
-/* Public constants ==========================================================*/
-/* ===========================================================================*/
-
-
-/* Allowed flush values; see deflate() and inflate() below for details */
-//var Z_NO_FLUSH = 0;
-//var Z_PARTIAL_FLUSH = 1;
-//var Z_SYNC_FLUSH = 2;
-//var Z_FULL_FLUSH = 3;
-var Z_FINISH = 4;
-var Z_BLOCK = 5;
-var Z_TREES = 6;
-
-
-/* Return codes for the compression/decompression functions. Negative values
- * are errors, positive values are used for special but normal events.
- */
-var Z_OK = 0;
-var Z_STREAM_END = 1;
-var Z_NEED_DICT = 2;
-//var Z_ERRNO = -1;
-var Z_STREAM_ERROR = -2;
-var Z_DATA_ERROR = -3;
-var Z_MEM_ERROR = -4;
-var Z_BUF_ERROR = -5;
-//var Z_VERSION_ERROR = -6;
-
-/* The deflate compression method */
-var Z_DEFLATED = 8;
-
-
-/* STATES ====================================================================*/
-/* ===========================================================================*/
-
-
-var HEAD = 1; /* i: waiting for magic header */
-var FLAGS = 2; /* i: waiting for method and flags (gzip) */
-var TIME = 3; /* i: waiting for modification time (gzip) */
-var OS = 4; /* i: waiting for extra flags and operating system (gzip) */
-var EXLEN = 5; /* i: waiting for extra length (gzip) */
-var EXTRA = 6; /* i: waiting for extra bytes (gzip) */
-var NAME = 7; /* i: waiting for end of file name (gzip) */
-var COMMENT = 8; /* i: waiting for end of comment (gzip) */
-var HCRC = 9; /* i: waiting for header crc (gzip) */
-var DICTID = 10; /* i: waiting for dictionary check value */
-var DICT = 11; /* waiting for inflateSetDictionary() call */
-var TYPE = 12; /* i: waiting for type bits, including last-flag bit */
-var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */
-var STORED = 14; /* i: waiting for stored size (length and complement) */
-var COPY_ = 15; /* i/o: same as COPY below, but only first time in */
-var COPY = 16; /* i/o: waiting for input or output to copy stored block */
-var TABLE = 17; /* i: waiting for dynamic block table lengths */
-var LENLENS = 18; /* i: waiting for code length code lengths */
-var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */
-var LEN_ = 20; /* i: same as LEN below, but only first time in */
-var LEN = 21; /* i: waiting for length/lit/eob code */
-var LENEXT = 22; /* i: waiting for length extra bits */
-var DIST = 23; /* i: waiting for distance code */
-var DISTEXT = 24; /* i: waiting for distance extra bits */
-var MATCH = 25; /* o: waiting for output space to copy string */
-var LIT = 26; /* o: waiting for output space to write literal */
-var CHECK = 27; /* i: waiting for 32-bit check value */
-var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */
-var DONE = 29; /* finished check, done -- remain here until reset */
-var BAD = 30; /* got a data error -- remain here until reset */
-var MEM = 31; /* got an inflate() memory error -- remain here until reset */
-var SYNC = 32; /* looking for synchronization bytes to restart inflate() */
-
-/* ===========================================================================*/
-
-
-
-var ENOUGH_LENS = 852;
-var ENOUGH_DISTS = 592;
-//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
-
-var MAX_WBITS = 15;
-/* 32K LZ77 window */
-var DEF_WBITS = MAX_WBITS;
-
-
-function zswap32(q) {
- return (((q >>> 24) & 0xff) +
- ((q >>> 8) & 0xff00) +
- ((q & 0xff00) << 8) +
- ((q & 0xff) << 24));
-}
-
-
-function InflateState() {
- this.mode = 0; /* current inflate mode */
- this.last = false; /* true if processing last block */
- this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */
- this.havedict = false; /* true if dictionary provided */
- this.flags = 0; /* gzip header method and flags (0 if zlib) */
- this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */
- this.check = 0; /* protected copy of check value */
- this.total = 0; /* protected copy of output count */
- // TODO: may be {}
- this.head = null; /* where to save gzip header information */
-
- /* sliding window */
- this.wbits = 0; /* log base 2 of requested window size */
- this.wsize = 0; /* window size or zero if not using window */
- this.whave = 0; /* valid bytes in the window */
- this.wnext = 0; /* window write index */
- this.window = null; /* allocated sliding window, if needed */
-
- /* bit accumulator */
- this.hold = 0; /* input bit accumulator */
- this.bits = 0; /* number of bits in "in" */
-
- /* for string and stored block copying */
- this.length = 0; /* literal or length of data to copy */
- this.offset = 0; /* distance back to copy string from */
-
- /* for table and code decoding */
- this.extra = 0; /* extra bits needed */
-
- /* fixed and dynamic code tables */
- this.lencode = null; /* starting table for length/literal codes */
- this.distcode = null; /* starting table for distance codes */
- this.lenbits = 0; /* index bits for lencode */
- this.distbits = 0; /* index bits for distcode */
-
- /* dynamic table building */
- this.ncode = 0; /* number of code length code lengths */
- this.nlen = 0; /* number of length code lengths */
- this.ndist = 0; /* number of distance code lengths */
- this.have = 0; /* number of code lengths in lens[] */
- this.next = null; /* next available space in codes[] */
-
- this.lens = new utils.Buf16(320); /* temporary storage for code lengths */
- this.work = new utils.Buf16(288); /* work area for code table building */
-
- /*
- because we don't have pointers in js, we use lencode and distcode directly
- as buffers so we don't need codes
- */
- //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */
- this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */
- this.distdyn = null; /* dynamic table for distance codes (JS specific) */
- this.sane = 0; /* if false, allow invalid distance too far */
- this.back = 0; /* bits back of last unprocessed length/lit */
- this.was = 0; /* initial length of match */
-}
-
-function inflateResetKeep(strm) {
- var state;
-
- if (!strm || !strm.state) { return Z_STREAM_ERROR; }
- state = strm.state;
- strm.total_in = strm.total_out = state.total = 0;
- strm.msg = ''; /*Z_NULL*/
- if (state.wrap) { /* to support ill-conceived Java test suite */
- strm.adler = state.wrap & 1;
- }
- state.mode = HEAD;
- state.last = 0;
- state.havedict = 0;
- state.dmax = 32768;
- state.head = null/*Z_NULL*/;
- state.hold = 0;
- state.bits = 0;
- //state.lencode = state.distcode = state.next = state.codes;
- state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);
- state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);
-
- state.sane = 1;
- state.back = -1;
- //Tracev((stderr, "inflate: reset\n"));
- return Z_OK;
-}
-
-function inflateReset(strm) {
- var state;
-
- if (!strm || !strm.state) { return Z_STREAM_ERROR; }
- state = strm.state;
- state.wsize = 0;
- state.whave = 0;
- state.wnext = 0;
- return inflateResetKeep(strm);
-
-}
-
-function inflateReset2(strm, windowBits) {
- var wrap;
- var state;
-
- /* get the state */
- if (!strm || !strm.state) { return Z_STREAM_ERROR; }
- state = strm.state;
-
- /* extract wrap request from windowBits parameter */
- if (windowBits < 0) {
- wrap = 0;
- windowBits = -windowBits;
- }
- else {
- wrap = (windowBits >> 4) + 1;
- if (windowBits < 48) {
- windowBits &= 15;
- }
- }
-
- /* set number of window bits, free window if different */
- if (windowBits && (windowBits < 8 || windowBits > 15)) {
- return Z_STREAM_ERROR;
- }
- if (state.window !== null && state.wbits !== windowBits) {
- state.window = null;
- }
-
- /* update state and reset the rest of it */
- state.wrap = wrap;
- state.wbits = windowBits;
- return inflateReset(strm);
-}
-
-function inflateInit2(strm, windowBits) {
- var ret;
- var state;
-
- if (!strm) { return Z_STREAM_ERROR; }
- //strm.msg = Z_NULL; /* in case we return an error */
-
- state = new InflateState();
-
- //if (state === Z_NULL) return Z_MEM_ERROR;
- //Tracev((stderr, "inflate: allocated\n"));
- strm.state = state;
- state.window = null/*Z_NULL*/;
- ret = inflateReset2(strm, windowBits);
- if (ret !== Z_OK) {
- strm.state = null/*Z_NULL*/;
- }
- return ret;
-}
-
-function inflateInit(strm) {
- return inflateInit2(strm, DEF_WBITS);
-}
-
-
-/*
- Return state with length and distance decoding tables and index sizes set to
- fixed code decoding. Normally this returns fixed tables from inffixed.h.
- If BUILDFIXED is defined, then instead this routine builds the tables the
- first time it's called, and returns those tables the first time and
- thereafter. This reduces the size of the code by about 2K bytes, in
- exchange for a little execution time. However, BUILDFIXED should not be
- used for threaded applications, since the rewriting of the tables and virgin
- may not be thread-safe.
- */
-var virgin = true;
-
-var lenfix, distfix; // We have no pointers in JS, so keep tables separate
-
-function fixedtables(state) {
- /* build fixed huffman tables if first call (may not be thread safe) */
- if (virgin) {
- var sym;
-
- lenfix = new utils.Buf32(512);
- distfix = new utils.Buf32(32);
-
- /* literal/length table */
- sym = 0;
- while (sym < 144) { state.lens[sym++] = 8; }
- while (sym < 256) { state.lens[sym++] = 9; }
- while (sym < 280) { state.lens[sym++] = 7; }
- while (sym < 288) { state.lens[sym++] = 8; }
-
- inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });
-
- /* distance table */
- sym = 0;
- while (sym < 32) { state.lens[sym++] = 5; }
-
- inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });
-
- /* do this just once */
- virgin = false;
- }
-
- state.lencode = lenfix;
- state.lenbits = 9;
- state.distcode = distfix;
- state.distbits = 5;
-}
-
-
-/*
- Update the window with the last wsize (normally 32K) bytes written before
- returning. If window does not exist yet, create it. This is only called
- when a window is already in use, or when output has been written during this
- inflate call, but the end of the deflate stream has not been reached yet.
- It is also called to create a window for dictionary data when a dictionary
- is loaded.
-
- Providing output buffers larger than 32K to inflate() should provide a speed
- advantage, since only the last 32K of output is copied to the sliding window
- upon return from inflate(), and since all distances after the first 32K of
- output will fall in the output data, making match copies simpler and faster.
- The advantage may be dependent on the size of the processor's data caches.
- */
-function updatewindow(strm, src, end, copy) {
- var dist;
- var state = strm.state;
-
- /* if it hasn't been done already, allocate space for the window */
- if (state.window === null) {
- state.wsize = 1 << state.wbits;
- state.wnext = 0;
- state.whave = 0;
-
- state.window = new utils.Buf8(state.wsize);
- }
-
- /* copy state->wsize or less output bytes into the circular window */
- if (copy >= state.wsize) {
- utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);
- state.wnext = 0;
- state.whave = state.wsize;
- }
- else {
- dist = state.wsize - state.wnext;
- if (dist > copy) {
- dist = copy;
- }
- //zmemcpy(state->window + state->wnext, end - copy, dist);
- utils.arraySet(state.window, src, end - copy, dist, state.wnext);
- copy -= dist;
- if (copy) {
- //zmemcpy(state->window, end - copy, copy);
- utils.arraySet(state.window, src, end - copy, copy, 0);
- state.wnext = copy;
- state.whave = state.wsize;
- }
- else {
- state.wnext += dist;
- if (state.wnext === state.wsize) { state.wnext = 0; }
- if (state.whave < state.wsize) { state.whave += dist; }
- }
- }
- return 0;
-}
-
-function inflate(strm, flush) {
- var state;
- var input, output; // input/output buffers
- var next; /* next input INDEX */
- var put; /* next output INDEX */
- var have, left; /* available input and output */
- var hold; /* bit buffer */
- var bits; /* bits in bit buffer */
- var _in, _out; /* save starting available input and output */
- var copy; /* number of stored or match bytes to copy */
- var from; /* where to copy match bytes from */
- var from_source;
- var here = 0; /* current decoding table entry */
- var here_bits, here_op, here_val; // paked "here" denormalized (JS specific)
- //var last; /* parent table entry */
- var last_bits, last_op, last_val; // paked "last" denormalized (JS specific)
- var len; /* length to copy for repeats, bits to drop */
- var ret; /* return code */
- var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */
- var opts;
-
- var n; // temporary var for NEED_BITS
-
- var order = /* permutation of code lengths */
- [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];
-
-
- if (!strm || !strm.state || !strm.output ||
- (!strm.input && strm.avail_in !== 0)) {
- return Z_STREAM_ERROR;
- }
-
- state = strm.state;
- if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */
-
-
- //--- LOAD() ---
- put = strm.next_out;
- output = strm.output;
- left = strm.avail_out;
- next = strm.next_in;
- input = strm.input;
- have = strm.avail_in;
- hold = state.hold;
- bits = state.bits;
- //---
-
- _in = have;
- _out = left;
- ret = Z_OK;
-
- inf_leave: // goto emulation
- for (;;) {
- switch (state.mode) {
- case HEAD:
- if (state.wrap === 0) {
- state.mode = TYPEDO;
- break;
- }
- //=== NEEDBITS(16);
- while (bits < 16) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */
- state.check = 0/*crc32(0L, Z_NULL, 0)*/;
- //=== CRC2(state.check, hold);
- hbuf[0] = hold & 0xff;
- hbuf[1] = (hold >>> 8) & 0xff;
- state.check = crc32(state.check, hbuf, 2, 0);
- //===//
-
- //=== INITBITS();
- hold = 0;
- bits = 0;
- //===//
- state.mode = FLAGS;
- break;
- }
- state.flags = 0; /* expect zlib header */
- if (state.head) {
- state.head.done = false;
- }
- if (!(state.wrap & 1) || /* check if zlib header allowed */
- (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {
- strm.msg = 'incorrect header check';
- state.mode = BAD;
- break;
- }
- if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {
- strm.msg = 'unknown compression method';
- state.mode = BAD;
- break;
- }
- //--- DROPBITS(4) ---//
- hold >>>= 4;
- bits -= 4;
- //---//
- len = (hold & 0x0f)/*BITS(4)*/ + 8;
- if (state.wbits === 0) {
- state.wbits = len;
- }
- else if (len > state.wbits) {
- strm.msg = 'invalid window size';
- state.mode = BAD;
- break;
- }
- state.dmax = 1 << len;
- //Tracev((stderr, "inflate: zlib header ok\n"));
- strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
- state.mode = hold & 0x200 ? DICTID : TYPE;
- //=== INITBITS();
- hold = 0;
- bits = 0;
- //===//
- break;
- case FLAGS:
- //=== NEEDBITS(16); */
- while (bits < 16) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- state.flags = hold;
- if ((state.flags & 0xff) !== Z_DEFLATED) {
- strm.msg = 'unknown compression method';
- state.mode = BAD;
- break;
- }
- if (state.flags & 0xe000) {
- strm.msg = 'unknown header flags set';
- state.mode = BAD;
- break;
- }
- if (state.head) {
- state.head.text = ((hold >> 8) & 1);
- }
- if (state.flags & 0x0200) {
- //=== CRC2(state.check, hold);
- hbuf[0] = hold & 0xff;
- hbuf[1] = (hold >>> 8) & 0xff;
- state.check = crc32(state.check, hbuf, 2, 0);
- //===//
- }
- //=== INITBITS();
- hold = 0;
- bits = 0;
- //===//
- state.mode = TIME;
- /* falls through */
- case TIME:
- //=== NEEDBITS(32); */
- while (bits < 32) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- if (state.head) {
- state.head.time = hold;
- }
- if (state.flags & 0x0200) {
- //=== CRC4(state.check, hold)
- hbuf[0] = hold & 0xff;
- hbuf[1] = (hold >>> 8) & 0xff;
- hbuf[2] = (hold >>> 16) & 0xff;
- hbuf[3] = (hold >>> 24) & 0xff;
- state.check = crc32(state.check, hbuf, 4, 0);
- //===
- }
- //=== INITBITS();
- hold = 0;
- bits = 0;
- //===//
- state.mode = OS;
- /* falls through */
- case OS:
- //=== NEEDBITS(16); */
- while (bits < 16) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- if (state.head) {
- state.head.xflags = (hold & 0xff);
- state.head.os = (hold >> 8);
- }
- if (state.flags & 0x0200) {
- //=== CRC2(state.check, hold);
- hbuf[0] = hold & 0xff;
- hbuf[1] = (hold >>> 8) & 0xff;
- state.check = crc32(state.check, hbuf, 2, 0);
- //===//
- }
- //=== INITBITS();
- hold = 0;
- bits = 0;
- //===//
- state.mode = EXLEN;
- /* falls through */
- case EXLEN:
- if (state.flags & 0x0400) {
- //=== NEEDBITS(16); */
- while (bits < 16) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- state.length = hold;
- if (state.head) {
- state.head.extra_len = hold;
- }
- if (state.flags & 0x0200) {
- //=== CRC2(state.check, hold);
- hbuf[0] = hold & 0xff;
- hbuf[1] = (hold >>> 8) & 0xff;
- state.check = crc32(state.check, hbuf, 2, 0);
- //===//
- }
- //=== INITBITS();
- hold = 0;
- bits = 0;
- //===//
- }
- else if (state.head) {
- state.head.extra = null/*Z_NULL*/;
- }
- state.mode = EXTRA;
- /* falls through */
- case EXTRA:
- if (state.flags & 0x0400) {
- copy = state.length;
- if (copy > have) { copy = have; }
- if (copy) {
- if (state.head) {
- len = state.head.extra_len - state.length;
- if (!state.head.extra) {
- // Use untyped array for more convenient processing later
- state.head.extra = new Array(state.head.extra_len);
- }
- utils.arraySet(
- state.head.extra,
- input,
- next,
- // extra field is limited to 65536 bytes
- // - no need for additional size check
- copy,
- /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
- len
- );
- //zmemcpy(state.head.extra + len, next,
- // len + copy > state.head.extra_max ?
- // state.head.extra_max - len : copy);
- }
- if (state.flags & 0x0200) {
- state.check = crc32(state.check, input, copy, next);
- }
- have -= copy;
- next += copy;
- state.length -= copy;
- }
- if (state.length) { break inf_leave; }
- }
- state.length = 0;
- state.mode = NAME;
- /* falls through */
- case NAME:
- if (state.flags & 0x0800) {
- if (have === 0) { break inf_leave; }
- copy = 0;
- do {
- // TODO: 2 or 1 bytes?
- len = input[next + copy++];
- /* use constant limit because in js we should not preallocate memory */
- if (state.head && len &&
- (state.length < 65536 /*state.head.name_max*/)) {
- state.head.name += String.fromCharCode(len);
- }
- } while (len && copy < have);
-
- if (state.flags & 0x0200) {
- state.check = crc32(state.check, input, copy, next);
- }
- have -= copy;
- next += copy;
- if (len) { break inf_leave; }
- }
- else if (state.head) {
- state.head.name = null;
- }
- state.length = 0;
- state.mode = COMMENT;
- /* falls through */
- case COMMENT:
- if (state.flags & 0x1000) {
- if (have === 0) { break inf_leave; }
- copy = 0;
- do {
- len = input[next + copy++];
- /* use constant limit because in js we should not preallocate memory */
- if (state.head && len &&
- (state.length < 65536 /*state.head.comm_max*/)) {
- state.head.comment += String.fromCharCode(len);
- }
- } while (len && copy < have);
- if (state.flags & 0x0200) {
- state.check = crc32(state.check, input, copy, next);
- }
- have -= copy;
- next += copy;
- if (len) { break inf_leave; }
- }
- else if (state.head) {
- state.head.comment = null;
- }
- state.mode = HCRC;
- /* falls through */
- case HCRC:
- if (state.flags & 0x0200) {
- //=== NEEDBITS(16); */
- while (bits < 16) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- if (hold !== (state.check & 0xffff)) {
- strm.msg = 'header crc mismatch';
- state.mode = BAD;
- break;
- }
- //=== INITBITS();
- hold = 0;
- bits = 0;
- //===//
- }
- if (state.head) {
- state.head.hcrc = ((state.flags >> 9) & 1);
- state.head.done = true;
- }
- strm.adler = state.check = 0;
- state.mode = TYPE;
- break;
- case DICTID:
- //=== NEEDBITS(32); */
- while (bits < 32) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- strm.adler = state.check = zswap32(hold);
- //=== INITBITS();
- hold = 0;
- bits = 0;
- //===//
- state.mode = DICT;
- /* falls through */
- case DICT:
- if (state.havedict === 0) {
- //--- RESTORE() ---
- strm.next_out = put;
- strm.avail_out = left;
- strm.next_in = next;
- strm.avail_in = have;
- state.hold = hold;
- state.bits = bits;
- //---
- return Z_NEED_DICT;
- }
- strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
- state.mode = TYPE;
- /* falls through */
- case TYPE:
- if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }
- /* falls through */
- case TYPEDO:
- if (state.last) {
- //--- BYTEBITS() ---//
- hold >>>= bits & 7;
- bits -= bits & 7;
- //---//
- state.mode = CHECK;
- break;
- }
- //=== NEEDBITS(3); */
- while (bits < 3) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- state.last = (hold & 0x01)/*BITS(1)*/;
- //--- DROPBITS(1) ---//
- hold >>>= 1;
- bits -= 1;
- //---//
-
- switch ((hold & 0x03)/*BITS(2)*/) {
- case 0: /* stored block */
- //Tracev((stderr, "inflate: stored block%s\n",
- // state.last ? " (last)" : ""));
- state.mode = STORED;
- break;
- case 1: /* fixed block */
- fixedtables(state);
- //Tracev((stderr, "inflate: fixed codes block%s\n",
- // state.last ? " (last)" : ""));
- state.mode = LEN_; /* decode codes */
- if (flush === Z_TREES) {
- //--- DROPBITS(2) ---//
- hold >>>= 2;
- bits -= 2;
- //---//
- break inf_leave;
- }
- break;
- case 2: /* dynamic block */
- //Tracev((stderr, "inflate: dynamic codes block%s\n",
- // state.last ? " (last)" : ""));
- state.mode = TABLE;
- break;
- case 3:
- strm.msg = 'invalid block type';
- state.mode = BAD;
- }
- //--- DROPBITS(2) ---//
- hold >>>= 2;
- bits -= 2;
- //---//
- break;
- case STORED:
- //--- BYTEBITS() ---// /* go to byte boundary */
- hold >>>= bits & 7;
- bits -= bits & 7;
- //---//
- //=== NEEDBITS(32); */
- while (bits < 32) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {
- strm.msg = 'invalid stored block lengths';
- state.mode = BAD;
- break;
- }
- state.length = hold & 0xffff;
- //Tracev((stderr, "inflate: stored length %u\n",
- // state.length));
- //=== INITBITS();
- hold = 0;
- bits = 0;
- //===//
- state.mode = COPY_;
- if (flush === Z_TREES) { break inf_leave; }
- /* falls through */
- case COPY_:
- state.mode = COPY;
- /* falls through */
- case COPY:
- copy = state.length;
- if (copy) {
- if (copy > have) { copy = have; }
- if (copy > left) { copy = left; }
- if (copy === 0) { break inf_leave; }
- //--- zmemcpy(put, next, copy); ---
- utils.arraySet(output, input, next, copy, put);
- //---//
- have -= copy;
- next += copy;
- left -= copy;
- put += copy;
- state.length -= copy;
- break;
- }
- //Tracev((stderr, "inflate: stored end\n"));
- state.mode = TYPE;
- break;
- case TABLE:
- //=== NEEDBITS(14); */
- while (bits < 14) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;
- //--- DROPBITS(5) ---//
- hold >>>= 5;
- bits -= 5;
- //---//
- state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;
- //--- DROPBITS(5) ---//
- hold >>>= 5;
- bits -= 5;
- //---//
- state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;
- //--- DROPBITS(4) ---//
- hold >>>= 4;
- bits -= 4;
- //---//
-//#ifndef PKZIP_BUG_WORKAROUND
- if (state.nlen > 286 || state.ndist > 30) {
- strm.msg = 'too many length or distance symbols';
- state.mode = BAD;
- break;
- }
-//#endif
- //Tracev((stderr, "inflate: table sizes ok\n"));
- state.have = 0;
- state.mode = LENLENS;
- /* falls through */
- case LENLENS:
- while (state.have < state.ncode) {
- //=== NEEDBITS(3);
- while (bits < 3) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);
- //--- DROPBITS(3) ---//
- hold >>>= 3;
- bits -= 3;
- //---//
- }
- while (state.have < 19) {
- state.lens[order[state.have++]] = 0;
- }
- // We have separate tables & no pointers. 2 commented lines below not needed.
- //state.next = state.codes;
- //state.lencode = state.next;
- // Switch to use dynamic table
- state.lencode = state.lendyn;
- state.lenbits = 7;
-
- opts = { bits: state.lenbits };
- ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);
- state.lenbits = opts.bits;
-
- if (ret) {
- strm.msg = 'invalid code lengths set';
- state.mode = BAD;
- break;
- }
- //Tracev((stderr, "inflate: code lengths ok\n"));
- state.have = 0;
- state.mode = CODELENS;
- /* falls through */
- case CODELENS:
- while (state.have < state.nlen + state.ndist) {
- for (;;) {
- here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/
- here_bits = here >>> 24;
- here_op = (here >>> 16) & 0xff;
- here_val = here & 0xffff;
-
- if ((here_bits) <= bits) { break; }
- //--- PULLBYTE() ---//
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- //---//
- }
- if (here_val < 16) {
- //--- DROPBITS(here.bits) ---//
- hold >>>= here_bits;
- bits -= here_bits;
- //---//
- state.lens[state.have++] = here_val;
- }
- else {
- if (here_val === 16) {
- //=== NEEDBITS(here.bits + 2);
- n = here_bits + 2;
- while (bits < n) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- //--- DROPBITS(here.bits) ---//
- hold >>>= here_bits;
- bits -= here_bits;
- //---//
- if (state.have === 0) {
- strm.msg = 'invalid bit length repeat';
- state.mode = BAD;
- break;
- }
- len = state.lens[state.have - 1];
- copy = 3 + (hold & 0x03);//BITS(2);
- //--- DROPBITS(2) ---//
- hold >>>= 2;
- bits -= 2;
- //---//
- }
- else if (here_val === 17) {
- //=== NEEDBITS(here.bits + 3);
- n = here_bits + 3;
- while (bits < n) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- //--- DROPBITS(here.bits) ---//
- hold >>>= here_bits;
- bits -= here_bits;
- //---//
- len = 0;
- copy = 3 + (hold & 0x07);//BITS(3);
- //--- DROPBITS(3) ---//
- hold >>>= 3;
- bits -= 3;
- //---//
- }
- else {
- //=== NEEDBITS(here.bits + 7);
- n = here_bits + 7;
- while (bits < n) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- //--- DROPBITS(here.bits) ---//
- hold >>>= here_bits;
- bits -= here_bits;
- //---//
- len = 0;
- copy = 11 + (hold & 0x7f);//BITS(7);
- //--- DROPBITS(7) ---//
- hold >>>= 7;
- bits -= 7;
- //---//
- }
- if (state.have + copy > state.nlen + state.ndist) {
- strm.msg = 'invalid bit length repeat';
- state.mode = BAD;
- break;
- }
- while (copy--) {
- state.lens[state.have++] = len;
- }
- }
- }
-
- /* handle error breaks in while */
- if (state.mode === BAD) { break; }
-
- /* check for end-of-block code (better have one) */
- if (state.lens[256] === 0) {
- strm.msg = 'invalid code -- missing end-of-block';
- state.mode = BAD;
- break;
- }
-
- /* build code tables -- note: do not change the lenbits or distbits
- values here (9 and 6) without reading the comments in inftrees.h
- concerning the ENOUGH constants, which depend on those values */
- state.lenbits = 9;
-
- opts = { bits: state.lenbits };
- ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);
- // We have separate tables & no pointers. 2 commented lines below not needed.
- // state.next_index = opts.table_index;
- state.lenbits = opts.bits;
- // state.lencode = state.next;
-
- if (ret) {
- strm.msg = 'invalid literal/lengths set';
- state.mode = BAD;
- break;
- }
-
- state.distbits = 6;
- //state.distcode.copy(state.codes);
- // Switch to use dynamic table
- state.distcode = state.distdyn;
- opts = { bits: state.distbits };
- ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);
- // We have separate tables & no pointers. 2 commented lines below not needed.
- // state.next_index = opts.table_index;
- state.distbits = opts.bits;
- // state.distcode = state.next;
-
- if (ret) {
- strm.msg = 'invalid distances set';
- state.mode = BAD;
- break;
- }
- //Tracev((stderr, 'inflate: codes ok\n'));
- state.mode = LEN_;
- if (flush === Z_TREES) { break inf_leave; }
- /* falls through */
- case LEN_:
- state.mode = LEN;
- /* falls through */
- case LEN:
- if (have >= 6 && left >= 258) {
- //--- RESTORE() ---
- strm.next_out = put;
- strm.avail_out = left;
- strm.next_in = next;
- strm.avail_in = have;
- state.hold = hold;
- state.bits = bits;
- //---
- inflate_fast(strm, _out);
- //--- LOAD() ---
- put = strm.next_out;
- output = strm.output;
- left = strm.avail_out;
- next = strm.next_in;
- input = strm.input;
- have = strm.avail_in;
- hold = state.hold;
- bits = state.bits;
- //---
-
- if (state.mode === TYPE) {
- state.back = -1;
- }
- break;
- }
- state.back = 0;
- for (;;) {
- here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/
- here_bits = here >>> 24;
- here_op = (here >>> 16) & 0xff;
- here_val = here & 0xffff;
-
- if (here_bits <= bits) { break; }
- //--- PULLBYTE() ---//
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- //---//
- }
- if (here_op && (here_op & 0xf0) === 0) {
- last_bits = here_bits;
- last_op = here_op;
- last_val = here_val;
- for (;;) {
- here = state.lencode[last_val +
- ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
- here_bits = here >>> 24;
- here_op = (here >>> 16) & 0xff;
- here_val = here & 0xffff;
-
- if ((last_bits + here_bits) <= bits) { break; }
- //--- PULLBYTE() ---//
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- //---//
- }
- //--- DROPBITS(last.bits) ---//
- hold >>>= last_bits;
- bits -= last_bits;
- //---//
- state.back += last_bits;
- }
- //--- DROPBITS(here.bits) ---//
- hold >>>= here_bits;
- bits -= here_bits;
- //---//
- state.back += here_bits;
- state.length = here_val;
- if (here_op === 0) {
- //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
- // "inflate: literal '%c'\n" :
- // "inflate: literal 0x%02x\n", here.val));
- state.mode = LIT;
- break;
- }
- if (here_op & 32) {
- //Tracevv((stderr, "inflate: end of block\n"));
- state.back = -1;
- state.mode = TYPE;
- break;
- }
- if (here_op & 64) {
- strm.msg = 'invalid literal/length code';
- state.mode = BAD;
- break;
- }
- state.extra = here_op & 15;
- state.mode = LENEXT;
- /* falls through */
- case LENEXT:
- if (state.extra) {
- //=== NEEDBITS(state.extra);
- n = state.extra;
- while (bits < n) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
- //--- DROPBITS(state.extra) ---//
- hold >>>= state.extra;
- bits -= state.extra;
- //---//
- state.back += state.extra;
- }
- //Tracevv((stderr, "inflate: length %u\n", state.length));
- state.was = state.length;
- state.mode = DIST;
- /* falls through */
- case DIST:
- for (;;) {
- here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/
- here_bits = here >>> 24;
- here_op = (here >>> 16) & 0xff;
- here_val = here & 0xffff;
-
- if ((here_bits) <= bits) { break; }
- //--- PULLBYTE() ---//
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- //---//
- }
- if ((here_op & 0xf0) === 0) {
- last_bits = here_bits;
- last_op = here_op;
- last_val = here_val;
- for (;;) {
- here = state.distcode[last_val +
- ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
- here_bits = here >>> 24;
- here_op = (here >>> 16) & 0xff;
- here_val = here & 0xffff;
-
- if ((last_bits + here_bits) <= bits) { break; }
- //--- PULLBYTE() ---//
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- //---//
- }
- //--- DROPBITS(last.bits) ---//
- hold >>>= last_bits;
- bits -= last_bits;
- //---//
- state.back += last_bits;
- }
- //--- DROPBITS(here.bits) ---//
- hold >>>= here_bits;
- bits -= here_bits;
- //---//
- state.back += here_bits;
- if (here_op & 64) {
- strm.msg = 'invalid distance code';
- state.mode = BAD;
- break;
- }
- state.offset = here_val;
- state.extra = (here_op) & 15;
- state.mode = DISTEXT;
- /* falls through */
- case DISTEXT:
- if (state.extra) {
- //=== NEEDBITS(state.extra);
- n = state.extra;
- while (bits < n) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
- //--- DROPBITS(state.extra) ---//
- hold >>>= state.extra;
- bits -= state.extra;
- //---//
- state.back += state.extra;
- }
-//#ifdef INFLATE_STRICT
- if (state.offset > state.dmax) {
- strm.msg = 'invalid distance too far back';
- state.mode = BAD;
- break;
- }
-//#endif
- //Tracevv((stderr, "inflate: distance %u\n", state.offset));
- state.mode = MATCH;
- /* falls through */
- case MATCH:
- if (left === 0) { break inf_leave; }
- copy = _out - left;
- if (state.offset > copy) { /* copy from window */
- copy = state.offset - copy;
- if (copy > state.whave) {
- if (state.sane) {
- strm.msg = 'invalid distance too far back';
- state.mode = BAD;
- break;
- }
-// (!) This block is disabled in zlib defaults,
-// don't enable it for binary compatibility
-//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
-// Trace((stderr, "inflate.c too far\n"));
-// copy -= state.whave;
-// if (copy > state.length) { copy = state.length; }
-// if (copy > left) { copy = left; }
-// left -= copy;
-// state.length -= copy;
-// do {
-// output[put++] = 0;
-// } while (--copy);
-// if (state.length === 0) { state.mode = LEN; }
-// break;
-//#endif
- }
- if (copy > state.wnext) {
- copy -= state.wnext;
- from = state.wsize - copy;
- }
- else {
- from = state.wnext - copy;
- }
- if (copy > state.length) { copy = state.length; }
- from_source = state.window;
- }
- else { /* copy from output */
- from_source = output;
- from = put - state.offset;
- copy = state.length;
- }
- if (copy > left) { copy = left; }
- left -= copy;
- state.length -= copy;
- do {
- output[put++] = from_source[from++];
- } while (--copy);
- if (state.length === 0) { state.mode = LEN; }
- break;
- case LIT:
- if (left === 0) { break inf_leave; }
- output[put++] = state.length;
- left--;
- state.mode = LEN;
- break;
- case CHECK:
- if (state.wrap) {
- //=== NEEDBITS(32);
- while (bits < 32) {
- if (have === 0) { break inf_leave; }
- have--;
- // Use '|' instead of '+' to make sure that result is signed
- hold |= input[next++] << bits;
- bits += 8;
- }
- //===//
- _out -= left;
- strm.total_out += _out;
- state.total += _out;
- if (_out) {
- strm.adler = state.check =
- /*UPDATE(state.check, put - _out, _out);*/
- (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));
-
- }
- _out = left;
- // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
- if ((state.flags ? hold : zswap32(hold)) !== state.check) {
- strm.msg = 'incorrect data check';
- state.mode = BAD;
- break;
- }
- //=== INITBITS();
- hold = 0;
- bits = 0;
- //===//
- //Tracev((stderr, "inflate: check matches trailer\n"));
- }
- state.mode = LENGTH;
- /* falls through */
- case LENGTH:
- if (state.wrap && state.flags) {
- //=== NEEDBITS(32);
- while (bits < 32) {
- if (have === 0) { break inf_leave; }
- have--;
- hold += input[next++] << bits;
- bits += 8;
- }
- //===//
- if (hold !== (state.total & 0xffffffff)) {
- strm.msg = 'incorrect length check';
- state.mode = BAD;
- break;
- }
- //=== INITBITS();
- hold = 0;
- bits = 0;
- //===//
- //Tracev((stderr, "inflate: length matches trailer\n"));
- }
- state.mode = DONE;
- /* falls through */
- case DONE:
- ret = Z_STREAM_END;
- break inf_leave;
- case BAD:
- ret = Z_DATA_ERROR;
- break inf_leave;
- case MEM:
- return Z_MEM_ERROR;
- case SYNC:
- /* falls through */
- default:
- return Z_STREAM_ERROR;
- }
- }
-
- // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"
-
- /*
- Return from inflate(), updating the total counts and the check value.
- If there was no progress during the inflate() call, return a buffer
- error. Call updatewindow() to create and/or update the window state.
- Note: a memory error from inflate() is non-recoverable.
- */
-
- //--- RESTORE() ---
- strm.next_out = put;
- strm.avail_out = left;
- strm.next_in = next;
- strm.avail_in = have;
- state.hold = hold;
- state.bits = bits;
- //---
-
- if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&
- (state.mode < CHECK || flush !== Z_FINISH))) {
- if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {
- state.mode = MEM;
- return Z_MEM_ERROR;
- }
- }
- _in -= strm.avail_in;
- _out -= strm.avail_out;
- strm.total_in += _in;
- strm.total_out += _out;
- state.total += _out;
- if (state.wrap && _out) {
- strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
- (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));
- }
- strm.data_type = state.bits + (state.last ? 64 : 0) +
- (state.mode === TYPE ? 128 : 0) +
- (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
- if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {
- ret = Z_BUF_ERROR;
- }
- return ret;
-}
-
-function inflateEnd(strm) {
-
- if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
- return Z_STREAM_ERROR;
- }
-
- var state = strm.state;
- if (state.window) {
- state.window = null;
- }
- strm.state = null;
- return Z_OK;
-}
-
-function inflateGetHeader(strm, head) {
- var state;
-
- /* check state */
- if (!strm || !strm.state) { return Z_STREAM_ERROR; }
- state = strm.state;
- if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }
-
- /* save header structure */
- state.head = head;
- head.done = false;
- return Z_OK;
-}
-
-function inflateSetDictionary(strm, dictionary) {
- var dictLength = dictionary.length;
-
- var state;
- var dictid;
- var ret;
-
- /* check state */
- if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }
- state = strm.state;
-
- if (state.wrap !== 0 && state.mode !== DICT) {
- return Z_STREAM_ERROR;
- }
-
- /* check for correct dictionary identifier */
- if (state.mode === DICT) {
- dictid = 1; /* adler32(0, null, 0)*/
- /* dictid = adler32(dictid, dictionary, dictLength); */
- dictid = adler32(dictid, dictionary, dictLength, 0);
- if (dictid !== state.check) {
- return Z_DATA_ERROR;
- }
- }
- /* copy dictionary to window using updatewindow(), which will amend the
- existing dictionary if appropriate */
- ret = updatewindow(strm, dictionary, dictLength, dictLength);
- if (ret) {
- state.mode = MEM;
- return Z_MEM_ERROR;
- }
- state.havedict = 1;
- // Tracev((stderr, "inflate: dictionary set\n"));
- return Z_OK;
-}
-
-exports.inflateReset = inflateReset;
-exports.inflateReset2 = inflateReset2;
-exports.inflateResetKeep = inflateResetKeep;
-exports.inflateInit = inflateInit;
-exports.inflateInit2 = inflateInit2;
-exports.inflate = inflate;
-exports.inflateEnd = inflateEnd;
-exports.inflateGetHeader = inflateGetHeader;
-exports.inflateSetDictionary = inflateSetDictionary;
-exports.inflateInfo = 'pako inflate (from Nodeca project)';
-
-/* Not implemented
-exports.inflateCopy = inflateCopy;
-exports.inflateGetDictionary = inflateGetDictionary;
-exports.inflateMark = inflateMark;
-exports.inflatePrime = inflatePrime;
-exports.inflateSync = inflateSync;
-exports.inflateSyncPoint = inflateSyncPoint;
-exports.inflateUndermine = inflateUndermine;
-*/
-
-},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(require,module,exports){
-'use strict';
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-var utils = require('../utils/common');
-
-var MAXBITS = 15;
-var ENOUGH_LENS = 852;
-var ENOUGH_DISTS = 592;
-//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
-
-var CODES = 0;
-var LENS = 1;
-var DISTS = 2;
-
-var lbase = [ /* Length codes 257..285 base */
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
- 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
-];
-
-var lext = [ /* Length codes 257..285 extra */
- 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
- 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78
-];
-
-var dbase = [ /* Distance codes 0..29 base */
- 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
- 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
- 8193, 12289, 16385, 24577, 0, 0
-];
-
-var dext = [ /* Distance codes 0..29 extra */
- 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
- 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
- 28, 28, 29, 29, 64, 64
-];
-
-module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)
-{
- var bits = opts.bits;
- //here = opts.here; /* table entry for duplication */
-
- var len = 0; /* a code's length in bits */
- var sym = 0; /* index of code symbols */
- var min = 0, max = 0; /* minimum and maximum code lengths */
- var root = 0; /* number of index bits for root table */
- var curr = 0; /* number of index bits for current table */
- var drop = 0; /* code bits to drop for sub-table */
- var left = 0; /* number of prefix codes available */
- var used = 0; /* code entries in table used */
- var huff = 0; /* Huffman code */
- var incr; /* for incrementing code, index */
- var fill; /* index for replicating entries */
- var low; /* low bits for current root entry */
- var mask; /* mask for low root bits */
- var next; /* next available space in table */
- var base = null; /* base value table to use */
- var base_index = 0;
-// var shoextra; /* extra bits table to use */
- var end; /* use base and extra for symbol > end */
- var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */
- var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */
- var extra = null;
- var extra_index = 0;
-
- var here_bits, here_op, here_val;
-
- /*
- Process a set of code lengths to create a canonical Huffman code. The
- code lengths are lens[0..codes-1]. Each length corresponds to the
- symbols 0..codes-1. The Huffman code is generated by first sorting the
- symbols by length from short to long, and retaining the symbol order
- for codes with equal lengths. Then the code starts with all zero bits
- for the first code of the shortest length, and the codes are integer
- increments for the same length, and zeros are appended as the length
- increases. For the deflate format, these bits are stored backwards
- from their more natural integer increment ordering, and so when the
- decoding tables are built in the large loop below, the integer codes
- are incremented backwards.
-
- This routine assumes, but does not check, that all of the entries in
- lens[] are in the range 0..MAXBITS. The caller must assure this.
- 1..MAXBITS is interpreted as that code length. zero means that that
- symbol does not occur in this code.
-
- The codes are sorted by computing a count of codes for each length,
- creating from that a table of starting indices for each length in the
- sorted table, and then entering the symbols in order in the sorted
- table. The sorted table is work[], with that space being provided by
- the caller.
-
- The length counts are used for other purposes as well, i.e. finding
- the minimum and maximum length codes, determining if there are any
- codes at all, checking for a valid set of lengths, and looking ahead
- at length counts to determine sub-table sizes when building the
- decoding tables.
- */
-
- /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
- for (len = 0; len <= MAXBITS; len++) {
- count[len] = 0;
- }
- for (sym = 0; sym < codes; sym++) {
- count[lens[lens_index + sym]]++;
- }
-
- /* bound code lengths, force root to be within code lengths */
- root = bits;
- for (max = MAXBITS; max >= 1; max--) {
- if (count[max] !== 0) { break; }
- }
- if (root > max) {
- root = max;
- }
- if (max === 0) { /* no symbols to code at all */
- //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */
- //table.bits[opts.table_index] = 1; //here.bits = (var char)1;
- //table.val[opts.table_index++] = 0; //here.val = (var short)0;
- table[table_index++] = (1 << 24) | (64 << 16) | 0;
-
-
- //table.op[opts.table_index] = 64;
- //table.bits[opts.table_index] = 1;
- //table.val[opts.table_index++] = 0;
- table[table_index++] = (1 << 24) | (64 << 16) | 0;
-
- opts.bits = 1;
- return 0; /* no symbols, but wait for decoding to report error */
- }
- for (min = 1; min < max; min++) {
- if (count[min] !== 0) { break; }
- }
- if (root < min) {
- root = min;
- }
-
- /* check for an over-subscribed or incomplete set of lengths */
- left = 1;
- for (len = 1; len <= MAXBITS; len++) {
- left <<= 1;
- left -= count[len];
- if (left < 0) {
- return -1;
- } /* over-subscribed */
- }
- if (left > 0 && (type === CODES || max !== 1)) {
- return -1; /* incomplete set */
- }
-
- /* generate offsets into symbol table for each length for sorting */
- offs[1] = 0;
- for (len = 1; len < MAXBITS; len++) {
- offs[len + 1] = offs[len] + count[len];
- }
-
- /* sort symbols by length, by symbol order within each length */
- for (sym = 0; sym < codes; sym++) {
- if (lens[lens_index + sym] !== 0) {
- work[offs[lens[lens_index + sym]]++] = sym;
- }
- }
-
- /*
- Create and fill in decoding tables. In this loop, the table being
- filled is at next and has curr index bits. The code being used is huff
- with length len. That code is converted to an index by dropping drop
- bits off of the bottom. For codes where len is less than drop + curr,
- those top drop + curr - len bits are incremented through all values to
- fill the table with replicated entries.
-
- root is the number of index bits for the root table. When len exceeds
- root, sub-tables are created pointed to by the root entry with an index
- of the low root bits of huff. This is saved in low to check for when a
- new sub-table should be started. drop is zero when the root table is
- being filled, and drop is root when sub-tables are being filled.
-
- When a new sub-table is needed, it is necessary to look ahead in the
- code lengths to determine what size sub-table is needed. The length
- counts are used for this, and so count[] is decremented as codes are
- entered in the tables.
-
- used keeps track of how many table entries have been allocated from the
- provided *table space. It is checked for LENS and DIST tables against
- the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
- the initial root table size constants. See the comments in inftrees.h
- for more information.
-
- sym increments through all symbols, and the loop terminates when
- all codes of length max, i.e. all codes, have been processed. This
- routine permits incomplete codes, so another loop after this one fills
- in the rest of the decoding tables with invalid code markers.
- */
-
- /* set up for code type */
- // poor man optimization - use if-else instead of switch,
- // to avoid deopts in old v8
- if (type === CODES) {
- base = extra = work; /* dummy value--not used */
- end = 19;
-
- } else if (type === LENS) {
- base = lbase;
- base_index -= 257;
- extra = lext;
- extra_index -= 257;
- end = 256;
-
- } else { /* DISTS */
- base = dbase;
- extra = dext;
- end = -1;
- }
-
- /* initialize opts for loop */
- huff = 0; /* starting code */
- sym = 0; /* starting code symbol */
- len = min; /* starting code length */
- next = table_index; /* current table to fill in */
- curr = root; /* current table index bits */
- drop = 0; /* current bits to drop from code for index */
- low = -1; /* trigger new sub-table when len > root */
- used = 1 << root; /* use root table entries */
- mask = used - 1; /* mask for comparing low */
-
- /* check available table space */
- if ((type === LENS && used > ENOUGH_LENS) ||
- (type === DISTS && used > ENOUGH_DISTS)) {
- return 1;
- }
-
- /* process all codes and make table entries */
- for (;;) {
- /* create table entry */
- here_bits = len - drop;
- if (work[sym] < end) {
- here_op = 0;
- here_val = work[sym];
- }
- else if (work[sym] > end) {
- here_op = extra[extra_index + work[sym]];
- here_val = base[base_index + work[sym]];
- }
- else {
- here_op = 32 + 64; /* end of block */
- here_val = 0;
- }
-
- /* replicate for those indices with low len bits equal to huff */
- incr = 1 << (len - drop);
- fill = 1 << curr;
- min = fill; /* save offset to next table */
- do {
- fill -= incr;
- table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;
- } while (fill !== 0);
-
- /* backwards increment the len-bit code huff */
- incr = 1 << (len - 1);
- while (huff & incr) {
- incr >>= 1;
- }
- if (incr !== 0) {
- huff &= incr - 1;
- huff += incr;
- } else {
- huff = 0;
- }
-
- /* go to next symbol, update count, len */
- sym++;
- if (--count[len] === 0) {
- if (len === max) { break; }
- len = lens[lens_index + work[sym]];
- }
-
- /* create new sub-table if needed */
- if (len > root && (huff & mask) !== low) {
- /* if first time, transition to sub-tables */
- if (drop === 0) {
- drop = root;
- }
-
- /* increment past last table */
- next += min; /* here min is 1 << curr */
-
- /* determine length of next table */
- curr = len - drop;
- left = 1 << curr;
- while (curr + drop < max) {
- left -= count[curr + drop];
- if (left <= 0) { break; }
- curr++;
- left <<= 1;
- }
-
- /* check for enough space */
- used += 1 << curr;
- if ((type === LENS && used > ENOUGH_LENS) ||
- (type === DISTS && used > ENOUGH_DISTS)) {
- return 1;
- }
-
- /* point entry in root table to sub-table */
- low = huff & mask;
- /*table.op[low] = curr;
- table.bits[low] = root;
- table.val[low] = next - opts.table_index;*/
- table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;
- }
- }
-
- /* fill in remaining table entry if code is incomplete (guaranteed to have
- at most one remaining entry, since if the code is incomplete, the
- maximum code length that was allowed to get this far is one bit) */
- if (huff !== 0) {
- //table.op[next + huff] = 64; /* invalid code marker */
- //table.bits[next + huff] = len - drop;
- //table.val[next + huff] = 0;
- table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;
- }
-
- /* set return parameters */
- //opts.table_index += used;
- opts.bits = root;
- return 0;
-};
-
-},{"../utils/common":3}],13:[function(require,module,exports){
-'use strict';
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-module.exports = {
- 2: 'need dictionary', /* Z_NEED_DICT 2 */
- 1: 'stream end', /* Z_STREAM_END 1 */
- 0: '', /* Z_OK 0 */
- '-1': 'file error', /* Z_ERRNO (-1) */
- '-2': 'stream error', /* Z_STREAM_ERROR (-2) */
- '-3': 'data error', /* Z_DATA_ERROR (-3) */
- '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */
- '-5': 'buffer error', /* Z_BUF_ERROR (-5) */
- '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */
-};
-
-},{}],14:[function(require,module,exports){
-'use strict';
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-var utils = require('../utils/common');
-
-/* Public constants ==========================================================*/
-/* ===========================================================================*/
-
-
-//var Z_FILTERED = 1;
-//var Z_HUFFMAN_ONLY = 2;
-//var Z_RLE = 3;
-var Z_FIXED = 4;
-//var Z_DEFAULT_STRATEGY = 0;
-
-/* Possible values of the data_type field (though see inflate()) */
-var Z_BINARY = 0;
-var Z_TEXT = 1;
-//var Z_ASCII = 1; // = Z_TEXT
-var Z_UNKNOWN = 2;
-
-/*============================================================================*/
-
-
-function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }
-
-// From zutil.h
-
-var STORED_BLOCK = 0;
-var STATIC_TREES = 1;
-var DYN_TREES = 2;
-/* The three kinds of block type */
-
-var MIN_MATCH = 3;
-var MAX_MATCH = 258;
-/* The minimum and maximum match lengths */
-
-// From deflate.h
-/* ===========================================================================
- * Internal compression state.
- */
-
-var LENGTH_CODES = 29;
-/* number of length codes, not counting the special END_BLOCK code */
-
-var LITERALS = 256;
-/* number of literal bytes 0..255 */
-
-var L_CODES = LITERALS + 1 + LENGTH_CODES;
-/* number of Literal or Length codes, including the END_BLOCK code */
-
-var D_CODES = 30;
-/* number of distance codes */
-
-var BL_CODES = 19;
-/* number of codes used to transfer the bit lengths */
-
-var HEAP_SIZE = 2 * L_CODES + 1;
-/* maximum heap size */
-
-var MAX_BITS = 15;
-/* All codes must not exceed MAX_BITS bits */
-
-var Buf_size = 16;
-/* size of bit buffer in bi_buf */
-
-
-/* ===========================================================================
- * Constants
- */
-
-var MAX_BL_BITS = 7;
-/* Bit length codes must not exceed MAX_BL_BITS bits */
-
-var END_BLOCK = 256;
-/* end of block literal code */
-
-var REP_3_6 = 16;
-/* repeat previous bit length 3-6 times (2 bits of repeat count) */
-
-var REPZ_3_10 = 17;
-/* repeat a zero length 3-10 times (3 bits of repeat count) */
-
-var REPZ_11_138 = 18;
-/* repeat a zero length 11-138 times (7 bits of repeat count) */
-
-/* eslint-disable comma-spacing,array-bracket-spacing */
-var extra_lbits = /* extra bits for each length code */
- [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];
-
-var extra_dbits = /* extra bits for each distance code */
- [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];
-
-var extra_blbits = /* extra bits for each bit length code */
- [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];
-
-var bl_order =
- [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
-/* eslint-enable comma-spacing,array-bracket-spacing */
-
-/* The lengths of the bit length codes are sent in order of decreasing
- * probability, to avoid transmitting the lengths for unused bit length codes.
- */
-
-/* ===========================================================================
- * Local data. These are initialized only once.
- */
-
-// We pre-fill arrays with 0 to avoid uninitialized gaps
-
-var DIST_CODE_LEN = 512; /* see definition of array dist_code below */
-
-// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1
-var static_ltree = new Array((L_CODES + 2) * 2);
-zero(static_ltree);
-/* The static literal tree. Since the bit lengths are imposed, there is no
- * need for the L_CODES extra codes used during heap construction. However
- * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
- * below).
- */
-
-var static_dtree = new Array(D_CODES * 2);
-zero(static_dtree);
-/* The static distance tree. (Actually a trivial tree since all codes use
- * 5 bits.)
- */
-
-var _dist_code = new Array(DIST_CODE_LEN);
-zero(_dist_code);
-/* Distance codes. The first 256 values correspond to the distances
- * 3 .. 258, the last 256 values correspond to the top 8 bits of
- * the 15 bit distances.
- */
-
-var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);
-zero(_length_code);
-/* length code for each normalized match length (0 == MIN_MATCH) */
-
-var base_length = new Array(LENGTH_CODES);
-zero(base_length);
-/* First normalized length for each code (0 = MIN_MATCH) */
-
-var base_dist = new Array(D_CODES);
-zero(base_dist);
-/* First normalized distance for each code (0 = distance of 1) */
-
-
-function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {
-
- this.static_tree = static_tree; /* static tree or NULL */
- this.extra_bits = extra_bits; /* extra bits for each code or NULL */
- this.extra_base = extra_base; /* base index for extra_bits */
- this.elems = elems; /* max number of elements in the tree */
- this.max_length = max_length; /* max bit length for the codes */
-
- // show if `static_tree` has data or dummy - needed for monomorphic objects
- this.has_stree = static_tree && static_tree.length;
-}
-
-
-var static_l_desc;
-var static_d_desc;
-var static_bl_desc;
-
-
-function TreeDesc(dyn_tree, stat_desc) {
- this.dyn_tree = dyn_tree; /* the dynamic tree */
- this.max_code = 0; /* largest code with non zero frequency */
- this.stat_desc = stat_desc; /* the corresponding static tree */
-}
-
-
-
-function d_code(dist) {
- return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];
-}
-
-
-/* ===========================================================================
- * Output a short LSB first on the stream.
- * IN assertion: there is enough room in pendingBuf.
- */
-function put_short(s, w) {
-// put_byte(s, (uch)((w) & 0xff));
-// put_byte(s, (uch)((ush)(w) >> 8));
- s.pending_buf[s.pending++] = (w) & 0xff;
- s.pending_buf[s.pending++] = (w >>> 8) & 0xff;
-}
-
-
-/* ===========================================================================
- * Send a value on a given number of bits.
- * IN assertion: length <= 16 and value fits in length bits.
- */
-function send_bits(s, value, length) {
- if (s.bi_valid > (Buf_size - length)) {
- s.bi_buf |= (value << s.bi_valid) & 0xffff;
- put_short(s, s.bi_buf);
- s.bi_buf = value >> (Buf_size - s.bi_valid);
- s.bi_valid += length - Buf_size;
- } else {
- s.bi_buf |= (value << s.bi_valid) & 0xffff;
- s.bi_valid += length;
- }
-}
-
-
-function send_code(s, c, tree) {
- send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);
-}
-
-
-/* ===========================================================================
- * Reverse the first len bits of a code, using straightforward code (a faster
- * method would use a table)
- * IN assertion: 1 <= len <= 15
- */
-function bi_reverse(code, len) {
- var res = 0;
- do {
- res |= code & 1;
- code >>>= 1;
- res <<= 1;
- } while (--len > 0);
- return res >>> 1;
-}
-
-
-/* ===========================================================================
- * Flush the bit buffer, keeping at most 7 bits in it.
- */
-function bi_flush(s) {
- if (s.bi_valid === 16) {
- put_short(s, s.bi_buf);
- s.bi_buf = 0;
- s.bi_valid = 0;
-
- } else if (s.bi_valid >= 8) {
- s.pending_buf[s.pending++] = s.bi_buf & 0xff;
- s.bi_buf >>= 8;
- s.bi_valid -= 8;
- }
-}
-
-
-/* ===========================================================================
- * Compute the optimal bit lengths for a tree and update the total bit length
- * for the current block.
- * IN assertion: the fields freq and dad are set, heap[heap_max] and
- * above are the tree nodes sorted by increasing frequency.
- * OUT assertions: the field len is set to the optimal bit length, the
- * array bl_count contains the frequencies for each bit length.
- * The length opt_len is updated; static_len is also updated if stree is
- * not null.
- */
-function gen_bitlen(s, desc)
-// deflate_state *s;
-// tree_desc *desc; /* the tree descriptor */
-{
- var tree = desc.dyn_tree;
- var max_code = desc.max_code;
- var stree = desc.stat_desc.static_tree;
- var has_stree = desc.stat_desc.has_stree;
- var extra = desc.stat_desc.extra_bits;
- var base = desc.stat_desc.extra_base;
- var max_length = desc.stat_desc.max_length;
- var h; /* heap index */
- var n, m; /* iterate over the tree elements */
- var bits; /* bit length */
- var xbits; /* extra bits */
- var f; /* frequency */
- var overflow = 0; /* number of elements with bit length too large */
-
- for (bits = 0; bits <= MAX_BITS; bits++) {
- s.bl_count[bits] = 0;
- }
-
- /* In a first pass, compute the optimal bit lengths (which may
- * overflow in the case of the bit length tree).
- */
- tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */
-
- for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {
- n = s.heap[h];
- bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;
- if (bits > max_length) {
- bits = max_length;
- overflow++;
- }
- tree[n * 2 + 1]/*.Len*/ = bits;
- /* We overwrite tree[n].Dad which is no longer needed */
-
- if (n > max_code) { continue; } /* not a leaf node */
-
- s.bl_count[bits]++;
- xbits = 0;
- if (n >= base) {
- xbits = extra[n - base];
- }
- f = tree[n * 2]/*.Freq*/;
- s.opt_len += f * (bits + xbits);
- if (has_stree) {
- s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);
- }
- }
- if (overflow === 0) { return; }
-
- // Trace((stderr,"\nbit length overflow\n"));
- /* This happens for example on obj2 and pic of the Calgary corpus */
-
- /* Find the first bit length which could increase: */
- do {
- bits = max_length - 1;
- while (s.bl_count[bits] === 0) { bits--; }
- s.bl_count[bits]--; /* move one leaf down the tree */
- s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */
- s.bl_count[max_length]--;
- /* The brother of the overflow item also moves one step up,
- * but this does not affect bl_count[max_length]
- */
- overflow -= 2;
- } while (overflow > 0);
-
- /* Now recompute all bit lengths, scanning in increasing frequency.
- * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
- * lengths instead of fixing only the wrong ones. This idea is taken
- * from 'ar' written by Haruhiko Okumura.)
- */
- for (bits = max_length; bits !== 0; bits--) {
- n = s.bl_count[bits];
- while (n !== 0) {
- m = s.heap[--h];
- if (m > max_code) { continue; }
- if (tree[m * 2 + 1]/*.Len*/ !== bits) {
- // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
- s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;
- tree[m * 2 + 1]/*.Len*/ = bits;
- }
- n--;
- }
- }
-}
-
-
-/* ===========================================================================
- * Generate the codes for a given tree and bit counts (which need not be
- * optimal).
- * IN assertion: the array bl_count contains the bit length statistics for
- * the given tree and the field len is set for all tree elements.
- * OUT assertion: the field code is set for all tree elements of non
- * zero code length.
- */
-function gen_codes(tree, max_code, bl_count)
-// ct_data *tree; /* the tree to decorate */
-// int max_code; /* largest code with non zero frequency */
-// ushf *bl_count; /* number of codes at each bit length */
-{
- var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */
- var code = 0; /* running code value */
- var bits; /* bit index */
- var n; /* code index */
-
- /* The distribution counts are first used to generate the code values
- * without bit reversal.
- */
- for (bits = 1; bits <= MAX_BITS; bits++) {
- next_code[bits] = code = (code + bl_count[bits - 1]) << 1;
- }
- /* Check that the bit counts in bl_count are consistent. The last code
- * must be all ones.
- */
- //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
- // "inconsistent bit counts");
- //Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
-
- for (n = 0; n <= max_code; n++) {
- var len = tree[n * 2 + 1]/*.Len*/;
- if (len === 0) { continue; }
- /* Now reverse the bits */
- tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);
-
- //Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
- // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
- }
-}
-
-
-/* ===========================================================================
- * Initialize the various 'constant' tables.
- */
-function tr_static_init() {
- var n; /* iterates over tree elements */
- var bits; /* bit counter */
- var length; /* length value */
- var code; /* code value */
- var dist; /* distance index */
- var bl_count = new Array(MAX_BITS + 1);
- /* number of codes at each bit length for an optimal tree */
-
- // do check in _tr_init()
- //if (static_init_done) return;
-
- /* For some embedded targets, global variables are not initialized: */
-/*#ifdef NO_INIT_GLOBAL_POINTERS
- static_l_desc.static_tree = static_ltree;
- static_l_desc.extra_bits = extra_lbits;
- static_d_desc.static_tree = static_dtree;
- static_d_desc.extra_bits = extra_dbits;
- static_bl_desc.extra_bits = extra_blbits;
-#endif*/
-
- /* Initialize the mapping length (0..255) -> length code (0..28) */
- length = 0;
- for (code = 0; code < LENGTH_CODES - 1; code++) {
- base_length[code] = length;
- for (n = 0; n < (1 << extra_lbits[code]); n++) {
- _length_code[length++] = code;
- }
- }
- //Assert (length == 256, "tr_static_init: length != 256");
- /* Note that the length 255 (match length 258) can be represented
- * in two different ways: code 284 + 5 bits or code 285, so we
- * overwrite length_code[255] to use the best encoding:
- */
- _length_code[length - 1] = code;
-
- /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
- dist = 0;
- for (code = 0; code < 16; code++) {
- base_dist[code] = dist;
- for (n = 0; n < (1 << extra_dbits[code]); n++) {
- _dist_code[dist++] = code;
- }
- }
- //Assert (dist == 256, "tr_static_init: dist != 256");
- dist >>= 7; /* from now on, all distances are divided by 128 */
- for (; code < D_CODES; code++) {
- base_dist[code] = dist << 7;
- for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {
- _dist_code[256 + dist++] = code;
- }
- }
- //Assert (dist == 256, "tr_static_init: 256+dist != 512");
-
- /* Construct the codes of the static literal tree */
- for (bits = 0; bits <= MAX_BITS; bits++) {
- bl_count[bits] = 0;
- }
-
- n = 0;
- while (n <= 143) {
- static_ltree[n * 2 + 1]/*.Len*/ = 8;
- n++;
- bl_count[8]++;
- }
- while (n <= 255) {
- static_ltree[n * 2 + 1]/*.Len*/ = 9;
- n++;
- bl_count[9]++;
- }
- while (n <= 279) {
- static_ltree[n * 2 + 1]/*.Len*/ = 7;
- n++;
- bl_count[7]++;
- }
- while (n <= 287) {
- static_ltree[n * 2 + 1]/*.Len*/ = 8;
- n++;
- bl_count[8]++;
- }
- /* Codes 286 and 287 do not exist, but we must include them in the
- * tree construction to get a canonical Huffman tree (longest code
- * all ones)
- */
- gen_codes(static_ltree, L_CODES + 1, bl_count);
-
- /* The static distance tree is trivial: */
- for (n = 0; n < D_CODES; n++) {
- static_dtree[n * 2 + 1]/*.Len*/ = 5;
- static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);
- }
-
- // Now data ready and we can init static trees
- static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);
- static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);
- static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);
-
- //static_init_done = true;
-}
-
-
-/* ===========================================================================
- * Initialize a new block.
- */
-function init_block(s) {
- var n; /* iterates over tree elements */
-
- /* Initialize the trees. */
- for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }
- for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }
- for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }
-
- s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;
- s.opt_len = s.static_len = 0;
- s.last_lit = s.matches = 0;
-}
-
-
-/* ===========================================================================
- * Flush the bit buffer and align the output on a byte boundary
- */
-function bi_windup(s)
-{
- if (s.bi_valid > 8) {
- put_short(s, s.bi_buf);
- } else if (s.bi_valid > 0) {
- //put_byte(s, (Byte)s->bi_buf);
- s.pending_buf[s.pending++] = s.bi_buf;
- }
- s.bi_buf = 0;
- s.bi_valid = 0;
-}
-
-/* ===========================================================================
- * Copy a stored block, storing first the length and its
- * one's complement if requested.
- */
-function copy_block(s, buf, len, header)
-//DeflateState *s;
-//charf *buf; /* the input data */
-//unsigned len; /* its length */
-//int header; /* true if block header must be written */
-{
- bi_windup(s); /* align on byte boundary */
-
- if (header) {
- put_short(s, len);
- put_short(s, ~len);
- }
-// while (len--) {
-// put_byte(s, *buf++);
-// }
- utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);
- s.pending += len;
-}
-
-/* ===========================================================================
- * Compares to subtrees, using the tree depth as tie breaker when
- * the subtrees have equal frequency. This minimizes the worst case length.
- */
-function smaller(tree, n, m, depth) {
- var _n2 = n * 2;
- var _m2 = m * 2;
- return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||
- (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));
-}
-
-/* ===========================================================================
- * Restore the heap property by moving down the tree starting at node k,
- * exchanging a node with the smallest of its two sons if necessary, stopping
- * when the heap property is re-established (each father smaller than its
- * two sons).
- */
-function pqdownheap(s, tree, k)
-// deflate_state *s;
-// ct_data *tree; /* the tree to restore */
-// int k; /* node to move down */
-{
- var v = s.heap[k];
- var j = k << 1; /* left son of k */
- while (j <= s.heap_len) {
- /* Set j to the smallest of the two sons: */
- if (j < s.heap_len &&
- smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {
- j++;
- }
- /* Exit if v is smaller than both sons */
- if (smaller(tree, v, s.heap[j], s.depth)) { break; }
-
- /* Exchange v with the smallest son */
- s.heap[k] = s.heap[j];
- k = j;
-
- /* And continue down the tree, setting j to the left son of k */
- j <<= 1;
- }
- s.heap[k] = v;
-}
-
-
-// inlined manually
-// var SMALLEST = 1;
-
-/* ===========================================================================
- * Send the block data compressed using the given Huffman trees
- */
-function compress_block(s, ltree, dtree)
-// deflate_state *s;
-// const ct_data *ltree; /* literal tree */
-// const ct_data *dtree; /* distance tree */
-{
- var dist; /* distance of matched string */
- var lc; /* match length or unmatched char (if dist == 0) */
- var lx = 0; /* running index in l_buf */
- var code; /* the code to send */
- var extra; /* number of extra bits to send */
-
- if (s.last_lit !== 0) {
- do {
- dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);
- lc = s.pending_buf[s.l_buf + lx];
- lx++;
-
- if (dist === 0) {
- send_code(s, lc, ltree); /* send a literal byte */
- //Tracecv(isgraph(lc), (stderr," '%c' ", lc));
- } else {
- /* Here, lc is the match length - MIN_MATCH */
- code = _length_code[lc];
- send_code(s, code + LITERALS + 1, ltree); /* send the length code */
- extra = extra_lbits[code];
- if (extra !== 0) {
- lc -= base_length[code];
- send_bits(s, lc, extra); /* send the extra length bits */
- }
- dist--; /* dist is now the match distance - 1 */
- code = d_code(dist);
- //Assert (code < D_CODES, "bad d_code");
-
- send_code(s, code, dtree); /* send the distance code */
- extra = extra_dbits[code];
- if (extra !== 0) {
- dist -= base_dist[code];
- send_bits(s, dist, extra); /* send the extra distance bits */
- }
- } /* literal or match pair ? */
-
- /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
- //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
- // "pendingBuf overflow");
-
- } while (lx < s.last_lit);
- }
-
- send_code(s, END_BLOCK, ltree);
-}
-
-
-/* ===========================================================================
- * Construct one Huffman tree and assigns the code bit strings and lengths.
- * Update the total bit length for the current block.
- * IN assertion: the field freq is set for all tree elements.
- * OUT assertions: the fields len and code are set to the optimal bit length
- * and corresponding code. The length opt_len is updated; static_len is
- * also updated if stree is not null. The field max_code is set.
- */
-function build_tree(s, desc)
-// deflate_state *s;
-// tree_desc *desc; /* the tree descriptor */
-{
- var tree = desc.dyn_tree;
- var stree = desc.stat_desc.static_tree;
- var has_stree = desc.stat_desc.has_stree;
- var elems = desc.stat_desc.elems;
- var n, m; /* iterate over heap elements */
- var max_code = -1; /* largest code with non zero frequency */
- var node; /* new node being created */
-
- /* Construct the initial heap, with least frequent element in
- * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
- * heap[0] is not used.
- */
- s.heap_len = 0;
- s.heap_max = HEAP_SIZE;
-
- for (n = 0; n < elems; n++) {
- if (tree[n * 2]/*.Freq*/ !== 0) {
- s.heap[++s.heap_len] = max_code = n;
- s.depth[n] = 0;
-
- } else {
- tree[n * 2 + 1]/*.Len*/ = 0;
- }
- }
-
- /* The pkzip format requires that at least one distance code exists,
- * and that at least one bit should be sent even if there is only one
- * possible code. So to avoid special checks later on we force at least
- * two codes of non zero frequency.
- */
- while (s.heap_len < 2) {
- node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);
- tree[node * 2]/*.Freq*/ = 1;
- s.depth[node] = 0;
- s.opt_len--;
-
- if (has_stree) {
- s.static_len -= stree[node * 2 + 1]/*.Len*/;
- }
- /* node is 0 or 1 so it does not have extra bits */
- }
- desc.max_code = max_code;
-
- /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
- * establish sub-heaps of increasing lengths:
- */
- for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }
-
- /* Construct the Huffman tree by repeatedly combining the least two
- * frequent nodes.
- */
- node = elems; /* next internal node of the tree */
- do {
- //pqremove(s, tree, n); /* n = node of least frequency */
- /*** pqremove ***/
- n = s.heap[1/*SMALLEST*/];
- s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];
- pqdownheap(s, tree, 1/*SMALLEST*/);
- /***/
-
- m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */
-
- s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */
- s.heap[--s.heap_max] = m;
-
- /* Create a new node father of n and m */
- tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;
- s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;
- tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;
-
- /* and insert the new node in the heap */
- s.heap[1/*SMALLEST*/] = node++;
- pqdownheap(s, tree, 1/*SMALLEST*/);
-
- } while (s.heap_len >= 2);
-
- s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];
-
- /* At this point, the fields freq and dad are set. We can now
- * generate the bit lengths.
- */
- gen_bitlen(s, desc);
-
- /* The field len is now set, we can generate the bit codes */
- gen_codes(tree, max_code, s.bl_count);
-}
-
-
-/* ===========================================================================
- * Scan a literal or distance tree to determine the frequencies of the codes
- * in the bit length tree.
- */
-function scan_tree(s, tree, max_code)
-// deflate_state *s;
-// ct_data *tree; /* the tree to be scanned */
-// int max_code; /* and its largest code of non zero frequency */
-{
- var n; /* iterates over all tree elements */
- var prevlen = -1; /* last emitted length */
- var curlen; /* length of current code */
-
- var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */
-
- var count = 0; /* repeat count of the current code */
- var max_count = 7; /* max repeat count */
- var min_count = 4; /* min repeat count */
-
- if (nextlen === 0) {
- max_count = 138;
- min_count = 3;
- }
- tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */
-
- for (n = 0; n <= max_code; n++) {
- curlen = nextlen;
- nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;
-
- if (++count < max_count && curlen === nextlen) {
- continue;
-
- } else if (count < min_count) {
- s.bl_tree[curlen * 2]/*.Freq*/ += count;
-
- } else if (curlen !== 0) {
-
- if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }
- s.bl_tree[REP_3_6 * 2]/*.Freq*/++;
-
- } else if (count <= 10) {
- s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;
-
- } else {
- s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;
- }
-
- count = 0;
- prevlen = curlen;
-
- if (nextlen === 0) {
- max_count = 138;
- min_count = 3;
-
- } else if (curlen === nextlen) {
- max_count = 6;
- min_count = 3;
-
- } else {
- max_count = 7;
- min_count = 4;
- }
- }
-}
-
-
-/* ===========================================================================
- * Send a literal or distance tree in compressed form, using the codes in
- * bl_tree.
- */
-function send_tree(s, tree, max_code)
-// deflate_state *s;
-// ct_data *tree; /* the tree to be scanned */
-// int max_code; /* and its largest code of non zero frequency */
-{
- var n; /* iterates over all tree elements */
- var prevlen = -1; /* last emitted length */
- var curlen; /* length of current code */
-
- var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */
-
- var count = 0; /* repeat count of the current code */
- var max_count = 7; /* max repeat count */
- var min_count = 4; /* min repeat count */
-
- /* tree[max_code+1].Len = -1; */ /* guard already set */
- if (nextlen === 0) {
- max_count = 138;
- min_count = 3;
- }
-
- for (n = 0; n <= max_code; n++) {
- curlen = nextlen;
- nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;
-
- if (++count < max_count && curlen === nextlen) {
- continue;
-
- } else if (count < min_count) {
- do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);
-
- } else if (curlen !== 0) {
- if (curlen !== prevlen) {
- send_code(s, curlen, s.bl_tree);
- count--;
- }
- //Assert(count >= 3 && count <= 6, " 3_6?");
- send_code(s, REP_3_6, s.bl_tree);
- send_bits(s, count - 3, 2);
-
- } else if (count <= 10) {
- send_code(s, REPZ_3_10, s.bl_tree);
- send_bits(s, count - 3, 3);
-
- } else {
- send_code(s, REPZ_11_138, s.bl_tree);
- send_bits(s, count - 11, 7);
- }
-
- count = 0;
- prevlen = curlen;
- if (nextlen === 0) {
- max_count = 138;
- min_count = 3;
-
- } else if (curlen === nextlen) {
- max_count = 6;
- min_count = 3;
-
- } else {
- max_count = 7;
- min_count = 4;
- }
- }
-}
-
-
-/* ===========================================================================
- * Construct the Huffman tree for the bit lengths and return the index in
- * bl_order of the last bit length code to send.
- */
-function build_bl_tree(s) {
- var max_blindex; /* index of last bit length code of non zero freq */
-
- /* Determine the bit length frequencies for literal and distance trees */
- scan_tree(s, s.dyn_ltree, s.l_desc.max_code);
- scan_tree(s, s.dyn_dtree, s.d_desc.max_code);
-
- /* Build the bit length tree: */
- build_tree(s, s.bl_desc);
- /* opt_len now includes the length of the tree representations, except
- * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
- */
-
- /* Determine the number of bit length codes to send. The pkzip format
- * requires that at least 4 bit length codes be sent. (appnote.txt says
- * 3 but the actual value used is 4.)
- */
- for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {
- if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {
- break;
- }
- }
- /* Update opt_len to include the bit length tree and counts */
- s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;
- //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
- // s->opt_len, s->static_len));
-
- return max_blindex;
-}
-
-
-/* ===========================================================================
- * Send the header for a block using dynamic Huffman trees: the counts, the
- * lengths of the bit length codes, the literal tree and the distance tree.
- * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
- */
-function send_all_trees(s, lcodes, dcodes, blcodes)
-// deflate_state *s;
-// int lcodes, dcodes, blcodes; /* number of codes for each tree */
-{
- var rank; /* index in bl_order */
-
- //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
- //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
- // "too many codes");
- //Tracev((stderr, "\nbl counts: "));
- send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */
- send_bits(s, dcodes - 1, 5);
- send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */
- for (rank = 0; rank < blcodes; rank++) {
- //Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
- send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);
- }
- //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
-
- send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */
- //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
-
- send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */
- //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
-}
-
-
-/* ===========================================================================
- * Check if the data type is TEXT or BINARY, using the following algorithm:
- * - TEXT if the two conditions below are satisfied:
- * a) There are no non-portable control characters belonging to the
- * "black list" (0..6, 14..25, 28..31).
- * b) There is at least one printable character belonging to the
- * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
- * - BINARY otherwise.
- * - The following partially-portable control characters form a
- * "gray list" that is ignored in this detection algorithm:
- * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
- * IN assertion: the fields Freq of dyn_ltree are set.
- */
-function detect_data_type(s) {
- /* black_mask is the bit mask of black-listed bytes
- * set bits 0..6, 14..25, and 28..31
- * 0xf3ffc07f = binary 11110011111111111100000001111111
- */
- var black_mask = 0xf3ffc07f;
- var n;
-
- /* Check for non-textual ("black-listed") bytes. */
- for (n = 0; n <= 31; n++, black_mask >>>= 1) {
- if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {
- return Z_BINARY;
- }
- }
-
- /* Check for textual ("white-listed") bytes. */
- if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||
- s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {
- return Z_TEXT;
- }
- for (n = 32; n < LITERALS; n++) {
- if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {
- return Z_TEXT;
- }
- }
-
- /* There are no "black-listed" or "white-listed" bytes:
- * this stream either is empty or has tolerated ("gray-listed") bytes only.
- */
- return Z_BINARY;
-}
-
-
-var static_init_done = false;
-
-/* ===========================================================================
- * Initialize the tree data structures for a new zlib stream.
- */
-function _tr_init(s)
-{
-
- if (!static_init_done) {
- tr_static_init();
- static_init_done = true;
- }
-
- s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);
- s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);
- s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);
-
- s.bi_buf = 0;
- s.bi_valid = 0;
-
- /* Initialize the first block of the first file: */
- init_block(s);
-}
-
-
-/* ===========================================================================
- * Send a stored block
- */
-function _tr_stored_block(s, buf, stored_len, last)
-//DeflateState *s;
-//charf *buf; /* input block */
-//ulg stored_len; /* length of input block */
-//int last; /* one if this is the last block for a file */
-{
- send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */
- copy_block(s, buf, stored_len, true); /* with header */
-}
-
-
-/* ===========================================================================
- * Send one empty static block to give enough lookahead for inflate.
- * This takes 10 bits, of which 7 may remain in the bit buffer.
- */
-function _tr_align(s) {
- send_bits(s, STATIC_TREES << 1, 3);
- send_code(s, END_BLOCK, static_ltree);
- bi_flush(s);
-}
-
-
-/* ===========================================================================
- * Determine the best encoding for the current block: dynamic trees, static
- * trees or store, and output the encoded block to the zip file.
- */
-function _tr_flush_block(s, buf, stored_len, last)
-//DeflateState *s;
-//charf *buf; /* input block, or NULL if too old */
-//ulg stored_len; /* length of input block */
-//int last; /* one if this is the last block for a file */
-{
- var opt_lenb, static_lenb; /* opt_len and static_len in bytes */
- var max_blindex = 0; /* index of last bit length code of non zero freq */
-
- /* Build the Huffman trees unless a stored block is forced */
- if (s.level > 0) {
-
- /* Check if the file is binary or text */
- if (s.strm.data_type === Z_UNKNOWN) {
- s.strm.data_type = detect_data_type(s);
- }
-
- /* Construct the literal and distance trees */
- build_tree(s, s.l_desc);
- // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
- // s->static_len));
-
- build_tree(s, s.d_desc);
- // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
- // s->static_len));
- /* At this point, opt_len and static_len are the total bit lengths of
- * the compressed block data, excluding the tree representations.
- */
-
- /* Build the bit length tree for the above two trees, and get the index
- * in bl_order of the last bit length code to send.
- */
- max_blindex = build_bl_tree(s);
-
- /* Determine the best encoding. Compute the block lengths in bytes. */
- opt_lenb = (s.opt_len + 3 + 7) >>> 3;
- static_lenb = (s.static_len + 3 + 7) >>> 3;
-
- // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
- // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
- // s->last_lit));
-
- if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }
-
- } else {
- // Assert(buf != (char*)0, "lost buf");
- opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
- }
-
- if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {
- /* 4: two words for the lengths */
-
- /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
- * Otherwise we can't have processed more than WSIZE input bytes since
- * the last block flush, because compression would have been
- * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
- * transform a block into a stored block.
- */
- _tr_stored_block(s, buf, stored_len, last);
-
- } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {
-
- send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);
- compress_block(s, static_ltree, static_dtree);
-
- } else {
- send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);
- send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);
- compress_block(s, s.dyn_ltree, s.dyn_dtree);
- }
- // Assert (s->compressed_len == s->bits_sent, "bad compressed size");
- /* The above check is made mod 2^32, for files larger than 512 MB
- * and uLong implemented on 32 bits.
- */
- init_block(s);
-
- if (last) {
- bi_windup(s);
- }
- // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
- // s->compressed_len-7*last));
-}
-
-/* ===========================================================================
- * Save the match info and tally the frequency counts. Return true if
- * the current block must be flushed.
- */
-function _tr_tally(s, dist, lc)
-// deflate_state *s;
-// unsigned dist; /* distance of matched string */
-// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
-{
- //var out_length, in_length, dcode;
-
- s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;
- s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;
-
- s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;
- s.last_lit++;
-
- if (dist === 0) {
- /* lc is the unmatched char */
- s.dyn_ltree[lc * 2]/*.Freq*/++;
- } else {
- s.matches++;
- /* Here, lc is the match length - MIN_MATCH */
- dist--; /* dist = match distance - 1 */
- //Assert((ush)dist < (ush)MAX_DIST(s) &&
- // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
- // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
-
- s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;
- s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
- }
-
-// (!) This block is disabled in zlib defaults,
-// don't enable it for binary compatibility
-
-//#ifdef TRUNCATE_BLOCK
-// /* Try to guess if it is profitable to stop the current block here */
-// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {
-// /* Compute an upper bound for the compressed length */
-// out_length = s.last_lit*8;
-// in_length = s.strstart - s.block_start;
-//
-// for (dcode = 0; dcode < D_CODES; dcode++) {
-// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);
-// }
-// out_length >>>= 3;
-// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
-// // s->last_lit, in_length, out_length,
-// // 100L - out_length*100L/in_length));
-// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {
-// return true;
-// }
-// }
-//#endif
-
- return (s.last_lit === s.lit_bufsize - 1);
- /* We avoid equality with lit_bufsize because of wraparound at 64K
- * on 16 bit machines and because stored blocks are restricted to
- * 64K-1 bytes.
- */
-}
-
-exports._tr_init = _tr_init;
-exports._tr_stored_block = _tr_stored_block;
-exports._tr_flush_block = _tr_flush_block;
-exports._tr_tally = _tr_tally;
-exports._tr_align = _tr_align;
-
-},{"../utils/common":3}],15:[function(require,module,exports){
-'use strict';
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-function ZStream() {
- /* next input byte */
- this.input = null; // JS specific, because we have no pointers
- this.next_in = 0;
- /* number of bytes available at input */
- this.avail_in = 0;
- /* total number of input bytes read so far */
- this.total_in = 0;
- /* next output byte should be put there */
- this.output = null; // JS specific, because we have no pointers
- this.next_out = 0;
- /* remaining free space at output */
- this.avail_out = 0;
- /* total number of bytes output so far */
- this.total_out = 0;
- /* last error message, NULL if no error */
- this.msg = ''/*Z_NULL*/;
- /* not visible by applications */
- this.state = null;
- /* best guess about the data type: binary or text */
- this.data_type = 2/*Z_UNKNOWN*/;
- /* adler32 value of the uncompressed data */
- this.adler = 0;
-}
-
-module.exports = ZStream;
-
-},{}],"/":[function(require,module,exports){
-// Top level file is just a mixin of submodules & constants
-'use strict';
-
-var assign = require('./lib/utils/common').assign;
-
-var deflate = require('./lib/deflate');
-var inflate = require('./lib/inflate');
-var constants = require('./lib/zlib/constants');
-
-var pako = {};
-
-assign(pako, deflate, inflate, constants);
-
-module.exports = pako;
-
-},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")
-}); \ No newline at end of file
diff --git a/debian/missing-sources/perfect-scrollbar-0.6.15.js b/debian/missing-sources/perfect-scrollbar-0.6.15.js
deleted file mode 100644
index 0eb1c879..00000000
--- a/debian/missing-sources/perfect-scrollbar-0.6.15.js
+++ /dev/null
@@ -1,1552 +0,0 @@
-/* perfect-scrollbar v0.6.15 */
-(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
-'use strict';
-
-var ps = require('../main');
-
-if (typeof define === 'function' && define.amd) {
- // AMD
- define(ps);
-} else {
- // Add to a global object.
- window.PerfectScrollbar = ps;
- if (typeof window.Ps === 'undefined') {
- window.Ps = ps;
- }
-}
-
-},{"../main":7}],2:[function(require,module,exports){
-'use strict';
-
-function oldAdd(element, className) {
- var classes = element.className.split(' ');
- if (classes.indexOf(className) < 0) {
- classes.push(className);
- }
- element.className = classes.join(' ');
-}
-
-function oldRemove(element, className) {
- var classes = element.className.split(' ');
- var idx = classes.indexOf(className);
- if (idx >= 0) {
- classes.splice(idx, 1);
- }
- element.className = classes.join(' ');
-}
-
-exports.add = function (element, className) {
- if (element.classList) {
- element.classList.add(className);
- } else {
- oldAdd(element, className);
- }
-};
-
-exports.remove = function (element, className) {
- if (element.classList) {
- element.classList.remove(className);
- } else {
- oldRemove(element, className);
- }
-};
-
-exports.list = function (element) {
- if (element.classList) {
- return Array.prototype.slice.apply(element.classList);
- } else {
- return element.className.split(' ');
- }
-};
-
-},{}],3:[function(require,module,exports){
-'use strict';
-
-var DOM = {};
-
-DOM.e = function (tagName, className) {
- var element = document.createElement(tagName);
- element.className = className;
- return element;
-};
-
-DOM.appendTo = function (child, parent) {
- parent.appendChild(child);
- return child;
-};
-
-function cssGet(element, styleName) {
- return window.getComputedStyle(element)[styleName];
-}
-
-function cssSet(element, styleName, styleValue) {
- if (typeof styleValue === 'number') {
- styleValue = styleValue.toString() + 'px';
- }
- element.style[styleName] = styleValue;
- return element;
-}
-
-function cssMultiSet(element, obj) {
- for (var key in obj) {
- var val = obj[key];
- if (typeof val === 'number') {
- val = val.toString() + 'px';
- }
- element.style[key] = val;
- }
- return element;
-}
-
-DOM.css = function (element, styleNameOrObject, styleValue) {
- if (typeof styleNameOrObject === 'object') {
- // multiple set with object
- return cssMultiSet(element, styleNameOrObject);
- } else {
- if (typeof styleValue === 'undefined') {
- return cssGet(element, styleNameOrObject);
- } else {
- return cssSet(element, styleNameOrObject, styleValue);
- }
- }
-};
-
-DOM.matches = function (element, query) {
- if (typeof element.matches !== 'undefined') {
- return element.matches(query);
- } else {
- if (typeof element.matchesSelector !== 'undefined') {
- return element.matchesSelector(query);
- } else if (typeof element.webkitMatchesSelector !== 'undefined') {
- return element.webkitMatchesSelector(query);
- } else if (typeof element.mozMatchesSelector !== 'undefined') {
- return element.mozMatchesSelector(query);
- } else if (typeof element.msMatchesSelector !== 'undefined') {
- return element.msMatchesSelector(query);
- }
- }
-};
-
-DOM.remove = function (element) {
- if (typeof element.remove !== 'undefined') {
- element.remove();
- } else {
- if (element.parentNode) {
- element.parentNode.removeChild(element);
- }
- }
-};
-
-DOM.queryChildren = function (element, selector) {
- return Array.prototype.filter.call(element.childNodes, function (child) {
- return DOM.matches(child, selector);
- });
-};
-
-module.exports = DOM;
-
-},{}],4:[function(require,module,exports){
-'use strict';
-
-var EventElement = function (element) {
- this.element = element;
- this.events = {};
-};
-
-EventElement.prototype.bind = function (eventName, handler) {
- if (typeof this.events[eventName] === 'undefined') {
- this.events[eventName] = [];
- }
- this.events[eventName].push(handler);
- this.element.addEventListener(eventName, handler, false);
-};
-
-EventElement.prototype.unbind = function (eventName, handler) {
- var isHandlerProvided = (typeof handler !== 'undefined');
- this.events[eventName] = this.events[eventName].filter(function (hdlr) {
- if (isHandlerProvided && hdlr !== handler) {
- return true;
- }
- this.element.removeEventListener(eventName, hdlr, false);
- return false;
- }, this);
-};
-
-EventElement.prototype.unbindAll = function () {
- for (var name in this.events) {
- this.unbind(name);
- }
-};
-
-var EventManager = function () {
- this.eventElements = [];
-};
-
-EventManager.prototype.eventElement = function (element) {
- var ee = this.eventElements.filter(function (eventElement) {
- return eventElement.element === element;
- })[0];
- if (typeof ee === 'undefined') {
- ee = new EventElement(element);
- this.eventElements.push(ee);
- }
- return ee;
-};
-
-EventManager.prototype.bind = function (element, eventName, handler) {
- this.eventElement(element).bind(eventName, handler);
-};
-
-EventManager.prototype.unbind = function (element, eventName, handler) {
- this.eventElement(element).unbind(eventName, handler);
-};
-
-EventManager.prototype.unbindAll = function () {
- for (var i = 0; i < this.eventElements.length; i++) {
- this.eventElements[i].unbindAll();
- }
-};
-
-EventManager.prototype.once = function (element, eventName, handler) {
- var ee = this.eventElement(element);
- var onceHandler = function (e) {
- ee.unbind(eventName, onceHandler);
- handler(e);
- };
- ee.bind(eventName, onceHandler);
-};
-
-module.exports = EventManager;
-
-},{}],5:[function(require,module,exports){
-'use strict';
-
-module.exports = (function () {
- function s4() {
- return Math.floor((1 + Math.random()) * 0x10000)
- .toString(16)
- .substring(1);
- }
- return function () {
- return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
- s4() + '-' + s4() + s4() + s4();
- };
-})();
-
-},{}],6:[function(require,module,exports){
-'use strict';
-
-var cls = require('./class');
-var dom = require('./dom');
-
-var toInt = exports.toInt = function (x) {
- return parseInt(x, 10) || 0;
-};
-
-var clone = exports.clone = function (obj) {
- if (!obj) {
- return null;
- } else if (obj.constructor === Array) {
- return obj.map(clone);
- } else if (typeof obj === 'object') {
- var result = {};
- for (var key in obj) {
- result[key] = clone(obj[key]);
- }
- return result;
- } else {
- return obj;
- }
-};
-
-exports.extend = function (original, source) {
- var result = clone(original);
- for (var key in source) {
- result[key] = clone(source[key]);
- }
- return result;
-};
-
-exports.isEditable = function (el) {
- return dom.matches(el, "input,[contenteditable]") ||
- dom.matches(el, "select,[contenteditable]") ||
- dom.matches(el, "textarea,[contenteditable]") ||
- dom.matches(el, "button,[contenteditable]");
-};
-
-exports.removePsClasses = function (element) {
- var clsList = cls.list(element);
- for (var i = 0; i < clsList.length; i++) {
- var className = clsList[i];
- if (className.indexOf('ps-') === 0) {
- cls.remove(element, className);
- }
- }
-};
-
-exports.outerWidth = function (element) {
- return toInt(dom.css(element, 'width')) +
- toInt(dom.css(element, 'paddingLeft')) +
- toInt(dom.css(element, 'paddingRight')) +
- toInt(dom.css(element, 'borderLeftWidth')) +
- toInt(dom.css(element, 'borderRightWidth'));
-};
-
-exports.startScrolling = function (element, axis) {
- cls.add(element, 'ps-in-scrolling');
- if (typeof axis !== 'undefined') {
- cls.add(element, 'ps-' + axis);
- } else {
- cls.add(element, 'ps-x');
- cls.add(element, 'ps-y');
- }
-};
-
-exports.stopScrolling = function (element, axis) {
- cls.remove(element, 'ps-in-scrolling');
- if (typeof axis !== 'undefined') {
- cls.remove(element, 'ps-' + axis);
- } else {
- cls.remove(element, 'ps-x');
- cls.remove(element, 'ps-y');
- }
-};
-
-exports.env = {
- isWebKit: 'WebkitAppearance' in document.documentElement.style,
- supportsTouch: (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch),
- supportsIePointer: window.navigator.msMaxTouchPoints !== null
-};
-
-},{"./class":2,"./dom":3}],7:[function(require,module,exports){
-'use strict';
-
-var destroy = require('./plugin/destroy');
-var initialize = require('./plugin/initialize');
-var update = require('./plugin/update');
-
-module.exports = {
- initialize: initialize,
- update: update,
- destroy: destroy
-};
-
-},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(require,module,exports){
-'use strict';
-
-module.exports = {
- handlers: ['click-rail', 'drag-scrollbar', 'keyboard', 'wheel', 'touch'],
- maxScrollbarLength: null,
- minScrollbarLength: null,
- scrollXMarginOffset: 0,
- scrollYMarginOffset: 0,
- suppressScrollX: false,
- suppressScrollY: false,
- swipePropagation: true,
- useBothWheelAxes: false,
- wheelPropagation: false,
- wheelSpeed: 1,
- theme: 'default'
-};
-
-},{}],9:[function(require,module,exports){
-'use strict';
-
-var _ = require('../lib/helper');
-var dom = require('../lib/dom');
-var instances = require('./instances');
-
-module.exports = function (element) {
- var i = instances.get(element);
-
- if (!i) {
- return;
- }
-
- i.event.unbindAll();
- dom.remove(i.scrollbarX);
- dom.remove(i.scrollbarY);
- dom.remove(i.scrollbarXRail);
- dom.remove(i.scrollbarYRail);
- _.removePsClasses(element);
-
- instances.remove(element);
-};
-
-},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(require,module,exports){
-'use strict';
-
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-var updateScroll = require('../update-scroll');
-
-function bindClickRailHandler(element, i) {
- function pageOffset(el) {
- return el.getBoundingClientRect();
- }
- var stopPropagation = function (e) { e.stopPropagation(); };
-
- i.event.bind(i.scrollbarY, 'click', stopPropagation);
- i.event.bind(i.scrollbarYRail, 'click', function (e) {
- var positionTop = e.pageY - window.pageYOffset - pageOffset(i.scrollbarYRail).top;
- var direction = positionTop > i.scrollbarYTop ? 1 : -1;
-
- updateScroll(element, 'top', element.scrollTop + direction * i.containerHeight);
- updateGeometry(element);
-
- e.stopPropagation();
- });
-
- i.event.bind(i.scrollbarX, 'click', stopPropagation);
- i.event.bind(i.scrollbarXRail, 'click', function (e) {
- var positionLeft = e.pageX - window.pageXOffset - pageOffset(i.scrollbarXRail).left;
- var direction = positionLeft > i.scrollbarXLeft ? 1 : -1;
-
- updateScroll(element, 'left', element.scrollLeft + direction * i.containerWidth);
- updateGeometry(element);
-
- e.stopPropagation();
- });
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
- bindClickRailHandler(element, i);
-};
-
-},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(require,module,exports){
-'use strict';
-
-var _ = require('../../lib/helper');
-var dom = require('../../lib/dom');
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-var updateScroll = require('../update-scroll');
-
-function bindMouseScrollXHandler(element, i) {
- var currentLeft = null;
- var currentPageX = null;
-
- function updateScrollLeft(deltaX) {
- var newLeft = currentLeft + (deltaX * i.railXRatio);
- var maxLeft = Math.max(0, i.scrollbarXRail.getBoundingClientRect().left) + (i.railXRatio * (i.railXWidth - i.scrollbarXWidth));
-
- if (newLeft < 0) {
- i.scrollbarXLeft = 0;
- } else if (newLeft > maxLeft) {
- i.scrollbarXLeft = maxLeft;
- } else {
- i.scrollbarXLeft = newLeft;
- }
-
- var scrollLeft = _.toInt(i.scrollbarXLeft * (i.contentWidth - i.containerWidth) / (i.containerWidth - (i.railXRatio * i.scrollbarXWidth))) - i.negativeScrollAdjustment;
- updateScroll(element, 'left', scrollLeft);
- }
-
- var mouseMoveHandler = function (e) {
- updateScrollLeft(e.pageX - currentPageX);
- updateGeometry(element);
- e.stopPropagation();
- e.preventDefault();
- };
-
- var mouseUpHandler = function () {
- _.stopScrolling(element, 'x');
- i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);
- };
-
- i.event.bind(i.scrollbarX, 'mousedown', function (e) {
- currentPageX = e.pageX;
- currentLeft = _.toInt(dom.css(i.scrollbarX, 'left')) * i.railXRatio;
- _.startScrolling(element, 'x');
-
- i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);
- i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);
-
- e.stopPropagation();
- e.preventDefault();
- });
-}
-
-function bindMouseScrollYHandler(element, i) {
- var currentTop = null;
- var currentPageY = null;
-
- function updateScrollTop(deltaY) {
- var newTop = currentTop + (deltaY * i.railYRatio);
- var maxTop = Math.max(0, i.scrollbarYRail.getBoundingClientRect().top) + (i.railYRatio * (i.railYHeight - i.scrollbarYHeight));
-
- if (newTop < 0) {
- i.scrollbarYTop = 0;
- } else if (newTop > maxTop) {
- i.scrollbarYTop = maxTop;
- } else {
- i.scrollbarYTop = newTop;
- }
-
- var scrollTop = _.toInt(i.scrollbarYTop * (i.contentHeight - i.containerHeight) / (i.containerHeight - (i.railYRatio * i.scrollbarYHeight)));
- updateScroll(element, 'top', scrollTop);
- }
-
- var mouseMoveHandler = function (e) {
- updateScrollTop(e.pageY - currentPageY);
- updateGeometry(element);
- e.stopPropagation();
- e.preventDefault();
- };
-
- var mouseUpHandler = function () {
- _.stopScrolling(element, 'y');
- i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);
- };
-
- i.event.bind(i.scrollbarY, 'mousedown', function (e) {
- currentPageY = e.pageY;
- currentTop = _.toInt(dom.css(i.scrollbarY, 'top')) * i.railYRatio;
- _.startScrolling(element, 'y');
-
- i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);
- i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);
-
- e.stopPropagation();
- e.preventDefault();
- });
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
- bindMouseScrollXHandler(element, i);
- bindMouseScrollYHandler(element, i);
-};
-
-},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(require,module,exports){
-'use strict';
-
-var _ = require('../../lib/helper');
-var dom = require('../../lib/dom');
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-var updateScroll = require('../update-scroll');
-
-function bindKeyboardHandler(element, i) {
- var hovered = false;
- i.event.bind(element, 'mouseenter', function () {
- hovered = true;
- });
- i.event.bind(element, 'mouseleave', function () {
- hovered = false;
- });
-
- var shouldPrevent = false;
- function shouldPreventDefault(deltaX, deltaY) {
- var scrollTop = element.scrollTop;
- if (deltaX === 0) {
- if (!i.scrollbarYActive) {
- return false;
- }
- if ((scrollTop === 0 && deltaY > 0) || (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)) {
- return !i.settings.wheelPropagation;
- }
- }
-
- var scrollLeft = element.scrollLeft;
- if (deltaY === 0) {
- if (!i.scrollbarXActive) {
- return false;
- }
- if ((scrollLeft === 0 && deltaX < 0) || (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)) {
- return !i.settings.wheelPropagation;
- }
- }
- return true;
- }
-
- i.event.bind(i.ownerDocument, 'keydown', function (e) {
- if ((e.isDefaultPrevented && e.isDefaultPrevented()) || e.defaultPrevented) {
- return;
- }
-
- var focused = dom.matches(i.scrollbarX, ':focus') ||
- dom.matches(i.scrollbarY, ':focus');
-
- if (!hovered && !focused) {
- return;
- }
-
- var activeElement = document.activeElement ? document.activeElement : i.ownerDocument.activeElement;
- if (activeElement) {
- if (activeElement.tagName === 'IFRAME') {
- activeElement = activeElement.contentDocument.activeElement;
- } else {
- // go deeper if element is a webcomponent
- while (activeElement.shadowRoot) {
- activeElement = activeElement.shadowRoot.activeElement;
- }
- }
- if (_.isEditable(activeElement)) {
- return;
- }
- }
-
- var deltaX = 0;
- var deltaY = 0;
-
- switch (e.which) {
- case 37: // left
- if (e.metaKey) {
- deltaX = -i.contentWidth;
- } else if (e.altKey) {
- deltaX = -i.containerWidth;
- } else {
- deltaX = -30;
- }
- break;
- case 38: // up
- if (e.metaKey) {
- deltaY = i.contentHeight;
- } else if (e.altKey) {
- deltaY = i.containerHeight;
- } else {
- deltaY = 30;
- }
- break;
- case 39: // right
- if (e.metaKey) {
- deltaX = i.contentWidth;
- } else if (e.altKey) {
- deltaX = i.containerWidth;
- } else {
- deltaX = 30;
- }
- break;
- case 40: // down
- if (e.metaKey) {
- deltaY = -i.contentHeight;
- } else if (e.altKey) {
- deltaY = -i.containerHeight;
- } else {
- deltaY = -30;
- }
- break;
- case 33: // page up
- deltaY = 90;
- break;
- case 32: // space bar
- if (e.shiftKey) {
- deltaY = 90;
- } else {
- deltaY = -90;
- }
- break;
- case 34: // page down
- deltaY = -90;
- break;
- case 35: // end
- if (e.ctrlKey) {
- deltaY = -i.contentHeight;
- } else {
- deltaY = -i.containerHeight;
- }
- break;
- case 36: // home
- if (e.ctrlKey) {
- deltaY = element.scrollTop;
- } else {
- deltaY = i.containerHeight;
- }
- break;
- default:
- return;
- }
-
- updateScroll(element, 'top', element.scrollTop - deltaY);
- updateScroll(element, 'left', element.scrollLeft + deltaX);
- updateGeometry(element);
-
- shouldPrevent = shouldPreventDefault(deltaX, deltaY);
- if (shouldPrevent) {
- e.preventDefault();
- }
- });
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
- bindKeyboardHandler(element, i);
-};
-
-},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(require,module,exports){
-'use strict';
-
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-var updateScroll = require('../update-scroll');
-
-function bindMouseWheelHandler(element, i) {
- var shouldPrevent = false;
-
- function shouldPreventDefault(deltaX, deltaY) {
- var scrollTop = element.scrollTop;
- if (deltaX === 0) {
- if (!i.scrollbarYActive) {
- return false;
- }
- if ((scrollTop === 0 && deltaY > 0) || (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)) {
- return !i.settings.wheelPropagation;
- }
- }
-
- var scrollLeft = element.scrollLeft;
- if (deltaY === 0) {
- if (!i.scrollbarXActive) {
- return false;
- }
- if ((scrollLeft === 0 && deltaX < 0) || (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)) {
- return !i.settings.wheelPropagation;
- }
- }
- return true;
- }
-
- function getDeltaFromEvent(e) {
- var deltaX = e.deltaX;
- var deltaY = -1 * e.deltaY;
-
- if (typeof deltaX === "undefined" || typeof deltaY === "undefined") {
- // OS X Safari
- deltaX = -1 * e.wheelDeltaX / 6;
- deltaY = e.wheelDeltaY / 6;
- }
-
- if (e.deltaMode && e.deltaMode === 1) {
- // Firefox in deltaMode 1: Line scrolling
- deltaX *= 10;
- deltaY *= 10;
- }
-
- if (deltaX !== deltaX && deltaY !== deltaY/* NaN checks */) {
- // IE in some mouse drivers
- deltaX = 0;
- deltaY = e.wheelDelta;
- }
-
- if (e.shiftKey) {
- // reverse axis with shift key
- return [-deltaY, -deltaX];
- }
- return [deltaX, deltaY];
- }
-
- function shouldBeConsumedByChild(deltaX, deltaY) {
- var child = element.querySelector('textarea:hover, select[multiple]:hover, .ps-child:hover');
- if (child) {
- if (!window.getComputedStyle(child).overflow.match(/(scroll|auto)/)) {
- // if not scrollable
- return false;
- }
-
- var maxScrollTop = child.scrollHeight - child.clientHeight;
- if (maxScrollTop > 0) {
- if (!(child.scrollTop === 0 && deltaY > 0) && !(child.scrollTop === maxScrollTop && deltaY < 0)) {
- return true;
- }
- }
- var maxScrollLeft = child.scrollLeft - child.clientWidth;
- if (maxScrollLeft > 0) {
- if (!(child.scrollLeft === 0 && deltaX < 0) && !(child.scrollLeft === maxScrollLeft && deltaX > 0)) {
- return true;
- }
- }
- }
- return false;
- }
-
- function mousewheelHandler(e) {
- var delta = getDeltaFromEvent(e);
-
- var deltaX = delta[0];
- var deltaY = delta[1];
-
- if (shouldBeConsumedByChild(deltaX, deltaY)) {
- return;
- }
-
- shouldPrevent = false;
- if (!i.settings.useBothWheelAxes) {
- // deltaX will only be used for horizontal scrolling and deltaY will
- // only be used for vertical scrolling - this is the default
- updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed));
- updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed));
- } else if (i.scrollbarYActive && !i.scrollbarXActive) {
- // only vertical scrollbar is active and useBothWheelAxes option is
- // active, so let's scroll vertical bar using both mouse wheel axes
- if (deltaY) {
- updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed));
- } else {
- updateScroll(element, 'top', element.scrollTop + (deltaX * i.settings.wheelSpeed));
- }
- shouldPrevent = true;
- } else if (i.scrollbarXActive && !i.scrollbarYActive) {
- // useBothWheelAxes and only horizontal bar is active, so use both
- // wheel axes for horizontal bar
- if (deltaX) {
- updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed));
- } else {
- updateScroll(element, 'left', element.scrollLeft - (deltaY * i.settings.wheelSpeed));
- }
- shouldPrevent = true;
- }
-
- updateGeometry(element);
-
- shouldPrevent = (shouldPrevent || shouldPreventDefault(deltaX, deltaY));
- if (shouldPrevent) {
- e.stopPropagation();
- e.preventDefault();
- }
- }
-
- if (typeof window.onwheel !== "undefined") {
- i.event.bind(element, 'wheel', mousewheelHandler);
- } else if (typeof window.onmousewheel !== "undefined") {
- i.event.bind(element, 'mousewheel', mousewheelHandler);
- }
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
- bindMouseWheelHandler(element, i);
-};
-
-},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(require,module,exports){
-'use strict';
-
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-
-function bindNativeScrollHandler(element, i) {
- i.event.bind(element, 'scroll', function () {
- updateGeometry(element);
- });
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
- bindNativeScrollHandler(element, i);
-};
-
-},{"../instances":18,"../update-geometry":19}],15:[function(require,module,exports){
-'use strict';
-
-var _ = require('../../lib/helper');
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-var updateScroll = require('../update-scroll');
-
-function bindSelectionHandler(element, i) {
- function getRangeNode() {
- var selection = window.getSelection ? window.getSelection() :
- document.getSelection ? document.getSelection() : '';
- if (selection.toString().length === 0) {
- return null;
- } else {
- return selection.getRangeAt(0).commonAncestorContainer;
- }
- }
-
- var scrollingLoop = null;
- var scrollDiff = {top: 0, left: 0};
- function startScrolling() {
- if (!scrollingLoop) {
- scrollingLoop = setInterval(function () {
- if (!instances.get(element)) {
- clearInterval(scrollingLoop);
- return;
- }
-
- updateScroll(element, 'top', element.scrollTop + scrollDiff.top);
- updateScroll(element, 'left', element.scrollLeft + scrollDiff.left);
- updateGeometry(element);
- }, 50); // every .1 sec
- }
- }
- function stopScrolling() {
- if (scrollingLoop) {
- clearInterval(scrollingLoop);
- scrollingLoop = null;
- }
- _.stopScrolling(element);
- }
-
- var isSelected = false;
- i.event.bind(i.ownerDocument, 'selectionchange', function () {
- if (element.contains(getRangeNode())) {
- isSelected = true;
- } else {
- isSelected = false;
- stopScrolling();
- }
- });
- i.event.bind(window, 'mouseup', function () {
- if (isSelected) {
- isSelected = false;
- stopScrolling();
- }
- });
- i.event.bind(window, 'keyup', function () {
- if (isSelected) {
- isSelected = false;
- stopScrolling();
- }
- });
-
- i.event.bind(window, 'mousemove', function (e) {
- if (isSelected) {
- var mousePosition = {x: e.pageX, y: e.pageY};
- var containerGeometry = {
- left: element.offsetLeft,
- right: element.offsetLeft + element.offsetWidth,
- top: element.offsetTop,
- bottom: element.offsetTop + element.offsetHeight
- };
-
- if (mousePosition.x < containerGeometry.left + 3) {
- scrollDiff.left = -5;
- _.startScrolling(element, 'x');
- } else if (mousePosition.x > containerGeometry.right - 3) {
- scrollDiff.left = 5;
- _.startScrolling(element, 'x');
- } else {
- scrollDiff.left = 0;
- }
-
- if (mousePosition.y < containerGeometry.top + 3) {
- if (containerGeometry.top + 3 - mousePosition.y < 5) {
- scrollDiff.top = -5;
- } else {
- scrollDiff.top = -20;
- }
- _.startScrolling(element, 'y');
- } else if (mousePosition.y > containerGeometry.bottom - 3) {
- if (mousePosition.y - containerGeometry.bottom + 3 < 5) {
- scrollDiff.top = 5;
- } else {
- scrollDiff.top = 20;
- }
- _.startScrolling(element, 'y');
- } else {
- scrollDiff.top = 0;
- }
-
- if (scrollDiff.top === 0 && scrollDiff.left === 0) {
- stopScrolling();
- } else {
- startScrolling();
- }
- }
- });
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
- bindSelectionHandler(element, i);
-};
-
-},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(require,module,exports){
-'use strict';
-
-var _ = require('../../lib/helper');
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-var updateScroll = require('../update-scroll');
-
-function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
- function shouldPreventDefault(deltaX, deltaY) {
- var scrollTop = element.scrollTop;
- var scrollLeft = element.scrollLeft;
- var magnitudeX = Math.abs(deltaX);
- var magnitudeY = Math.abs(deltaY);
-
- if (magnitudeY > magnitudeX) {
- // user is perhaps trying to swipe up/down the page
-
- if (((deltaY < 0) && (scrollTop === i.contentHeight - i.containerHeight)) ||
- ((deltaY > 0) && (scrollTop === 0))) {
- return !i.settings.swipePropagation;
- }
- } else if (magnitudeX > magnitudeY) {
- // user is perhaps trying to swipe left/right across the page
-
- if (((deltaX < 0) && (scrollLeft === i.contentWidth - i.containerWidth)) ||
- ((deltaX > 0) && (scrollLeft === 0))) {
- return !i.settings.swipePropagation;
- }
- }
-
- return true;
- }
-
- function applyTouchMove(differenceX, differenceY) {
- updateScroll(element, 'top', element.scrollTop - differenceY);
- updateScroll(element, 'left', element.scrollLeft - differenceX);
-
- updateGeometry(element);
- }
-
- var startOffset = {};
- var startTime = 0;
- var speed = {};
- var easingLoop = null;
- var inGlobalTouch = false;
- var inLocalTouch = false;
-
- function globalTouchStart() {
- inGlobalTouch = true;
- }
- function globalTouchEnd() {
- inGlobalTouch = false;
- }
-
- function getTouch(e) {
- if (e.targetTouches) {
- return e.targetTouches[0];
- } else {
- // Maybe IE pointer
- return e;
- }
- }
- function shouldHandle(e) {
- if (e.targetTouches && e.targetTouches.length === 1) {
- return true;
- }
- if (e.pointerType && e.pointerType !== 'mouse' && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) {
- return true;
- }
- return false;
- }
- function touchStart(e) {
- if (shouldHandle(e)) {
- inLocalTouch = true;
-
- var touch = getTouch(e);
-
- startOffset.pageX = touch.pageX;
- startOffset.pageY = touch.pageY;
-
- startTime = (new Date()).getTime();
-
- if (easingLoop !== null) {
- clearInterval(easingLoop);
- }
-
- e.stopPropagation();
- }
- }
- function touchMove(e) {
- if (!inLocalTouch && i.settings.swipePropagation) {
- touchStart(e);
- }
- if (!inGlobalTouch && inLocalTouch && shouldHandle(e)) {
- var touch = getTouch(e);
-
- var currentOffset = {pageX: touch.pageX, pageY: touch.pageY};
-
- var differenceX = currentOffset.pageX - startOffset.pageX;
- var differenceY = currentOffset.pageY - startOffset.pageY;
-
- applyTouchMove(differenceX, differenceY);
- startOffset = currentOffset;
-
- var currentTime = (new Date()).getTime();
-
- var timeGap = currentTime - startTime;
- if (timeGap > 0) {
- speed.x = differenceX / timeGap;
- speed.y = differenceY / timeGap;
- startTime = currentTime;
- }
-
- if (shouldPreventDefault(differenceX, differenceY)) {
- e.stopPropagation();
- e.preventDefault();
- }
- }
- }
- function touchEnd() {
- if (!inGlobalTouch && inLocalTouch) {
- inLocalTouch = false;
-
- clearInterval(easingLoop);
- easingLoop = setInterval(function () {
- if (!instances.get(element)) {
- clearInterval(easingLoop);
- return;
- }
-
- if (!speed.x && !speed.y) {
- clearInterval(easingLoop);
- return;
- }
-
- if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {
- clearInterval(easingLoop);
- return;
- }
-
- applyTouchMove(speed.x * 30, speed.y * 30);
-
- speed.x *= 0.8;
- speed.y *= 0.8;
- }, 10);
- }
- }
-
- if (supportsTouch) {
- i.event.bind(window, 'touchstart', globalTouchStart);
- i.event.bind(window, 'touchend', globalTouchEnd);
- i.event.bind(element, 'touchstart', touchStart);
- i.event.bind(element, 'touchmove', touchMove);
- i.event.bind(element, 'touchend', touchEnd);
- }
-
- if (supportsIePointer) {
- if (window.PointerEvent) {
- i.event.bind(window, 'pointerdown', globalTouchStart);
- i.event.bind(window, 'pointerup', globalTouchEnd);
- i.event.bind(element, 'pointerdown', touchStart);
- i.event.bind(element, 'pointermove', touchMove);
- i.event.bind(element, 'pointerup', touchEnd);
- } else if (window.MSPointerEvent) {
- i.event.bind(window, 'MSPointerDown', globalTouchStart);
- i.event.bind(window, 'MSPointerUp', globalTouchEnd);
- i.event.bind(element, 'MSPointerDown', touchStart);
- i.event.bind(element, 'MSPointerMove', touchMove);
- i.event.bind(element, 'MSPointerUp', touchEnd);
- }
- }
-}
-
-module.exports = function (element) {
- if (!_.env.supportsTouch && !_.env.supportsIePointer) {
- return;
- }
-
- var i = instances.get(element);
- bindTouchHandler(element, i, _.env.supportsTouch, _.env.supportsIePointer);
-};
-
-},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(require,module,exports){
-'use strict';
-
-var _ = require('../lib/helper');
-var cls = require('../lib/class');
-var instances = require('./instances');
-var updateGeometry = require('./update-geometry');
-
-// Handlers
-var handlers = {
- 'click-rail': require('./handler/click-rail'),
- 'drag-scrollbar': require('./handler/drag-scrollbar'),
- 'keyboard': require('./handler/keyboard'),
- 'wheel': require('./handler/mouse-wheel'),
- 'touch': require('./handler/touch'),
- 'selection': require('./handler/selection')
-};
-var nativeScrollHandler = require('./handler/native-scroll');
-
-module.exports = function (element, userSettings) {
- userSettings = typeof userSettings === 'object' ? userSettings : {};
-
- cls.add(element, 'ps-container');
-
- // Create a plugin instance.
- var i = instances.add(element);
-
- i.settings = _.extend(i.settings, userSettings);
- cls.add(element, 'ps-theme-' + i.settings.theme);
-
- i.settings.handlers.forEach(function (handlerName) {
- handlers[handlerName](element);
- });
-
- nativeScrollHandler(element);
-
- updateGeometry(element);
-};
-
-},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(require,module,exports){
-'use strict';
-
-var _ = require('../lib/helper');
-var cls = require('../lib/class');
-var defaultSettings = require('./default-setting');
-var dom = require('../lib/dom');
-var EventManager = require('../lib/event-manager');
-var guid = require('../lib/guid');
-
-var instances = {};
-
-function Instance(element) {
- var i = this;
-
- i.settings = _.clone(defaultSettings);
- i.containerWidth = null;
- i.containerHeight = null;
- i.contentWidth = null;
- i.contentHeight = null;
-
- i.isRtl = dom.css(element, 'direction') === "rtl";
- i.isNegativeScroll = (function () {
- var originalScrollLeft = element.scrollLeft;
- var result = null;
- element.scrollLeft = -1;
- result = element.scrollLeft < 0;
- element.scrollLeft = originalScrollLeft;
- return result;
- })();
- i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0;
- i.event = new EventManager();
- i.ownerDocument = element.ownerDocument || document;
-
- function focus() {
- cls.add(element, 'ps-focus');
- }
-
- function blur() {
- cls.remove(element, 'ps-focus');
- }
-
- i.scrollbarXRail = dom.appendTo(dom.e('div', 'ps-scrollbar-x-rail'), element);
- i.scrollbarX = dom.appendTo(dom.e('div', 'ps-scrollbar-x'), i.scrollbarXRail);
- i.scrollbarX.setAttribute('tabindex', 0);
- i.event.bind(i.scrollbarX, 'focus', focus);
- i.event.bind(i.scrollbarX, 'blur', blur);
- i.scrollbarXActive = null;
- i.scrollbarXWidth = null;
- i.scrollbarXLeft = null;
- i.scrollbarXBottom = _.toInt(dom.css(i.scrollbarXRail, 'bottom'));
- i.isScrollbarXUsingBottom = i.scrollbarXBottom === i.scrollbarXBottom; // !isNaN
- i.scrollbarXTop = i.isScrollbarXUsingBottom ? null : _.toInt(dom.css(i.scrollbarXRail, 'top'));
- i.railBorderXWidth = _.toInt(dom.css(i.scrollbarXRail, 'borderLeftWidth')) + _.toInt(dom.css(i.scrollbarXRail, 'borderRightWidth'));
- // Set rail to display:block to calculate margins
- dom.css(i.scrollbarXRail, 'display', 'block');
- i.railXMarginWidth = _.toInt(dom.css(i.scrollbarXRail, 'marginLeft')) + _.toInt(dom.css(i.scrollbarXRail, 'marginRight'));
- dom.css(i.scrollbarXRail, 'display', '');
- i.railXWidth = null;
- i.railXRatio = null;
-
- i.scrollbarYRail = dom.appendTo(dom.e('div', 'ps-scrollbar-y-rail'), element);
- i.scrollbarY = dom.appendTo(dom.e('div', 'ps-scrollbar-y'), i.scrollbarYRail);
- i.scrollbarY.setAttribute('tabindex', 0);
- i.event.bind(i.scrollbarY, 'focus', focus);
- i.event.bind(i.scrollbarY, 'blur', blur);
- i.scrollbarYActive = null;
- i.scrollbarYHeight = null;
- i.scrollbarYTop = null;
- i.scrollbarYRight = _.toInt(dom.css(i.scrollbarYRail, 'right'));
- i.isScrollbarYUsingRight = i.scrollbarYRight === i.scrollbarYRight; // !isNaN
- i.scrollbarYLeft = i.isScrollbarYUsingRight ? null : _.toInt(dom.css(i.scrollbarYRail, 'left'));
- i.scrollbarYOuterWidth = i.isRtl ? _.outerWidth(i.scrollbarY) : null;
- i.railBorderYWidth = _.toInt(dom.css(i.scrollbarYRail, 'borderTopWidth')) + _.toInt(dom.css(i.scrollbarYRail, 'borderBottomWidth'));
- dom.css(i.scrollbarYRail, 'display', 'block');
- i.railYMarginHeight = _.toInt(dom.css(i.scrollbarYRail, 'marginTop')) + _.toInt(dom.css(i.scrollbarYRail, 'marginBottom'));
- dom.css(i.scrollbarYRail, 'display', '');
- i.railYHeight = null;
- i.railYRatio = null;
-}
-
-function getId(element) {
- return element.getAttribute('data-ps-id');
-}
-
-function setId(element, id) {
- element.setAttribute('data-ps-id', id);
-}
-
-function removeId(element) {
- element.removeAttribute('data-ps-id');
-}
-
-exports.add = function (element) {
- var newId = guid();
- setId(element, newId);
- instances[newId] = new Instance(element);
- return instances[newId];
-};
-
-exports.remove = function (element) {
- delete instances[getId(element)];
- removeId(element);
-};
-
-exports.get = function (element) {
- return instances[getId(element)];
-};
-
-},{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(require,module,exports){
-'use strict';
-
-var _ = require('../lib/helper');
-var cls = require('../lib/class');
-var dom = require('../lib/dom');
-var instances = require('./instances');
-var updateScroll = require('./update-scroll');
-
-function getThumbSize(i, thumbSize) {
- if (i.settings.minScrollbarLength) {
- thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);
- }
- if (i.settings.maxScrollbarLength) {
- thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);
- }
- return thumbSize;
-}
-
-function updateCss(element, i) {
- var xRailOffset = {width: i.railXWidth};
- if (i.isRtl) {
- xRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth - i.contentWidth;
- } else {
- xRailOffset.left = element.scrollLeft;
- }
- if (i.isScrollbarXUsingBottom) {
- xRailOffset.bottom = i.scrollbarXBottom - element.scrollTop;
- } else {
- xRailOffset.top = i.scrollbarXTop + element.scrollTop;
- }
- dom.css(i.scrollbarXRail, xRailOffset);
-
- var yRailOffset = {top: element.scrollTop, height: i.railYHeight};
- if (i.isScrollbarYUsingRight) {
- if (i.isRtl) {
- yRailOffset.right = i.contentWidth - (i.negativeScrollAdjustment + element.scrollLeft) - i.scrollbarYRight - i.scrollbarYOuterWidth;
- } else {
- yRailOffset.right = i.scrollbarYRight - element.scrollLeft;
- }
- } else {
- if (i.isRtl) {
- yRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth * 2 - i.contentWidth - i.scrollbarYLeft - i.scrollbarYOuterWidth;
- } else {
- yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;
- }
- }
- dom.css(i.scrollbarYRail, yRailOffset);
-
- dom.css(i.scrollbarX, {left: i.scrollbarXLeft, width: i.scrollbarXWidth - i.railBorderXWidth});
- dom.css(i.scrollbarY, {top: i.scrollbarYTop, height: i.scrollbarYHeight - i.railBorderYWidth});
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
-
- i.containerWidth = element.clientWidth;
- i.containerHeight = element.clientHeight;
- i.contentWidth = element.scrollWidth;
- i.contentHeight = element.scrollHeight;
-
- var existingRails;
- if (!element.contains(i.scrollbarXRail)) {
- existingRails = dom.queryChildren(element, '.ps-scrollbar-x-rail');
- if (existingRails.length > 0) {
- existingRails.forEach(function (rail) {
- dom.remove(rail);
- });
- }
- dom.appendTo(i.scrollbarXRail, element);
- }
- if (!element.contains(i.scrollbarYRail)) {
- existingRails = dom.queryChildren(element, '.ps-scrollbar-y-rail');
- if (existingRails.length > 0) {
- existingRails.forEach(function (rail) {
- dom.remove(rail);
- });
- }
- dom.appendTo(i.scrollbarYRail, element);
- }
-
- if (!i.settings.suppressScrollX && i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth) {
- i.scrollbarXActive = true;
- i.railXWidth = i.containerWidth - i.railXMarginWidth;
- i.railXRatio = i.containerWidth / i.railXWidth;
- i.scrollbarXWidth = getThumbSize(i, _.toInt(i.railXWidth * i.containerWidth / i.contentWidth));
- i.scrollbarXLeft = _.toInt((i.negativeScrollAdjustment + element.scrollLeft) * (i.railXWidth - i.scrollbarXWidth) / (i.contentWidth - i.containerWidth));
- } else {
- i.scrollbarXActive = false;
- }
-
- if (!i.settings.suppressScrollY && i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight) {
- i.scrollbarYActive = true;
- i.railYHeight = i.containerHeight - i.railYMarginHeight;
- i.railYRatio = i.containerHeight / i.railYHeight;
- i.scrollbarYHeight = getThumbSize(i, _.toInt(i.railYHeight * i.containerHeight / i.contentHeight));
- i.scrollbarYTop = _.toInt(element.scrollTop * (i.railYHeight - i.scrollbarYHeight) / (i.contentHeight - i.containerHeight));
- } else {
- i.scrollbarYActive = false;
- }
-
- if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {
- i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;
- }
- if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {
- i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;
- }
-
- updateCss(element, i);
-
- if (i.scrollbarXActive) {
- cls.add(element, 'ps-active-x');
- } else {
- cls.remove(element, 'ps-active-x');
- i.scrollbarXWidth = 0;
- i.scrollbarXLeft = 0;
- updateScroll(element, 'left', 0);
- }
- if (i.scrollbarYActive) {
- cls.add(element, 'ps-active-y');
- } else {
- cls.remove(element, 'ps-active-y');
- i.scrollbarYHeight = 0;
- i.scrollbarYTop = 0;
- updateScroll(element, 'top', 0);
- }
-};
-
-},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(require,module,exports){
-'use strict';
-
-var instances = require('./instances');
-
-var lastTop;
-var lastLeft;
-
-var createDOMEvent = function (name) {
- var event = document.createEvent("Event");
- event.initEvent(name, true, true);
- return event;
-};
-
-module.exports = function (element, axis, value) {
- if (typeof element === 'undefined') {
- throw 'You must provide an element to the update-scroll function';
- }
-
- if (typeof axis === 'undefined') {
- throw 'You must provide an axis to the update-scroll function';
- }
-
- if (typeof value === 'undefined') {
- throw 'You must provide a value to the update-scroll function';
- }
-
- if (axis === 'top' && value <= 0) {
- element.scrollTop = value = 0; // don't allow negative scroll
- element.dispatchEvent(createDOMEvent('ps-y-reach-start'));
- }
-
- if (axis === 'left' && value <= 0) {
- element.scrollLeft = value = 0; // don't allow negative scroll
- element.dispatchEvent(createDOMEvent('ps-x-reach-start'));
- }
-
- var i = instances.get(element);
-
- if (axis === 'top' && value >= i.contentHeight - i.containerHeight) {
- // don't allow scroll past container
- value = i.contentHeight - i.containerHeight;
- if (value - element.scrollTop <= 1) {
- // mitigates rounding errors on non-subpixel scroll values
- value = element.scrollTop;
- } else {
- element.scrollTop = value;
- }
- element.dispatchEvent(createDOMEvent('ps-y-reach-end'));
- }
-
- if (axis === 'left' && value >= i.contentWidth - i.containerWidth) {
- // don't allow scroll past container
- value = i.contentWidth - i.containerWidth;
- if (value - element.scrollLeft <= 1) {
- // mitigates rounding errors on non-subpixel scroll values
- value = element.scrollLeft;
- } else {
- element.scrollLeft = value;
- }
- element.dispatchEvent(createDOMEvent('ps-x-reach-end'));
- }
-
- if (!lastTop) {
- lastTop = element.scrollTop;
- }
-
- if (!lastLeft) {
- lastLeft = element.scrollLeft;
- }
-
- if (axis === 'top' && value < lastTop) {
- element.dispatchEvent(createDOMEvent('ps-scroll-up'));
- }
-
- if (axis === 'top' && value > lastTop) {
- element.dispatchEvent(createDOMEvent('ps-scroll-down'));
- }
-
- if (axis === 'left' && value < lastLeft) {
- element.dispatchEvent(createDOMEvent('ps-scroll-left'));
- }
-
- if (axis === 'left' && value > lastLeft) {
- element.dispatchEvent(createDOMEvent('ps-scroll-right'));
- }
-
- if (axis === 'top') {
- element.scrollTop = lastTop = value;
- element.dispatchEvent(createDOMEvent('ps-scroll-y'));
- }
-
- if (axis === 'left') {
- element.scrollLeft = lastLeft = value;
- element.dispatchEvent(createDOMEvent('ps-scroll-x'));
- }
-
-};
-
-},{"./instances":18}],21:[function(require,module,exports){
-'use strict';
-
-var _ = require('../lib/helper');
-var dom = require('../lib/dom');
-var instances = require('./instances');
-var updateGeometry = require('./update-geometry');
-var updateScroll = require('./update-scroll');
-
-module.exports = function (element) {
- var i = instances.get(element);
-
- if (!i) {
- return;
- }
-
- // Recalcuate negative scrollLeft adjustment
- i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0;
-
- // Recalculate rail margins
- dom.css(i.scrollbarXRail, 'display', 'block');
- dom.css(i.scrollbarYRail, 'display', 'block');
- i.railXMarginWidth = _.toInt(dom.css(i.scrollbarXRail, 'marginLeft')) + _.toInt(dom.css(i.scrollbarXRail, 'marginRight'));
- i.railYMarginHeight = _.toInt(dom.css(i.scrollbarYRail, 'marginTop')) + _.toInt(dom.css(i.scrollbarYRail, 'marginBottom'));
-
- // Hide scrollbars not to affect scrollWidth and scrollHeight
- dom.css(i.scrollbarXRail, 'display', 'none');
- dom.css(i.scrollbarYRail, 'display', 'none');
-
- updateGeometry(element);
-
- // Update top/left scroll to trigger events
- updateScroll(element, 'top', element.scrollTop);
- updateScroll(element, 'left', element.scrollLeft);
-
- dom.css(i.scrollbarXRail, 'display', '');
- dom.css(i.scrollbarYRail, 'display', '');
-};
-
-},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19,"./update-scroll":20}]},{},[1]);
diff --git a/debian/missing-sources/raphael-2.2.4.js b/debian/missing-sources/raphael-2.2.4.js
deleted file mode 100644
index 90184313..00000000
--- a/debian/missing-sources/raphael-2.2.4.js
+++ /dev/null
@@ -1,8190 +0,0 @@
-// ┌───────────────────────────────────────────────────────────────────────────────────────────────────────┐ \\
-// │ Raphaël 2.2.0 - JavaScript Vector Library │ \\
-// ├───────────────────────────────────────────────────────────────────────────────────────────────────────┤ \\
-// │ Copyright © 2008-2016 Dmitry Baranovskiy (http://raphaeljs.com) │ \\
-// │ Copyright © 2008-2016 Sencha Labs (http://sencha.com) │ \\
-// ├───────────────────────────────────────────────────────────────────────────────────────────────────────┤ \\
-// │ Licensed under the MIT (https://github.com/DmitryBaranovskiy/raphael/blob/master/license.txt) license.│ \\
-// └───────────────────────────────────────────────────────────────────────────────────────────────────────┘ \\
-
-(function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else if(typeof exports === 'object')
- exports["Raphael"] = factory();
- else
- root["Raphael"] = factory();
-})(this, function() {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-
-/******/ // Flag the module as loaded
-/******/ module.loaded = true;
-
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-
-
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(0);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ function(module, exports, __webpack_require__) {
-
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1), __webpack_require__(3), __webpack_require__(4)], __WEBPACK_AMD_DEFINE_RESULT__ = function(R) {
-
- return R;
-
- }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
-
-/***/ },
-/* 1 */
-/***/ function(module, exports, __webpack_require__) {
-
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2)], __WEBPACK_AMD_DEFINE_RESULT__ = function(eve) {
-
- /*\
- * Raphael
- [ method ]
- **
- * Creates a canvas object on which to draw.
- * You must do this first, as all future calls to drawing methods
- * from this instance will be bound to this canvas.
- > Parameters
- **
- - container (HTMLElement|string) DOM element or its ID which is going to be a parent for drawing surface
- - width (number)
- - height (number)
- - callback (function) #optional callback function which is going to be executed in the context of newly created paper
- * or
- - x (number)
- - y (number)
- - width (number)
- - height (number)
- - callback (function) #optional callback function which is going to be executed in the context of newly created paper
- * or
- - all (array) (first 3 or 4 elements in the array are equal to [containerID, width, height] or [x, y, width, height]. The rest are element descriptions in format {type: type, <attributes>}). See @Paper.add.
- - callback (function) #optional callback function which is going to be executed in the context of newly created paper
- * or
- - onReadyCallback (function) function that is going to be called on DOM ready event. You can also subscribe to this event via Eve’s “DOMLoad” event. In this case method returns `undefined`.
- = (object) @Paper
- > Usage
- | // Each of the following examples create a canvas
- | // that is 320px wide by 200px high.
- | // Canvas is created at the viewport’s 10,50 coordinate.
- | var paper = Raphael(10, 50, 320, 200);
- | // Canvas is created at the top left corner of the #notepad element
- | // (or its top right corner in dir="rtl" elements)
- | var paper = Raphael(document.getElementById("notepad"), 320, 200);
- | // Same as above
- | var paper = Raphael("notepad", 320, 200);
- | // Image dump
- | var set = Raphael(["notepad", 320, 200, {
- | type: "rect",
- | x: 10,
- | y: 10,
- | width: 25,
- | height: 25,
- | stroke: "#f00"
- | }, {
- | type: "text",
- | x: 30,
- | y: 40,
- | text: "Dump"
- | }]);
- \*/
- function R(first) {
- if (R.is(first, "function")) {
- return loaded ? first() : eve.on("raphael.DOMload", first);
- } else if (R.is(first, array)) {
- return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first);
- } else {
- var args = Array.prototype.slice.call(arguments, 0);
- if (R.is(args[args.length - 1], "function")) {
- var f = args.pop();
- return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () {
- f.call(R._engine.create[apply](R, args));
- });
- } else {
- return R._engine.create[apply](R, arguments);
- }
- }
- }
- R.version = "2.2.0";
- R.eve = eve;
- var loaded,
- separator = /[, ]+/,
- elements = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1},
- formatrg = /\{(\d+)\}/g,
- proto = "prototype",
- has = "hasOwnProperty",
- g = {
- doc: document,
- win: window
- },
- oldRaphael = {
- was: Object.prototype[has].call(g.win, "Raphael"),
- is: g.win.Raphael
- },
- Paper = function () {
- /*\
- * Paper.ca
- [ property (object) ]
- **
- * Shortcut for @Paper.customAttributes
- \*/
- /*\
- * Paper.customAttributes
- [ property (object) ]
- **
- * If you have a set of attributes that you would like to represent
- * as a function of some number you can do it easily with custom attributes:
- > Usage
- | paper.customAttributes.hue = function (num) {
- | num = num % 1;
- | return {fill: "hsb(" + num + ", 0.75, 1)"};
- | };
- | // Custom attribute “hue” will change fill
- | // to be given hue with fixed saturation and brightness.
- | // Now you can use it like this:
- | var c = paper.circle(10, 10, 10).attr({hue: .45});
- | // or even like this:
- | c.animate({hue: 1}, 1e3);
- |
- | // You could also create custom attribute
- | // with multiple parameters:
- | paper.customAttributes.hsb = function (h, s, b) {
- | return {fill: "hsb(" + [h, s, b].join(",") + ")"};
- | };
- | c.attr({hsb: "0.5 .8 1"});
- | c.animate({hsb: [1, 0, 0.5]}, 1e3);
- \*/
- this.ca = this.customAttributes = {};
- },
- paperproto,
- appendChild = "appendChild",
- apply = "apply",
- concat = "concat",
- supportsTouch = ('ontouchstart' in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, //taken from Modernizr touch test
- E = "",
- S = " ",
- Str = String,
- split = "split",
- events = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[split](S),
- touchMap = {
- mousedown: "touchstart",
- mousemove: "touchmove",
- mouseup: "touchend"
- },
- lowerCase = Str.prototype.toLowerCase,
- math = Math,
- mmax = math.max,
- mmin = math.min,
- abs = math.abs,
- pow = math.pow,
- PI = math.PI,
- nu = "number",
- string = "string",
- array = "array",
- toString = "toString",
- fillString = "fill",
- objectToString = Object.prototype.toString,
- paper = {},
- push = "push",
- ISURL = R._ISURL = /^url\(['"]?(.+?)['"]?\)$/i,
- colourRegExp = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,
- isnan = {"NaN": 1, "Infinity": 1, "-Infinity": 1},
- bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,
- round = math.round,
- setAttribute = "setAttribute",
- toFloat = parseFloat,
- toInt = parseInt,
- upperCase = Str.prototype.toUpperCase,
- availableAttrs = R._availableAttrs = {
- "arrow-end": "none",
- "arrow-start": "none",
- blur: 0,
- "clip-rect": "0 0 1e9 1e9",
- cursor: "default",
- cx: 0,
- cy: 0,
- fill: "#fff",
- "fill-opacity": 1,
- font: '10px "Arial"',
- "font-family": '"Arial"',
- "font-size": "10",
- "font-style": "normal",
- "font-weight": 400,
- gradient: 0,
- height: 0,
- href: "http://raphaeljs.com/",
- "letter-spacing": 0,
- opacity: 1,
- path: "M0,0",
- r: 0,
- rx: 0,
- ry: 0,
- src: "",
- stroke: "#000",
- "stroke-dasharray": "",
- "stroke-linecap": "butt",
- "stroke-linejoin": "butt",
- "stroke-miterlimit": 0,
- "stroke-opacity": 1,
- "stroke-width": 1,
- target: "_blank",
- "text-anchor": "middle",
- title: "Raphael",
- transform: "",
- width: 0,
- x: 0,
- y: 0,
- class: ""
- },
- availableAnimAttrs = R._availableAnimAttrs = {
- blur: nu,
- "clip-rect": "csv",
- cx: nu,
- cy: nu,
- fill: "colour",
- "fill-opacity": nu,
- "font-size": nu,
- height: nu,
- opacity: nu,
- path: "path",
- r: nu,
- rx: nu,
- ry: nu,
- stroke: "colour",
- "stroke-opacity": nu,
- "stroke-width": nu,
- transform: "transform",
- width: nu,
- x: nu,
- y: nu
- },
- whitespace = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g,
- commaSpaces = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,
- hsrg = {hs: 1, rg: 1},
- p2s = /,?([achlmqrstvxz]),?/gi,
- pathCommand = /([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,
- tCommand = /([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,
- pathValues = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig,
- radial_gradient = R._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,
- eldata = {},
- sortByKey = function (a, b) {
- return a.key - b.key;
- },
- sortByNumber = function (a, b) {
- return toFloat(a) - toFloat(b);
- },
- fun = function () {},
- pipe = function (x) {
- return x;
- },
- rectPath = R._rectPath = function (x, y, w, h, r) {
- if (r) {
- return [["M", x + r, y], ["l", w - r * 2, 0], ["a", r, r, 0, 0, 1, r, r], ["l", 0, h - r * 2], ["a", r, r, 0, 0, 1, -r, r], ["l", r * 2 - w, 0], ["a", r, r, 0, 0, 1, -r, -r], ["l", 0, r * 2 - h], ["a", r, r, 0, 0, 1, r, -r], ["z"]];
- }
- return [["M", x, y], ["l", w, 0], ["l", 0, h], ["l", -w, 0], ["z"]];
- },
- ellipsePath = function (x, y, rx, ry) {
- if (ry == null) {
- ry = rx;
- }
- return [["M", x, y], ["m", 0, -ry], ["a", rx, ry, 0, 1, 1, 0, 2 * ry], ["a", rx, ry, 0, 1, 1, 0, -2 * ry], ["z"]];
- },
- getPath = R._getPath = {
- path: function (el) {
- return el.attr("path");
- },
- circle: function (el) {
- var a = el.attrs;
- return ellipsePath(a.cx, a.cy, a.r);
- },
- ellipse: function (el) {
- var a = el.attrs;
- return ellipsePath(a.cx, a.cy, a.rx, a.ry);
- },
- rect: function (el) {
- var a = el.attrs;
- return rectPath(a.x, a.y, a.width, a.height, a.r);
- },
- image: function (el) {
- var a = el.attrs;
- return rectPath(a.x, a.y, a.width, a.height);
- },
- text: function (el) {
- var bbox = el._getBBox();
- return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);
- },
- set : function(el) {
- var bbox = el._getBBox();
- return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);
- }
- },
- /*\
- * Raphael.mapPath
- [ method ]
- **
- * Transform the path string with given matrix.
- > Parameters
- - path (string) path string
- - matrix (object) see @Matrix
- = (string) transformed path string
- \*/
- mapPath = R.mapPath = function (path, matrix) {
- if (!matrix) {
- return path;
- }
- var x, y, i, j, ii, jj, pathi;
- path = path2curve(path);
- for (i = 0, ii = path.length; i < ii; i++) {
- pathi = path[i];
- for (j = 1, jj = pathi.length; j < jj; j += 2) {
- x = matrix.x(pathi[j], pathi[j + 1]);
- y = matrix.y(pathi[j], pathi[j + 1]);
- pathi[j] = x;
- pathi[j + 1] = y;
- }
- }
- return path;
- };
-
- R._g = g;
- /*\
- * Raphael.type
- [ property (string) ]
- **
- * Can be “SVG”, “VML” or empty, depending on browser support.
- \*/
- R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML");
- if (R.type == "VML") {
- var d = g.doc.createElement("div"),
- b;
- d.innerHTML = '<v:shape adj="1"/>';
- b = d.firstChild;
- b.style.behavior = "url(#default#VML)";
- if (!(b && typeof b.adj == "object")) {
- return (R.type = E);
- }
- d = null;
- }
- /*\
- * Raphael.svg
- [ property (boolean) ]
- **
- * `true` if browser supports SVG.
- \*/
- /*\
- * Raphael.vml
- [ property (boolean) ]
- **
- * `true` if browser supports VML.
- \*/
- R.svg = !(R.vml = R.type == "VML");
- R._Paper = Paper;
- /*\
- * Raphael.fn
- [ property (object) ]
- **
- * You can add your own method to the canvas. For example if you want to draw a pie chart,
- * you can create your own pie chart function and ship it as a Raphaël plugin. To do this
- * you need to extend the `Raphael.fn` object. You should modify the `fn` object before a
- * Raphaël instance is created, otherwise it will take no effect. Please note that the
- * ability for namespaced plugins was removed in Raphael 2.0. It is up to the plugin to
- * ensure any namespacing ensures proper context.
- > Usage
- | Raphael.fn.arrow = function (x1, y1, x2, y2, size) {
- | return this.path( ... );
- | };
- | // or create namespace
- | Raphael.fn.mystuff = {
- | arrow: function () {…},
- | star: function () {…},
- | // etc…
- | };
- | var paper = Raphael(10, 10, 630, 480);
- | // then use it
- | paper.arrow(10, 10, 30, 30, 5).attr({fill: "#f00"});
- | paper.mystuff.arrow();
- | paper.mystuff.star();
- \*/
- R.fn = paperproto = Paper.prototype = R.prototype;
- R._id = 0;
- /*\
- * Raphael.is
- [ method ]
- **
- * Handful of replacements for `typeof` operator.
- > Parameters
- - o (…) any object or primitive
- - type (string) name of the type, i.e. “string”, “function”, “number”, etc.
- = (boolean) is given value is of given type
- \*/
- R.is = function (o, type) {
- type = lowerCase.call(type);
- if (type == "finite") {
- return !isnan[has](+o);
- }
- if (type == "array") {
- return o instanceof Array;
- }
- return (type == "null" && o === null) ||
- (type == typeof o && o !== null) ||
- (type == "object" && o === Object(o)) ||
- (type == "array" && Array.isArray && Array.isArray(o)) ||
- objectToString.call(o).slice(8, -1).toLowerCase() == type;
- };
-
- function clone(obj) {
- if (typeof obj == "function" || Object(obj) !== obj) {
- return obj;
- }
- var res = new obj.constructor;
- for (var key in obj) if (obj[has](key)) {
- res[key] = clone(obj[key]);
- }
- return res;
- }
-
- /*\
- * Raphael.angle
- [ method ]
- **
- * Returns angle between two or three points
- > Parameters
- - x1 (number) x coord of first point
- - y1 (number) y coord of first point
- - x2 (number) x coord of second point
- - y2 (number) y coord of second point
- - x3 (number) #optional x coord of third point
- - y3 (number) #optional y coord of third point
- = (number) angle in degrees.
- \*/
- R.angle = function (x1, y1, x2, y2, x3, y3) {
- if (x3 == null) {
- var x = x1 - x2,
- y = y1 - y2;
- if (!x && !y) {
- return 0;
- }
- return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360;
- } else {
- return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3);
- }
- };
- /*\
- * Raphael.rad
- [ method ]
- **
- * Transform angle to radians
- > Parameters
- - deg (number) angle in degrees
- = (number) angle in radians.
- \*/
- R.rad = function (deg) {
- return deg % 360 * PI / 180;
- };
- /*\
- * Raphael.deg
- [ method ]
- **
- * Transform angle to degrees
- > Parameters
- - rad (number) angle in radians
- = (number) angle in degrees.
- \*/
- R.deg = function (rad) {
- return Math.round ((rad * 180 / PI% 360)* 1000) / 1000;
- };
- /*\
- * Raphael.snapTo
- [ method ]
- **
- * Snaps given value to given grid.
- > Parameters
- - values (array|number) given array of values or step of the grid
- - value (number) value to adjust
- - tolerance (number) #optional tolerance for snapping. Default is `10`.
- = (number) adjusted value.
- \*/
- R.snapTo = function (values, value, tolerance) {
- tolerance = R.is(tolerance, "finite") ? tolerance : 10;
- if (R.is(values, array)) {
- var i = values.length;
- while (i--) if (abs(values[i] - value) <= tolerance) {
- return values[i];
- }
- } else {
- values = +values;
- var rem = value % values;
- if (rem < tolerance) {
- return value - rem;
- }
- if (rem > values - tolerance) {
- return value - rem + values;
- }
- }
- return value;
- };
-
- /*\
- * Raphael.createUUID
- [ method ]
- **
- * Returns RFC4122, version 4 ID
- \*/
- var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) {
- return function () {
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase();
- };
- })(/[xy]/g, function (c) {
- var r = math.random() * 16 | 0,
- v = c == "x" ? r : (r & 3 | 8);
- return v.toString(16);
- });
-
- /*\
- * Raphael.setWindow
- [ method ]
- **
- * Used when you need to draw in `&lt;iframe>`. Switched window to the iframe one.
- > Parameters
- - newwin (window) new window object
- \*/
- R.setWindow = function (newwin) {
- eve("raphael.setWindow", R, g.win, newwin);
- g.win = newwin;
- g.doc = g.win.document;
- if (R._engine.initWin) {
- R._engine.initWin(g.win);
- }
- };
- var toHex = function (color) {
- if (R.vml) {
- // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/
- var trim = /^\s+|\s+$/g;
- var bod;
- try {
- var docum = new ActiveXObject("htmlfile");
- docum.write("<body>");
- docum.close();
- bod = docum.body;
- } catch(e) {
- bod = createPopup().document.body;
- }
- var range = bod.createTextRange();
- toHex = cacher(function (color) {
- try {
- bod.style.color = Str(color).replace(trim, E);
- var value = range.queryCommandValue("ForeColor");
- value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16);
- return "#" + ("000000" + value.toString(16)).slice(-6);
- } catch(e) {
- return "none";
- }
- });
- } else {
- var i = g.doc.createElement("i");
- i.title = "Rapha\xebl Colour Picker";
- i.style.display = "none";
- g.doc.body.appendChild(i);
- toHex = cacher(function (color) {
- i.style.color = color;
- return g.doc.defaultView.getComputedStyle(i, E).getPropertyValue("color");
- });
- }
- return toHex(color);
- },
- hsbtoString = function () {
- return "hsb(" + [this.h, this.s, this.b] + ")";
- },
- hsltoString = function () {
- return "hsl(" + [this.h, this.s, this.l] + ")";
- },
- rgbtoString = function () {
- return this.hex;
- },
- prepareRGB = function (r, g, b) {
- if (g == null && R.is(r, "object") && "r" in r && "g" in r && "b" in r) {
- b = r.b;
- g = r.g;
- r = r.r;
- }
- if (g == null && R.is(r, string)) {
- var clr = R.getRGB(r);
- r = clr.r;
- g = clr.g;
- b = clr.b;
- }
- if (r > 1 || g > 1 || b > 1) {
- r /= 255;
- g /= 255;
- b /= 255;
- }
-
- return [r, g, b];
- },
- packageRGB = function (r, g, b, o) {
- r *= 255;
- g *= 255;
- b *= 255;
- var rgb = {
- r: r,
- g: g,
- b: b,
- hex: R.rgb(r, g, b),
- toString: rgbtoString
- };
- R.is(o, "finite") && (rgb.opacity = o);
- return rgb;
- };
-
- /*\
- * Raphael.color
- [ method ]
- **
- * Parses the color string and returns object with all values for the given color.
- > Parameters
- - clr (string) color string in one of the supported formats (see @Raphael.getRGB)
- = (object) Combined RGB & HSB object in format:
- o {
- o r (number) red,
- o g (number) green,
- o b (number) blue,
- o hex (string) color in HTML/CSS format: #••••••,
- o error (boolean) `true` if string can’t be parsed,
- o h (number) hue,
- o s (number) saturation,
- o v (number) value (brightness),
- o l (number) lightness
- o }
- \*/
- R.color = function (clr) {
- var rgb;
- if (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) {
- rgb = R.hsb2rgb(clr);
- clr.r = rgb.r;
- clr.g = rgb.g;
- clr.b = rgb.b;
- clr.hex = rgb.hex;
- } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) {
- rgb = R.hsl2rgb(clr);
- clr.r = rgb.r;
- clr.g = rgb.g;
- clr.b = rgb.b;
- clr.hex = rgb.hex;
- } else {
- if (R.is(clr, "string")) {
- clr = R.getRGB(clr);
- }
- if (R.is(clr, "object") && "r" in clr && "g" in clr && "b" in clr) {
- rgb = R.rgb2hsl(clr);
- clr.h = rgb.h;
- clr.s = rgb.s;
- clr.l = rgb.l;
- rgb = R.rgb2hsb(clr);
- clr.v = rgb.b;
- } else {
- clr = {hex: "none"};
- clr.r = clr.g = clr.b = clr.h = clr.s = clr.v = clr.l = -1;
- }
- }
- clr.toString = rgbtoString;
- return clr;
- };
- /*\
- * Raphael.hsb2rgb
- [ method ]
- **
- * Converts HSB values to RGB object.
- > Parameters
- - h (number) hue
- - s (number) saturation
- - v (number) value or brightness
- = (object) RGB object in format:
- o {
- o r (number) red,
- o g (number) green,
- o b (number) blue,
- o hex (string) color in HTML/CSS format: #••••••
- o }
- \*/
- R.hsb2rgb = function (h, s, v, o) {
- if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) {
- v = h.b;
- s = h.s;
- o = h.o;
- h = h.h;
- }
- h *= 360;
- var R, G, B, X, C;
- h = (h % 360) / 60;
- C = v * s;
- X = C * (1 - abs(h % 2 - 1));
- R = G = B = v - C;
-
- h = ~~h;
- R += [C, X, 0, 0, X, C][h];
- G += [X, C, C, X, 0, 0][h];
- B += [0, 0, X, C, C, X][h];
- return packageRGB(R, G, B, o);
- };
- /*\
- * Raphael.hsl2rgb
- [ method ]
- **
- * Converts HSL values to RGB object.
- > Parameters
- - h (number) hue
- - s (number) saturation
- - l (number) luminosity
- = (object) RGB object in format:
- o {
- o r (number) red,
- o g (number) green,
- o b (number) blue,
- o hex (string) color in HTML/CSS format: #••••••
- o }
- \*/
- R.hsl2rgb = function (h, s, l, o) {
- if (this.is(h, "object") && "h" in h && "s" in h && "l" in h) {
- l = h.l;
- s = h.s;
- h = h.h;
- }
- if (h > 1 || s > 1 || l > 1) {
- h /= 360;
- s /= 100;
- l /= 100;
- }
- h *= 360;
- var R, G, B, X, C;
- h = (h % 360) / 60;
- C = 2 * s * (l < .5 ? l : 1 - l);
- X = C * (1 - abs(h % 2 - 1));
- R = G = B = l - C / 2;
-
- h = ~~h;
- R += [C, X, 0, 0, X, C][h];
- G += [X, C, C, X, 0, 0][h];
- B += [0, 0, X, C, C, X][h];
- return packageRGB(R, G, B, o);
- };
- /*\
- * Raphael.rgb2hsb
- [ method ]
- **
- * Converts RGB values to HSB object.
- > Parameters
- - r (number) red
- - g (number) green
- - b (number) blue
- = (object) HSB object in format:
- o {
- o h (number) hue
- o s (number) saturation
- o b (number) brightness
- o }
- \*/
- R.rgb2hsb = function (r, g, b) {
- b = prepareRGB(r, g, b);
- r = b[0];
- g = b[1];
- b = b[2];
-
- var H, S, V, C;
- V = mmax(r, g, b);
- C = V - mmin(r, g, b);
- H = (C == 0 ? null :
- V == r ? (g - b) / C :
- V == g ? (b - r) / C + 2 :
- (r - g) / C + 4
- );
- H = ((H + 360) % 6) * 60 / 360;
- S = C == 0 ? 0 : C / V;
- return {h: H, s: S, b: V, toString: hsbtoString};
- };
- /*\
- * Raphael.rgb2hsl
- [ method ]
- **
- * Converts RGB values to HSL object.
- > Parameters
- - r (number) red
- - g (number) green
- - b (number) blue
- = (object) HSL object in format:
- o {
- o h (number) hue
- o s (number) saturation
- o l (number) luminosity
- o }
- \*/
- R.rgb2hsl = function (r, g, b) {
- b = prepareRGB(r, g, b);
- r = b[0];
- g = b[1];
- b = b[2];
-
- var H, S, L, M, m, C;
- M = mmax(r, g, b);
- m = mmin(r, g, b);
- C = M - m;
- H = (C == 0 ? null :
- M == r ? (g - b) / C :
- M == g ? (b - r) / C + 2 :
- (r - g) / C + 4);
- H = ((H + 360) % 6) * 60 / 360;
- L = (M + m) / 2;
- S = (C == 0 ? 0 :
- L < .5 ? C / (2 * L) :
- C / (2 - 2 * L));
- return {h: H, s: S, l: L, toString: hsltoString};
- };
- R._path2string = function () {
- return this.join(",").replace(p2s, "$1");
- };
- function repush(array, item) {
- for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) {
- return array.push(array.splice(i, 1)[0]);
- }
- }
- function cacher(f, scope, postprocessor) {
- function newf() {
- var arg = Array.prototype.slice.call(arguments, 0),
- args = arg.join("\u2400"),
- cache = newf.cache = newf.cache || {},
- count = newf.count = newf.count || [];
- if (cache[has](args)) {
- repush(count, args);
- return postprocessor ? postprocessor(cache[args]) : cache[args];
- }
- count.length >= 1e3 && delete cache[count.shift()];
- count.push(args);
- cache[args] = f[apply](scope, arg);
- return postprocessor ? postprocessor(cache[args]) : cache[args];
- }
- return newf;
- }
-
- var preload = R._preload = function (src, f) {
- var img = g.doc.createElement("img");
- img.style.cssText = "position:absolute;left:-9999em;top:-9999em";
- img.onload = function () {
- f.call(this);
- this.onload = null;
- g.doc.body.removeChild(this);
- };
- img.onerror = function () {
- g.doc.body.removeChild(this);
- };
- g.doc.body.appendChild(img);
- img.src = src;
- };
-
- function clrToString() {
- return this.hex;
- }
-
- /*\
- * Raphael.getRGB
- [ method ]
- **
- * Parses colour string as RGB object
- > Parameters
- - colour (string) colour string in one of formats:
- # <ul>
- # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>
- # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>
- # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>
- # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200,&nbsp;100,&nbsp;0)</code>”)</li>
- # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%,&nbsp;175%,&nbsp;0%)</code>”)</li>
- # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5,&nbsp;0.25,&nbsp;1)</code>”)</li>
- # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>
- # <li>hsl(•••, •••, •••) — same as hsb</li>
- # <li>hsl(•••%, •••%, •••%) — same as hsb</li>
- # </ul>
- = (object) RGB object in format:
- o {
- o r (number) red,
- o g (number) green,
- o b (number) blue
- o hex (string) color in HTML/CSS format: #••••••,
- o error (boolean) true if string can’t be parsed
- o }
- \*/
- R.getRGB = cacher(function (colour) {
- if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) {
- return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString};
- }
- if (colour == "none") {
- return {r: -1, g: -1, b: -1, hex: "none", toString: clrToString};
- }
- !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == "#") && (colour = toHex(colour));
- var res,
- red,
- green,
- blue,
- opacity,
- t,
- values,
- rgb = colour.match(colourRegExp);
- if (rgb) {
- if (rgb[2]) {
- blue = toInt(rgb[2].substring(5), 16);
- green = toInt(rgb[2].substring(3, 5), 16);
- red = toInt(rgb[2].substring(1, 3), 16);
- }
- if (rgb[3]) {
- blue = toInt((t = rgb[3].charAt(3)) + t, 16);
- green = toInt((t = rgb[3].charAt(2)) + t, 16);
- red = toInt((t = rgb[3].charAt(1)) + t, 16);
- }
- if (rgb[4]) {
- values = rgb[4][split](commaSpaces);
- red = toFloat(values[0]);
- values[0].slice(-1) == "%" && (red *= 2.55);
- green = toFloat(values[1]);
- values[1].slice(-1) == "%" && (green *= 2.55);
- blue = toFloat(values[2]);
- values[2].slice(-1) == "%" && (blue *= 2.55);
- rgb[1].toLowerCase().slice(0, 4) == "rgba" && (opacity = toFloat(values[3]));
- values[3] && values[3].slice(-1) == "%" && (opacity /= 100);
- }
- if (rgb[5]) {
- values = rgb[5][split](commaSpaces);
- red = toFloat(values[0]);
- values[0].slice(-1) == "%" && (red *= 2.55);
- green = toFloat(values[1]);
- values[1].slice(-1) == "%" && (green *= 2.55);
- blue = toFloat(values[2]);
- values[2].slice(-1) == "%" && (blue *= 2.55);
- (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360);
- rgb[1].toLowerCase().slice(0, 4) == "hsba" && (opacity = toFloat(values[3]));
- values[3] && values[3].slice(-1) == "%" && (opacity /= 100);
- return R.hsb2rgb(red, green, blue, opacity);
- }
- if (rgb[6]) {
- values = rgb[6][split](commaSpaces);
- red = toFloat(values[0]);
- values[0].slice(-1) == "%" && (red *= 2.55);
- green = toFloat(values[1]);
- values[1].slice(-1) == "%" && (green *= 2.55);
- blue = toFloat(values[2]);
- values[2].slice(-1) == "%" && (blue *= 2.55);
- (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360);
- rgb[1].toLowerCase().slice(0, 4) == "hsla" && (opacity = toFloat(values[3]));
- values[3] && values[3].slice(-1) == "%" && (opacity /= 100);
- return R.hsl2rgb(red, green, blue, opacity);
- }
- rgb = {r: red, g: green, b: blue, toString: clrToString};
- rgb.hex = "#" + (16777216 | blue | (green << 8) | (red << 16)).toString(16).slice(1);
- R.is(opacity, "finite") && (rgb.opacity = opacity);
- return rgb;
- }
- return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString};
- }, R);
- /*\
- * Raphael.hsb
- [ method ]
- **
- * Converts HSB values to hex representation of the colour.
- > Parameters
- - h (number) hue
- - s (number) saturation
- - b (number) value or brightness
- = (string) hex representation of the colour.
- \*/
- R.hsb = cacher(function (h, s, b) {
- return R.hsb2rgb(h, s, b).hex;
- });
- /*\
- * Raphael.hsl
- [ method ]
- **
- * Converts HSL values to hex representation of the colour.
- > Parameters
- - h (number) hue
- - s (number) saturation
- - l (number) luminosity
- = (string) hex representation of the colour.
- \*/
- R.hsl = cacher(function (h, s, l) {
- return R.hsl2rgb(h, s, l).hex;
- });
- /*\
- * Raphael.rgb
- [ method ]
- **
- * Converts RGB values to hex representation of the colour.
- > Parameters
- - r (number) red
- - g (number) green
- - b (number) blue
- = (string) hex representation of the colour.
- \*/
- R.rgb = cacher(function (r, g, b) {
- function round(x) { return (x + 0.5) | 0; }
- return "#" + (16777216 | round(b) | (round(g) << 8) | (round(r) << 16)).toString(16).slice(1);
- });
- /*\
- * Raphael.getColor
- [ method ]
- **
- * On each call returns next colour in the spectrum. To reset it back to red call @Raphael.getColor.reset
- > Parameters
- - value (number) #optional brightness, default is `0.75`
- = (string) hex representation of the colour.
- \*/
- R.getColor = function (value) {
- var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75},
- rgb = this.hsb2rgb(start.h, start.s, start.b);
- start.h += .075;
- if (start.h > 1) {
- start.h = 0;
- start.s -= .2;
- start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b});
- }
- return rgb.hex;
- };
- /*\
- * Raphael.getColor.reset
- [ method ]
- **
- * Resets spectrum position for @Raphael.getColor back to red.
- \*/
- R.getColor.reset = function () {
- delete this.start;
- };
-
- // http://schepers.cc/getting-to-the-point
- function catmullRom2bezier(crp, z) {
- var d = [];
- for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) {
- var p = [
- {x: +crp[i - 2], y: +crp[i - 1]},
- {x: +crp[i], y: +crp[i + 1]},
- {x: +crp[i + 2], y: +crp[i + 3]},
- {x: +crp[i + 4], y: +crp[i + 5]}
- ];
- if (z) {
- if (!i) {
- p[0] = {x: +crp[iLen - 2], y: +crp[iLen - 1]};
- } else if (iLen - 4 == i) {
- p[3] = {x: +crp[0], y: +crp[1]};
- } else if (iLen - 2 == i) {
- p[2] = {x: +crp[0], y: +crp[1]};
- p[3] = {x: +crp[2], y: +crp[3]};
- }
- } else {
- if (iLen - 4 == i) {
- p[3] = p[2];
- } else if (!i) {
- p[0] = {x: +crp[i], y: +crp[i + 1]};
- }
- }
- d.push(["C",
- (-p[0].x + 6 * p[1].x + p[2].x) / 6,
- (-p[0].y + 6 * p[1].y + p[2].y) / 6,
- (p[1].x + 6 * p[2].x - p[3].x) / 6,
- (p[1].y + 6*p[2].y - p[3].y) / 6,
- p[2].x,
- p[2].y
- ]);
- }
-
- return d;
- }
- /*\
- * Raphael.parsePathString
- [ method ]
- **
- * Utility method
- **
- * Parses given path string into an array of arrays of path segments.
- > Parameters
- - pathString (string|array) path string or array of segments (in the last case it will be returned straight away)
- = (array) array of segments.
- \*/
- R.parsePathString = function (pathString) {
- if (!pathString) {
- return null;
- }
- var pth = paths(pathString);
- if (pth.arr) {
- return pathClone(pth.arr);
- }
-
- var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0},
- data = [];
- if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption
- data = pathClone(pathString);
- }
- if (!data.length) {
- Str(pathString).replace(pathCommand, function (a, b, c) {
- var params = [],
- name = b.toLowerCase();
- c.replace(pathValues, function (a, b) {
- b && params.push(+b);
- });
- if (name == "m" && params.length > 2) {
- data.push([b][concat](params.splice(0, 2)));
- name = "l";
- b = b == "m" ? "l" : "L";
- }
- if (name == "r") {
- data.push([b][concat](params));
- } else while (params.length >= paramCounts[name]) {
- data.push([b][concat](params.splice(0, paramCounts[name])));
- if (!paramCounts[name]) {
- break;
- }
- }
- });
- }
- data.toString = R._path2string;
- pth.arr = pathClone(data);
- return data;
- };
- /*\
- * Raphael.parseTransformString
- [ method ]
- **
- * Utility method
- **
- * Parses given path string into an array of transformations.
- > Parameters
- - TString (string|array) transform string or array of transformations (in the last case it will be returned straight away)
- = (array) array of transformations.
- \*/
- R.parseTransformString = cacher(function (TString) {
- if (!TString) {
- return null;
- }
- var paramCounts = {r: 3, s: 4, t: 2, m: 6},
- data = [];
- if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption
- data = pathClone(TString);
- }
- if (!data.length) {
- Str(TString).replace(tCommand, function (a, b, c) {
- var params = [],
- name = lowerCase.call(b);
- c.replace(pathValues, function (a, b) {
- b && params.push(+b);
- });
- data.push([b][concat](params));
- });
- }
- data.toString = R._path2string;
- return data;
- });
- // PATHS
- var paths = function (ps) {
- var p = paths.ps = paths.ps || {};
- if (p[ps]) {
- p[ps].sleep = 100;
- } else {
- p[ps] = {
- sleep: 100
- };
- }
- setTimeout(function () {
- for (var key in p) if (p[has](key) && key != ps) {
- p[key].sleep--;
- !p[key].sleep && delete p[key];
- }
- });
- return p[ps];
- };
- /*\
- * Raphael.findDotsAtSegment
- [ method ]
- **
- * Utility method
- **
- * Find dot coordinates on the given cubic bezier curve at the given t.
- > Parameters
- - p1x (number) x of the first point of the curve
- - p1y (number) y of the first point of the curve
- - c1x (number) x of the first anchor of the curve
- - c1y (number) y of the first anchor of the curve
- - c2x (number) x of the second anchor of the curve
- - c2y (number) y of the second anchor of the curve
- - p2x (number) x of the second point of the curve
- - p2y (number) y of the second point of the curve
- - t (number) position on the curve (0..1)
- = (object) point information in format:
- o {
- o x: (number) x coordinate of the point
- o y: (number) y coordinate of the point
- o m: {
- o x: (number) x coordinate of the left anchor
- o y: (number) y coordinate of the left anchor
- o }
- o n: {
- o x: (number) x coordinate of the right anchor
- o y: (number) y coordinate of the right anchor
- o }
- o start: {
- o x: (number) x coordinate of the start of the curve
- o y: (number) y coordinate of the start of the curve
- o }
- o end: {
- o x: (number) x coordinate of the end of the curve
- o y: (number) y coordinate of the end of the curve
- o }
- o alpha: (number) angle of the curve derivative at the point
- o }
- \*/
- R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
- var t1 = 1 - t,
- t13 = pow(t1, 3),
- t12 = pow(t1, 2),
- t2 = t * t,
- t3 = t2 * t,
- x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x,
- y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y,
- mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x),
- my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y),
- nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x),
- ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y),
- ax = t1 * p1x + t * c1x,
- ay = t1 * p1y + t * c1y,
- cx = t1 * c2x + t * p2x,
- cy = t1 * c2y + t * p2y,
- alpha = (90 - math.atan2(mx - nx, my - ny) * 180 / PI);
- (mx > nx || my < ny) && (alpha += 180);
- return {
- x: x,
- y: y,
- m: {x: mx, y: my},
- n: {x: nx, y: ny},
- start: {x: ax, y: ay},
- end: {x: cx, y: cy},
- alpha: alpha
- };
- };
- /*\
- * Raphael.bezierBBox
- [ method ]
- **
- * Utility method
- **
- * Return bounding box of a given cubic bezier curve
- > Parameters
- - p1x (number) x of the first point of the curve
- - p1y (number) y of the first point of the curve
- - c1x (number) x of the first anchor of the curve
- - c1y (number) y of the first anchor of the curve
- - c2x (number) x of the second anchor of the curve
- - c2y (number) y of the second anchor of the curve
- - p2x (number) x of the second point of the curve
- - p2y (number) y of the second point of the curve
- * or
- - bez (array) array of six points for bezier curve
- = (object) point information in format:
- o {
- o min: {
- o x: (number) x coordinate of the left point
- o y: (number) y coordinate of the top point
- o }
- o max: {
- o x: (number) x coordinate of the right point
- o y: (number) y coordinate of the bottom point
- o }
- o }
- \*/
- R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
- if (!R.is(p1x, "array")) {
- p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y];
- }
- var bbox = curveDim.apply(null, p1x);
- return {
- x: bbox.min.x,
- y: bbox.min.y,
- x2: bbox.max.x,
- y2: bbox.max.y,
- width: bbox.max.x - bbox.min.x,
- height: bbox.max.y - bbox.min.y
- };
- };
- /*\
- * Raphael.isPointInsideBBox
- [ method ]
- **
- * Utility method
- **
- * Returns `true` if given point is inside bounding boxes.
- > Parameters
- - bbox (string) bounding box
- - x (string) x coordinate of the point
- - y (string) y coordinate of the point
- = (boolean) `true` if point inside
- \*/
- R.isPointInsideBBox = function (bbox, x, y) {
- return x >= bbox.x && x <= bbox.x2 && y >= bbox.y && y <= bbox.y2;
- };
- /*\
- * Raphael.isBBoxIntersect
- [ method ]
- **
- * Utility method
- **
- * Returns `true` if two bounding boxes intersect
- > Parameters
- - bbox1 (string) first bounding box
- - bbox2 (string) second bounding box
- = (boolean) `true` if they intersect
- \*/
- R.isBBoxIntersect = function (bbox1, bbox2) {
- var i = R.isPointInsideBBox;
- return i(bbox2, bbox1.x, bbox1.y)
- || i(bbox2, bbox1.x2, bbox1.y)
- || i(bbox2, bbox1.x, bbox1.y2)
- || i(bbox2, bbox1.x2, bbox1.y2)
- || i(bbox1, bbox2.x, bbox2.y)
- || i(bbox1, bbox2.x2, bbox2.y)
- || i(bbox1, bbox2.x, bbox2.y2)
- || i(bbox1, bbox2.x2, bbox2.y2)
- || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x)
- && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y);
- };
- function base3(t, p1, p2, p3, p4) {
- var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4,
- t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;
- return t * t2 - 3 * p1 + 3 * p2;
- }
- function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {
- if (z == null) {
- z = 1;
- }
- z = z > 1 ? 1 : z < 0 ? 0 : z;
- var z2 = z / 2,
- n = 12,
- Tvalues = [-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816],
- Cvalues = [0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472],
- sum = 0;
- for (var i = 0; i < n; i++) {
- var ct = z2 * Tvalues[i] + z2,
- xbase = base3(ct, x1, x2, x3, x4),
- ybase = base3(ct, y1, y2, y3, y4),
- comb = xbase * xbase + ybase * ybase;
- sum += Cvalues[i] * math.sqrt(comb);
- }
- return z2 * sum;
- }
- function getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {
- if (ll < 0 || bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll) {
- return;
- }
- var t = 1,
- step = t / 2,
- t2 = t - step,
- l,
- e = .01;
- l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);
- while (abs(l - ll) > e) {
- step /= 2;
- t2 += (l < ll ? 1 : -1) * step;
- l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);
- }
- return t2;
- }
- function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {
- if (
- mmax(x1, x2) < mmin(x3, x4) ||
- mmin(x1, x2) > mmax(x3, x4) ||
- mmax(y1, y2) < mmin(y3, y4) ||
- mmin(y1, y2) > mmax(y3, y4)
- ) {
- return;
- }
- var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),
- ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),
- denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);
-
- if (!denominator) {
- return;
- }
- var px = nx / denominator,
- py = ny / denominator,
- px2 = +px.toFixed(2),
- py2 = +py.toFixed(2);
- if (
- px2 < +mmin(x1, x2).toFixed(2) ||
- px2 > +mmax(x1, x2).toFixed(2) ||
- px2 < +mmin(x3, x4).toFixed(2) ||
- px2 > +mmax(x3, x4).toFixed(2) ||
- py2 < +mmin(y1, y2).toFixed(2) ||
- py2 > +mmax(y1, y2).toFixed(2) ||
- py2 < +mmin(y3, y4).toFixed(2) ||
- py2 > +mmax(y3, y4).toFixed(2)
- ) {
- return;
- }
- return {x: px, y: py};
- }
- function inter(bez1, bez2) {
- return interHelper(bez1, bez2);
- }
- function interCount(bez1, bez2) {
- return interHelper(bez1, bez2, 1);
- }
- function interHelper(bez1, bez2, justCount) {
- var bbox1 = R.bezierBBox(bez1),
- bbox2 = R.bezierBBox(bez2);
- if (!R.isBBoxIntersect(bbox1, bbox2)) {
- return justCount ? 0 : [];
- }
- var l1 = bezlen.apply(0, bez1),
- l2 = bezlen.apply(0, bez2),
- n1 = mmax(~~(l1 / 5), 1),
- n2 = mmax(~~(l2 / 5), 1),
- dots1 = [],
- dots2 = [],
- xy = {},
- res = justCount ? 0 : [];
- for (var i = 0; i < n1 + 1; i++) {
- var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1));
- dots1.push({x: p.x, y: p.y, t: i / n1});
- }
- for (i = 0; i < n2 + 1; i++) {
- p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2));
- dots2.push({x: p.x, y: p.y, t: i / n2});
- }
- for (i = 0; i < n1; i++) {
- for (var j = 0; j < n2; j++) {
- var di = dots1[i],
- di1 = dots1[i + 1],
- dj = dots2[j],
- dj1 = dots2[j + 1],
- ci = abs(di1.x - di.x) < .001 ? "y" : "x",
- cj = abs(dj1.x - dj.x) < .001 ? "y" : "x",
- is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y);
- if (is) {
- if (xy[is.x.toFixed(4)] == is.y.toFixed(4)) {
- continue;
- }
- xy[is.x.toFixed(4)] = is.y.toFixed(4);
- var t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t),
- t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t);
- if (t1 >= 0 && t1 <= 1.001 && t2 >= 0 && t2 <= 1.001) {
- if (justCount) {
- res++;
- } else {
- res.push({
- x: is.x,
- y: is.y,
- t1: mmin(t1, 1),
- t2: mmin(t2, 1)
- });
- }
- }
- }
- }
- }
- return res;
- }
- /*\
- * Raphael.pathIntersection
- [ method ]
- **
- * Utility method
- **
- * Finds intersections of two paths
- > Parameters
- - path1 (string) path string
- - path2 (string) path string
- = (array) dots of intersection
- o [
- o {
- o x: (number) x coordinate of the point
- o y: (number) y coordinate of the point
- o t1: (number) t value for segment of path1
- o t2: (number) t value for segment of path2
- o segment1: (number) order number for segment of path1
- o segment2: (number) order number for segment of path2
- o bez1: (array) eight coordinates representing beziér curve for the segment of path1
- o bez2: (array) eight coordinates representing beziér curve for the segment of path2
- o }
- o ]
- \*/
- R.pathIntersection = function (path1, path2) {
- return interPathHelper(path1, path2);
- };
- R.pathIntersectionNumber = function (path1, path2) {
- return interPathHelper(path1, path2, 1);
- };
- function interPathHelper(path1, path2, justCount) {
- path1 = R._path2curve(path1);
- path2 = R._path2curve(path2);
- var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2,
- res = justCount ? 0 : [];
- for (var i = 0, ii = path1.length; i < ii; i++) {
- var pi = path1[i];
- if (pi[0] == "M") {
- x1 = x1m = pi[1];
- y1 = y1m = pi[2];
- } else {
- if (pi[0] == "C") {
- bez1 = [x1, y1].concat(pi.slice(1));
- x1 = bez1[6];
- y1 = bez1[7];
- } else {
- bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m];
- x1 = x1m;
- y1 = y1m;
- }
- for (var j = 0, jj = path2.length; j < jj; j++) {
- var pj = path2[j];
- if (pj[0] == "M") {
- x2 = x2m = pj[1];
- y2 = y2m = pj[2];
- } else {
- if (pj[0] == "C") {
- bez2 = [x2, y2].concat(pj.slice(1));
- x2 = bez2[6];
- y2 = bez2[7];
- } else {
- bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m];
- x2 = x2m;
- y2 = y2m;
- }
- var intr = interHelper(bez1, bez2, justCount);
- if (justCount) {
- res += intr;
- } else {
- for (var k = 0, kk = intr.length; k < kk; k++) {
- intr[k].segment1 = i;
- intr[k].segment2 = j;
- intr[k].bez1 = bez1;
- intr[k].bez2 = bez2;
- }
- res = res.concat(intr);
- }
- }
- }
- }
- }
- return res;
- }
- /*\
- * Raphael.isPointInsidePath
- [ method ]
- **
- * Utility method
- **
- * Returns `true` if given point is inside a given closed path.
- > Parameters
- - path (string) path string
- - x (number) x of the point
- - y (number) y of the point
- = (boolean) true, if point is inside the path
- \*/
- R.isPointInsidePath = function (path, x, y) {
- var bbox = R.pathBBox(path);
- return R.isPointInsideBBox(bbox, x, y) &&
- interPathHelper(path, [["M", x, y], ["H", bbox.x2 + 10]], 1) % 2 == 1;
- };
- R._removedFactory = function (methodname) {
- return function () {
- eve("raphael.log", null, "Rapha\xebl: you are calling to method \u201c" + methodname + "\u201d of removed object", methodname);
- };
- };
- /*\
- * Raphael.pathBBox
- [ method ]
- **
- * Utility method
- **
- * Return bounding box of a given path
- > Parameters
- - path (string) path string
- = (object) bounding box
- o {
- o x: (number) x coordinate of the left top point of the box
- o y: (number) y coordinate of the left top point of the box
- o x2: (number) x coordinate of the right bottom point of the box
- o y2: (number) y coordinate of the right bottom point of the box
- o width: (number) width of the box
- o height: (number) height of the box
- o cx: (number) x coordinate of the center of the box
- o cy: (number) y coordinate of the center of the box
- o }
- \*/
- var pathDimensions = R.pathBBox = function (path) {
- var pth = paths(path);
- if (pth.bbox) {
- return clone(pth.bbox);
- }
- if (!path) {
- return {x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0};
- }
- path = path2curve(path);
- var x = 0,
- y = 0,
- X = [],
- Y = [],
- p;
- for (var i = 0, ii = path.length; i < ii; i++) {
- p = path[i];
- if (p[0] == "M") {
- x = p[1];
- y = p[2];
- X.push(x);
- Y.push(y);
- } else {
- var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);
- X = X[concat](dim.min.x, dim.max.x);
- Y = Y[concat](dim.min.y, dim.max.y);
- x = p[5];
- y = p[6];
- }
- }
- var xmin = mmin[apply](0, X),
- ymin = mmin[apply](0, Y),
- xmax = mmax[apply](0, X),
- ymax = mmax[apply](0, Y),
- width = xmax - xmin,
- height = ymax - ymin,
- bb = {
- x: xmin,
- y: ymin,
- x2: xmax,
- y2: ymax,
- width: width,
- height: height,
- cx: xmin + width / 2,
- cy: ymin + height / 2
- };
- pth.bbox = clone(bb);
- return bb;
- },
- pathClone = function (pathArray) {
- var res = clone(pathArray);
- res.toString = R._path2string;
- return res;
- },
- pathToRelative = R._pathToRelative = function (pathArray) {
- var pth = paths(pathArray);
- if (pth.rel) {
- return pathClone(pth.rel);
- }
- if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption
- pathArray = R.parsePathString(pathArray);
- }
- var res = [],
- x = 0,
- y = 0,
- mx = 0,
- my = 0,
- start = 0;
- if (pathArray[0][0] == "M") {
- x = pathArray[0][1];
- y = pathArray[0][2];
- mx = x;
- my = y;
- start++;
- res.push(["M", x, y]);
- }
- for (var i = start, ii = pathArray.length; i < ii; i++) {
- var r = res[i] = [],
- pa = pathArray[i];
- if (pa[0] != lowerCase.call(pa[0])) {
- r[0] = lowerCase.call(pa[0]);
- switch (r[0]) {
- case "a":
- r[1] = pa[1];
- r[2] = pa[2];
- r[3] = pa[3];
- r[4] = pa[4];
- r[5] = pa[5];
- r[6] = +(pa[6] - x).toFixed(3);
- r[7] = +(pa[7] - y).toFixed(3);
- break;
- case "v":
- r[1] = +(pa[1] - y).toFixed(3);
- break;
- case "m":
- mx = pa[1];
- my = pa[2];
- default:
- for (var j = 1, jj = pa.length; j < jj; j++) {
- r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3);
- }
- }
- } else {
- r = res[i] = [];
- if (pa[0] == "m") {
- mx = pa[1] + x;
- my = pa[2] + y;
- }
- for (var k = 0, kk = pa.length; k < kk; k++) {
- res[i][k] = pa[k];
- }
- }
- var len = res[i].length;
- switch (res[i][0]) {
- case "z":
- x = mx;
- y = my;
- break;
- case "h":
- x += +res[i][len - 1];
- break;
- case "v":
- y += +res[i][len - 1];
- break;
- default:
- x += +res[i][len - 2];
- y += +res[i][len - 1];
- }
- }
- res.toString = R._path2string;
- pth.rel = pathClone(res);
- return res;
- },
- pathToAbsolute = R._pathToAbsolute = function (pathArray) {
- var pth = paths(pathArray);
- if (pth.abs) {
- return pathClone(pth.abs);
- }
- if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption
- pathArray = R.parsePathString(pathArray);
- }
- if (!pathArray || !pathArray.length) {
- return [["M", 0, 0]];
- }
- var res = [],
- x = 0,
- y = 0,
- mx = 0,
- my = 0,
- start = 0;
- if (pathArray[0][0] == "M") {
- x = +pathArray[0][1];
- y = +pathArray[0][2];
- mx = x;
- my = y;
- start++;
- res[0] = ["M", x, y];
- }
- var crz = pathArray.length == 3 && pathArray[0][0] == "M" && pathArray[1][0].toUpperCase() == "R" && pathArray[2][0].toUpperCase() == "Z";
- for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) {
- res.push(r = []);
- pa = pathArray[i];
- if (pa[0] != upperCase.call(pa[0])) {
- r[0] = upperCase.call(pa[0]);
- switch (r[0]) {
- case "A":
- r[1] = pa[1];
- r[2] = pa[2];
- r[3] = pa[3];
- r[4] = pa[4];
- r[5] = pa[5];
- r[6] = +(pa[6] + x);
- r[7] = +(pa[7] + y);
- break;
- case "V":
- r[1] = +pa[1] + y;
- break;
- case "H":
- r[1] = +pa[1] + x;
- break;
- case "R":
- var dots = [x, y][concat](pa.slice(1));
- for (var j = 2, jj = dots.length; j < jj; j++) {
- dots[j] = +dots[j] + x;
- dots[++j] = +dots[j] + y;
- }
- res.pop();
- res = res[concat](catmullRom2bezier(dots, crz));
- break;
- case "M":
- mx = +pa[1] + x;
- my = +pa[2] + y;
- default:
- for (j = 1, jj = pa.length; j < jj; j++) {
- r[j] = +pa[j] + ((j % 2) ? x : y);
- }
- }
- } else if (pa[0] == "R") {
- dots = [x, y][concat](pa.slice(1));
- res.pop();
- res = res[concat](catmullRom2bezier(dots, crz));
- r = ["R"][concat](pa.slice(-2));
- } else {
- for (var k = 0, kk = pa.length; k < kk; k++) {
- r[k] = pa[k];
- }
- }
- switch (r[0]) {
- case "Z":
- x = mx;
- y = my;
- break;
- case "H":
- x = r[1];
- break;
- case "V":
- y = r[1];
- break;
- case "M":
- mx = r[r.length - 2];
- my = r[r.length - 1];
- default:
- x = r[r.length - 2];
- y = r[r.length - 1];
- }
- }
- res.toString = R._path2string;
- pth.abs = pathClone(res);
- return res;
- },
- l2c = function (x1, y1, x2, y2) {
- return [x1, y1, x2, y2, x2, y2];
- },
- q2c = function (x1, y1, ax, ay, x2, y2) {
- var _13 = 1 / 3,
- _23 = 2 / 3;
- return [
- _13 * x1 + _23 * ax,
- _13 * y1 + _23 * ay,
- _13 * x2 + _23 * ax,
- _13 * y2 + _23 * ay,
- x2,
- y2
- ];
- },
- a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {
- // for more information of where this math came from visit:
- // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
- var _120 = PI * 120 / 180,
- rad = PI / 180 * (+angle || 0),
- res = [],
- xy,
- rotate = cacher(function (x, y, rad) {
- var X = x * math.cos(rad) - y * math.sin(rad),
- Y = x * math.sin(rad) + y * math.cos(rad);
- return {x: X, y: Y};
- });
- if (!recursive) {
- xy = rotate(x1, y1, -rad);
- x1 = xy.x;
- y1 = xy.y;
- xy = rotate(x2, y2, -rad);
- x2 = xy.x;
- y2 = xy.y;
- var cos = math.cos(PI / 180 * angle),
- sin = math.sin(PI / 180 * angle),
- x = (x1 - x2) / 2,
- y = (y1 - y2) / 2;
- var h = (x * x) / (rx * rx) + (y * y) / (ry * ry);
- if (h > 1) {
- h = math.sqrt(h);
- rx = h * rx;
- ry = h * ry;
- }
- var rx2 = rx * rx,
- ry2 = ry * ry,
- k = (large_arc_flag == sweep_flag ? -1 : 1) *
- math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))),
- cx = k * rx * y / ry + (x1 + x2) / 2,
- cy = k * -ry * x / rx + (y1 + y2) / 2,
- f1 = math.asin(((y1 - cy) / ry).toFixed(9)),
- f2 = math.asin(((y2 - cy) / ry).toFixed(9));
-
- f1 = x1 < cx ? PI - f1 : f1;
- f2 = x2 < cx ? PI - f2 : f2;
- f1 < 0 && (f1 = PI * 2 + f1);
- f2 < 0 && (f2 = PI * 2 + f2);
- if (sweep_flag && f1 > f2) {
- f1 = f1 - PI * 2;
- }
- if (!sweep_flag && f2 > f1) {
- f2 = f2 - PI * 2;
- }
- } else {
- f1 = recursive[0];
- f2 = recursive[1];
- cx = recursive[2];
- cy = recursive[3];
- }
- var df = f2 - f1;
- if (abs(df) > _120) {
- var f2old = f2,
- x2old = x2,
- y2old = y2;
- f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);
- x2 = cx + rx * math.cos(f2);
- y2 = cy + ry * math.sin(f2);
- res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);
- }
- df = f2 - f1;
- var c1 = math.cos(f1),
- s1 = math.sin(f1),
- c2 = math.cos(f2),
- s2 = math.sin(f2),
- t = math.tan(df / 4),
- hx = 4 / 3 * rx * t,
- hy = 4 / 3 * ry * t,
- m1 = [x1, y1],
- m2 = [x1 + hx * s1, y1 - hy * c1],
- m3 = [x2 + hx * s2, y2 - hy * c2],
- m4 = [x2, y2];
- m2[0] = 2 * m1[0] - m2[0];
- m2[1] = 2 * m1[1] - m2[1];
- if (recursive) {
- return [m2, m3, m4][concat](res);
- } else {
- res = [m2, m3, m4][concat](res).join()[split](",");
- var newres = [];
- for (var i = 0, ii = res.length; i < ii; i++) {
- newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;
- }
- return newres;
- }
- },
- findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
- var t1 = 1 - t;
- return {
- x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x,
- y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y
- };
- },
- curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
- var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x),
- b = 2 * (c1x - p1x) - 2 * (c2x - c1x),
- c = p1x - c1x,
- t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a,
- t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a,
- y = [p1y, p2y],
- x = [p1x, p2x],
- dot;
- abs(t1) > "1e12" && (t1 = .5);
- abs(t2) > "1e12" && (t2 = .5);
- if (t1 > 0 && t1 < 1) {
- dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);
- x.push(dot.x);
- y.push(dot.y);
- }
- if (t2 > 0 && t2 < 1) {
- dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);
- x.push(dot.x);
- y.push(dot.y);
- }
- a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y);
- b = 2 * (c1y - p1y) - 2 * (c2y - c1y);
- c = p1y - c1y;
- t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a;
- t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a;
- abs(t1) > "1e12" && (t1 = .5);
- abs(t2) > "1e12" && (t2 = .5);
- if (t1 > 0 && t1 < 1) {
- dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);
- x.push(dot.x);
- y.push(dot.y);
- }
- if (t2 > 0 && t2 < 1) {
- dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);
- x.push(dot.x);
- y.push(dot.y);
- }
- return {
- min: {x: mmin[apply](0, x), y: mmin[apply](0, y)},
- max: {x: mmax[apply](0, x), y: mmax[apply](0, y)}
- };
- }),
- path2curve = R._path2curve = cacher(function (path, path2) {
- var pth = !path2 && paths(path);
- if (!path2 && pth.curve) {
- return pathClone(pth.curve);
- }
- var p = pathToAbsolute(path),
- p2 = path2 && pathToAbsolute(path2),
- attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null},
- attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null},
- processPath = function (path, d, pcom) {
- var nx, ny, tq = {T:1, Q:1};
- if (!path) {
- return ["C", d.x, d.y, d.x, d.y, d.x, d.y];
- }
- !(path[0] in tq) && (d.qx = d.qy = null);
- switch (path[0]) {
- case "M":
- d.X = path[1];
- d.Y = path[2];
- break;
- case "A":
- path = ["C"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1))));
- break;
- case "S":
- if (pcom == "C" || pcom == "S") { // In "S" case we have to take into account, if the previous command is C/S.
- nx = d.x * 2 - d.bx; // And reflect the previous
- ny = d.y * 2 - d.by; // command's control point relative to the current point.
- }
- else { // or some else or nothing
- nx = d.x;
- ny = d.y;
- }
- path = ["C", nx, ny][concat](path.slice(1));
- break;
- case "T":
- if (pcom == "Q" || pcom == "T") { // In "T" case we have to take into account, if the previous command is Q/T.
- d.qx = d.x * 2 - d.qx; // And make a reflection similar
- d.qy = d.y * 2 - d.qy; // to case "S".
- }
- else { // or something else or nothing
- d.qx = d.x;
- d.qy = d.y;
- }
- path = ["C"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));
- break;
- case "Q":
- d.qx = path[1];
- d.qy = path[2];
- path = ["C"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4]));
- break;
- case "L":
- path = ["C"][concat](l2c(d.x, d.y, path[1], path[2]));
- break;
- case "H":
- path = ["C"][concat](l2c(d.x, d.y, path[1], d.y));
- break;
- case "V":
- path = ["C"][concat](l2c(d.x, d.y, d.x, path[1]));
- break;
- case "Z":
- path = ["C"][concat](l2c(d.x, d.y, d.X, d.Y));
- break;
- }
- return path;
- },
- fixArc = function (pp, i) {
- if (pp[i].length > 7) {
- pp[i].shift();
- var pi = pp[i];
- while (pi.length) {
- pcoms1[i]="A"; // if created multiple C:s, their original seg is saved
- p2 && (pcoms2[i]="A"); // the same as above
- pp.splice(i++, 0, ["C"][concat](pi.splice(0, 6)));
- }
- pp.splice(i, 1);
- ii = mmax(p.length, p2 && p2.length || 0);
- }
- },
- fixM = function (path1, path2, a1, a2, i) {
- if (path1 && path2 && path1[i][0] == "M" && path2[i][0] != "M") {
- path2.splice(i, 0, ["M", a2.x, a2.y]);
- a1.bx = 0;
- a1.by = 0;
- a1.x = path1[i][1];
- a1.y = path1[i][2];
- ii = mmax(p.length, p2 && p2.length || 0);
- }
- },
- pcoms1 = [], // path commands of original path p
- pcoms2 = [], // path commands of original path p2
- pfirst = "", // temporary holder for original path command
- pcom = ""; // holder for previous path command of original path
- for (var i = 0, ii = mmax(p.length, p2 && p2.length || 0); i < ii; i++) {
- p[i] && (pfirst = p[i][0]); // save current path command
-
- if (pfirst != "C") // C is not saved yet, because it may be result of conversion
- {
- pcoms1[i] = pfirst; // Save current path command
- i && ( pcom = pcoms1[i-1]); // Get previous path command pcom
- }
- p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath
-
- if (pcoms1[i] != "A" && pfirst == "C") pcoms1[i] = "C"; // A is the only command
- // which may produce multiple C:s
- // so we have to make sure that C is also C in original path
-
- fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1
-
- if (p2) { // the same procedures is done to p2
- p2[i] && (pfirst = p2[i][0]);
- if (pfirst != "C")
- {
- pcoms2[i] = pfirst;
- i && (pcom = pcoms2[i-1]);
- }
- p2[i] = processPath(p2[i], attrs2, pcom);
-
- if (pcoms2[i]!="A" && pfirst=="C") pcoms2[i]="C";
-
- fixArc(p2, i);
- }
- fixM(p, p2, attrs, attrs2, i);
- fixM(p2, p, attrs2, attrs, i);
- var seg = p[i],
- seg2 = p2 && p2[i],
- seglen = seg.length,
- seg2len = p2 && seg2.length;
- attrs.x = seg[seglen - 2];
- attrs.y = seg[seglen - 1];
- attrs.bx = toFloat(seg[seglen - 4]) || attrs.x;
- attrs.by = toFloat(seg[seglen - 3]) || attrs.y;
- attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x);
- attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y);
- attrs2.x = p2 && seg2[seg2len - 2];
- attrs2.y = p2 && seg2[seg2len - 1];
- }
- if (!p2) {
- pth.curve = pathClone(p);
- }
- return p2 ? [p, p2] : p;
- }, null, pathClone),
- parseDots = R._parseDots = cacher(function (gradient) {
- var dots = [];
- for (var i = 0, ii = gradient.length; i < ii; i++) {
- var dot = {},
- par = gradient[i].match(/^([^:]*):?([\d\.]*)/);
- dot.color = R.getRGB(par[1]);
- if (dot.color.error) {
- return null;
- }
- dot.opacity = dot.color.opacity;
- dot.color = dot.color.hex;
- par[2] && (dot.offset = par[2] + "%");
- dots.push(dot);
- }
- for (i = 1, ii = dots.length - 1; i < ii; i++) {
- if (!dots[i].offset) {
- var start = toFloat(dots[i - 1].offset || 0),
- end = 0;
- for (var j = i + 1; j < ii; j++) {
- if (dots[j].offset) {
- end = dots[j].offset;
- break;
- }
- }
- if (!end) {
- end = 100;
- j = ii;
- }
- end = toFloat(end);
- var d = (end - start) / (j - i + 1);
- for (; i < j; i++) {
- start += d;
- dots[i].offset = start + "%";
- }
- }
- }
- return dots;
- }),
- tear = R._tear = function (el, paper) {
- el == paper.top && (paper.top = el.prev);
- el == paper.bottom && (paper.bottom = el.next);
- el.next && (el.next.prev = el.prev);
- el.prev && (el.prev.next = el.next);
- },
- tofront = R._tofront = function (el, paper) {
- if (paper.top === el) {
- return;
- }
- tear(el, paper);
- el.next = null;
- el.prev = paper.top;
- paper.top.next = el;
- paper.top = el;
- },
- toback = R._toback = function (el, paper) {
- if (paper.bottom === el) {
- return;
- }
- tear(el, paper);
- el.next = paper.bottom;
- el.prev = null;
- paper.bottom.prev = el;
- paper.bottom = el;
- },
- insertafter = R._insertafter = function (el, el2, paper) {
- tear(el, paper);
- el2 == paper.top && (paper.top = el);
- el2.next && (el2.next.prev = el);
- el.next = el2.next;
- el.prev = el2;
- el2.next = el;
- },
- insertbefore = R._insertbefore = function (el, el2, paper) {
- tear(el, paper);
- el2 == paper.bottom && (paper.bottom = el);
- el2.prev && (el2.prev.next = el);
- el.prev = el2.prev;
- el2.prev = el;
- el.next = el2;
- },
- /*\
- * Raphael.toMatrix
- [ method ]
- **
- * Utility method
- **
- * Returns matrix of transformations applied to a given path
- > Parameters
- - path (string) path string
- - transform (string|array) transformation string
- = (object) @Matrix
- \*/
- toMatrix = R.toMatrix = function (path, transform) {
- var bb = pathDimensions(path),
- el = {
- _: {
- transform: E
- },
- getBBox: function () {
- return bb;
- }
- };
- extractTransform(el, transform);
- return el.matrix;
- },
- /*\
- * Raphael.transformPath
- [ method ]
- **
- * Utility method
- **
- * Returns path transformed by a given transformation
- > Parameters
- - path (string) path string
- - transform (string|array) transformation string
- = (string) path
- \*/
- transformPath = R.transformPath = function (path, transform) {
- return mapPath(path, toMatrix(path, transform));
- },
- extractTransform = R._extractTransform = function (el, tstr) {
- if (tstr == null) {
- return el._.transform;
- }
- tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E);
- var tdata = R.parseTransformString(tstr),
- deg = 0,
- dx = 0,
- dy = 0,
- sx = 1,
- sy = 1,
- _ = el._,
- m = new Matrix;
- _.transform = tdata || [];
- if (tdata) {
- for (var i = 0, ii = tdata.length; i < ii; i++) {
- var t = tdata[i],
- tlen = t.length,
- command = Str(t[0]).toLowerCase(),
- absolute = t[0] != command,
- inver = absolute ? m.invert() : 0,
- x1,
- y1,
- x2,
- y2,
- bb;
- if (command == "t" && tlen == 3) {
- if (absolute) {
- x1 = inver.x(0, 0);
- y1 = inver.y(0, 0);
- x2 = inver.x(t[1], t[2]);
- y2 = inver.y(t[1], t[2]);
- m.translate(x2 - x1, y2 - y1);
- } else {
- m.translate(t[1], t[2]);
- }
- } else if (command == "r") {
- if (tlen == 2) {
- bb = bb || el.getBBox(1);
- m.rotate(t[1], bb.x + bb.width / 2, bb.y + bb.height / 2);
- deg += t[1];
- } else if (tlen == 4) {
- if (absolute) {
- x2 = inver.x(t[2], t[3]);
- y2 = inver.y(t[2], t[3]);
- m.rotate(t[1], x2, y2);
- } else {
- m.rotate(t[1], t[2], t[3]);
- }
- deg += t[1];
- }
- } else if (command == "s") {
- if (tlen == 2 || tlen == 3) {
- bb = bb || el.getBBox(1);
- m.scale(t[1], t[tlen - 1], bb.x + bb.width / 2, bb.y + bb.height / 2);
- sx *= t[1];
- sy *= t[tlen - 1];
- } else if (tlen == 5) {
- if (absolute) {
- x2 = inver.x(t[3], t[4]);
- y2 = inver.y(t[3], t[4]);
- m.scale(t[1], t[2], x2, y2);
- } else {
- m.scale(t[1], t[2], t[3], t[4]);
- }
- sx *= t[1];
- sy *= t[2];
- }
- } else if (command == "m" && tlen == 7) {
- m.add(t[1], t[2], t[3], t[4], t[5], t[6]);
- }
- _.dirtyT = 1;
- el.matrix = m;
- }
- }
-
- /*\
- * Element.matrix
- [ property (object) ]
- **
- * Keeps @Matrix object, which represents element transformation
- \*/
- el.matrix = m;
-
- _.sx = sx;
- _.sy = sy;
- _.deg = deg;
- _.dx = dx = m.e;
- _.dy = dy = m.f;
-
- if (sx == 1 && sy == 1 && !deg && _.bbox) {
- _.bbox.x += +dx;
- _.bbox.y += +dy;
- } else {
- _.dirtyT = 1;
- }
- },
- getEmpty = function (item) {
- var l = item[0];
- switch (l.toLowerCase()) {
- case "t": return [l, 0, 0];
- case "m": return [l, 1, 0, 0, 1, 0, 0];
- case "r": if (item.length == 4) {
- return [l, 0, item[2], item[3]];
- } else {
- return [l, 0];
- }
- case "s": if (item.length == 5) {
- return [l, 1, 1, item[3], item[4]];
- } else if (item.length == 3) {
- return [l, 1, 1];
- } else {
- return [l, 1];
- }
- }
- },
- equaliseTransform = R._equaliseTransform = function (t1, t2) {
- t2 = Str(t2).replace(/\.{3}|\u2026/g, t1);
- t1 = R.parseTransformString(t1) || [];
- t2 = R.parseTransformString(t2) || [];
- var maxlength = mmax(t1.length, t2.length),
- from = [],
- to = [],
- i = 0, j, jj,
- tt1, tt2;
- for (; i < maxlength; i++) {
- tt1 = t1[i] || getEmpty(t2[i]);
- tt2 = t2[i] || getEmpty(tt1);
- if ((tt1[0] != tt2[0]) ||
- (tt1[0].toLowerCase() == "r" && (tt1[2] != tt2[2] || tt1[3] != tt2[3])) ||
- (tt1[0].toLowerCase() == "s" && (tt1[3] != tt2[3] || tt1[4] != tt2[4]))
- ) {
- return;
- }
- from[i] = [];
- to[i] = [];
- for (j = 0, jj = mmax(tt1.length, tt2.length); j < jj; j++) {
- j in tt1 && (from[i][j] = tt1[j]);
- j in tt2 && (to[i][j] = tt2[j]);
- }
- }
- return {
- from: from,
- to: to
- };
- };
- R._getContainer = function (x, y, w, h) {
- var container;
- container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x;
- if (container == null) {
- return;
- }
- if (container.tagName) {
- if (y == null) {
- return {
- container: container,
- width: container.style.pixelWidth || container.offsetWidth,
- height: container.style.pixelHeight || container.offsetHeight
- };
- } else {
- return {
- container: container,
- width: y,
- height: w
- };
- }
- }
- return {
- container: 1,
- x: x,
- y: y,
- width: w,
- height: h
- };
- };
- /*\
- * Raphael.pathToRelative
- [ method ]
- **
- * Utility method
- **
- * Converts path to relative form
- > Parameters
- - pathString (string|array) path string or array of segments
- = (array) array of segments.
- \*/
- R.pathToRelative = pathToRelative;
- R._engine = {};
- /*\
- * Raphael.path2curve
- [ method ]
- **
- * Utility method
- **
- * Converts path to a new path where all segments are cubic bezier curves.
- > Parameters
- - pathString (string|array) path string or array of segments
- = (array) array of segments.
- \*/
- R.path2curve = path2curve;
- /*\
- * Raphael.matrix
- [ method ]
- **
- * Utility method
- **
- * Returns matrix based on given parameters.
- > Parameters
- - a (number)
- - b (number)
- - c (number)
- - d (number)
- - e (number)
- - f (number)
- = (object) @Matrix
- \*/
- R.matrix = function (a, b, c, d, e, f) {
- return new Matrix(a, b, c, d, e, f);
- };
- function Matrix(a, b, c, d, e, f) {
- if (a != null) {
- this.a = +a;
- this.b = +b;
- this.c = +c;
- this.d = +d;
- this.e = +e;
- this.f = +f;
- } else {
- this.a = 1;
- this.b = 0;
- this.c = 0;
- this.d = 1;
- this.e = 0;
- this.f = 0;
- }
- }
- (function (matrixproto) {
- /*\
- * Matrix.add
- [ method ]
- **
- * Adds given matrix to existing one.
- > Parameters
- - a (number)
- - b (number)
- - c (number)
- - d (number)
- - e (number)
- - f (number)
- or
- - matrix (object) @Matrix
- \*/
- matrixproto.add = function (a, b, c, d, e, f) {
- var out = [[], [], []],
- m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]],
- matrix = [[a, c, e], [b, d, f], [0, 0, 1]],
- x, y, z, res;
-
- if (a && a instanceof Matrix) {
- matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]];
- }
-
- for (x = 0; x < 3; x++) {
- for (y = 0; y < 3; y++) {
- res = 0;
- for (z = 0; z < 3; z++) {
- res += m[x][z] * matrix[z][y];
- }
- out[x][y] = res;
- }
- }
- this.a = out[0][0];
- this.b = out[1][0];
- this.c = out[0][1];
- this.d = out[1][1];
- this.e = out[0][2];
- this.f = out[1][2];
- };
- /*\
- * Matrix.invert
- [ method ]
- **
- * Returns inverted version of the matrix
- = (object) @Matrix
- \*/
- matrixproto.invert = function () {
- var me = this,
- x = me.a * me.d - me.b * me.c;
- return new Matrix(me.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me.f) / x);
- };
- /*\
- * Matrix.clone
- [ method ]
- **
- * Returns copy of the matrix
- = (object) @Matrix
- \*/
- matrixproto.clone = function () {
- return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f);
- };
- /*\
- * Matrix.translate
- [ method ]
- **
- * Translate the matrix
- > Parameters
- - x (number)
- - y (number)
- \*/
- matrixproto.translate = function (x, y) {
- this.add(1, 0, 0, 1, x, y);
- };
- /*\
- * Matrix.scale
- [ method ]
- **
- * Scales the matrix
- > Parameters
- - x (number)
- - y (number) #optional
- - cx (number) #optional
- - cy (number) #optional
- \*/
- matrixproto.scale = function (x, y, cx, cy) {
- y == null && (y = x);
- (cx || cy) && this.add(1, 0, 0, 1, cx, cy);
- this.add(x, 0, 0, y, 0, 0);
- (cx || cy) && this.add(1, 0, 0, 1, -cx, -cy);
- };
- /*\
- * Matrix.rotate
- [ method ]
- **
- * Rotates the matrix
- > Parameters
- - a (number)
- - x (number)
- - y (number)
- \*/
- matrixproto.rotate = function (a, x, y) {
- a = R.rad(a);
- x = x || 0;
- y = y || 0;
- var cos = +math.cos(a).toFixed(9),
- sin = +math.sin(a).toFixed(9);
- this.add(cos, sin, -sin, cos, x, y);
- this.add(1, 0, 0, 1, -x, -y);
- };
- /*\
- * Matrix.x
- [ method ]
- **
- * Return x coordinate for given point after transformation described by the matrix. See also @Matrix.y
- > Parameters
- - x (number)
- - y (number)
- = (number) x
- \*/
- matrixproto.x = function (x, y) {
- return x * this.a + y * this.c + this.e;
- };
- /*\
- * Matrix.y
- [ method ]
- **
- * Return y coordinate for given point after transformation described by the matrix. See also @Matrix.x
- > Parameters
- - x (number)
- - y (number)
- = (number) y
- \*/
- matrixproto.y = function (x, y) {
- return x * this.b + y * this.d + this.f;
- };
- matrixproto.get = function (i) {
- return +this[Str.fromCharCode(97 + i)].toFixed(4);
- };
- matrixproto.toString = function () {
- return R.svg ?
- "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" :
- [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join();
- };
- matrixproto.toFilter = function () {
- return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) +
- ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) +
- ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod='auto expand')";
- };
- matrixproto.offset = function () {
- return [this.e.toFixed(4), this.f.toFixed(4)];
- };
- function norm(a) {
- return a[0] * a[0] + a[1] * a[1];
- }
- function normalize(a) {
- var mag = math.sqrt(norm(a));
- a[0] && (a[0] /= mag);
- a[1] && (a[1] /= mag);
- }
- /*\
- * Matrix.split
- [ method ]
- **
- * Splits matrix into primitive transformations
- = (object) in format:
- o dx (number) translation by x
- o dy (number) translation by y
- o scalex (number) scale by x
- o scaley (number) scale by y
- o shear (number) shear
- o rotate (number) rotation in deg
- o isSimple (boolean) could it be represented via simple transformations
- \*/
- matrixproto.split = function () {
- var out = {};
- // translation
- out.dx = this.e;
- out.dy = this.f;
-
- // scale and shear
- var row = [[this.a, this.c], [this.b, this.d]];
- out.scalex = math.sqrt(norm(row[0]));
- normalize(row[0]);
-
- out.shear = row[0][0] * row[1][0] + row[0][1] * row[1][1];
- row[1] = [row[1][0] - row[0][0] * out.shear, row[1][1] - row[0][1] * out.shear];
-
- out.scaley = math.sqrt(norm(row[1]));
- normalize(row[1]);
- out.shear /= out.scaley;
-
- // rotation
- var sin = -row[0][1],
- cos = row[1][1];
- if (cos < 0) {
- out.rotate = R.deg(math.acos(cos));
- if (sin < 0) {
- out.rotate = 360 - out.rotate;
- }
- } else {
- out.rotate = R.deg(math.asin(sin));
- }
-
- out.isSimple = !+out.shear.toFixed(9) && (out.scalex.toFixed(9) == out.scaley.toFixed(9) || !out.rotate);
- out.isSuperSimple = !+out.shear.toFixed(9) && out.scalex.toFixed(9) == out.scaley.toFixed(9) && !out.rotate;
- out.noRotation = !+out.shear.toFixed(9) && !out.rotate;
- return out;
- };
- /*\
- * Matrix.toTransformString
- [ method ]
- **
- * Return transform string that represents given matrix
- = (string) transform string
- \*/
- matrixproto.toTransformString = function (shorter) {
- var s = shorter || this[split]();
- if (s.isSimple) {
- s.scalex = +s.scalex.toFixed(4);
- s.scaley = +s.scaley.toFixed(4);
- s.rotate = +s.rotate.toFixed(4);
- return (s.dx || s.dy ? "t" + [s.dx, s.dy] : E) +
- (s.scalex != 1 || s.scaley != 1 ? "s" + [s.scalex, s.scaley, 0, 0] : E) +
- (s.rotate ? "r" + [s.rotate, 0, 0] : E);
- } else {
- return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)];
- }
- };
- })(Matrix.prototype);
-
- var preventDefault = function () {
- this.returnValue = false;
- },
- preventTouch = function () {
- return this.originalEvent.preventDefault();
- },
- stopPropagation = function () {
- this.cancelBubble = true;
- },
- stopTouch = function () {
- return this.originalEvent.stopPropagation();
- },
- getEventPosition = function (e) {
- var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,
- scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft;
-
- return {
- x: e.clientX + scrollX,
- y: e.clientY + scrollY
- };
- },
- addEvent = (function () {
- if (g.doc.addEventListener) {
- return function (obj, type, fn, element) {
- var f = function (e) {
- var pos = getEventPosition(e);
- return fn.call(element, e, pos.x, pos.y);
- };
- obj.addEventListener(type, f, false);
-
- if (supportsTouch && touchMap[type]) {
- var _f = function (e) {
- var pos = getEventPosition(e),
- olde = e;
-
- for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) {
- if (e.targetTouches[i].target == obj) {
- e = e.targetTouches[i];
- e.originalEvent = olde;
- e.preventDefault = preventTouch;
- e.stopPropagation = stopTouch;
- break;
- }
- }
-
- return fn.call(element, e, pos.x, pos.y);
- };
- obj.addEventListener(touchMap[type], _f, false);
- }
-
- return function () {
- obj.removeEventListener(type, f, false);
-
- if (supportsTouch && touchMap[type])
- obj.removeEventListener(touchMap[type], _f, false);
-
- return true;
- };
- };
- } else if (g.doc.attachEvent) {
- return function (obj, type, fn, element) {
- var f = function (e) {
- e = e || g.win.event;
- var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,
- scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,
- x = e.clientX + scrollX,
- y = e.clientY + scrollY;
- e.preventDefault = e.preventDefault || preventDefault;
- e.stopPropagation = e.stopPropagation || stopPropagation;
- return fn.call(element, e, x, y);
- };
- obj.attachEvent("on" + type, f);
- var detacher = function () {
- obj.detachEvent("on" + type, f);
- return true;
- };
- return detacher;
- };
- }
- })(),
- drag = [],
- dragMove = function (e) {
- var x = e.clientX,
- y = e.clientY,
- scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,
- scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,
- dragi,
- j = drag.length;
- while (j--) {
- dragi = drag[j];
- if (supportsTouch && e.touches) {
- var i = e.touches.length,
- touch;
- while (i--) {
- touch = e.touches[i];
- if (touch.identifier == dragi.el._drag.id) {
- x = touch.clientX;
- y = touch.clientY;
- (e.originalEvent ? e.originalEvent : e).preventDefault();
- break;
- }
- }
- } else {
- e.preventDefault();
- }
- var node = dragi.el.node,
- o,
- next = node.nextSibling,
- parent = node.parentNode,
- display = node.style.display;
- g.win.opera && parent.removeChild(node);
- node.style.display = "none";
- o = dragi.el.paper.getElementByPoint(x, y);
- node.style.display = display;
- g.win.opera && (next ? parent.insertBefore(node, next) : parent.appendChild(node));
- o && eve("raphael.drag.over." + dragi.el.id, dragi.el, o);
- x += scrollX;
- y += scrollY;
- eve("raphael.drag.move." + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e);
- }
- },
- dragUp = function (e) {
- R.unmousemove(dragMove).unmouseup(dragUp);
- var i = drag.length,
- dragi;
- while (i--) {
- dragi = drag[i];
- dragi.el._drag = {};
- eve("raphael.drag.end." + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e);
- }
- drag = [];
- },
- /*\
- * Raphael.el
- [ property (object) ]
- **
- * You can add your own method to elements. This is useful when you want to hack default functionality or
- * want to wrap some common transformation or attributes in one method. In difference to canvas methods,
- * you can redefine element method at any time. Expending element methods wouldn’t affect set.
- > Usage
- | Raphael.el.red = function () {
- | this.attr({fill: "#f00"});
- | };
- | // then use it
- | paper.circle(100, 100, 20).red();
- \*/
- elproto = R.el = {};
- /*\
- * Element.click
- [ method ]
- **
- * Adds event handler for click for the element.
- > Parameters
- - handler (function) handler for the event
- = (object) @Element
- \*/
- /*\
- * Element.unclick
- [ method ]
- **
- * Removes event handler for click for the element.
- > Parameters
- - handler (function) #optional handler for the event
- = (object) @Element
- \*/
-
- /*\
- * Element.dblclick
- [ method ]
- **
- * Adds event handler for double click for the element.
- > Parameters
- - handler (function) handler for the event
- = (object) @Element
- \*/
- /*\
- * Element.undblclick
- [ method ]
- **
- * Removes event handler for double click for the element.
- > Parameters
- - handler (function) #optional handler for the event
- = (object) @Element
- \*/
-
- /*\
- * Element.mousedown
- [ method ]
- **
- * Adds event handler for mousedown for the element.
- > Parameters
- - handler (function) handler for the event
- = (object) @Element
- \*/
- /*\
- * Element.unmousedown
- [ method ]
- **
- * Removes event handler for mousedown for the element.
- > Parameters
- - handler (function) #optional handler for the event
- = (object) @Element
- \*/
-
- /*\
- * Element.mousemove
- [ method ]
- **
- * Adds event handler for mousemove for the element.
- > Parameters
- - handler (function) handler for the event
- = (object) @Element
- \*/
- /*\
- * Element.unmousemove
- [ method ]
- **
- * Removes event handler for mousemove for the element.
- > Parameters
- - handler (function) #optional handler for the event
- = (object) @Element
- \*/
-
- /*\
- * Element.mouseout
- [ method ]
- **
- * Adds event handler for mouseout for the element.
- > Parameters
- - handler (function) handler for the event
- = (object) @Element
- \*/
- /*\
- * Element.unmouseout
- [ method ]
- **
- * Removes event handler for mouseout for the element.
- > Parameters
- - handler (function) #optional handler for the event
- = (object) @Element
- \*/
-
- /*\
- * Element.mouseover
- [ method ]
- **
- * Adds event handler for mouseover for the element.
- > Parameters
- - handler (function) handler for the event
- = (object) @Element
- \*/
- /*\
- * Element.unmouseover
- [ method ]
- **
- * Removes event handler for mouseover for the element.
- > Parameters
- - handler (function) #optional handler for the event
- = (object) @Element
- \*/
-
- /*\
- * Element.mouseup
- [ method ]
- **
- * Adds event handler for mouseup for the element.
- > Parameters
- - handler (function) handler for the event
- = (object) @Element
- \*/
- /*\
- * Element.unmouseup
- [ method ]
- **
- * Removes event handler for mouseup for the element.
- > Parameters
- - handler (function) #optional handler for the event
- = (object) @Element
- \*/
-
- /*\
- * Element.touchstart
- [ method ]
- **
- * Adds event handler for touchstart for the element.
- > Parameters
- - handler (function) handler for the event
- = (object) @Element
- \*/
- /*\
- * Element.untouchstart
- [ method ]
- **
- * Removes event handler for touchstart for the element.
- > Parameters
- - handler (function) #optional handler for the event
- = (object) @Element
- \*/
-
- /*\
- * Element.touchmove
- [ method ]
- **
- * Adds event handler for touchmove for the element.
- > Parameters
- - handler (function) handler for the event
- = (object) @Element
- \*/
- /*\
- * Element.untouchmove
- [ method ]
- **
- * Removes event handler for touchmove for the element.
- > Parameters
- - handler (function) #optional handler for the event
- = (object) @Element
- \*/
-
- /*\
- * Element.touchend
- [ method ]
- **
- * Adds event handler for touchend for the element.
- > Parameters
- - handler (function) handler for the event
- = (object) @Element
- \*/
- /*\
- * Element.untouchend
- [ method ]
- **
- * Removes event handler for touchend for the element.
- > Parameters
- - handler (function) #optional handler for the event
- = (object) @Element
- \*/
-
- /*\
- * Element.touchcancel
- [ method ]
- **
- * Adds event handler for touchcancel for the element.
- > Parameters
- - handler (function) handler for the event
- = (object) @Element
- \*/
- /*\
- * Element.untouchcancel
- [ method ]
- **
- * Removes event handler for touchcancel for the element.
- > Parameters
- - handler (function) #optional handler for the event
- = (object) @Element
- \*/
- for (var i = events.length; i--;) {
- (function (eventName) {
- R[eventName] = elproto[eventName] = function (fn, scope) {
- if (R.is(fn, "function")) {
- this.events = this.events || [];
- this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node || g.doc, eventName, fn, scope || this)});
- }
- return this;
- };
- R["un" + eventName] = elproto["un" + eventName] = function (fn) {
- var events = this.events || [],
- l = events.length;
- while (l--){
- if (events[l].name == eventName && (R.is(fn, "undefined") || events[l].f == fn)) {
- events[l].unbind();
- events.splice(l, 1);
- !events.length && delete this.events;
- }
- }
- return this;
- };
- })(events[i]);
- }
-
- /*\
- * Element.data
- [ method ]
- **
- * Adds or retrieves given value associated with given key.
- **
- * See also @Element.removeData
- > Parameters
- - key (string) key to store data
- - value (any) #optional value to store
- = (object) @Element
- * or, if value is not specified:
- = (any) value
- * or, if key and value are not specified:
- = (object) Key/value pairs for all the data associated with the element.
- > Usage
- | for (var i = 0, i < 5, i++) {
- | paper.circle(10 + 15 * i, 10, 10)
- | .attr({fill: "#000"})
- | .data("i", i)
- | .click(function () {
- | alert(this.data("i"));
- | });
- | }
- \*/
- elproto.data = function (key, value) {
- var data = eldata[this.id] = eldata[this.id] || {};
- if (arguments.length == 0) {
- return data;
- }
- if (arguments.length == 1) {
- if (R.is(key, "object")) {
- for (var i in key) if (key[has](i)) {
- this.data(i, key[i]);
- }
- return this;
- }
- eve("raphael.data.get." + this.id, this, data[key], key);
- return data[key];
- }
- data[key] = value;
- eve("raphael.data.set." + this.id, this, value, key);
- return this;
- };
- /*\
- * Element.removeData
- [ method ]
- **
- * Removes value associated with an element by given key.
- * If key is not provided, removes all the data of the element.
- > Parameters
- - key (string) #optional key
- = (object) @Element
- \*/
- elproto.removeData = function (key) {
- if (key == null) {
- eldata[this.id] = {};
- } else {
- eldata[this.id] && delete eldata[this.id][key];
- }
- return this;
- };
- /*\
- * Element.getData
- [ method ]
- **
- * Retrieves the element data
- = (object) data
- \*/
- elproto.getData = function () {
- return clone(eldata[this.id] || {});
- };
- /*\
- * Element.hover
- [ method ]
- **
- * Adds event handlers for hover for the element.
- > Parameters
- - f_in (function) handler for hover in
- - f_out (function) handler for hover out
- - icontext (object) #optional context for hover in handler
- - ocontext (object) #optional context for hover out handler
- = (object) @Element
- \*/
- elproto.hover = function (f_in, f_out, scope_in, scope_out) {
- return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in);
- };
- /*\
- * Element.unhover
- [ method ]
- **
- * Removes event handlers for hover for the element.
- > Parameters
- - f_in (function) handler for hover in
- - f_out (function) handler for hover out
- = (object) @Element
- \*/
- elproto.unhover = function (f_in, f_out) {
- return this.unmouseover(f_in).unmouseout(f_out);
- };
- var draggable = [];
- /*\
- * Element.drag
- [ method ]
- **
- * Adds event handlers for drag of the element.
- > Parameters
- - onmove (function) handler for moving
- - onstart (function) handler for drag start
- - onend (function) handler for drag end
- - mcontext (object) #optional context for moving handler
- - scontext (object) #optional context for drag start handler
- - econtext (object) #optional context for drag end handler
- * Additionally following `drag` events will be triggered: `drag.start.<id>` on start,
- * `drag.end.<id>` on end and `drag.move.<id>` on every move. When element will be dragged over another element
- * `drag.over.<id>` will be fired as well.
- *
- * Start event and start handler will be called in specified context or in context of the element with following parameters:
- o x (number) x position of the mouse
- o y (number) y position of the mouse
- o event (object) DOM event object
- * Move event and move handler will be called in specified context or in context of the element with following parameters:
- o dx (number) shift by x from the start point
- o dy (number) shift by y from the start point
- o x (number) x position of the mouse
- o y (number) y position of the mouse
- o event (object) DOM event object
- * End event and end handler will be called in specified context or in context of the element with following parameters:
- o event (object) DOM event object
- = (object) @Element
- \*/
- elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) {
- function start(e) {
- (e.originalEvent || e).preventDefault();
- var x = e.clientX,
- y = e.clientY,
- scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,
- scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft;
- this._drag.id = e.identifier;
- if (supportsTouch && e.touches) {
- var i = e.touches.length, touch;
- while (i--) {
- touch = e.touches[i];
- this._drag.id = touch.identifier;
- if (touch.identifier == this._drag.id) {
- x = touch.clientX;
- y = touch.clientY;
- break;
- }
- }
- }
- this._drag.x = x + scrollX;
- this._drag.y = y + scrollY;
- !drag.length && R.mousemove(dragMove).mouseup(dragUp);
- drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope});
- onstart && eve.on("raphael.drag.start." + this.id, onstart);
- onmove && eve.on("raphael.drag.move." + this.id, onmove);
- onend && eve.on("raphael.drag.end." + this.id, onend);
- eve("raphael.drag.start." + this.id, start_scope || move_scope || this, e.clientX + scrollX, e.clientY + scrollY, e);
- }
- this._drag = {};
- draggable.push({el: this, start: start});
- this.mousedown(start);
- return this;
- };
- /*\
- * Element.onDragOver
- [ method ]
- **
- * Shortcut for assigning event handler for `drag.over.<id>` event, where id is id of the element (see @Element.id).
- > Parameters
- - f (function) handler for event, first argument would be the element you are dragging over
- \*/
- elproto.onDragOver = function (f) {
- f ? eve.on("raphael.drag.over." + this.id, f) : eve.unbind("raphael.drag.over." + this.id);
- };
- /*\
- * Element.undrag
- [ method ]
- **
- * Removes all drag event handlers from given element.
- \*/
- elproto.undrag = function () {
- var i = draggable.length;
- while (i--) if (draggable[i].el == this) {
- this.unmousedown(draggable[i].start);
- draggable.splice(i, 1);
- eve.unbind("raphael.drag.*." + this.id);
- }
- !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp);
- drag = [];
- };
- /*\
- * Paper.circle
- [ method ]
- **
- * Draws a circle.
- **
- > Parameters
- **
- - x (number) x coordinate of the centre
- - y (number) y coordinate of the centre
- - r (number) radius
- = (object) Raphaël element object with type “circle”
- **
- > Usage
- | var c = paper.circle(50, 50, 40);
- \*/
- paperproto.circle = function (x, y, r) {
- var out = R._engine.circle(this, x || 0, y || 0, r || 0);
- this.__set__ && this.__set__.push(out);
- return out;
- };
- /*\
- * Paper.rect
- [ method ]
- *
- * Draws a rectangle.
- **
- > Parameters
- **
- - x (number) x coordinate of the top left corner
- - y (number) y coordinate of the top left corner
- - width (number) width
- - height (number) height
- - r (number) #optional radius for rounded corners, default is 0
- = (object) Raphaël element object with type “rect”
- **
- > Usage
- | // regular rectangle
- | var c = paper.rect(10, 10, 50, 50);
- | // rectangle with rounded corners
- | var c = paper.rect(40, 40, 50, 50, 10);
- \*/
- paperproto.rect = function (x, y, w, h, r) {
- var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0);
- this.__set__ && this.__set__.push(out);
- return out;
- };
- /*\
- * Paper.ellipse
- [ method ]
- **
- * Draws an ellipse.
- **
- > Parameters
- **
- - x (number) x coordinate of the centre
- - y (number) y coordinate of the centre
- - rx (number) horizontal radius
- - ry (number) vertical radius
- = (object) Raphaël element object with type “ellipse”
- **
- > Usage
- | var c = paper.ellipse(50, 50, 40, 20);
- \*/
- paperproto.ellipse = function (x, y, rx, ry) {
- var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0);
- this.__set__ && this.__set__.push(out);
- return out;
- };
- /*\
- * Paper.path
- [ method ]
- **
- * Creates a path element by given path data string.
- > Parameters
- - pathString (string) #optional path string in SVG format.
- * Path string consists of one-letter commands, followed by comma seprarated arguments in numercal form. Example:
- | "M10,20L30,40"
- * Here we can see two commands: “M”, with arguments `(10, 20)` and “L” with arguments `(30, 40)`. Upper case letter mean command is absolute, lower case—relative.
- *
- # <p>Here is short list of commands available, for more details see <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path's data attribute's format are described in the SVG specification.">SVG path string format</a>.</p>
- # <table><thead><tr><th>Command</th><th>Name</th><th>Parameters</th></tr></thead><tbody>
- # <tr><td>M</td><td>moveto</td><td>(x y)+</td></tr>
- # <tr><td>Z</td><td>closepath</td><td>(none)</td></tr>
- # <tr><td>L</td><td>lineto</td><td>(x y)+</td></tr>
- # <tr><td>H</td><td>horizontal lineto</td><td>x+</td></tr>
- # <tr><td>V</td><td>vertical lineto</td><td>y+</td></tr>
- # <tr><td>C</td><td>curveto</td><td>(x1 y1 x2 y2 x y)+</td></tr>
- # <tr><td>S</td><td>smooth curveto</td><td>(x2 y2 x y)+</td></tr>
- # <tr><td>Q</td><td>quadratic Bézier curveto</td><td>(x1 y1 x y)+</td></tr>
- # <tr><td>T</td><td>smooth quadratic Bézier curveto</td><td>(x y)+</td></tr>
- # <tr><td>A</td><td>elliptical arc</td><td>(rx ry x-axis-rotation large-arc-flag sweep-flag x y)+</td></tr>
- # <tr><td>R</td><td><a href="http://en.wikipedia.org/wiki/Catmull–Rom_spline#Catmull.E2.80.93Rom_spline">Catmull-Rom curveto</a>*</td><td>x1 y1 (x y)+</td></tr></tbody></table>
- * * “Catmull-Rom curveto” is a not standard SVG command and added in 2.0 to make life easier.
- * Note: there is a special case when path consist of just three commands: “M10,10R…z”. In this case path will smoothly connects to its beginning.
- > Usage
- | var c = paper.path("M10 10L90 90");
- | // draw a diagonal line:
- | // move to 10,10, line to 90,90
- * For example of path strings, check out these icons: http://raphaeljs.com/icons/
- \*/
- paperproto.path = function (pathString) {
- pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E);
- var out = R._engine.path(R.format[apply](R, arguments), this);
- this.__set__ && this.__set__.push(out);
- return out;
- };
- /*\
- * Paper.image
- [ method ]
- **
- * Embeds an image into the surface.
- **
- > Parameters
- **
- - src (string) URI of the source image
- - x (number) x coordinate position
- - y (number) y coordinate position
- - width (number) width of the image
- - height (number) height of the image
- = (object) Raphaël element object with type “image”
- **
- > Usage
- | var c = paper.image("apple.png", 10, 10, 80, 80);
- \*/
- paperproto.image = function (src, x, y, w, h) {
- var out = R._engine.image(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0);
- this.__set__ && this.__set__.push(out);
- return out;
- };
- /*\
- * Paper.text
- [ method ]
- **
- * Draws a text string. If you need line breaks, put “\n” in the string.
- **
- > Parameters
- **
- - x (number) x coordinate position
- - y (number) y coordinate position
- - text (string) The text string to draw
- = (object) Raphaël element object with type “text”
- **
- > Usage
- | var t = paper.text(50, 50, "Raphaël\nkicks\nbutt!");
- \*/
- paperproto.text = function (x, y, text) {
- var out = R._engine.text(this, x || 0, y || 0, Str(text));
- this.__set__ && this.__set__.push(out);
- return out;
- };
- /*\
- * Paper.set
- [ method ]
- **
- * Creates array-like object to keep and operate several elements at once.
- * Warning: it doesn’t create any elements for itself in the page, it just groups existing elements.
- * Sets act as pseudo elements — all methods available to an element can be used on a set.
- = (object) array-like object that represents set of elements
- **
- > Usage
- | var st = paper.set();
- | st.push(
- | paper.circle(10, 10, 5),
- | paper.circle(30, 10, 5)
- | );
- | st.attr({fill: "red"}); // changes the fill of both circles
- \*/
- paperproto.set = function (itemsArray) {
- !R.is(itemsArray, "array") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.length));
- var out = new Set(itemsArray);
- this.__set__ && this.__set__.push(out);
- out["paper"] = this;
- out["type"] = "set";
- return out;
- };
- /*\
- * Paper.setStart
- [ method ]
- **
- * Creates @Paper.set. All elements that will be created after calling this method and before calling
- * @Paper.setFinish will be added to the set.
- **
- > Usage
- | paper.setStart();
- | paper.circle(10, 10, 5),
- | paper.circle(30, 10, 5)
- | var st = paper.setFinish();
- | st.attr({fill: "red"}); // changes the fill of both circles
- \*/
- paperproto.setStart = function (set) {
- this.__set__ = set || this.set();
- };
- /*\
- * Paper.setFinish
- [ method ]
- **
- * See @Paper.setStart. This method finishes catching and returns resulting set.
- **
- = (object) set
- \*/
- paperproto.setFinish = function (set) {
- var out = this.__set__;
- delete this.__set__;
- return out;
- };
- /*\
- * Paper.getSize
- [ method ]
- **
- * Obtains current paper actual size.
- **
- = (object)
- \*/
- paperproto.getSize = function () {
- var container = this.canvas.parentNode;
- return {
- width: container.offsetWidth,
- height: container.offsetHeight
- };
- };
- /*\
- * Paper.setSize
- [ method ]
- **
- * If you need to change dimensions of the canvas call this method
- **
- > Parameters
- **
- - width (number) new width of the canvas
- - height (number) new height of the canvas
- \*/
- paperproto.setSize = function (width, height) {
- return R._engine.setSize.call(this, width, height);
- };
- /*\
- * Paper.setViewBox
- [ method ]
- **
- * Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by
- * specifying new boundaries.
- **
- > Parameters
- **
- - x (number) new x position, default is `0`
- - y (number) new y position, default is `0`
- - w (number) new width of the canvas
- - h (number) new height of the canvas
- - fit (boolean) `true` if you want graphics to fit into new boundary box
- \*/
- paperproto.setViewBox = function (x, y, w, h, fit) {
- return R._engine.setViewBox.call(this, x, y, w, h, fit);
- };
- /*\
- * Paper.top
- [ property ]
- **
- * Points to the topmost element on the paper
- \*/
- /*\
- * Paper.bottom
- [ property ]
- **
- * Points to the bottom element on the paper
- \*/
- paperproto.top = paperproto.bottom = null;
- /*\
- * Paper.raphael
- [ property ]
- **
- * Points to the @Raphael object/function
- \*/
- paperproto.raphael = R;
- var getOffset = function (elem) {
- var box = elem.getBoundingClientRect(),
- doc = elem.ownerDocument,
- body = doc.body,
- docElem = doc.documentElement,
- clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
- top = box.top + (g.win.pageYOffset || docElem.scrollTop || body.scrollTop ) - clientTop,
- left = box.left + (g.win.pageXOffset || docElem.scrollLeft || body.scrollLeft) - clientLeft;
- return {
- y: top,
- x: left
- };
- };
- /*\
- * Paper.getElementByPoint
- [ method ]
- **
- * Returns you topmost element under given point.
- **
- = (object) Raphaël element object
- > Parameters
- **
- - x (number) x coordinate from the top left corner of the window
- - y (number) y coordinate from the top left corner of the window
- > Usage
- | paper.getElementByPoint(mouseX, mouseY).attr({stroke: "#f00"});
- \*/
- paperproto.getElementByPoint = function (x, y) {
- var paper = this,
- svg = paper.canvas,
- target = g.doc.elementFromPoint(x, y);
- if (g.win.opera && target.tagName == "svg") {
- var so = getOffset(svg),
- sr = svg.createSVGRect();
- sr.x = x - so.x;
- sr.y = y - so.y;
- sr.width = sr.height = 1;
- var hits = svg.getIntersectionList(sr, null);
- if (hits.length) {
- target = hits[hits.length - 1];
- }
- }
- if (!target) {
- return null;
- }
- while (target.parentNode && target != svg.parentNode && !target.raphael) {
- target = target.parentNode;
- }
- target == paper.canvas.parentNode && (target = svg);
- target = target && target.raphael ? paper.getById(target.raphaelid) : null;
- return target;
- };
-
- /*\
- * Paper.getElementsByBBox
- [ method ]
- **
- * Returns set of elements that have an intersecting bounding box
- **
- > Parameters
- **
- - bbox (object) bbox to check with
- = (object) @Set
- \*/
- paperproto.getElementsByBBox = function (bbox) {
- var set = this.set();
- this.forEach(function (el) {
- if (R.isBBoxIntersect(el.getBBox(), bbox)) {
- set.push(el);
- }
- });
- return set;
- };
-
- /*\
- * Paper.getById
- [ method ]
- **
- * Returns you element by its internal ID.
- **
- > Parameters
- **
- - id (number) id
- = (object) Raphaël element object
- \*/
- paperproto.getById = function (id) {
- var bot = this.bottom;
- while (bot) {
- if (bot.id == id) {
- return bot;
- }
- bot = bot.next;
- }
- return null;
- };
- /*\
- * Paper.forEach
- [ method ]
- **
- * Executes given function for each element on the paper
- *
- * If callback function returns `false` it will stop loop running.
- **
- > Parameters
- **
- - callback (function) function to run
- - thisArg (object) context object for the callback
- = (object) Paper object
- > Usage
- | paper.forEach(function (el) {
- | el.attr({ stroke: "blue" });
- | });
- \*/
- paperproto.forEach = function (callback, thisArg) {
- var bot = this.bottom;
- while (bot) {
- if (callback.call(thisArg, bot) === false) {
- return this;
- }
- bot = bot.next;
- }
- return this;
- };
- /*\
- * Paper.getElementsByPoint
- [ method ]
- **
- * Returns set of elements that have common point inside
- **
- > Parameters
- **
- - x (number) x coordinate of the point
- - y (number) y coordinate of the point
- = (object) @Set
- \*/
- paperproto.getElementsByPoint = function (x, y) {
- var set = this.set();
- this.forEach(function (el) {
- if (el.isPointInside(x, y)) {
- set.push(el);
- }
- });
- return set;
- };
- function x_y() {
- return this.x + S + this.y;
- }
- function x_y_w_h() {
- return this.x + S + this.y + S + this.width + " \xd7 " + this.height;
- }
- /*\
- * Element.isPointInside
- [ method ]
- **
- * Determine if given point is inside this element’s shape
- **
- > Parameters
- **
- - x (number) x coordinate of the point
- - y (number) y coordinate of the point
- = (boolean) `true` if point inside the shape
- \*/
- elproto.isPointInside = function (x, y) {
- var rp = this.realPath = getPath[this.type](this);
- if (this.attr('transform') && this.attr('transform').length) {
- rp = R.transformPath(rp, this.attr('transform'));
- }
- return R.isPointInsidePath(rp, x, y);
- };
- /*\
- * Element.getBBox
- [ method ]
- **
- * Return bounding box for a given element
- **
- > Parameters
- **
- - isWithoutTransform (boolean) flag, `true` if you want to have bounding box before transformations. Default is `false`.
- = (object) Bounding box object:
- o {
- o x: (number) top left corner x
- o y: (number) top left corner y
- o x2: (number) bottom right corner x
- o y2: (number) bottom right corner y
- o width: (number) width
- o height: (number) height
- o }
- \*/
- elproto.getBBox = function (isWithoutTransform) {
- if (this.removed) {
- return {};
- }
- var _ = this._;
- if (isWithoutTransform) {
- if (_.dirty || !_.bboxwt) {
- this.realPath = getPath[this.type](this);
- _.bboxwt = pathDimensions(this.realPath);
- _.bboxwt.toString = x_y_w_h;
- _.dirty = 0;
- }
- return _.bboxwt;
- }
- if (_.dirty || _.dirtyT || !_.bbox) {
- if (_.dirty || !this.realPath) {
- _.bboxwt = 0;
- this.realPath = getPath[this.type](this);
- }
- _.bbox = pathDimensions(mapPath(this.realPath, this.matrix));
- _.bbox.toString = x_y_w_h;
- _.dirty = _.dirtyT = 0;
- }
- return _.bbox;
- };
- /*\
- * Element.clone
- [ method ]
- **
- = (object) clone of a given element
- **
- \*/
- elproto.clone = function () {
- if (this.removed) {
- return null;
- }
- var out = this.paper[this.type]().attr(this.attr());
- this.__set__ && this.__set__.push(out);
- return out;
- };
- /*\
- * Element.glow
- [ method ]
- **
- * Return set of elements that create glow-like effect around given element. See @Paper.set.
- *
- * Note: Glow is not connected to the element. If you change element attributes it won’t adjust itself.
- **
- > Parameters
- **
- - glow (object) #optional parameters object with all properties optional:
- o {
- o width (number) size of the glow, default is `10`
- o fill (boolean) will it be filled, default is `false`
- o opacity (number) opacity, default is `0.5`
- o offsetx (number) horizontal offset, default is `0`
- o offsety (number) vertical offset, default is `0`
- o color (string) glow colour, default is `black`
- o }
- = (object) @Paper.set of elements that represents glow
- \*/
- elproto.glow = function (glow) {
- if (this.type == "text") {
- return null;
- }
- glow = glow || {};
- var s = {
- width: (glow.width || 10) + (+this.attr("stroke-width") || 1),
- fill: glow.fill || false,
- opacity: glow.opacity == null ? .5 : glow.opacity,
- offsetx: glow.offsetx || 0,
- offsety: glow.offsety || 0,
- color: glow.color || "#000"
- },
- c = s.width / 2,
- r = this.paper,
- out = r.set(),
- path = this.realPath || getPath[this.type](this);
- path = this.matrix ? mapPath(path, this.matrix) : path;
- for (var i = 1; i < c + 1; i++) {
- out.push(r.path(path).attr({
- stroke: s.color,
- fill: s.fill ? s.color : "none",
- "stroke-linejoin": "round",
- "stroke-linecap": "round",
- "stroke-width": +(s.width / c * i).toFixed(3),
- opacity: +(s.opacity / c).toFixed(3)
- }));
- }
- return out.insertBefore(this).translate(s.offsetx, s.offsety);
- };
- var curveslengths = {},
- getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) {
- if (length == null) {
- return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y);
- } else {
- return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length));
- }
- },
- getLengthFactory = function (istotal, subpath) {
- return function (path, length, onlystart) {
- path = path2curve(path);
- var x, y, p, l, sp = "", subpaths = {}, point,
- len = 0;
- for (var i = 0, ii = path.length; i < ii; i++) {
- p = path[i];
- if (p[0] == "M") {
- x = +p[1];
- y = +p[2];
- } else {
- l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);
- if (len + l > length) {
- if (subpath && !subpaths.start) {
- point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);
- sp += ["C" + point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y];
- if (onlystart) {return sp;}
- subpaths.start = sp;
- sp = ["M" + point.x, point.y + "C" + point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]].join();
- len += l;
- x = +p[5];
- y = +p[6];
- continue;
- }
- if (!istotal && !subpath) {
- point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);
- return {x: point.x, y: point.y, alpha: point.alpha};
- }
- }
- len += l;
- x = +p[5];
- y = +p[6];
- }
- sp += p.shift() + p;
- }
- subpaths.end = sp;
- point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1);
- point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha});
- return point;
- };
- };
- var getTotalLength = getLengthFactory(1),
- getPointAtLength = getLengthFactory(),
- getSubpathsAtLength = getLengthFactory(0, 1);
- /*\
- * Raphael.getTotalLength
- [ method ]
- **
- * Returns length of the given path in pixels.
- **
- > Parameters
- **
- - path (string) SVG path string.
- **
- = (number) length.
- \*/
- R.getTotalLength = getTotalLength;
- /*\
- * Raphael.getPointAtLength
- [ method ]
- **
- * Return coordinates of the point located at the given length on the given path.
- **
- > Parameters
- **
- - path (string) SVG path string
- - length (number)
- **
- = (object) representation of the point:
- o {
- o x: (number) x coordinate
- o y: (number) y coordinate
- o alpha: (number) angle of derivative
- o }
- \*/
- R.getPointAtLength = getPointAtLength;
- /*\
- * Raphael.getSubpath
- [ method ]
- **
- * Return subpath of a given path from given length to given length.
- **
- > Parameters
- **
- - path (string) SVG path string
- - from (number) position of the start of the segment
- - to (number) position of the end of the segment
- **
- = (string) pathstring for the segment
- \*/
- R.getSubpath = function (path, from, to) {
- if (this.getTotalLength(path) - to < 1e-6) {
- return getSubpathsAtLength(path, from).end;
- }
- var a = getSubpathsAtLength(path, to, 1);
- return from ? getSubpathsAtLength(a, from).end : a;
- };
- /*\
- * Element.getTotalLength
- [ method ]
- **
- * Returns length of the path in pixels. Only works for element of “path” type.
- = (number) length.
- \*/
- elproto.getTotalLength = function () {
- var path = this.getPath();
- if (!path) {
- return;
- }
-
- if (this.node.getTotalLength) {
- return this.node.getTotalLength();
- }
-
- return getTotalLength(path);
- };
- /*\
- * Element.getPointAtLength
- [ method ]
- **
- * Return coordinates of the point located at the given length on the given path. Only works for element of “path” type.
- **
- > Parameters
- **
- - length (number)
- **
- = (object) representation of the point:
- o {
- o x: (number) x coordinate
- o y: (number) y coordinate
- o alpha: (number) angle of derivative
- o }
- \*/
- elproto.getPointAtLength = function (length) {
- var path = this.getPath();
- if (!path) {
- return;
- }
-
- return getPointAtLength(path, length);
- };
- /*\
- * Element.getPath
- [ method ]
- **
- * Returns path of the element. Only works for elements of “path” type and simple elements like circle.
- = (object) path
- **
- \*/
- elproto.getPath = function () {
- var path,
- getPath = R._getPath[this.type];
-
- if (this.type == "text" || this.type == "set") {
- return;
- }
-
- if (getPath) {
- path = getPath(this);
- }
-
- return path;
- };
- /*\
- * Element.getSubpath
- [ method ]
- **
- * Return subpath of a given element from given length to given length. Only works for element of “path” type.
- **
- > Parameters
- **
- - from (number) position of the start of the segment
- - to (number) position of the end of the segment
- **
- = (string) pathstring for the segment
- \*/
- elproto.getSubpath = function (from, to) {
- var path = this.getPath();
- if (!path) {
- return;
- }
-
- return R.getSubpath(path, from, to);
- };
- /*\
- * Raphael.easing_formulas
- [ property ]
- **
- * Object that contains easing formulas for animation. You could extend it with your own. By default it has following list of easing:
- # <ul>
- # <li>“linear”</li>
- # <li>“&lt;” or “easeIn” or “ease-in”</li>
- # <li>“>” or “easeOut” or “ease-out”</li>
- # <li>“&lt;>” or “easeInOut” or “ease-in-out”</li>
- # <li>“backIn” or “back-in”</li>
- # <li>“backOut” or “back-out”</li>
- # <li>“elastic”</li>
- # <li>“bounce”</li>
- # </ul>
- # <p>See also <a href="http://raphaeljs.com/easing.html">Easing demo</a>.</p>
- \*/
- var ef = R.easing_formulas = {
- linear: function (n) {
- return n;
- },
- "<": function (n) {
- return pow(n, 1.7);
- },
- ">": function (n) {
- return pow(n, .48);
- },
- "<>": function (n) {
- var q = .48 - n / 1.04,
- Q = math.sqrt(.1734 + q * q),
- x = Q - q,
- X = pow(abs(x), 1 / 3) * (x < 0 ? -1 : 1),
- y = -Q - q,
- Y = pow(abs(y), 1 / 3) * (y < 0 ? -1 : 1),
- t = X + Y + .5;
- return (1 - t) * 3 * t * t + t * t * t;
- },
- backIn: function (n) {
- var s = 1.70158;
- return n * n * ((s + 1) * n - s);
- },
- backOut: function (n) {
- n = n - 1;
- var s = 1.70158;
- return n * n * ((s + 1) * n + s) + 1;
- },
- elastic: function (n) {
- if (n == !!n) {
- return n;
- }
- return pow(2, -10 * n) * math.sin((n - .075) * (2 * PI) / .3) + 1;
- },
- bounce: function (n) {
- var s = 7.5625,
- p = 2.75,
- l;
- if (n < (1 / p)) {
- l = s * n * n;
- } else {
- if (n < (2 / p)) {
- n -= (1.5 / p);
- l = s * n * n + .75;
- } else {
- if (n < (2.5 / p)) {
- n -= (2.25 / p);
- l = s * n * n + .9375;
- } else {
- n -= (2.625 / p);
- l = s * n * n + .984375;
- }
- }
- }
- return l;
- }
- };
- ef.easeIn = ef["ease-in"] = ef["<"];
- ef.easeOut = ef["ease-out"] = ef[">"];
- ef.easeInOut = ef["ease-in-out"] = ef["<>"];
- ef["back-in"] = ef.backIn;
- ef["back-out"] = ef.backOut;
-
- var animationElements = [],
- requestAnimFrame = window.requestAnimationFrame ||
- window.webkitRequestAnimationFrame ||
- window.mozRequestAnimationFrame ||
- window.oRequestAnimationFrame ||
- window.msRequestAnimationFrame ||
- function (callback) {
- setTimeout(callback, 16);
- },
- animation = function () {
- var Now = +new Date,
- l = 0;
- for (; l < animationElements.length; l++) {
- var e = animationElements[l];
- if (e.el.removed || e.paused) {
- continue;
- }
- var time = Now - e.start,
- ms = e.ms,
- easing = e.easing,
- from = e.from,
- diff = e.diff,
- to = e.to,
- t = e.t,
- that = e.el,
- set = {},
- now,
- init = {},
- key;
- if (e.initstatus) {
- time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms;
- e.status = e.initstatus;
- delete e.initstatus;
- e.stop && animationElements.splice(l--, 1);
- } else {
- e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top;
- }
- if (time < 0) {
- continue;
- }
- if (time < ms) {
- var pos = easing(time / ms);
- for (var attr in from) if (from[has](attr)) {
- switch (availableAnimAttrs[attr]) {
- case nu:
- now = +from[attr] + pos * ms * diff[attr];
- break;
- case "colour":
- now = "rgb(" + [
- upto255(round(from[attr].r + pos * ms * diff[attr].r)),
- upto255(round(from[attr].g + pos * ms * diff[attr].g)),
- upto255(round(from[attr].b + pos * ms * diff[attr].b))
- ].join(",") + ")";
- break;
- case "path":
- now = [];
- for (var i = 0, ii = from[attr].length; i < ii; i++) {
- now[i] = [from[attr][i][0]];
- for (var j = 1, jj = from[attr][i].length; j < jj; j++) {
- now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j];
- }
- now[i] = now[i].join(S);
- }
- now = now.join(S);
- break;
- case "transform":
- if (diff[attr].real) {
- now = [];
- for (i = 0, ii = from[attr].length; i < ii; i++) {
- now[i] = [from[attr][i][0]];
- for (j = 1, jj = from[attr][i].length; j < jj; j++) {
- now[i][j] = from[attr][i][j] + pos * ms * diff[attr][i][j];
- }
- }
- } else {
- var get = function (i) {
- return +from[attr][i] + pos * ms * diff[attr][i];
- };
- // now = [["r", get(2), 0, 0], ["t", get(3), get(4)], ["s", get(0), get(1), 0, 0]];
- now = [["m", get(0), get(1), get(2), get(3), get(4), get(5)]];
- }
- break;
- case "csv":
- if (attr == "clip-rect") {
- now = [];
- i = 4;
- while (i--) {
- now[i] = +from[attr][i] + pos * ms * diff[attr][i];
- }
- }
- break;
- default:
- var from2 = [][concat](from[attr]);
- now = [];
- i = that.paper.customAttributes[attr].length;
- while (i--) {
- now[i] = +from2[i] + pos * ms * diff[attr][i];
- }
- break;
- }
- set[attr] = now;
- }
- that.attr(set);
- (function (id, that, anim) {
- setTimeout(function () {
- eve("raphael.anim.frame." + id, that, anim);
- });
- })(that.id, that, e.anim);
- } else {
- (function(f, el, a) {
- setTimeout(function() {
- eve("raphael.anim.frame." + el.id, el, a);
- eve("raphael.anim.finish." + el.id, el, a);
- R.is(f, "function") && f.call(el);
- });
- })(e.callback, that, e.anim);
- that.attr(to);
- animationElements.splice(l--, 1);
- if (e.repeat > 1 && !e.next) {
- for (key in to) if (to[has](key)) {
- init[key] = e.totalOrigin[key];
- }
- e.el.attr(init);
- runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1);
- }
- if (e.next && !e.stop) {
- runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat);
- }
- }
- }
- animationElements.length && requestAnimFrame(animation);
- },
- upto255 = function (color) {
- return color > 255 ? 255 : color < 0 ? 0 : color;
- };
- /*\
- * Element.animateWith
- [ method ]
- **
- * Acts similar to @Element.animate, but ensure that given animation runs in sync with another given element.
- **
- > Parameters
- **
- - el (object) element to sync with
- - anim (object) animation to sync with
- - params (object) #optional final attributes for the element, see also @Element.attr
- - ms (number) #optional number of milliseconds for animation to run
- - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic&#x2010;bezier(XX,&#160;XX,&#160;XX,&#160;XX)`
- - callback (function) #optional callback function. Will be called at the end of animation.
- * or
- - element (object) element to sync with
- - anim (object) animation to sync with
- - animation (object) #optional animation object, see @Raphael.animation
- **
- = (object) original element
- \*/
- elproto.animateWith = function (el, anim, params, ms, easing, callback) {
- var element = this;
- if (element.removed) {
- callback && callback.call(element);
- return element;
- }
- var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback),
- x, y;
- runAnimation(a, element, a.percents[0], null, element.attr());
- for (var i = 0, ii = animationElements.length; i < ii; i++) {
- if (animationElements[i].anim == anim && animationElements[i].el == el) {
- animationElements[ii - 1].start = animationElements[i].start;
- break;
- }
- }
- return element;
- //
- //
- // var a = params ? R.animation(params, ms, easing, callback) : anim,
- // status = element.status(anim);
- // return this.animate(a).status(a, status * anim.ms / a.ms);
- };
- function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) {
- var cx = 3 * p1x,
- bx = 3 * (p2x - p1x) - cx,
- ax = 1 - cx - bx,
- cy = 3 * p1y,
- by = 3 * (p2y - p1y) - cy,
- ay = 1 - cy - by;
- function sampleCurveX(t) {
- return ((ax * t + bx) * t + cx) * t;
- }
- function solve(x, epsilon) {
- var t = solveCurveX(x, epsilon);
- return ((ay * t + by) * t + cy) * t;
- }
- function solveCurveX(x, epsilon) {
- var t0, t1, t2, x2, d2, i;
- for(t2 = x, i = 0; i < 8; i++) {
- x2 = sampleCurveX(t2) - x;
- if (abs(x2) < epsilon) {
- return t2;
- }
- d2 = (3 * ax * t2 + 2 * bx) * t2 + cx;
- if (abs(d2) < 1e-6) {
- break;
- }
- t2 = t2 - x2 / d2;
- }
- t0 = 0;
- t1 = 1;
- t2 = x;
- if (t2 < t0) {
- return t0;
- }
- if (t2 > t1) {
- return t1;
- }
- while (t0 < t1) {
- x2 = sampleCurveX(t2);
- if (abs(x2 - x) < epsilon) {
- return t2;
- }
- if (x > x2) {
- t0 = t2;
- } else {
- t1 = t2;
- }
- t2 = (t1 - t0) / 2 + t0;
- }
- return t2;
- }
- return solve(t, 1 / (200 * duration));
- }
- elproto.onAnimation = function (f) {
- f ? eve.on("raphael.anim.frame." + this.id, f) : eve.unbind("raphael.anim.frame." + this.id);
- return this;
- };
- function Animation(anim, ms) {
- var percents = [],
- newAnim = {};
- this.ms = ms;
- this.times = 1;
- if (anim) {
- for (var attr in anim) if (anim[has](attr)) {
- newAnim[toFloat(attr)] = anim[attr];
- percents.push(toFloat(attr));
- }
- percents.sort(sortByNumber);
- }
- this.anim = newAnim;
- this.top = percents[percents.length - 1];
- this.percents = percents;
- }
- /*\
- * Animation.delay
- [ method ]
- **
- * Creates a copy of existing animation object with given delay.
- **
- > Parameters
- **
- - delay (number) number of ms to pass between animation start and actual animation
- **
- = (object) new altered Animation object
- | var anim = Raphael.animation({cx: 10, cy: 20}, 2e3);
- | circle1.animate(anim); // run the given animation immediately
- | circle2.animate(anim.delay(500)); // run the given animation after 500 ms
- \*/
- Animation.prototype.delay = function (delay) {
- var a = new Animation(this.anim, this.ms);
- a.times = this.times;
- a.del = +delay || 0;
- return a;
- };
- /*\
- * Animation.repeat
- [ method ]
- **
- * Creates a copy of existing animation object with given repetition.
- **
- > Parameters
- **
- - repeat (number) number iterations of animation. For infinite animation pass `Infinity`
- **
- = (object) new altered Animation object
- \*/
- Animation.prototype.repeat = function (times) {
- var a = new Animation(this.anim, this.ms);
- a.del = this.del;
- a.times = math.floor(mmax(times, 0)) || 1;
- return a;
- };
- function runAnimation(anim, element, percent, status, totalOrigin, times) {
- percent = toFloat(percent);
- var params,
- isInAnim,
- isInAnimSet,
- percents = [],
- next,
- prev,
- timestamp,
- ms = anim.ms,
- from = {},
- to = {},
- diff = {};
- if (status) {
- for (i = 0, ii = animationElements.length; i < ii; i++) {
- var e = animationElements[i];
- if (e.el.id == element.id && e.anim == anim) {
- if (e.percent != percent) {
- animationElements.splice(i, 1);
- isInAnimSet = 1;
- } else {
- isInAnim = e;
- }
- element.attr(e.totalOrigin);
- break;
- }
- }
- } else {
- status = +to; // NaN
- }
- for (var i = 0, ii = anim.percents.length; i < ii; i++) {
- if (anim.percents[i] == percent || anim.percents[i] > status * anim.top) {
- percent = anim.percents[i];
- prev = anim.percents[i - 1] || 0;
- ms = ms / anim.top * (percent - prev);
- next = anim.percents[i + 1];
- params = anim.anim[percent];
- break;
- } else if (status) {
- element.attr(anim.anim[anim.percents[i]]);
- }
- }
- if (!params) {
- return;
- }
- if (!isInAnim) {
- for (var attr in params) if (params[has](attr)) {
- if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) {
- from[attr] = element.attr(attr);
- (from[attr] == null) && (from[attr] = availableAttrs[attr]);
- to[attr] = params[attr];
- switch (availableAnimAttrs[attr]) {
- case nu:
- diff[attr] = (to[attr] - from[attr]) / ms;
- break;
- case "colour":
- from[attr] = R.getRGB(from[attr]);
- var toColour = R.getRGB(to[attr]);
- diff[attr] = {
- r: (toColour.r - from[attr].r) / ms,
- g: (toColour.g - from[attr].g) / ms,
- b: (toColour.b - from[attr].b) / ms
- };
- break;
- case "path":
- var pathes = path2curve(from[attr], to[attr]),
- toPath = pathes[1];
- from[attr] = pathes[0];
- diff[attr] = [];
- for (i = 0, ii = from[attr].length; i < ii; i++) {
- diff[attr][i] = [0];
- for (var j = 1, jj = from[attr][i].length; j < jj; j++) {
- diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms;
- }
- }
- break;
- case "transform":
- var _ = element._,
- eq = equaliseTransform(_[attr], to[attr]);
- if (eq) {
- from[attr] = eq.from;
- to[attr] = eq.to;
- diff[attr] = [];
- diff[attr].real = true;
- for (i = 0, ii = from[attr].length; i < ii; i++) {
- diff[attr][i] = [from[attr][i][0]];
- for (j = 1, jj = from[attr][i].length; j < jj; j++) {
- diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms;
- }
- }
- } else {
- var m = (element.matrix || new Matrix),
- to2 = {
- _: {transform: _.transform},
- getBBox: function () {
- return element.getBBox(1);
- }
- };
- from[attr] = [
- m.a,
- m.b,
- m.c,
- m.d,
- m.e,
- m.f
- ];
- extractTransform(to2, to[attr]);
- to[attr] = to2._.transform;
- diff[attr] = [
- (to2.matrix.a - m.a) / ms,
- (to2.matrix.b - m.b) / ms,
- (to2.matrix.c - m.c) / ms,
- (to2.matrix.d - m.d) / ms,
- (to2.matrix.e - m.e) / ms,
- (to2.matrix.f - m.f) / ms
- ];
- // from[attr] = [_.sx, _.sy, _.deg, _.dx, _.dy];
- // var to2 = {_:{}, getBBox: function () { return element.getBBox(); }};
- // extractTransform(to2, to[attr]);
- // diff[attr] = [
- // (to2._.sx - _.sx) / ms,
- // (to2._.sy - _.sy) / ms,
- // (to2._.deg - _.deg) / ms,
- // (to2._.dx - _.dx) / ms,
- // (to2._.dy - _.dy) / ms
- // ];
- }
- break;
- case "csv":
- var values = Str(params[attr])[split](separator),
- from2 = Str(from[attr])[split](separator);
- if (attr == "clip-rect") {
- from[attr] = from2;
- diff[attr] = [];
- i = from2.length;
- while (i--) {
- diff[attr][i] = (values[i] - from[attr][i]) / ms;
- }
- }
- to[attr] = values;
- break;
- default:
- values = [][concat](params[attr]);
- from2 = [][concat](from[attr]);
- diff[attr] = [];
- i = element.paper.customAttributes[attr].length;
- while (i--) {
- diff[attr][i] = ((values[i] || 0) - (from2[i] || 0)) / ms;
- }
- break;
- }
- }
- }
- var easing = params.easing,
- easyeasy = R.easing_formulas[easing];
- if (!easyeasy) {
- easyeasy = Str(easing).match(bezierrg);
- if (easyeasy && easyeasy.length == 5) {
- var curve = easyeasy;
- easyeasy = function (t) {
- return CubicBezierAtTime(t, +curve[1], +curve[2], +curve[3], +curve[4], ms);
- };
- } else {
- easyeasy = pipe;
- }
- }
- timestamp = params.start || anim.start || +new Date;
- e = {
- anim: anim,
- percent: percent,
- timestamp: timestamp,
- start: timestamp + (anim.del || 0),
- status: 0,
- initstatus: status || 0,
- stop: false,
- ms: ms,
- easing: easyeasy,
- from: from,
- diff: diff,
- to: to,
- el: element,
- callback: params.callback,
- prev: prev,
- next: next,
- repeat: times || anim.times,
- origin: element.attr(),
- totalOrigin: totalOrigin
- };
- animationElements.push(e);
- if (status && !isInAnim && !isInAnimSet) {
- e.stop = true;
- e.start = new Date - ms * status;
- if (animationElements.length == 1) {
- return animation();
- }
- }
- if (isInAnimSet) {
- e.start = new Date - e.ms * status;
- }
- animationElements.length == 1 && requestAnimFrame(animation);
- } else {
- isInAnim.initstatus = status;
- isInAnim.start = new Date - isInAnim.ms * status;
- }
- eve("raphael.anim.start." + element.id, element, anim);
- }
- /*\
- * Raphael.animation
- [ method ]
- **
- * Creates an animation object that can be passed to the @Element.animate or @Element.animateWith methods.
- * See also @Animation.delay and @Animation.repeat methods.
- **
- > Parameters
- **
- - params (object) final attributes for the element, see also @Element.attr
- - ms (number) number of milliseconds for animation to run
- - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic&#x2010;bezier(XX,&#160;XX,&#160;XX,&#160;XX)`
- - callback (function) #optional callback function. Will be called at the end of animation.
- **
- = (object) @Animation
- \*/
- R.animation = function (params, ms, easing, callback) {
- if (params instanceof Animation) {
- return params;
- }
- if (R.is(easing, "function") || !easing) {
- callback = callback || easing || null;
- easing = null;
- }
- params = Object(params);
- ms = +ms || 0;
- var p = {},
- json,
- attr;
- for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) {
- json = true;
- p[attr] = params[attr];
- }
- if (!json) {
- // if percent-like syntax is used and end-of-all animation callback used
- if(callback){
- // find the last one
- var lastKey = 0;
- for(var i in params){
- var percent = toInt(i);
- if(params[has](i) && percent > lastKey){
- lastKey = percent;
- }
- }
- lastKey += '%';
- // if already defined callback in the last keyframe, skip
- !params[lastKey].callback && (params[lastKey].callback = callback);
- }
- return new Animation(params, ms);
- } else {
- easing && (p.easing = easing);
- callback && (p.callback = callback);
- return new Animation({100: p}, ms);
- }
- };
- /*\
- * Element.animate
- [ method ]
- **
- * Creates and starts animation for given element.
- **
- > Parameters
- **
- - params (object) final attributes for the element, see also @Element.attr
- - ms (number) number of milliseconds for animation to run
- - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic&#x2010;bezier(XX,&#160;XX,&#160;XX,&#160;XX)`
- - callback (function) #optional callback function. Will be called at the end of animation.
- * or
- - animation (object) animation object, see @Raphael.animation
- **
- = (object) original element
- \*/
- elproto.animate = function (params, ms, easing, callback) {
- var element = this;
- if (element.removed) {
- callback && callback.call(element);
- return element;
- }
- var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback);
- runAnimation(anim, element, anim.percents[0], null, element.attr());
- return element;
- };
- /*\
- * Element.setTime
- [ method ]
- **
- * Sets the status of animation of the element in milliseconds. Similar to @Element.status method.
- **
- > Parameters
- **
- - anim (object) animation object
- - value (number) number of milliseconds from the beginning of the animation
- **
- = (object) original element if `value` is specified
- * Note, that during animation following events are triggered:
- *
- * On each animation frame event `anim.frame.<id>`, on start `anim.start.<id>` and on end `anim.finish.<id>`.
- \*/
- elproto.setTime = function (anim, value) {
- if (anim && value != null) {
- this.status(anim, mmin(value, anim.ms) / anim.ms);
- }
- return this;
- };
- /*\
- * Element.status
- [ method ]
- **
- * Gets or sets the status of animation of the element.
- **
- > Parameters
- **
- - anim (object) #optional animation object
- - value (number) #optional 0 – 1. If specified, method works like a setter and sets the status of a given animation to the value. This will cause animation to jump to the given position.
- **
- = (number) status
- * or
- = (array) status if `anim` is not specified. Array of objects in format:
- o {
- o anim: (object) animation object
- o status: (number) status
- o }
- * or
- = (object) original element if `value` is specified
- \*/
- elproto.status = function (anim, value) {
- var out = [],
- i = 0,
- len,
- e;
- if (value != null) {
- runAnimation(anim, this, -1, mmin(value, 1));
- return this;
- } else {
- len = animationElements.length;
- for (; i < len; i++) {
- e = animationElements[i];
- if (e.el.id == this.id && (!anim || e.anim == anim)) {
- if (anim) {
- return e.status;
- }
- out.push({
- anim: e.anim,
- status: e.status
- });
- }
- }
- if (anim) {
- return 0;
- }
- return out;
- }
- };
- /*\
- * Element.pause
- [ method ]
- **
- * Stops animation of the element with ability to resume it later on.
- **
- > Parameters
- **
- - anim (object) #optional animation object
- **
- = (object) original element
- \*/
- elproto.pause = function (anim) {
- for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
- if (eve("raphael.anim.pause." + this.id, this, animationElements[i].anim) !== false) {
- animationElements[i].paused = true;
- }
- }
- return this;
- };
- /*\
- * Element.resume
- [ method ]
- **
- * Resumes animation if it was paused with @Element.pause method.
- **
- > Parameters
- **
- - anim (object) #optional animation object
- **
- = (object) original element
- \*/
- elproto.resume = function (anim) {
- for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
- var e = animationElements[i];
- if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) {
- delete e.paused;
- this.status(e.anim, e.status);
- }
- }
- return this;
- };
- /*\
- * Element.stop
- [ method ]
- **
- * Stops animation of the element.
- **
- > Parameters
- **
- - anim (object) #optional animation object
- **
- = (object) original element
- \*/
- elproto.stop = function (anim) {
- for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
- if (eve("raphael.anim.stop." + this.id, this, animationElements[i].anim) !== false) {
- animationElements.splice(i--, 1);
- }
- }
- return this;
- };
- function stopAnimation(paper) {
- for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) {
- animationElements.splice(i--, 1);
- }
- }
- eve.on("raphael.remove", stopAnimation);
- eve.on("raphael.clear", stopAnimation);
- elproto.toString = function () {
- return "Rapha\xebl\u2019s object";
- };
-
- // Set
- var Set = function (items) {
- this.items = [];
- this.length = 0;
- this.type = "set";
- if (items) {
- for (var i = 0, ii = items.length; i < ii; i++) {
- if (items[i] && (items[i].constructor == elproto.constructor || items[i].constructor == Set)) {
- this[this.items.length] = this.items[this.items.length] = items[i];
- this.length++;
- }
- }
- }
- },
- setproto = Set.prototype;
- /*\
- * Set.push
- [ method ]
- **
- * Adds each argument to the current set.
- = (object) original element
- \*/
- setproto.push = function () {
- var item,
- len;
- for (var i = 0, ii = arguments.length; i < ii; i++) {
- item = arguments[i];
- if (item && (item.constructor == elproto.constructor || item.constructor == Set)) {
- len = this.items.length;
- this[len] = this.items[len] = item;
- this.length++;
- }
- }
- return this;
- };
- /*\
- * Set.pop
- [ method ]
- **
- * Removes last element and returns it.
- = (object) element
- \*/
- setproto.pop = function () {
- this.length && delete this[this.length--];
- return this.items.pop();
- };
- /*\
- * Set.forEach
- [ method ]
- **
- * Executes given function for each element in the set.
- *
- * If function returns `false` it will stop loop running.
- **
- > Parameters
- **
- - callback (function) function to run
- - thisArg (object) context object for the callback
- = (object) Set object
- \*/
- setproto.forEach = function (callback, thisArg) {
- for (var i = 0, ii = this.items.length; i < ii; i++) {
- if (callback.call(thisArg, this.items[i], i) === false) {
- return this;
- }
- }
- return this;
- };
- for (var method in elproto) if (elproto[has](method)) {
- setproto[method] = (function (methodname) {
- return function () {
- var arg = arguments;
- return this.forEach(function (el) {
- el[methodname][apply](el, arg);
- });
- };
- })(method);
- }
- setproto.attr = function (name, value) {
- if (name && R.is(name, array) && R.is(name[0], "object")) {
- for (var j = 0, jj = name.length; j < jj; j++) {
- this.items[j].attr(name[j]);
- }
- } else {
- for (var i = 0, ii = this.items.length; i < ii; i++) {
- this.items[i].attr(name, value);
- }
- }
- return this;
- };
- /*\
- * Set.clear
- [ method ]
- **
- * Removes all elements from the set
- \*/
- setproto.clear = function () {
- while (this.length) {
- this.pop();
- }
- };
- /*\
- * Set.splice
- [ method ]
- **
- * Removes given element from the set
- **
- > Parameters
- **
- - index (number) position of the deletion
- - count (number) number of element to remove
- - insertion… (object) #optional elements to insert
- = (object) set elements that were deleted
- \*/
- setproto.splice = function (index, count, insertion) {
- index = index < 0 ? mmax(this.length + index, 0) : index;
- count = mmax(0, mmin(this.length - index, count));
- var tail = [],
- todel = [],
- args = [],
- i;
- for (i = 2; i < arguments.length; i++) {
- args.push(arguments[i]);
- }
- for (i = 0; i < count; i++) {
- todel.push(this[index + i]);
- }
- for (; i < this.length - index; i++) {
- tail.push(this[index + i]);
- }
- var arglen = args.length;
- for (i = 0; i < arglen + tail.length; i++) {
- this.items[index + i] = this[index + i] = i < arglen ? args[i] : tail[i - arglen];
- }
- i = this.items.length = this.length -= count - arglen;
- while (this[i]) {
- delete this[i++];
- }
- return new Set(todel);
- };
- /*\
- * Set.exclude
- [ method ]
- **
- * Removes given element from the set
- **
- > Parameters
- **
- - element (object) element to remove
- = (boolean) `true` if object was found & removed from the set
- \*/
- setproto.exclude = function (el) {
- for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) {
- this.splice(i, 1);
- return true;
- }
- };
- setproto.animate = function (params, ms, easing, callback) {
- (R.is(easing, "function") || !easing) && (callback = easing || null);
- var len = this.items.length,
- i = len,
- item,
- set = this,
- collector;
- if (!len) {
- return this;
- }
- callback && (collector = function () {
- !--len && callback.call(set);
- });
- easing = R.is(easing, string) ? easing : collector;
- var anim = R.animation(params, ms, easing, collector);
- item = this.items[--i].animate(anim);
- while (i--) {
- this.items[i] && !this.items[i].removed && this.items[i].animateWith(item, anim, anim);
- (this.items[i] && !this.items[i].removed) || len--;
- }
- return this;
- };
- setproto.insertAfter = function (el) {
- var i = this.items.length;
- while (i--) {
- this.items[i].insertAfter(el);
- }
- return this;
- };
- setproto.getBBox = function () {
- var x = [],
- y = [],
- x2 = [],
- y2 = [];
- for (var i = this.items.length; i--;) if (!this.items[i].removed) {
- var box = this.items[i].getBBox();
- x.push(box.x);
- y.push(box.y);
- x2.push(box.x + box.width);
- y2.push(box.y + box.height);
- }
- x = mmin[apply](0, x);
- y = mmin[apply](0, y);
- x2 = mmax[apply](0, x2);
- y2 = mmax[apply](0, y2);
- return {
- x: x,
- y: y,
- x2: x2,
- y2: y2,
- width: x2 - x,
- height: y2 - y
- };
- };
- setproto.clone = function (s) {
- s = this.paper.set();
- for (var i = 0, ii = this.items.length; i < ii; i++) {
- s.push(this.items[i].clone());
- }
- return s;
- };
- setproto.toString = function () {
- return "Rapha\xebl\u2018s set";
- };
-
- setproto.glow = function(glowConfig) {
- var ret = this.paper.set();
- this.forEach(function(shape, index){
- var g = shape.glow(glowConfig);
- if(g != null){
- g.forEach(function(shape2, index2){
- ret.push(shape2);
- });
- }
- });
- return ret;
- };
-
-
- /*\
- * Set.isPointInside
- [ method ]
- **
- * Determine if given point is inside this set’s elements
- **
- > Parameters
- **
- - x (number) x coordinate of the point
- - y (number) y coordinate of the point
- = (boolean) `true` if point is inside any of the set's elements
- \*/
- setproto.isPointInside = function (x, y) {
- var isPointInside = false;
- this.forEach(function (el) {
- if (el.isPointInside(x, y)) {
- isPointInside = true;
- return false; // stop loop
- }
- });
- return isPointInside;
- };
-
- /*\
- * Raphael.registerFont
- [ method ]
- **
- * Adds given font to the registered set of fonts for Raphaël. Should be used as an internal call from within Cufón’s font file.
- * Returns original parameter, so it could be used with chaining.
- # <a href="http://wiki.github.com/sorccu/cufon/about">More about Cufón and how to convert your font form TTF, OTF, etc to JavaScript file.</a>
- **
- > Parameters
- **
- - font (object) the font to register
- = (object) the font you passed in
- > Usage
- | Cufon.registerFont(Raphael.registerFont({…}));
- \*/
- R.registerFont = function (font) {
- if (!font.face) {
- return font;
- }
- this.fonts = this.fonts || {};
- var fontcopy = {
- w: font.w,
- face: {},
- glyphs: {}
- },
- family = font.face["font-family"];
- for (var prop in font.face) if (font.face[has](prop)) {
- fontcopy.face[prop] = font.face[prop];
- }
- if (this.fonts[family]) {
- this.fonts[family].push(fontcopy);
- } else {
- this.fonts[family] = [fontcopy];
- }
- if (!font.svg) {
- fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10);
- for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) {
- var path = font.glyphs[glyph];
- fontcopy.glyphs[glyph] = {
- w: path.w,
- k: {},
- d: path.d && "M" + path.d.replace(/[mlcxtrv]/g, function (command) {
- return {l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[command] || "M";
- }) + "z"
- };
- if (path.k) {
- for (var k in path.k) if (path[has](k)) {
- fontcopy.glyphs[glyph].k[k] = path.k[k];
- }
- }
- }
- }
- return font;
- };
- /*\
- * Paper.getFont
- [ method ]
- **
- * Finds font object in the registered fonts by given parameters. You could specify only one word from the font name, like “Myriad” for “Myriad Pro”.
- **
- > Parameters
- **
- - family (string) font family name or any word from it
- - weight (string) #optional font weight
- - style (string) #optional font style
- - stretch (string) #optional font stretch
- = (object) the font object
- > Usage
- | paper.print(100, 100, "Test string", paper.getFont("Times", 800), 30);
- \*/
- paperproto.getFont = function (family, weight, style, stretch) {
- stretch = stretch || "normal";
- style = style || "normal";
- weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400;
- if (!R.fonts) {
- return;
- }
- var font = R.fonts[family];
- if (!font) {
- var name = new RegExp("(^|\\s)" + family.replace(/[^\w\d\s+!~.:_-]/g, E) + "(\\s|$)", "i");
- for (var fontName in R.fonts) if (R.fonts[has](fontName)) {
- if (name.test(fontName)) {
- font = R.fonts[fontName];
- break;
- }
- }
- }
- var thefont;
- if (font) {
- for (var i = 0, ii = font.length; i < ii; i++) {
- thefont = font[i];
- if (thefont.face["font-weight"] == weight && (thefont.face["font-style"] == style || !thefont.face["font-style"]) && thefont.face["font-stretch"] == stretch) {
- break;
- }
- }
- }
- return thefont;
- };
- /*\
- * Paper.print
- [ method ]
- **
- * Creates path that represent given text written using given font at given position with given size.
- * Result of the method is path element that contains whole text as a separate path.
- **
- > Parameters
- **
- - x (number) x position of the text
- - y (number) y position of the text
- - string (string) text to print
- - font (object) font object, see @Paper.getFont
- - size (number) #optional size of the font, default is `16`
- - origin (string) #optional could be `"baseline"` or `"middle"`, default is `"middle"`
- - letter_spacing (number) #optional number in range `-1..1`, default is `0`
- - line_spacing (number) #optional number in range `1..3`, default is `1`
- = (object) resulting path element, which consist of all letters
- > Usage
- | var txt = r.print(10, 50, "print", r.getFont("Museo"), 30).attr({fill: "#fff"});
- \*/
- paperproto.print = function (x, y, string, font, size, origin, letter_spacing, line_spacing) {
- origin = origin || "middle"; // baseline|middle
- letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1);
- line_spacing = mmax(mmin(line_spacing || 1, 3), 1);
- var letters = Str(string)[split](E),
- shift = 0,
- notfirst = 0,
- path = E,
- scale;
- R.is(font, "string") && (font = this.getFont(font));
- if (font) {
- scale = (size || 16) / font.face["units-per-em"];
- var bb = font.face.bbox[split](separator),
- top = +bb[0],
- lineHeight = bb[3] - bb[1],
- shifty = 0,
- height = +bb[1] + (origin == "baseline" ? lineHeight + (+font.face.descent) : lineHeight / 2);
- for (var i = 0, ii = letters.length; i < ii; i++) {
- if (letters[i] == "\n") {
- shift = 0;
- curr = 0;
- notfirst = 0;
- shifty += lineHeight * line_spacing;
- } else {
- var prev = notfirst && font.glyphs[letters[i - 1]] || {},
- curr = font.glyphs[letters[i]];
- shift += notfirst ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) + (font.w * letter_spacing) : 0;
- notfirst = 1;
- }
- if (curr && curr.d) {
- path += R.transformPath(curr.d, ["t", shift * scale, shifty * scale, "s", scale, scale, top, height, "t", (x - top) / scale, (y - height) / scale]);
- }
- }
- }
- return this.path(path).attr({
- fill: "#000",
- stroke: "none"
- });
- };
-
- /*\
- * Paper.add
- [ method ]
- **
- * Imports elements in JSON array in format `{type: type, <attributes>}`
- **
- > Parameters
- **
- - json (array)
- = (object) resulting set of imported elements
- > Usage
- | paper.add([
- | {
- | type: "circle",
- | cx: 10,
- | cy: 10,
- | r: 5
- | },
- | {
- | type: "rect",
- | x: 10,
- | y: 10,
- | width: 10,
- | height: 10,
- | fill: "#fc0"
- | }
- | ]);
- \*/
- paperproto.add = function (json) {
- if (R.is(json, "array")) {
- var res = this.set(),
- i = 0,
- ii = json.length,
- j;
- for (; i < ii; i++) {
- j = json[i] || {};
- elements[has](j.type) && res.push(this[j.type]().attr(j));
- }
- }
- return res;
- };
-
- /*\
- * Raphael.format
- [ method ]
- **
- * Simple format function. Replaces construction of type “`{<number>}`” to the corresponding argument.
- **
- > Parameters
- **
- - token (string) string to format
- - … (string) rest of arguments will be treated as parameters for replacement
- = (string) formated string
- > Usage
- | var x = 10,
- | y = 20,
- | width = 40,
- | height = 50;
- | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z"
- | paper.path(Raphael.format("M{0},{1}h{2}v{3}h{4}z", x, y, width, height, -width));
- \*/
- R.format = function (token, params) {
- var args = R.is(params, array) ? [0][concat](params) : arguments;
- token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str, i) {
- return args[++i] == null ? E : args[i];
- }));
- return token || E;
- };
- /*\
- * Raphael.fullfill
- [ method ]
- **
- * A little bit more advanced format function than @Raphael.format. Replaces construction of type “`{<name>}`” to the corresponding argument.
- **
- > Parameters
- **
- - token (string) string to format
- - json (object) object which properties will be used as a replacement
- = (string) formated string
- > Usage
- | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z"
- | paper.path(Raphael.fullfill("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']}z", {
- | x: 10,
- | y: 20,
- | dim: {
- | width: 40,
- | height: 50,
- | "negative width": -40
- | }
- | }));
- \*/
- R.fullfill = (function () {
- var tokenRegex = /\{([^\}]+)\}/g,
- objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, // matches .xxxxx or ["xxxxx"] to run over object properties
- replacer = function (all, key, obj) {
- var res = obj;
- key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) {
- name = name || quotedName;
- if (res) {
- if (name in res) {
- res = res[name];
- }
- typeof res == "function" && isFunc && (res = res());
- }
- });
- res = (res == null || res == obj ? all : res) + "";
- return res;
- };
- return function (str, obj) {
- return String(str).replace(tokenRegex, function (all, key) {
- return replacer(all, key, obj);
- });
- };
- })();
- /*\
- * Raphael.ninja
- [ method ]
- **
- * If you want to leave no trace of Raphaël (Well, Raphaël creates only one global variable `Raphael`, but anyway.) You can use `ninja` method.
- * Beware, that in this case plugins could stop working, because they are depending on global variable existence.
- **
- = (object) Raphael object
- > Usage
- | (function (local_raphael) {
- | var paper = local_raphael(10, 10, 320, 200);
- | …
- | })(Raphael.ninja());
- \*/
- R.ninja = function () {
- if (oldRaphael.was) {
- g.win.Raphael = oldRaphael.is;
- } else {
- // IE8 raises an error when deleting window property
- window.Raphael = undefined;
- try {
- delete window.Raphael;
- } catch(e) {}
- }
- return R;
- };
- /*\
- * Raphael.st
- [ property (object) ]
- **
- * You can add your own method to elements and sets. It is wise to add a set method for each element method
- * you added, so you will be able to call the same method on sets too.
- **
- * See also @Raphael.el.
- > Usage
- | Raphael.el.red = function () {
- | this.attr({fill: "#f00"});
- | };
- | Raphael.st.red = function () {
- | this.forEach(function (el) {
- | el.red();
- | });
- | };
- | // then use it
- | paper.set(paper.circle(100, 100, 20), paper.circle(110, 100, 20)).red();
- \*/
- R.st = setproto;
-
- eve.on("raphael.DOMload", function () {
- loaded = true;
- });
-
- // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html
- (function (doc, loaded, f) {
- if (doc.readyState == null && doc.addEventListener){
- doc.addEventListener(loaded, f = function () {
- doc.removeEventListener(loaded, f, false);
- doc.readyState = "complete";
- }, false);
- doc.readyState = "loading";
- }
- function isLoaded() {
- (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve("raphael.DOMload");
- }
- isLoaded();
- })(document, "DOMContentLoaded");
-
- return R;
- }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
-
-
-/***/ },
-/* 2 */
-/***/ function(module, exports) {
-
- /*
- * Eve 0.2.4 - JavaScript Events Library
- *
- * Copyright (c) 2011 Dmitry Baranovskiy (http://dmitry.baranovskiy.com/)
- * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
- */
-
- (function (glob) {
- var version = "0.2.4",
- has = "hasOwnProperty",
- separator = /[\.\/]/,
- wildcard = "*",
- fun = function () {},
- numsort = function (a, b) {
- return a - b;
- },
- current_event,
- events = {n: {}},
- /*\
- * eve
- [ method ]
- **
- * Fires event with given `name`, given scope and other parameters.
- **
- > Arguments
- **
- - name (string) name of the event, dot (`.`) or slash (`/`) separated
- - scope (object) context for the event handlers
- - varargs (...) the rest of arguments will be sent to event handlers
- **
- = (array) array of errors, if any. Each element of the array is in format:
- o {
- o error (string) error message
- o func (function) handler that caused error
- o }
- \*/
- eve = function (name, scope) {
- var e = events,
- args = Array.prototype.slice.call(arguments, 2),
- listeners = eve.listeners(name),
- z = 0,
- f = false,
- l,
- indexed = [],
- queue = {},
- errors = [];
- current_event = name;
- for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) {
- indexed.push(listeners[i].zIndex);
- if (listeners[i].zIndex < 0) {
- queue[listeners[i].zIndex] = listeners[i];
- }
- }
- indexed.sort(numsort);
- while (indexed[z] < 0) {
- l = queue[indexed[z++]];
- if (l.apply(scope, args) === f) {
- return f;
- }
- }
- for (i = 0; i < ii; i++) {
- l = listeners[i];
- if ("zIndex" in l) {
- if (l.zIndex == indexed[z]) {
- if (l.apply(scope, args) === f) {
- return f;
- }
- do {
- z++;
- l = queue[indexed[z]];
- if (l && l.apply(scope, args) === f) {
- return f;
- }
- } while (l)
- } else {
- queue[l.zIndex] = l;
- }
- } else {
- if (l.apply(scope, args) === f) {
- return f;
- }
- }
- }
- };
- /*\
- * eve.listeners
- [ method ]
- **
- * Internal method which gives you array of all event handlers that will be triggered by the given `name`.
- **
- > Arguments
- **
- - name (string) name of the event, dot (`.`) or slash (`/`) separated
- **
- = (array) array of event handlers
- \*/
- eve.listeners = function (name) {
- var names = name.split(separator),
- e = events,
- item,
- items,
- k,
- i,
- ii,
- j,
- jj,
- nes,
- es = [e],
- out = [];
- for (i = 0, ii = names.length; i < ii; i++) {
- nes = [];
- for (j = 0, jj = es.length; j < jj; j++) {
- e = es[j].n;
- items = [e[names[i]], e[wildcard]];
- k = 2;
- while (k--) {
- item = items[k];
- if (item) {
- nes.push(item);
- out = out.concat(item.f || []);
- }
- }
- }
- es = nes;
- }
- return out;
- };
-
- /*\
- * eve.on
- [ method ]
- **
- * Binds given event handler with a given name. You can use wildcards “`*`” for the names:
- | eve.on("*.under.*", f);
- | eve("mouse.under.floor"); // triggers f
- * Use @eve to trigger the listener.
- **
- > Arguments
- **
- - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards
- - f (function) event handler function
- **
- = (function) returned function accept one number parameter that represents z-index of the handler. It is optional feature and only used when you need to ensure that some subset of handlers will be invoked in a given order, despite of the order of assignment.
- > Example:
- | eve.on("mouse", eat)(2);
- | eve.on("mouse", scream);
- | eve.on("mouse", catch)(1);
- * This will ensure that `catch` function will be called before `eat`.
- * If you want to put you hadler before not indexed handlers specify negative value.
- * Note: I assume most of the time you don’t need to worry about z-index, but it’s nice to have this feature “just in case”.
- \*/
- eve.on = function (name, f) {
- var names = name.split(separator),
- e = events;
- for (var i = 0, ii = names.length; i < ii; i++) {
- e = e.n;
- !e[names[i]] && (e[names[i]] = {n: {}});
- e = e[names[i]];
- }
- e.f = e.f || [];
- for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) {
- return fun;
- }
- e.f.push(f);
- return function (zIndex) {
- if (+zIndex == +zIndex) {
- f.zIndex = +zIndex;
- }
- };
- };
- /*\
- * eve.nt
- [ method ]
- **
- * Could be used inside event handler to figure out actual name of the event.
- **
- > Arguments
- **
- - subname (string) #optional subname of the event
- **
- = (string) name of the event, if `subname` is not specified
- * or
- = (boolean) `true`, if current event’s name contains `subname`
- \*/
- eve.nt = function (subname) {
- if (subname) {
- return new RegExp("(?:\\.|\\/|^)" + subname + "(?:\\.|\\/|$)").test(current_event);
- }
- return current_event;
- };
- /*\
- * eve.unbind
- [ method ]
- **
- * Removes given function from the list of event listeners assigned to given name.
- **
- > Arguments
- **
- - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards
- - f (function) event handler function
- \*/
- eve.unbind = function (name, f) {
- var names = name.split(separator),
- e,
- key,
- splice,
- cur = [events];
- for (var i = 0, ii = names.length; i < ii; i++) {
- for (var j = 0; j < cur.length; j += splice.length - 2) {
- splice = [j, 1];
- e = cur[j].n;
- if (names[i] != wildcard) {
- if (e[names[i]]) {
- splice.push(e[names[i]]);
- }
- } else {
- for (key in e) if (e[has](key)) {
- splice.push(e[key]);
- }
- }
- cur.splice.apply(cur, splice);
- }
- }
- for (i = 0, ii = cur.length; i < ii; i++) {
- e = cur[i];
- while (e.n) {
- if (f) {
- if (e.f) {
- for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) {
- e.f.splice(i, 1);
- break;
- }
- !e.f.length && delete e.f;
- }
- for (key in e.n) if (e.n[has](key) && e.n[key].f) {
- var funcs = e.n[key].f;
- for (i = 0, ii = funcs.length; i < ii; i++) if (funcs[i] == f) {
- funcs.splice(i, 1);
- break;
- }
- !funcs.length && delete e.n[key].f;
- }
- } else {
- delete e.f;
- for (key in e.n) if (e.n[has](key) && e.n[key].f) {
- delete e.n[key].f;
- }
- }
- e = e.n;
- }
- }
- };
- /*\
- * eve.version
- [ property (string) ]
- **
- * Current version of the library.
- \*/
- eve.version = version;
- eve.toString = function () {
- return "You are running Eve " + version;
- };
- (typeof module != "undefined" && module.exports) ? (module.exports = eve) : (glob.eve = eve);
- })(this);
-
-/***/ },
-/* 3 */
-/***/ function(module, exports, __webpack_require__) {
-
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1)], __WEBPACK_AMD_DEFINE_RESULT__ = function(R) {
- if (R && !R.svg) {
- return;
- }
-
- var has = "hasOwnProperty",
- Str = String,
- toFloat = parseFloat,
- toInt = parseInt,
- math = Math,
- mmax = math.max,
- abs = math.abs,
- pow = math.pow,
- separator = /[, ]+/,
- eve = R.eve,
- E = "",
- S = " ";
- var xlink = "http://www.w3.org/1999/xlink",
- markers = {
- block: "M5,0 0,2.5 5,5z",
- classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z",
- diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z",
- open: "M6,1 1,3.5 6,6",
- oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"
- },
- markerCounter = {};
- R.toString = function () {
- return "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version;
- };
- var $ = function (el, attr) {
- if (attr) {
- if (typeof el == "string") {
- el = $(el);
- }
- for (var key in attr) if (attr[has](key)) {
- if (key.substring(0, 6) == "xlink:") {
- el.setAttributeNS(xlink, key.substring(6), Str(attr[key]));
- } else {
- el.setAttribute(key, Str(attr[key]));
- }
- }
- } else {
- el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el);
- el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)");
- }
- return el;
- },
- addGradientFill = function (element, gradient) {
- var type = "linear",
- id = element.id + gradient,
- fx = .5, fy = .5,
- o = element.node,
- SVG = element.paper,
- s = o.style,
- el = R._g.doc.getElementById(id);
- if (!el) {
- gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) {
- type = "radial";
- if (_fx && _fy) {
- fx = toFloat(_fx);
- fy = toFloat(_fy);
- var dir = ((fy > .5) * 2 - 1);
- pow(fx - .5, 2) + pow(fy - .5, 2) > .25 &&
- (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) &&
- fy != .5 &&
- (fy = fy.toFixed(5) - 1e-5 * dir);
- }
- return E;
- });
- gradient = gradient.split(/\s*\-\s*/);
- if (type == "linear") {
- var angle = gradient.shift();
- angle = -toFloat(angle);
- if (isNaN(angle)) {
- return null;
- }
- var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))],
- max = 1 / (mmax(abs(vector[2]), abs(vector[3])) || 1);
- vector[2] *= max;
- vector[3] *= max;
- if (vector[2] < 0) {
- vector[0] = -vector[2];
- vector[2] = 0;
- }
- if (vector[3] < 0) {
- vector[1] = -vector[3];
- vector[3] = 0;
- }
- }
- var dots = R._parseDots(gradient);
- if (!dots) {
- return null;
- }
- id = id.replace(/[\(\)\s,\xb0#]/g, "_");
-
- if (element.gradient && id != element.gradient.id) {
- SVG.defs.removeChild(element.gradient);
- delete element.gradient;
- }
-
- if (!element.gradient) {
- el = $(type + "Gradient", {id: id});
- element.gradient = el;
- $(el, type == "radial" ? {
- fx: fx,
- fy: fy
- } : {
- x1: vector[0],
- y1: vector[1],
- x2: vector[2],
- y2: vector[3],
- gradientTransform: element.matrix.invert()
- });
- SVG.defs.appendChild(el);
- for (var i = 0, ii = dots.length; i < ii; i++) {
- el.appendChild($("stop", {
- offset: dots[i].offset ? dots[i].offset : i ? "100%" : "0%",
- "stop-color": dots[i].color || "#fff",
- "stop-opacity": isFinite(dots[i].opacity) ? dots[i].opacity : 1
- }));
- }
- }
- }
- $(o, {
- fill: fillurl(id),
- opacity: 1,
- "fill-opacity": 1
- });
- s.fill = E;
- s.opacity = 1;
- s.fillOpacity = 1;
- return 1;
- },
- isIE9or10 = function () {
- var mode = document.documentMode;
- return mode && (mode === 9 || mode === 10);
- },
- fillurl = function (id) {
- if (isIE9or10()) {
- return "url('#" + id + "')";
- }
- var location = document.location;
- var locationString = (
- location.protocol + '//' +
- location.host +
- location.pathname +
- location.search
- );
- return "url('" + locationString + "#" + id + "')";
- },
- updatePosition = function (o) {
- var bbox = o.getBBox(1);
- $(o.pattern, {patternTransform: o.matrix.invert() + " translate(" + bbox.x + "," + bbox.y + ")"});
- },
- addArrow = function (o, value, isEnd) {
- if (o.type == "path") {
- var values = Str(value).toLowerCase().split("-"),
- p = o.paper,
- se = isEnd ? "end" : "start",
- node = o.node,
- attrs = o.attrs,
- stroke = attrs["stroke-width"],
- i = values.length,
- type = "classic",
- from,
- to,
- dx,
- refX,
- attr,
- w = 3,
- h = 3,
- t = 5;
- while (i--) {
- switch (values[i]) {
- case "block":
- case "classic":
- case "oval":
- case "diamond":
- case "open":
- case "none":
- type = values[i];
- break;
- case "wide": h = 5; break;
- case "narrow": h = 2; break;
- case "long": w = 5; break;
- case "short": w = 2; break;
- }
- }
- if (type == "open") {
- w += 2;
- h += 2;
- t += 2;
- dx = 1;
- refX = isEnd ? 4 : 1;
- attr = {
- fill: "none",
- stroke: attrs.stroke
- };
- } else {
- refX = dx = w / 2;
- attr = {
- fill: attrs.stroke,
- stroke: "none"
- };
- }
- if (o._.arrows) {
- if (isEnd) {
- o._.arrows.endPath && markerCounter[o._.arrows.endPath]--;
- o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--;
- } else {
- o._.arrows.startPath && markerCounter[o._.arrows.startPath]--;
- o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--;
- }
- } else {
- o._.arrows = {};
- }
- if (type != "none") {
- var pathId = "raphael-marker-" + type,
- markerId = "raphael-marker-" + se + type + w + h + "-obj" + o.id;
- if (!R._g.doc.getElementById(pathId)) {
- p.defs.appendChild($($("path"), {
- "stroke-linecap": "round",
- d: markers[type],
- id: pathId
- }));
- markerCounter[pathId] = 1;
- } else {
- markerCounter[pathId]++;
- }
- var marker = R._g.doc.getElementById(markerId),
- use;
- if (!marker) {
- marker = $($("marker"), {
- id: markerId,
- markerHeight: h,
- markerWidth: w,
- orient: "auto",
- refX: refX,
- refY: h / 2
- });
- use = $($("use"), {
- "xlink:href": "#" + pathId,
- transform: (isEnd ? "rotate(180 " + w / 2 + " " + h / 2 + ") " : E) + "scale(" + w / t + "," + h / t + ")",
- "stroke-width": (1 / ((w / t + h / t) / 2)).toFixed(4)
- });
- marker.appendChild(use);
- p.defs.appendChild(marker);
- markerCounter[markerId] = 1;
- } else {
- markerCounter[markerId]++;
- use = marker.getElementsByTagName("use")[0];
- }
- $(use, attr);
- var delta = dx * (type != "diamond" && type != "oval");
- if (isEnd) {
- from = o._.arrows.startdx * stroke || 0;
- to = R.getTotalLength(attrs.path) - delta * stroke;
- } else {
- from = delta * stroke;
- to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);
- }
- attr = {};
- attr["marker-" + se] = "url(#" + markerId + ")";
- if (to || from) {
- attr.d = R.getSubpath(attrs.path, from, to);
- }
- $(node, attr);
- o._.arrows[se + "Path"] = pathId;
- o._.arrows[se + "Marker"] = markerId;
- o._.arrows[se + "dx"] = delta;
- o._.arrows[se + "Type"] = type;
- o._.arrows[se + "String"] = value;
- } else {
- if (isEnd) {
- from = o._.arrows.startdx * stroke || 0;
- to = R.getTotalLength(attrs.path) - from;
- } else {
- from = 0;
- to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);
- }
- o._.arrows[se + "Path"] && $(node, {d: R.getSubpath(attrs.path, from, to)});
- delete o._.arrows[se + "Path"];
- delete o._.arrows[se + "Marker"];
- delete o._.arrows[se + "dx"];
- delete o._.arrows[se + "Type"];
- delete o._.arrows[se + "String"];
- }
- for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) {
- var item = R._g.doc.getElementById(attr);
- item && item.parentNode.removeChild(item);
- }
- }
- },
- dasharray = {
- "-": [3, 1],
- ".": [1, 1],
- "-.": [3, 1, 1, 1],
- "-..": [3, 1, 1, 1, 1, 1],
- ". ": [1, 3],
- "- ": [4, 3],
- "--": [8, 3],
- "- .": [4, 3, 1, 3],
- "--.": [8, 3, 1, 3],
- "--..": [8, 3, 1, 3, 1, 3]
- },
- addDashes = function (o, value, params) {
- value = dasharray[Str(value).toLowerCase()];
- if (value) {
- var width = o.attrs["stroke-width"] || "1",
- butt = {round: width, square: width, butt: 0}[o.attrs["stroke-linecap"] || params["stroke-linecap"]] || 0,
- dashes = [],
- i = value.length;
- while (i--) {
- dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt;
- }
- $(o.node, {"stroke-dasharray": dashes.join(",")});
- }
- else {
- $(o.node, {"stroke-dasharray": "none"});
- }
- },
- setFillAndStroke = function (o, params) {
- var node = o.node,
- attrs = o.attrs,
- vis = node.style.visibility;
- node.style.visibility = "hidden";
- for (var att in params) {
- if (params[has](att)) {
- if (!R._availableAttrs[has](att)) {
- continue;
- }
- var value = params[att];
- attrs[att] = value;
- switch (att) {
- case "blur":
- o.blur(value);
- break;
- case "title":
- var title = node.getElementsByTagName("title");
-
- // Use the existing <title>.
- if (title.length && (title = title[0])) {
- title.firstChild.nodeValue = value;
- } else {
- title = $("title");
- var val = R._g.doc.createTextNode(value);
- title.appendChild(val);
- node.appendChild(title);
- }
- break;
- case "href":
- case "target":
- var pn = node.parentNode;
- if (pn.tagName.toLowerCase() != "a") {
- var hl = $("a");
- pn.insertBefore(hl, node);
- hl.appendChild(node);
- pn = hl;
- }
- if (att == "target") {
- pn.setAttributeNS(xlink, "show", value == "blank" ? "new" : value);
- } else {
- pn.setAttributeNS(xlink, att, value);
- }
- break;
- case "cursor":
- node.style.cursor = value;
- break;
- case "transform":
- o.transform(value);
- break;
- case "arrow-start":
- addArrow(o, value);
- break;
- case "arrow-end":
- addArrow(o, value, 1);
- break;
- case "clip-rect":
- var rect = Str(value).split(separator);
- if (rect.length == 4) {
- o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode);
- var el = $("clipPath"),
- rc = $("rect");
- el.id = R.createUUID();
- $(rc, {
- x: rect[0],
- y: rect[1],
- width: rect[2],
- height: rect[3]
- });
- el.appendChild(rc);
- o.paper.defs.appendChild(el);
- $(node, {"clip-path": "url(#" + el.id + ")"});
- o.clip = rc;
- }
- if (!value) {
- var path = node.getAttribute("clip-path");
- if (path) {
- var clip = R._g.doc.getElementById(path.replace(/(^url\(#|\)$)/g, E));
- clip && clip.parentNode.removeChild(clip);
- $(node, {"clip-path": E});
- delete o.clip;
- }
- }
- break;
- case "path":
- if (o.type == "path") {
- $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : "M0,0"});
- o._.dirty = 1;
- if (o._.arrows) {
- "startString" in o._.arrows && addArrow(o, o._.arrows.startString);
- "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1);
- }
- }
- break;
- case "width":
- node.setAttribute(att, value);
- o._.dirty = 1;
- if (attrs.fx) {
- att = "x";
- value = attrs.x;
- } else {
- break;
- }
- case "x":
- if (attrs.fx) {
- value = -attrs.x - (attrs.width || 0);
- }
- case "rx":
- if (att == "rx" && o.type == "rect") {
- break;
- }
- case "cx":
- node.setAttribute(att, value);
- o.pattern && updatePosition(o);
- o._.dirty = 1;
- break;
- case "height":
- node.setAttribute(att, value);
- o._.dirty = 1;
- if (attrs.fy) {
- att = "y";
- value = attrs.y;
- } else {
- break;
- }
- case "y":
- if (attrs.fy) {
- value = -attrs.y - (attrs.height || 0);
- }
- case "ry":
- if (att == "ry" && o.type == "rect") {
- break;
- }
- case "cy":
- node.setAttribute(att, value);
- o.pattern && updatePosition(o);
- o._.dirty = 1;
- break;
- case "r":
- if (o.type == "rect") {
- $(node, {rx: value, ry: value});
- } else {
- node.setAttribute(att, value);
- }
- o._.dirty = 1;
- break;
- case "src":
- if (o.type == "image") {
- node.setAttributeNS(xlink, "href", value);
- }
- break;
- case "stroke-width":
- if (o._.sx != 1 || o._.sy != 1) {
- value /= mmax(abs(o._.sx), abs(o._.sy)) || 1;
- }
- node.setAttribute(att, value);
- if (attrs["stroke-dasharray"]) {
- addDashes(o, attrs["stroke-dasharray"], params);
- }
- if (o._.arrows) {
- "startString" in o._.arrows && addArrow(o, o._.arrows.startString);
- "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1);
- }
- break;
- case "stroke-dasharray":
- addDashes(o, value, params);
- break;
- case "fill":
- var isURL = Str(value).match(R._ISURL);
- if (isURL) {
- el = $("pattern");
- var ig = $("image");
- el.id = R.createUUID();
- $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1});
- $(ig, {x: 0, y: 0, "xlink:href": isURL[1]});
- el.appendChild(ig);
-
- (function (el) {
- R._preload(isURL[1], function () {
- var w = this.offsetWidth,
- h = this.offsetHeight;
- $(el, {width: w, height: h});
- $(ig, {width: w, height: h});
- });
- })(el);
- o.paper.defs.appendChild(el);
- $(node, {fill: "url(#" + el.id + ")"});
- o.pattern = el;
- o.pattern && updatePosition(o);
- break;
- }
- var clr = R.getRGB(value);
- if (!clr.error) {
- delete params.gradient;
- delete attrs.gradient;
- !R.is(attrs.opacity, "undefined") &&
- R.is(params.opacity, "undefined") &&
- $(node, {opacity: attrs.opacity});
- !R.is(attrs["fill-opacity"], "undefined") &&
- R.is(params["fill-opacity"], "undefined") &&
- $(node, {"fill-opacity": attrs["fill-opacity"]});
- } else if ((o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value)) {
- if ("opacity" in attrs || "fill-opacity" in attrs) {
- var gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E));
- if (gradient) {
- var stops = gradient.getElementsByTagName("stop");
- $(stops[stops.length - 1], {"stop-opacity": ("opacity" in attrs ? attrs.opacity : 1) * ("fill-opacity" in attrs ? attrs["fill-opacity"] : 1)});
- }
- }
- attrs.gradient = value;
- attrs.fill = "none";
- break;
- }
- clr[has]("opacity") && $(node, {"fill-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity});
- case "stroke":
- clr = R.getRGB(value);
- node.setAttribute(att, clr.hex);
- att == "stroke" && clr[has]("opacity") && $(node, {"stroke-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity});
- if (att == "stroke" && o._.arrows) {
- "startString" in o._.arrows && addArrow(o, o._.arrows.startString);
- "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1);
- }
- break;
- case "gradient":
- (o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value);
- break;
- case "opacity":
- if (attrs.gradient && !attrs[has]("stroke-opacity")) {
- $(node, {"stroke-opacity": value > 1 ? value / 100 : value});
- }
- // fall
- case "fill-opacity":
- if (attrs.gradient) {
- gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E));
- if (gradient) {
- stops = gradient.getElementsByTagName("stop");
- $(stops[stops.length - 1], {"stop-opacity": value});
- }
- break;
- }
- default:
- att == "font-size" && (value = toInt(value, 10) + "px");
- var cssrule = att.replace(/(\-.)/g, function (w) {
- return w.substring(1).toUpperCase();
- });
- node.style[cssrule] = value;
- o._.dirty = 1;
- node.setAttribute(att, value);
- break;
- }
- }
- }
-
- tuneText(o, params);
- node.style.visibility = vis;
- },
- leading = 1.2,
- tuneText = function (el, params) {
- if (el.type != "text" || !(params[has]("text") || params[has]("font") || params[has]("font-size") || params[has]("x") || params[has]("y"))) {
- return;
- }
- var a = el.attrs,
- node = el.node,
- fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue("font-size"), 10) : 10;
-
- if (params[has]("text")) {
- a.text = params.text;
- while (node.firstChild) {
- node.removeChild(node.firstChild);
- }
- var texts = Str(params.text).split("\n"),
- tspans = [],
- tspan;
- for (var i = 0, ii = texts.length; i < ii; i++) {
- tspan = $("tspan");
- i && $(tspan, {dy: fontSize * leading, x: a.x});
- tspan.appendChild(R._g.doc.createTextNode(texts[i]));
- node.appendChild(tspan);
- tspans[i] = tspan;
- }
- } else {
- tspans = node.getElementsByTagName("tspan");
- for (i = 0, ii = tspans.length; i < ii; i++) if (i) {
- $(tspans[i], {dy: fontSize * leading, x: a.x});
- } else {
- $(tspans[0], {dy: 0});
- }
- }
- $(node, {x: a.x, y: a.y});
- el._.dirty = 1;
- var bb = el._getBBox(),
- dif = a.y - (bb.y + bb.height / 2);
- dif && R.is(dif, "finite") && $(tspans[0], {dy: dif});
- },
- getRealNode = function (node) {
- if (node.parentNode && node.parentNode.tagName.toLowerCase() === "a") {
- return node.parentNode;
- } else {
- return node;
- }
- },
- Element = function (node, svg) {
- var X = 0,
- Y = 0;
- /*\
- * Element.node
- [ property (object) ]
- **
- * Gives you a reference to the DOM object, so you can assign event handlers or just mess around.
- **
- * Note: Don’t mess with it.
- > Usage
- | // draw a circle at coordinate 10,10 with radius of 10
- | var c = paper.circle(10, 10, 10);
- | c.node.onclick = function () {
- | c.attr("fill", "red");
- | };
- \*/
- this[0] = this.node = node;
- /*\
- * Element.raphael
- [ property (object) ]
- **
- * Internal reference to @Raphael object. In case it is not available.
- > Usage
- | Raphael.el.red = function () {
- | var hsb = this.paper.raphael.rgb2hsb(this.attr("fill"));
- | hsb.h = 1;
- | this.attr({fill: this.paper.raphael.hsb2rgb(hsb).hex});
- | }
- \*/
- node.raphael = true;
- /*\
- * Element.id
- [ property (number) ]
- **
- * Unique id of the element. Especially useful when you want to listen to events of the element,
- * because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method.
- \*/
- this.id = guid();
- node.raphaelid = this.id;
-
- /**
- * Method that returns a 5 letter/digit id, enough for 36^5 = 60466176 elements
- * @returns {string} id
- */
- function guid() {
- return ("0000" + (Math.random()*Math.pow(36,5) << 0).toString(36)).slice(-5);
- }
-
- this.matrix = R.matrix();
- this.realPath = null;
- /*\
- * Element.paper
- [ property (object) ]
- **
- * Internal reference to “paper” where object drawn. Mainly for use in plugins and element extensions.
- > Usage
- | Raphael.el.cross = function () {
- | this.attr({fill: "red"});
- | this.paper.path("M10,10L50,50M50,10L10,50")
- | .attr({stroke: "red"});
- | }
- \*/
- this.paper = svg;
- this.attrs = this.attrs || {};
- this._ = {
- transform: [],
- sx: 1,
- sy: 1,
- deg: 0,
- dx: 0,
- dy: 0,
- dirty: 1
- };
- !svg.bottom && (svg.bottom = this);
- /*\
- * Element.prev
- [ property (object) ]
- **
- * Reference to the previous element in the hierarchy.
- \*/
- this.prev = svg.top;
- svg.top && (svg.top.next = this);
- svg.top = this;
- /*\
- * Element.next
- [ property (object) ]
- **
- * Reference to the next element in the hierarchy.
- \*/
- this.next = null;
- },
- elproto = R.el;
-
- Element.prototype = elproto;
- elproto.constructor = Element;
-
- R._engine.path = function (pathString, SVG) {
- var el = $("path");
- SVG.canvas && SVG.canvas.appendChild(el);
- var p = new Element(el, SVG);
- p.type = "path";
- setFillAndStroke(p, {
- fill: "none",
- stroke: "#000",
- path: pathString
- });
- return p;
- };
- /*\
- * Element.rotate
- [ method ]
- **
- * Deprecated! Use @Element.transform instead.
- * Adds rotation by given angle around given point to the list of
- * transformations of the element.
- > Parameters
- - deg (number) angle in degrees
- - cx (number) #optional x coordinate of the centre of rotation
- - cy (number) #optional y coordinate of the centre of rotation
- * If cx & cy aren’t specified centre of the shape is used as a point of rotation.
- = (object) @Element
- \*/
- elproto.rotate = function (deg, cx, cy) {
- if (this.removed) {
- return this;
- }
- deg = Str(deg).split(separator);
- if (deg.length - 1) {
- cx = toFloat(deg[1]);
- cy = toFloat(deg[2]);
- }
- deg = toFloat(deg[0]);
- (cy == null) && (cx = cy);
- if (cx == null || cy == null) {
- var bbox = this.getBBox(1);
- cx = bbox.x + bbox.width / 2;
- cy = bbox.y + bbox.height / 2;
- }
- this.transform(this._.transform.concat([["r", deg, cx, cy]]));
- return this;
- };
- /*\
- * Element.scale
- [ method ]
- **
- * Deprecated! Use @Element.transform instead.
- * Adds scale by given amount relative to given point to the list of
- * transformations of the element.
- > Parameters
- - sx (number) horisontal scale amount
- - sy (number) vertical scale amount
- - cx (number) #optional x coordinate of the centre of scale
- - cy (number) #optional y coordinate of the centre of scale
- * If cx & cy aren’t specified centre of the shape is used instead.
- = (object) @Element
- \*/
- elproto.scale = function (sx, sy, cx, cy) {
- if (this.removed) {
- return this;
- }
- sx = Str(sx).split(separator);
- if (sx.length - 1) {
- sy = toFloat(sx[1]);
- cx = toFloat(sx[2]);
- cy = toFloat(sx[3]);
- }
- sx = toFloat(sx[0]);
- (sy == null) && (sy = sx);
- (cy == null) && (cx = cy);
- if (cx == null || cy == null) {
- var bbox = this.getBBox(1);
- }
- cx = cx == null ? bbox.x + bbox.width / 2 : cx;
- cy = cy == null ? bbox.y + bbox.height / 2 : cy;
- this.transform(this._.transform.concat([["s", sx, sy, cx, cy]]));
- return this;
- };
- /*\
- * Element.translate
- [ method ]
- **
- * Deprecated! Use @Element.transform instead.
- * Adds translation by given amount to the list of transformations of the element.
- > Parameters
- - dx (number) horisontal shift
- - dy (number) vertical shift
- = (object) @Element
- \*/
- elproto.translate = function (dx, dy) {
- if (this.removed) {
- return this;
- }
- dx = Str(dx).split(separator);
- if (dx.length - 1) {
- dy = toFloat(dx[1]);
- }
- dx = toFloat(dx[0]) || 0;
- dy = +dy || 0;
- this.transform(this._.transform.concat([["t", dx, dy]]));
- return this;
- };
- /*\
- * Element.transform
- [ method ]
- **
- * Adds transformation to the element which is separate to other attributes,
- * i.e. translation doesn’t change `x` or `y` of the rectange. The format
- * of transformation string is similar to the path string syntax:
- | "t100,100r30,100,100s2,2,100,100r45s1.5"
- * Each letter is a command. There are four commands: `t` is for translate, `r` is for rotate, `s` is for
- * scale and `m` is for matrix.
- *
- * There are also alternative “absolute” translation, rotation and scale: `T`, `R` and `S`. They will not take previous transformation into account. For example, `...T100,0` will always move element 100 px horisontally, while `...t100,0` could move it vertically if there is `r90` before. Just compare results of `r90t100,0` and `r90T100,0`.
- *
- * So, the example line above could be read like “translate by 100, 100; rotate 30° around 100, 100; scale twice around 100, 100;
- * rotate 45° around centre; scale 1.5 times relative to centre”. As you can see rotate and scale commands have origin
- * coordinates as optional parameters, the default is the centre point of the element.
- * Matrix accepts six parameters.
- > Usage
- | var el = paper.rect(10, 20, 300, 200);
- | // translate 100, 100, rotate 45°, translate -100, 0
- | el.transform("t100,100r45t-100,0");
- | // if you want you can append or prepend transformations
- | el.transform("...t50,50");
- | el.transform("s2...");
- | // or even wrap
- | el.transform("t50,50...t-50-50");
- | // to reset transformation call method with empty string
- | el.transform("");
- | // to get current value call it without parameters
- | console.log(el.transform());
- > Parameters
- - tstr (string) #optional transformation string
- * If tstr isn’t specified
- = (string) current transformation string
- * else
- = (object) @Element
- \*/
- elproto.transform = function (tstr) {
- var _ = this._;
- if (tstr == null) {
- return _.transform;
- }
- R._extractTransform(this, tstr);
-
- this.clip && $(this.clip, {transform: this.matrix.invert()});
- this.pattern && updatePosition(this);
- this.node && $(this.node, {transform: this.matrix});
-
- if (_.sx != 1 || _.sy != 1) {
- var sw = this.attrs[has]("stroke-width") ? this.attrs["stroke-width"] : 1;
- this.attr({"stroke-width": sw});
- }
-
- return this;
- };
- /*\
- * Element.hide
- [ method ]
- **
- * Makes element invisible. See @Element.show.
- = (object) @Element
- \*/
- elproto.hide = function () {
- if(!this.removed) this.node.style.display = "none";
- return this;
- };
- /*\
- * Element.show
- [ method ]
- **
- * Makes element visible. See @Element.hide.
- = (object) @Element
- \*/
- elproto.show = function () {
- if(!this.removed) this.node.style.display = "";
- return this;
- };
- /*\
- * Element.remove
- [ method ]
- **
- * Removes element from the paper.
- \*/
- elproto.remove = function () {
- var node = getRealNode(this.node);
- if (this.removed || !node.parentNode) {
- return;
- }
- var paper = this.paper;
- paper.__set__ && paper.__set__.exclude(this);
- eve.unbind("raphael.*.*." + this.id);
- if (this.gradient) {
- paper.defs.removeChild(this.gradient);
- }
- R._tear(this, paper);
-
- node.parentNode.removeChild(node);
-
- // Remove custom data for element
- this.removeData();
-
- for (var i in this) {
- this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
- }
- this.removed = true;
- };
- elproto._getBBox = function () {
- if (this.node.style.display == "none") {
- this.show();
- var hide = true;
- }
- var canvasHidden = false,
- containerStyle;
- if (this.paper.canvas.parentElement) {
- containerStyle = this.paper.canvas.parentElement.style;
- } //IE10+ can't find parentElement
- else if (this.paper.canvas.parentNode) {
- containerStyle = this.paper.canvas.parentNode.style;
- }
-
- if(containerStyle && containerStyle.display == "none") {
- canvasHidden = true;
- containerStyle.display = "";
- }
- var bbox = {};
- try {
- bbox = this.node.getBBox();
- } catch(e) {
- // Firefox 3.0.x, 25.0.1 (probably more versions affected) play badly here - possible fix
- bbox = {
- x: this.node.clientLeft,
- y: this.node.clientTop,
- width: this.node.clientWidth,
- height: this.node.clientHeight
- }
- } finally {
- bbox = bbox || {};
- if(canvasHidden){
- containerStyle.display = "none";
- }
- }
- hide && this.hide();
- return bbox;
- };
- /*\
- * Element.attr
- [ method ]
- **
- * Sets the attributes of the element.
- > Parameters
- - attrName (string) attribute’s name
- - value (string) value
- * or
- - params (object) object of name/value pairs
- * or
- - attrName (string) attribute’s name
- * or
- - attrNames (array) in this case method returns array of current values for given attribute names
- = (object) @Element if attrsName & value or params are passed in.
- = (...) value of the attribute if only attrsName is passed in.
- = (array) array of values of the attribute if attrsNames is passed in.
- = (object) object of attributes if nothing is passed in.
- > Possible parameters
- # <p>Please refer to the <a href="http://www.w3.org/TR/SVG/" title="The W3C Recommendation for the SVG language describes these properties in detail.">SVG specification</a> for an explanation of these parameters.</p>
- o arrow-end (string) arrowhead on the end of the path. The format for string is `<type>[-<width>[-<length>]]`. Possible types: `classic`, `block`, `open`, `oval`, `diamond`, `none`, width: `wide`, `narrow`, `medium`, length: `long`, `short`, `midium`.
- o clip-rect (string) comma or space separated values: x, y, width and height
- o cursor (string) CSS type of the cursor
- o cx (number) the x-axis coordinate of the center of the circle, or ellipse
- o cy (number) the y-axis coordinate of the center of the circle, or ellipse
- o fill (string) colour, gradient or image
- o fill-opacity (number)
- o font (string)
- o font-family (string)
- o font-size (number) font size in pixels
- o font-weight (string)
- o height (number)
- o href (string) URL, if specified element behaves as hyperlink
- o opacity (number)
- o path (string) SVG path string format
- o r (number) radius of the circle, ellipse or rounded corner on the rect
- o rx (number) horisontal radius of the ellipse
- o ry (number) vertical radius of the ellipse
- o src (string) image URL, only works for @Element.image element
- o stroke (string) stroke colour
- o stroke-dasharray (string) [“”, “none”, “`-`”, “`.`”, “`-.`”, “`-..`”, “`. `”, “`- `”, “`--`”, “`- .`”, “`--.`”, “`--..`”]
- o stroke-linecap (string) [“`butt`”, “`square`”, “`round`”]
- o stroke-linejoin (string) [“`bevel`”, “`round`”, “`miter`”]
- o stroke-miterlimit (number)
- o stroke-opacity (number)
- o stroke-width (number) stroke width in pixels, default is '1'
- o target (string) used with href
- o text (string) contents of the text element. Use `\n` for multiline text
- o text-anchor (string) [“`start`”, “`middle`”, “`end`”], default is “`middle`”
- o title (string) will create tooltip with a given text
- o transform (string) see @Element.transform
- o width (number)
- o x (number)
- o y (number)
- > Gradients
- * Linear gradient format: “`‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`90-#fff-#000`” – 90°
- * gradient from white to black or “`0-#fff-#f00:20-#000`” – 0° gradient from white via red (at 20%) to black.
- *
- * radial gradient: “`r[(‹fx›, ‹fy›)]‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`r#fff-#000`” –
- * gradient from white to black or “`r(0.25, 0.75)#fff-#000`” – gradient from white to black with focus point
- * at 0.25, 0.75. Focus point coordinates are in 0..1 range. Radial gradients can only be applied to circles and ellipses.
- > Path String
- # <p>Please refer to <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path’s data attribute’s format are described in the SVG specification.">SVG documentation regarding path string</a>. Raphaël fully supports it.</p>
- > Colour Parsing
- # <ul>
- # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>
- # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>
- # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>
- # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200,&nbsp;100,&nbsp;0)</code>”)</li>
- # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%,&nbsp;175%,&nbsp;0%)</code>”)</li>
- # <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<code>rgba(200,&nbsp;100,&nbsp;0, .5)</code>”)</li>
- # <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<code>rgba(100%,&nbsp;175%,&nbsp;0%, 50%)</code>”)</li>
- # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5,&nbsp;0.25,&nbsp;1)</code>”)</li>
- # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>
- # <li>hsba(•••, •••, •••, •••) — same as above, but with opacity</li>
- # <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href="http://en.wikipedia.org/wiki/HSL_and_HSV" title="HSL and HSV - Wikipedia, the free encyclopedia">Wikipedia page</a></li>
- # <li>hsl(•••%, •••%, •••%) — same as above, but in %</li>
- # <li>hsla(•••, •••, •••, •••) — same as above, but with opacity</li>
- # <li>Optionally for hsb and hsl you could specify hue as a degree: “<code>hsl(240deg,&nbsp;1,&nbsp;.5)</code>” or, if you want to go fancy, “<code>hsl(240°,&nbsp;1,&nbsp;.5)</code>”</li>
- # </ul>
- \*/
- elproto.attr = function (name, value) {
- if (this.removed) {
- return this;
- }
- if (name == null) {
- var res = {};
- for (var a in this.attrs) if (this.attrs[has](a)) {
- res[a] = this.attrs[a];
- }
- res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;
- res.transform = this._.transform;
- return res;
- }
- if (value == null && R.is(name, "string")) {
- if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) {
- return this.attrs.gradient;
- }
- if (name == "transform") {
- return this._.transform;
- }
- var names = name.split(separator),
- out = {};
- for (var i = 0, ii = names.length; i < ii; i++) {
- name = names[i];
- if (name in this.attrs) {
- out[name] = this.attrs[name];
- } else if (R.is(this.paper.customAttributes[name], "function")) {
- out[name] = this.paper.customAttributes[name].def;
- } else {
- out[name] = R._availableAttrs[name];
- }
- }
- return ii - 1 ? out : out[names[0]];
- }
- if (value == null && R.is(name, "array")) {
- out = {};
- for (i = 0, ii = name.length; i < ii; i++) {
- out[name[i]] = this.attr(name[i]);
- }
- return out;
- }
- if (value != null) {
- var params = {};
- params[name] = value;
- } else if (name != null && R.is(name, "object")) {
- params = name;
- }
- for (var key in params) {
- eve("raphael.attr." + key + "." + this.id, this, params[key]);
- }
- for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {
- var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));
- this.attrs[key] = params[key];
- for (var subkey in par) if (par[has](subkey)) {
- params[subkey] = par[subkey];
- }
- }
- setFillAndStroke(this, params);
- return this;
- };
- /*\
- * Element.toFront
- [ method ]
- **
- * Moves the element so it is the closest to the viewer’s eyes, on top of other elements.
- = (object) @Element
- \*/
- elproto.toFront = function () {
- if (this.removed) {
- return this;
- }
- var node = getRealNode(this.node);
- node.parentNode.appendChild(node);
- var svg = this.paper;
- svg.top != this && R._tofront(this, svg);
- return this;
- };
- /*\
- * Element.toBack
- [ method ]
- **
- * Moves the element so it is the furthest from the viewer’s eyes, behind other elements.
- = (object) @Element
- \*/
- elproto.toBack = function () {
- if (this.removed) {
- return this;
- }
- var node = getRealNode(this.node);
- var parentNode = node.parentNode;
- parentNode.insertBefore(node, parentNode.firstChild);
- R._toback(this, this.paper);
- var svg = this.paper;
- return this;
- };
- /*\
- * Element.insertAfter
- [ method ]
- **
- * Inserts current object after the given one.
- = (object) @Element
- \*/
- elproto.insertAfter = function (element) {
- if (this.removed || !element) {
- return this;
- }
-
- var node = getRealNode(this.node);
- var afterNode = getRealNode(element.node || element[element.length - 1].node);
- if (afterNode.nextSibling) {
- afterNode.parentNode.insertBefore(node, afterNode.nextSibling);
- } else {
- afterNode.parentNode.appendChild(node);
- }
- R._insertafter(this, element, this.paper);
- return this;
- };
- /*\
- * Element.insertBefore
- [ method ]
- **
- * Inserts current object before the given one.
- = (object) @Element
- \*/
- elproto.insertBefore = function (element) {
- if (this.removed || !element) {
- return this;
- }
-
- var node = getRealNode(this.node);
- var beforeNode = getRealNode(element.node || element[0].node);
- beforeNode.parentNode.insertBefore(node, beforeNode);
- R._insertbefore(this, element, this.paper);
- return this;
- };
- elproto.blur = function (size) {
- // Experimental. No Safari support. Use it on your own risk.
- var t = this;
- if (+size !== 0) {
- var fltr = $("filter"),
- blur = $("feGaussianBlur");
- t.attrs.blur = size;
- fltr.id = R.createUUID();
- $(blur, {stdDeviation: +size || 1.5});
- fltr.appendChild(blur);
- t.paper.defs.appendChild(fltr);
- t._blur = fltr;
- $(t.node, {filter: "url(#" + fltr.id + ")"});
- } else {
- if (t._blur) {
- t._blur.parentNode.removeChild(t._blur);
- delete t._blur;
- delete t.attrs.blur;
- }
- t.node.removeAttribute("filter");
- }
- return t;
- };
- R._engine.circle = function (svg, x, y, r) {
- var el = $("circle");
- svg.canvas && svg.canvas.appendChild(el);
- var res = new Element(el, svg);
- res.attrs = {cx: x, cy: y, r: r, fill: "none", stroke: "#000"};
- res.type = "circle";
- $(el, res.attrs);
- return res;
- };
- R._engine.rect = function (svg, x, y, w, h, r) {
- var el = $("rect");
- svg.canvas && svg.canvas.appendChild(el);
- var res = new Element(el, svg);
- res.attrs = {x: x, y: y, width: w, height: h, rx: r || 0, ry: r || 0, fill: "none", stroke: "#000"};
- res.type = "rect";
- $(el, res.attrs);
- return res;
- };
- R._engine.ellipse = function (svg, x, y, rx, ry) {
- var el = $("ellipse");
- svg.canvas && svg.canvas.appendChild(el);
- var res = new Element(el, svg);
- res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: "none", stroke: "#000"};
- res.type = "ellipse";
- $(el, res.attrs);
- return res;
- };
- R._engine.image = function (svg, src, x, y, w, h) {
- var el = $("image");
- $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: "none"});
- el.setAttributeNS(xlink, "href", src);
- svg.canvas && svg.canvas.appendChild(el);
- var res = new Element(el, svg);
- res.attrs = {x: x, y: y, width: w, height: h, src: src};
- res.type = "image";
- return res;
- };
- R._engine.text = function (svg, x, y, text) {
- var el = $("text");
- svg.canvas && svg.canvas.appendChild(el);
- var res = new Element(el, svg);
- res.attrs = {
- x: x,
- y: y,
- "text-anchor": "middle",
- text: text,
- "font-family": R._availableAttrs["font-family"],
- "font-size": R._availableAttrs["font-size"],
- stroke: "none",
- fill: "#000"
- };
- res.type = "text";
- setFillAndStroke(res, res.attrs);
- return res;
- };
- R._engine.setSize = function (width, height) {
- this.width = width || this.width;
- this.height = height || this.height;
- this.canvas.setAttribute("width", this.width);
- this.canvas.setAttribute("height", this.height);
- if (this._viewBox) {
- this.setViewBox.apply(this, this._viewBox);
- }
- return this;
- };
- R._engine.create = function () {
- var con = R._getContainer.apply(0, arguments),
- container = con && con.container,
- x = con.x,
- y = con.y,
- width = con.width,
- height = con.height;
- if (!container) {
- throw new Error("SVG container not found.");
- }
- var cnvs = $("svg"),
- css = "overflow:hidden;",
- isFloating;
- x = x || 0;
- y = y || 0;
- width = width || 512;
- height = height || 342;
- $(cnvs, {
- height: height,
- version: 1.1,
- width: width,
- xmlns: "http://www.w3.org/2000/svg",
- "xmlns:xlink": "http://www.w3.org/1999/xlink"
- });
- if (container == 1) {
- cnvs.style.cssText = css + "position:absolute;left:" + x + "px;top:" + y + "px";
- R._g.doc.body.appendChild(cnvs);
- isFloating = 1;
- } else {
- cnvs.style.cssText = css + "position:relative";
- if (container.firstChild) {
- container.insertBefore(cnvs, container.firstChild);
- } else {
- container.appendChild(cnvs);
- }
- }
- container = new R._Paper;
- container.width = width;
- container.height = height;
- container.canvas = cnvs;
- container.clear();
- container._left = container._top = 0;
- isFloating && (container.renderfix = function () {});
- container.renderfix();
- return container;
- };
- R._engine.setViewBox = function (x, y, w, h, fit) {
- eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);
- var paperSize = this.getSize(),
- size = mmax(w / paperSize.width, h / paperSize.height),
- top = this.top,
- aspectRatio = fit ? "xMidYMid meet" : "xMinYMin",
- vb,
- sw;
- if (x == null) {
- if (this._vbSize) {
- size = 1;
- }
- delete this._vbSize;
- vb = "0 0 " + this.width + S + this.height;
- } else {
- this._vbSize = size;
- vb = x + S + y + S + w + S + h;
- }
- $(this.canvas, {
- viewBox: vb,
- preserveAspectRatio: aspectRatio
- });
- while (size && top) {
- sw = "stroke-width" in top.attrs ? top.attrs["stroke-width"] : 1;
- top.attr({"stroke-width": sw});
- top._.dirty = 1;
- top._.dirtyT = 1;
- top = top.prev;
- }
- this._viewBox = [x, y, w, h, !!fit];
- return this;
- };
- /*\
- * Paper.renderfix
- [ method ]
- **
- * Fixes the issue of Firefox and IE9 regarding subpixel rendering. If paper is dependent
- * on other elements after reflow it could shift half pixel which cause for lines to lost their crispness.
- * This method fixes the issue.
- **
- Special thanks to Mariusz Nowak (http://www.medikoo.com/) for this method.
- \*/
- R.prototype.renderfix = function () {
- var cnvs = this.canvas,
- s = cnvs.style,
- pos;
- try {
- pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix();
- } catch (e) {
- pos = cnvs.createSVGMatrix();
- }
- var left = -pos.e % 1,
- top = -pos.f % 1;
- if (left || top) {
- if (left) {
- this._left = (this._left + left) % 1;
- s.left = this._left + "px";
- }
- if (top) {
- this._top = (this._top + top) % 1;
- s.top = this._top + "px";
- }
- }
- };
- /*\
- * Paper.clear
- [ method ]
- **
- * Clears the paper, i.e. removes all the elements.
- \*/
- R.prototype.clear = function () {
- R.eve("raphael.clear", this);
- var c = this.canvas;
- while (c.firstChild) {
- c.removeChild(c.firstChild);
- }
- this.bottom = this.top = null;
- (this.desc = $("desc")).appendChild(R._g.doc.createTextNode("Created with Rapha\xebl " + R.version));
- c.appendChild(this.desc);
- c.appendChild(this.defs = $("defs"));
- };
- /*\
- * Paper.remove
- [ method ]
- **
- * Removes the paper from the DOM.
- \*/
- R.prototype.remove = function () {
- eve("raphael.remove", this);
- this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);
- for (var i in this) {
- this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
- }
- };
- var setproto = R.st;
- for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {
- setproto[method] = (function (methodname) {
- return function () {
- var arg = arguments;
- return this.forEach(function (el) {
- el[methodname].apply(el, arg);
- });
- };
- })(method);
- }
- }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
-
-
-/***/ },
-/* 4 */
-/***/ function(module, exports, __webpack_require__) {
-
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1)], __WEBPACK_AMD_DEFINE_RESULT__ = function(R) {
- if (R && !R.vml) {
- return;
- }
-
- var has = "hasOwnProperty",
- Str = String,
- toFloat = parseFloat,
- math = Math,
- round = math.round,
- mmax = math.max,
- mmin = math.min,
- abs = math.abs,
- fillString = "fill",
- separator = /[, ]+/,
- eve = R.eve,
- ms = " progid:DXImageTransform.Microsoft",
- S = " ",
- E = "",
- map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"},
- bites = /([clmz]),?([^clmz]*)/gi,
- blurregexp = / progid:\S+Blur\([^\)]+\)/g,
- val = /-?[^,\s-]+/g,
- cssDot = "position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",
- zoom = 21600,
- pathTypes = {path: 1, rect: 1, image: 1},
- ovalTypes = {circle: 1, ellipse: 1},
- path2vml = function (path) {
- var total = /[ahqstv]/ig,
- command = R._pathToAbsolute;
- Str(path).match(total) && (command = R._path2curve);
- total = /[clmz]/g;
- if (command == R._pathToAbsolute && !Str(path).match(total)) {
- var res = Str(path).replace(bites, function (all, command, args) {
- var vals = [],
- isMove = command.toLowerCase() == "m",
- res = map[command];
- args.replace(val, function (value) {
- if (isMove && vals.length == 2) {
- res += vals + map[command == "m" ? "l" : "L"];
- vals = [];
- }
- vals.push(round(value * zoom));
- });
- return res + vals;
- });
- return res;
- }
- var pa = command(path), p, r;
- res = [];
- for (var i = 0, ii = pa.length; i < ii; i++) {
- p = pa[i];
- r = pa[i][0].toLowerCase();
- r == "z" && (r = "x");
- for (var j = 1, jj = p.length; j < jj; j++) {
- r += round(p[j] * zoom) + (j != jj - 1 ? "," : E);
- }
- res.push(r);
- }
- return res.join(S);
- },
- compensation = function (deg, dx, dy) {
- var m = R.matrix();
- m.rotate(-deg, .5, .5);
- return {
- dx: m.x(dx, dy),
- dy: m.y(dx, dy)
- };
- },
- setCoords = function (p, sx, sy, dx, dy, deg) {
- var _ = p._,
- m = p.matrix,
- fillpos = _.fillpos,
- o = p.node,
- s = o.style,
- y = 1,
- flip = "",
- dxdy,
- kx = zoom / sx,
- ky = zoom / sy;
- s.visibility = "hidden";
- if (!sx || !sy) {
- return;
- }
- o.coordsize = abs(kx) + S + abs(ky);
- s.rotation = deg * (sx * sy < 0 ? -1 : 1);
- if (deg) {
- var c = compensation(deg, dx, dy);
- dx = c.dx;
- dy = c.dy;
- }
- sx < 0 && (flip += "x");
- sy < 0 && (flip += " y") && (y = -1);
- s.flip = flip;
- o.coordorigin = (dx * -kx) + S + (dy * -ky);
- if (fillpos || _.fillsize) {
- var fill = o.getElementsByTagName(fillString);
- fill = fill && fill[0];
- o.removeChild(fill);
- if (fillpos) {
- c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1]));
- fill.position = c.dx * y + S + c.dy * y;
- }
- if (_.fillsize) {
- fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy);
- }
- o.appendChild(fill);
- }
- s.visibility = "visible";
- };
- R.toString = function () {
- return "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version;
- };
- var addArrow = function (o, value, isEnd) {
- var values = Str(value).toLowerCase().split("-"),
- se = isEnd ? "end" : "start",
- i = values.length,
- type = "classic",
- w = "medium",
- h = "medium";
- while (i--) {
- switch (values[i]) {
- case "block":
- case "classic":
- case "oval":
- case "diamond":
- case "open":
- case "none":
- type = values[i];
- break;
- case "wide":
- case "narrow": h = values[i]; break;
- case "long":
- case "short": w = values[i]; break;
- }
- }
- var stroke = o.node.getElementsByTagName("stroke")[0];
- stroke[se + "arrow"] = type;
- stroke[se + "arrowlength"] = w;
- stroke[se + "arrowwidth"] = h;
- },
- setFillAndStroke = function (o, params) {
- // o.paper.canvas.style.display = "none";
- o.attrs = o.attrs || {};
- var node = o.node,
- a = o.attrs,
- s = node.style,
- xy,
- newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r),
- isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry),
- res = o;
-
-
- for (var par in params) if (params[has](par)) {
- a[par] = params[par];
- }
- if (newpath) {
- a.path = R._getPath[o.type](o);
- o._.dirty = 1;
- }
- params.href && (node.href = params.href);
- params.title && (node.title = params.title);
- params.target && (node.target = params.target);
- params.cursor && (s.cursor = params.cursor);
- "blur" in params && o.blur(params.blur);
- if (params.path && o.type == "path" || newpath) {
- node.path = path2vml(~Str(a.path).toLowerCase().indexOf("r") ? R._pathToAbsolute(a.path) : a.path);
- o._.dirty = 1;
- if (o.type == "image") {
- o._.fillpos = [a.x, a.y];
- o._.fillsize = [a.width, a.height];
- setCoords(o, 1, 1, 0, 0, 0);
- }
- }
- "transform" in params && o.transform(params.transform);
- if (isOval) {
- var cx = +a.cx,
- cy = +a.cy,
- rx = +a.rx || +a.r || 0,
- ry = +a.ry || +a.r || 0;
- node.path = R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom));
- o._.dirty = 1;
- }
- if ("clip-rect" in params) {
- var rect = Str(params["clip-rect"]).split(separator);
- if (rect.length == 4) {
- rect[2] = +rect[2] + (+rect[0]);
- rect[3] = +rect[3] + (+rect[1]);
- var div = node.clipRect || R._g.doc.createElement("div"),
- dstyle = div.style;
- dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect);
- if (!node.clipRect) {
- dstyle.position = "absolute";
- dstyle.top = 0;
- dstyle.left = 0;
- dstyle.width = o.paper.width + "px";
- dstyle.height = o.paper.height + "px";
- node.parentNode.insertBefore(div, node);
- div.appendChild(node);
- node.clipRect = div;
- }
- }
- if (!params["clip-rect"]) {
- node.clipRect && (node.clipRect.style.clip = "auto");
- }
- }
- if (o.textpath) {
- var textpathStyle = o.textpath.style;
- params.font && (textpathStyle.font = params.font);
- params["font-family"] && (textpathStyle.fontFamily = '"' + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + '"');
- params["font-size"] && (textpathStyle.fontSize = params["font-size"]);
- params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]);
- params["font-style"] && (textpathStyle.fontStyle = params["font-style"]);
- }
- if ("arrow-start" in params) {
- addArrow(res, params["arrow-start"]);
- }
- if ("arrow-end" in params) {
- addArrow(res, params["arrow-end"], 1);
- }
- if (params.opacity != null ||
- params.fill != null ||
- params.src != null ||
- params.stroke != null ||
- params["stroke-width"] != null ||
- params["stroke-opacity"] != null ||
- params["fill-opacity"] != null ||
- params["stroke-dasharray"] != null ||
- params["stroke-miterlimit"] != null ||
- params["stroke-linejoin"] != null ||
- params["stroke-linecap"] != null) {
- var fill = node.getElementsByTagName(fillString),
- newfill = false;
- fill = fill && fill[0];
- !fill && (newfill = fill = createNode(fillString));
- if (o.type == "image" && params.src) {
- fill.src = params.src;
- }
- params.fill && (fill.on = true);
- if (fill.on == null || params.fill == "none" || params.fill === null) {
- fill.on = false;
- }
- if (fill.on && params.fill) {
- var isURL = Str(params.fill).match(R._ISURL);
- if (isURL) {
- fill.parentNode == node && node.removeChild(fill);
- fill.rotate = true;
- fill.src = isURL[1];
- fill.type = "tile";
- var bbox = o.getBBox(1);
- fill.position = bbox.x + S + bbox.y;
- o._.fillpos = [bbox.x, bbox.y];
-
- R._preload(isURL[1], function () {
- o._.fillsize = [this.offsetWidth, this.offsetHeight];
- });
- } else {
- fill.color = R.getRGB(params.fill).hex;
- fill.src = E;
- fill.type = "solid";
- if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != "r") && addGradientFill(res, params.fill, fill)) {
- a.fill = "none";
- a.gradient = params.fill;
- fill.rotate = false;
- }
- }
- }
- if ("fill-opacity" in params || "opacity" in params) {
- var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1);
- opacity = mmin(mmax(opacity, 0), 1);
- fill.opacity = opacity;
- if (fill.src) {
- fill.color = "none";
- }
- }
- node.appendChild(fill);
- var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]),
- newstroke = false;
- !stroke && (newstroke = stroke = createNode("stroke"));
- if ((params.stroke && params.stroke != "none") ||
- params["stroke-width"] ||
- params["stroke-opacity"] != null ||
- params["stroke-dasharray"] ||
- params["stroke-miterlimit"] ||
- params["stroke-linejoin"] ||
- params["stroke-linecap"]) {
- stroke.on = true;
- }
- (params.stroke == "none" || params.stroke === null || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false);
- var strokeColor = R.getRGB(params.stroke);
- stroke.on && params.stroke && (stroke.color = strokeColor.hex);
- opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1);
- var width = (toFloat(params["stroke-width"]) || 1) * .75;
- opacity = mmin(mmax(opacity, 0), 1);
- params["stroke-width"] == null && (width = a["stroke-width"]);
- params["stroke-width"] && (stroke.weight = width);
- width && width < 1 && (opacity *= width) && (stroke.weight = 1);
- stroke.opacity = opacity;
-
- params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter");
- stroke.miterlimit = params["stroke-miterlimit"] || 8;
- params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round");
- if ("stroke-dasharray" in params) {
- var dasharray = {
- "-": "shortdash",
- ".": "shortdot",
- "-.": "shortdashdot",
- "-..": "shortdashdotdot",
- ". ": "dot",
- "- ": "dash",
- "--": "longdash",
- "- .": "dashdot",
- "--.": "longdashdot",
- "--..": "longdashdotdot"
- };
- stroke.dashstyle = dasharray[has](params["stroke-dasharray"]) ? dasharray[params["stroke-dasharray"]] : E;
- }
- newstroke && node.appendChild(stroke);
- }
- if (res.type == "text") {
- res.paper.canvas.style.display = E;
- var span = res.paper.span,
- m = 100,
- fontSize = a.font && a.font.match(/\d+(?:\.\d*)?(?=px)/);
- s = span.style;
- a.font && (s.font = a.font);
- a["font-family"] && (s.fontFamily = a["font-family"]);
- a["font-weight"] && (s.fontWeight = a["font-weight"]);
- a["font-style"] && (s.fontStyle = a["font-style"]);
- fontSize = toFloat(a["font-size"] || fontSize && fontSize[0]) || 10;
- s.fontSize = fontSize * m + "px";
- res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/</g, "&#60;").replace(/&/g, "&#38;").replace(/\n/g, "<br>"));
- var brect = span.getBoundingClientRect();
- res.W = a.w = (brect.right - brect.left) / m;
- res.H = a.h = (brect.bottom - brect.top) / m;
- // res.paper.canvas.style.display = "none";
- res.X = a.x;
- res.Y = a.y + res.H / 2;
-
- ("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1));
- var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"];
- for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) {
- res._.dirty = 1;
- break;
- }
-
- // text-anchor emulation
- switch (a["text-anchor"]) {
- case "start":
- res.textpath.style["v-text-align"] = "left";
- res.bbx = res.W / 2;
- break;
- case "end":
- res.textpath.style["v-text-align"] = "right";
- res.bbx = -res.W / 2;
- break;
- default:
- res.textpath.style["v-text-align"] = "center";
- res.bbx = 0;
- break;
- }
- res.textpath.style["v-text-kern"] = true;
- }
- // res.paper.canvas.style.display = E;
- },
- addGradientFill = function (o, gradient, fill) {
- o.attrs = o.attrs || {};
- var attrs = o.attrs,
- pow = Math.pow,
- opacity,
- oindex,
- type = "linear",
- fxfy = ".5 .5";
- o.attrs.gradient = gradient;
- gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) {
- type = "radial";
- if (fx && fy) {
- fx = toFloat(fx);
- fy = toFloat(fy);
- pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5);
- fxfy = fx + S + fy;
- }
- return E;
- });
- gradient = gradient.split(/\s*\-\s*/);
- if (type == "linear") {
- var angle = gradient.shift();
- angle = -toFloat(angle);
- if (isNaN(angle)) {
- return null;
- }
- }
- var dots = R._parseDots(gradient);
- if (!dots) {
- return null;
- }
- o = o.shape || o.node;
- if (dots.length) {
- o.removeChild(fill);
- fill.on = true;
- fill.method = "none";
- fill.color = dots[0].color;
- fill.color2 = dots[dots.length - 1].color;
- var clrs = [];
- for (var i = 0, ii = dots.length; i < ii; i++) {
- dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color);
- }
- fill.colors = clrs.length ? clrs.join() : "0% " + fill.color;
- if (type == "radial") {
- fill.type = "gradientTitle";
- fill.focus = "100%";
- fill.focussize = "0 0";
- fill.focusposition = fxfy;
- fill.angle = 0;
- } else {
- // fill.rotate= true;
- fill.type = "gradient";
- fill.angle = (270 - angle) % 360;
- }
- o.appendChild(fill);
- }
- return 1;
- },
- Element = function (node, vml) {
- this[0] = this.node = node;
- node.raphael = true;
- this.id = R._oid++;
- node.raphaelid = this.id;
- this.X = 0;
- this.Y = 0;
- this.attrs = {};
- this.paper = vml;
- this.matrix = R.matrix();
- this._ = {
- transform: [],
- sx: 1,
- sy: 1,
- dx: 0,
- dy: 0,
- deg: 0,
- dirty: 1,
- dirtyT: 1
- };
- !vml.bottom && (vml.bottom = this);
- this.prev = vml.top;
- vml.top && (vml.top.next = this);
- vml.top = this;
- this.next = null;
- };
- var elproto = R.el;
-
- Element.prototype = elproto;
- elproto.constructor = Element;
- elproto.transform = function (tstr) {
- if (tstr == null) {
- return this._.transform;
- }
- var vbs = this.paper._viewBoxShift,
- vbt = vbs ? "s" + [vbs.scale, vbs.scale] + "-1-1t" + [vbs.dx, vbs.dy] : E,
- oldt;
- if (vbs) {
- oldt = tstr = Str(tstr).replace(/\.{3}|\u2026/g, this._.transform || E);
- }
- R._extractTransform(this, vbt + tstr);
- var matrix = this.matrix.clone(),
- skew = this.skew,
- o = this.node,
- split,
- isGrad = ~Str(this.attrs.fill).indexOf("-"),
- isPatt = !Str(this.attrs.fill).indexOf("url(");
- matrix.translate(1, 1);
- if (isPatt || isGrad || this.type == "image") {
- skew.matrix = "1 0 0 1";
- skew.offset = "0 0";
- split = matrix.split();
- if ((isGrad && split.noRotation) || !split.isSimple) {
- o.style.filter = matrix.toFilter();
- var bb = this.getBBox(),
- bbt = this.getBBox(1),
- dx = bb.x - bbt.x,
- dy = bb.y - bbt.y;
- o.coordorigin = (dx * -zoom) + S + (dy * -zoom);
- setCoords(this, 1, 1, dx, dy, 0);
- } else {
- o.style.filter = E;
- setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate);
- }
- } else {
- o.style.filter = E;
- skew.matrix = Str(matrix);
- skew.offset = matrix.offset();
- }
- if (oldt !== null) { // empty string value is true as well
- this._.transform = oldt;
- R._extractTransform(this, oldt);
- }
- return this;
- };
- elproto.rotate = function (deg, cx, cy) {
- if (this.removed) {
- return this;
- }
- if (deg == null) {
- return;
- }
- deg = Str(deg).split(separator);
- if (deg.length - 1) {
- cx = toFloat(deg[1]);
- cy = toFloat(deg[2]);
- }
- deg = toFloat(deg[0]);
- (cy == null) && (cx = cy);
- if (cx == null || cy == null) {
- var bbox = this.getBBox(1);
- cx = bbox.x + bbox.width / 2;
- cy = bbox.y + bbox.height / 2;
- }
- this._.dirtyT = 1;
- this.transform(this._.transform.concat([["r", deg, cx, cy]]));
- return this;
- };
- elproto.translate = function (dx, dy) {
- if (this.removed) {
- return this;
- }
- dx = Str(dx).split(separator);
- if (dx.length - 1) {
- dy = toFloat(dx[1]);
- }
- dx = toFloat(dx[0]) || 0;
- dy = +dy || 0;
- if (this._.bbox) {
- this._.bbox.x += dx;
- this._.bbox.y += dy;
- }
- this.transform(this._.transform.concat([["t", dx, dy]]));
- return this;
- };
- elproto.scale = function (sx, sy, cx, cy) {
- if (this.removed) {
- return this;
- }
- sx = Str(sx).split(separator);
- if (sx.length - 1) {
- sy = toFloat(sx[1]);
- cx = toFloat(sx[2]);
- cy = toFloat(sx[3]);
- isNaN(cx) && (cx = null);
- isNaN(cy) && (cy = null);
- }
- sx = toFloat(sx[0]);
- (sy == null) && (sy = sx);
- (cy == null) && (cx = cy);
- if (cx == null || cy == null) {
- var bbox = this.getBBox(1);
- }
- cx = cx == null ? bbox.x + bbox.width / 2 : cx;
- cy = cy == null ? bbox.y + bbox.height / 2 : cy;
-
- this.transform(this._.transform.concat([["s", sx, sy, cx, cy]]));
- this._.dirtyT = 1;
- return this;
- };
- elproto.hide = function () {
- !this.removed && (this.node.style.display = "none");
- return this;
- };
- elproto.show = function () {
- !this.removed && (this.node.style.display = E);
- return this;
- };
- // Needed to fix the vml setViewBox issues
- elproto.auxGetBBox = R.el.getBBox;
- elproto.getBBox = function(){
- var b = this.auxGetBBox();
- if (this.paper && this.paper._viewBoxShift)
- {
- var c = {};
- var z = 1/this.paper._viewBoxShift.scale;
- c.x = b.x - this.paper._viewBoxShift.dx;
- c.x *= z;
- c.y = b.y - this.paper._viewBoxShift.dy;
- c.y *= z;
- c.width = b.width * z;
- c.height = b.height * z;
- c.x2 = c.x + c.width;
- c.y2 = c.y + c.height;
- return c;
- }
- return b;
- };
- elproto._getBBox = function () {
- if (this.removed) {
- return {};
- }
- return {
- x: this.X + (this.bbx || 0) - this.W / 2,
- y: this.Y - this.H,
- width: this.W,
- height: this.H
- };
- };
- elproto.remove = function () {
- if (this.removed || !this.node.parentNode) {
- return;
- }
- this.paper.__set__ && this.paper.__set__.exclude(this);
- R.eve.unbind("raphael.*.*." + this.id);
- R._tear(this, this.paper);
- this.node.parentNode.removeChild(this.node);
- this.shape && this.shape.parentNode.removeChild(this.shape);
- for (var i in this) {
- this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
- }
- this.removed = true;
- };
- elproto.attr = function (name, value) {
- if (this.removed) {
- return this;
- }
- if (name == null) {
- var res = {};
- for (var a in this.attrs) if (this.attrs[has](a)) {
- res[a] = this.attrs[a];
- }
- res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;
- res.transform = this._.transform;
- return res;
- }
- if (value == null && R.is(name, "string")) {
- if (name == fillString && this.attrs.fill == "none" && this.attrs.gradient) {
- return this.attrs.gradient;
- }
- var names = name.split(separator),
- out = {};
- for (var i = 0, ii = names.length; i < ii; i++) {
- name = names[i];
- if (name in this.attrs) {
- out[name] = this.attrs[name];
- } else if (R.is(this.paper.customAttributes[name], "function")) {
- out[name] = this.paper.customAttributes[name].def;
- } else {
- out[name] = R._availableAttrs[name];
- }
- }
- return ii - 1 ? out : out[names[0]];
- }
- if (this.attrs && value == null && R.is(name, "array")) {
- out = {};
- for (i = 0, ii = name.length; i < ii; i++) {
- out[name[i]] = this.attr(name[i]);
- }
- return out;
- }
- var params;
- if (value != null) {
- params = {};
- params[name] = value;
- }
- value == null && R.is(name, "object") && (params = name);
- for (var key in params) {
- eve("raphael.attr." + key + "." + this.id, this, params[key]);
- }
- if (params) {
- for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {
- var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));
- this.attrs[key] = params[key];
- for (var subkey in par) if (par[has](subkey)) {
- params[subkey] = par[subkey];
- }
- }
- // this.paper.canvas.style.display = "none";
- if (params.text && this.type == "text") {
- this.textpath.string = params.text;
- }
- setFillAndStroke(this, params);
- // this.paper.canvas.style.display = E;
- }
- return this;
- };
- elproto.toFront = function () {
- !this.removed && this.node.parentNode.appendChild(this.node);
- this.paper && this.paper.top != this && R._tofront(this, this.paper);
- return this;
- };
- elproto.toBack = function () {
- if (this.removed) {
- return this;
- }
- if (this.node.parentNode.firstChild != this.node) {
- this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild);
- R._toback(this, this.paper);
- }
- return this;
- };
- elproto.insertAfter = function (element) {
- if (this.removed) {
- return this;
- }
- if (element.constructor == R.st.constructor) {
- element = element[element.length - 1];
- }
- if (element.node.nextSibling) {
- element.node.parentNode.insertBefore(this.node, element.node.nextSibling);
- } else {
- element.node.parentNode.appendChild(this.node);
- }
- R._insertafter(this, element, this.paper);
- return this;
- };
- elproto.insertBefore = function (element) {
- if (this.removed) {
- return this;
- }
- if (element.constructor == R.st.constructor) {
- element = element[0];
- }
- element.node.parentNode.insertBefore(this.node, element.node);
- R._insertbefore(this, element, this.paper);
- return this;
- };
- elproto.blur = function (size) {
- var s = this.node.runtimeStyle,
- f = s.filter;
- f = f.replace(blurregexp, E);
- if (+size !== 0) {
- this.attrs.blur = size;
- s.filter = f + S + ms + ".Blur(pixelradius=" + (+size || 1.5) + ")";
- s.margin = R.format("-{0}px 0 0 -{0}px", round(+size || 1.5));
- } else {
- s.filter = f;
- s.margin = 0;
- delete this.attrs.blur;
- }
- return this;
- };
-
- R._engine.path = function (pathString, vml) {
- var el = createNode("shape");
- el.style.cssText = cssDot;
- el.coordsize = zoom + S + zoom;
- el.coordorigin = vml.coordorigin;
- var p = new Element(el, vml),
- attr = {fill: "none", stroke: "#000"};
- pathString && (attr.path = pathString);
- p.type = "path";
- p.path = [];
- p.Path = E;
- setFillAndStroke(p, attr);
- vml.canvas && vml.canvas.appendChild(el);
- var skew = createNode("skew");
- skew.on = true;
- el.appendChild(skew);
- p.skew = skew;
- p.transform(E);
- return p;
- };
- R._engine.rect = function (vml, x, y, w, h, r) {
- var path = R._rectPath(x, y, w, h, r),
- res = vml.path(path),
- a = res.attrs;
- res.X = a.x = x;
- res.Y = a.y = y;
- res.W = a.width = w;
- res.H = a.height = h;
- a.r = r;
- a.path = path;
- res.type = "rect";
- return res;
- };
- R._engine.ellipse = function (vml, x, y, rx, ry) {
- var res = vml.path(),
- a = res.attrs;
- res.X = x - rx;
- res.Y = y - ry;
- res.W = rx * 2;
- res.H = ry * 2;
- res.type = "ellipse";
- setFillAndStroke(res, {
- cx: x,
- cy: y,
- rx: rx,
- ry: ry
- });
- return res;
- };
- R._engine.circle = function (vml, x, y, r) {
- var res = vml.path(),
- a = res.attrs;
- res.X = x - r;
- res.Y = y - r;
- res.W = res.H = r * 2;
- res.type = "circle";
- setFillAndStroke(res, {
- cx: x,
- cy: y,
- r: r
- });
- return res;
- };
- R._engine.image = function (vml, src, x, y, w, h) {
- var path = R._rectPath(x, y, w, h),
- res = vml.path(path).attr({stroke: "none"}),
- a = res.attrs,
- node = res.node,
- fill = node.getElementsByTagName(fillString)[0];
- a.src = src;
- res.X = a.x = x;
- res.Y = a.y = y;
- res.W = a.width = w;
- res.H = a.height = h;
- a.path = path;
- res.type = "image";
- fill.parentNode == node && node.removeChild(fill);
- fill.rotate = true;
- fill.src = src;
- fill.type = "tile";
- res._.fillpos = [x, y];
- res._.fillsize = [w, h];
- node.appendChild(fill);
- setCoords(res, 1, 1, 0, 0, 0);
- return res;
- };
- R._engine.text = function (vml, x, y, text) {
- var el = createNode("shape"),
- path = createNode("path"),
- o = createNode("textpath");
- x = x || 0;
- y = y || 0;
- text = text || "";
- path.v = R.format("m{0},{1}l{2},{1}", round(x * zoom), round(y * zoom), round(x * zoom) + 1);
- path.textpathok = true;
- o.string = Str(text);
- o.on = true;
- el.style.cssText = cssDot;
- el.coordsize = zoom + S + zoom;
- el.coordorigin = "0 0";
- var p = new Element(el, vml),
- attr = {
- fill: "#000",
- stroke: "none",
- font: R._availableAttrs.font,
- text: text
- };
- p.shape = el;
- p.path = path;
- p.textpath = o;
- p.type = "text";
- p.attrs.text = Str(text);
- p.attrs.x = x;
- p.attrs.y = y;
- p.attrs.w = 1;
- p.attrs.h = 1;
- setFillAndStroke(p, attr);
- el.appendChild(o);
- el.appendChild(path);
- vml.canvas.appendChild(el);
- var skew = createNode("skew");
- skew.on = true;
- el.appendChild(skew);
- p.skew = skew;
- p.transform(E);
- return p;
- };
- R._engine.setSize = function (width, height) {
- var cs = this.canvas.style;
- this.width = width;
- this.height = height;
- width == +width && (width += "px");
- height == +height && (height += "px");
- cs.width = width;
- cs.height = height;
- cs.clip = "rect(0 " + width + " " + height + " 0)";
- if (this._viewBox) {
- R._engine.setViewBox.apply(this, this._viewBox);
- }
- return this;
- };
- R._engine.setViewBox = function (x, y, w, h, fit) {
- R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);
- var paperSize = this.getSize(),
- width = paperSize.width,
- height = paperSize.height,
- H, W;
- if (fit) {
- H = height / h;
- W = width / w;
- if (w * H < width) {
- x -= (width - w * H) / 2 / H;
- }
- if (h * W < height) {
- y -= (height - h * W) / 2 / W;
- }
- }
- this._viewBox = [x, y, w, h, !!fit];
- this._viewBoxShift = {
- dx: -x,
- dy: -y,
- scale: paperSize
- };
- this.forEach(function (el) {
- el.transform("...");
- });
- return this;
- };
- var createNode;
- R._engine.initWin = function (win) {
- var doc = win.document;
- if (doc.styleSheets.length < 31) {
- doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)");
- } else {
- // no more room, add to the existing one
- // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx
- doc.styleSheets[0].addRule(".rvml", "behavior:url(#default#VML)");
- }
- try {
- !doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml");
- createNode = function (tagName) {
- return doc.createElement('<rvml:' + tagName + ' class="rvml">');
- };
- } catch (e) {
- createNode = function (tagName) {
- return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');
- };
- }
- };
- R._engine.initWin(R._g.win);
- R._engine.create = function () {
- var con = R._getContainer.apply(0, arguments),
- container = con.container,
- height = con.height,
- s,
- width = con.width,
- x = con.x,
- y = con.y;
- if (!container) {
- throw new Error("VML container not found.");
- }
- var res = new R._Paper,
- c = res.canvas = R._g.doc.createElement("div"),
- cs = c.style;
- x = x || 0;
- y = y || 0;
- width = width || 512;
- height = height || 342;
- res.width = width;
- res.height = height;
- width == +width && (width += "px");
- height == +height && (height += "px");
- res.coordsize = zoom * 1e3 + S + zoom * 1e3;
- res.coordorigin = "0 0";
- res.span = R._g.doc.createElement("span");
- res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;";
- c.appendChild(res.span);
- cs.cssText = R.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden", width, height);
- if (container == 1) {
- R._g.doc.body.appendChild(c);
- cs.left = x + "px";
- cs.top = y + "px";
- cs.position = "absolute";
- } else {
- if (container.firstChild) {
- container.insertBefore(c, container.firstChild);
- } else {
- container.appendChild(c);
- }
- }
- res.renderfix = function () {};
- return res;
- };
- R.prototype.clear = function () {
- R.eve("raphael.clear", this);
- this.canvas.innerHTML = E;
- this.span = R._g.doc.createElement("span");
- this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";
- this.canvas.appendChild(this.span);
- this.bottom = this.top = null;
- };
- R.prototype.remove = function () {
- R.eve("raphael.remove", this);
- this.canvas.parentNode.removeChild(this.canvas);
- for (var i in this) {
- this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
- }
- return true;
- };
-
- var setproto = R.st;
- for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {
- setproto[method] = (function (methodname) {
- return function () {
- var arg = arguments;
- return this.forEach(function (el) {
- el[methodname].apply(el, arg);
- });
- };
- })(method);
- }
- }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
-
-
-/***/ }
-/******/ ])
-});
-; \ No newline at end of file
diff --git a/debian/missing-sources/tableExport-1.6.0.js b/debian/missing-sources/tableExport-1.6.0.js
deleted file mode 100644
index 0d67afe8..00000000
--- a/debian/missing-sources/tableExport-1.6.0.js
+++ /dev/null
@@ -1,1736 +0,0 @@
-/**
- * @preserve tableExport.jquery.plugin
- *
- * Copyright (c) 2015-2017 hhurz, https://github.com/hhurz/tableExport.jquery.plugin
- * Original work Copyright (c) 2014 Giri Raj, https://github.com/kayalshri/
- *
- * Licensed under the MIT License, http://opensource.org/licenses/mit-license
- */
-
-(function ($) {
- $.fn.extend({
- tableExport: function (options) {
- var defaults = {
- consoleLog: false,
- csvEnclosure: '"',
- csvSeparator: ',',
- csvUseBOM: true,
- displayTableName: false,
- escape: false,
- excelstyles: [], // e.g. ['border-bottom', 'border-top', 'border-left', 'border-right']
- fileName: 'tableExport',
- htmlContent: false,
- ignoreColumn: [],
- ignoreRow:[],
- jsonScope: 'all', // head, data, all
- jspdf: {orientation: 'p',
- unit: 'pt',
- format: 'a4', // jspdf page format or 'bestfit' for autmatic paper format selection
- margins: {left: 20, right: 10, top: 10, bottom: 10},
- autotable: {styles: {cellPadding: 2,
- rowHeight: 12,
- fontSize: 8,
- fillColor: 255, // color value or 'inherit' to use css background-color from html table
- textColor: 50, // color value or 'inherit' to use css color from html table
- fontStyle: 'normal', // normal, bold, italic, bolditalic or 'inherit' to use css font-weight and fonst-style from html table
- overflow: 'ellipsize', // visible, hidden, ellipsize or linebreak
- halign: 'left', // left, center, right
- valign: 'middle' // top, middle, bottom
- },
- headerStyles: {fillColor: [52, 73, 94],
- textColor: 255,
- fontStyle: 'bold',
- halign: 'center'
- },
- alternateRowStyles: {fillColor: 245
- },
- tableExport: {onAfterAutotable: null,
- onBeforeAutotable: null,
- onTable: null,
- outputImages: true
- }
- }
- },
- numbers: {html: {decimalMark: '.',
- thousandsSeparator: ','
- },
- output: {decimalMark: '.',
- thousandsSeparator: ','
- }
- },
- onCellData: null,
- onCellHtmlData: null,
- outputMode: 'file', // 'file', 'string', 'base64' or 'window' (experimental)
- pdfmake: {enabled: false}, // true: use pdfmake instead of jspdf(-autotable)
- tbodySelector: 'tr',
- tfootSelector: 'tr', // set empty ('') to prevent export of tfoot rows
- theadSelector: 'tr',
- tableName: 'myTableName',
- type: 'csv', // 'csv', 'tsv', 'txt', 'sql', 'json', 'xml', 'excel', 'doc', 'png' or 'pdf'
- worksheetName: 'xlsWorksheetName'
- };
-
- var FONT_ROW_RATIO = 1.15;
- var el = this;
- var DownloadEvt = null;
- var $hrows = [];
- var $rows = [];
- var rowIndex = 0;
- var rowspans = [];
- var trData = '';
- var colNames = [];
- var blob;
-
- $.extend(true, defaults, options);
-
- colNames = GetColumnNames (el);
-
- if (defaults.type == 'csv' || defaults.type == 'tsv' || defaults.type == 'txt') {
-
- var csvData = "";
- var rowlength = 0;
- rowIndex = 0;
-
- function csvString(cell, rowIndex, colIndex) {
- var result = '';
-
- if (cell !== null) {
- var dataString = parseString(cell, rowIndex, colIndex);
-
- var csvValue = (dataString === null || dataString === '') ? '' : dataString.toString();
-
- if (defaults.type == 'tsv') {
- if (dataString instanceof Date)
- result = dataString.toLocaleString();
-
- // According to http://www.iana.org/assignments/media-types/text/tab-separated-values
- // are fields that contain tabs not allowable in tsv encoding
- result = replaceAll(csvValue, '\t', ' ');
- }
- else {
- // Takes a string and encapsulates it (by default in double-quotes) if it
- // contains the csv field separator, spaces, or linebreaks.
- if (dataString instanceof Date)
- result = defaults.csvEnclosure + dataString.toLocaleString() + defaults.csvEnclosure;
- else {
- result = replaceAll(csvValue, defaults.csvEnclosure, defaults.csvEnclosure + defaults.csvEnclosure);
-
- if (result.indexOf(defaults.csvSeparator) >= 0 || /[\r\n ]/g.test(result))
- result = defaults.csvEnclosure + result + defaults.csvEnclosure;
- }
- }
- }
-
- return result;
- }
-
- var CollectCsvData = function ($rows, rowselector, length) {
-
- $rows.each(function () {
- trData = "";
- ForEachVisibleCell(this, rowselector, rowIndex, length + $rows.length,
- function (cell, row, col) {
- trData += csvString(cell, row, col) + (defaults.type == 'tsv' ? '\t' : defaults.csvSeparator);
- });
- trData = $.trim(trData).substring(0, trData.length - 1);
- if (trData.length > 0) {
-
- if (csvData.length > 0)
- csvData += "\n";
-
- csvData += trData;
- }
- rowIndex++;
- });
-
- return $rows.length;
- };
-
- rowlength += CollectCsvData ($(el).find('thead').first().find(defaults.theadSelector), 'th,td', rowlength);
- $(el).find('tbody').each(function() {
- rowlength += CollectCsvData ($(this).find(defaults.tbodySelector), 'td,th', rowlength);
- });
- if (defaults.tfootSelector.length)
- CollectCsvData ($(el).find('tfoot').first().find(defaults.tfootSelector), 'td,th', rowlength);
-
- csvData += "\n";
-
- //output
- if (defaults.consoleLog === true)
- console.log(csvData);
-
- if (defaults.outputMode === 'string')
- return csvData;
-
- if (defaults.outputMode === 'base64')
- return base64encode(csvData);
-
- if (defaults.outputMode === 'window') {
- downloadFile(false, 'data:text/' + (defaults.type == 'csv' ? 'csv' : 'plain') + ';charset=utf-8,', csvData);
- return;
- }
-
- try {
- blob = new Blob([csvData], {type: "text/" + (defaults.type == 'csv' ? 'csv' : 'plain') + ";charset=utf-8"});
- saveAs(blob, defaults.fileName + '.' + defaults.type, (defaults.type != 'csv' || defaults.csvUseBOM === false));
- }
- catch (e) {
- downloadFile(defaults.fileName + '.' + defaults.type,
- 'data:text/' + (defaults.type == 'csv' ? 'csv' : 'plain') + ';charset=utf-8,' + ((defaults.type == 'csv' && defaults.csvUseBOM)? '\ufeff' : ''),
- csvData);
- }
-
- } else if (defaults.type == 'sql') {
-
- // Header
- rowIndex = 0;
- var tdData = "INSERT INTO `" + defaults.tableName + "` (";
- $hrows = $(el).find('thead').first().find(defaults.theadSelector);
- $hrows.each(function () {
- ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
- function (cell, row, col) {
- tdData += "'" + parseString(cell, row, col) + "',";
- });
- rowIndex++;
- tdData = $.trim(tdData);
- tdData = $.trim(tdData).substring(0, tdData.length - 1);
- });
- tdData += ") VALUES ";
- // Row vs Column
- $(el).find('tbody').each(function() {
- $rows.push.apply ($rows, $(this).find(defaults.tbodySelector));
- });
- if (defaults.tfootSelector.length)
- $rows.push.apply ($rows, $(el).find('tfoot').find(defaults.tfootSelector));
- $($rows).each(function () {
- trData = "";
- ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
- function (cell, row, col) {
- trData += "'" + parseString(cell, row, col) + "',";
- });
- if (trData.length > 3) {
- tdData += "(" + trData;
- tdData = $.trim(tdData).substring(0, tdData.length - 1);
- tdData += "),";
- }
- rowIndex++;
- });
-
- tdData = $.trim(tdData).substring(0, tdData.length - 1);
- tdData += ";";
-
- //output
- if (defaults.consoleLog === true)
- console.log(tdData);
-
- if (defaults.outputMode === 'string')
- return tdData;
-
- if (defaults.outputMode === 'base64')
- return base64encode(tdData);
-
- try {
- blob = new Blob([tdData], {type: "text/plain;charset=utf-8"});
- saveAs(blob, defaults.fileName + '.sql');
- }
- catch (e) {
- downloadFile(defaults.fileName + '.sql',
- 'data:application/sql;charset=utf-8,',
- tdData);
- }
-
- } else if (defaults.type == 'json') {
-
- var jsonHeaderArray = [];
- $hrows = $(el).find('thead').first().find(defaults.theadSelector);
- $hrows.each(function () {
- var jsonArrayTd = [];
-
- ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
- function (cell, row, col) {
- jsonArrayTd.push(parseString(cell, row, col));
- });
- jsonHeaderArray.push(jsonArrayTd);
- });
-
- var jsonArray = [];
- $(el).find('tbody').each(function() {
- $rows.push.apply ($rows, $(this).find(defaults.tbodySelector));
- });
- if (defaults.tfootSelector.length)
- $rows.push.apply ($rows, $(el).find('tfoot').find(defaults.tfootSelector));
- $($rows).each(function () {
- var jsonObjectTd = {};
-
- var colIndex = 0;
- ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
- function (cell, row, col) {
- if (jsonHeaderArray.length) {
- jsonObjectTd[jsonHeaderArray[jsonHeaderArray.length-1][colIndex]] = parseString(cell, row, col);
- } else {
- jsonObjectTd[colIndex] = parseString(cell, row, col);
- }
- colIndex++;
- });
- if ($.isEmptyObject(jsonObjectTd) === false)
- jsonArray.push(jsonObjectTd);
-
- rowIndex++;
- });
-
- var sdata = "";
-
- if (defaults.jsonScope == 'head')
- sdata = JSON.stringify(jsonHeaderArray);
- else if (defaults.jsonScope == 'data')
- sdata = JSON.stringify(jsonArray);
- else // all
- sdata = JSON.stringify({header: jsonHeaderArray, data: jsonArray});
-
- if (defaults.consoleLog === true)
- console.log(sdata);
-
- if (defaults.outputMode === 'string')
- return sdata;
-
- if (defaults.outputMode === 'base64')
- return base64encode(sdata);
-
- try {
- blob = new Blob([sdata], {type: "application/json;charset=utf-8"});
- saveAs(blob, defaults.fileName + '.json');
- }
- catch (e) {
- downloadFile(defaults.fileName + '.json',
- 'data:application/json;charset=utf-8;base64,',
- sdata);
- }
-
- } else if (defaults.type === 'xml') {
-
- rowIndex = 0;
- var xml = '<?xml version="1.0" encoding="utf-8"?>';
- xml += '<tabledata><fields>';
-
- // Header
- $hrows = $(el).find('thead').first().find(defaults.theadSelector);
- $hrows.each(function () {
-
- ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
- function (cell, row, col) {
- xml += "<field>" + parseString(cell, row, col) + "</field>";
- });
- rowIndex++;
- });
- xml += '</fields><data>';
-
- // Row Vs Column
- var rowCount = 1;
- $(el).find('tbody').each(function() {
- $rows.push.apply ($rows, $(this).find(defaults.tbodySelector));
- });
- if (defaults.tfootSelector.length)
- $rows.push.apply ($rows, $(el).find('tfoot').find(defaults.tfootSelector));
- $($rows).each(function () {
- var colCount = 1;
- trData = "";
- ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
- function (cell, row, col) {
- trData += "<column-" + colCount + ">" + parseString(cell, row, col) + "</column-" + colCount + ">";
- colCount++;
- });
- if (trData.length > 0 && trData != "<column-1></column-1>") {
- xml += '<row id="' + rowCount + '">' + trData + '</row>';
- rowCount++;
- }
-
- rowIndex++;
- });
- xml += '</data></tabledata>';
-
- //output
- if (defaults.consoleLog === true)
- console.log(xml);
-
- if (defaults.outputMode === 'string')
- return xml;
-
- if (defaults.outputMode === 'base64')
- return base64encode(xml);
-
- try {
- blob = new Blob([xml], {type: "application/xml;charset=utf-8"});
- saveAs(blob, defaults.fileName + '.xml');
- }
- catch (e) {
- downloadFile(defaults.fileName + '.xml',
- 'data:application/xml;charset=utf-8;base64,',
- xml);
- }
-
- } else if (defaults.type == 'excel' || defaults.type == 'xls' || defaults.type == 'word' || defaults.type == 'doc') {
-
- var MSDocType = (defaults.type == 'excel' || defaults.type == 'xls') ? 'excel' : 'word';
- var MSDocExt = (MSDocType == 'excel') ? 'xls' : 'doc';
- var MSDocSchema = 'xmlns:x="urn:schemas-microsoft-com:office:' + MSDocType + '"';
- var $tables = $(el).filter(function() {
- return $(this).data("tableexport-display") != 'none' &&
- ($(this).is(':visible') ||
- $(this).data("tableexport-display") == 'always');
- });
- var docData = '';
-
- $tables.each(function(){
- var $table = $(this);
- rowIndex = 0;
- colNames = GetColumnNames (this);
-
- docData += '<table><thead>';
- // Header
- $hrows = $table.find('thead').first().find(defaults.theadSelector);
- $hrows.each(function() {
- trData = "";
- ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
- function(cell, row, col) {
- if (cell !== null) {
- var thstyle = '';
- trData += '<th';
- for (var styles in defaults.excelstyles) {
- if (defaults.excelstyles.hasOwnProperty(styles)) {
- var thcss = $(cell).css(defaults.excelstyles[styles]);
- if (thcss !== '' && thcss !='0px none rgb(0, 0, 0)' && thcss != 'rgba(0, 0, 0, 0)') {
- thstyle += (thstyle === '') ? 'style="' : ';';
- thstyle += defaults.excelstyles[styles] + ':' + thcss;
- }
- }
- }
- if (thstyle !== '' )
- trData += ' ' + thstyle + '"';
- if ($(cell).is("[colspan]"))
- trData += ' colspan="' + $(cell).attr('colspan') + '"';
- if ($(cell).is("[rowspan]"))
- trData += ' rowspan="' + $(cell).attr('rowspan') + '"';
- trData += '>' + parseString(cell, row, col) + '</th>';
- }
- });
- if (trData.length > 0)
- docData += '<tr>' + trData + '</tr>';
- rowIndex++;
- });
-
- docData += '</thead><tbody>';
- // Row Vs Column, support multiple tbodys
- $table.find('tbody').each(function() {
- $rows.push.apply ($rows, $(this).find(defaults.tbodySelector));
- });
- if (defaults.tfootSelector.length)
- $rows.push.apply ($rows, $table.find('tfoot').find(defaults.tfootSelector));
-
- $($rows).each(function() {
- var $row = $(this);
- trData = "";
- ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
- function(cell, row, col) {
- if (cell !== null) {
- var tdstyle = '';
- var tdcss = $(cell).data("tableexport-msonumberformat");
-
- if (typeof tdcss == 'undefined' && typeof defaults.onMsoNumberFormat === 'function')
- tdcss = defaults.onMsoNumberFormat(cell, row, col);
-
- if (typeof tdcss != 'undefined' && tdcss !== '')
- tdstyle = 'style="mso-number-format:\'' + tdcss + '\'';
-
- for (var cssStyle in defaults.excelstyles) {
- if (defaults.excelstyles.hasOwnProperty(cssStyle)) {
- tdcss = $(cell).css(defaults.excelstyles[cssStyle]);
- if (tdcss === '')
- tdcss = $row.css(defaults.excelstyles[cssStyle]);
-
- if (tdcss !== '' && tdcss !='0px none rgb(0, 0, 0)' && tdcss != 'rgba(0, 0, 0, 0)') {
- tdstyle += (tdstyle === '') ? 'style="' : ';';
- tdstyle += defaults.excelstyles[cssStyle] + ':' + tdcss;
- }
- }
- }
- trData += '<td';
- if (tdstyle !== '' )
- trData += ' ' + tdstyle + '"';
- if ($(cell).is("[colspan]"))
- trData += ' colspan="' + $(cell).attr('colspan') + '"';
- if ($(cell).is("[rowspan]"))
- trData += ' rowspan="' + $(cell).attr('rowspan') + '"';
- trData += '>' + parseString(cell, row, col).replace(/\n/g,'<br>') + '</td>';
- }
- });
- if (trData.length > 0)
- docData += '<tr>' + trData + '</tr>';
- rowIndex++;
- });
-
- if (defaults.displayTableName)
- docData += '<tr><td></td></tr><tr><td></td></tr><tr><td>' + parseString($('<p>' + defaults.tableName + '</p>')) + '</td></tr>';
-
- docData += '</tbody></table>';
-
- if (defaults.consoleLog === true)
- console.log(docData);
- });
-
- var docFile = '<html xmlns:o="urn:schemas-microsoft-com:office:office" ' + MSDocSchema + ' xmlns="http://www.w3.org/TR/REC-html40">';
- docFile += '<meta http-equiv="content-type" content="application/vnd.ms-' + MSDocType + '; charset=UTF-8">';
- docFile += "<head>";
- if (MSDocType === 'excel') {
- docFile += "<!--[if gte mso 9]>";
- docFile += "<xml>";
- docFile += "<x:ExcelWorkbook>";
- docFile += "<x:ExcelWorksheets>";
- docFile += "<x:ExcelWorksheet>";
- docFile += "<x:Name>";
- docFile += defaults.worksheetName;
- docFile += "</x:Name>";
- docFile += "<x:WorksheetOptions>";
- docFile += "<x:DisplayGridlines/>";
- docFile += "</x:WorksheetOptions>";
- docFile += "</x:ExcelWorksheet>";
- docFile += "</x:ExcelWorksheets>";
- docFile += "</x:ExcelWorkbook>";
- docFile += "</xml>";
- docFile += "<![endif]-->";
- }
- docFile += "<style>br {mso-data-placement:same-cell;}</style>";
- docFile += "</head>";
- docFile += "<body>";
- docFile += docData;
- docFile += "</body>";
- docFile += "</html>";
-
- if (defaults.consoleLog === true)
- console.log(docFile);
-
- if (defaults.outputMode === 'string')
- return docFile;
-
- if (defaults.outputMode === 'base64')
- return base64encode(docFile);
-
- try {
- blob = new Blob([docFile], {type: 'application/vnd.ms-' + defaults.type});
- saveAs(blob, defaults.fileName + '.' + MSDocExt);
- }
- catch (e) {
- downloadFile(defaults.fileName + '.' + MSDocExt,
- 'data:application/vnd.ms-' + MSDocType + ';base64,',
- docFile);
- }
-
- } else if (defaults.type == 'xlsx') {
-
- var data = [];
- var ranges = [];
- rowIndex = 0;
-
- $rows = $(el).find('thead').first().find(defaults.theadSelector);
- $(el).find('tbody').each(function() {
- $rows.push.apply ($rows, $(this).find(defaults.tbodySelector));
- });
- if (defaults.tfootSelector.length)
- $rows.push.apply ($rows, $(el).find('tfoot').find(defaults.tfootSelector));
-
- $($rows).each(function () {
- var cols = [];
- ForEachVisibleCell(this, 'th,td', rowIndex, $rows.length,
- function (cell, row, col) {
- if (typeof cell !== 'undefined' && cell !== null) {
-
- var colspan = parseInt(cell.getAttribute('colspan'));
- var rowspan = parseInt(cell.getAttribute('rowspan'));
-
- var cellValue = parseString(cell, row, col);
-
- if(cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue;
-
- //Skip ranges
- ranges.forEach(function(range) {
- if(rowIndex >= range.s.r && rowIndex <= range.e.r && cols.length >= range.s.c && cols.length <= range.e.c) {
- for(var i = 0; i <= range.e.c - range.s.c; ++i) cols.push(null);
- }
- });
-
- //Handle Row Span
- if (rowspan || colspan) {
- rowspan = rowspan || 1;
- colspan = colspan || 1;
- ranges.push({s:{r:rowIndex, c:cols.length},e:{r:rowIndex+rowspan-1, c:cols.length+colspan-1}});
- }
-
- //Handle Value
- cols.push(cellValue !== "" ? cellValue : null);
-
- //Handle Colspan
- if (colspan) for (var k = 0; k < colspan - 1; ++k) cols.push(null);
- }
- });
- data.push(cols);
- rowIndex++;
- });
-
- var wb = new jx_Workbook(),
- ws = jx_createSheet(data);
-
- // add ranges to worksheet
- ws['!merges'] = ranges;
-
- // add worksheet to workbook
- wb.SheetNames.push(defaults.worksheetName);
- wb.Sheets[defaults.worksheetName] = ws;
-
- var wbout = XLSX.write(wb, {bookType: defaults.type, bookSST: false, type: 'binary'});
-
- try {
- blob = new Blob([jx_s2ab(wbout)], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=UTF-8'});
- saveAs(blob, defaults.fileName + '.' + defaults.type);
- }
- catch (e) {
- downloadFile(defaults.fileName + '.' + defaults.type,
- 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=UTF-8',
- data);
- }
-
- } else if (defaults.type == 'png') {
- //html2canvas($(el)[0], {
- // onrendered: function (canvas) {
- html2canvas($(el)[0]).then(
- function (canvas) {
-
- var image = canvas.toDataURL();
- var byteString = atob(image.substring(22)); // remove data stuff
- var buffer = new ArrayBuffer(byteString.length);
- var intArray = new Uint8Array(buffer);
-
- for (var i = 0; i < byteString.length; i++)
- intArray[i] = byteString.charCodeAt(i);
-
- if (defaults.consoleLog === true)
- console.log(byteString);
-
- if (defaults.outputMode === 'string')
- return byteString;
-
- if (defaults.outputMode === 'base64')
- return base64encode(image);
-
- if (defaults.outputMode === 'window') {
- window.open(image);
- return;
- }
-
- try {
- blob = new Blob([buffer], {type: "image/png"});
- saveAs(blob, defaults.fileName + '.png');
- }
- catch (e) {
- downloadFile(defaults.fileName + '.png',
- 'data:image/png,',
- image);
- }
- //}
- });
-
- } else if (defaults.type == 'pdf') {
-
- if (defaults.pdfmake.enabled === true) {
- // pdf output using pdfmake
- // https://github.com/bpampuch/pdfmake
-
- var widths = [];
- var body = [];
- rowIndex = 0;
-
- $hrows = $(this).find('thead').first().find(defaults.theadSelector);
- $hrows.each(function () {
- var h = [];
-
- ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
- function (cell, row, col) {
- h.push(parseString(cell, row, col));
- });
-
- if (h.length)
- body.push(h);
-
- for(var i = widths.length; i < h.length;i++)
- widths.push("*");
-
- rowIndex++;
- });
-
- $(this).find('tbody').each(function() {
- $rows.push.apply ($rows, $(this).find(defaults.tbodySelector));
- });
- if (defaults.tfootSelector.length)
- $rows.push.apply ($rows, $(this).find('tfoot').find(defaults.tfootSelector));
-
- $($rows).each(function () {
- var r = [];
-
- ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
- function (cell, row, col) {
- r.push(parseString(cell, row, col));
- });
-
- if (r.length)
- body.push(r);
- rowIndex++;
- });
-
- var docDefinition = {
- pageOrientation: 'landscape',
- content: [
- {
- table: {
- headerRows: $hrows.length,
- widths: widths,
- body: body
- }
- }
- ]
- };
- pdfMake.createPdf(docDefinition).getBuffer(function (buffer) {
-
- try {
- var blob = new Blob([buffer], {type: "application/pdf"});
- saveAs(blob, defaults.fileName + '.pdf');
- }
- catch (e) {
- downloadFile(defaults.fileName + '.pdf',
- 'data:application/pdf;base64,',
- buffer);
- }
- });
-
- }
- else if (defaults.jspdf.autotable === false) {
- // pdf output using jsPDF's core html support
-
- var addHtmlOptions = {
- dim: {
- w: getPropertyUnitValue($(el).first().get(0), 'width', 'mm'),
- h: getPropertyUnitValue($(el).first().get(0), 'height', 'mm')
- },
- pagesplit: false
- };
-
- var doc = new jsPDF(defaults.jspdf.orientation, defaults.jspdf.unit, defaults.jspdf.format);
- doc.addHTML($(el).first(),
- defaults.jspdf.margins.left,
- defaults.jspdf.margins.top,
- addHtmlOptions,
- function () {
- jsPdfOutput(doc);
- });
- //delete doc;
- }
- else {
- // pdf output using jsPDF AutoTable plugin
- // https://github.com/simonbengtsson/jsPDF-AutoTable
-
- var teOptions = defaults.jspdf.autotable.tableExport;
-
- // When setting jspdf.format to 'bestfit' tableExport tries to choose
- // the minimum required paper format and orientation in which the table
- // (or tables in multitable mode) completely fits without column adjustment
- if (typeof defaults.jspdf.format === 'string' && defaults.jspdf.format.toLowerCase() === 'bestfit') {
- var pageFormats = {
- 'a0': [2383.94, 3370.39], 'a1': [1683.78, 2383.94],
- 'a2': [1190.55, 1683.78], 'a3': [841.89, 1190.55],
- 'a4': [595.28, 841.89]
- };
- var rk = '', ro = '';
- var mw = 0;
-
- $(el).filter(':visible').each(function () {
- if ($(this).css('display') != 'none') {
- var w = getPropertyUnitValue($(this).get(0), 'width', 'pt');
-
- if (w > mw) {
- if (w > pageFormats.a0[0]) {
- rk = 'a0';
- ro = 'l';
- }
- for (var key in pageFormats) {
- if (pageFormats.hasOwnProperty(key)) {
- if (pageFormats[key][1] > w) {
- rk = key;
- ro = 'l';
- if (pageFormats[key][0] > w)
- ro = 'p';
- }
- }
- }
- mw = w;
- }
- }
- });
- defaults.jspdf.format = (rk === '' ? 'a4' : rk);
- defaults.jspdf.orientation = (ro === '' ? 'w' : ro);
- }
-
- // The jsPDF doc object is stored in defaults.jspdf.autotable.tableExport,
- // thus it can be accessed from any callback function
- teOptions.doc = new jsPDF(defaults.jspdf.orientation,
- defaults.jspdf.unit,
- defaults.jspdf.format);
-
- if (teOptions.outputImages === true)
- teOptions.images = {};
-
- if (typeof teOptions.images != 'undefined') {
- $(el).filter(function() {
- return $(this).data("tableexport-display") != 'none' &&
- ($(this).is(':visible') ||
- $(this).data("tableexport-display") == 'always');
- }).each(function () {
- var rowCount = 0;
-
- $hrows = $(this).find('thead').find(defaults.theadSelector);
- $(this).find('tbody').each(function() {
- $rows.push.apply ($rows, $(this).find(defaults.tbodySelector));
- });
- if (defaults.tfootSelector.length)
- $rows.push.apply ($rows, $(this).find('tfoot').find(defaults.tfootSelector));
-
- $($rows).each(function () {
- ForEachVisibleCell(this, 'td,th', $hrows.length + rowCount, $hrows.length + $rows.length,
- function (cell, row, col) {
- if (typeof cell !== 'undefined' && cell !== null) {
- var kids = $(cell).children();
- if (typeof kids != 'undefined' && kids.length > 0)
- collectImages (cell, kids, teOptions);
- }
- });
- rowCount++;
- });
- });
-
- $hrows = [];
- $rows = [];
- }
-
- loadImages ( teOptions, function (imageCount) {
-
- $(el).filter(function() {
- return $(this).data("tableexport-display") != 'none' &&
- ($(this).is(':visible') ||
- $(this).data("tableexport-display") == 'always');
- }).each(function () {
- var colKey;
- var rowIndex = 0;
-
- colNames = GetColumnNames (this);
-
- teOptions.columns = [];
- teOptions.rows = [];
- teOptions.rowoptions = {};
-
- // onTable: optional callback function for every matching table that can be used
- // to modify the tableExport options or to skip the output of a particular table
- // if the table selector targets multiple tables
- if (typeof teOptions.onTable === 'function')
- if (teOptions.onTable($(this), defaults) === false)
- return true; // continue to next iteration step (table)
-
- // each table works with an own copy of AutoTable options
- defaults.jspdf.autotable.tableExport = null; // avoid deep recursion error
- var atOptions = $.extend(true, {}, defaults.jspdf.autotable);
- defaults.jspdf.autotable.tableExport = teOptions;
-
- atOptions.margin = {};
- $.extend(true, atOptions.margin, defaults.jspdf.margins);
- atOptions.tableExport = teOptions;
-
- // Fix jsPDF Autotable's row height calculation
- if (typeof atOptions.beforePageContent !== 'function') {
- atOptions.beforePageContent = function (data) {
- if (data.pageCount == 1) {
- var all = data.table.rows.concat(data.table.headerRow);
- all.forEach(function (row) {
- if ( row.height > 0 ) {
- row.height += (2 - FONT_ROW_RATIO) / 2 * row.styles.fontSize;
- data.table.height += (2 - FONT_ROW_RATIO) / 2 * row.styles.fontSize;
- }
- });
- }
- };
- }
-
- if (typeof atOptions.createdHeaderCell !== 'function') {
- // apply some original css styles to pdf header cells
- atOptions.createdHeaderCell = function (cell, data) {
-
- // jsPDF AutoTable plugin v2.0.14 fix: each cell needs its own styles object
- cell.styles = $.extend({}, data.row.styles);
-
- if (typeof teOptions.columns [data.column.dataKey] != 'undefined') {
- var col = teOptions.columns [data.column.dataKey];
-
- if (typeof col.rect != 'undefined') {
- var rh;
-
- cell.contentWidth = col.rect.width;
-
- if (typeof teOptions.heightRatio == 'undefined' || teOptions.heightRatio === 0) {
- if (data.row.raw [data.column.dataKey].rowspan)
- rh = data.row.raw [data.column.dataKey].rect.height / data.row.raw [data.column.dataKey].rowspan;
- else
- rh = data.row.raw [data.column.dataKey].rect.height;
-
- teOptions.heightRatio = cell.styles.rowHeight / rh;
- }
-
- rh = data.row.raw [data.column.dataKey].rect.height * teOptions.heightRatio;
- if (rh > cell.styles.rowHeight)
- cell.styles.rowHeight = rh;
- }
-
- if (typeof col.style != 'undefined' && col.style.hidden !== true) {
- cell.styles.halign = col.style.align;
- if (atOptions.styles.fillColor === 'inherit')
- cell.styles.fillColor = col.style.bcolor;
- if (atOptions.styles.textColor === 'inherit')
- cell.styles.textColor = col.style.color;
- if (atOptions.styles.fontStyle === 'inherit')
- cell.styles.fontStyle = col.style.fstyle;
- }
- }
- };
- }
-
- if (typeof atOptions.createdCell !== 'function') {
- // apply some original css styles to pdf table cells
- atOptions.createdCell = function (cell, data) {
- var rowopt = teOptions.rowoptions [data.row.index + ":" + data.column.dataKey];
-
- if (typeof rowopt != 'undefined' &&
- typeof rowopt.style != 'undefined' &&
- rowopt.style.hidden !== true) {
- cell.styles.halign = rowopt.style.align;
- if (atOptions.styles.fillColor === 'inherit')
- cell.styles.fillColor = rowopt.style.bcolor;
- if (atOptions.styles.textColor === 'inherit')
- cell.styles.textColor = rowopt.style.color;
- if (atOptions.styles.fontStyle === 'inherit')
- cell.styles.fontStyle = rowopt.style.fstyle;
- }
- };
- }
-
- if (typeof atOptions.drawHeaderCell !== 'function') {
- atOptions.drawHeaderCell = function (cell, data) {
- var colopt = teOptions.columns [data.column.dataKey];
-
- if ((colopt.style.hasOwnProperty("hidden") !== true || colopt.style.hidden !== true) &&
- colopt.rowIndex >= 0 )
- return prepareAutoTableText (cell, data, colopt);
- else
- return false; // cell is hidden
- };
- }
-
- if (typeof atOptions.drawCell !== 'function') {
- atOptions.drawCell = function (cell, data) {
- var rowopt = teOptions.rowoptions [data.row.index + ":" + data.column.dataKey];
- if ( prepareAutoTableText (cell, data, rowopt) ) {
-
- teOptions.doc.rect(cell.x, cell.y, cell.width, cell.height, cell.styles.fillStyle);
-
- if (typeof rowopt != 'undefined' && typeof rowopt.kids != 'undefined' && rowopt.kids.length > 0) {
-
- var dh = cell.height / rowopt.rect.height;
- if ( dh > teOptions.dh || typeof teOptions.dh == 'undefined' )
- teOptions.dh = dh;
- teOptions.dw = cell.width / rowopt.rect.width;
-
- drawCellElements (cell, rowopt.kids, teOptions);
- }
- teOptions.doc.autoTableText(cell.text, cell.textPos.x, cell.textPos.y, {
- halign: cell.styles.halign,
- valign: cell.styles.valign
- });
- }
- return false;
- };
- }
-
- // collect header and data rows
- teOptions.headerrows = [];
- $hrows = $(this).find('thead').find(defaults.theadSelector);
- $hrows.each(function () {
- colKey = 0;
-
- teOptions.headerrows[rowIndex] = [];
-
- ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
- function (cell, row, col) {
- var obj = getCellStyles (cell);
- obj.title = parseString(cell, row, col);
- obj.key = colKey++;
- obj.rowIndex = rowIndex;
- teOptions.headerrows[rowIndex].push(obj);
- });
- rowIndex++;
- });
-
- if (rowIndex > 0) {
- // iterate through last row
- $.each(teOptions.headerrows[rowIndex-1], function () {
- var obj = this;
- if (rowIndex > 1 && this.rect === null)
- obj = teOptions.headerrows[rowIndex-2][this.key];
- if (obj !== null)
- teOptions.columns.push(obj);
- });
- }
-
- var rowCount = 0;
- $rows = [];
- $(this).find('tbody').each(function() {
- $rows.push.apply ($rows, $(this).find(defaults.tbodySelector));
- });
- if (defaults.tfootSelector.length)
- $rows.push.apply ($rows, $(this).find('tfoot').find(defaults.tfootSelector));
- $($rows).each(function () {
- var rowData = [];
- colKey = 0;
-
- ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
- function (cell, row, col) {
- if (typeof teOptions.columns[colKey] === 'undefined') {
- // jsPDF-Autotable needs columns. Thus define hidden ones for tables without thead
- var obj = {
- title: '',
- key: colKey,
- style: {
- hidden: true
- }
- };
- teOptions.columns.push(obj);
- }
- if (typeof cell !== 'undefined' && cell !== null) {
- var obj = getCellStyles (cell);
- obj.kids = $(cell).children();
- teOptions.rowoptions [rowCount + ":" + colKey++] = obj;
- }
- else {
- var obj = $.extend(true, {}, teOptions.rowoptions [rowCount + ":" + (colKey-1)]);
- obj.colspan = -1;
- teOptions.rowoptions [rowCount + ":" + colKey++] = obj;
- }
-
- rowData.push(parseString(cell, row, col));
- });
- if (rowData.length) {
- teOptions.rows.push(rowData);
- rowCount++;
- }
- rowIndex++;
- });
-
- // onBeforeAutotable: optional callback function before calling
- // jsPDF AutoTable that can be used to modify the AutoTable options
- if (typeof teOptions.onBeforeAutotable === 'function')
- teOptions.onBeforeAutotable($(this), teOptions.columns, teOptions.rows, atOptions);
-
- teOptions.doc.autoTable(teOptions.columns, teOptions.rows, atOptions);
-
- // onAfterAutotable: optional callback function after returning
- // from jsPDF AutoTable that can be used to modify the AutoTable options
- if (typeof teOptions.onAfterAutotable === 'function')
- teOptions.onAfterAutotable($(this), atOptions);
-
- // set the start position for the next table (in case there is one)
- defaults.jspdf.autotable.startY = teOptions.doc.autoTableEndPosY() + atOptions.margin.top;
-
- });
-
- jsPdfOutput(teOptions.doc);
-
- if (typeof teOptions.headerrows != 'undefined')
- teOptions.headerrows.length = 0;
- if (typeof teOptions.columns != 'undefined')
- teOptions.columns.length = 0;
- if (typeof teOptions.rows != 'undefined')
- teOptions.rows.length = 0;
- delete teOptions.doc;
- teOptions.doc = null;
- });
- }
- }
-
- function FindColObject (objects, colIndex, rowIndex) {
- var result = null;
- $.each(objects, function () {
- if (this.rowIndex == rowIndex && this.key == colIndex) {
- result = this;
- return false;
- }
- });
- return result;
- }
-
- function GetColumnNames (table) {
- var result = [];
- $(table).find('thead').first().find('th').each(function(index, el) {
- if ($(el).attr("data-field") !== undefined)
- result[index] = $(el).attr("data-field");
- else
- result[index] = index.toString();
- });
- return result;
- }
-
- function isColumnIgnored($row, colIndex) {
- var result = false;
- if (defaults.ignoreColumn.length > 0) {
- if (typeof defaults.ignoreColumn[0] == 'string') {
- if (colNames.length > colIndex && typeof colNames[colIndex] != 'undefined')
- if ($.inArray(colNames[colIndex], defaults.ignoreColumn) != -1)
- result = true;
- }
- else if (typeof defaults.ignoreColumn[0] == 'number') {
- if ($.inArray(colIndex, defaults.ignoreColumn) != -1 ||
- $.inArray(colIndex-$row.length, defaults.ignoreColumn) != -1)
- result = true;
- }
- }
- return result;
- }
-
- function ForEachVisibleCell(tableRow, selector, rowIndex, rowCount, cellcallback) {
- if ($.inArray(rowIndex, defaults.ignoreRow) == -1 &&
- $.inArray(rowIndex-rowCount, defaults.ignoreRow) == -1) {
-
- var $row = $(tableRow).filter(function() {
- return $(this).data("tableexport-display") != 'none' &&
- ($(this).is(':visible') ||
- $(this).data("tableexport-display") == 'always' ||
- $(this).closest('table').data("tableexport-display") == 'always');
- }).find(selector);
-
- var rowColspan = 0;
- var rowColIndex = 0;
-
- $row.each(function (colIndex) {
- if ($(this).data("tableexport-display") == 'always' ||
- ($(this).css('display') != 'none' &&
- $(this).css('visibility') != 'hidden' &&
- $(this).data("tableexport-display") != 'none')) {
- if (isColumnIgnored($row, colIndex) === false) {
- if (typeof (cellcallback) === "function") {
- var c, Colspan = 0;
- var r, Rowspan = 0;
-
- // handle rowspans from previous rows
- if (typeof rowspans[rowIndex] != 'undefined' && rowspans[rowIndex].length > 0) {
- for (c = 0; c <= colIndex; c++) {
- if (typeof rowspans[rowIndex][c] != 'undefined') {
- cellcallback(null, rowIndex, c);
- delete rowspans[rowIndex][c];
- colIndex++;
- }
- }
- }
- rowColIndex = colIndex;
-
- if ($(this).is("[colspan]")) {
- Colspan = parseInt($(this).attr('colspan'));
- rowColspan += Colspan > 0 ? Colspan - 1 : 0;
- }
-
- if ($(this).is("[rowspan]"))
- Rowspan = parseInt($(this).attr('rowspan'));
-
- // output content of current cell
- cellcallback(this, rowIndex, colIndex);
-
- // handle colspan of current cell
- for (c = 0; c < Colspan - 1; c++)
- cellcallback(null, rowIndex, colIndex + c);
-
- // store rowspan for following rows
- if (Rowspan) {
- for (r = 1; r < Rowspan; r++) {
- if (typeof rowspans[rowIndex + r] == 'undefined')
- rowspans[rowIndex + r] = [];
-
- rowspans[rowIndex + r][colIndex + rowColspan] = "";
-
- for (c = 1; c < Colspan; c++)
- rowspans[rowIndex + r][colIndex + rowColspan - c] = "";
- }
- }
- }
- }
- }
- });
- // handle rowspans from previous rows
- if (typeof rowspans[rowIndex] != 'undefined' && rowspans[rowIndex].length > 0) {
- for (var c = 0; c <= rowspans[rowIndex].length; c++) {
- if (typeof rowspans[rowIndex][c] != 'undefined') {
- cellcallback(null, rowIndex, c);
- delete rowspans[rowIndex][c];
- }
- }
- }
- }
- }
-
- function jsPdfOutput(doc) {
- if (defaults.consoleLog === true)
- console.log(doc.output());
-
- if (defaults.outputMode === 'string')
- return doc.output();
-
- if (defaults.outputMode === 'base64')
- return base64encode(doc.output());
-
- if (defaults.outputMode === 'window') {
- window.open(URL.createObjectURL(doc.output("blob")));
- return;
- }
-
- try {
- var blob = doc.output('blob');
- saveAs(blob, defaults.fileName + '.pdf');
- }
- catch (e) {
- downloadFile(defaults.fileName + '.pdf',
- 'data:application/pdf;base64,',
- doc.output());
- }
- }
-
- function prepareAutoTableText (cell, data, cellopt) {
- var cs = 0;
- if ( typeof cellopt != 'undefined' )
- cs = cellopt.colspan;
-
- if ( cs >= 0 ) {
- // colspan handling
- var cellWidth = cell.width;
- var textPosX = cell.textPos.x;
- var i = data.table.columns.indexOf(data.column);
-
- for (var c = 1; c < cs; c++) {
- var column = data.table.columns[i+c];
- cellWidth += column.width;
- }
-
- if ( cs > 1 ) {
- if ( cell.styles.halign === 'right' )
- textPosX = cell.textPos.x + cellWidth - cell.width;
- else if ( cell.styles.halign === 'center' )
- textPosX = cell.textPos.x + (cellWidth - cell.width) / 2;
- }
-
- cell.width = cellWidth;
- cell.textPos.x = textPosX;
-
- if ( typeof cellopt != 'undefined' && cellopt.rowspan > 1 )
- cell.height = cell.height * cellopt.rowspan;
-
- // fix jsPDF's calculation of text position
- if ( cell.styles.valign === 'middle' || cell.styles.valign === 'bottom' ) {
- var splittedText = typeof cell.text === 'string' ? cell.text.split(/\r\n|\r|\n/g) : cell.text;
- var lineCount = splittedText.length || 1;
- if (lineCount > 2)
- cell.textPos.y -= ((2 - FONT_ROW_RATIO) / 2 * data.row.styles.fontSize) * (lineCount-2) / 3 ;
- }
- return true;
- }
- else
- return false; // cell is hidden (colspan = -1), don't draw it
- }
-
- function collectImages (cell, elements, teOptions) {
- if (typeof teOptions.images != 'undefined') {
- elements.each(function () {
- var kids = $(this).children();
-
- if ( $(this).is("img") ) {
- var hash = strHashCode(this.src);
-
- teOptions.images[hash] = { url: this.src,
- src: this.src };
- }
-
- if (typeof kids != 'undefined' && kids.length > 0)
- collectImages (cell, kids, teOptions);
- });
- }
- }
-
- function loadImages (teOptions, callback) {
- var i;
- var imageCount = 0;
- var x = 0;
-
- function done() {
- callback(imageCount);
- }
- function loadImage(image) {
- if (!image.url)
- return;
- var img = new Image();
- imageCount = ++x;
- img.crossOrigin = 'Anonymous';
- img.onerror = img.onload = function () {
- if(img.complete) {
-
- if (img.src.indexOf('data:image/') === 0) {
- img.width = image.width || img.width || 0;
- img.height = image.height || img.height || 0;
- }
-
- if (img.width + img.height) {
- var canvas = document.createElement("canvas");
- var ctx = canvas.getContext("2d");
-
- canvas.width = img.width;
- canvas.height = img.height;
- ctx.drawImage( img, 0, 0 );
-
- image.src = canvas.toDataURL("image/jpeg");
- }
- }
- if(!--x)
- done();
- };
- img.src = image.url;
- }
-
- if (typeof teOptions.images != 'undefined') {
- for (i in teOptions.images)
- if (teOptions.images.hasOwnProperty(i))
- loadImage(teOptions.images[i]);
- }
-
- return x || done();
- }
-
- function drawCellElements (cell, elements, teOptions) {
- elements.each(function () {
- var kids = $(this).children();
-
- if ( $(this).is("div") ) {
- var bcolor = rgb2array(getStyle(this, 'background-color'), [255, 255, 255]);
- var lcolor = rgb2array(getStyle(this, 'border-top-color'), [0, 0, 0]);
- var lwidth = getPropertyUnitValue(this, 'border-top-width', defaults.jspdf.unit);
-
- var r = this.getBoundingClientRect();
- var ux = this.offsetLeft * teOptions.dw;
- var uy = this.offsetTop * teOptions.dh;
- var uw = r.width * teOptions.dw;
- var uh = r.height * teOptions.dh;
-
- teOptions.doc.setDrawColor.apply (undefined, lcolor);
- teOptions.doc.setFillColor.apply (undefined, bcolor);
- teOptions.doc.setLineWidth (lwidth);
- teOptions.doc.rect(cell.x + ux, cell.y + uy, uw, uh, lwidth ? "FD" : "F");
- }
- else if ( $(this).is("img") ) {
- if (typeof teOptions.images != 'undefined') {
- var hash = strHashCode(this.src);
- var image = teOptions.images[hash];
-
- if (typeof image != 'undefined') {
-
- var arCell = cell.width / cell.height;
- var arImg = this.width / this.height;
- var imgWidth = cell.width;
- var imgHeight = cell.height;
- var uy = 0;
-
- if (arImg < arCell) {
- imgHeight = Math.min (cell.height, this.height);
- imgWidth = this.width * imgHeight / this.height;
- }
- else if (arImg > arCell) {
- imgWidth = Math.min (cell.width, this.width);
- imgHeight = this.height * imgWidth / this.width;
- }
-
- if (imgHeight < cell.height)
- uy = (cell.height - imgHeight) / 2;
-
- teOptions.doc.addImage (image.src, cell.textPos.x, cell.y + uy, imgWidth, imgHeight);
- cell.textPos.x += imgWidth;
- }
- }
- }
-
- if (typeof kids != 'undefined' && kids.length > 0)
- drawCellElements (cell, kids, teOptions);
- });
- }
-
- function escapeRegExp(string) {
- return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
- }
-
- function replaceAll(string, find, replace) {
- return string.replace(new RegExp(escapeRegExp(find), 'g'), replace);
- }
-
- function parseNumber(value) {
- value = value || "0";
- value = replaceAll(value, defaults.numbers.html.thousandsSeparator, '');
- value = replaceAll(value, defaults.numbers.html.decimalMark, '.');
-
- return typeof value === "number" || jQuery.isNumeric(value) !== false ? value : false;
- }
-
- function parseString(cell, rowIndex, colIndex) {
- var result = '';
-
- if (cell !== null) {
- var $cell = $(cell);
- var htmlData;
-
- if ($cell[0].hasAttribute("data-tableexport-value"))
- htmlData = $cell.data("tableexport-value");
- else {
- htmlData = $cell.html();
-
- if (htmlData != '') {
- var html = $.parseHTML( htmlData );
-
- htmlData = '';
- $.each( html, function() {
- if ( $(this).is("input") )
- htmlData += $cell.find('input').val();
- else if ( $(this).is("select") )
- htmlData += $cell.find('select option:selected').text();
- else {
- htmlData += $cell.html();
- return false;
- }
- });
- }
- }
-
- if (typeof defaults.onCellHtmlData === 'function')
- htmlData = defaults.onCellHtmlData($cell, rowIndex, colIndex, htmlData);
-
- if (defaults.htmlContent === true) {
- result = $.trim(htmlData);
- }
- else {
- var text = htmlData.replace(/\n/g,'\u2028').replace(/<br\s*[\/]?>/gi, '\u2060');
- var obj = $('<div/>').html(text).contents();
- text = '';
- $.each(obj.text().split("\u2028"), function(i, v) {
- if (i > 0)
- text += " ";
- text += $.trim(v);
- });
-
- $.each(text.split("\u2060"), function(i, v) {
- if (i > 0)
- result += "\n";
- result += $.trim(v).replace(/\u00AD/g, ""); // remove soft hyphens
- });
-
- if (defaults.numbers.html.decimalMark != defaults.numbers.output.decimalMark ||
- defaults.numbers.html.thousandsSeparator != defaults.numbers.output.thousandsSeparator) {
- var number = parseNumber (result);
-
- if ( number !== false ) {
- var frac = ("" + number).split('.');
- if ( frac.length == 1 )
- frac[1] = "";
- var mod = frac[0].length > 3 ? frac[0].length % 3 : 0;
-
- result = (number < 0 ? "-" : "") +
- (defaults.numbers.output.thousandsSeparator ? ((mod ? frac[0].substr(0, mod) + defaults.numbers.output.thousandsSeparator : "") + frac[0].substr(mod).replace(/(\d{3})(?=\d)/g, "$1" + defaults.numbers.output.thousandsSeparator)) : frac[0]) +
- (frac[1].length ? defaults.numbers.output.decimalMark + frac[1] : "");
- }
- }
- }
-
- if (defaults.escape === true) {
- result = escape(result);
- }
-
- if (typeof defaults.onCellData === 'function') {
- result = defaults.onCellData($cell, rowIndex, colIndex, result);
- }
- }
-
- return result;
- }
-
- function hyphenate(a, b, c) {
- return b + "-" + c.toLowerCase();
- }
-
- function rgb2array(rgb_string, default_result) {
- var re = /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/;
- var bits = re.exec(rgb_string);
- var result = default_result;
- if (bits)
- result = [ parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3]) ];
- return result;
- }
-
- function getCellStyles (cell) {
- var a = getStyle(cell, 'text-align');
- var fw = getStyle(cell, 'font-weight');
- var fs = getStyle(cell, 'font-style');
- var f = '';
- if (a == 'start')
- a = getStyle(cell, 'direction') == 'rtl' ? 'right' : 'left';
- if (fw >= 700)
- f = 'bold';
- if (fs == 'italic')
- f += fs;
- if (f === '')
- f = 'normal';
-
- var result = {
- style: {
- align: a,
- bcolor: rgb2array(getStyle(cell, 'background-color'), [255, 255, 255]),
- color: rgb2array(getStyle(cell, 'color'), [0, 0, 0]),
- fstyle: f
- },
- colspan: (parseInt($(cell).attr('colspan')) || 0),
- rowspan: (parseInt($(cell).attr('rowspan')) || 0)
- };
-
- if (cell !== null) {
- var r = cell.getBoundingClientRect();
- result.rect = {
- width: r.width,
- height: r.height
- };
- }
-
- return result;
- }
-
- // get computed style property
- function getStyle(target, prop) {
- try {
- if (window.getComputedStyle) { // gecko and webkit
- prop = prop.replace(/([a-z])([A-Z])/, hyphenate); // requires hyphenated, not camel
- return window.getComputedStyle(target, null).getPropertyValue(prop);
- }
- if (target.currentStyle) { // ie
- return target.currentStyle[prop];
- }
- return target.style[prop];
- }
- catch (e) {
- }
- return "";
- }
-
- function getUnitValue(parent, value, unit) {
- var baseline = 100; // any number serves
-
- var temp = document.createElement("div"); // create temporary element
- temp.style.overflow = "hidden"; // in case baseline is set too low
- temp.style.visibility = "hidden"; // no need to show it
-
- parent.appendChild(temp); // insert it into the parent for em, ex and %
-
- temp.style.width = baseline + unit;
- var factor = baseline / temp.offsetWidth;
-
- parent.removeChild(temp); // clean up
-
- return (value * factor);
- }
-
- function getPropertyUnitValue(target, prop, unit) {
- var value = getStyle(target, prop); // get the computed style value
-
- var numeric = value.match(/\d+/); // get the numeric component
- if (numeric !== null) {
- numeric = numeric[0]; // get the string
-
- return getUnitValue (target.parentElement, numeric, unit);
- }
- return 0;
- }
-
- function jx_Workbook() {
- if(!(this instanceof jx_Workbook)) return new jx_Workbook();
- this.SheetNames = [];
- this.Sheets = {};
- }
-
- function jx_s2ab(s) {
- var buf = new ArrayBuffer(s.length);
- var view = new Uint8Array(buf);
- for (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
- return buf;
- }
-
- function jx_datenum(v, date1904) {
- if(date1904) v+=1462;
- var epoch = Date.parse(v);
- return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
- }
-
- function jx_createSheet(data) {
- var ws = {};
- var range = {s: {c:10000000, r:10000000}, e: {c:0, r:0 }};
- for(var R = 0; R != data.length; ++R) {
- for(var C = 0; C != data[R].length; ++C) {
- if(range.s.r > R) range.s.r = R;
- if(range.s.c > C) range.s.c = C;
- if(range.e.r < R) range.e.r = R;
- if(range.e.c < C) range.e.c = C;
- var cell = {v: data[R][C] };
- if(cell.v === null) continue;
- var cell_ref = XLSX.utils.encode_cell({c:C,r:R});
-
- if(typeof cell.v === 'number') cell.t = 'n';
- else if(typeof cell.v === 'boolean') cell.t = 'b';
- else if(cell.v instanceof Date) {
- cell.t = 'n'; cell.z = XLSX.SSF._table[14];
- cell.v = jx_datenum(cell.v);
- }
- else cell.t = 's';
- ws[cell_ref] = cell;
- }
- }
-
- if(range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);
- return ws;
- }
-
- function strHashCode (str) {
- var hash = 0, i, chr, len;
- if (str.length === 0) return hash;
- for (i = 0, len = str.length; i < len; i++) {
- chr = str.charCodeAt(i);
- hash = ((hash << 5) - hash) + chr;
- hash |= 0; // Convert to 32bit integer
- }
- return hash;
- }
-
- function downloadFile(filename, header, data) {
-
- var ua = window.navigator.userAgent;
- if (filename !== false && (ua.indexOf("MSIE ") > 0 || !!ua.match(/Trident.*rv\:11\./))) {
- if (window.navigator.msSaveOrOpenBlob)
- window.navigator.msSaveOrOpenBlob(new Blob([data]), filename);
- else {
- // Internet Explorer (<= 9) workaround by Darryl (https://github.com/dawiong/tableExport.jquery.plugin)
- // based on sampopes answer on http://stackoverflow.com/questions/22317951
- // ! Not working for json and pdf format !
- var frame = document.createElement("iframe");
-
- if (frame) {
- document.body.appendChild(frame);
- frame.setAttribute("style", "display:none");
- frame.contentDocument.open("txt/html", "replace");
- frame.contentDocument.write(data);
- frame.contentDocument.close();
- frame.focus();
-
- frame.contentDocument.execCommand("SaveAs", true, filename);
- document.body.removeChild(frame);
- }
- }
- }
- else {
- var DownloadLink = document.createElement('a');
-
- if (DownloadLink) {
- DownloadLink.style.display = 'none';
- if (filename !== false)
- DownloadLink.download = filename;
- else
- DownloadLink.target = '_blank';
-
- if (header.toLowerCase().indexOf("base64,") >= 0)
- DownloadLink.href = header + base64encode(data);
- else
- DownloadLink.href = header + encodeURIComponent(data);
-
- document.body.appendChild(DownloadLink);
-
- if (document.createEvent) {
- if (DownloadEvt === null)
- DownloadEvt = document.createEvent('MouseEvents');
-
- DownloadEvt.initEvent('click', true, false);
- DownloadLink.dispatchEvent(DownloadEvt);
- }
- else if (document.createEventObject)
- DownloadLink.fireEvent('onclick');
- else if (typeof DownloadLink.onclick == 'function')
- DownloadLink.onclick();
-
- document.body.removeChild(DownloadLink);
- }
- }
- }
-
- function utf8Encode(string) {
- string = string.replace(/\x0d\x0a/g, "\x0a");
- var utftext = "";
- for (var n = 0; n < string.length; n++) {
- var c = string.charCodeAt(n);
- if (c < 128) {
- utftext += String.fromCharCode(c);
- }
- else if ((c > 127) && (c < 2048)) {
- utftext += String.fromCharCode((c >> 6) | 192);
- utftext += String.fromCharCode((c & 63) | 128);
- }
- else {
- utftext += String.fromCharCode((c >> 12) | 224);
- utftext += String.fromCharCode(((c >> 6) & 63) | 128);
- utftext += String.fromCharCode((c & 63) | 128);
- }
- }
- return utftext;
- }
-
- function base64encode(input) {
- var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
- var output = "";
- var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
- var i = 0;
- input = utf8Encode(input);
- while (i < input.length) {
- chr1 = input.charCodeAt(i++);
- chr2 = input.charCodeAt(i++);
- chr3 = input.charCodeAt(i++);
- enc1 = chr1 >> 2;
- enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
- enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
- enc4 = chr3 & 63;
- if (isNaN(chr2)) {
- enc3 = enc4 = 64;
- } else if (isNaN(chr3)) {
- enc4 = 64;
- }
- output = output +
- keyStr.charAt(enc1) + keyStr.charAt(enc2) +
- keyStr.charAt(enc3) + keyStr.charAt(enc4);
- }
- return output;
- }
-
- return this;
- }
- });
-})(jQuery);
diff --git a/debian/netdata-apache2.apache2 b/debian/netdata-apache2.apache2
deleted file mode 100644
index 0ff4a8dd..00000000
--- a/debian/netdata-apache2.apache2
+++ /dev/null
@@ -1 +0,0 @@
-conf debian/local/apache2/netdata.conf
diff --git a/debian/netdata-apache2.lintian-overrides b/debian/netdata-apache2.lintian-overrides
deleted file mode 100644
index d6b2a5d1..00000000
--- a/debian/netdata-apache2.lintian-overrides
+++ /dev/null
@@ -1,2 +0,0 @@
-netdata-apache2: non-standard-apache2-configuration-name netdata.conf != netdata-apache2.conf
-netdata-apache2: web-application-should-not-depend-unconditionally-on-apache2
diff --git a/debian/netdata-apache2.postinst b/debian/netdata-apache2.postinst
deleted file mode 100755
index 037bdca7..00000000
--- a/debian/netdata-apache2.postinst
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-set -e
-
-case "${1}" in
- configure)
- if [ -e /usr/share/apache2/apache2-maintscript-helper ]
- then
- . /usr/share/apache2/apache2-maintscript-helper
-
- apache2_invoke enmod proxy
- apache2_invoke enmod proxy_http
- apache2_invoke enmod rewrite
-
- apache2_reload restart
- fi
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
-
- ;;
-
- *)
- echo "postinst called with unknown argument \`${1}'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/netdata-web.README.Debian b/debian/netdata-web.README.Debian
deleted file mode 100644
index 6f21e2d8..00000000
--- a/debian/netdata-web.README.Debian
+++ /dev/null
@@ -1,20 +0,0 @@
-netdata-web for Debian
-======================
-
-1. Content-Security-Policy (CSP)
---------------------------------
-
-By default netdata uses its own embedded webserver, listening to localhost:19999
-only. When exposing netdata to the network, it is recommended for security
-reasons to use a reverse proxy in front of it, such as apache2 (see
-netdata-apache2 package).
-
-If the proxy wants to set Content-Security-Policy headers, it can use the
-following for netdata (for apache2):
-
- Header always set Content-Security-Policy "default-src 'unsafe-inline' \
- http://localhost:19999 https: 'self' 'unsafe-eval'; script-src \
- 'unsafe-inline' https: 'self' 'unsafe-eval'; style-src https: 'self' \
- 'unsafe-inline'"
-
- -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 12 Aug 2019 20:11:00 +0200
diff --git a/debian/netdata-web.install b/debian/netdata-web.install
deleted file mode 100644
index c549eed4..00000000
--- a/debian/netdata-web.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/share/netdata/web
diff --git a/debian/netdata-web.links b/debian/netdata-web.links
deleted file mode 100644
index f1a19802..00000000
--- a/debian/netdata-web.links
+++ /dev/null
@@ -1,14 +0,0 @@
-# libjs-bootstrap
-/usr/share/javascript/bootstrap/fonts/glyphicons-halflings-regular.eot usr/share/netdata/web/fonts/glyphicons-halflings-regular.eot
-/usr/share/javascript/bootstrap/fonts/glyphicons-halflings-regular.svg usr/share/netdata/web/fonts/glyphicons-halflings-regular.svg
-/usr/share/javascript/bootstrap/fonts/glyphicons-halflings-regular.ttf usr/share/netdata/web/fonts/glyphicons-halflings-regular.ttf
-/usr/share/javascript/bootstrap/fonts/glyphicons-halflings-regular.woff usr/share/netdata/web/fonts/glyphicons-halflings-regular.woff
-/usr/share/javascript/bootstrap/fonts/glyphicons-halflings-regular.woff2 usr/share/netdata/web/fonts/glyphicons-halflings-regular.woff2
-# fonts-font-awesome
-/usr/share/fonts-font-awesome/fonts/FontAwesome.otf usr/share/netdata/web/fonts/FontAwesome.otf
-/usr/share/fonts-font-awesome/fonts/fontawesome-webfont.eot usr/share/netdata/web/fonts/fontawesome-webfont.eot
-/usr/share/fonts-font-awesome/fonts/fontawesome-webfont.svg usr/share/netdata/web/fonts/fontawesome-webfont.svg
-/usr/share/fonts-font-awesome/fonts/fontawesome-webfont.ttf usr/share/netdata/web/fonts/fontawesome-webfont.ttf
-/usr/share/fonts-font-awesome/fonts/fontawesome-webfont.woff usr/share/netdata/web/fonts/fontawesome-webfont.woff
-/usr/share/fonts-font-awesome/fonts/fontawesome-webfont.woff2 usr/share/netdata/web/fonts/fontawesome-webfont.woff2
-/usr/share/fonts-font-awesome/css/font-awesome.min.css usr/share/netdata/web/css/font-awesome.min.css
diff --git a/debian/netdata-web.lintian-overrides b/debian/netdata-web.lintian-overrides
deleted file mode 100644
index e8d80fff..00000000
--- a/debian/netdata-web.lintian-overrides
+++ /dev/null
@@ -1,2 +0,0 @@
-# Versions are way off
-netdata-web: embedded-javascript-library usr/share/netdata/web/lib/jquery-2.2.4.min.js *
diff --git a/debian/rules b/debian/rules
index e13c9a2c..b79f5edc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,7 +13,7 @@ endif
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
%:
- dh ${@} --with apache2
+ dh ${@}
override_dh_auto_configure:
# Netdata Cloud support (ACLK)