{
  "version": 3,
  "sources": ["/cdn/shop/t/732/assets/cv-custom-section.js?enable_js_minification=1"],
  "sourcesContent": ["function cv_custom_collapsible_click(e) {\n    var coll = $(e).closest(\".cv-collapsible\");\n    coll.toggleClass(\"active\");\n    var isActive = coll.hasClass(\"active\");\n    coll.attr(\"aria-expanded\", isActive ? \"true\" : \"false\");\n    var wrapper = coll.closest('.cv-collapsible-wrapper');\n    var content = wrapper.find('.cv-collapsible-content')[0];\n    if (isActive) {\n        // Restore interactivity before the height transition, not after \u2014 a screen reader\n        // or fast keyboard user shouldn't be able to reach it mid-animation while it's still\n        // effectively hidden, but there's no harm the other direction (visible slightly before\n        // interactive would be worse than the reverse).\n        content.removeAttribute('inert');\n        content.style.maxHeight = content.scrollHeight + \"px\";\n        setTimeout(function () {\n            content.style.maxHeight = content.scrollHeight + \"px\";\n        }, 300);\n    } else {\n        content.style.maxHeight = null;\n        // max-height:0 + overflow:hidden only hides the content visually \u2014 it does nothing to\n        // stop keyboard Tab from reaching focusable elements inside it (links, buttons, inputs),\n        // which is exactly the bug this fixes: collapsed content staying in the tab order.\n        // `inert` removes the whole subtree from focus/tab order/AT, and (unlike the jQuery UI\n        // tabs case elsewhere in this theme) nothing here needs to programmatically .focus()\n        // into collapsed content, so there's no internal script for `inert` to conflict with.\n        content.setAttribute('inert', '');\n    }\n}\n\n// Match initial inert state to each collapsible's initial expanded/collapsed state on load \u2014\n// content injected later via AJAX (e.g. the variant-group thumbnails) inherits `inert` from this\n// container automatically, so this only needs to run once, not per content-load callback.\n$(function () {\n    $('.cv-collapsible-wrapper').each(function () {\n        var coll = $(this).find('.cv-collapsible').first();\n        var content = $(this).find('.cv-collapsible-content')[0];\n        if (!content) {\n            return;\n        }\n        if (coll.length && coll.hasClass('active')) {\n            content.removeAttribute('inert');\n        } else {\n            content.setAttribute('inert', '');\n        }\n    });\n});\n\n$('.cv-collapsible-wrapper > h3').each(function() {\n    $(this).attr(\"tabindex\", \"0\").attr(\"aria-expanded\", \"false\");\n  }).on('click keydown', function(e) {\n    if (e.type === 'keydown' && e.key !== 'Enter' && e.key !== ' ') return;\n    if (e.type === 'keydown') e.preventDefault();\n    var isExpanded = $(this).attr(\"aria-expanded\") === \"true\";\n    $(this).attr(\"aria-expanded\", isExpanded ? \"false\" : \"true\");\n    this.classList.toggle(\"active\");\n    $(this).find(\"h3 .cv-collapsible\").toggleClass(\"active\");\n    var content = this.nextElementSibling;\n    if (content.style.display === \"block\") {\n      content.style.display = \"none\";\n    } else {\n      content.style.display = \"block\";\n    }\n  });\n\n  // Wrap sections in a wrapper.\nfunction cv_wrap_sections(class_name, add_class=\"\") {\n  var childSections = document.querySelectorAll(\".\"+class_name);\n  var wrapper = document.createElement('div');\n  wrapper.classList.add(class_name+\"-wrapper\");\n  wrapper.classList.add(add_class);\n  childSections.item(0).parentNode.insertBefore(wrapper, childSections.item(0));\n\n  for ( var i=0; i< childSections.length; i++){\n    wrapper.appendChild(childSections.item(i));\n  }\n}\n//script for Read More and Read Less button on collection page\n    $('.cv-custom_description-wrapper').each(function() {\n        var scrollHeight = this.getElementsByClassName('cv-custom_collection-description')[0].scrollHeight;\n        var clientHeight = this.getElementsByClassName('cv-custom_collection-description')[0].clientHeight;\n        var thisElem = this;\n        if( scrollHeight > clientHeight ) {\n            $(this).children('.cv-collection-read-more').show();\n        } else {\n            $(thisElem).find('.cv-collection-read-more, .cv-collection-read-less').hide();\n        }\n        $(this).children(\".cv-collection-read-more\").on(\"click\", function() {\n            $(thisElem).find('.cv-collection-read-more, .cv-collection-read-less').toggle();\n             $(\".cv-custom_collection-description\").css(\"height\", \"initial\");\n             $(\".cv-custom_collection-description\").removeClass(\"cv-fade\");\n\n        });\n        $(this).children(\".cv-collection-read-less\").on(\"click\", function() {\n            $(thisElem).find('.cv-collection-read-more, .cv-collection-read-less').toggle();\n          $(\".cv-custom_collection-description\").css(\"height\", \"300px\");\n          $(\".cv-custom_collection-description\").addClass(\"cv-fade\");\n        });\n    });"],
  "mappings": "AAAA,SA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