CodeforLeipzig/stadtratmonitor

View on GitHub

Showing 611 of 611 total issues

Function internalRemoveData has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function internalRemoveData( elem, name, pvt ) {
    if ( !acceptData( elem ) ) {
        return;
    }

    Function DocumentView has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            t2 = e.defer, n = e.makeElement, e.DocumentView = function(o2) {
              function r() {
                r.__super__.constructor.apply(this, arguments), this.element = this.options.element, this.elementStore = new e.ElementStore(), this.setDocument(this.object);
              }
              var s, a, u;

      Function internalData has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
          if ( !acceptData( elem ) ) {
              return;
          }
      
      

        Function _iterableToArrayLimit has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

        import e from"jquery";function _typeof(e){_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};return _typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||false;n.configurable=true;"value"in n&&(n.writable=true);Object.defineProperty(e,n.key,n)}}function _createClass(e,t,i){t&&_defineProperties(e.prototype,t);i&&_defineProperties(e,i);return e}function _inherits(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)};return _getPrototypeOf(e)}function _setPrototypeOf(e,t){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e};return _setPrototypeOf(e,t)}function _isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if("function"===typeof Proxy)return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return true}catch(e){return false}}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"===typeof t||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function _createSuperInternal(){var i,n=_getPrototypeOf(e);if(t){var s=_getPrototypeOf(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _superPropBase(e,t){while(!Object.prototype.hasOwnProperty.call(e,t)){e=_getPrototypeOf(e);if(null===e)break}return e}function _get(e,t,i){_get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,i){var n=_superPropBase(e,t);if(n){var s=Object.getOwnPropertyDescriptor(n,t);return s.get?s.get.call(i):s.value}};return _get(e,t,i||e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var i=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n=[];var s=true;var a=false;var o,r;try{for(i=i.call(e);!(s=(o=i.next()).done);s=true){n.push(o.value);if(t&&n.length===t)break}}catch(e){a=true;r=e}finally{try{s||null==i.return||i.return()}finally{if(a)throw r}}return n}}function _unsupportedIterableToArray(e,t){if(e){if("string"===typeof e)return _arrayLikeToArray(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);return"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rtl(){return"rtl"===e("html").attr("dir")}

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        var INTERNAL = {
          message_types: {
            welcome: "welcome",
            disconnect: "disconnect",
            ping: "ping",
        public/assets/actioncable-5433453f9b6619a9de91aaab2d7fc7ff183e5260c0107cbc9a1aa0c838d9a74e.js on lines 113..128

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 73.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                    for (n2 = this.selectionManagers, i2 = [], t3 = 0, e3 = n2.length; e3 > t3; t3++)
                      o3 = n2[t3], i2.push(o3.selectionDidChange());
        public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3275..3276

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 73.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

          var INTERNAL = {
            message_types: {
              welcome: "welcome",
              disconnect: "disconnect",
              ping: "ping",
        public/assets/actioncable.esm-e01089c3ec4fe7817fa9abcad06cab6bdc387f95f0ca6aab4bf7ba7537f70690.js on lines 115..130

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 73.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                      for (i3 = this.objects, o2 = [], e3 = 0, n2 = i3.length; n2 > e3; e3++)
                        t3 = i3[e3], o2.push(t3.inspect());
        public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 4861..4862

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 73.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function PieceView has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                i = e.makeElement, t2 = e.findInnerElement, n = e.getTextConfig, e.PieceView = function(r2) {
                  function s() {
                    var t3;
                    s.__super__.constructor.apply(this, arguments), this.piece = this.object, this.attributes = this.piece.getAttributes(), t3 = this.options, this.textConfig = t3.textConfig, this.context = t3.context, this.piece.attachment ? this.attachment = this.piece.attachment : this.string = this.piece.toString();
                  }

          Function select has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          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) );
          
          

            Function _slide has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _slide(order2, element = null) {
                  if (this._isSliding) {
                    return;
                  }
                  const activeElement = this._getActive();

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                        }, left: function(t3) {
                          var e2;
                          return this.selectionIsInCursorTarget() ? (t3.preventDefault(), (e2 = this.responder) != null ? e2.moveCursorInDirection("backward") : void 0) : void 0;
                        }, right: function(t3) {
              public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1964..1967

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 72.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                        }, right: function(t3) {
                          var e2;
                          return this.selectionIsInCursorTarget() ? (t3.preventDefault(), (e2 = this.responder) != null ? e2.moveCursorInDirection("forward") : void 0) : void 0;
                        }, control: {d: function(t3) {
              public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1961..1964

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 72.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
                  var matched, match, tokens, type,
                      soFar, groups, preFilters,
                      cached = tokenCache[ selector + " " ];
              
              

                Function matcherFromTokens has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function matcherFromTokens( tokens ) {
                    var checkContext, matcher, j,
                        len = tokens.length,
                        leadingRelative = Expr.relative[ tokens[0].type ],
                        implicitRelative = leadingRelative || Expr.relative[" "],

                  Function val has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      val: function( value ) {
                          var hooks, ret, isFunction,
                              elem = this[ 0 ];
                  
                          if ( !arguments.length ) {

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                    function _setup(t,n){var s=this;this.className="OffCanvas";this.$element=t;this.options=e.extend({},OffCanvas.defaults,this.$element.data(),n);this.contentClasses={base:[],reveal:[]};this.$lastTrigger=e();this.$triggers=e();this.position="left";this.$content=e();this.nested=!!this.options.nested;this.$sticky=e();this.isInCanvas=false;e(["push","overlap"]).each((function(e,t){s.contentClasses.base.push("has-transition-"+t)}));e(["left","right","top","bottom"]).each((function(e,t){s.contentClasses.base.push("has-position-"+t);s.contentClasses.reveal.push("has-reveal-"+t)}));k.init(e);i._init();this._init();this._events();l.register("OffCanvas",{ESCAPE:"close"})}},{key:"_init",value:function _init(){var t=this.$element.attr("id");this.$element.attr("aria-hidden","true");this.options.contentId?this.$content=e("#"+this.options.contentId):this.$element.siblings("[data-off-canvas-content]").length?this.$content=this.$element.siblings("[data-off-canvas-content]").first():this.$content=this.$element.closest("[data-off-canvas-content]").first();this.options.contentId?this.options.contentId&&null===this.options.nested&&console.warn("Remember to use the nested option if using the content ID option!"):this.nested=0===this.$element.siblings("[data-off-canvas-content]").length;if(true===this.nested){this.options.transition="overlap";this.$element.removeClass("is-transition-push")}this.$element.addClass("is-transition-".concat(this.options.transition," is-closed"));this.$triggers=e(document).find('[data-open="'+t+'"], [data-close="'+t+'"], [data-toggle="'+t+'"]').attr("aria-expanded","false").attr("aria-controls",t);this.position=this.$element.is(".position-left, .position-top, .position-right, .position-bottom")?this.$element.attr("class").match(/position\-(left|top|right|bottom)/)[1]:this.position;if(true===this.options.contentOverlay){var i=document.createElement("div");var n="fixed"===e(this.$element).css("position")?"is-overlay-fixed":"is-overlay-absolute";i.setAttribute("class","js-off-canvas-overlay "+n);this.$overlay=e(i);"is-overlay-fixed"===n?e(this.$overlay).insertAfter(this.$element):this.$content.append(this.$overlay)}var s=new RegExp(RegExpEscape(this.options.revealClass)+"([^\\s]+)","g");var a=s.exec(this.$element[0].className);if(a){this.options.isRevealed=true;this.options.revealOn=this.options.revealOn||a[1]}if(true===this.options.isRevealed&&this.options.revealOn){this.$element.first().addClass("".concat(this.options.revealClass).concat(this.options.revealOn));this._setMQChecker()}this.options.transitionTime&&this.$element.css("transition-duration",this.options.transitionTime);this.$sticky=this.$content.find("[data-off-canvas-sticky]");this.$sticky.length>0&&"push"===this.options.transition&&(this.options.contentScroll=false);var o=this.$element.attr("class").match(/\bin-canvas-for-(\w+)/);o&&2===o.length?this.options.inCanvasOn=o[1]:this.options.inCanvasOn&&this.$element.addClass("in-canvas-for-".concat(this.options.inCanvasOn));this.options.inCanvasOn&&this._checkInCanvas();this._removeContentClasses()}},{key:"_events",value:function _events(){var t=this;this.$element.off(".zf.trigger .zf.offCanvas").on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":this.close.bind(this),"toggle.zf.trigger":this.toggle.bind(this),"keydown.zf.offCanvas":this._handleKeyboard.bind(this)});if(true===this.options.closeOnClick){var i=this.options.contentOverlay?this.$overlay:this.$content;i.on({"click.zf.offCanvas":this.close.bind(this)})}this.options.inCanvasOn&&e(window).on("changed.zf.mediaquery",(function(){t._checkInCanvas()}))}},{key:"_setMQChecker",value:function _setMQChecker(){var t=this;this.onLoadListener=onLoad(e(window),(function(){i.atLeast(t.options.revealOn)&&t.reveal(true)}));e(window).on("changed.zf.mediaquery",(function(){i.atLeast(t.options.revealOn)?t.reveal(true):t.reveal(false)}))}},{key:"_checkInCanvas",value:function _checkInCanvas(){this.isInCanvas=i.atLeast(this.options.inCanvasOn);true===this.isInCanvas&&this.close()}
                    public/assets/foundation-sites-ec9e5d7297119b9d170d725de4d511c146a14d23bee7c672baf3fcfd6f1697a5.js on lines 785..785

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 71.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                                    event.pageY = original.clientY +
                                        ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) -
                                        ( doc && doc.clientTop  || body && body.clientTop  || 0 );
                    public/assets/jquery-3158ee616193dde0b605a15cb9ca832f9de674111b7cf4393353432ab8fa272d.js on lines 5378..5380

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 71.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                                    event.pageX = original.clientX +
                                        ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
                                        ( doc && doc.clientLeft || body && body.clientLeft || 0 );
                    public/assets/jquery-3158ee616193dde0b605a15cb9ca832f9de674111b7cf4393353432ab8fa272d.js on lines 5381..5383

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 71.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                     */function animate(t,i,n,s){i=e(i).eq(0);if(i.length){var a=t?c[0]:c[1];var o=t?h[0]:h[1];reset();i.addClass(n).css("transition","none");requestAnimationFrame((function(){i.addClass(a);t&&i.show()}));requestAnimationFrame((function(){i[0].offsetWidth;i.css("transition","").addClass(o)}));i.one(transitionend(i),finish)}function finish(){t||i.hide();reset();s&&s.apply(i)}function reset(){i[0].style.transitionDuration=0;i.removeClass("".concat(a," ").concat(o," ").concat(n))}}var u={Feather:function Feather(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zf";t.attr("role","menubar");t.find("a").attr({role:"menuitem"});var n=t.find("li").attr({role:"none"}),s="is-".concat(i,"-submenu"),a="".concat(s,"-item"),o="is-".concat(i,"-submenu-parent"),r="accordion"!==i;n.each((function(){var t=e(this),n=t.children("ul");if(n.length){t.addClass(o);if(r){var l=t.children("a:first");l.attr({"aria-haspopup":true,"aria-label":l.attr("aria-label")||l.text()});"drilldown"===i&&t.attr({"aria-expanded":false})}n.addClass("submenu ".concat(s)).attr({"data-submenu":"",role:"menubar"});"drilldown"===i&&n.attr({"aria-hidden":true})}t.parent("[data-submenu]").length&&t.addClass("is-submenu-item ".concat(a))}))},Burn:function Burn(e,t){var i="is-".concat(t,"-submenu"),n="".concat(i,"-item"),s="is-".concat(t,"-submenu-parent");e.find(">li, > li > ul, .menu, .menu > li, [data-submenu] > li").removeClass("".concat(i," ").concat(n," ").concat(s," is-submenu-item submenu is-active")).removeAttr("data-submenu").css("display","")}};function Timer(e,t,i){var n,s,a=this,o=t.duration,r=Object.keys(e.data())[0]||"timer",l=-1;this.isPaused=false;this.restart=function(){l=-1;clearTimeout(s);this.start()};this.start=function(){this.isPaused=false;clearTimeout(s);l=l<=0?o:l;e.data("paused",false);n=Date.now();s=setTimeout((function(){t.infinite&&a.restart();i&&"function"===typeof i&&i()}),l);e.trigger("timerstart.zf.".concat(r))};this.pause=function(){this.isPaused=true;clearTimeout(s);e.data("paused",true);var t=Date.now();l-=t-n;e.trigger("timerpaused.zf.".concat(r))}}var f={};var p,v,g,m,y=false,_=false;function onTouchEnd(t){this.removeEventListener("touchmove",onTouchMove);this.removeEventListener("touchend",onTouchEnd);if(!_){var i=e.Event("tap",m||t);e(this).trigger(i)}m=null;y=false;_=false}function onTouchMove(t){true===e.spotSwipe.preventDefault&&t.preventDefault();if(y){var i=t.touches[0].pageX;var n=p-i;var s;_=true;g=(new Date).getTime()-v;Math.abs(n)>=e.spotSwipe.moveThreshold&&g<=e.spotSwipe.timeThreshold&&(s=n>0?"left":"right");if(s){t.preventDefault();onTouchEnd.apply(this,arguments);e(this).trigger(e.Event("swipe",Object.assign({},t)),s).trigger(e.Event("swipe".concat(s),Object.assign({},t)))}}}function onTouchStart(t){if(1===t.touches.length){p=t.touches[0].pageX;m=t;y=true;_=false;v=(new Date).getTime();this.addEventListener("touchmove",onTouchMove,{passive:true===e.spotSwipe.preventDefault});this.addEventListener("touchend",onTouchEnd,false)}}function init(){this.addEventListener&&this.addEventListener("touchstart",onTouchStart,{passive:true})}var b=function(){function SpotSwipe(){_classCallCheck(this,SpotSwipe);this.version="1.0.0";this.enabled="ontouchstart"in document.documentElement;this.preventDefault=false;this.moveThreshold=75;this.timeThreshold=200;this._init()}_createClass(SpotSwipe,[{key:"_init",value:function _init(){e.event.special.swipe={setup:init};e.event.special.tap={setup:init};e.each(["left","up","down","right"],(function(){e.event.special["swipe".concat(this)]={setup:function setup(){e(this).on("swipe",e.noop)}}}))}}]);return SpotSwipe}();f.setupSpotSwipe=function(){e.spotSwipe=new b(e)};f.setupTouchHandler=function(){e.fn.addTouch=function(){this.each((function(i,n){e(n).bind("touchstart touchmove touchend touchcancel",(function(e){t(e)}))}));var t=function handleTouch(e){var t,i=e.changedTouches,n=i[0],s={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},a=s[e.type];if("MouseEvent"in window&&"function"===typeof window.MouseEvent)t=new window.MouseEvent(a,{bubbles:true,cancelable:true,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});else{t=document.createEvent("MouseEvent");t.initMouseEvent(a,true,true,window,1,n.screenX,n.screenY,n.clientX,n.clientY,false,false,false,false,0,null)}n.target.dispatchEvent(t)}}};f.init=function(){if("undefined"===typeof e.spotSwipe){f.setupSpotSwipe(e);f.setupTouchHandler(e)}};var w=function(){var e=["WebKit","Moz","O","Ms",""];for(var t=0;t<e.length;t++)if("".concat(e[t],"MutationObserver")in window)return window["".concat(e[t],"MutationObserver")];return false}();var $=function triggers(t,i){t.data(i).split(" ").forEach((function(n){e("#".concat(n))["close"===i?"trigger":"triggerHandler"]("".concat(i,".zf.trigger"),[t])}))};var k={Listeners:{Basic:{},Global:{}},Initializers:{}};k.Listeners.Basic={openListener:function openListener(){$(e(this),"open")},closeListener:function closeListener(){var t=e(this).data("close");t?$(e(this),"close"):e(this).trigger("close.zf.trigger")},toggleListener:function toggleListener(){var t=e(this).data("toggle");t?$(e(this),"toggle"):e(this).trigger("toggle.zf.trigger")},closeableListener:function closeableListener(t){var i=e(this).data("closable");t.stopPropagation();""!==i?d.animateOut(e(this),i,(function(){e(this).trigger("closed.zf")})):e(this).fadeOut().trigger("closed.zf")},toggleFocusListener:function toggleFocusListener(){var t=e(this).data("toggle-focus");e("#".concat(t)).triggerHandler("toggle.zf.trigger",[e(this)])}};k.Initializers.addOpenListener=function(e){e.off("click.zf.trigger",k.Listeners.Basic.openListener);e.on("click.zf.trigger","[data-open]",k.Listeners.Basic.openListener)};k.Initializers.addCloseListener=function(e){e.off("click.zf.trigger",k.Listeners.Basic.closeListener);e.on("click.zf.trigger","[data-close]",k.Listeners.Basic.closeListener)};k.Initializers.addToggleListener=function(e){e.off("click.zf.trigger",k.Listeners.Basic.toggleListener);e.on("click.zf.trigger","[data-toggle]",k.Listeners.Basic.toggleListener)};k.Initializers.addCloseableListener=function(e){e.off("close.zf.trigger",k.Listeners.Basic.closeableListener);e.on("close.zf.trigger","[data-closeable], [data-closable]",k.Listeners.Basic.closeableListener)};k.Initializers.addToggleFocusListener=function(e){e.off("focus.zf.trigger blur.zf.trigger",k.Listeners.Basic.toggleFocusListener);e.on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",k.Listeners.Basic.toggleFocusListener)};k.Listeners.Global={resizeListener:function resizeListener(t){w||t.each((function(){e(this).triggerHandler("resizeme.zf.trigger")}));t.attr("data-events","resize")},scrollListener:function scrollListener(t){w||t.each((function(){e(this).triggerHandler("scrollme.zf.trigger")}));t.attr("data-events","scroll")},closeMeListener:function closeMeListener(t,i){var n=t.namespace.split(".")[0];var s=e("[data-".concat(n,"]")).not('[data-yeti-box="'.concat(i,'"]'));s.each((function(){var t=e(this);t.triggerHandler("close.zf.trigger",[t])}))}};k.Initializers.addClosemeListener=function(t){var i=e("[data-yeti-box]"),n=["dropdown","tooltip","reveal"];t&&("string"===typeof t?n.push(t):"object"===_typeof(t)&&"string"===typeof t[0]?n=n.concat(t):console.error("Plugin names must be strings"));if(i.length){var s=n.map((function(e){return"closeme.zf.".concat(e)})).join(" ");e(window).off(s).on(s,k.Listeners.Global.closeMeListener)}};function debounceGlobalListener(t,i,n){var s,a=Array.prototype.slice.call(arguments,3);e(window).on(i,(function(){s&&clearTimeout(s);s=setTimeout((function(){n.apply(null,a)}),t||10)}))}k.Initializers.addResizeListener=function(t){var i=e("[data-resize]");i.length&&debounceGlobalListener(t,"resize.zf.trigger",k.Listeners.Global.resizeListener,i)};k.Initializers.addScrollListener=function(t){var i=e("[data-scroll]");i.length&&debounceGlobalListener(t,"scroll.zf.trigger",k.Listeners.Global.scrollListener,i)};k.Initializers.addMutationEventsListener=function(t){if(!w)return false;var i=t.find("[data-resize], [data-scroll], [data-mutate]");var n=function listeningElementsMutation(t){var i=e(t[0].target);switch(t[0].type){case"attributes":"scroll"===i.attr("data-events")&&"data-events"===t[0].attributeName&&i.triggerHandler("scrollme.zf.trigger",[i,window.pageYOffset]);"resize"===i.attr("data-events")&&"data-events"===t[0].attributeName&&i.triggerHandler("resizeme.zf.trigger",[i]);if("style"===t[0].attributeName){i.closest("[data-mutate]").attr("data-events","mutate");i.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[i.closest("[data-mutate]")])}break;case"childList":i.closest("[data-mutate]").attr("data-events","mutate");i.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[i.closest("[data-mutate]")]);break;default:return false}};if(i.length)for(var s=0;s<=i.length-1;s++){var a=new w(n);a.observe(i[s],{attributes:true,childList:true,characterData:false,subtree:true,attributeFilter:["data-events","style"]})}};k.Initializers.addSimpleListeners=function(){var t=e(document);k.Initializers.addOpenListener(t);k.Initializers.addCloseListener(t);k.Initializers.addToggleListener(t);k.Initializers.addCloseableListener(t);k.Initializers.addToggleFocusListener(t)};k.Initializers.addGlobalListeners=function(){var t=e(document);k.Initializers.addMutationEventsListener(t);k.Initializers.addResizeListener(250);k.Initializers.addScrollListener();k.Initializers.addClosemeListener()};k.init=function(t,i){onLoad(e(window),(function(){if(true!==e.triggersInitialized){k.Initializers.addSimpleListeners();k.Initializers.addGlobalListeners();e.triggersInitialized=true}}));if(i){i.Triggers=k;i.IHearYou=k.Initializers.addGlobalListeners}};var C=function(){function Plugin(e,t){_classCallCheck(this,Plugin);this._setup(e,t);var i=getPluginName(this);this.uuid=GetYoDigits(6,i);this.$element.attr("data-".concat(i))||this.$element.attr("data-".concat(i),this.uuid);this.$element.data("zfPlugin")||this.$element.data("zfPlugin",this);this.$element.trigger("init.zf.".concat(i))}_createClass(Plugin,[{key:"destroy",value:function destroy(){this._destroy();var e=getPluginName(this);this.$element.removeAttr("data-".concat(e)).removeData("zfPlugin").trigger("destroyed.zf.".concat(e));for(var t in this)this.hasOwnProperty(t)&&(this[t]=null)}}]);return Plugin}();function hyphenate$1(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function getPluginName(e){return hyphenate$1(e.className)}var z=function(t){_inherits(Abide,t);var i=_createSuper(Abide);function Abide(){_classCallCheck(this,Abide);return i.apply(this,arguments)}_createClass(Abide,[{key:"_setup",value:
                    public/assets/foundation-sites-ec9e5d7297119b9d170d725de4d511c146a14d23bee7c672baf3fcfd6f1697a5.js on lines 236..236
                    public/assets/foundation-sites-ec9e5d7297119b9d170d725de4d511c146a14d23bee7c672baf3fcfd6f1697a5.js on lines 236..236
                    public/assets/foundation-sites-ec9e5d7297119b9d170d725de4d511c146a14d23bee7c672baf3fcfd6f1697a5.js on lines 236..236
                    public/assets/foundation-sites-ec9e5d7297119b9d170d725de4d511c146a14d23bee7c672baf3fcfd6f1697a5.js on lines 236..236

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 70.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Severity
                    Category
                    Status
                    Source
                    Language