WordPress/wp-includes/js/dist/nux.min.js
gziolo 6e4458c935 Build: Use hashed/deterministic moduleIDs in webpack config
Props peterwilsoncc, desrosj.
Fixes #53192.


Built from https://develop.svn.wordpress.org/trunk@50940


git-svn-id: http://core.svn.wordpress.org/trunk@50549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 12:20:04 +00:00

2 lines
6.2 KiB
JavaScript

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.nux=function(e){var n={};function t(r){if(n[r])return n[r].exports;var s=n[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,t),s.l=!0,s.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var s in e)t.d(r,s,function(n){return e[n]}.bind(null,s));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s="./node_modules/@wordpress/nux/build-module/index.js")}({"./node_modules/@wordpress/icons/build-module/library/close.js":function(e,n,t){"use strict";var r=t("@wordpress/element"),s=t("@wordpress/primitives");const i=Object(r.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(s.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));n.a=i},"./node_modules/@wordpress/nux/build-module/index.js":function(e,n,t){"use strict";t.r(n),t.d(n,"store",(function(){return j})),t.d(n,"DotTip",(function(){return I}));var r={};t.r(r),t.d(r,"triggerGuide",(function(){return p})),t.d(r,"dismissTip",(function(){return a})),t.d(r,"disableTips",(function(){return l})),t.d(r,"enableTips",(function(){return f}));var s={};t.r(s),t.d(s,"getAssociatedGuide",(function(){return m})),t.d(s,"isTipVisible",(function(){return h})),t.d(s,"areTipsEnabled",(function(){return x}));var i=t("@wordpress/deprecated"),o=t.n(i),u=t("@wordpress/data");const c=Object(u.combineReducers)({areTipsEnabled:function(e=!0,n){switch(n.type){case"DISABLE_TIPS":return!1;case"ENABLE_TIPS":return!0}return e},dismissedTips:function(e={},n){switch(n.type){case"DISMISS_TIP":return{...e,[n.id]:!0};case"ENABLE_TIPS":return{}}return e}});var d=Object(u.combineReducers)({guides:function(e=[],n){switch(n.type){case"TRIGGER_GUIDE":return[...e,n.tipIds]}return e},preferences:c});function p(e){return{type:"TRIGGER_GUIDE",tipIds:e}}function a(e){return{type:"DISMISS_TIP",id:e}}function l(){return{type:"DISABLE_TIPS"}}function f(){return{type:"ENABLE_TIPS"}}var b=t("./node_modules/rememo/es/rememo.js"),w=t("lodash");const m=Object(b.a)((e,n)=>{for(const t of e.guides)if(Object(w.includes)(t,n)){const n=Object(w.difference)(t,Object(w.keys)(e.preferences.dismissedTips)),[r=null,s=null]=n;return{tipIds:t,currentTipId:r,nextTipId:s}}return null},e=>[e.guides,e.preferences.dismissedTips]);function h(e,n){if(!e.preferences.areTipsEnabled)return!1;if(Object(w.has)(e.preferences.dismissedTips,[n]))return!1;const t=m(e,n);return!t||t.currentTipId===n}function x(e){return e.preferences.areTipsEnabled}const j=Object(u.createReduxStore)("core/nux",{reducer:d,actions:r,selectors:s,persist:["preferences"]});Object(u.registerStore)("core/nux",{reducer:d,actions:r,selectors:s,persist:["preferences"]});var v=t("@wordpress/element"),O=t("@wordpress/compose"),T=t("@wordpress/components"),g=t("@wordpress/i18n"),_=t("./node_modules/@wordpress/icons/build-module/library/close.js");function y(e){e.stopPropagation()}var I=Object(O.compose)(Object(u.withSelect)((e,{tipId:n})=>{const{isTipVisible:t,getAssociatedGuide:r}=e("core/nux"),s=r(n);return{isVisible:t(n),hasNextTip:!(!s||!s.nextTipId)}}),Object(u.withDispatch)((e,{tipId:n})=>{const{dismissTip:t,disableTips:r}=e("core/nux");return{onDismiss(){t(n)},onDisable(){r()}}}))((function({position:e="middle right",children:n,isVisible:t,hasNextTip:r,onDismiss:s,onDisable:i}){const o=Object(v.useRef)(null),u=Object(v.useCallback)(e=>{o.current&&(o.current.contains(e.relatedTarget)||i())},[i,o]);return t?Object(v.createElement)(T.Popover,{className:"nux-dot-tip",position:e,noArrow:!0,focusOnMount:"container",shouldAnchorIncludePadding:!0,role:"dialog","aria-label":Object(g.__)("Editor tips"),onClick:y,onFocusOutside:u},Object(v.createElement)("p",null,n),Object(v.createElement)("p",null,Object(v.createElement)(T.Button,{isLink:!0,onClick:s},r?Object(g.__)("See next tip"):Object(g.__)("Got it"))),Object(v.createElement)(T.Button,{className:"nux-dot-tip__disable",icon:_.a,label:Object(g.__)("Disable tips"),onClick:i})):null}));o()("wp.nux",{since:"5.4",hint:"wp.components.Guide can be used to show a user guide."})},"./node_modules/rememo/es/rememo.js":function(e,n,t){"use strict";var r,s;function i(e){return[e]}function o(){var e={clear:function(){e.head=null}};return e}function u(e,n,t){var r;if(e.length!==n.length)return!1;for(r=t;r<e.length;r++)if(e[r]!==n[r])return!1;return!0}r={},s="undefined"!=typeof WeakMap,n.a=function(e,n){var t,c;function d(){t=s?new WeakMap:o()}function p(){var t,r,s,i,o,d=arguments.length;for(i=new Array(d),s=0;s<d;s++)i[s]=arguments[s];for(o=n.apply(null,i),(t=c(o)).isUniqueByDependants||(t.lastDependants&&!u(o,t.lastDependants,0)&&t.clear(),t.lastDependants=o),r=t.head;r;){if(u(r.args,i,1))return r!==t.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=t.head,r.prev=null,t.head.prev=r,t.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,t.head&&(t.head.prev=r,r.next=t.head),t.head=r,r.val}return n||(n=i),c=s?function(e){var n,s,i,u,c,d=t,p=!0;for(n=0;n<e.length;n++){if(s=e[n],!(c=s)||"object"!=typeof c){p=!1;break}d.has(s)?d=d.get(s):(i=new WeakMap,d.set(s,i),d=i)}return d.has(r)||((u=o()).isUniqueByDependants=p,d.set(r,u)),d.get(r)}:function(){return t},p.getDependants=n,p.clear=d,d(),p}},"@wordpress/components":function(e,n){e.exports=window.wp.components},"@wordpress/compose":function(e,n){e.exports=window.wp.compose},"@wordpress/data":function(e,n){e.exports=window.wp.data},"@wordpress/deprecated":function(e,n){e.exports=window.wp.deprecated},"@wordpress/element":function(e,n){e.exports=window.wp.element},"@wordpress/i18n":function(e,n){e.exports=window.wp.i18n},"@wordpress/primitives":function(e,n){e.exports=window.wp.primitives},lodash:function(e,n){e.exports=window.lodash}});