1/*! 2 * @preserve 3 * 4 * Readmore.js plugin 5 * Author: @jed_foster 6 * Project home: jedfoster.com/Readmore.js 7 * Version: 3.0.0-beta-1 8 * Licensed under the MIT license 9 * 10 * Debounce function from davidwalsh.name/javascript-debounce-function 11 */ !function e(t,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define("Readmore",[],o):"object"==typeof exports?exports.Readmore=o():t.Readmore=o()}(window,function(){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,(function(t){return e[t]}).bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}({
vendor: 174 bytes, line 11
11"./node_modules/@babel/runtime/helpers/classCallCheck.js":function(e,t){e.exports=function e(t,o){if(!(t instanceof o))throw TypeError("Cannot call a class as a function")}},
vendor: 304 bytes, line 11
11"./node_modules/@babel/runtime/helpers/createClass.js":function(e,t){function o(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function e(t,n,r){return n&&o(t.prototype,n),r&&o(t,r),t}},
vendor: 554 bytes, line 11
11"./node_modules/@babel/runtime/helpers/typeof.js":function(e,t){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function e(t){return typeof t}:function e(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function n(t){return"function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?e.exports=n=function e(t){return o(t)}:e.exports=n=function e(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":o(t)},n(t)}e.exports=n},
11"./src/readmore.js":function(e,t,o){"use strict";o.r(t);var n=o(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"),r=o.n(n),i=o(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"),a=o.n(i),s=o(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js"),l=o.n(s),c=0,d=[];function u(e,t,o){for(var n=0;n<e.length;n+=1)t.call(o,e[n],n)}function f(){return c+=1,"rmjs-".concat(c)}function p(e){e.style.height="auto";var t=parseInt(e.getBoundingClientRect().height,10),o=parseInt(window.getComputedStyle(e).maxHeight,10),n=parseInt(e.readmore.defaultHeight,10);e.readmore.expandedHeight=t,e.readmore.maxHeight=o,e.readmore.collapsedHeight=o||e.readmore.collapsedHeight||n,e.style.maxHeight="none"}function h(e,t){if(!d[e]){var o,n,r,i="";t.embedCSS&&""!==t.blockCSS&&(i+="".concat(e," + [data-readmore-toggle], ").concat(e,"[data-readmore] {\n ").concat(t.blockCSS,"\n }")),i+="".concat(e,"[data-readmore] {\n transition: height ").concat(t.speed,"ms;\n overflow: hidden;\n }"),o=document,n=i,(r=o.createElement("style")).type="text/css",r.styleSheet?r.styleSheet.cssText=n:r.appendChild(o.createTextNode(n)),o.getElementsByTagName("head")[0].appendChild(r),d[e]=!0}}function g(e,t,o){var n,r,i=e;"function"==typeof e&&(i=e(t));var a=(n=i,(r=document.createElement("div")).innerHTML=n,r.firstChild);return a.setAttribute("data-readmore-toggle",t.id),a.setAttribute("aria-controls",t.id),a.addEventListener("click",(function e(o){this.toggle(t,o)}).bind(o)),a}!function e(t){t.forEach(function(e){!Object.prototype.hasOwnProperty.call(e,"remove")&&Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function e(){null!==this.parentNode&&this.parentNode.removeChild(this)}})})}([Element.prototype,CharacterData.prototype,DocumentType.prototype]);var m,y,v,b=(m=function(){u(document.querySelectorAll("[data-readmore]"),function(e){var t=e.classList.contains("oxy-read-more-less_expanded");p(e),e.style.height="".concat(t?e.readmore.expandedHeight:e.readmore.collapsedHeight,"px")})},function e(){for(var t=this,o=arguments.length,n=Array(o),r=0;r<o;r++)n[r]=arguments[r];var i=y&&!v,a=function e(){v=null,y||m.apply(t,n)};clearTimeout(v),v=setTimeout(a,100),i&&m.apply(this,n)}),$={speed:100,collapsedHeight:200,heightMargin:16,moreLink:'<a href="#">Read More</a>',lessLink:'<a href="#">Close</a>',embedCSS:!0,blockCSS:"display: block; width: 100%;",startOpen:!1,sourceOrder:"after",blockProcessed:function e(){},beforeToggle:function e(){},afterToggle:function e(){}},S=function(){function e(){var t,o=this;if(r()(this,e),"undefined"!=typeof window&&"undefined"!=typeof document&&document.querySelectorAll&&window.addEventListener){for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];var s=i[0],c=i[1];(t="string"==typeof s?document.querySelectorAll(s):s.nodeName?[s]:s).length&&(this.options=function e(){for(var t=arguments.length,o=Array(t),n=0;n<t;n++)o[n]=arguments[n];var r={}.hasOwnProperty,i=o[0],a=o[1];if(o.length>2){var s=[];for(Object.keys(o).forEach(function(e){s.push(o[e])});s.length>2;){var c=s.shift(),d=s.shift();s.unshift(e(c,d))}i=s.shift(),a=s.shift()}return a&&Object.keys(a).forEach(function(t){r.call(a,t)&&("object"===l()(a[t])?(i[t]=i[t]||{},i[t]=e(i[t],a[t])):i[t]=a[t])}),i}({},$,c),"string"==typeof s?h(s,this.options):(this.instanceSelector=".".concat(f()),h(this.instanceSelector,this.options)),window.addEventListener("load",b),window.addEventListener("resize",b),this.elements=[],u(t,function(e){o.instanceSelector&&e.classList.add(o.instanceSelector.substr(1));var t=o.options.startOpen;e.readmore={defaultHeight:o.options.collapsedHeight,heightMargin:o.options.heightMargin},p(e);var n=e.readmore.heightMargin;if(e.getBoundingClientRect().height<=e.readmore.collapsedHeight+n){"function"==typeof o.options.blockProcessed&&o.options.blockProcessed(e,!1);return}e.setAttribute("data-readmore",""),e.id=e.id||f();var r=g(t?o.options.lessLink:o.options.moreLink,e,o);e.parentNode.insertBefore(r,"before"===o.options.sourceOrder?e:e.nextSibling),e.style.height="".concat(t?e.readmore.expandedHeight:e.readmore.collapsedHeight,"px"),"function"==typeof o.options.blockProcessed&&o.options.blockProcessed(e,!0),o.elements.push(e)}))}}return a()(e,[{key:"toggle",value:function e(){var t=this,o=arguments.length<=0?void 0:arguments[0],n=function e(o){var n=document.querySelector('[aria-controls="'.concat(o.id,'"]')),r=parseInt(o.getBoundingClientRect().height)<=parseInt(o.readmore.collapsedHeight),i=r?o.readmore.expandedHeight:o.readmore.collapsedHeight;if("function"!=typeof t.options.beforeToggle||!1!==t.options.beforeToggle(n,o,!r)){o.style.height="".concat(i,"px");var a=function e(i){"function"==typeof t.options.afterToggle&&t.options.afterToggle(n,o,r),i.stopPropagation(),o.removeEventListener("transitionend",e,!1)};o.addEventListener("transitionend",a,!1),t.options.speed<1&&a.call(t,{target:o});var s=r?t.options.lessLink:t.options.moreLink;s?n&&n.parentNode&&n.parentNode.replaceChild(g(s,o,t),n):n.remove()}};
11if("string"==typeof o&&(o=document.querySelectorAll(o)),!o)throw Error("Element MUST be either an HTML node or querySelector string");var r=arguments.length<=1?void 0:arguments[1];r&&(r.preventDefault(),r.stopPropagation()),"object"!==l()(o)||o.nodeName?n(o):u(o,n)}},{key:"destroy",value:function e(t){var o,n=this;u(o=t?"string"==typeof t?document.querySelectorAll(t):t.nodeName?[t]:t:this.elements,function(e){if(-1!==n.elements.indexOf(e)){n.elements=n.elements.filter(function(t){return t!==e}),n.instanceSelector&&e.classList.remove(n.instanceSelector.substr(1)),delete e.readmore,e.style.height="initial",e.style.maxHeight="initial",e.removeAttribute("data-readmore");var t=document.querySelector('[aria-controls="'.concat(e.id,'"]'));t&&t.remove(),-1!==e.id.indexOf("rmjs-")&&e.removeAttribute("id")}}),delete this}}]),e}();S.VERSION="3.0.0-beta-1",t.default=S}
11,0:function(e,t,o){e.exports=o(/*! ./src/readmore.js */ "./src/readmore.js")}}).default});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.