2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
/*! This file is auto-generated */
|
|
this.wp=this.wp||{},this.wp.viewport=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=474)}({0:function(t,e){t.exports=window.wp.element},11:function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(38);var o=r(31),i=r(39);function c(t,e){return Object(n.a)(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var c,u=t[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}}(t,e)||Object(o.a)(t,e)||Object(i.a)()}},12:function(t,e){t.exports=window.wp.compose},2:function(t,e){t.exports=window.lodash},24:function(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}r.d(e,"a",(function(){return n}))},31:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(24);function o(t,e){if(t){if("string"==typeof t)return Object(n.a)(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(t,e):void 0}}},38:function(t,e,r){"use strict";function n(t){if(Array.isArray(t))return t}r.d(e,"a",(function(){return n}))},39:function(t,e,r){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(e,"a",(function(){return n}))},4:function(t,e){t.exports=window.wp.data},474:function(t,e,r){"use strict";r.r(e),r.d(e,"store",(function(){return s})),r.d(e,"ifViewportMatches",(function(){return w})),r.d(e,"withViewportMatch",(function(){return h}));var n={};r.r(n),r.d(n,"setIsMatching",(function(){return a}));var o={};r.r(o),r.d(o,"isViewportMatch",(function(){return f}));var i=r(2),c=r(4);var u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SET_IS_MATCHING":return e.values}return t};function a(t){return{type:"SET_IS_MATCHING",values:t}}function f(t,e){return-1===e.indexOf(" ")&&(e=">= "+e),!!t[e]}var s=Object(c.createReduxStore)("core/viewport",{reducer:u,actions:n,selectors:o});Object(c.register)(s);var l=function(t,e){var r=Object(i.debounce)((function(){var t=Object(i.mapValues)(n,(function(t){return t.matches}));Object(c.dispatch)(s).setIsMatching(t)}),{leading:!0}),n=Object(i.reduce)(t,(function(t,n,o){return Object(i.forEach)(e,(function(e,i){var c=window.matchMedia("(".concat(e,": ").concat(n,"px)"));c.addListener(r);var u=[i,o].join(" ");t[u]=c})),t}),{});window.addEventListener("orientationchange",r),r(),r.flush()},d=r(12),p=r(8),b=r(11),v=r(0),h=function(t){return Object(d.createHigherOrderComponent)((function(e){return Object(d.pure)((function(r){var n=Object(i.mapValues)(t,(function(t){var e=t.split(" "),r=Object(b.a)(e,2),n=r[0],o=r[1];return void 0===o&&(o=n,n=">="),Object(d.useViewportMatch)(o,n)}));return Object(v.createElement)(e,Object(p.a)({},r,n))}))}),"withViewportMatch")},w=function(t){return Object(d.createHigherOrderComponent)(Object(d.compose)([h({isViewportMatch:t}),Object(d.ifCondition)((function(t){return t.isViewportMatch}))]),"ifViewportMatches")};l({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},{"<":"max-width",">=":"min-width"})},8:function(t,e,r){"use strict";function n(){return(n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}r.d(e,"a",(function(){return n}))}}); |