1function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _toConsumableArray(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var _createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();define("hostLibs/aspects/fontsLoader/FontRuler",["react-dom-factories","prop-types","create-react-class","reactDOM","coreUtilsLib","lodash"],function(t,e,n,o,i,r){"use strict";function s(t){return t&&t.offsetWidth&&t.offsetHeight}function a(t,e){return t.offsetWidth!==e.offsetWidth||t.offsetHeight!==e.offsetHeight}function l(t){return t&&{offsetWidth:t.offsetWidth,offsetHeight:t.offsetHeight}}return n({displayName:"FontRuler",propTypes:{fontFamily:e.string.isRequired,onLoadCallback:e.func.isRequired},updateCurrentSize:function(){this.rafID=0;var t=o.findDOMNode(this.refs.wrapper);if(t){var e=o.findDOMNode(this.refs.content),n=o.findDOMNode(this.refs.innerContent),i=o.findDOMNode(this.refs.innerWrapper),r=l(t);t.style.width=r.offsetWidth-1+"px",t.style.height=r.offsetHeight-1+"px",t.scrollLeft=t.scrollWidth-t.clientWidth,t.scrollTop=t.scrollHeight-t.clientHeight,n.style.width=r.offsetWidth+1+"px",n.style.height=r.offsetHeight+1+"px",i.scrollLeft=i.scrollWidth-i.clientWidth,i.scrollTop=i.scrollHeight-i.clientHeight,s(e)&&(this.contentNodeOrigSize?this.trigger=a(e,this.contentNodeOrigSize):this.contentNodeOrigSize=l(e),e.style.fontFamily=this.props.fontFamily+", serif")}},handleScroll:function(t){t.stopPropagation(),t.preventDefault(),this.handleFontResizeDebounced()},componentWillMount:function(){this.handleFontResizeDebounced=r.debounce(function(){if(this._isMounted&&!this.triggeredResize){var t=this.trigger;if(!t&&(t=s(this.contentNodeOrigSize))){var e=o.findDOMNode(this.refs.content);if(!e)return;t=a(e,this.contentNodeOrigSize)}t?(this.rafID&&(i.animationFrame.cancel(this.rafID),this.rafID=0),this.triggeredResize=!0,this.props.onLoadCallback(this.props.fontFamily)):this.rafID||(this.rafID=i.animationFrame.request(this.updateCurrentSize))}}.bind(this),32,{leading:!1,trailing:!0})},componentDidMount:function(){this._isMounted=!0,this.trigger=!1,this.triggeredResize=!1,this.refs.wrapper.addEventListener("scroll",this.handleScroll,!0),this.refs.innerWrapper.addEventListener("scroll",this.handleScroll,!0),this.updateCurrentSize()},componentWillUnmount:function(){this._isMounted=!1,this.rafID&&(i.animationFrame.cancel(this.rafID),this.rafID=0),this.refs.wrapper.removeEventListener("scroll",this.handleScroll),this.refs.innerWrapper.removeEventListener("scroll",this.handleScroll)},render:function(){var e=t.div({ref:"innerContent"}),n=t.div({ref:"innerWrapper",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"}},e),o=t.div({style:{position:"relative",whiteSpace:"nowrap",fontFamily:"serif"}},n,t.span({ref:"content",className:"font-ruler-content"}));return t.div({ref:"wrapper",style:{position:"absolute",overflow:"hidden",fontSize:1200,left:-2e3,visibility:"hidden"}},o)}})}),define("hostLibs/aspects/fontsLoader/FontRulersContainer",["react","react-dom-factories","prop-types","create-react-class","lodash","hostLibs/aspects/fontsLoader/FontRuler"],function(t,e,n,o,i,r){"use strict";var s=t.createFactory(r);return o({displayName:"FontRulersContainer",propTypes:{fontsList:n.arrayOf(n.string.isRequired).isRequired,onLoadCallback:n.func.isRequired,updateFontLoaded:n.func.isRequired},fontLoaded:function(t){this._isMounted&&this.props.updateFontLoaded(t),this.props.onLoadCallback()},componentDidMount:function(){this._isMounted=!0},componentWillUnmount:function(){this._isMounted=!1},render:function(){var t=this,n=e.style({key:"fontRulerContentAfter",dangerouslySetInnerHTML:{__html:'.font-ruler-content::after {content:"@#$%%^&*~IAO"}'}}),o=i.map(this.props.fontsList,function(e){return s({key:e,fontFamily:e,onLoadCallback:t.fontLoaded})});return e.div({style:{overflow:"hidden",visibility:"hidden",maxHeight:0,maxWidth:0,position:"absolute"}},[n].concat(_toConsumableArray(o)))}})}),define("hostLibs/aspects/fontsLoader/FontsLoaderAspect",["lodash","react","react-dom-factories","coreUtilsLib","hostLibs/aspects/fontsLoader/FontRulersContainer"],function(t,e,n,o,i){"use strict";var r=e.createFactory(i),s=new WeakMap,a=function(t,e){t.set(e,!0)},l=function(){function e(t,n){_classCallCheck(this,e),s.set(this,{storageAPI:t,mediaRootUrl:n,updateFontLoaded:a.bind(null,t),customFonts:[]})}return _createClass(e,[{key:"filterHandledFonts",value:function(e){var n=s.get(this).storageAPI.getAll();return t.reject(e,function(e){return t.has(n,e)})}},{key:"loadFonts",value:function(e,n){var i=s.get(this);i.callback=n;var r=this.filterHandledFonts(e),a=r.filter(function(t){return o.fonts.isUploadedFontFamily(t)});
1i.customFonts=t(i.customFonts).concat(a).uniq().value(),i.storageAPI.transaction(function(){t.forEach(r,function(t){i.storageAPI.set(t,!1)})})}},{key:"getReactComponents",value:function(){var e=s.get(this),i=e.storageAPI.getAll(),a=t(i).omitBy().keys().value(),l=[t.isEmpty(a)?null:r({fontsList:a,onLoadCallback:e.callback,updateFontLoaded:e.updateFontLoaded,key:"fontRulersContainer"}),t.isEmpty(e.customFonts)?null:function(t,e){var i=o.fonts.getUploadedFontFaceStyles(t,e);return n.style({key:"uploadFontsStyleNode",type:"text/css","data-styleid":"uploadedFonts",dangerouslySetInnerHTML:{__html:i||""}})}(e.customFonts,e.mediaRootUrl)];return t.isEmpty(l)?null:t.compact(l)}},{key:"hasPendingFonts",value:function(){var e=s.get(this).storageAPI.getAll();return t(e).values().includes(!1)}}]),e}();return l.aspectName="fontsLoaderAspect",l}),define("hostLibs",["hostLibs/aspects/fontsLoader/FontsLoaderAspect"],function(t){"use strict";return{aspects:{FontsLoaderAspect:t}}}); 2//# sourceMappingURL=hostLibs.min.js.map
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.