@secretstache/wordpress-gutenberg 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useAccordionItem.js +8 -2
package/build/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import{ToggleControl as e,Button as t,BaseControl as n,ColorPalette as o,Icon as r,CheckboxControl as i,RadioControl as a,Tooltip as l,RangeControl as c,TabPanel as s,Notice as u,Spinner as d,Placeholder as p,SelectControl as g,Toolbar as b,ToolbarButton as f}from"@wordpress/components";import{useState as m,useCallback as h,useRef as v,useEffect as I,useLayoutEffect as y,useMemo as C}from"@wordpress/element";import{jsx as x,jsxs as A,Fragment as w}from"react/jsx-runtime";import{useSelect as G,useDispatch as N,dispatch as B,subscribe as T,select as k}from"@wordpress/data";import{store as W,MediaUploadCheck as V,MediaUpload as O,MediaPlaceholder as S,URLInput as X,BlockControls as E,InnerBlocks as R}from"@wordpress/block-editor";import{plus as Z,edit as H,trash as L,page as P}from"@wordpress/icons";import{createBlock as F,getBlockTypes as M}from"@wordpress/blocks";import{addFilter as D,removeFilter as Y}from"@wordpress/hooks";import J from"@wordpress/api-fetch";import*as z from"react";import{forwardRef as j,useContext as U,useLayoutEffect as Q,useEffect as _,useRef as K,useState as $,useMemo as q,useCallback as ee,createContext as te,Component as ne,Fragment as oe,createElement as re,createRef as ie}from"react";import{createPortal as ae,findDOMNode as le}from"react-dom";const ce="Enable Preview",se="Please check this option to see how the block will actually look and behave on the frontend.",ue=t=>{const{checked:n,onChange:o,help:r=se,label:i=ce}=t;return x(e,{checked:n,onChange:o,label:i,help:r,...t})},de=()=>{const[e,t]=m(!1),n=h((()=>{t((e=>!e))}),[]);return{isPreview:e,setIsPreview:t,PreviewControl:t=>x(ue,{checked:e,onChange:n,...t})}},pe=function(e){let{isEnabled:t,setupSlider:n,cleanCallback:o}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const i=v(null),a=v(null);return I((()=>(t&&null!=i&&i.current&&(a.current=n(i.current)),()=>{var e;a.current&&(null===(e=a.current)||void 0===e||e.destroy(),a.current=null,o&&o())})),[t,...r]),{sliderElRef:i,sliderInstance:a.current}},ge=(e,t)=>G((n=>{const{getBlock:o,getBlockParents:r,getSelectedBlock:i}=n("core/block-editor"),a=i();if(!a)return null;const l=r(a.clientId,!0);if(!l.includes(t))return null;if((null==a?void 0:a.name)===e)return a;if(null!=l&&l.length)for(let n=0;n<l.length;n++){const r=l[n],i=o(r);if((null==i?void 0:i.name)===e)return i;if(t&&r===t)break}return null}),[e,t]),be=(e,t)=>(n,o)=>{const r=e.find((e=>e.color===n));t({[o]:r?{value:n,slug:r.slug}:{value:"",slug:""}})},fe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return G((t=>{var n;const{getSettings:o}=t("core/block-editor"),r=(null===(n=o())||void 0===n?void 0:n.colors)||[];if(e.length>0){const t=new Map(r.map((e=>[e.slug,e])));return e.map((e=>t.get(e))).filter(Boolean)}return r}),[e])},me=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const{postType:n,curatedPostsIds:o,taxonomySlug:r,curatedTermsIds:i,numberOfPosts:a=-1,extraQueryArgs:l}=e;return G((e=>{const t={per_page:-1===a?100:a,order:"desc",orderby:"date",_embed:!0,...l};r&&(null==i?void 0:i.length)>0&&(t[r]=i.join(",")),(null==o?void 0:o.length)>0&&(t.include=o,t.orderby="include");const c="function"==typeof n?n():n,s=e("core").getEntityRecords("postType",c,t);return{postsToShow:s,isResolving:e("core/data").isResolving("core","getEntityRecords",["postType",c,t]),isEmpty:null!==s&&0===(null==s?void 0:s.length)||0===a}}),t)},he=(e,t,n,o)=>{const r=e===t,i=v(null),a=()=>{var e;const t=null===(e=i.current)||void 0===e?void 0:e.querySelector(o);t&&(t.style.maxHeight=t.scrollHeight+"px")},l=()=>{var e;const t=null===(e=i.current)||void 0===e?void 0:e.querySelector(o);t&&(t.style.maxHeight=0)};return I((()=>{r?a():l()}),[r]),I((()=>{if(!r||!i.current)return;const e=new ResizeObserver((e=>{for(const t of e)t.contentBoxSize&&a()}));return e.observe(i.current),()=>e.disconnect()}),[r]),{blockRef:i,toggleItem:()=>{n(r?null:e)},openContent:a,closeContent:l,isActive:r}},ve=(e,n)=>{const{insertBlock:o}=N(W),{tabs:r,tabsCount:i,tabsOrder:a,selectedBlock:l,selectedBlockClientId:c}=G((t=>{var n;const{getBlock:o,getBlockCount:r,getSelectedBlock:i,getSelectedBlockClientId:a,getBlockOrder:l,getBlockRootClientId:c}=t(W);return{tabs:(null===(n=o(e))||void 0===n?void 0:n.innerBlocks)||[],tabsCount:r(e),tabsOrder:l(e),selectedBlock:i(),selectedBlockClientId:a()}}),[e]),[s,u]=m(null);y((()=>{r.length>0&&!s&&u(r[0].clientId)}),[r,s]);const d=ge(n,e);y((()=>{d&&u(d.clientId)}),[d]);const p=function(t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i;const r=F(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return o(r,n,e),r},g=()=>{const e=p(n);u(e.clientId)};return{tabs:r,tabsCount:i,tabsOrder:a,selectedBlock:l,selectedBlockClientId:c,parentBlock:d,activeItemId:s,setActiveItemId:u,TabAppender:e=>{let{label:n="Add new tab",...o}=e;return x(t,{className:"bc-add-new-child-btn",icon:Z,label:n,onClick:g,...o})},onTabAppenderClick:g,createTab:p}},Ie=(e,t)=>{const n=G((e=>e("core/blocks").getBlockTypes()),[]);return C((()=>{var o;return null==n||null===(o=n.filter((n=>{const o=!(null==n||!n.parent),r=!(null==n||!n.ancestor),i=(null==n?void 0:n.parent)&&n.parent.includes(e),a=(null==n?void 0:n.ancestor)&&n.ancestor.includes(e);return!t.includes(n.name)&&(!o||i)&&(!r||a)})))||void 0===o?void 0:o.map((e=>e.name))}),[n,t,e])},ye=e=>G((t=>{const n=t(W).getBlock(e),o=t(W).getBlockRootClientId(e),r=o?t(W).getBlock(o):null,i=r?r.innerBlocks.findIndex((t=>t.clientId===e)):-1;return{block:n,parentBlock:r,position:i}}),[e]),Ce=e=>{const t=G((e=>e("core/blocks").getBlockTypes()),[]);return C((()=>{var n;return null==t||null===(n=t.filter((t=>e(t))))||void 0===n?void 0:n.map((e=>e.name))}),[t,e])},xe=e=>{let{label:t="Color",value:r,attributeName:i,setAttributes:a,allowedColors:l}=e;const c=fe(l),s=be(c,a);return x(n,{label:t,children:x(o,{colors:c,value:r,disableCustomColors:!0,onChange:e=>s(e,i)})})},Ae=e=>{let{imageId:n,imageUrl:o,imageAlt:i,svgCode:a,onSelect:l,onRemove:c}=e;const s=n&&o,u=s&&a;return x(V,{children:x(O,{onSelect:l,allowedTypes:["image"],value:n,render:e=>{let{open:n}=e;return s?A("div",{className:"bc-image-wrapper",children:[s&&(u?x("div",{className:"svg-container",dangerouslySetInnerHTML:{__html:a}}):x("img",{src:o,alt:i||"icon"})),A("div",{className:"bc-image-wrapper__actions",children:[x(t,{className:"bc-image-wrapper__btn bc-image-wrapper__replace-btn",type:"button",onClick:n,children:x(r,{icon:H,size:20,className:"bc-image-wrapper__btn-icon"})}),x(t,{className:"bc-image-wrapper__btn bc-image-wrapper__remove-btn",type:"button",onClick:c,children:x(r,{icon:L,size:20,className:"bc-image-wrapper__btn-icon"})})]}),x("div",{className:"bc-image-wrapper__overlay"})]}):x(S,{icon:"format-image",onSelect:l,allowedTypes:["image","image/svg+xml"],labels:{title:"Icon Image"}})}})})},we=e=>{let{imageId:n,imageUrl:o,imageAlt:r,placeholder:i=!1,onSelectImage:a,onRemoveImage:l,className:c=""}=e;const s=n&&o;return x(V,{children:x(O,{onSelect:a,allowedTypes:["image"],value:n,render:e=>{let{open:n}=e;return s?A("div",{className:"bc-image-wrapper ".concat(c),children:[x("img",{src:o,alt:r,onClick:n}),A("div",{className:"bc-image-wrapper__actions",children:[x(t,{className:"bc-image-wrapper__btn bc-image-wrapper__replace-btn",type:"button",onClick:n,children:"Replace"}),x(t,{className:"bc-image-wrapper__btn bc-image-wrapper__remove-btn",type:"button",onClick:l,children:"Remove"})]}),x("div",{className:"bc-image-wrapper__overlay"})]}):i?x(S,{className:"media-placeholder",icon:"format-image",onSelect:a,allowedTypes:["image"],labels:{title:"Image",instructions:"Upload an image file or pick one from your media library."}}):null}})})},Ge=new Set,Ne=e=>{let{url:t={value:"#",attrName:"linkSource"},isOpenInNewTab:o={value:!1,attrName:"linkIsOpenInNewTab"},setAttributes:r,label:a="Source"}=e;var l;return l="Warning: LinkControl is deprecated since version 0.4.1 and will be removed in future versions. Please use native one instead.",Ge.has(l)||(console.warn(l),Ge.add(l)),A(w,{children:[x(n,{label:a,children:x(X,{className:"bc-url-input",value:t.value,onChange:e=>r({[t.attrName]:e})})}),x(i,{checked:o.value,label:"Open in a new tab",onChange:e=>r({[o.attrName]:e})})]})},Be=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".is-root-container",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,o=0;const r=setInterval((()=>{const i=document.querySelector(t);i?(clearInterval(r),e(i)):(o+=1,o>=n&&(clearInterval(r),console.error("Max attempts reached. Root container not found.")))}),arguments.length>3&&void 0!==arguments[3]?arguments[3]:100)},Te=".is-root-container",ke=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Add Row";Be((()=>((e,t)=>{const n=document.querySelector(Te);if(!n)return void console.error("Root container not found");const o=document.createElement("button");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"><path d="M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"></path></svg>',o.className="components-button block-editor-button-block-appender root-block-appender",o.setAttribute("aria-label",t),o.setAttribute("data-tooltip",t),o.addEventListener("click",(()=>{B("core/block-editor").insertBlock(F(e))})),n.prepend(o)})(e,t)),Te)},We=()=>{const e=document.querySelector(".is-root-container .root-block-appender");e&&e.remove()},Ve=e=>{D("blocks.registerBlockType","ssm/set-root-block",((t,n)=>{const o=n===e,r="core/block"===n,i=!(null==t||!t.ancestor);return o||r||i||(t.ancestor=[e]),t}))},Oe=e=>{D("blocks.registerBlockType","ssm/unset-root-block",(t=>(t.ancestor&&t.ancestor.includes(e)&&(t.ancestor=null),t)))},Se=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["page","ssm_design_system"],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Add Row",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=!1;T((()=>{const l=k("core/editor").getCurrentPostType();if(!l)return;t.includes(l)?a||(Y("blocks.registerBlockType","ssm/unset-root-block"),Ve(e),B("core/blocks").reapplyBlockTypeFilters(),n&&ke(e,o),r&&r(),a=!0):a&&(Y("blocks.registerBlockType","ssm/set-root-block"),Oe(e),B("core/blocks").reapplyBlockTypeFilters(),n&&We(),i&&i(),a=!1)}),"core/editor")},Xe="ssm-hide-root-block-for-inline-inserter",Ee=e=>{const t='[id*="-block-'.concat(e,'"] { display: none !important; }'),n=document.createElement("style");n.id=Xe,n.appendChild(document.createTextNode(t)),document.head.appendChild(n)},Re=e=>{const t=document.getElementById(Xe);t&&document.head.removeChild(t)},Ze=e=>{D("blocks.registerBlockType","ssm/hide-root-block-for-other-blocks",((t,n)=>{var o;const r=n===e,i=!(null==t||!t.allowedBlocks),a=!(null==t||!t.parent);return r||a||i||(t.allowedBlocks=null===(o=M())||void 0===o||null===(o=o.filter((t=>{const n=t.name===e,o=!(null==t||!t.parent);return!n&&!o})))||void 0===o?void 0:o.map((e=>e.name))),t})),B("core/blocks").reapplyBlockTypeFilters()},He={linkLabel:{type:"string",default:""},linkSource:{type:"string",default:""},linkIsOpenInNewTab:{type:"boolean",default:!1}},Le=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"media";return{["".concat(e)]:{type:"object",default:{id:null,url:null,alt:null,name:null,filename:null,mime:null}}}},Pe={title:{type:"string",default:"Title"},description:{type:"string",default:"Description"}},Fe=function(){return{...Le(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"animationFile"),isAnimationLooped:{type:"boolean",default:!0}}},Me={curatedPosts:{type:"array",default:[],items:{type:"object",properties:{value:{type:"number"},label:{type:"string"}}}}},De={curatedCategories:{type:"array",default:[],items:{type:"object",properties:{value:{type:"number"},label:{type:"string"}}}}},Ye={numberOfPosts:{type:"number",default:5}},Je=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={type:"string"};e&&(null==e?void 0:e.length)>0&&(i.enum=e,i.default=e[0].value);let a={type:"string"};return t&&(null==t?void 0:t.length)>0&&(a.enum=[...t],a.default=t[0].value),{dataSource:i,queryType:a,...n?Me:{},...o?De:{},...r?Ye:{}}},ze=function(){let{hasBackgroundMedia:e=!1,mediaAttributeName:t="media",hasOverlay:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o={isIncludeBackgroundMedia:{type:"boolean"},backgroundMediaType:{type:"string"},...Le(t)};return{backgroundColor:{type:"object"},...e?o:{},...n?{isIncludeOverlay:{type:"boolean"},overlayColor:{type:"object"}}:{}}},je={spacing:{type:"object",default:{margin:{top:-1,bottom:-1},padding:{top:-1,bottom:-1}}}},Ue={spacing:{type:"object",default:{desktop:{margin:{top:-1,bottom:-1},padding:{top:-1,bottom:-1}},mobile:{margin:{top:-1,bottom:-1},padding:{top:-1,bottom:-1}}}}},Qe={LATEST:"latest",CURATED:"curated",BY_CATEGORY:"by_category"},_e={IMAGE:"image",VIDEO:"video",ANIMATION:"animation"},Ke={[_e.IMAGE]:"Image",[_e.VIDEO]:"Video",[_e.ANIMATION]:"Animation"};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function $e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qe,et,tt={exports:{}};et=function(){var e=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}'),t=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function n(n,o){if("string"!=typeof n)throw new Error("slugify: string argument expected");var r=t[(o="string"==typeof o?{replacement:o}:o||{}).locale]||{},i=void 0===o.replacement?"-":o.replacement,a=void 0===o.trim||o.trim,l=n.normalize().split("").reduce((function(t,n){var a=r[n];return void 0===a&&(a=e[n]),void 0===a&&(a=n),a===i&&(a=" "),t+a.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")}),"");return o.strict&&(l=l.replace(/[^A-Za-z0-9\s]/g,"")),a&&(l=l.trim()),l=l.replace(/\s+/g,i),o.lower&&(l=l.toLowerCase()),l}return n.extend=function(t){Object.assign(e,t)},n},(qe=tt).exports=et(),qe.exports.default=et();var nt=$e(tt.exports),ot={exports:{}};
|
1
|
+
import{ToggleControl as e,Button as t,BaseControl as n,ColorPalette as o,Icon as r,CheckboxControl as i,RadioControl as a,Tooltip as l,RangeControl as c,TabPanel as s,Notice as u,Spinner as d,Placeholder as p,SelectControl as g,Toolbar as b,ToolbarButton as f}from"@wordpress/components";import{useState as m,useCallback as h,useRef as v,useEffect as I,useLayoutEffect as y,useMemo as C}from"@wordpress/element";import{jsx as x,jsxs as A,Fragment as w}from"react/jsx-runtime";import{useSelect as G,useDispatch as N,dispatch as B,subscribe as T,select as k}from"@wordpress/data";import{store as W,MediaUploadCheck as V,MediaUpload as O,MediaPlaceholder as S,URLInput as X,BlockControls as E,InnerBlocks as R}from"@wordpress/block-editor";import{plus as Z,edit as H,trash as L,page as P}from"@wordpress/icons";import{createBlock as F,getBlockTypes as M}from"@wordpress/blocks";import{addFilter as D,removeFilter as Y}from"@wordpress/hooks";import J from"@wordpress/api-fetch";import*as z from"react";import{forwardRef as j,useContext as U,useLayoutEffect as Q,useEffect as _,useRef as K,useState as $,useMemo as q,useCallback as ee,createContext as te,Component as ne,Fragment as oe,createElement as re,createRef as ie}from"react";import{createPortal as ae,findDOMNode as le}from"react-dom";const ce="Enable Preview",se="Please check this option to see how the block will actually look and behave on the frontend.",ue=t=>{const{checked:n,onChange:o,help:r=se,label:i=ce}=t;return x(e,{checked:n,onChange:o,label:i,help:r,...t})},de=()=>{const[e,t]=m(!1),n=h((()=>{t((e=>!e))}),[]);return{isPreview:e,setIsPreview:t,PreviewControl:t=>x(ue,{checked:e,onChange:n,...t})}},pe=function(e){let{isEnabled:t,setupSlider:n,cleanCallback:o}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const i=v(null),a=v(null);return I((()=>(t&&null!=i&&i.current&&(a.current=n(i.current)),()=>{var e;a.current&&(null===(e=a.current)||void 0===e||e.destroy(),a.current=null,o&&o())})),[t,...r]),{sliderElRef:i,sliderInstance:a.current}},ge=(e,t)=>G((n=>{const{getBlock:o,getBlockParents:r,getSelectedBlock:i}=n("core/block-editor"),a=i();if(!a)return null;const l=r(a.clientId,!0);if(!l.includes(t))return null;if((null==a?void 0:a.name)===e)return a;if(null!=l&&l.length)for(let n=0;n<l.length;n++){const r=l[n],i=o(r);if((null==i?void 0:i.name)===e)return i;if(t&&r===t)break}return null}),[e,t]),be=(e,t)=>(n,o)=>{const r=e.find((e=>e.color===n));t({[o]:r?{value:n,slug:r.slug}:{value:"",slug:""}})},fe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return G((t=>{var n;const{getSettings:o}=t("core/block-editor"),r=(null===(n=o())||void 0===n?void 0:n.colors)||[];if(e.length>0){const t=new Map(r.map((e=>[e.slug,e])));return e.map((e=>t.get(e))).filter(Boolean)}return r}),[e])},me=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const{postType:n,curatedPostsIds:o,taxonomySlug:r,curatedTermsIds:i,numberOfPosts:a=-1,extraQueryArgs:l}=e;return G((e=>{const t={per_page:-1===a?100:a,order:"desc",orderby:"date",_embed:!0,...l};r&&(null==i?void 0:i.length)>0&&(t[r]=i.join(",")),(null==o?void 0:o.length)>0&&(t.include=o,t.orderby="include");const c="function"==typeof n?n():n,s=e("core").getEntityRecords("postType",c,t);return{postsToShow:s,isResolving:e("core/data").isResolving("core","getEntityRecords",["postType",c,t]),isEmpty:null!==s&&0===(null==s?void 0:s.length)||0===a}}),t)},he=e=>{let{itemId:t,activeItemId:n,setActiveItemId:o,contentSelector:r,heightObserverDeps:i=[]}=e;const a=t===n,l=v(null),c=()=>{var e;const t=null===(e=l.current)||void 0===e?void 0:e.querySelector(r);t&&(t.style.maxHeight=t.scrollHeight+"px")},s=()=>{var e;const t=null===(e=l.current)||void 0===e?void 0:e.querySelector(r);t&&(t.style.maxHeight=0)};return I((()=>{a?c():s()}),[a]),I((()=>{if(!a||!l.current)return;const e=new ResizeObserver((e=>{for(const t of e)t.contentBoxSize&&c()}));return e.observe(l.current),()=>e.disconnect()}),[a,...i]),{blockRef:l,toggleItem:()=>{o(a?null:t)},openContent:c,closeContent:s,isActive:a}},ve=(e,n)=>{const{insertBlock:o}=N(W),{tabs:r,tabsCount:i,tabsOrder:a,selectedBlock:l,selectedBlockClientId:c}=G((t=>{var n;const{getBlock:o,getBlockCount:r,getSelectedBlock:i,getSelectedBlockClientId:a,getBlockOrder:l,getBlockRootClientId:c}=t(W);return{tabs:(null===(n=o(e))||void 0===n?void 0:n.innerBlocks)||[],tabsCount:r(e),tabsOrder:l(e),selectedBlock:i(),selectedBlockClientId:a()}}),[e]),[s,u]=m(null);y((()=>{r.length>0&&!s&&u(r[0].clientId)}),[r,s]);const d=ge(n,e);y((()=>{d&&u(d.clientId)}),[d]);const p=function(t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i;const r=F(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return o(r,n,e),r},g=()=>{const e=p(n);u(e.clientId)};return{tabs:r,tabsCount:i,tabsOrder:a,selectedBlock:l,selectedBlockClientId:c,parentBlock:d,activeItemId:s,setActiveItemId:u,TabAppender:e=>{let{label:n="Add new tab",...o}=e;return x(t,{className:"bc-add-new-child-btn",icon:Z,label:n,onClick:g,...o})},onTabAppenderClick:g,createTab:p}},Ie=(e,t)=>{const n=G((e=>e("core/blocks").getBlockTypes()),[]);return C((()=>{var o;return null==n||null===(o=n.filter((n=>{const o=!(null==n||!n.parent),r=!(null==n||!n.ancestor),i=(null==n?void 0:n.parent)&&n.parent.includes(e),a=(null==n?void 0:n.ancestor)&&n.ancestor.includes(e);return!t.includes(n.name)&&(!o||i)&&(!r||a)})))||void 0===o?void 0:o.map((e=>e.name))}),[n,t,e])},ye=e=>G((t=>{const n=t(W).getBlock(e),o=t(W).getBlockRootClientId(e),r=o?t(W).getBlock(o):null,i=r?r.innerBlocks.findIndex((t=>t.clientId===e)):-1;return{block:n,parentBlock:r,position:i}}),[e]),Ce=e=>{const t=G((e=>e("core/blocks").getBlockTypes()),[]);return C((()=>{var n;return null==t||null===(n=t.filter((t=>e(t))))||void 0===n?void 0:n.map((e=>e.name))}),[t,e])},xe=e=>{let{label:t="Color",value:r,attributeName:i,setAttributes:a,allowedColors:l}=e;const c=fe(l),s=be(c,a);return x(n,{label:t,children:x(o,{colors:c,value:r,disableCustomColors:!0,onChange:e=>s(e,i)})})},Ae=e=>{let{imageId:n,imageUrl:o,imageAlt:i,svgCode:a,onSelect:l,onRemove:c}=e;const s=n&&o,u=s&&a;return x(V,{children:x(O,{onSelect:l,allowedTypes:["image"],value:n,render:e=>{let{open:n}=e;return s?A("div",{className:"bc-image-wrapper",children:[s&&(u?x("div",{className:"svg-container",dangerouslySetInnerHTML:{__html:a}}):x("img",{src:o,alt:i||"icon"})),A("div",{className:"bc-image-wrapper__actions",children:[x(t,{className:"bc-image-wrapper__btn bc-image-wrapper__replace-btn",type:"button",onClick:n,children:x(r,{icon:H,size:20,className:"bc-image-wrapper__btn-icon"})}),x(t,{className:"bc-image-wrapper__btn bc-image-wrapper__remove-btn",type:"button",onClick:c,children:x(r,{icon:L,size:20,className:"bc-image-wrapper__btn-icon"})})]}),x("div",{className:"bc-image-wrapper__overlay"})]}):x(S,{icon:"format-image",onSelect:l,allowedTypes:["image","image/svg+xml"],labels:{title:"Icon Image"}})}})})},we=e=>{let{imageId:n,imageUrl:o,imageAlt:r,placeholder:i=!1,onSelectImage:a,onRemoveImage:l,className:c=""}=e;const s=n&&o;return x(V,{children:x(O,{onSelect:a,allowedTypes:["image"],value:n,render:e=>{let{open:n}=e;return s?A("div",{className:"bc-image-wrapper ".concat(c),children:[x("img",{src:o,alt:r,onClick:n}),A("div",{className:"bc-image-wrapper__actions",children:[x(t,{className:"bc-image-wrapper__btn bc-image-wrapper__replace-btn",type:"button",onClick:n,children:"Replace"}),x(t,{className:"bc-image-wrapper__btn bc-image-wrapper__remove-btn",type:"button",onClick:l,children:"Remove"})]}),x("div",{className:"bc-image-wrapper__overlay"})]}):i?x(S,{className:"media-placeholder",icon:"format-image",onSelect:a,allowedTypes:["image"],labels:{title:"Image",instructions:"Upload an image file or pick one from your media library."}}):null}})})},Ge=new Set,Ne=e=>{let{url:t={value:"#",attrName:"linkSource"},isOpenInNewTab:o={value:!1,attrName:"linkIsOpenInNewTab"},setAttributes:r,label:a="Source"}=e;var l;return l="Warning: LinkControl is deprecated since version 0.4.1 and will be removed in future versions. Please use native one instead.",Ge.has(l)||(console.warn(l),Ge.add(l)),A(w,{children:[x(n,{label:a,children:x(X,{className:"bc-url-input",value:t.value,onChange:e=>r({[t.attrName]:e})})}),x(i,{checked:o.value,label:"Open in a new tab",onChange:e=>r({[o.attrName]:e})})]})},Be=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".is-root-container",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,o=0;const r=setInterval((()=>{const i=document.querySelector(t);i?(clearInterval(r),e(i)):(o+=1,o>=n&&(clearInterval(r),console.error("Max attempts reached. Root container not found.")))}),arguments.length>3&&void 0!==arguments[3]?arguments[3]:100)},Te=".is-root-container",ke=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Add Row";Be((()=>((e,t)=>{const n=document.querySelector(Te);if(!n)return void console.error("Root container not found");const o=document.createElement("button");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"><path d="M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"></path></svg>',o.className="components-button block-editor-button-block-appender root-block-appender",o.setAttribute("aria-label",t),o.setAttribute("data-tooltip",t),o.addEventListener("click",(()=>{B("core/block-editor").insertBlock(F(e))})),n.prepend(o)})(e,t)),Te)},We=()=>{const e=document.querySelector(".is-root-container .root-block-appender");e&&e.remove()},Ve=e=>{D("blocks.registerBlockType","ssm/set-root-block",((t,n)=>{const o=n===e,r="core/block"===n,i=!(null==t||!t.ancestor);return o||r||i||(t.ancestor=[e]),t}))},Oe=e=>{D("blocks.registerBlockType","ssm/unset-root-block",(t=>(t.ancestor&&t.ancestor.includes(e)&&(t.ancestor=null),t)))},Se=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["page","ssm_design_system"],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Add Row",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=!1;T((()=>{const l=k("core/editor").getCurrentPostType();if(!l)return;t.includes(l)?a||(Y("blocks.registerBlockType","ssm/unset-root-block"),Ve(e),B("core/blocks").reapplyBlockTypeFilters(),n&&ke(e,o),r&&r(),a=!0):a&&(Y("blocks.registerBlockType","ssm/set-root-block"),Oe(e),B("core/blocks").reapplyBlockTypeFilters(),n&&We(),i&&i(),a=!1)}),"core/editor")},Xe="ssm-hide-root-block-for-inline-inserter",Ee=e=>{const t='[id*="-block-'.concat(e,'"] { display: none !important; }'),n=document.createElement("style");n.id=Xe,n.appendChild(document.createTextNode(t)),document.head.appendChild(n)},Re=e=>{const t=document.getElementById(Xe);t&&document.head.removeChild(t)},Ze=e=>{D("blocks.registerBlockType","ssm/hide-root-block-for-other-blocks",((t,n)=>{var o;const r=n===e,i=!(null==t||!t.allowedBlocks),a=!(null==t||!t.parent);return r||a||i||(t.allowedBlocks=null===(o=M())||void 0===o||null===(o=o.filter((t=>{const n=t.name===e,o=!(null==t||!t.parent);return!n&&!o})))||void 0===o?void 0:o.map((e=>e.name))),t})),B("core/blocks").reapplyBlockTypeFilters()},He={linkLabel:{type:"string",default:""},linkSource:{type:"string",default:""},linkIsOpenInNewTab:{type:"boolean",default:!1}},Le=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"media";return{["".concat(e)]:{type:"object",default:{id:null,url:null,alt:null,name:null,filename:null,mime:null}}}},Pe={title:{type:"string",default:"Title"},description:{type:"string",default:"Description"}},Fe=function(){return{...Le(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"animationFile"),isAnimationLooped:{type:"boolean",default:!0}}},Me={curatedPosts:{type:"array",default:[],items:{type:"object",properties:{value:{type:"number"},label:{type:"string"}}}}},De={curatedCategories:{type:"array",default:[],items:{type:"object",properties:{value:{type:"number"},label:{type:"string"}}}}},Ye={numberOfPosts:{type:"number",default:5}},Je=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={type:"string"};e&&(null==e?void 0:e.length)>0&&(i.enum=e,i.default=e[0].value);let a={type:"string"};return t&&(null==t?void 0:t.length)>0&&(a.enum=[...t],a.default=t[0].value),{dataSource:i,queryType:a,...n?Me:{},...o?De:{},...r?Ye:{}}},ze=function(){let{hasBackgroundMedia:e=!1,mediaAttributeName:t="media",hasOverlay:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o={isIncludeBackgroundMedia:{type:"boolean"},backgroundMediaType:{type:"string"},...Le(t)};return{backgroundColor:{type:"object"},...e?o:{},...n?{isIncludeOverlay:{type:"boolean"},overlayColor:{type:"object"}}:{}}},je={spacing:{type:"object",default:{margin:{top:-1,bottom:-1},padding:{top:-1,bottom:-1}}}},Ue={spacing:{type:"object",default:{desktop:{margin:{top:-1,bottom:-1},padding:{top:-1,bottom:-1}},mobile:{margin:{top:-1,bottom:-1},padding:{top:-1,bottom:-1}}}}},Qe={LATEST:"latest",CURATED:"curated",BY_CATEGORY:"by_category"},_e={IMAGE:"image",VIDEO:"video",ANIMATION:"animation"},Ke={[_e.IMAGE]:"Image",[_e.VIDEO]:"Video",[_e.ANIMATION]:"Animation"};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function $e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qe,et,tt={exports:{}};et=function(){var e=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}'),t=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function n(n,o){if("string"!=typeof n)throw new Error("slugify: string argument expected");var r=t[(o="string"==typeof o?{replacement:o}:o||{}).locale]||{},i=void 0===o.replacement?"-":o.replacement,a=void 0===o.trim||o.trim,l=n.normalize().split("").reduce((function(t,n){var a=r[n];return void 0===a&&(a=e[n]),void 0===a&&(a=n),a===i&&(a=" "),t+a.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")}),"");return o.strict&&(l=l.replace(/[^A-Za-z0-9\s]/g,"")),a&&(l=l.trim()),l=l.replace(/\s+/g,i),o.lower&&(l=l.toLowerCase()),l}return n.extend=function(t){Object.assign(e,t)},n},(qe=tt).exports=et(),qe.exports.default=et();var nt=$e(tt.exports),ot={exports:{}};
|
2
2
|
/*!
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
4
4
|
Licensed under the MIT License (MIT), see
|