Site Reviews - Version 5.17.4

Version Description

(2021-11-15) =

  • Fixed add-on updater
  • Fixed compatibility with GamiPress plugin
  • Fixed deactivation notices on WordPress settings pages
Download this release

Release Info

Developer geminilabs
Plugin Icon 128x128 Site Reviews
Version 5.17.4
Comparing to
See all releases

Code changes from version 5.17.3 to 5.17.4

Makefile DELETED
@@ -1,36 +0,0 @@
1
- .PHONY: build
2
- build: ## Build all assets and languages
3
- npm run build
4
-
5
- .PHONY: db
6
- db: ## Open the database in TablePlus
7
- open mysql://dev:dev@127.0.0.1/site-reviews?enviroment=local&name=Localhost&safeModeLevel=0&advancedSafeModeLevel=0
8
-
9
- .PHONY: help
10
- help: ## Display help
11
- @awk -F ':|##' '/^[^\t].+?:.*?##/ {printf "\033[36m%-30s\033[0m %s\n", $$1, $$NF}' $(MAKEFILE_LIST) | sort
12
-
13
- .PHONY: open
14
- open: ## Open the development site in the default browser
15
- open http://site-reviews.test/wp/wp-admin/edit.php?post_type=site-review
16
-
17
- .PHONY: phpstan
18
- phpstan: ## Run phpstan analyser
19
- ./vendor/bin/phpstan analyse
20
-
21
- .PHONY: phpunit
22
- phpunit: ## Run all phpunit tests
23
- ./vendor/bin/phpunit
24
-
25
- .PHONY: release
26
- release: ## Release a new version of Site Reviews
27
- sh ./release.sh
28
-
29
- .PHONY: update
30
- update: ## Update Composer and NPM
31
- composer update
32
- npm-check -u
33
-
34
- .PHONY: watch
35
- watch: ## Build all plugin assets and run Browsersync
36
- npm run watch
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/scripts/site-reviews-admin.js CHANGED
@@ -1,2 +1,2 @@
1
  /*! For license information please see site-reviews-admin.js.LICENSE.txt */
2
- !function(){var t={433:function(){Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},325:function(t,n,e){var i=function(t){var n=/\blang(?:uage)?-([\w-]+)\b/i,e=0,i={},r={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(n){return n instanceof o?new o(n.type,t(n.content),n.alias):Array.isArray(n)?n.map(t):n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).slice(8,-1)},objId:function(t){return t.__id||Object.defineProperty(t,"__id",{value:++e}),t.__id},clone:function t(n,e){var i,o;switch(e=e||{},r.util.type(n)){case"Object":if(o=r.util.objId(n),e[o])return e[o];for(var s in i={},e[o]=i,n)n.hasOwnProperty(s)&&(i[s]=t(n[s],e));return i;case"Array":return o=r.util.objId(n),e[o]?e[o]:(i=[],e[o]=i,n.forEach((function(n,r){i[r]=t(n,e)})),i);default:return n}},getLanguage:function(t){for(;t&&!n.test(t.className);)t=t.parentElement;return t?(t.className.match(n)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(i){var t=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(i.stack)||[])[1];if(t){var n=document.getElementsByTagName("script");for(var e in n)if(n[e].src==t)return n[e]}return null}},isActive:function(t,n,e){for(var i="no-"+n;t;){var r=t.classList;if(r.contains(n))return!0;if(r.contains(i))return!1;t=t.parentElement}return!!e}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(t,n){var e=r.util.clone(r.languages[t]);for(var i in n)e[i]=n[i];return e},insertBefore:function(t,n,e,i){var o=(i=i||r.languages)[t],s={};for(var a in o)if(o.hasOwnProperty(a)){if(a==n)for(var u in e)e.hasOwnProperty(u)&&(s[u]=e[u]);e.hasOwnProperty(a)||(s[a]=o[a])}var c=i[t];return i[t]=s,r.languages.DFS(r.languages,(function(n,e){e===c&&n!=t&&(this[n]=s)})),s},DFS:function t(n,e,i,o){o=o||{};var s=r.util.objId;for(var a in n)if(n.hasOwnProperty(a)){e.call(n,a,n[a],i||a);var u=n[a],c=r.util.type(u);"Object"!==c||o[s(u)]?"Array"!==c||o[s(u)]||(o[s(u)]=!0,t(u,e,a,o)):(o[s(u)]=!0,t(u,e,null,o))}}},plugins:{},highlightAll:function(t,n){r.highlightAllUnder(document,t,n)},highlightAllUnder:function(t,n,e){var i={callback:e,container:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",i),i.elements=Array.prototype.slice.apply(i.container.querySelectorAll(i.selector)),r.hooks.run("before-all-elements-highlight",i);for(var o,s=0;o=i.elements[s++];)r.highlightElement(o,!0===n,i.callback)},highlightElement:function(e,i,o){var s=r.util.getLanguage(e),a=r.languages[s];e.className=e.className.replace(n,"").replace(/\s+/g," ")+" language-"+s;var u=e.parentElement;u&&"pre"===u.nodeName.toLowerCase()&&(u.className=u.className.replace(n,"").replace(/\s+/g," ")+" language-"+s);var c={element:e,language:s,grammar:a,code:e.textContent};function l(t){c.highlightedCode=t,r.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,r.hooks.run("after-highlight",c),r.hooks.run("complete",c),o&&o.call(c.element)}if(r.hooks.run("before-sanity-check",c),(u=c.element.parentElement)&&"pre"===u.nodeName.toLowerCase()&&!u.hasAttribute("tabindex")&&u.setAttribute("tabindex","0"),!c.code)return r.hooks.run("complete",c),void(o&&o.call(c.element));if(r.hooks.run("before-highlight",c),c.grammar)if(i&&t.Worker){var f=new Worker(r.filename);f.onmessage=function(t){l(t.data)},f.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(r.highlight(c.code,c.grammar,c.language));else l(r.util.encode(c.code))},highlight:function(t,n,e){var i={code:t,grammar:n,language:e};return r.hooks.run("before-tokenize",i),i.tokens=r.tokenize(i.code,i.grammar),r.hooks.run("after-tokenize",i),o.stringify(r.util.encode(i.tokens),i.language)},tokenize:function(t,n){var e=n.rest;if(e){for(var i in e)n[i]=e[i];delete n.rest}var r=new u;return c(r,r.head,t),a(t,r,n,r.head,0),function(t){var n=[],e=t.head.next;for(;e!==t.tail;)n.push(e.value),e=e.next;return n}(r)},hooks:{all:{},add:function(t,n){var e=r.hooks.all;e[t]=e[t]||[],e[t].push(n)},run:function(t,n){var e=r.hooks.all[t];if(e&&e.length)for(var i,o=0;i=e[o++];)i(n)}},Token:o};function o(t,n,e,i){this.type=t,this.content=n,this.alias=e,this.length=0|(i||"").length}function s(t,n,e,i){t.lastIndex=n;var r=t.exec(e);if(r&&i&&r[1]){var o=r[1].length;r.index+=o,r[0]=r[0].slice(o)}return r}function a(t,n,e,i,u,f){for(var d in e)if(e.hasOwnProperty(d)&&e[d]){var h=e[d];h=Array.isArray(h)?h:[h];for(var p=0;p<h.length;++p){if(f&&f.cause==d+","+p)return;var v=h[p],m=v.inside,b=!!v.lookbehind,y=!!v.greedy,g=v.alias;if(y&&!v.pattern.global){var w=v.pattern.toString().match(/[imsuy]*$/)[0];v.pattern=RegExp(v.pattern.source,w+"g")}for(var _=v.pattern||v,k=i.next,j=u;k!==n.tail&&!(f&&j>=f.reach);j+=k.value.length,k=k.next){var x=k.value;if(n.length>t.length)return;if(!(x instanceof o)){var S,Q=1;if(y){if(!(S=s(_,j,t,b)))break;var F=S.index,O=S.index+S[0].length,R=j;for(R+=k.value.length;F>=R;)R+=(k=k.next).value.length;if(j=R-=k.value.length,k.value instanceof o)continue;for(var A=k;A!==n.tail&&(R<O||"string"==typeof A.value);A=A.next)Q++,R+=A.value.length;Q--,x=t.slice(j,R),S.index-=j}else if(!(S=s(_,0,x,b)))continue;F=S.index;var z=S[0],P=x.slice(0,F),L=x.slice(F+z.length),$=j+x.length;f&&$>f.reach&&(f.reach=$);var C=k.prev;if(P&&(C=c(n,C,P),j+=P.length),l(n,C,Q),k=c(n,C,new o(d,m?r.tokenize(z,m):z,g,z)),L&&c(n,k,L),Q>1){var T={cause:d+","+p,reach:$};a(t,n,e,k.prev,j,T),f&&T.reach>f.reach&&(f.reach=T.reach)}}}}}}function u(){var t={value:null,prev:null,next:null},n={value:null,prev:t,next:null};t.next=n,this.head=t,this.tail=n,this.length=0}function c(t,n,e){var i=n.next,r={value:e,prev:n,next:i};return n.next=r,i.prev=r,t.length++,r}function l(t,n,e){for(var i=n.next,r=0;r<e&&i!==t.tail;r++)i=i.next;n.next=i,i.prev=n,t.length-=r}if(t.Prism=r,o.stringify=function t(n,e){if("string"==typeof n)return n;if(Array.isArray(n)){var i="";return n.forEach((function(n){i+=t(n,e)})),i}var o={type:n.type,content:t(n.content,e),tag:"span",classes:["token",n.type],attributes:{},language:e},s=n.alias;s&&(Array.isArray(s)?Array.prototype.push.apply(o.classes,s):o.classes.push(s)),r.hooks.run("wrap",o);var a="";for(var u in o.attributes)a+=" "+u+'="'+(o.attributes[u]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+a+">"+o.content+"</"+o.tag+">"},!t.document)return t.addEventListener?(r.disableWorkerMessageHandler||t.addEventListener("message",(function(n){var e=JSON.parse(n.data),i=e.language,o=e.code,s=e.immediateClose;t.postMessage(r.highlight(o,r.languages[i],i)),s&&t.close()}),!1),r):r;var f=r.util.currentScript();function d(){r.manual||r.highlightAll()}if(f&&(r.filename=f.src,f.hasAttribute("data-manual")&&(r.manual=!0)),!r.manual){var h=document.readyState;"loading"===h||"interactive"===h&&f&&f.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return r}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});t.exports&&(t.exports=i),void 0!==e.g&&(e.g.Prism=i)},251:function(){!function(t){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var e=t.languages.markup;e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))}(Prism)},980:function(){Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript},854:function(){!function(t){function n(t,n){return"___"+t.toUpperCase()+n+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(e,i,r,o){if(e.language===i){var s=e.tokenStack=[];e.code=e.code.replace(r,(function(t){if("function"==typeof o&&!o(t))return t;for(var r,a=s.length;-1!==e.code.indexOf(r=n(i,a));)++a;return s[a]=t,r})),e.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(e,i){if(e.language===i&&e.tokenStack){e.grammar=t.languages[i];var r=0,o=Object.keys(e.tokenStack);!function s(a){for(var u=0;u<a.length&&!(r>=o.length);u++){var c=a[u];if("string"==typeof c||c.content&&"string"==typeof c.content){var l=o[r],f=e.tokenStack[l],d="string"==typeof c?c:c.content,h=n(i,l),p=d.indexOf(h);if(p>-1){++r;var v=d.substring(0,p),m=new t.Token(i,t.tokenize(f,e.grammar),"language-"+i,f),b=d.substring(p+h.length),y=[];v&&y.push.apply(y,s([v])),y.push(m),b&&y.push.apply(y,s([b])),"string"==typeof c?a.splice.apply(a,[u,1].concat(y)):c.content=y}}else c.content&&s(c.content)}return a}(e.tokens)}}}})}(Prism)},335:function(){Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var e={};e["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},e.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:e}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var r={};r[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,n){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:Prism.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml},945:function(){!function(t){var n=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,e=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,r=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:n,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[\w|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:e,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:r,punctuation:o};var s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:t.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}];t.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:n,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:e,number:i,operator:r,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",(function(n){if(/<\?/.test(n.code)){t.languages["markup-templating"].buildPlaceholders(n,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}})),t.hooks.add("after-tokenize",(function(n){t.languages["markup-templating"].tokenizePlaceholders(n,"php")}))}(Prism)},759:function(){!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var t="line-numbers",n=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(n,e){if("PRE"===n.tagName&&n.classList.contains(t)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,o=r+(i.children.length-1);e<r&&(e=r),e>o&&(e=o);var s=e-r;return i.children[s]}}},resize:function(t){r([t])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",(function(){e.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(e){if(e.code){var i=e.element,o=i.parentNode;if(o&&/pre/i.test(o.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,t)){i.classList.remove(t),o.classList.add(t);var s,a=e.code.match(n),u=a?a.length+1:1,c=new Array(u+1).join("<span></span>");(s=document.createElement("span")).setAttribute("aria-hidden","true"),s.className="line-numbers-rows",s.innerHTML=c,o.hasAttribute("data-start")&&(o.style.counterReset="linenumber "+(parseInt(o.getAttribute("data-start"),10)-1)),e.element.appendChild(s),r([o]),Prism.hooks.run("line-numbers",e)}}})),Prism.hooks.add("line-numbers",(function(t){t.plugins=t.plugins||{},t.plugins.lineNumbers=!0}))}function r(t){if(0!=(t=t.filter((function(t){var n=function(t){if(!t)return null;return window.getComputedStyle?getComputedStyle(t):t.currentStyle||null}(t)["white-space"];return"pre-wrap"===n||"pre-line"===n}))).length){var e=t.map((function(t){var e=t.querySelector("code"),i=t.querySelector(".line-numbers-rows");if(e&&i){var r=t.querySelector(".line-numbers-sizer"),o=e.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",e.appendChild(r)),r.innerHTML="0",r.style.display="block";var s=r.getBoundingClientRect().height;return r.innerHTML="",{element:t,lines:o,lineHeights:[],oneLinerHeight:s,sizer:r}}})).filter(Boolean);e.forEach((function(t){var n=t.sizer,e=t.lines,i=t.lineHeights,r=t.oneLinerHeight;i[e.length-1]=void 0,e.forEach((function(t,e){if(t&&t.length>1){var o=n.appendChild(document.createElement("span"));o.style.display="block",o.textContent=t}else i[e]=r}))})),e.forEach((function(t){for(var n=t.sizer,e=t.lineHeights,i=0,r=0;r<e.length;r++)void 0===e[r]&&(e[r]=n.children[i++].getBoundingClientRect().height)})),e.forEach((function(t){var n=t.sizer,e=t.element.querySelector(".line-numbers-rows");n.style.display="none",n.innerHTML="",t.lineHeights.forEach((function(t,n){e.children[n].style.height=t+"px"}))}))}}}()},449:function(t){"use strict";function n(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function e(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function i(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}var r={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,prebuilt:!1,stars:null,tooltip:"Select a Rating"},o=function(t,n,e){t.classList[n?"add":"remove"](e)},s=function(t){var n=document.createElement("span");for(var e in t=t||{})n.setAttribute(e,t[e]);return n},a=function(t,n,e){var i=s(e);return t.parentNode.insertBefore(i,n?t.nextSibling:t),i},u=function t(){for(var n=arguments.length,e=new Array(n),i=0;i<n;i++)e[i]=arguments[i];var r={};return e.forEach((function(n){Object.keys(n||{}).forEach((function(i){if(void 0!==e[0][i]){var o=n[i];"Object"!==c(o)||"Object"!==c(r[i])?r[i]=o:r[i]=t(r[i],o)}}))})),r},c=function(t){return{}.toString.call(t).slice(8,-1)},l=function(){function t(e,i){var r,o;n(this,t),this.direction=window.getComputedStyle(e,null).getPropertyValue("direction"),this.el=e,this.events={change:this.onChange.bind(this),keydown:this.onKeyDown.bind(this),mousedown:this.onPointerDown.bind(this),mouseleave:this.onPointerLeave.bind(this),mousemove:this.onPointerMove.bind(this),reset:this.onReset.bind(this),touchend:this.onPointerDown.bind(this),touchmove:this.onPointerMove.bind(this)},this.indexActive=null,this.indexSelected=null,this.props=i,this.tick=null,this.ticking=!1,this.values=function(t){var n=[];return[].forEach.call(t.options,(function(t){var e=parseInt(t.value,10)||0;e>0&&n.push({index:t.index,text:t.text,value:e})})),n.sort((function(t,n){return t.value-n.value}))}(e),this.widgetEl=null,this.el.widget&&this.el.widget.destroy(),r=this.values.length,o=this.props.maxStars,/^\d+$/.test(r)&&1<=r&&r<=o?this.build():this.destroy()}return i(t,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.selectValue(this.indexSelected=this.selected(),!1),this.handleEvents("add"),this.el.widget=this}},{key:"buildWidget",value:function(){var t,n,e=this;this.props.prebuilt?(t=this.el.parentNode,n=t.querySelector("."+this.props.classNames.base+"--stars")):((t=a(this.el,!1,{class:this.props.classNames.base})).appendChild(this.el),n=a(this.el,!0,{class:this.props.classNames.base+"--stars"}),this.values.forEach((function(t,i){var r=s({"data-index":i,"data-value":t.value});"function"==typeof e.props.stars&&e.props.stars.call(e,r,t,i),[].forEach.call(r.children,(function(t){return t.style.pointerEvents="none"})),n.innerHTML+=r.outerHTML}))),t.dataset.starRating="",t.classList.add(this.props.classNames.base+"--"+this.direction),this.props.tooltip&&n.setAttribute("role","tooltip"),this.widgetEl=n}},{key:"changeIndexTo",value:function(t,n){var e=this;if(this.indexActive!==t||n){if([].forEach.call(this.widgetEl.children,(function(n,i){o(n,i<=t,e.props.classNames.active),o(n,i===e.indexSelected,e.props.classNames.selected)})),this.widgetEl.setAttribute("data-rating",t+1),"function"==typeof this.props.stars||this.props.prebuilt||(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(t+1))),this.props.tooltip){var i=t<0?this.props.tooltip:this.values[t].text;this.widgetEl.setAttribute("aria-label",i)}this.indexActive=t}this.ticking=!1}},{key:"destroy",value:function(){this.indexActive=null,this.indexSelected=this.selected();var t=this.el.parentNode;t.classList.contains(this.props.classNames.base)&&(this.props.prebuilt?(this.widgetEl=t.querySelector("."+this.props.classNames.base+"--stars"),t.classList.remove(this.props.classNames.base+"--"+this.direction),delete t.dataset.starRating):t.parentNode.replaceChild(this.el,t),this.handleEvents("remove")),delete this.el.widget}},{key:"eventListener",value:function(t,n,e,i){var r=this;e.forEach((function(e){return t[n+"EventListener"](e,r.events[e],i||!1)}))}},{key:"handleEvents",value:function(t){var n=this.el.closest("form");n&&"FORM"===n.tagName&&this.eventListener(n,t,["reset"]),this.eventListener(this.el,t,["change"]),"add"===t&&this.el.disabled||(this.eventListener(this.el,t,["keydown"]),this.eventListener(this.widgetEl,t,["mousedown","mouseleave","mousemove","touchend","touchmove"],!1))}},{key:"indexFromEvent",value:function(t){var n,e,i=(null===(n=t.touches)||void 0===n?void 0:n[0])||(null===(e=t.changedTouches)||void 0===e?void 0:e[0])||t,r=document.elementFromPoint(i.clientX,i.clientY);return[].slice.call(r.parentNode.children).indexOf(r)}},{key:"onChange",value:function(){this.changeIndexTo(this.selected(),!0)}},{key:"onKeyDown",value:function(t){var n=t.key.slice(5);if(~["Left","Right"].indexOf(n)){var e="Left"===n?-1:1;"rtl"===this.direction&&(e*=-1);var i=this.values.length-1,r=Math.min(Math.max(this.selected()+e,-1),i);this.selectValue(r,!0)}}},{key:"onPointerDown",value:function(t){t.preventDefault();var n=this.indexFromEvent(t);this.props.clearable&&n===this.indexSelected&&(n=-1),this.selectValue(n,!0)}},{key:"onPointerLeave",value:function(t){var n=this;t.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame((function(){return n.changeIndexTo(n.indexSelected)}))}},{key:"onPointerMove",value:function(t){var n=this;t.preventDefault(),this.ticking||(this.tick=requestAnimationFrame((function(){return n.changeIndexTo(n.indexFromEvent(t))})),this.ticking=!0)}},{key:"onReset",value:function(){var t,n=this.valueIndex(null===(t=this.el.querySelector("[selected]"))||void 0===t?void 0:t.value);this.selectValue(n||-1,!1)}},{key:"selected",value:function(){return this.valueIndex(this.el.value)}},{key:"selectValue",value:function(t,n){var e;this.el.value=(null===(e=this.values[t])||void 0===e?void 0:e.value)||"",this.indexSelected=this.selected(),!1===n?this.changeIndexTo(this.selected(),!0):this.el.dispatchEvent(new Event("change"))}},{key:"valueIndex",value:function(t){return this.values.findIndex((function(n){return n.value===+t}))}}]),t}(),f=function(){function t(e,i){n(this,t),this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(e,i)}return i(t,[{key:"buildWidgets",value:function(t,n){var e=this;this.queryElements(t).forEach((function(t){var i=u(r,n,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.widget||(!i.prebuilt&&t.parentNode.classList.contains(i.classNames.base)&&e.unwrap(t),e.widgets.push(new l(t,i)))}))}},{key:"destroy",value:function(){this.widgets.forEach((function(t){return t.destroy()}))}},{key:"queryElements",value:function(t){return"HTMLSelectElement"===c(t)?[t]:"NodeList"===c(t)?[].slice.call(t):"String"===c(t)?[].slice.call(document.querySelectorAll(t)):[]}},{key:"rebuild",value:function(){this.widgets.forEach((function(t){return t.build()}))}},{key:"unwrap",value:function(t){var n=t.parentNode,e=n.parentNode;e.insertBefore(t,n),e.removeChild(n)}}]),t}();t.exports=f}},n={};function e(i){var r=n[i];if(void 0!==r)return r.exports;var o=n[i]={exports:{}};return t[i](o,o.exports,e),o.exports}e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},function(){"use strict";var t=function(t){return this.data={},this.form=jQuery(t),this.pushes={},this.init()};t.prototype={patterns:{validate:/^[a-z_-][a-z0-9_-]*(?:\[(?:\d*|[a-z0-9_-]+)\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,named:/^[a-z0-9_-]+$/i,push:/^$/,fixed:/^\d+$/},addPair:function(t){this.patterns.validate.test(t.name)&&(this.data=jQuery.extend(!0,this.data,this.makeObject(t.name,this.encode(t))))},build:function(t,n,e){return t[n]=e,t},encode:function(t){return"checkbox"===jQuery('[name="'+t.name+'"]',this.form).attr("type")&&"on"===t.value||t.value},incrementPush:function(t){return void 0===this.pushes[t]&&(this.pushes[t]=0),this.pushes[t]++},init:function(){var t=this.form.serializeArray();if(jQuery.isArray(t))for(var n=0,e=t.length;n<e;n++)this.addPair(t[n]);return this.data},makeObject:function(t,n){for(var e,i=t.match(this.patterns.key);void 0!==(e=i.pop());)if(this.patterns.push.test(e)){var r=this.incrementPush(t.replace(/\[\]$/,""));n=this.build([],r,n)}else this.patterns.fixed.test(e)?n=this.build([],e,n):this.patterns.named.test(e)&&(n=this.build({},e,n));return n}};var n=t,i=function(t,n,e){this.event=n||null,this.form=e||null,this.notice=null,this.request=t||{}};i.prototype={post:function(t){this.event?this.t(t):this.i(t)},u:function(t){var e={action:GLSR.action,_ajax_request:!0};if(this.form){var i=new n(this.form);i[GLSR.nameprefix]&&(this.request=i[GLSR.nameprefix])}return this.l(t),e[GLSR.nameprefix]=this.request,e},l:function(t){this.request._nonce||(GLSR.nonce[this.request._action]?this.request._nonce=GLSR.nonce[this.request._action]:t&&(this.request._nonce=t.closest("form").find("#_wpnonce").val()))},i:function(t,n){jQuery.post(GLSR.ajaxurl,this.u(n)).done((function(e){"function"==typeof t&&t(e.data,e.success),n&&n.prop("disabled",!1)})).always((function(t){t.data?t.data.notices&&GLSR.notices.add(t.data.notices):GLSR.notices.add('<div class="notice notice-error inline is-dismissible"><p>Unknown error.</p></div>')}))},t:function(t){this.event.preventDefault();var n=jQuery(this.event.currentTarget);n.is(":disabled")||(n.prop("disabled",!0),this.i(t,n))}};var r,o,s=i,a="function"==typeof Map?new Map:(r=[],o=[],{has:function(t){return r.indexOf(t)>-1},get:function(t){return o[r.indexOf(t)]},set:function(t,n){-1===r.indexOf(t)&&(r.push(t),o.push(n))},delete:function(t){var n=r.indexOf(t);n>-1&&(r.splice(n,1),o.splice(n,1))}}),u=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(r){u=function(t){var n=document.createEvent("Event");return n.initEvent(t,!0,!1),n}}function c(t){var n=a.get(t);n&&n.destroy()}function l(t){var n=a.get(t);n&&n.update()}var f=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((f=function(t){return t}).destroy=function(t){return t},f.update=function(t){return t}):((f=function(t,n){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!a.has(t)){var n,e=null,i=null,r=null,o=function(){t.clientWidth!==i&&f()},s=function(n){window.removeEventListener("resize",o,!1),t.removeEventListener("input",f,!1),t.removeEventListener("keyup",f,!1),t.removeEventListener("autosize:destroy",s,!1),t.removeEventListener("autosize:update",f,!1),Object.keys(n).forEach((function(e){t.style[e]=n[e]})),a.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",s,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",f,!1),window.addEventListener("resize",o,!1),t.addEventListener("input",f,!1),t.addEventListener("autosize:update",f,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",a.set(t,{destroy:s,update:f}),"vertical"===(n=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),e="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(e)&&(e=0),f()}function c(n){var e=t.style.width;t.style.width="0px",t.style.width=e,t.style.overflowY=n}function l(){if(0!==t.scrollHeight){var n=function(t){for(var n=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&n.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return n}(t),r=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+e+"px",i=t.clientWidth,n.forEach((function(t){t.node.scrollTop=t.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function f(){l();var n=Math.round(parseFloat(t.style.height)),e=window.getComputedStyle(t,null),i="content-box"===e.boxSizing?Math.round(parseFloat(e.height)):t.offsetHeight;if(i<n?"hidden"===e.overflowY&&(c("scroll"),l(),i="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==e.overflowY&&(c("hidden"),l(),i="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),r!==i){r=i;var o=u("autosize:resized");try{t.dispatchEvent(o)}catch(t){}}}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],c),t},f.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],l),t});var d=f;function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}var p=function(){"object"===h(jQuery.wp)&&"function"==typeof jQuery.wp.wpColorPicker&&jQuery(document).find("input[type=text].color-picker-hex").each((function(){var t=jQuery(this),n=jQuery.extend({},t.data("colorpicker")||{},{change:function(t,n){jQuery(t.target).val(n.color.toString()).trigger("change")},mode:"hsl",palettes:!1,width:180});t.wpColorPicker(n)}))},v={},m=function(t,n){var e=v[t]||[],i=[];n&&[].forEach.call(e,(function(t){n!==t.fn&&n!==t.fn.once&&i.push(t)})),i.length?v[t]=i:delete v[t]},b=function(t,n,e){(v[t]||(v[t]=[])).push({fn:n,context:e})},y={events:v,trigger:function(t){var n=[].slice.call(arguments,1),e=(v[t]||[]).slice();[].forEach.call(e,(function(t){return t.fn.apply(t.context,n)}))},off:m,on:b,once:function(t,n,e){var i=arguments,r=function r(){m(t,r),n.apply(e,i)};r.once=n,b(t,r,e)}},g=function(){this.request=null,jQuery(".enable-filter-tog","#adv-settings").on("click",this.h.bind(this))};g.prototype={p:function(){return jQuery(".enable-filter-tog:checked").map((function(t,n){return n.value})).get()},h:function(t){var n=jQuery(t.currentTarget),e=n.prop("checked")?"removeClass":"addClass";jQuery("#glsr-filter-by-"+n.val())[e]("hidden"),this.v()},v:_.debounce((function(){this.request&&this.request.abort();var t={_ajax_request:!0};t[GLSR.nameprefix]={_action:"toggle-filters",_nonce:GLSR.nonce["toggle-filters"],enabled:this.p()},this.request=wp.ajax.post(GLSR.action,t),this.request.always(function(){this.request=null}.bind(this))}),500)};var w=g,k=function(t){this.el=document.querySelector(t),this.el&&(this.depends=this.el.querySelectorAll("[data-depends]"),this.depends.length&&this.m())};k.prototype={_:function(t){var n=t.getAttribute("data-depends");if(n)try{return JSON.parse(n)}catch(t){return console.error(t)}},m:function(){for(var t=this.el.elements,n=0;n<t.length;n++)~["INPUT","SELECT"].indexOf(t[n].nodeName)&&t[n].addEventListener("change",this.k.bind(this))},j:function(t,n){var e=!1;n=[].concat(n);var i=this.el.querySelectorAll('[name="'+t+'"]');return[].map.call(i,function(t){var i=~this.S(n).indexOf(this.F(t.value));~["checkbox","radio"].indexOf(t.type)?t.checked&&i&&(e=!0):i&&(e=!0)}.bind(this)),e},F:function(t){return!!~["true","on","yes","1"].indexOf(t)||!~["false","off","no","0"].indexOf(t)&&t},S:function(t){return t.map(this.F)},k:function(t){this.depends.forEach(function(n){var e=this._(n);if(e&&~e.map((function(t){return t.name})).indexOf(t.currentTarget.name)){var i=!0;e.forEach(function(t){this.j(t.name,t.value)||(i=!1)}.bind(this)),this.O(n,i)}}.bind(this))},O:function(t,n){var e=t.closest(".glsr-setting-field");e&&e.classList[n?"remove":"add"]("hidden")}};var j=k,x=function(){jQuery(".glsr-metabox-field input[data-edit-review]").on("change",this.R.bind(this)),jQuery(".glsr-metabox-field input[type=url]").on("change",this.A.bind(this))};x.prototype={A:function(t){var n=jQuery(t.currentTarget);this.P(n.parent().find("img"),n.val())},R:function(t){var n=t.currentTarget.checked;jQuery(".glsr-input-value").each(function(t,e){if(n)jQuery(e).data("value",e.value);else{if(e.value=jQuery(e).data("value"),"url"!==e.type)return;this.P(jQuery(e).parent().find("img"),e.value)}}.bind(this)),jQuery(".glsr-input-value").prop("disabled",!n),GLSR.stars.rebuild()},P:function(t,n){if(t){var e=new Image;e.src=n,e.onerror=function(){t.attr("src",t.data("fallback"))},e.onload=function(){t.attr("src",e.src)}}}};var S=x,Q=function(){this.m()};Q.prototype={add:function(t){t&&(jQuery("#glsr-notices").length||(jQuery("#message.notice").remove(),jQuery("hr.wp-header-end").after('<div id="glsr-notices" />')),jQuery("#glsr-notices").html(t),jQuery(document).trigger("wp-updates-notice-added"))},m:function(){jQuery(".glsr-notice[data-dismiss]").on("click.wp-dismiss-notice",this.h.bind(this))},h:function(t){var n={};n[GLSR.nameprefix]={_action:"dismiss-notice",notice:jQuery(t.currentTarget).data("dismiss")},wp.ajax.post(GLSR.action,n)}};var F=Q,O=function(){this.el=jQuery("#pinned-status-select"),this.el&&(this.cancel=jQuery("a.cancel-pinned-status"),this.cancel.on("click",this.L.bind(this)),this.edit=jQuery("a.edit-pinned-status"),this.edit.on("click",this.$.bind(this)),this.save=jQuery("a.save-pinned-status"),this.save.on("click",this.C.bind(this))),jQuery("td.column-is_pinned i.pin-review").on("click",this.T.bind(this))};O.prototype={G:function(){this.el.slideUp("fast"),this.edit.show().focus()},L:function(t){t.preventDefault(),this.G(),this.el.find("select").val("0"===jQuery("#hidden-pinned-status").val()?1:0)},$:function(t){t.preventDefault(),this.el.is(":hidden")&&(this.el.slideDown("fast",function(){this.el.find("select").focus()}.bind(this)),this.edit.hide())},C:function(t){t.preventDefault(),this.G(),this.target=t.currentTarget;var n={_action:"toggle-pinned",id:jQuery("#post_ID").val(),pinned:jQuery("#pinned-status").val()};new s(n).post(this.q.bind(this))},T:function(t){t.preventDefault(),this.target=t.currentTarget;var n={_action:"toggle-pinned",id:t.currentTarget.getAttribute("data-id"),pinned:-1};jQuery(this.target).addClass("spinner is-active").removeClass("dashicons-sticky"),new s(n).post(this.M.bind(this))},q:function(t){jQuery("#pinned-status").val(0|!t.pinned),jQuery("#hidden-pinned-status").val(0|t.pinned),jQuery("#pinned-status-text").text(t.pinned?this.target.dataset.yes:this.target.dataset.no),GLSR.notices.add(t.notices)},M:function(t){this.target.classList[t.pinned?"add":"remove"]("pinned"),jQuery(this.target).removeClass("spinner is-active").addClass("dashicons-sticky")}};var R=O,A=function(){jQuery.each(GLSR.pointers,function(t,n){this.m(n)}.bind(this))};A.prototype={D:function(t){jQuery.post(GLSR.ajaxurl,{action:"dismiss-wp-pointer",pointer:t})},m:function(t){jQuery(t.target).pointer({content:t.options.content,position:t.options.position,close:this.D.bind(null,t.id)}).pointer("open").pointer("sendToTop"),jQuery(document).on("wp-window-resized",(function(){jQuery(t.target).pointer("reposition")}))}};var z=A,P=e(325),L=e.n(P),$=(e(433),e(335),e(980),e(854),e(945),e(251),e(759),function(t,n){this.el=jQuery(t),this.options=n,this.searchTerm=null,this.m()});$.prototype={defaults:{action:null,exclude:[],onInit:null,onResultClick:null,results:{},selected:-1,selectedClass:"glsr-selected-result",selectorEntries:".glsr-strings-table tbody",selectorResults:".glsr-search-results",selectorSearch:".glsr-search-input"},m:function(){this.options=jQuery.extend({},this.defaults,this.options),this.el.length&&(this.options.entriesEl=this.el.parent().find(this.options.selectorEntries),this.options.resultsEl=this.el.find(this.options.selectorResults),this.options.searchEl=this.el.find(this.options.selectorSearch),this.options.searchEl.attr("aria-describedby","live-search-desc"),"function"==typeof this.options.onInit&&this.options.onInit.call(this),this.I())},I:function(){this.options.searchEl.on("input",_.debounce(this.B.bind(this),500)),this.options.searchEl.on("keyup",this.U.bind(this)),this.options.searchEl.on("keydown keypress",(function(t){GLSR.keys.ENTER===t.which&&t.preventDefault()})),jQuery(document).on("click",this.W.bind(this)),jQuery(document).on("keydown",this.H.bind(this))},N:function(){void 0!==this.searchRequest&&this.searchRequest.abort()},V:function(){this.N(),this.options.resultsEl.empty(),this.options.resultsEl.removeClass("is-active"),this.el.removeClass("is-active"),jQuery("body").removeClass("glsr-focus")},Z:function(t){var n=this.options.entriesEl.children("tr").eq(t),e=this;n.find("td").css({backgroundColor:"#faafaa"}),n.fadeOut(350,(function(){jQuery(this).remove(),e.options.results={},e.K(),e.X()}))},Y:function(t){jQuery("body").addClass("glsr-focus"),this.options.resultsEl.append(t),this.options.resultsEl.children("span").on("click",this.J.bind(this))},tt:function(){this.options.entriesEl.on("click","a.delete",this.nt.bind(this)),this.options.entriesEl.sortable({items:"tr",tolerance:"pointer",start:function(t,n){n.placeholder.height(n.helper[0].scrollHeight)},sort:function(t,n){var e=t.pageY-jQuery(this).offsetParent().offset().top-n.helper.outerHeight(!0)/2;n.helper.css({top:e+"px"})}})},et:function(t){this.options.selected+=t,this.options.results.removeClass(this.options.selectedClass),this.options.selected<0&&(this.options.selected=-1,this.options.searchEl.focus()),this.options.selected>=this.options.results.length&&(this.options.selected=this.options.results.length-1),this.options.selected>=0&&this.options.results.eq(this.options.selected).addClass(this.options.selectedClass).focus()},W:function(t){jQuery(t.target).find(this.el).length&&jQuery("body").hasClass("glsr-focus")&&this.V()},H:function(t){if(!jQuery.isEmptyObject(this.options.results)){if(GLSR.keys.ESC===t.which&&this.V(),GLSR.keys.ENTER===t.which||GLSR.keys.SPACE===t.which){var n=this.options.resultsEl.find("."+this.options.selectedClass);n&&n.trigger("click")}GLSR.keys.UP===t.which&&(t.preventDefault(),this.et(-1)),GLSR.keys.DOWN===t.which&&(t.preventDefault(),this.et(1))}},nt:function(t){t.preventDefault(),this.Z(jQuery(t.currentTarget).closest("tr").index())},J:function(t){t.preventDefault(),"function"==typeof this.options.onResultClick&&this.options.onResultClick.call(this,t),this.V()},B:function(t){if(this.N(),this.searchTerm===t.currentTarget.value&&this.options.results.length)return this.Y(this.options.results);if(this.options.resultsEl.empty(),this.options.selected=-1,this.searchTerm=t.currentTarget.value,""===this.searchTerm)return this.it();this.el.addClass("is-active");var n={};n[GLSR.nameprefix]={_action:this.options.action,_nonce:this.el.find("#_search_nonce").val(),exclude:this.options.exclude,search:this.searchTerm},this.searchRequest=wp.ajax.post(GLSR.action,n).done(function(t){this.el.removeClass("is-active"),this.Y(t.items?t.items:t.empty),this.options.results=this.options.resultsEl.children(),this.options.resultsEl.addClass("is-active"),delete this.searchRequest}.bind(this))},U:function(t){GLSR.keys.ESC===t.which&&this.it(),GLSR.keys.ENTER===t.which&&(this.B(t),t.preventDefault())},rt:function(t){t.preventDefault();var n=jQuery(t.currentTarget).closest(".glsr-multibox-entry");n.find("a").css({color:"#c00"}),n.fadeOut("fast",(function(){n.remove()}))},K:function(){var t=this;this.options.exclude=[],this.options.entriesEl.children("tr").each((function(n){jQuery(this).find(".glsr-string-td2").children().filter(":input").each((function(){var e=jQuery(this),i=e.attr("name").replace(/\[\d+\]/i,"["+n+"]");e.attr("name",i),e.is("[data-id]")&&t.options.exclude.push({id:e.val()})}))}))},it:function(){this.V(),this.options.results={},this.options.searchEl.val("")},X:function(){var t=this.options.entriesEl.children().length>0?"remove":"add";this.options.entriesEl.parent()[t+"Class"]("glsr-hidden")}};var C=$,T=function(t){this.options=jQuery.extend({},this.defaults,t),this.tabs=document.querySelectorAll(this.options.tabSelector),this.tabs&&this.m()};T.prototype={defaults:{expandSelectors:".glsr-nav-view, .glsr-notice",tabSelector:".glsr-nav-tab"},m:function(){var t=this;[].forEach.call(t.tabs,function(n,e){n.addEventListener("click",t.h.bind(t)),n.addEventListener("touchend",t.h.bind(t))}.bind(t)),jQuery(t.options.expandSelectors).on("click","a",(function(){var n=this.dataset.expand;localStorage.setItem("glsr-expand",n),t.ot(jQuery(n))})),jQuery(window).on("load",(function(){t.ot(jQuery(localStorage.getItem("glsr-expand")))}))},h:function(t){t.preventDefault(),this.st(t.currentTarget)},ot:function(t){if(t.length){var n=t.closest(".glsr-nav-view"),e=t.closest(".glsr-card");n.removeClass("collapsed"),this.ut(n),n.removeClass("collapsed"),e.removeClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!0),window.setTimeout((function(){localStorage.removeItem("glsr-expand"),jQuery("#glsr-notices .notice").length||e[0].scrollIntoView({behavior:"smooth",block:e.outerHeight()>=window.innerHeight?"start":"center"})}),10)}},ut:function(t){var n=t.hasClass("collapsed")?"remove":"add";t[n+"Class"]("collapsed").find(".glsr-card.postbox")[n+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==n)},st:function(t){if(t.classList.contains("nav-tab-active")){var n=jQuery("#"+t.dataset.id);this.ut(n)}}};var E=T,G=function(t){this.current=null,this.editor=null,this.create=function(t){if(this.editor=tinymce.get(t),this.editor){var n={_action:"mce-shortcode",shortcode:this.current};new s(n).post(this.ct.bind(this))}};var n=document.querySelectorAll(t);n.length&&n.forEach(function(t){var n=t.querySelector("button"),e=t.querySelectorAll(".mce-menu-item");n&&e.length&&this.m(t,n,e)}.bind(this))};G.prototype={lt:{},ft:[],m:function(t,n,e){document.addEventListener("click",this.dt.bind(this,t,n)),n.addEventListener("click",this.ht.bind(this,t,n)),e.forEach(function(e){e.addEventListener("click",this.vt.bind(this,t,n))}.bind(this))},bt:function(){tinymce.execCommand("GLSR_Shortcode")},yt:function(){jQuery("#scTemp").length?this.bt():(jQuery("body").append('<textarea id="scTemp" style="display:none!important;"/>'),tinymce.init({elements:"scTemp",external_plugins:GLSR.tinymce,mode:"exact",plugins:["glsr_shortcode","wplink"]}),setTimeout(function(){this.bt()}.bind(this),200))},D:function(t,n){jQuery(n).removeClass("active"),jQuery(t).find(".glsr-mce-menu").hide()},gt:function(){var t=jQuery("#scTemp");t.length&&(tinymce.get("scTemp").remove(),t.remove()),this.lt={},this.ft=[]},ct:function(t){if(t){if(0===t.body.length)return window.send_to_editor("["+t.shortcode+"]"),void this.gt();var n=this.wt(t);t.ok.constructor===Array&&(n.buttons[0].text=t.ok[0],n.buttons[0].onclick="close",delete n.buttons[1]),this.editor.windowManager.open(n)}},_t:function(t){for(var n in this.lt=t,this.ft=[],t)t.hasOwnProperty(n)&&(this.kt(n),this.jt(n),this.xt(n));this.lt.hide=this.ft.join(",")},kt:function(t){"display"!==t||jQuery.isNumeric(this.lt[t])||(this.lt[t]="")},jt:function(t){if(GLSR.hideoptions.hasOwnProperty(this.current)){var n=t.substring("hide_".length);-1!==Object.keys(GLSR.hideoptions[this.current]).indexOf(n)&&(this.lt[t]&&this.ft.push(n),delete this.lt[t])}},xt:function(t){"id"===t&&(this.lt[t]=(+new Date).toString(36))},dt:function(t,n,e){jQuery(e.target).closest(jQuery(t)).length||this.D(t,n)},ht:function(t,n,e){e.preventDefault(),e.currentTarget.classList.contains("active")?this.D(t,n):this.St(t,n)},vt:function(t,n,e){e.preventDefault(),this.current=e.currentTarget.dataset.shortcode,this.current&&(tinymce.get(window.wpActiveEditor)?this.bt():this.yt(),setTimeout(function(){this.D(t,n)}.bind(this),100))},St:function(t,n){jQuery(n).addClass("active"),jQuery(t).find(".glsr-mce-menu").show()},Qt:function(t){return[{classes:"btn glsr-btn primary",onclick:this.Ft.bind(this),text:t.ok},{onclick:"close",text:t.close}]},wt:function(t){return{title:t.title,body:t.body,classes:"glsr-mce-popup",minWidth:320,buttons:this.Qt(t),onsubmit:this.Ot.bind(this,t),onclose:this.gt.bind(this)}},Ot:function(t,n){var e="";for(var i in this._t(n.data),this.lt)this.lt.hasOwnProperty(i)&&""!==this.lt[i]&&(e+=" "+i+'="'+this.lt[i]+'"');window.send_to_editor("["+t.shortcode+e+"]")},Ft:function(){var t=this.editor.windowManager.getWindows()[0];this.Rt(t)&&t.submit()},Rt:function(t){var n,e=!0,i=GLSR.shortcodes[this.current];for(var r in i)if(i.hasOwnProperty(r)&&void 0!==(n=t.find("#"+r)[0])&&""===n.state.data.value){e=!1,alert(i[r]);break}return e}};var q=G,M=e(449),D=e.n(M),I=function(t){var n=document.querySelectorAll(t);n.length&&n.forEach(function(t){t.addEventListener("click",this.h)}.bind(this))};I.prototype={h:function(t){var n=t.currentTarget.href.match(/post=([0-9]+)/),e=t.currentTarget.href.match(/action=([a-z]+)/);if(null!==n&&null!==e){var i={_action:"toggle-status",_nonce:GLSR.nonce["toggle-status"],post_id:n[1],status:e[1]};new s(i,t).post((function(n){if(n.class){var e=jQuery(t.target);e.closest("tr").removeClass("status-pending status-publish").addClass(n.class),e.closest("td.column-title").find("strong").html(n.link),n.counts&&(e.closest(".wrap").find("ul.subsubsub").html(n.counts),jQuery("#menu-posts-site-review").find(".awaiting-mod").removeClass().addClass("awaiting-mod count-"+n.pending).find(".unapproved-count").html(n.pending))}}))}}};var B=I,U=function(){this.button=jQuery("button#sync-reviews"),this.progressbar=jQuery(".glsr-progress"),this.service=null,jQuery("form.glsr-form-sync").on("click","#sync-reviews",this.At.bind(this)),jQuery(document).on("wp-window-resized",this.zt),jQuery(window).on("hashchange",this.zt),this.zt()};U.prototype={Pt:function(t){jQuery(".service-"+this.service+" td.column-last_sync").text(t.last_sync),jQuery(".service-"+this.service+" td.column-total_fetched a").text(t.total),this.Lt(!1)},At:function(t){t.preventDefault(),this.service=jQuery('[name="'+GLSR.nameprefix+'[service]"]').val(),this.service&&(this.Lt(!0),this.$t())},zt:function(){var t=jQuery(".glsr-progress").width();t&&jQuery(".glsr-progress span").width(t)},$t:function(){var t={_action:"sync-reviews",service:this.service,stage:"fetch"};new s(t).post(this.Ct.bind(this))},Ct:function(t){var n={_action:"sync-reviews",job_id:t.job_id,service:this.service,stage:"progress"},e=t.finished?this.Tt.bind(this,t):this.Ct.bind(this);this.Et(t.message),this.Gt(t.percent),setTimeout((function(){new s(n).post(e)}),1500)},Tt:function(t){var n=0;try{n=t.meta.pagination.current_page}catch(t){}var e={_action:"sync-reviews",page:n+1,service:this.service,stage:"reviews"};this.Et(t.message),t.percent_synced&&t.percent_synced>=100?this.Pt(t):new s(e).post(this.Tt.bind(this))},Et:function(t){jQuery(".glsr-progress-status",this.progressbar).text(t)},Gt:function(t){t=(t||0)+"%",jQuery(".glsr-progress-bar",this.progressbar).outerWidth(t)},Lt:function(t){if(!0===t&&(this.Et(this.progressbar.data("active-text")),this.Gt(),this.button.prop("disabled",!0),window.requestAnimationFrame(function(){this.progressbar.addClass("active")}.bind(this))),!1===t)return this.service=null,this.button.prop("disabled",!1),void this.progressbar.removeClass("active");window.requestAnimationFrame(this.Lt.bind(this))}};var W=U,H=function(t){this.options=jQuery.extend({},this.defaults,t),this.active=document.querySelector("input[name=_active_tab]"),this.refererInputs=jQuery("input[name=_wp_http_referer]"),this.sections=document.querySelectorAll(this.options.viewSectionSelector),this.subsubsub=document.querySelectorAll(this.options.viewSubsubsub),this.tabs=document.querySelectorAll(this.options.tabSelector),this.views=document.querySelectorAll(this.options.viewSelector),this.active&&this.refererInputs.length&&this.tabs&&this.views&&this.m()};H.prototype={defaults:{smartLinks:".glsr-card a, #glsr-notices a",tabSelector:".glsr-nav-tab",viewSelector:".glsr-nav-view",viewSectionSelector:".glsr-nav-view-section",viewSubsubsub:".glsr-subsubsub a"},m:function(){var t=this;jQuery(this.options.tabSelector).each((function(n,e){var i=e.getAttribute("href"),r=t.qt(e,"tab"),o=t.Mt("tab");null===o&&0===n&&(o=r,history.replaceState({href:i,tab:r},"",i),t.refererInputs.val(i)),o===r&&t.Dt(r)})),jQuery(window).on("popstate",this.It.bind(this)),jQuery(this.options.smartLinks).on("click",this.Bt.bind(this)),jQuery(this.options.tabSelector+","+this.options.viewSubsubsub).on("click",this.h.bind(this))},h:function(t){var n=t.currentTarget,e=n.getAttribute("href"),i=this.qt(n,"tab");i&&(history.pushState({href:e,tab:i},"",e),this.refererInputs.val(e),this.Dt(i),t.preventDefault(),n.blur())},Bt:function(t){var n=t.currentTarget,e=this.Mt("page"),i=this.Mt("postType"),r=this.Mt("tab"),o=this.qt(n,"page"),s=this.qt(n,"postType"),a=this.qt(n,"tab");if(o===e&&s===i&&a){var u=n.getAttribute("href");history.pushState({href:u,tab:a},"",u),this.refererInputs.val(u),this.Dt(a),a!==r&&window.scrollTo(0,0),t.preventDefault()}},It:function(t){var n=t.originalEvent.state;n&&n.tab&&n.href&&(this.refererInputs.val(n.href),this.Dt(n.tab))},Ut:function(t){return t?"add":"remove"},qt:function(t,n){return new URLSearchParams(t.getAttribute("href")).get(n)},Mt:function(t){return new URLSearchParams(location.search).get(t)},Dt:function(t){for(var n=0;n<this.views.length;n++)if(t===this.views[n].id){this.Wt(this.tabs[n]);break}},Ht:function(){var t=this,n=0;[].forEach.call(this.subsubsub,(function(e,i){e.classList.remove("current"),t.qt(e,"sub")===t.Mt("sub")&&(n=i)})),this.subsubsub[n]&&this.subsubsub[n].classList.add("current"),[].forEach.call(this.sections,(function(e,i){var r=t.Ut(i!==n);e.classList[r]("ui-tabs-hide")}))},Wt:function(t){var n=this;[].forEach.call(this.tabs,(function(e,i){var r=n.Ut(e===t);"add"===r&&(n.active.value=n.views[i].id,n.Nt(i)),e.classList[r]("nav-tab-active")}))},Nt:function(t){var n=this;[].forEach.call(this.views,(function(e,i){var r=n.Ut(i!==t);e.classList[r]("ui-tabs-hide"),n.Ht()}))}};var N=H,V=function(){var t=document.querySelector("#contentdiv > textarea");t&&(this.Vt(t),jQuery(document).on("wp-window-resized.editor-expand",function(){this.Vt(t)}.bind(this)))};V.prototype={Vt:function(t){var n=t.scrollHeight>320?t.scrollHeight:320;t.style.height="auto",t.style.height=n+"px"}};var Z=V,K=function(){jQuery("form").on("click","#clear-console",this.Zt,this.h.bind(this)),jQuery("form").on("click","#fetch-console",this.Zt,this.h.bind(this)),jQuery("form").on("click","[data-ajax-click]",this.h.bind(this)),jQuery(".glsr-button").on("click",this.Kt);var t=jQuery("input[data-alt]");t.length&&(jQuery(document).on("keydown",this.Xt.bind(this,t)),jQuery(document).on("keyup",this.Yt.bind(this,t)))};K.prototype={Zt:function(t,n){n&&jQuery("#log-file").val(t.console)},h:function(t){var n=jQuery(t.currentTarget),e=this;n.addClass("is-busy"),new s({},t,n.closest("form")).post((function(i,r){"function"==typeof t.data&&t.data(i,r),n.get(0).hasAttribute("data-ajax-scroll")&&jQuery("html, body").animate({scrollTop:0},500),n.removeClass("is-busy"),n.closest("[data-ajax-hide]").css({backgroundColor:"rgba(74,184,102,.25)"}).fadeOut("normal",(function(){jQuery(this).remove()})),jQuery("#glsr-notices").on("click","a",e.Kt),jQuery('.glsr-notice[data-notice="'+n.data("remove-notice")+'"]').remove()}))},Xt:function(t,n){GLSR.keys.ALT!==n.keyCode||n.repeat||(t.closest("form").find("[data-alt-text]").addClass("alt"),t.val(1))},Yt:function(t,n){GLSR.keys.ALT===n.keyCode&&(t.closest("form").find("[data-alt-text]").removeClass("alt"),t.val(0))},Kt:function(t){var n=jQuery(t.currentTarget).data("expand");n&&localStorage.setItem("glsr-expand",n)}};var X=K;function Y(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function J(t){return t instanceof Y(t).Element||t instanceof Element}function tt(t){return t instanceof Y(t).HTMLElement||t instanceof HTMLElement}function nt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Y(t).ShadowRoot||t instanceof ShadowRoot)}var et=Math.round;function it(t,n){void 0===n&&(n=!1);var e=t.getBoundingClientRect(),i=1,r=1;if(tt(t)&&n){var o=t.offsetHeight,s=t.offsetWidth;s>0&&(i=e.width/s||1),o>0&&(r=e.height/o||1)}return{width:et(e.width/i),height:et(e.height/r),top:et(e.top/r),right:et(e.right/i),bottom:et(e.bottom/r),left:et(e.left/i),x:et(e.left/i),y:et(e.top/r)}}function rt(t){var n=Y(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function ot(t){return t?(t.nodeName||"").toLowerCase():null}function st(t){return((J(t)?t.ownerDocument:t.document)||window.document).documentElement}function at(t){return it(st(t)).left+rt(t).scrollLeft}function ut(t){return Y(t).getComputedStyle(t)}function ct(t){var n=ut(t),e=n.overflow,i=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+i)}function lt(t,n,e){void 0===e&&(e=!1);var i,r,o=tt(n),s=tt(n)&&function(t){var n=t.getBoundingClientRect(),e=n.width/t.offsetWidth||1,i=n.height/t.offsetHeight||1;return 1!==e||1!==i}(n),a=st(n),u=it(t,s),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!e)&&(("body"!==ot(n)||ct(a))&&(c=(i=n)!==Y(i)&&tt(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:rt(i)),tt(n)?((l=it(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):a&&(l.x=at(a))),{x:u.left+c.scrollLeft-l.x,y:u.top+c.scrollTop-l.y,width:u.width,height:u.height}}function ft(t){var n=it(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function dt(t){return"html"===ot(t)?t:t.assignedSlot||t.parentNode||(nt(t)?t.host:null)||st(t)}function ht(t){return["html","body","#document"].indexOf(ot(t))>=0?t.ownerDocument.body:tt(t)&&ct(t)?t:ht(dt(t))}function pt(t,n){var e;void 0===n&&(n=[]);var i=ht(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=Y(i),s=r?[o].concat(o.visualViewport||[],ct(i)?i:[]):i,a=n.concat(s);return r?a:a.concat(pt(dt(s)))}function vt(t){return["table","td","th"].indexOf(ot(t))>=0}function mt(t){return tt(t)&&"fixed"!==ut(t).position?t.offsetParent:null}function bt(t){for(var n=Y(t),e=mt(t);e&&vt(e)&&"static"===ut(e).position;)e=mt(e);return e&&("html"===ot(e)||"body"===ot(e)&&"static"===ut(e).position)?n:e||function(t){var n=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&tt(t)&&"fixed"===ut(t).position)return null;for(var e=dt(t);tt(e)&&["html","body"].indexOf(ot(e))<0;){var i=ut(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||n&&"filter"===i.willChange||n&&i.filter&&"none"!==i.filter)return e;e=e.parentNode}return null}(t)||n}var yt="top",gt="bottom",wt="right",_t="left",kt="auto",jt=[yt,gt,wt,_t],xt="start",St="end",Qt="viewport",Ft="popper",Ot=jt.reduce((function(t,n){return t.concat([n+"-"+xt,n+"-"+St])}),[]),Rt=[].concat(jt,[kt]).reduce((function(t,n){return t.concat([n,n+"-"+xt,n+"-"+St])}),[]),At=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function zt(t){var n=new Map,e=new Set,i=[];function r(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var i=n.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||r(t)})),i}var Pt={placement:"bottom",modifiers:[],strategy:"absolute"};function Lt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function $t(t){void 0===t&&(t={});var n=t,e=n.defaultModifiers,i=void 0===e?[]:e,r=n.defaultOptions,o=void 0===r?Pt:r;return function(t,n,e){void 0===e&&(e=o);var r,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Pt,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},u=[],c=!1,l={state:a,setOptions:function(e){var r="function"==typeof e?e(a.options):e;f(),a.options=Object.assign({},o,a.options,r),a.scrollParents={reference:J(t)?pt(t):t.contextElement?pt(t.contextElement):[],popper:pt(n)};var s=function(t){var n=zt(t);return At.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}(function(t){var n=t.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{});return Object.keys(n).map((function(t){return n[t]}))}([].concat(i,a.options.modifiers)));return a.orderedModifiers=s.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var n=t.name,e=t.options,i=void 0===e?{}:e,r=t.effect;if("function"==typeof r){var o=r({state:a,name:n,instance:l,options:i}),s=function(){};u.push(o||s)}})),l.update()},forceUpdate:function(){if(!c){var t=a.elements,n=t.reference,e=t.popper;if(Lt(n,e)){a.rects={reference:lt(n,bt(e),"fixed"===a.options.strategy),popper:ft(e)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],o=r.fn,s=r.options,u=void 0===s?{}:s,f=r.name;"function"==typeof o&&(a=o({state:a,options:u,name:f,instance:l})||a)}else a.reset=!1,i=-1}}},update:(r=function(){return new Promise((function(t){l.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(r())}))}))),s}),destroy:function(){f(),c=!0}};if(!Lt(t,n))return l;function f(){u.forEach((function(t){return t()})),u=[]}return l.setOptions(e).then((function(t){!c&&e.onFirstUpdate&&e.onFirstUpdate(t)})),l}}var Ct={passive:!0};var Tt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,s=i.resize,a=void 0===s||s,u=Y(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",e.update,Ct)})),a&&u.addEventListener("resize",e.update,Ct),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",e.update,Ct)})),a&&u.removeEventListener("resize",e.update,Ct)}},data:{}};function Et(t){return t.split("-")[0]}function Gt(t){return t.split("-")[1]}function qt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Mt(t){var n,e=t.reference,i=t.element,r=t.placement,o=r?Et(r):null,s=r?Gt(r):null,a=e.x+e.width/2-i.width/2,u=e.y+e.height/2-i.height/2;switch(o){case yt:n={x:a,y:e.y-i.height};break;case gt:n={x:a,y:e.y+e.height};break;case wt:n={x:e.x+e.width,y:u};break;case _t:n={x:e.x-i.width,y:u};break;default:n={x:e.x,y:e.y}}var c=o?qt(o):null;if(null!=c){var l="y"===c?"height":"width";switch(s){case xt:n[c]=n[c]-(e[l]/2-i[l]/2);break;case St:n[c]=n[c]+(e[l]/2-i[l]/2)}}return n}var Dt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state,e=t.name;n.modifiersData[e]=Mt({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},It=Math.max,Bt=Math.min,Ut=Math.round,Wt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ht(t){var n,e=t.popper,i=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,a=t.position,u=t.gpuAcceleration,c=t.adaptive,l=t.roundOffsets,f=!0===l?function(t){var n=t.x,e=t.y,i=window.devicePixelRatio||1;return{x:Ut(Ut(n*i)/i)||0,y:Ut(Ut(e*i)/i)||0}}(s):"function"==typeof l?l(s):s,d=f.x,h=void 0===d?0:d,p=f.y,v=void 0===p?0:p,m=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),y=_t,g=yt,w=window;if(c){var _=bt(e),k="clientHeight",j="clientWidth";_===Y(e)&&"static"!==ut(_=st(e)).position&&"absolute"===a&&(k="scrollHeight",j="scrollWidth"),_=_,r!==yt&&(r!==_t&&r!==wt||o!==St)||(g=gt,v-=_[k]-i.height,v*=u?1:-1),r!==_t&&(r!==yt&&r!==gt||o!==St)||(y=wt,h-=_[j]-i.width,h*=u?1:-1)}var x,S=Object.assign({position:a},c&&Wt);return u?Object.assign({},S,((x={})[g]=b?"0":"",x[y]=m?"0":"",x.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",x)):Object.assign({},S,((n={})[g]=b?v+"px":"",n[y]=m?h+"px":"",n.transform="",n))}var Nt={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},i=n.attributes[t]||{},r=n.elements[t];tt(r)&&ot(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(t){var n=i[t];!1===n?r.removeAttribute(t):r.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var i=n.elements[t],r=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});tt(i)&&ot(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Vt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.offset,o=void 0===r?[0,0]:r,s=Rt.reduce((function(t,e){return t[e]=function(t,n,e){var i=Et(t),r=[_t,yt].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[_t,wt].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(e,n.rects,o),t}),{}),a=s[n.placement],u=a.x,c=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=u,n.modifiersData.popperOffsets.y+=c),n.modifiersData[i]=s}},Zt={left:"right",right:"left",bottom:"top",top:"bottom"};function Kt(t){return t.replace(/left|right|bottom|top/g,(function(t){return Zt[t]}))}var Xt={start:"end",end:"start"};function Yt(t){return t.replace(/start|end/g,(function(t){return Xt[t]}))}function Jt(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&nt(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function tn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function nn(t,n){return n===Qt?tn(function(t){var n=Y(t),e=st(t),i=n.visualViewport,r=e.clientWidth,o=e.clientHeight,s=0,a=0;return i&&(r=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,a=i.offsetTop)),{width:r,height:o,x:s+at(t),y:a}}(t)):tt(n)?function(t){var n=it(t);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(n):tn(function(t){var n,e=st(t),i=rt(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=It(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=It(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+at(t),u=-i.scrollTop;return"rtl"===ut(r||e).direction&&(a+=It(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}(st(t)))}function en(t,n,e){var i="clippingParents"===n?function(t){var n=pt(dt(t)),e=["absolute","fixed"].indexOf(ut(t).position)>=0&&tt(t)?bt(t):t;return J(e)?n.filter((function(t){return J(t)&&Jt(t,e)&&"body"!==ot(t)})):[]}(t):[].concat(n),r=[].concat(i,[e]),o=r[0],s=r.reduce((function(n,e){var i=nn(t,e);return n.top=It(i.top,n.top),n.right=Bt(i.right,n.right),n.bottom=Bt(i.bottom,n.bottom),n.left=It(i.left,n.left),n}),nn(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function rn(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function on(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function sn(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=void 0===i?t.placement:i,o=e.boundary,s=void 0===o?"clippingParents":o,a=e.rootBoundary,u=void 0===a?Qt:a,c=e.elementContext,l=void 0===c?Ft:c,f=e.altBoundary,d=void 0!==f&&f,h=e.padding,p=void 0===h?0:h,v=rn("number"!=typeof p?p:on(p,jt)),m=l===Ft?"reference":Ft,b=t.rects.popper,y=t.elements[d?m:l],g=en(J(y)?y:y.contextElement||st(t.elements.popper),s,u),w=it(t.elements.reference),_=Mt({reference:w,element:b,strategy:"absolute",placement:r}),k=tn(Object.assign({},b,_)),j=l===Ft?k:w,x={top:g.top-j.top+v.top,bottom:j.bottom-g.bottom+v.bottom,left:g.left-j.left+v.left,right:j.right-g.right+v.right},S=t.modifiersData.offset;if(l===Ft&&S){var Q=S[r];Object.keys(x).forEach((function(t){var n=[wt,gt].indexOf(t)>=0?1:-1,e=[yt,gt].indexOf(t)>=0?"y":"x";x[t]+=Q[e]*n}))}return x}var an={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,u=e.fallbackPlacements,c=e.padding,l=e.boundary,f=e.rootBoundary,d=e.altBoundary,h=e.flipVariations,p=void 0===h||h,v=e.allowedAutoPlacements,m=n.options.placement,b=Et(m),y=u||(b===m||!p?[Kt(m)]:function(t){if(Et(t)===kt)return[];var n=Kt(t);return[Yt(t),n,Yt(n)]}(m)),g=[m].concat(y).reduce((function(t,e){return t.concat(Et(e)===kt?function(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=e.boundary,o=e.rootBoundary,s=e.padding,a=e.flipVariations,u=e.allowedAutoPlacements,c=void 0===u?Rt:u,l=Gt(i),f=l?a?Ot:Ot.filter((function(t){return Gt(t)===l})):jt,d=f.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=f);var h=d.reduce((function(n,e){return n[e]=sn(t,{placement:e,boundary:r,rootBoundary:o,padding:s})[Et(e)],n}),{});return Object.keys(h).sort((function(t,n){return h[t]-h[n]}))}(n,{placement:e,boundary:l,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:v}):e)}),[]),w=n.rects.reference,_=n.rects.popper,k=new Map,j=!0,x=g[0],S=0;S<g.length;S++){var Q=g[S],F=Et(Q),O=Gt(Q)===xt,R=[yt,gt].indexOf(F)>=0,A=R?"width":"height",z=sn(n,{placement:Q,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),P=R?O?wt:_t:O?gt:yt;w[A]>_[A]&&(P=Kt(P));var L=Kt(P),$=[];if(o&&$.push(z[F]<=0),a&&$.push(z[P]<=0,z[L]<=0),$.every((function(t){return t}))){x=Q,j=!1;break}k.set(Q,$)}if(j)for(var C=function(t){var n=g.find((function(n){var e=k.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return x=n,"break"},T=p?3:1;T>0;T--){if("break"===C(T))break}n.placement!==x&&(n.modifiersData[i]._skip=!0,n.placement=x,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function un(t,n,e){return It(t,Bt(n,e))}var cn={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,u=e.boundary,c=e.rootBoundary,l=e.altBoundary,f=e.padding,d=e.tether,h=void 0===d||d,p=e.tetherOffset,v=void 0===p?0:p,m=sn(n,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),b=Et(n.placement),y=Gt(n.placement),g=!y,w=qt(b),_="x"===w?"y":"x",k=n.modifiersData.popperOffsets,j=n.rects.reference,x=n.rects.popper,S="function"==typeof v?v(Object.assign({},n.rects,{placement:n.placement})):v,Q={x:0,y:0};if(k){if(o||a){var F="y"===w?yt:_t,O="y"===w?gt:wt,R="y"===w?"height":"width",A=k[w],z=k[w]+m[F],P=k[w]-m[O],L=h?-x[R]/2:0,$=y===xt?j[R]:x[R],C=y===xt?-x[R]:-j[R],T=n.elements.arrow,E=h&&T?ft(T):{width:0,height:0},G=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},q=G[F],M=G[O],D=un(0,j[R],E[R]),I=g?j[R]/2-L-D-q-S:$-D-q-S,B=g?-j[R]/2+L+D+M+S:C+D+M+S,U=n.elements.arrow&&bt(n.elements.arrow),W=U?"y"===w?U.clientTop||0:U.clientLeft||0:0,H=n.modifiersData.offset?n.modifiersData.offset[n.placement][w]:0,N=k[w]+I-H-W,V=k[w]+B-H;if(o){var Z=un(h?Bt(z,N):z,A,h?It(P,V):P);k[w]=Z,Q[w]=Z-A}if(a){var K="x"===w?yt:_t,X="x"===w?gt:wt,Y=k[_],J=Y+m[K],tt=Y-m[X],nt=un(h?Bt(J,N):J,Y,h?It(tt,V):tt);k[_]=nt,Q[_]=nt-Y}}n.modifiersData[i]=Q}},requiresIfExists:["offset"]};var ln={name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=Et(e.placement),u=qt(a),c=[_t,wt].indexOf(a)>=0?"height":"width";if(o&&s){var l=function(t,n){return rn("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:on(t,jt))}(r.padding,e),f=ft(o),d="y"===u?yt:_t,h="y"===u?gt:wt,p=e.rects.reference[c]+e.rects.reference[u]-s[u]-e.rects.popper[c],v=s[u]-e.rects.reference[u],m=bt(o),b=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,y=p/2-v/2,g=l[d],w=b-f[c]-l[h],_=b/2-f[c]/2+y,k=un(g,_,w),j=u;e.modifiersData[i]=((n={})[j]=k,n.centerOffset=k-_,n)}},effect:function(t){var n=t.state,e=t.options.element,i=void 0===e?"[data-popper-arrow]":e;null!=i&&("string"!=typeof i||(i=n.elements.popper.querySelector(i)))&&Jt(n.elements.popper,i)&&(n.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fn(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function dn(t){return[yt,wt,gt,_t].some((function(n){return t[n]>=0}))}var hn=$t({defaultModifiers:[Tt,Dt,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,s=void 0===o||o,a=e.roundOffsets,u=void 0===a||a,c={placement:Et(n.placement),variation:Gt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,Ht(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:s,roundOffsets:u})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,Ht(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},Nt,Vt,an,cn,ln,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,i=n.rects.reference,r=n.rects.popper,o=n.modifiersData.preventOverflow,s=sn(n,{elementContext:"reference"}),a=sn(n,{altBoundary:!0}),u=fn(s,i),c=fn(a,r,o),l=dn(u),f=dn(c);n.modifiersData[e]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),pn="tippy-content",vn="tippy-backdrop",mn="tippy-arrow",bn="tippy-svg-arrow",yn={passive:!0,capture:!0},gn=function(){return document.body};function wn(t,n,e){if(Array.isArray(t)){var i=t[n];return null==i?Array.isArray(e)?e[n]:e:i}return t}function _n(t,n){var e={}.toString.call(t);return 0===e.indexOf("[object")&&e.indexOf(n+"]")>-1}function kn(t,n){return"function"==typeof t?t.apply(void 0,n):t}function jn(t,n){return 0===n?t:function(i){clearTimeout(e),e=setTimeout((function(){t(i)}),n)};var e}function xn(t){return[].concat(t)}function Sn(t,n){-1===t.indexOf(n)&&t.push(n)}function Qn(t){return t.split("-")[0]}function Fn(t){return[].slice.call(t)}function On(){return document.createElement("div")}function Rn(t){return["Element","Fragment"].some((function(n){return _n(t,n)}))}function An(t){return _n(t,"MouseEvent")}function zn(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Pn(t){return Rn(t)?[t]:function(t){return _n(t,"NodeList")}(t)?Fn(t):Array.isArray(t)?t:Fn(document.querySelectorAll(t))}function Ln(t,n){t.forEach((function(t){t&&(t.style.transitionDuration=n+"ms")}))}function $n(t,n){t.forEach((function(t){t&&t.setAttribute("data-state",n)}))}function Cn(t){var n,e=xn(t)[0];return(null==e||null==(n=e.ownerDocument)?void 0:n.body)?e.ownerDocument:document}function Tn(t,n,e){var i=n+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(n){t[i](n,e)}))}function En(t,n){for(var e=n;e;){var i;if(t.contains(e))return!0;e=null==(i=null==e.getRootNode?void 0:e.getRootNode())?void 0:i.host}return!1}var Gn={isTouch:!1},qn=0;function Mn(){Gn.isTouch||(Gn.isTouch=!0,window.performance&&document.addEventListener("mousemove",Dn))}function Dn(){var t=performance.now();t-qn<20&&(Gn.isTouch=!1,document.removeEventListener("mousemove",Dn)),qn=t}function In(){var t=document.activeElement;if(zn(t)){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Bn=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Un={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Wn=Object.assign({appendTo:gn,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Un,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Hn=Object.keys(Wn);function Nn(t){var n=(t.plugins||[]).reduce((function(n,e){var i,r=e.name,o=e.defaultValue;r&&(n[r]=void 0!==t[r]?t[r]:null!=(i=Wn[r])?i:o);return n}),{});return Object.assign({},t,{},n)}function Vn(t,n){var e=Object.assign({},n,{content:kn(n.content,[t])},n.ignoreAttributes?{}:function(t,n){return(n?Object.keys(Nn(Object.assign({},Wn,{plugins:n}))):Hn).reduce((function(n,e){var i=(t.getAttribute("data-tippy-"+e)||"").trim();if(!i)return n;if("content"===e)n[e]=i;else try{n[e]=JSON.parse(i)}catch(t){n[e]=i}return n}),{})}(t,n.plugins));return e.aria=Object.assign({},Wn.aria,{},e.aria),e.aria={expanded:"auto"===e.aria.expanded?n.interactive:e.aria.expanded,content:"auto"===e.aria.content?n.interactive?null:"describedby":e.aria.content},e}function Zn(t,n){t.innerHTML=n}function Kn(t){var n=On();return!0===t?n.className=mn:(n.className=bn,Rn(t)?n.appendChild(t):Zn(n,t)),n}function Xn(t,n){Rn(n.content)?(Zn(t,""),t.appendChild(n.content)):"function"!=typeof n.content&&(n.allowHTML?Zn(t,n.content):t.textContent=n.content)}function Yn(t){var n=t.firstElementChild,e=Fn(n.children);return{box:n,content:e.find((function(t){return t.classList.contains(pn)})),arrow:e.find((function(t){return t.classList.contains(mn)||t.classList.contains(bn)})),backdrop:e.find((function(t){return t.classList.contains(vn)}))}}function Jn(t){var n=On(),e=On();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=On();function r(e,i){var r=Yn(n),o=r.box,s=r.content,a=r.arrow;i.theme?o.setAttribute("data-theme",i.theme):o.removeAttribute("data-theme"),"string"==typeof i.animation?o.setAttribute("data-animation",i.animation):o.removeAttribute("data-animation"),i.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?o.setAttribute("role",i.role):o.removeAttribute("role"),e.content===i.content&&e.allowHTML===i.allowHTML||Xn(s,t.props),i.arrow?a?e.arrow!==i.arrow&&(o.removeChild(a),o.appendChild(Kn(i.arrow))):o.appendChild(Kn(i.arrow)):a&&o.removeChild(a)}return i.className=pn,i.setAttribute("data-state","hidden"),Xn(i,t.props),n.appendChild(e),e.appendChild(i),r(t.props,t.props),{popper:n,onUpdate:r}}Jn.$$tippy=!0;var te=1,ne=[],ee=[];function ie(t,n){var e,i,r,o,s,a,u,c,l,f=Vn(t,Object.assign({},Wn,{},Nn((e=n,Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{}))))),d=!1,h=!1,p=!1,v=!1,m=[],b=jn(V,f.interactiveDebounce),y=te++,g=(l=f.plugins).filter((function(t,n){return l.indexOf(t)===n})),w={id:y,reference:t,popper:On(),popperInstance:null,props:f,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(n){0;if(w.state.isDestroyed)return;$("onBeforeUpdate",[w,n]),H();var e=w.props,i=Vn(t,Object.assign({},w.props,{},n,{ignoreAttributes:!0}));w.props=i,W(),e.interactiveDebounce!==i.interactiveDebounce&&(E(),b=jn(V,i.interactiveDebounce));e.triggerTarget&&!i.triggerTarget?xn(e.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):i.triggerTarget&&t.removeAttribute("aria-expanded");T(),L(),j&&j(e,i);w.popperInstance&&(Y(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));$("onAfterUpdate",[w,n])},setContent:function(t){w.setProps({content:t})},show:function(){0;var t=w.state.isVisible,n=w.state.isDestroyed,e=!w.state.isEnabled,i=Gn.isTouch&&!w.props.touch,r=wn(w.props.duration,0,Wn.duration);if(t||n||e||i)return;if(R().hasAttribute("disabled"))return;if($("onShow",[w],!1),!1===w.props.onShow(w))return;w.state.isVisible=!0,O()&&(k.style.visibility="visible");L(),D(),w.state.isMounted||(k.style.transition="none");if(O()){var o=z(),s=o.box,a=o.content;Ln([s,a],0)}u=function(){var t;if(w.state.isVisible&&!v){if(v=!0,k.offsetHeight,k.style.transition=w.props.moveTransition,O()&&w.props.animation){var n=z(),e=n.box,i=n.content;Ln([e,i],r),$n([e,i],"visible")}C(),T(),Sn(ee,w),null==(t=w.popperInstance)||t.forceUpdate(),w.state.isMounted=!0,$("onMount",[w]),w.props.animation&&O()&&function(t,n){B(t,n)}(r,(function(){w.state.isShown=!0,$("onShown",[w])}))}},function(){var t,n=w.props.appendTo,e=R();t=w.props.interactive&&n===gn||"parent"===n?e.parentNode:kn(n,[e]);t.contains(k)||t.appendChild(k);Y(),!1}()},hide:function(){0;var t=!w.state.isVisible,n=w.state.isDestroyed,e=!w.state.isEnabled,i=wn(w.props.duration,1,Wn.duration);if(t||n||e)return;if($("onHide",[w],!1),!1===w.props.onHide(w))return;w.state.isVisible=!1,w.state.isShown=!1,v=!1,d=!1,O()&&(k.style.visibility="hidden");if(E(),I(),L(),O()){var r=z(),o=r.box,s=r.content;w.props.animation&&(Ln([o,s],i),$n([o,s],"hidden"))}C(),T(),w.props.animation?O()&&function(t,n){B(t,(function(){!w.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&n()}))}(i,w.unmount):w.unmount()},hideWithInteractivity:function(t){0;A().addEventListener("mousemove",b),Sn(ne,b),b(t)},enable:function(){w.state.isEnabled=!0},disable:function(){w.hide(),w.state.isEnabled=!1},unmount:function(){0;w.state.isVisible&&w.hide();if(!w.state.isMounted)return;J(),tt().forEach((function(t){t._tippy.unmount()})),k.parentNode&&k.parentNode.removeChild(k);ee=ee.filter((function(t){return t!==w})),w.state.isMounted=!1,$("onHidden",[w])},destroy:function(){0;if(w.state.isDestroyed)return;w.clearDelayTimeouts(),w.unmount(),H(),delete t._tippy,w.state.isDestroyed=!0,$("onDestroy",[w])}};if(!f.render)return w;var _=f.render(w),k=_.popper,j=_.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+w.id,w.popper=k,t._tippy=w,k._tippy=w;var x=g.map((function(t){return t.fn(w)})),S=t.hasAttribute("aria-expanded");return W(),T(),L(),$("onCreate",[w]),f.showOnCreate&&nt(),k.addEventListener("mouseenter",(function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()})),k.addEventListener("mouseleave",(function(t){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&(A().addEventListener("mousemove",b),b(t))})),w;function Q(){var t=w.props.touch;return Array.isArray(t)?t:[t,0]}function F(){return"hold"===Q()[0]}function O(){var t;return!!(null==(t=w.props.render)?void 0:t.$$tippy)}function R(){return c||t}function A(){var t=R().parentNode;return t?Cn(t):document}function z(){return Yn(k)}function P(t){return w.state.isMounted&&!w.state.isVisible||Gn.isTouch||s&&"focus"===s.type?0:wn(w.props.delay,t?0:1,Wn.delay)}function L(){k.style.pointerEvents=w.props.interactive&&w.state.isVisible?"":"none",k.style.zIndex=""+w.props.zIndex}function $(t,n,e){var i;(void 0===e&&(e=!0),x.forEach((function(e){e[t]&&e[t].apply(void 0,n)})),e)&&(i=w.props)[t].apply(i,n)}function C(){var n=w.props.aria;if(n.content){var e="aria-"+n.content,i=k.id;xn(w.props.triggerTarget||t).forEach((function(t){var n=t.getAttribute(e);if(w.state.isVisible)t.setAttribute(e,n?n+" "+i:i);else{var r=n&&n.replace(i,"").trim();r?t.setAttribute(e,r):t.removeAttribute(e)}}))}}function T(){!S&&w.props.aria.expanded&&xn(w.props.triggerTarget||t).forEach((function(t){w.props.interactive?t.setAttribute("aria-expanded",w.state.isVisible&&t===R()?"true":"false"):t.removeAttribute("aria-expanded")}))}function E(){A().removeEventListener("mousemove",b),ne=ne.filter((function(t){return t!==b}))}function G(t){if(!Gn.isTouch||!p&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!w.props.interactive||!En(k,n)){if(En(R(),n)){if(Gn.isTouch)return;if(w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else $("onClickOutside",[w,t]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),h=!0,setTimeout((function(){h=!1})),w.state.isMounted||I())}}}function q(){p=!0}function M(){p=!1}function D(){var t=A();t.addEventListener("mousedown",G,!0),t.addEventListener("touchend",G,yn),t.addEventListener("touchstart",M,yn),t.addEventListener("touchmove",q,yn)}function I(){var t=A();t.removeEventListener("mousedown",G,!0),t.removeEventListener("touchend",G,yn),t.removeEventListener("touchstart",M,yn),t.removeEventListener("touchmove",q,yn)}function B(t,n){var e=z().box;function i(t){t.target===e&&(Tn(e,"remove",i),n())}if(0===t)return n();Tn(e,"remove",a),Tn(e,"add",i),a=i}function U(n,e,i){void 0===i&&(i=!1),xn(w.props.triggerTarget||t).forEach((function(t){t.addEventListener(n,e,i),m.push({node:t,eventType:n,handler:e,options:i})}))}function W(){var t;F()&&(U("touchstart",N,{passive:!0}),U("touchend",Z,{passive:!0})),(t=w.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(U(t,N),t){case"mouseenter":U("mouseleave",Z);break;case"focus":U(Bn?"focusout":"blur",K);break;case"focusin":U("focusout",K)}}))}function H(){m.forEach((function(t){var n=t.node,e=t.eventType,i=t.handler,r=t.options;n.removeEventListener(e,i,r)})),m=[]}function N(t){var n,e=!1;if(w.state.isEnabled&&!X(t)&&!h){var i="focus"===(null==(n=s)?void 0:n.type);s=t,c=t.currentTarget,T(),!w.state.isVisible&&An(t)&&ne.forEach((function(n){return n(t)})),"click"===t.type&&(w.props.trigger.indexOf("mouseenter")<0||d)&&!1!==w.props.hideOnClick&&w.state.isVisible?e=!0:nt(t),"click"===t.type&&(d=!e),e&&!i&&et(t)}}function V(t){var n=t.target,e=R().contains(n)||k.contains(n);if("mousemove"!==t.type||!e){var i=tt().concat(k).map((function(t){var n,e=null==(n=t._tippy.popperInstance)?void 0:n.state;return e?{popperRect:t.getBoundingClientRect(),popperState:e,props:f}:null})).filter(Boolean);(function(t,n){var e=n.clientX,i=n.clientY;return t.every((function(t){var n=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=Qn(r.placement),a=r.modifiersData.offset;if(!a)return!0;var u="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,l="right"===s?a.left.x:0,f="left"===s?a.right.x:0,d=n.top-i+u>o,h=i-n.bottom-c>o,p=n.left-e+l>o,v=e-n.right-f>o;return d||h||p||v}))})(i,t)&&(E(),et(t))}}function Z(t){X(t)||w.props.trigger.indexOf("click")>=0&&d||(w.props.interactive?w.hideWithInteractivity(t):et(t))}function K(t){w.props.trigger.indexOf("focusin")<0&&t.target!==R()||w.props.interactive&&t.relatedTarget&&k.contains(t.relatedTarget)||et(t)}function X(t){return!!Gn.isTouch&&F()!==t.type.indexOf("touch")>=0}function Y(){J();var n=w.props,e=n.popperOptions,i=n.placement,r=n.offset,o=n.getReferenceClientRect,s=n.moveTransition,a=O()?Yn(k).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||R()}:t,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var n=t.state;if(O()){var e=z().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?e.setAttribute("data-placement",n.placement):n.attributes.popper["data-popper-"+t]?e.setAttribute("data-"+t,""):e.removeAttribute("data-"+t)})),n.attributes.popper={}}}},f=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},l];O()&&a&&f.push({name:"arrow",options:{element:a,padding:3}}),f.push.apply(f,(null==e?void 0:e.modifiers)||[]),w.popperInstance=hn(c,k,Object.assign({},e,{placement:i,onFirstUpdate:u,modifiers:f}))}function J(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function tt(){return Fn(k.querySelectorAll("[data-tippy-root]"))}function nt(t){w.clearDelayTimeouts(),t&&$("onTrigger",[w,t]),D();var n=P(!0),e=Q(),r=e[0],o=e[1];Gn.isTouch&&"hold"===r&&o&&(n=o),n?i=setTimeout((function(){w.show()}),n):w.show()}function et(t){if(w.clearDelayTimeouts(),$("onUntrigger",[w,t]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var n=P(!1);n?r=setTimeout((function(){w.state.isVisible&&w.hide()}),n):o=requestAnimationFrame((function(){w.hide()}))}}else I()}}function re(t,n){void 0===n&&(n={});var e=Wn.plugins.concat(n.plugins||[]);document.addEventListener("touchstart",Mn,yn),window.addEventListener("blur",In);var i=Object.assign({},n,{plugins:e}),r=Pn(t).reduce((function(t,n){var e=n&&ie(n,i);return e&&t.push(e),t}),[]);return Rn(t)?r[0]:r}re.defaultProps=Wn,re.setDefaultProps=function(t){Object.keys(t).forEach((function(n){Wn[n]=t[n]}))},re.currentInput=Gn;Object.assign({},Nt,{effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow)}});var oe={clientX:0,clientY:0},se=[];function ae(t){var n=t.clientX,e=t.clientY;oe={clientX:n,clientY:e}}var ue={name:"followCursor",defaultValue:!1,fn:function(t){var n=t.reference,e=Cn(t.props.triggerTarget||n),i=!1,r=!1,o=!0,s=t.props;function a(){return"initial"===t.props.followCursor&&t.state.isVisible}function u(){e.addEventListener("mousemove",f)}function c(){e.removeEventListener("mousemove",f)}function l(){i=!0,t.setProps({getReferenceClientRect:null}),i=!1}function f(e){var i=!e.target||n.contains(e.target),r=t.props.followCursor,o=e.clientX,s=e.clientY,a=n.getBoundingClientRect(),u=o-a.left,c=s-a.top;!i&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=n.getBoundingClientRect(),e=o,i=s;"initial"===r&&(e=t.left+u,i=t.top+c);var a="horizontal"===r?t.top:i,l="vertical"===r?t.right:e,f="horizontal"===r?t.bottom:i,d="vertical"===r?t.left:e;return{width:l-d,height:f-a,top:a,right:l,bottom:f,left:d}}})}function d(){t.props.followCursor&&(se.push({instance:t,doc:e}),function(t){t.addEventListener("mousemove",ae)}(e))}function h(){0===(se=se.filter((function(n){return n.instance!==t}))).filter((function(t){return t.doc===e})).length&&function(t){t.removeEventListener("mousemove",ae)}(e)}return{onCreate:d,onDestroy:h,onBeforeUpdate:function(){s=t.props},onAfterUpdate:function(n,e){var o=e.followCursor;i||void 0!==o&&s.followCursor!==o&&(h(),o?(d(),!t.state.isMounted||r||a()||u()):(c(),l()))},onMount:function(){t.props.followCursor&&!r&&(o&&(f(oe),o=!1),a()||u())},onTrigger:function(t,n){An(n)&&(oe={clientX:n.clientX,clientY:n.clientY}),r="focus"===n.type},onHidden:function(){t.props.followCursor&&(l(),c(),o=!0)}}}};re.setDefaultProps({render:Jn});var ce=re;GLSR.autosize=d,GLSR.keys={ALT:18,DOWN:40,ENTER:13,ESC:27,SPACE:32,UP:38},GLSR.Event=y,GLSR.Tippy={tippy:ce,plugins:{followCursor:ue}},jQuery((function(t){L().highlightAll(),GLSR.notices=new F,GLSR.shortcode=new q(".glsr-mce"),GLSR.stars=new(D())("select.glsr-star-rating",{tooltip:!1}),GLSR.Tippy.tippy(".glsr-tooltip",{appendTo:function(){return document.body}}),t(".glsr-tooltip").each((function(t,n){var e=n.dataset.tippyContent,i=n.dataset.syntax;n._tippy&&e&&i&&L().languages[i]&&n._tippy.setContent('<pre class="language-'+i+'"><code>'+L().highlight(e,L().languages[i],i)+"</code></pre>")})),p(),new w,new j("form.glsr-form"),new S,new R,new z,new C("#glsr-search-posts",{action:"search-posts",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.rt.bind(this))},onResultClick:function(n){var e=t(n.currentTarget),i=wp.template("glsr-assigned-posts"),r={id:e.data("id"),name:"post_ids[]",url:e.data("url"),title:e.text()};if(i){var o=t(i(r));o.find(".glsr-remove-button").on("click",this.rt.bind(this)),this.el.find(".glsr-selected-entries").append(o),this.it()}this.options.searchEl.focus()}}),new C("#glsr-search-users",{action:"search-users",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.rt.bind(this))},onResultClick:function(n){var e=t(n.currentTarget),i=wp.template("glsr-assigned-users"),r={id:e.data("id"),name:"user_ids[]",url:e.data("url"),title:e.text()};if(i){var o=t(i(r));o.find(".glsr-remove-button").on("click",this.rt.bind(this)),this.el.find(".glsr-selected-entries").append(o),this.it()}this.options.searchEl.focus()}}),new C("#glsr-search-translations",{action:"search-translations",onInit:function(){this.tt()},onResultClick:function(n){var e=t(n.currentTarget),i=e.data("entry"),r=wp.template("glsr-string-"+(i.p1?"plural":"single"));i.index=this.options.entriesEl.children().length,i.prefix=this.options.resultsEl.data("prefix"),r&&(this.options.entriesEl.append(r(i)),this.options.exclude.push({id:i.id}),this.options.results=this.options.results.filter((function(t,n){return n!==e.get(0)}))),this.X()}}),new B("a.glsr-toggle-status"),new E,new N,new Z,new X,new W;var n,e=function(){this.dataset.glsrTrack=this.value};t("select[data-glsr-track]").each(e),t("select[data-glsr-track]").on("change",e),t(".glsr-card.postbox:not(.open)").addClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!1).closest(".glsr-nav-view").addClass("collapsed"),t(".glsr-support-step").not(":checked").length<1&&t(".glsr-card-result").removeClass("hidden"),t(".glsr-support-step").on("change",(function(){var n=t(".glsr-support-step").not(":checked").length>0?"add":"remove";t(".glsr-card-result")[n+"Class"]("hidden")})),t(".glsr-card.postbox .glsr-card-heading").on("click",(function(){var n=t(this).parent(),e=n.closest(".glsr-nav-view"),i=n.hasClass("closed")?"remove":"add";n[i+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==i),i=e.find(".glsr-card.postbox").not(".closed").length>0?"remove":"add",e[i+"Class"]("collapsed")})),t(".post-type-site-review #the-list").on("click",".editinline",(function(){var n=t(this).closest("tr");t(':input[data-name="post_content"]').val(""),t(':input[name="_response"]').val(""),setTimeout((function(){t(':input[data-name="post_content"]').val(n.find("._post_content").text()),t(':input[name="_response"]').val(n.find("._response").text())}),50)})),"no"===GLSR.isLicensed&&jQuery(".post-type-site-review.edit-php .page-title-action").after('<a href="'+GLSR.premiumurl+'" id="glsr-premium-button" class="page-title-action">'+GLSR.text.premium+"</a>"),n=GLSR.text.rate,jQuery("#footer-left",".post-type-site-review, .post-type-site-review-form, .post-type-site-review-theme, .dashboard_page_site-reviews-welcome").html(n.replace("%s",'<strong>Site Reviews</strong> <a href="https://wordpress.org/support/view/plugin-reviews/site-reviews?filter=5#new-post" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a>').replace("%s",'<a href="https://wordpress.org/support/view/plugin-reviews/site-reviews?filter=5#new-post" target="_blank">wordpress.org</a>'))}));var le=function(t){[].forEach.call(document.querySelectorAll('[data-type="site-reviews/'.concat(t,'"] .glsr')),(function(t){var n="glsr-"+window.getComputedStyle(t,null).getPropertyValue("direction");t.classList.add(n)}))};y.on("site-reviews/form",(function(t,n){_.isEmpty(t)||t.error||(le("form"),GLSR.stars=new(D())("select.glsr-star-rating",{tooltip:!1}))})),y.on("site-reviews/reviews",(function(t,n){_.isEmpty(t)||t.error||le("reviews")})),y.on("site-reviews/summary",(function(t,n){_.isEmpty(t)||t.error||le("summary")}))}()}();
1
  /*! For license information please see site-reviews-admin.js.LICENSE.txt */
2
+ !function(){var t={433:function(){Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},325:function(t,n,e){var i=function(t){var n=/\blang(?:uage)?-([\w-]+)\b/i,e=0,i={},r={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(n){return n instanceof o?new o(n.type,t(n.content),n.alias):Array.isArray(n)?n.map(t):n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).slice(8,-1)},objId:function(t){return t.__id||Object.defineProperty(t,"__id",{value:++e}),t.__id},clone:function t(n,e){var i,o;switch(e=e||{},r.util.type(n)){case"Object":if(o=r.util.objId(n),e[o])return e[o];for(var s in i={},e[o]=i,n)n.hasOwnProperty(s)&&(i[s]=t(n[s],e));return i;case"Array":return o=r.util.objId(n),e[o]?e[o]:(i=[],e[o]=i,n.forEach((function(n,r){i[r]=t(n,e)})),i);default:return n}},getLanguage:function(t){for(;t&&!n.test(t.className);)t=t.parentElement;return t?(t.className.match(n)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(i){var t=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(i.stack)||[])[1];if(t){var n=document.getElementsByTagName("script");for(var e in n)if(n[e].src==t)return n[e]}return null}},isActive:function(t,n,e){for(var i="no-"+n;t;){var r=t.classList;if(r.contains(n))return!0;if(r.contains(i))return!1;t=t.parentElement}return!!e}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(t,n){var e=r.util.clone(r.languages[t]);for(var i in n)e[i]=n[i];return e},insertBefore:function(t,n,e,i){var o=(i=i||r.languages)[t],s={};for(var a in o)if(o.hasOwnProperty(a)){if(a==n)for(var u in e)e.hasOwnProperty(u)&&(s[u]=e[u]);e.hasOwnProperty(a)||(s[a]=o[a])}var c=i[t];return i[t]=s,r.languages.DFS(r.languages,(function(n,e){e===c&&n!=t&&(this[n]=s)})),s},DFS:function t(n,e,i,o){o=o||{};var s=r.util.objId;for(var a in n)if(n.hasOwnProperty(a)){e.call(n,a,n[a],i||a);var u=n[a],c=r.util.type(u);"Object"!==c||o[s(u)]?"Array"!==c||o[s(u)]||(o[s(u)]=!0,t(u,e,a,o)):(o[s(u)]=!0,t(u,e,null,o))}}},plugins:{},highlightAll:function(t,n){r.highlightAllUnder(document,t,n)},highlightAllUnder:function(t,n,e){var i={callback:e,container:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",i),i.elements=Array.prototype.slice.apply(i.container.querySelectorAll(i.selector)),r.hooks.run("before-all-elements-highlight",i);for(var o,s=0;o=i.elements[s++];)r.highlightElement(o,!0===n,i.callback)},highlightElement:function(e,i,o){var s=r.util.getLanguage(e),a=r.languages[s];e.className=e.className.replace(n,"").replace(/\s+/g," ")+" language-"+s;var u=e.parentElement;u&&"pre"===u.nodeName.toLowerCase()&&(u.className=u.className.replace(n,"").replace(/\s+/g," ")+" language-"+s);var c={element:e,language:s,grammar:a,code:e.textContent};function l(t){c.highlightedCode=t,r.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,r.hooks.run("after-highlight",c),r.hooks.run("complete",c),o&&o.call(c.element)}if(r.hooks.run("before-sanity-check",c),(u=c.element.parentElement)&&"pre"===u.nodeName.toLowerCase()&&!u.hasAttribute("tabindex")&&u.setAttribute("tabindex","0"),!c.code)return r.hooks.run("complete",c),void(o&&o.call(c.element));if(r.hooks.run("before-highlight",c),c.grammar)if(i&&t.Worker){var f=new Worker(r.filename);f.onmessage=function(t){l(t.data)},f.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(r.highlight(c.code,c.grammar,c.language));else l(r.util.encode(c.code))},highlight:function(t,n,e){var i={code:t,grammar:n,language:e};return r.hooks.run("before-tokenize",i),i.tokens=r.tokenize(i.code,i.grammar),r.hooks.run("after-tokenize",i),o.stringify(r.util.encode(i.tokens),i.language)},tokenize:function(t,n){var e=n.rest;if(e){for(var i in e)n[i]=e[i];delete n.rest}var r=new u;return c(r,r.head,t),a(t,r,n,r.head,0),function(t){var n=[],e=t.head.next;for(;e!==t.tail;)n.push(e.value),e=e.next;return n}(r)},hooks:{all:{},add:function(t,n){var e=r.hooks.all;e[t]=e[t]||[],e[t].push(n)},run:function(t,n){var e=r.hooks.all[t];if(e&&e.length)for(var i,o=0;i=e[o++];)i(n)}},Token:o};function o(t,n,e,i){this.type=t,this.content=n,this.alias=e,this.length=0|(i||"").length}function s(t,n,e,i){t.lastIndex=n;var r=t.exec(e);if(r&&i&&r[1]){var o=r[1].length;r.index+=o,r[0]=r[0].slice(o)}return r}function a(t,n,e,i,u,f){for(var d in e)if(e.hasOwnProperty(d)&&e[d]){var h=e[d];h=Array.isArray(h)?h:[h];for(var p=0;p<h.length;++p){if(f&&f.cause==d+","+p)return;var v=h[p],m=v.inside,b=!!v.lookbehind,y=!!v.greedy,g=v.alias;if(y&&!v.pattern.global){var w=v.pattern.toString().match(/[imsuy]*$/)[0];v.pattern=RegExp(v.pattern.source,w+"g")}for(var _=v.pattern||v,k=i.next,j=u;k!==n.tail&&!(f&&j>=f.reach);j+=k.value.length,k=k.next){var x=k.value;if(n.length>t.length)return;if(!(x instanceof o)){var S,Q=1;if(y){if(!(S=s(_,j,t,b)))break;var F=S.index,O=S.index+S[0].length,R=j;for(R+=k.value.length;F>=R;)R+=(k=k.next).value.length;if(j=R-=k.value.length,k.value instanceof o)continue;for(var A=k;A!==n.tail&&(R<O||"string"==typeof A.value);A=A.next)Q++,R+=A.value.length;Q--,x=t.slice(j,R),S.index-=j}else if(!(S=s(_,0,x,b)))continue;F=S.index;var z=S[0],P=x.slice(0,F),L=x.slice(F+z.length),$=j+x.length;f&&$>f.reach&&(f.reach=$);var C=k.prev;if(P&&(C=c(n,C,P),j+=P.length),l(n,C,Q),k=c(n,C,new o(d,m?r.tokenize(z,m):z,g,z)),L&&c(n,k,L),Q>1){var T={cause:d+","+p,reach:$};a(t,n,e,k.prev,j,T),f&&T.reach>f.reach&&(f.reach=T.reach)}}}}}}function u(){var t={value:null,prev:null,next:null},n={value:null,prev:t,next:null};t.next=n,this.head=t,this.tail=n,this.length=0}function c(t,n,e){var i=n.next,r={value:e,prev:n,next:i};return n.next=r,i.prev=r,t.length++,r}function l(t,n,e){for(var i=n.next,r=0;r<e&&i!==t.tail;r++)i=i.next;n.next=i,i.prev=n,t.length-=r}if(t.Prism=r,o.stringify=function t(n,e){if("string"==typeof n)return n;if(Array.isArray(n)){var i="";return n.forEach((function(n){i+=t(n,e)})),i}var o={type:n.type,content:t(n.content,e),tag:"span",classes:["token",n.type],attributes:{},language:e},s=n.alias;s&&(Array.isArray(s)?Array.prototype.push.apply(o.classes,s):o.classes.push(s)),r.hooks.run("wrap",o);var a="";for(var u in o.attributes)a+=" "+u+'="'+(o.attributes[u]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+a+">"+o.content+"</"+o.tag+">"},!t.document)return t.addEventListener?(r.disableWorkerMessageHandler||t.addEventListener("message",(function(n){var e=JSON.parse(n.data),i=e.language,o=e.code,s=e.immediateClose;t.postMessage(r.highlight(o,r.languages[i],i)),s&&t.close()}),!1),r):r;var f=r.util.currentScript();function d(){r.manual||r.highlightAll()}if(f&&(r.filename=f.src,f.hasAttribute("data-manual")&&(r.manual=!0)),!r.manual){var h=document.readyState;"loading"===h||"interactive"===h&&f&&f.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return r}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});t.exports&&(t.exports=i),void 0!==e.g&&(e.g.Prism=i)},251:function(){!function(t){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var e=t.languages.markup;e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))}(Prism)},980:function(){Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript},854:function(){!function(t){function n(t,n){return"___"+t.toUpperCase()+n+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(e,i,r,o){if(e.language===i){var s=e.tokenStack=[];e.code=e.code.replace(r,(function(t){if("function"==typeof o&&!o(t))return t;for(var r,a=s.length;-1!==e.code.indexOf(r=n(i,a));)++a;return s[a]=t,r})),e.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(e,i){if(e.language===i&&e.tokenStack){e.grammar=t.languages[i];var r=0,o=Object.keys(e.tokenStack);!function s(a){for(var u=0;u<a.length&&!(r>=o.length);u++){var c=a[u];if("string"==typeof c||c.content&&"string"==typeof c.content){var l=o[r],f=e.tokenStack[l],d="string"==typeof c?c:c.content,h=n(i,l),p=d.indexOf(h);if(p>-1){++r;var v=d.substring(0,p),m=new t.Token(i,t.tokenize(f,e.grammar),"language-"+i,f),b=d.substring(p+h.length),y=[];v&&y.push.apply(y,s([v])),y.push(m),b&&y.push.apply(y,s([b])),"string"==typeof c?a.splice.apply(a,[u,1].concat(y)):c.content=y}}else c.content&&s(c.content)}return a}(e.tokens)}}}})}(Prism)},335:function(){Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var e={};e["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},e.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:e}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var r={};r[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,n){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:Prism.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml},945:function(){!function(t){var n=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,e=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,r=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:n,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[\w|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:e,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:r,punctuation:o};var s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:t.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}];t.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:n,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:e,number:i,operator:r,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",(function(n){if(/<\?/.test(n.code)){t.languages["markup-templating"].buildPlaceholders(n,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}})),t.hooks.add("after-tokenize",(function(n){t.languages["markup-templating"].tokenizePlaceholders(n,"php")}))}(Prism)},759:function(){!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var t="line-numbers",n=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(n,e){if("PRE"===n.tagName&&n.classList.contains(t)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,o=r+(i.children.length-1);e<r&&(e=r),e>o&&(e=o);var s=e-r;return i.children[s]}}},resize:function(t){r([t])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",(function(){e.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(e){if(e.code){var i=e.element,o=i.parentNode;if(o&&/pre/i.test(o.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,t)){i.classList.remove(t),o.classList.add(t);var s,a=e.code.match(n),u=a?a.length+1:1,c=new Array(u+1).join("<span></span>");(s=document.createElement("span")).setAttribute("aria-hidden","true"),s.className="line-numbers-rows",s.innerHTML=c,o.hasAttribute("data-start")&&(o.style.counterReset="linenumber "+(parseInt(o.getAttribute("data-start"),10)-1)),e.element.appendChild(s),r([o]),Prism.hooks.run("line-numbers",e)}}})),Prism.hooks.add("line-numbers",(function(t){t.plugins=t.plugins||{},t.plugins.lineNumbers=!0}))}function r(t){if(0!=(t=t.filter((function(t){var n=function(t){if(!t)return null;return window.getComputedStyle?getComputedStyle(t):t.currentStyle||null}(t)["white-space"];return"pre-wrap"===n||"pre-line"===n}))).length){var e=t.map((function(t){var e=t.querySelector("code"),i=t.querySelector(".line-numbers-rows");if(e&&i){var r=t.querySelector(".line-numbers-sizer"),o=e.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",e.appendChild(r)),r.innerHTML="0",r.style.display="block";var s=r.getBoundingClientRect().height;return r.innerHTML="",{element:t,lines:o,lineHeights:[],oneLinerHeight:s,sizer:r}}})).filter(Boolean);e.forEach((function(t){var n=t.sizer,e=t.lines,i=t.lineHeights,r=t.oneLinerHeight;i[e.length-1]=void 0,e.forEach((function(t,e){if(t&&t.length>1){var o=n.appendChild(document.createElement("span"));o.style.display="block",o.textContent=t}else i[e]=r}))})),e.forEach((function(t){for(var n=t.sizer,e=t.lineHeights,i=0,r=0;r<e.length;r++)void 0===e[r]&&(e[r]=n.children[i++].getBoundingClientRect().height)})),e.forEach((function(t){var n=t.sizer,e=t.element.querySelector(".line-numbers-rows");n.style.display="none",n.innerHTML="",t.lineHeights.forEach((function(t,n){e.children[n].style.height=t+"px"}))}))}}}()},449:function(t){"use strict";function n(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function e(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function i(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}var r={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,prebuilt:!1,stars:null,tooltip:"Select a Rating"},o=function(t,n,e){t.classList[n?"add":"remove"](e)},s=function(t){var n=document.createElement("span");for(var e in t=t||{})n.setAttribute(e,t[e]);return n},a=function(t,n,e){var i=s(e);return t.parentNode.insertBefore(i,n?t.nextSibling:t),i},u=function t(){for(var n=arguments.length,e=new Array(n),i=0;i<n;i++)e[i]=arguments[i];var r={};return e.forEach((function(n){Object.keys(n||{}).forEach((function(i){if(void 0!==e[0][i]){var o=n[i];"Object"!==c(o)||"Object"!==c(r[i])?r[i]=o:r[i]=t(r[i],o)}}))})),r},c=function(t){return{}.toString.call(t).slice(8,-1)},l=function(){function t(e,i){var r,o;n(this,t),this.direction=window.getComputedStyle(e,null).getPropertyValue("direction"),this.el=e,this.events={change:this.onChange.bind(this),keydown:this.onKeyDown.bind(this),mousedown:this.onPointerDown.bind(this),mouseleave:this.onPointerLeave.bind(this),mousemove:this.onPointerMove.bind(this),reset:this.onReset.bind(this),touchend:this.onPointerDown.bind(this),touchmove:this.onPointerMove.bind(this)},this.indexActive=null,this.indexSelected=null,this.props=i,this.tick=null,this.ticking=!1,this.values=function(t){var n=[];return[].forEach.call(t.options,(function(t){var e=parseInt(t.value,10)||0;e>0&&n.push({index:t.index,text:t.text,value:e})})),n.sort((function(t,n){return t.value-n.value}))}(e),this.widgetEl=null,this.el.widget&&this.el.widget.destroy(),r=this.values.length,o=this.props.maxStars,/^\d+$/.test(r)&&1<=r&&r<=o?this.build():this.destroy()}return i(t,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.selectValue(this.indexSelected=this.selected(),!1),this.handleEvents("add"),this.el.widget=this}},{key:"buildWidget",value:function(){var t,n,e=this;this.props.prebuilt?(t=this.el.parentNode,n=t.querySelector("."+this.props.classNames.base+"--stars")):((t=a(this.el,!1,{class:this.props.classNames.base})).appendChild(this.el),n=a(this.el,!0,{class:this.props.classNames.base+"--stars"}),this.values.forEach((function(t,i){var r=s({"data-index":i,"data-value":t.value});"function"==typeof e.props.stars&&e.props.stars.call(e,r,t,i),[].forEach.call(r.children,(function(t){return t.style.pointerEvents="none"})),n.innerHTML+=r.outerHTML}))),t.dataset.starRating="",t.classList.add(this.props.classNames.base+"--"+this.direction),this.props.tooltip&&n.setAttribute("role","tooltip"),this.widgetEl=n}},{key:"changeIndexTo",value:function(t,n){var e=this;if(this.indexActive!==t||n){if([].forEach.call(this.widgetEl.children,(function(n,i){o(n,i<=t,e.props.classNames.active),o(n,i===e.indexSelected,e.props.classNames.selected)})),this.widgetEl.setAttribute("data-rating",t+1),"function"==typeof this.props.stars||this.props.prebuilt||(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(t+1))),this.props.tooltip){var i=t<0?this.props.tooltip:this.values[t].text;this.widgetEl.setAttribute("aria-label",i)}this.indexActive=t}this.ticking=!1}},{key:"destroy",value:function(){this.indexActive=null,this.indexSelected=this.selected();var t=this.el.parentNode;t.classList.contains(this.props.classNames.base)&&(this.props.prebuilt?(this.widgetEl=t.querySelector("."+this.props.classNames.base+"--stars"),t.classList.remove(this.props.classNames.base+"--"+this.direction),delete t.dataset.starRating):t.parentNode.replaceChild(this.el,t),this.handleEvents("remove")),delete this.el.widget}},{key:"eventListener",value:function(t,n,e,i){var r=this;e.forEach((function(e){return t[n+"EventListener"](e,r.events[e],i||!1)}))}},{key:"handleEvents",value:function(t){var n=this.el.closest("form");n&&"FORM"===n.tagName&&this.eventListener(n,t,["reset"]),this.eventListener(this.el,t,["change"]),"add"===t&&this.el.disabled||(this.eventListener(this.el,t,["keydown"]),this.eventListener(this.widgetEl,t,["mousedown","mouseleave","mousemove","touchend","touchmove"],!1))}},{key:"indexFromEvent",value:function(t){var n,e,i=(null===(n=t.touches)||void 0===n?void 0:n[0])||(null===(e=t.changedTouches)||void 0===e?void 0:e[0])||t,r=document.elementFromPoint(i.clientX,i.clientY);return[].slice.call(r.parentNode.children).indexOf(r)}},{key:"onChange",value:function(){this.changeIndexTo(this.selected(),!0)}},{key:"onKeyDown",value:function(t){var n=t.key.slice(5);if(~["Left","Right"].indexOf(n)){var e="Left"===n?-1:1;"rtl"===this.direction&&(e*=-1);var i=this.values.length-1,r=Math.min(Math.max(this.selected()+e,-1),i);this.selectValue(r,!0)}}},{key:"onPointerDown",value:function(t){t.preventDefault();var n=this.indexFromEvent(t);this.props.clearable&&n===this.indexSelected&&(n=-1),this.selectValue(n,!0)}},{key:"onPointerLeave",value:function(t){var n=this;t.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame((function(){return n.changeIndexTo(n.indexSelected)}))}},{key:"onPointerMove",value:function(t){var n=this;t.preventDefault(),this.ticking||(this.tick=requestAnimationFrame((function(){return n.changeIndexTo(n.indexFromEvent(t))})),this.ticking=!0)}},{key:"onReset",value:function(){var t,n=this.valueIndex(null===(t=this.el.querySelector("[selected]"))||void 0===t?void 0:t.value);this.selectValue(n||-1,!1)}},{key:"selected",value:function(){return this.valueIndex(this.el.value)}},{key:"selectValue",value:function(t,n){var e;this.el.value=(null===(e=this.values[t])||void 0===e?void 0:e.value)||"",this.indexSelected=this.selected(),!1===n?this.changeIndexTo(this.selected(),!0):this.el.dispatchEvent(new Event("change"))}},{key:"valueIndex",value:function(t){return this.values.findIndex((function(n){return n.value===+t}))}}]),t}(),f=function(){function t(e,i){n(this,t),this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(e,i)}return i(t,[{key:"buildWidgets",value:function(t,n){var e=this;this.queryElements(t).forEach((function(t){var i=u(r,n,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.widget||(!i.prebuilt&&t.parentNode.classList.contains(i.classNames.base)&&e.unwrap(t),e.widgets.push(new l(t,i)))}))}},{key:"destroy",value:function(){this.widgets.forEach((function(t){return t.destroy()}))}},{key:"queryElements",value:function(t){return"HTMLSelectElement"===c(t)?[t]:"NodeList"===c(t)?[].slice.call(t):"String"===c(t)?[].slice.call(document.querySelectorAll(t)):[]}},{key:"rebuild",value:function(){this.widgets.forEach((function(t){return t.build()}))}},{key:"unwrap",value:function(t){var n=t.parentNode,e=n.parentNode;e.insertBefore(t,n),e.removeChild(n)}}]),t}();t.exports=f}},n={};function e(i){var r=n[i];if(void 0!==r)return r.exports;var o=n[i]={exports:{}};return t[i](o,o.exports,e),o.exports}e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},function(){"use strict";var t=function(t){return this.data={},this.form=jQuery(t),this.pushes={},this.init()};t.prototype={patterns:{validate:/^[a-z_-][a-z0-9_-]*(?:\[(?:\d*|[a-z0-9_-]+)\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,named:/^[a-z0-9_-]+$/i,push:/^$/,fixed:/^\d+$/},addPair:function(t){this.patterns.validate.test(t.name)&&(this.data=jQuery.extend(!0,this.data,this.makeObject(t.name,this.encode(t))))},build:function(t,n,e){return t[n]=e,t},encode:function(t){return"checkbox"===jQuery('[name="'+t.name+'"]',this.form).attr("type")&&"on"===t.value||t.value},incrementPush:function(t){return void 0===this.pushes[t]&&(this.pushes[t]=0),this.pushes[t]++},init:function(){var t=this.form.serializeArray();if(jQuery.isArray(t))for(var n=0,e=t.length;n<e;n++)this.addPair(t[n]);return this.data},makeObject:function(t,n){for(var e,i=t.match(this.patterns.key);void 0!==(e=i.pop());)if(this.patterns.push.test(e)){var r=this.incrementPush(t.replace(/\[\]$/,""));n=this.build([],r,n)}else this.patterns.fixed.test(e)?n=this.build([],e,n):this.patterns.named.test(e)&&(n=this.build({},e,n));return n}};var n=t,i=function(t,n,e){this.event=n||null,this.form=e||null,this.notice=null,this.request=t||{}};i.prototype={post:function(t){this.event?this.t(t):this.i(t)},u:function(t){var e={action:GLSR.action,_ajax_request:!0};if(this.form){var i=new n(this.form);i[GLSR.nameprefix]&&(this.request=i[GLSR.nameprefix])}return this.l(t),e[GLSR.nameprefix]=this.request,e},l:function(t){this.request._nonce||(GLSR.nonce[this.request._action]?this.request._nonce=GLSR.nonce[this.request._action]:t&&(this.request._nonce=t.closest("form").find("#_wpnonce").val()))},i:function(t,n){jQuery.post(GLSR.ajaxurl,this.u(n)).done((function(e){"function"==typeof t&&t(e.data,e.success),n&&n.prop("disabled",!1)})).always((function(t){t.data?t.data.notices&&GLSR.notices.add(t.data.notices):GLSR.notices.add('<div class="notice notice-error inline is-dismissible"><p>Unknown error.</p></div>')}))},t:function(t){this.event.preventDefault();var n=jQuery(this.event.currentTarget);n.is(":disabled")||(n.prop("disabled",!0),this.i(t,n))}};var r,o,s=i,a="function"==typeof Map?new Map:(r=[],o=[],{has:function(t){return r.indexOf(t)>-1},get:function(t){return o[r.indexOf(t)]},set:function(t,n){-1===r.indexOf(t)&&(r.push(t),o.push(n))},delete:function(t){var n=r.indexOf(t);n>-1&&(r.splice(n,1),o.splice(n,1))}}),u=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(r){u=function(t){var n=document.createEvent("Event");return n.initEvent(t,!0,!1),n}}function c(t){var n=a.get(t);n&&n.destroy()}function l(t){var n=a.get(t);n&&n.update()}var f=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((f=function(t){return t}).destroy=function(t){return t},f.update=function(t){return t}):((f=function(t,n){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!a.has(t)){var n,e=null,i=null,r=null,o=function(){t.clientWidth!==i&&f()},s=function(n){window.removeEventListener("resize",o,!1),t.removeEventListener("input",f,!1),t.removeEventListener("keyup",f,!1),t.removeEventListener("autosize:destroy",s,!1),t.removeEventListener("autosize:update",f,!1),Object.keys(n).forEach((function(e){t.style[e]=n[e]})),a.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",s,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",f,!1),window.addEventListener("resize",o,!1),t.addEventListener("input",f,!1),t.addEventListener("autosize:update",f,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",a.set(t,{destroy:s,update:f}),"vertical"===(n=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),e="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(e)&&(e=0),f()}function c(n){var e=t.style.width;t.style.width="0px",t.style.width=e,t.style.overflowY=n}function l(){if(0!==t.scrollHeight){var n=function(t){for(var n=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&n.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return n}(t),r=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+e+"px",i=t.clientWidth,n.forEach((function(t){t.node.scrollTop=t.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function f(){l();var n=Math.round(parseFloat(t.style.height)),e=window.getComputedStyle(t,null),i="content-box"===e.boxSizing?Math.round(parseFloat(e.height)):t.offsetHeight;if(i<n?"hidden"===e.overflowY&&(c("scroll"),l(),i="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==e.overflowY&&(c("hidden"),l(),i="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),r!==i){r=i;var o=u("autosize:resized");try{t.dispatchEvent(o)}catch(t){}}}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],c),t},f.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],l),t});var d=f;function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}var p=function(){"object"===h(jQuery.wp)&&"function"==typeof jQuery.wp.wpColorPicker&&jQuery(document).find("input[type=text].color-picker-hex").each((function(){var t=jQuery(this),n=jQuery.extend({},t.data("colorpicker")||{},{change:function(t,n){jQuery(t.target).val(n.color.toString()).trigger("change")},mode:"hsl",palettes:!1,width:180});t.wpColorPicker(n)}))},v={},m=function(t,n){var e=v[t]||[],i=[];n&&[].forEach.call(e,(function(t){n!==t.fn&&n!==t.fn.once&&i.push(t)})),i.length?v[t]=i:delete v[t]},b=function(t,n,e){(v[t]||(v[t]=[])).push({fn:n,context:e})},y={events:v,trigger:function(t){var n=[].slice.call(arguments,1),e=(v[t]||[]).slice();[].forEach.call(e,(function(t){return t.fn.apply(t.context,n)}))},off:m,on:b,once:function(t,n,e){var i=arguments,r=function r(){m(t,r),n.apply(e,i)};r.once=n,b(t,r,e)}},g=function(){this.request=null,jQuery(".enable-filter-tog","#adv-settings").on("click",this.h.bind(this))};g.prototype={p:function(){return jQuery(".enable-filter-tog:checked").map((function(t,n){return n.value})).get()},h:function(t){var n=jQuery(t.currentTarget),e=n.prop("checked")?"removeClass":"addClass";jQuery("#glsr-filter-by-"+n.val())[e]("hidden"),this.v()},v:_.debounce((function(){this.request&&this.request.abort();var t={_ajax_request:!0};t[GLSR.nameprefix]={_action:"toggle-filters",_nonce:GLSR.nonce["toggle-filters"],enabled:this.p()},this.request=wp.ajax.post(GLSR.action,t),this.request.always(function(){this.request=null}.bind(this))}),500)};var w=g,k=function(t){this.el=document.querySelector(t),this.el&&(this.depends=this.el.querySelectorAll("[data-depends]"),this.depends.length&&this.m())};k.prototype={_:function(t){var n=t.getAttribute("data-depends");if(n)try{return JSON.parse(n)}catch(t){return console.error(t)}},m:function(){for(var t=this.el.elements,n=0;n<t.length;n++)~["INPUT","SELECT"].indexOf(t[n].nodeName)&&t[n].addEventListener("change",this.k.bind(this))},j:function(t,n){var e=!1;n=[].concat(n);var i=this.el.querySelectorAll('[name="'+t+'"]');return[].map.call(i,function(t){var i=~this.S(n).indexOf(this.F(t.value));~["checkbox","radio"].indexOf(t.type)?t.checked&&i&&(e=!0):i&&(e=!0)}.bind(this)),e},F:function(t){return!!~["true","on","yes","1"].indexOf(t)||!~["false","off","no","0"].indexOf(t)&&t},S:function(t){return t.map(this.F)},k:function(t){this.depends.forEach(function(n){var e=this._(n);if(e&&~e.map((function(t){return t.name})).indexOf(t.currentTarget.name)){var i=!0;e.forEach(function(t){this.j(t.name,t.value)||(i=!1)}.bind(this)),this.O(n,i)}}.bind(this))},O:function(t,n){var e=t.closest(".glsr-setting-field");e&&e.classList[n?"remove":"add"]("hidden")}};var j=k,x=function(){jQuery(".glsr-metabox-field input[data-edit-review]").on("change",this.R.bind(this)),jQuery(".glsr-metabox-field input[type=url]").on("change",this.A.bind(this))};x.prototype={A:function(t){var n=jQuery(t.currentTarget);this.P(n.parent().find("img"),n.val())},R:function(t){var n=t.currentTarget.checked;jQuery(".glsr-input-value").each(function(t,e){if(n)jQuery(e).data("value",e.value);else{if(e.value=jQuery(e).data("value"),"url"!==e.type)return;this.P(jQuery(e).parent().find("img"),e.value)}}.bind(this)),jQuery(".glsr-input-value").prop("disabled",!n),GLSR.stars.rebuild()},P:function(t,n){if(t){var e=new Image;e.src=n,e.onerror=function(){t.attr("src",t.data("fallback"))},e.onload=function(){t.attr("src",e.src)}}}};var S=x,Q=function(){this.m()};Q.prototype={add:function(t){t&&(jQuery("#glsr-notices").length||(jQuery("#message.notice").remove(),jQuery("hr.wp-header-end").after('<div id="glsr-notices" />')),jQuery("#glsr-notices").html(t),jQuery(document).trigger("wp-updates-notice-added"))},m:function(){jQuery(".glsr-notice[data-dismiss]").on("click.wp-dismiss-notice",this.h.bind(this))},h:function(t){var n={};n[GLSR.nameprefix]={_action:"dismiss-notice",notice:jQuery(t.currentTarget).data("dismiss")},wp.ajax.post(GLSR.action,n)}};var F=Q,O=function(){this.el=jQuery("#pinned-status-select"),this.el&&(this.cancel=jQuery("a.cancel-pinned-status"),this.cancel.on("click",this.L.bind(this)),this.edit=jQuery("a.edit-pinned-status"),this.edit.on("click",this.$.bind(this)),this.save=jQuery("a.save-pinned-status"),this.save.on("click",this.C.bind(this))),jQuery("td.column-is_pinned i.pin-review").on("click",this.T.bind(this))};O.prototype={G:function(){this.el.slideUp("fast"),this.edit.show().focus()},L:function(t){t.preventDefault(),this.G(),this.el.find("select").val("0"===jQuery("#hidden-pinned-status").val()?1:0)},$:function(t){t.preventDefault(),this.el.is(":hidden")&&(this.el.slideDown("fast",function(){this.el.find("select").focus()}.bind(this)),this.edit.hide())},C:function(t){t.preventDefault(),this.G(),this.target=t.currentTarget;var n={_action:"toggle-pinned",id:jQuery("#post_ID").val(),pinned:jQuery("#pinned-status").val()};new s(n).post(this.q.bind(this))},T:function(t){t.preventDefault(),this.target=t.currentTarget;var n={_action:"toggle-pinned",id:t.currentTarget.getAttribute("data-id"),pinned:-1};jQuery(this.target).addClass("spinner is-active").removeClass("dashicons-sticky"),new s(n).post(this.M.bind(this))},q:function(t){jQuery("#pinned-status").val(0|!t.pinned),jQuery("#hidden-pinned-status").val(0|t.pinned),jQuery("#pinned-status-text").text(t.pinned?this.target.dataset.yes:this.target.dataset.no),GLSR.notices.add(t.notices)},M:function(t){this.target.classList[t.pinned?"add":"remove"]("pinned"),jQuery(this.target).removeClass("spinner is-active").addClass("dashicons-sticky")}};var R=O,A=function(){jQuery.each(GLSR.pointers,function(t,n){this.m(n)}.bind(this))};A.prototype={D:function(t){jQuery.post(GLSR.ajaxurl,{action:"dismiss-wp-pointer",pointer:t})},m:function(t){jQuery(t.target).pointer({content:t.options.content,position:t.options.position,close:this.D.bind(null,t.id)}).pointer("open").pointer("sendToTop"),jQuery(document).on("wp-window-resized",(function(){jQuery(t.target).pointer("reposition")}))}};var z=A,P=e(325),L=e.n(P),$=(e(433),e(335),e(980),e(854),e(945),e(251),e(759),function(t,n){this.el=jQuery(t),this.options=n,this.searchTerm=null,this.m()});$.prototype={defaults:{action:null,exclude:[],onInit:null,onResultClick:null,results:{},selected:-1,selectedClass:"glsr-selected-result",selectorEntries:".glsr-strings-table tbody",selectorResults:".glsr-search-results",selectorSearch:".glsr-search-input"},m:function(){this.options=jQuery.extend({},this.defaults,this.options),this.el.length&&(this.options.entriesEl=this.el.parent().find(this.options.selectorEntries),this.options.resultsEl=this.el.find(this.options.selectorResults),this.options.searchEl=this.el.find(this.options.selectorSearch),this.options.searchEl.attr("aria-describedby","live-search-desc"),"function"==typeof this.options.onInit&&this.options.onInit.call(this),this.I())},I:function(){this.options.searchEl.on("input",_.debounce(this.B.bind(this),500)),this.options.searchEl.on("keyup",this.U.bind(this)),this.options.searchEl.on("keydown keypress",(function(t){GLSR.keys.ENTER===t.which&&t.preventDefault()})),jQuery(document).on("click",this.W.bind(this)),jQuery(document).on("keydown",this.H.bind(this))},N:function(){void 0!==this.searchRequest&&this.searchRequest.abort()},V:function(){this.N(),this.options.resultsEl.empty(),this.options.resultsEl.removeClass("is-active"),this.el.removeClass("is-active"),jQuery("body").removeClass("glsr-focus")},Z:function(t){var n=this.options.entriesEl.children("tr").eq(t),e=this;n.find("td").css({backgroundColor:"#faafaa"}),n.fadeOut(350,(function(){jQuery(this).remove(),e.options.results={},e.K(),e.X()}))},Y:function(t){jQuery("body").addClass("glsr-focus"),this.options.resultsEl.append(t),this.options.resultsEl.children("span").on("click",this.J.bind(this))},tt:function(){this.options.entriesEl.on("click","a.delete",this.nt.bind(this)),this.options.entriesEl.sortable({items:"tr",tolerance:"pointer",start:function(t,n){n.placeholder.height(n.helper[0].scrollHeight)},sort:function(t,n){var e=t.pageY-jQuery(this).offsetParent().offset().top-n.helper.outerHeight(!0)/2;n.helper.css({top:e+"px"})}})},et:function(t){this.options.selected+=t,this.options.results.removeClass(this.options.selectedClass),this.options.selected<0&&(this.options.selected=-1,this.options.searchEl.focus()),this.options.selected>=this.options.results.length&&(this.options.selected=this.options.results.length-1),this.options.selected>=0&&this.options.results.eq(this.options.selected).addClass(this.options.selectedClass).focus()},W:function(t){jQuery(t.target).find(this.el).length&&jQuery("body").hasClass("glsr-focus")&&this.V()},H:function(t){if(!jQuery.isEmptyObject(this.options.results)){if(GLSR.keys.ESC===t.which&&this.V(),GLSR.keys.ENTER===t.which||GLSR.keys.SPACE===t.which){var n=this.options.resultsEl.find("."+this.options.selectedClass);n&&n.trigger("click")}GLSR.keys.UP===t.which&&(t.preventDefault(),this.et(-1)),GLSR.keys.DOWN===t.which&&(t.preventDefault(),this.et(1))}},nt:function(t){t.preventDefault(),this.Z(jQuery(t.currentTarget).closest("tr").index())},J:function(t){t.preventDefault(),"function"==typeof this.options.onResultClick&&this.options.onResultClick.call(this,t),this.V()},B:function(t){if(this.N(),this.searchTerm===t.currentTarget.value&&this.options.results.length)return this.Y(this.options.results);if(this.options.resultsEl.empty(),this.options.selected=-1,this.searchTerm=t.currentTarget.value,""===this.searchTerm)return this.it();this.el.addClass("is-active");var n={};n[GLSR.nameprefix]={_action:this.options.action,_nonce:this.el.find("#_search_nonce").val(),exclude:this.options.exclude,search:this.searchTerm},this.searchRequest=wp.ajax.post(GLSR.action,n).done(function(t){this.el.removeClass("is-active"),this.Y(t.items?t.items:t.empty),this.options.results=this.options.resultsEl.children(),this.options.resultsEl.addClass("is-active"),delete this.searchRequest}.bind(this))},U:function(t){GLSR.keys.ESC===t.which&&this.it(),GLSR.keys.ENTER===t.which&&(this.B(t),t.preventDefault())},rt:function(t){t.preventDefault();var n=jQuery(t.currentTarget).closest(".glsr-multibox-entry");n.find("a").css({color:"#c00"}),n.fadeOut("fast",(function(){n.remove()}))},K:function(){var t=this;this.options.exclude=[],this.options.entriesEl.children("tr").each((function(n){jQuery(this).find(".glsr-string-td2").children().filter(":input").each((function(){var e=jQuery(this),i=e.attr("name").replace(/\[\d+\]/i,"["+n+"]");e.attr("name",i),e.is("[data-id]")&&t.options.exclude.push({id:e.val()})}))}))},it:function(){this.V(),this.options.results={},this.options.searchEl.val("")},X:function(){var t=this.options.entriesEl.children().length>0?"remove":"add";this.options.entriesEl.parent()[t+"Class"]("glsr-hidden")}};var C=$,T=function(t){this.options=jQuery.extend({},this.defaults,t),this.tabs=document.querySelectorAll(this.options.tabSelector),this.tabs&&this.m()};T.prototype={defaults:{expandSelectors:".glsr-nav-view, .glsr-notice",tabSelector:".glsr-nav-tab"},m:function(){var t=this;[].forEach.call(t.tabs,function(n,e){n.addEventListener("click",t.h.bind(t)),n.addEventListener("touchend",t.h.bind(t))}.bind(t)),jQuery(t.options.expandSelectors).on("click","a",(function(){var n=this.dataset.expand;localStorage.setItem("glsr-expand",n),t.ot(jQuery(n))})),jQuery(window).on("load",(function(){t.ot(jQuery(localStorage.getItem("glsr-expand")))}))},h:function(t){t.preventDefault(),this.st(t.currentTarget)},ot:function(t){if(t.length){var n=t.closest(".glsr-nav-view"),e=t.closest(".glsr-card");n.removeClass("collapsed"),this.ut(n),n.removeClass("collapsed"),e.removeClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!0),window.setTimeout((function(){localStorage.removeItem("glsr-expand"),jQuery("#glsr-notices .notice").length||e[0].scrollIntoView({behavior:"smooth",block:e.outerHeight()>=window.innerHeight?"start":"center"})}),10)}},ut:function(t){var n=t.hasClass("collapsed")?"remove":"add";t[n+"Class"]("collapsed").find(".glsr-card.postbox")[n+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==n)},st:function(t){if(t.classList.contains("nav-tab-active")){var n=jQuery("#"+t.dataset.id);this.ut(n)}}};var E=T,G=function(t){this.current=null,this.editor=null,this.create=function(t){if(this.editor=tinymce.get(t),this.editor){var n={_action:"mce-shortcode",shortcode:this.current};new s(n).post(this.ct.bind(this))}};var n=document.querySelectorAll(t);n.length&&n.forEach(function(t){var n=t.querySelector("button"),e=t.querySelectorAll(".mce-menu-item");n&&e.length&&this.m(t,n,e)}.bind(this))};G.prototype={lt:{},ft:[],m:function(t,n,e){document.addEventListener("click",this.dt.bind(this,t,n)),n.addEventListener("click",this.ht.bind(this,t,n)),e.forEach(function(e){e.addEventListener("click",this.vt.bind(this,t,n))}.bind(this))},bt:function(){tinymce.execCommand("GLSR_Shortcode")},yt:function(){jQuery("#scTemp").length?this.bt():(jQuery("body").append('<textarea id="scTemp" style="display:none!important;"/>'),tinymce.init({elements:"scTemp",external_plugins:GLSR.tinymce,mode:"exact",plugins:["glsr_shortcode","wplink"]}),setTimeout(function(){this.bt()}.bind(this),200))},D:function(t,n){jQuery(n).removeClass("active"),jQuery(t).find(".glsr-mce-menu").hide()},gt:function(){var t=jQuery("#scTemp");t.length&&(tinymce.get("scTemp").remove(),t.remove()),this.lt={},this.ft=[]},ct:function(t){if(t){if(0===t.body.length)return window.send_to_editor("["+t.shortcode+"]"),void this.gt();var n=this.wt(t);t.ok.constructor===Array&&(n.buttons[0].text=t.ok[0],n.buttons[0].onclick="close",delete n.buttons[1]),this.editor.windowManager.open(n)}},_t:function(t){for(var n in this.lt=t,this.ft=[],t)t.hasOwnProperty(n)&&(this.kt(n),this.jt(n),this.xt(n));this.lt.hide=this.ft.join(",")},kt:function(t){"display"!==t||jQuery.isNumeric(this.lt[t])||(this.lt[t]="")},jt:function(t){if(GLSR.hideoptions.hasOwnProperty(this.current)){var n=t.substring("hide_".length);-1!==Object.keys(GLSR.hideoptions[this.current]).indexOf(n)&&(this.lt[t]&&this.ft.push(n),delete this.lt[t])}},xt:function(t){"id"===t&&(this.lt[t]=(+new Date).toString(36))},dt:function(t,n,e){jQuery(e.target).closest(jQuery(t)).length||this.D(t,n)},ht:function(t,n,e){e.preventDefault(),e.currentTarget.classList.contains("active")?this.D(t,n):this.St(t,n)},vt:function(t,n,e){e.preventDefault(),this.current=e.currentTarget.dataset.shortcode,this.current&&(tinymce.get(window.wpActiveEditor)?this.bt():this.yt(),setTimeout(function(){this.D(t,n)}.bind(this),100))},St:function(t,n){jQuery(n).addClass("active"),jQuery(t).find(".glsr-mce-menu").show()},Qt:function(t){return[{classes:"btn glsr-btn primary",onclick:this.Ft.bind(this),text:t.ok},{onclick:"close",text:t.close}]},wt:function(t){return{title:t.title,body:t.body,classes:"glsr-mce-popup",minWidth:320,buttons:this.Qt(t),onsubmit:this.Ot.bind(this,t),onclose:this.gt.bind(this)}},Ot:function(t,n){var e="";for(var i in this._t(n.data),this.lt)this.lt.hasOwnProperty(i)&&""!==this.lt[i]&&(e+=" "+i+'="'+this.lt[i]+'"');window.send_to_editor("["+t.shortcode+e+"]")},Ft:function(){var t=this.editor.windowManager.getWindows()[0];this.Rt(t)&&t.submit()},Rt:function(t){var n,e=!0,i=GLSR.shortcodes[this.current];for(var r in i)if(i.hasOwnProperty(r)&&void 0!==(n=t.find("#"+r)[0])&&""===n.state.data.value){e=!1,alert(i[r]);break}return e}};var q=G,M=e(449),D=e.n(M),I=function(t){var n=document.querySelectorAll(t);n.length&&n.forEach(function(t){t.addEventListener("click",this.h)}.bind(this))};I.prototype={h:function(t){var n=t.currentTarget.href.match(/post=([0-9]+)/),e=t.currentTarget.href.match(/action=([a-z]+)/);if(null!==n&&null!==e){var i={_action:"toggle-status",_nonce:GLSR.nonce["toggle-status"],post_id:n[1],status:e[1]};new s(i,t).post((function(n){if(n.class){var e=jQuery(t.target);e.closest("tr").removeClass("status-pending status-publish").addClass(n.class),e.closest("td.column-title").find("strong").html(n.link),n.counts&&(e.closest(".wrap").find("ul.subsubsub").html(n.counts),jQuery("#menu-posts-site-review").find(".awaiting-mod").removeClass().addClass("awaiting-mod count-"+n.pending).find(".unapproved-count").html(n.pending))}}))}}};var B=I,U=function(){this.button=jQuery("button#sync-reviews"),this.progressbar=jQuery(".glsr-progress"),this.service=null,jQuery("form.glsr-form-sync").on("click","#sync-reviews",this.At.bind(this)),jQuery(document).on("wp-window-resized",this.zt),jQuery(window).on("hashchange",this.zt),this.zt()};U.prototype={Pt:function(t){jQuery(".service-"+this.service+" td.column-last_sync").text(t.last_sync),jQuery(".service-"+this.service+" td.column-total_fetched a").text(t.total),this.Lt(!1)},At:function(t){t.preventDefault(),this.service=jQuery('[name="'+GLSR.nameprefix+'[service]"]').val(),this.service&&(this.Lt(!0),this.$t())},zt:function(){var t=jQuery(".glsr-progress").width();t&&jQuery(".glsr-progress span").width(t)},$t:function(){var t={_action:"sync-reviews",service:this.service,stage:"fetch"};new s(t).post(this.Ct.bind(this))},Ct:function(t){var n={_action:"sync-reviews",job_id:t.job_id,service:this.service,stage:"progress"},e=t.finished?this.Tt.bind(this,t):this.Ct.bind(this);this.Et(t.message),this.Gt(t.percent),setTimeout((function(){new s(n).post(e)}),1500)},Tt:function(t){var n=0;try{n=t.meta.pagination.current_page}catch(t){}var e={_action:"sync-reviews",page:n+1,service:this.service,stage:"reviews"};this.Et(t.message),t.percent_synced&&t.percent_synced>=100?this.Pt(t):new s(e).post(this.Tt.bind(this))},Et:function(t){jQuery(".glsr-progress-status",this.progressbar).text(t)},Gt:function(t){t=(t||0)+"%",jQuery(".glsr-progress-bar",this.progressbar).outerWidth(t)},Lt:function(t){if(!0===t&&(this.Et(this.progressbar.data("active-text")),this.Gt(),this.button.prop("disabled",!0),window.requestAnimationFrame(function(){this.progressbar.addClass("active")}.bind(this))),!1===t)return this.service=null,this.button.prop("disabled",!1),void this.progressbar.removeClass("active");window.requestAnimationFrame(this.Lt.bind(this))}};var W=U,H=function(t){this.options=jQuery.extend({},this.defaults,t),this.active=document.querySelector("input[name=_active_tab]"),this.refererInputs=jQuery("input[name=_wp_http_referer]"),this.sections=document.querySelectorAll(this.options.viewSectionSelector),this.subsubsub=document.querySelectorAll(this.options.viewSubsubsub),this.tabs=document.querySelectorAll(this.options.tabSelector),this.views=document.querySelectorAll(this.options.viewSelector),this.active&&this.refererInputs.length&&this.tabs&&this.views&&this.m()};H.prototype={defaults:{smartLinks:".glsr-card a, #glsr-notices a",tabSelector:".glsr-nav-tab",viewSelector:".glsr-nav-view",viewSectionSelector:".glsr-nav-view-section",viewSubsubsub:".glsr-subsubsub a"},m:function(){var t=this;jQuery(this.options.tabSelector).each((function(n,e){var i=e.getAttribute("href"),r=t.qt(e,"tab"),o=t.Mt("tab");null===o&&0===n&&(o=r,history.replaceState({href:i,tab:r},"",i),t.refererInputs.val(i)),o===r&&t.Dt(r)})),jQuery(window).on("popstate",this.It.bind(this)),jQuery(this.options.smartLinks).on("click",this.Bt.bind(this)),jQuery(this.options.tabSelector+","+this.options.viewSubsubsub).on("click",this.h.bind(this))},h:function(t){var n=t.currentTarget,e=n.getAttribute("href"),i=this.qt(n,"tab");i&&(history.pushState({href:e,tab:i},"",e),this.refererInputs.val(e),this.Dt(i),t.preventDefault(),n.blur())},Bt:function(t){var n=t.currentTarget,e=this.Mt("page"),i=this.Mt("postType"),r=this.Mt("tab"),o=this.qt(n,"page"),s=this.qt(n,"postType"),a=this.qt(n,"tab");if(o===e&&s===i&&a){var u=n.getAttribute("href");history.pushState({href:u,tab:a},"",u),this.refererInputs.val(u),this.Dt(a),a!==r&&window.scrollTo(0,0),t.preventDefault()}},It:function(t){var n=t.originalEvent.state;n&&n.tab&&n.href&&(this.refererInputs.val(n.href),this.Dt(n.tab))},Ut:function(t){return t?"add":"remove"},qt:function(t,n){return new URLSearchParams(t.getAttribute("href")).get(n)},Mt:function(t){return new URLSearchParams(location.search).get(t)},Dt:function(t){for(var n=0;n<this.views.length;n++)if(t===this.views[n].id){this.Wt(this.tabs[n]);break}},Ht:function(){var t=this,n=0;[].forEach.call(this.subsubsub,(function(e,i){e.classList.remove("current"),t.qt(e,"sub")===t.Mt("sub")&&(n=i)})),this.subsubsub[n]&&this.subsubsub[n].classList.add("current"),[].forEach.call(this.sections,(function(e,i){var r=t.Ut(i!==n);e.classList[r]("ui-tabs-hide")}))},Wt:function(t){var n=this;[].forEach.call(this.tabs,(function(e,i){var r=n.Ut(e===t);"add"===r&&(n.active.value=n.views[i].id,n.Nt(i)),e.classList[r]("nav-tab-active")}))},Nt:function(t){var n=this;[].forEach.call(this.views,(function(e,i){var r=n.Ut(i!==t);e.classList[r]("ui-tabs-hide"),n.Ht()}))}};var N=H,V=function(){var t=document.querySelector("#contentdiv > textarea");t&&(this.Vt(t),jQuery(document).on("wp-window-resized.editor-expand",function(){this.Vt(t)}.bind(this)))};V.prototype={Vt:function(t){var n=t.scrollHeight>320?t.scrollHeight:320;t.style.height="auto",t.style.height=n+"px"}};var Z=V,K=function(){jQuery("form").on("click","#glsr-clear-console",this.Zt,this.h.bind(this)),jQuery("form").on("click","#glsr-fetch-console",this.Zt,this.h.bind(this)),jQuery("form").on("click","[data-ajax-click]",this.h.bind(this)),jQuery(".glsr-button").on("click",this.Kt);var t=jQuery("input[data-alt]");t.length&&(jQuery(document).on("keydown",this.Xt.bind(this,t)),jQuery(document).on("keyup",this.Yt.bind(this,t)))};K.prototype={Zt:function(t,n){n&&jQuery("#glsr-log-file").val(t.console)},h:function(t){var n=jQuery(t.currentTarget),e=this;n.addClass("is-busy"),new s({},t,n.closest("form")).post((function(i,r){"function"==typeof t.data&&t.data(i,r),n.get(0).hasAttribute("data-ajax-scroll")&&jQuery("html, body").animate({scrollTop:0},500),n.removeClass("is-busy"),n.closest("[data-ajax-hide]").css({backgroundColor:"rgba(74,184,102,.25)"}).fadeOut("normal",(function(){jQuery(this).remove()})),jQuery("#glsr-notices").on("click","a",e.Kt),jQuery('.glsr-notice[data-notice="'+n.data("remove-notice")+'"]').remove()}))},Xt:function(t,n){GLSR.keys.ALT!==n.keyCode||n.repeat||(t.closest("form").find("[data-alt-text]").addClass("alt"),t.val(1))},Yt:function(t,n){GLSR.keys.ALT===n.keyCode&&(t.closest("form").find("[data-alt-text]").removeClass("alt"),t.val(0))},Kt:function(t){var n=jQuery(t.currentTarget).data("expand");n&&localStorage.setItem("glsr-expand",n)}};var X=K;function Y(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function J(t){return t instanceof Y(t).Element||t instanceof Element}function tt(t){return t instanceof Y(t).HTMLElement||t instanceof HTMLElement}function nt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Y(t).ShadowRoot||t instanceof ShadowRoot)}var et=Math.round;function it(t,n){void 0===n&&(n=!1);var e=t.getBoundingClientRect(),i=1,r=1;if(tt(t)&&n){var o=t.offsetHeight,s=t.offsetWidth;s>0&&(i=e.width/s||1),o>0&&(r=e.height/o||1)}return{width:et(e.width/i),height:et(e.height/r),top:et(e.top/r),right:et(e.right/i),bottom:et(e.bottom/r),left:et(e.left/i),x:et(e.left/i),y:et(e.top/r)}}function rt(t){var n=Y(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function ot(t){return t?(t.nodeName||"").toLowerCase():null}function st(t){return((J(t)?t.ownerDocument:t.document)||window.document).documentElement}function at(t){return it(st(t)).left+rt(t).scrollLeft}function ut(t){return Y(t).getComputedStyle(t)}function ct(t){var n=ut(t),e=n.overflow,i=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+i)}function lt(t,n,e){void 0===e&&(e=!1);var i,r,o=tt(n),s=tt(n)&&function(t){var n=t.getBoundingClientRect(),e=n.width/t.offsetWidth||1,i=n.height/t.offsetHeight||1;return 1!==e||1!==i}(n),a=st(n),u=it(t,s),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!e)&&(("body"!==ot(n)||ct(a))&&(c=(i=n)!==Y(i)&&tt(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:rt(i)),tt(n)?((l=it(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):a&&(l.x=at(a))),{x:u.left+c.scrollLeft-l.x,y:u.top+c.scrollTop-l.y,width:u.width,height:u.height}}function ft(t){var n=it(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function dt(t){return"html"===ot(t)?t:t.assignedSlot||t.parentNode||(nt(t)?t.host:null)||st(t)}function ht(t){return["html","body","#document"].indexOf(ot(t))>=0?t.ownerDocument.body:tt(t)&&ct(t)?t:ht(dt(t))}function pt(t,n){var e;void 0===n&&(n=[]);var i=ht(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=Y(i),s=r?[o].concat(o.visualViewport||[],ct(i)?i:[]):i,a=n.concat(s);return r?a:a.concat(pt(dt(s)))}function vt(t){return["table","td","th"].indexOf(ot(t))>=0}function mt(t){return tt(t)&&"fixed"!==ut(t).position?t.offsetParent:null}function bt(t){for(var n=Y(t),e=mt(t);e&&vt(e)&&"static"===ut(e).position;)e=mt(e);return e&&("html"===ot(e)||"body"===ot(e)&&"static"===ut(e).position)?n:e||function(t){var n=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&tt(t)&&"fixed"===ut(t).position)return null;for(var e=dt(t);tt(e)&&["html","body"].indexOf(ot(e))<0;){var i=ut(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||n&&"filter"===i.willChange||n&&i.filter&&"none"!==i.filter)return e;e=e.parentNode}return null}(t)||n}var yt="top",gt="bottom",wt="right",_t="left",kt="auto",jt=[yt,gt,wt,_t],xt="start",St="end",Qt="viewport",Ft="popper",Ot=jt.reduce((function(t,n){return t.concat([n+"-"+xt,n+"-"+St])}),[]),Rt=[].concat(jt,[kt]).reduce((function(t,n){return t.concat([n,n+"-"+xt,n+"-"+St])}),[]),At=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function zt(t){var n=new Map,e=new Set,i=[];function r(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var i=n.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||r(t)})),i}var Pt={placement:"bottom",modifiers:[],strategy:"absolute"};function Lt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function $t(t){void 0===t&&(t={});var n=t,e=n.defaultModifiers,i=void 0===e?[]:e,r=n.defaultOptions,o=void 0===r?Pt:r;return function(t,n,e){void 0===e&&(e=o);var r,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Pt,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},u=[],c=!1,l={state:a,setOptions:function(e){var r="function"==typeof e?e(a.options):e;f(),a.options=Object.assign({},o,a.options,r),a.scrollParents={reference:J(t)?pt(t):t.contextElement?pt(t.contextElement):[],popper:pt(n)};var s=function(t){var n=zt(t);return At.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}(function(t){var n=t.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{});return Object.keys(n).map((function(t){return n[t]}))}([].concat(i,a.options.modifiers)));return a.orderedModifiers=s.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var n=t.name,e=t.options,i=void 0===e?{}:e,r=t.effect;if("function"==typeof r){var o=r({state:a,name:n,instance:l,options:i}),s=function(){};u.push(o||s)}})),l.update()},forceUpdate:function(){if(!c){var t=a.elements,n=t.reference,e=t.popper;if(Lt(n,e)){a.rects={reference:lt(n,bt(e),"fixed"===a.options.strategy),popper:ft(e)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],o=r.fn,s=r.options,u=void 0===s?{}:s,f=r.name;"function"==typeof o&&(a=o({state:a,options:u,name:f,instance:l})||a)}else a.reset=!1,i=-1}}},update:(r=function(){return new Promise((function(t){l.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(r())}))}))),s}),destroy:function(){f(),c=!0}};if(!Lt(t,n))return l;function f(){u.forEach((function(t){return t()})),u=[]}return l.setOptions(e).then((function(t){!c&&e.onFirstUpdate&&e.onFirstUpdate(t)})),l}}var Ct={passive:!0};var Tt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,s=i.resize,a=void 0===s||s,u=Y(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",e.update,Ct)})),a&&u.addEventListener("resize",e.update,Ct),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",e.update,Ct)})),a&&u.removeEventListener("resize",e.update,Ct)}},data:{}};function Et(t){return t.split("-")[0]}function Gt(t){return t.split("-")[1]}function qt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Mt(t){var n,e=t.reference,i=t.element,r=t.placement,o=r?Et(r):null,s=r?Gt(r):null,a=e.x+e.width/2-i.width/2,u=e.y+e.height/2-i.height/2;switch(o){case yt:n={x:a,y:e.y-i.height};break;case gt:n={x:a,y:e.y+e.height};break;case wt:n={x:e.x+e.width,y:u};break;case _t:n={x:e.x-i.width,y:u};break;default:n={x:e.x,y:e.y}}var c=o?qt(o):null;if(null!=c){var l="y"===c?"height":"width";switch(s){case xt:n[c]=n[c]-(e[l]/2-i[l]/2);break;case St:n[c]=n[c]+(e[l]/2-i[l]/2)}}return n}var Dt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state,e=t.name;n.modifiersData[e]=Mt({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},It=Math.max,Bt=Math.min,Ut=Math.round,Wt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ht(t){var n,e=t.popper,i=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,a=t.position,u=t.gpuAcceleration,c=t.adaptive,l=t.roundOffsets,f=!0===l?function(t){var n=t.x,e=t.y,i=window.devicePixelRatio||1;return{x:Ut(Ut(n*i)/i)||0,y:Ut(Ut(e*i)/i)||0}}(s):"function"==typeof l?l(s):s,d=f.x,h=void 0===d?0:d,p=f.y,v=void 0===p?0:p,m=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),y=_t,g=yt,w=window;if(c){var _=bt(e),k="clientHeight",j="clientWidth";_===Y(e)&&"static"!==ut(_=st(e)).position&&"absolute"===a&&(k="scrollHeight",j="scrollWidth"),_=_,r!==yt&&(r!==_t&&r!==wt||o!==St)||(g=gt,v-=_[k]-i.height,v*=u?1:-1),r!==_t&&(r!==yt&&r!==gt||o!==St)||(y=wt,h-=_[j]-i.width,h*=u?1:-1)}var x,S=Object.assign({position:a},c&&Wt);return u?Object.assign({},S,((x={})[g]=b?"0":"",x[y]=m?"0":"",x.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",x)):Object.assign({},S,((n={})[g]=b?v+"px":"",n[y]=m?h+"px":"",n.transform="",n))}var Nt={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},i=n.attributes[t]||{},r=n.elements[t];tt(r)&&ot(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(t){var n=i[t];!1===n?r.removeAttribute(t):r.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var i=n.elements[t],r=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});tt(i)&&ot(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Vt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.offset,o=void 0===r?[0,0]:r,s=Rt.reduce((function(t,e){return t[e]=function(t,n,e){var i=Et(t),r=[_t,yt].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[_t,wt].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(e,n.rects,o),t}),{}),a=s[n.placement],u=a.x,c=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=u,n.modifiersData.popperOffsets.y+=c),n.modifiersData[i]=s}},Zt={left:"right",right:"left",bottom:"top",top:"bottom"};function Kt(t){return t.replace(/left|right|bottom|top/g,(function(t){return Zt[t]}))}var Xt={start:"end",end:"start"};function Yt(t){return t.replace(/start|end/g,(function(t){return Xt[t]}))}function Jt(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&nt(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function tn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function nn(t,n){return n===Qt?tn(function(t){var n=Y(t),e=st(t),i=n.visualViewport,r=e.clientWidth,o=e.clientHeight,s=0,a=0;return i&&(r=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,a=i.offsetTop)),{width:r,height:o,x:s+at(t),y:a}}(t)):tt(n)?function(t){var n=it(t);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(n):tn(function(t){var n,e=st(t),i=rt(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=It(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=It(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+at(t),u=-i.scrollTop;return"rtl"===ut(r||e).direction&&(a+=It(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}(st(t)))}function en(t,n,e){var i="clippingParents"===n?function(t){var n=pt(dt(t)),e=["absolute","fixed"].indexOf(ut(t).position)>=0&&tt(t)?bt(t):t;return J(e)?n.filter((function(t){return J(t)&&Jt(t,e)&&"body"!==ot(t)})):[]}(t):[].concat(n),r=[].concat(i,[e]),o=r[0],s=r.reduce((function(n,e){var i=nn(t,e);return n.top=It(i.top,n.top),n.right=Bt(i.right,n.right),n.bottom=Bt(i.bottom,n.bottom),n.left=It(i.left,n.left),n}),nn(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function rn(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function on(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function sn(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=void 0===i?t.placement:i,o=e.boundary,s=void 0===o?"clippingParents":o,a=e.rootBoundary,u=void 0===a?Qt:a,c=e.elementContext,l=void 0===c?Ft:c,f=e.altBoundary,d=void 0!==f&&f,h=e.padding,p=void 0===h?0:h,v=rn("number"!=typeof p?p:on(p,jt)),m=l===Ft?"reference":Ft,b=t.rects.popper,y=t.elements[d?m:l],g=en(J(y)?y:y.contextElement||st(t.elements.popper),s,u),w=it(t.elements.reference),_=Mt({reference:w,element:b,strategy:"absolute",placement:r}),k=tn(Object.assign({},b,_)),j=l===Ft?k:w,x={top:g.top-j.top+v.top,bottom:j.bottom-g.bottom+v.bottom,left:g.left-j.left+v.left,right:j.right-g.right+v.right},S=t.modifiersData.offset;if(l===Ft&&S){var Q=S[r];Object.keys(x).forEach((function(t){var n=[wt,gt].indexOf(t)>=0?1:-1,e=[yt,gt].indexOf(t)>=0?"y":"x";x[t]+=Q[e]*n}))}return x}var an={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,u=e.fallbackPlacements,c=e.padding,l=e.boundary,f=e.rootBoundary,d=e.altBoundary,h=e.flipVariations,p=void 0===h||h,v=e.allowedAutoPlacements,m=n.options.placement,b=Et(m),y=u||(b===m||!p?[Kt(m)]:function(t){if(Et(t)===kt)return[];var n=Kt(t);return[Yt(t),n,Yt(n)]}(m)),g=[m].concat(y).reduce((function(t,e){return t.concat(Et(e)===kt?function(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=e.boundary,o=e.rootBoundary,s=e.padding,a=e.flipVariations,u=e.allowedAutoPlacements,c=void 0===u?Rt:u,l=Gt(i),f=l?a?Ot:Ot.filter((function(t){return Gt(t)===l})):jt,d=f.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=f);var h=d.reduce((function(n,e){return n[e]=sn(t,{placement:e,boundary:r,rootBoundary:o,padding:s})[Et(e)],n}),{});return Object.keys(h).sort((function(t,n){return h[t]-h[n]}))}(n,{placement:e,boundary:l,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:v}):e)}),[]),w=n.rects.reference,_=n.rects.popper,k=new Map,j=!0,x=g[0],S=0;S<g.length;S++){var Q=g[S],F=Et(Q),O=Gt(Q)===xt,R=[yt,gt].indexOf(F)>=0,A=R?"width":"height",z=sn(n,{placement:Q,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),P=R?O?wt:_t:O?gt:yt;w[A]>_[A]&&(P=Kt(P));var L=Kt(P),$=[];if(o&&$.push(z[F]<=0),a&&$.push(z[P]<=0,z[L]<=0),$.every((function(t){return t}))){x=Q,j=!1;break}k.set(Q,$)}if(j)for(var C=function(t){var n=g.find((function(n){var e=k.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return x=n,"break"},T=p?3:1;T>0;T--){if("break"===C(T))break}n.placement!==x&&(n.modifiersData[i]._skip=!0,n.placement=x,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function un(t,n,e){return It(t,Bt(n,e))}var cn={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,u=e.boundary,c=e.rootBoundary,l=e.altBoundary,f=e.padding,d=e.tether,h=void 0===d||d,p=e.tetherOffset,v=void 0===p?0:p,m=sn(n,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),b=Et(n.placement),y=Gt(n.placement),g=!y,w=qt(b),_="x"===w?"y":"x",k=n.modifiersData.popperOffsets,j=n.rects.reference,x=n.rects.popper,S="function"==typeof v?v(Object.assign({},n.rects,{placement:n.placement})):v,Q={x:0,y:0};if(k){if(o||a){var F="y"===w?yt:_t,O="y"===w?gt:wt,R="y"===w?"height":"width",A=k[w],z=k[w]+m[F],P=k[w]-m[O],L=h?-x[R]/2:0,$=y===xt?j[R]:x[R],C=y===xt?-x[R]:-j[R],T=n.elements.arrow,E=h&&T?ft(T):{width:0,height:0},G=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},q=G[F],M=G[O],D=un(0,j[R],E[R]),I=g?j[R]/2-L-D-q-S:$-D-q-S,B=g?-j[R]/2+L+D+M+S:C+D+M+S,U=n.elements.arrow&&bt(n.elements.arrow),W=U?"y"===w?U.clientTop||0:U.clientLeft||0:0,H=n.modifiersData.offset?n.modifiersData.offset[n.placement][w]:0,N=k[w]+I-H-W,V=k[w]+B-H;if(o){var Z=un(h?Bt(z,N):z,A,h?It(P,V):P);k[w]=Z,Q[w]=Z-A}if(a){var K="x"===w?yt:_t,X="x"===w?gt:wt,Y=k[_],J=Y+m[K],tt=Y-m[X],nt=un(h?Bt(J,N):J,Y,h?It(tt,V):tt);k[_]=nt,Q[_]=nt-Y}}n.modifiersData[i]=Q}},requiresIfExists:["offset"]};var ln={name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=Et(e.placement),u=qt(a),c=[_t,wt].indexOf(a)>=0?"height":"width";if(o&&s){var l=function(t,n){return rn("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:on(t,jt))}(r.padding,e),f=ft(o),d="y"===u?yt:_t,h="y"===u?gt:wt,p=e.rects.reference[c]+e.rects.reference[u]-s[u]-e.rects.popper[c],v=s[u]-e.rects.reference[u],m=bt(o),b=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,y=p/2-v/2,g=l[d],w=b-f[c]-l[h],_=b/2-f[c]/2+y,k=un(g,_,w),j=u;e.modifiersData[i]=((n={})[j]=k,n.centerOffset=k-_,n)}},effect:function(t){var n=t.state,e=t.options.element,i=void 0===e?"[data-popper-arrow]":e;null!=i&&("string"!=typeof i||(i=n.elements.popper.querySelector(i)))&&Jt(n.elements.popper,i)&&(n.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fn(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function dn(t){return[yt,wt,gt,_t].some((function(n){return t[n]>=0}))}var hn=$t({defaultModifiers:[Tt,Dt,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,s=void 0===o||o,a=e.roundOffsets,u=void 0===a||a,c={placement:Et(n.placement),variation:Gt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,Ht(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:s,roundOffsets:u})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,Ht(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},Nt,Vt,an,cn,ln,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,i=n.rects.reference,r=n.rects.popper,o=n.modifiersData.preventOverflow,s=sn(n,{elementContext:"reference"}),a=sn(n,{altBoundary:!0}),u=fn(s,i),c=fn(a,r,o),l=dn(u),f=dn(c);n.modifiersData[e]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),pn="tippy-content",vn="tippy-backdrop",mn="tippy-arrow",bn="tippy-svg-arrow",yn={passive:!0,capture:!0},gn=function(){return document.body};function wn(t,n,e){if(Array.isArray(t)){var i=t[n];return null==i?Array.isArray(e)?e[n]:e:i}return t}function _n(t,n){var e={}.toString.call(t);return 0===e.indexOf("[object")&&e.indexOf(n+"]")>-1}function kn(t,n){return"function"==typeof t?t.apply(void 0,n):t}function jn(t,n){return 0===n?t:function(i){clearTimeout(e),e=setTimeout((function(){t(i)}),n)};var e}function xn(t){return[].concat(t)}function Sn(t,n){-1===t.indexOf(n)&&t.push(n)}function Qn(t){return t.split("-")[0]}function Fn(t){return[].slice.call(t)}function On(){return document.createElement("div")}function Rn(t){return["Element","Fragment"].some((function(n){return _n(t,n)}))}function An(t){return _n(t,"MouseEvent")}function zn(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Pn(t){return Rn(t)?[t]:function(t){return _n(t,"NodeList")}(t)?Fn(t):Array.isArray(t)?t:Fn(document.querySelectorAll(t))}function Ln(t,n){t.forEach((function(t){t&&(t.style.transitionDuration=n+"ms")}))}function $n(t,n){t.forEach((function(t){t&&t.setAttribute("data-state",n)}))}function Cn(t){var n,e=xn(t)[0];return(null==e||null==(n=e.ownerDocument)?void 0:n.body)?e.ownerDocument:document}function Tn(t,n,e){var i=n+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(n){t[i](n,e)}))}function En(t,n){for(var e=n;e;){var i;if(t.contains(e))return!0;e=null==(i=null==e.getRootNode?void 0:e.getRootNode())?void 0:i.host}return!1}var Gn={isTouch:!1},qn=0;function Mn(){Gn.isTouch||(Gn.isTouch=!0,window.performance&&document.addEventListener("mousemove",Dn))}function Dn(){var t=performance.now();t-qn<20&&(Gn.isTouch=!1,document.removeEventListener("mousemove",Dn)),qn=t}function In(){var t=document.activeElement;if(zn(t)){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Bn=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Un={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Wn=Object.assign({appendTo:gn,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Un,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Hn=Object.keys(Wn);function Nn(t){var n=(t.plugins||[]).reduce((function(n,e){var i,r=e.name,o=e.defaultValue;r&&(n[r]=void 0!==t[r]?t[r]:null!=(i=Wn[r])?i:o);return n}),{});return Object.assign({},t,{},n)}function Vn(t,n){var e=Object.assign({},n,{content:kn(n.content,[t])},n.ignoreAttributes?{}:function(t,n){return(n?Object.keys(Nn(Object.assign({},Wn,{plugins:n}))):Hn).reduce((function(n,e){var i=(t.getAttribute("data-tippy-"+e)||"").trim();if(!i)return n;if("content"===e)n[e]=i;else try{n[e]=JSON.parse(i)}catch(t){n[e]=i}return n}),{})}(t,n.plugins));return e.aria=Object.assign({},Wn.aria,{},e.aria),e.aria={expanded:"auto"===e.aria.expanded?n.interactive:e.aria.expanded,content:"auto"===e.aria.content?n.interactive?null:"describedby":e.aria.content},e}function Zn(t,n){t.innerHTML=n}function Kn(t){var n=On();return!0===t?n.className=mn:(n.className=bn,Rn(t)?n.appendChild(t):Zn(n,t)),n}function Xn(t,n){Rn(n.content)?(Zn(t,""),t.appendChild(n.content)):"function"!=typeof n.content&&(n.allowHTML?Zn(t,n.content):t.textContent=n.content)}function Yn(t){var n=t.firstElementChild,e=Fn(n.children);return{box:n,content:e.find((function(t){return t.classList.contains(pn)})),arrow:e.find((function(t){return t.classList.contains(mn)||t.classList.contains(bn)})),backdrop:e.find((function(t){return t.classList.contains(vn)}))}}function Jn(t){var n=On(),e=On();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=On();function r(e,i){var r=Yn(n),o=r.box,s=r.content,a=r.arrow;i.theme?o.setAttribute("data-theme",i.theme):o.removeAttribute("data-theme"),"string"==typeof i.animation?o.setAttribute("data-animation",i.animation):o.removeAttribute("data-animation"),i.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?o.setAttribute("role",i.role):o.removeAttribute("role"),e.content===i.content&&e.allowHTML===i.allowHTML||Xn(s,t.props),i.arrow?a?e.arrow!==i.arrow&&(o.removeChild(a),o.appendChild(Kn(i.arrow))):o.appendChild(Kn(i.arrow)):a&&o.removeChild(a)}return i.className=pn,i.setAttribute("data-state","hidden"),Xn(i,t.props),n.appendChild(e),e.appendChild(i),r(t.props,t.props),{popper:n,onUpdate:r}}Jn.$$tippy=!0;var te=1,ne=[],ee=[];function ie(t,n){var e,i,r,o,s,a,u,c,l,f=Vn(t,Object.assign({},Wn,{},Nn((e=n,Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{}))))),d=!1,h=!1,p=!1,v=!1,m=[],b=jn(V,f.interactiveDebounce),y=te++,g=(l=f.plugins).filter((function(t,n){return l.indexOf(t)===n})),w={id:y,reference:t,popper:On(),popperInstance:null,props:f,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(n){0;if(w.state.isDestroyed)return;$("onBeforeUpdate",[w,n]),H();var e=w.props,i=Vn(t,Object.assign({},w.props,{},n,{ignoreAttributes:!0}));w.props=i,W(),e.interactiveDebounce!==i.interactiveDebounce&&(E(),b=jn(V,i.interactiveDebounce));e.triggerTarget&&!i.triggerTarget?xn(e.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):i.triggerTarget&&t.removeAttribute("aria-expanded");T(),L(),j&&j(e,i);w.popperInstance&&(Y(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));$("onAfterUpdate",[w,n])},setContent:function(t){w.setProps({content:t})},show:function(){0;var t=w.state.isVisible,n=w.state.isDestroyed,e=!w.state.isEnabled,i=Gn.isTouch&&!w.props.touch,r=wn(w.props.duration,0,Wn.duration);if(t||n||e||i)return;if(R().hasAttribute("disabled"))return;if($("onShow",[w],!1),!1===w.props.onShow(w))return;w.state.isVisible=!0,O()&&(k.style.visibility="visible");L(),D(),w.state.isMounted||(k.style.transition="none");if(O()){var o=z(),s=o.box,a=o.content;Ln([s,a],0)}u=function(){var t;if(w.state.isVisible&&!v){if(v=!0,k.offsetHeight,k.style.transition=w.props.moveTransition,O()&&w.props.animation){var n=z(),e=n.box,i=n.content;Ln([e,i],r),$n([e,i],"visible")}C(),T(),Sn(ee,w),null==(t=w.popperInstance)||t.forceUpdate(),w.state.isMounted=!0,$("onMount",[w]),w.props.animation&&O()&&function(t,n){B(t,n)}(r,(function(){w.state.isShown=!0,$("onShown",[w])}))}},function(){var t,n=w.props.appendTo,e=R();t=w.props.interactive&&n===gn||"parent"===n?e.parentNode:kn(n,[e]);t.contains(k)||t.appendChild(k);Y(),!1}()},hide:function(){0;var t=!w.state.isVisible,n=w.state.isDestroyed,e=!w.state.isEnabled,i=wn(w.props.duration,1,Wn.duration);if(t||n||e)return;if($("onHide",[w],!1),!1===w.props.onHide(w))return;w.state.isVisible=!1,w.state.isShown=!1,v=!1,d=!1,O()&&(k.style.visibility="hidden");if(E(),I(),L(),O()){var r=z(),o=r.box,s=r.content;w.props.animation&&(Ln([o,s],i),$n([o,s],"hidden"))}C(),T(),w.props.animation?O()&&function(t,n){B(t,(function(){!w.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&n()}))}(i,w.unmount):w.unmount()},hideWithInteractivity:function(t){0;A().addEventListener("mousemove",b),Sn(ne,b),b(t)},enable:function(){w.state.isEnabled=!0},disable:function(){w.hide(),w.state.isEnabled=!1},unmount:function(){0;w.state.isVisible&&w.hide();if(!w.state.isMounted)return;J(),tt().forEach((function(t){t._tippy.unmount()})),k.parentNode&&k.parentNode.removeChild(k);ee=ee.filter((function(t){return t!==w})),w.state.isMounted=!1,$("onHidden",[w])},destroy:function(){0;if(w.state.isDestroyed)return;w.clearDelayTimeouts(),w.unmount(),H(),delete t._tippy,w.state.isDestroyed=!0,$("onDestroy",[w])}};if(!f.render)return w;var _=f.render(w),k=_.popper,j=_.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+w.id,w.popper=k,t._tippy=w,k._tippy=w;var x=g.map((function(t){return t.fn(w)})),S=t.hasAttribute("aria-expanded");return W(),T(),L(),$("onCreate",[w]),f.showOnCreate&&nt(),k.addEventListener("mouseenter",(function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()})),k.addEventListener("mouseleave",(function(t){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&(A().addEventListener("mousemove",b),b(t))})),w;function Q(){var t=w.props.touch;return Array.isArray(t)?t:[t,0]}function F(){return"hold"===Q()[0]}function O(){var t;return!!(null==(t=w.props.render)?void 0:t.$$tippy)}function R(){return c||t}function A(){var t=R().parentNode;return t?Cn(t):document}function z(){return Yn(k)}function P(t){return w.state.isMounted&&!w.state.isVisible||Gn.isTouch||s&&"focus"===s.type?0:wn(w.props.delay,t?0:1,Wn.delay)}function L(){k.style.pointerEvents=w.props.interactive&&w.state.isVisible?"":"none",k.style.zIndex=""+w.props.zIndex}function $(t,n,e){var i;(void 0===e&&(e=!0),x.forEach((function(e){e[t]&&e[t].apply(void 0,n)})),e)&&(i=w.props)[t].apply(i,n)}function C(){var n=w.props.aria;if(n.content){var e="aria-"+n.content,i=k.id;xn(w.props.triggerTarget||t).forEach((function(t){var n=t.getAttribute(e);if(w.state.isVisible)t.setAttribute(e,n?n+" "+i:i);else{var r=n&&n.replace(i,"").trim();r?t.setAttribute(e,r):t.removeAttribute(e)}}))}}function T(){!S&&w.props.aria.expanded&&xn(w.props.triggerTarget||t).forEach((function(t){w.props.interactive?t.setAttribute("aria-expanded",w.state.isVisible&&t===R()?"true":"false"):t.removeAttribute("aria-expanded")}))}function E(){A().removeEventListener("mousemove",b),ne=ne.filter((function(t){return t!==b}))}function G(t){if(!Gn.isTouch||!p&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!w.props.interactive||!En(k,n)){if(En(R(),n)){if(Gn.isTouch)return;if(w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else $("onClickOutside",[w,t]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),h=!0,setTimeout((function(){h=!1})),w.state.isMounted||I())}}}function q(){p=!0}function M(){p=!1}function D(){var t=A();t.addEventListener("mousedown",G,!0),t.addEventListener("touchend",G,yn),t.addEventListener("touchstart",M,yn),t.addEventListener("touchmove",q,yn)}function I(){var t=A();t.removeEventListener("mousedown",G,!0),t.removeEventListener("touchend",G,yn),t.removeEventListener("touchstart",M,yn),t.removeEventListener("touchmove",q,yn)}function B(t,n){var e=z().box;function i(t){t.target===e&&(Tn(e,"remove",i),n())}if(0===t)return n();Tn(e,"remove",a),Tn(e,"add",i),a=i}function U(n,e,i){void 0===i&&(i=!1),xn(w.props.triggerTarget||t).forEach((function(t){t.addEventListener(n,e,i),m.push({node:t,eventType:n,handler:e,options:i})}))}function W(){var t;F()&&(U("touchstart",N,{passive:!0}),U("touchend",Z,{passive:!0})),(t=w.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(U(t,N),t){case"mouseenter":U("mouseleave",Z);break;case"focus":U(Bn?"focusout":"blur",K);break;case"focusin":U("focusout",K)}}))}function H(){m.forEach((function(t){var n=t.node,e=t.eventType,i=t.handler,r=t.options;n.removeEventListener(e,i,r)})),m=[]}function N(t){var n,e=!1;if(w.state.isEnabled&&!X(t)&&!h){var i="focus"===(null==(n=s)?void 0:n.type);s=t,c=t.currentTarget,T(),!w.state.isVisible&&An(t)&&ne.forEach((function(n){return n(t)})),"click"===t.type&&(w.props.trigger.indexOf("mouseenter")<0||d)&&!1!==w.props.hideOnClick&&w.state.isVisible?e=!0:nt(t),"click"===t.type&&(d=!e),e&&!i&&et(t)}}function V(t){var n=t.target,e=R().contains(n)||k.contains(n);if("mousemove"!==t.type||!e){var i=tt().concat(k).map((function(t){var n,e=null==(n=t._tippy.popperInstance)?void 0:n.state;return e?{popperRect:t.getBoundingClientRect(),popperState:e,props:f}:null})).filter(Boolean);(function(t,n){var e=n.clientX,i=n.clientY;return t.every((function(t){var n=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=Qn(r.placement),a=r.modifiersData.offset;if(!a)return!0;var u="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,l="right"===s?a.left.x:0,f="left"===s?a.right.x:0,d=n.top-i+u>o,h=i-n.bottom-c>o,p=n.left-e+l>o,v=e-n.right-f>o;return d||h||p||v}))})(i,t)&&(E(),et(t))}}function Z(t){X(t)||w.props.trigger.indexOf("click")>=0&&d||(w.props.interactive?w.hideWithInteractivity(t):et(t))}function K(t){w.props.trigger.indexOf("focusin")<0&&t.target!==R()||w.props.interactive&&t.relatedTarget&&k.contains(t.relatedTarget)||et(t)}function X(t){return!!Gn.isTouch&&F()!==t.type.indexOf("touch")>=0}function Y(){J();var n=w.props,e=n.popperOptions,i=n.placement,r=n.offset,o=n.getReferenceClientRect,s=n.moveTransition,a=O()?Yn(k).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||R()}:t,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var n=t.state;if(O()){var e=z().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?e.setAttribute("data-placement",n.placement):n.attributes.popper["data-popper-"+t]?e.setAttribute("data-"+t,""):e.removeAttribute("data-"+t)})),n.attributes.popper={}}}},f=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},l];O()&&a&&f.push({name:"arrow",options:{element:a,padding:3}}),f.push.apply(f,(null==e?void 0:e.modifiers)||[]),w.popperInstance=hn(c,k,Object.assign({},e,{placement:i,onFirstUpdate:u,modifiers:f}))}function J(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function tt(){return Fn(k.querySelectorAll("[data-tippy-root]"))}function nt(t){w.clearDelayTimeouts(),t&&$("onTrigger",[w,t]),D();var n=P(!0),e=Q(),r=e[0],o=e[1];Gn.isTouch&&"hold"===r&&o&&(n=o),n?i=setTimeout((function(){w.show()}),n):w.show()}function et(t){if(w.clearDelayTimeouts(),$("onUntrigger",[w,t]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var n=P(!1);n?r=setTimeout((function(){w.state.isVisible&&w.hide()}),n):o=requestAnimationFrame((function(){w.hide()}))}}else I()}}function re(t,n){void 0===n&&(n={});var e=Wn.plugins.concat(n.plugins||[]);document.addEventListener("touchstart",Mn,yn),window.addEventListener("blur",In);var i=Object.assign({},n,{plugins:e}),r=Pn(t).reduce((function(t,n){var e=n&&ie(n,i);return e&&t.push(e),t}),[]);return Rn(t)?r[0]:r}re.defaultProps=Wn,re.setDefaultProps=function(t){Object.keys(t).forEach((function(n){Wn[n]=t[n]}))},re.currentInput=Gn;Object.assign({},Nt,{effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow)}});var oe={clientX:0,clientY:0},se=[];function ae(t){var n=t.clientX,e=t.clientY;oe={clientX:n,clientY:e}}var ue={name:"followCursor",defaultValue:!1,fn:function(t){var n=t.reference,e=Cn(t.props.triggerTarget||n),i=!1,r=!1,o=!0,s=t.props;function a(){return"initial"===t.props.followCursor&&t.state.isVisible}function u(){e.addEventListener("mousemove",f)}function c(){e.removeEventListener("mousemove",f)}function l(){i=!0,t.setProps({getReferenceClientRect:null}),i=!1}function f(e){var i=!e.target||n.contains(e.target),r=t.props.followCursor,o=e.clientX,s=e.clientY,a=n.getBoundingClientRect(),u=o-a.left,c=s-a.top;!i&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=n.getBoundingClientRect(),e=o,i=s;"initial"===r&&(e=t.left+u,i=t.top+c);var a="horizontal"===r?t.top:i,l="vertical"===r?t.right:e,f="horizontal"===r?t.bottom:i,d="vertical"===r?t.left:e;return{width:l-d,height:f-a,top:a,right:l,bottom:f,left:d}}})}function d(){t.props.followCursor&&(se.push({instance:t,doc:e}),function(t){t.addEventListener("mousemove",ae)}(e))}function h(){0===(se=se.filter((function(n){return n.instance!==t}))).filter((function(t){return t.doc===e})).length&&function(t){t.removeEventListener("mousemove",ae)}(e)}return{onCreate:d,onDestroy:h,onBeforeUpdate:function(){s=t.props},onAfterUpdate:function(n,e){var o=e.followCursor;i||void 0!==o&&s.followCursor!==o&&(h(),o?(d(),!t.state.isMounted||r||a()||u()):(c(),l()))},onMount:function(){t.props.followCursor&&!r&&(o&&(f(oe),o=!1),a()||u())},onTrigger:function(t,n){An(n)&&(oe={clientX:n.clientX,clientY:n.clientY}),r="focus"===n.type},onHidden:function(){t.props.followCursor&&(l(),c(),o=!0)}}}};re.setDefaultProps({render:Jn});var ce=re;GLSR.autosize=d,GLSR.keys={ALT:18,DOWN:40,ENTER:13,ESC:27,SPACE:32,UP:38},GLSR.Event=y,GLSR.Tippy={tippy:ce,plugins:{followCursor:ue}},jQuery((function(t){L().highlightAll(),GLSR.notices=new F,GLSR.shortcode=new q(".glsr-mce"),GLSR.stars=new(D())("select.glsr-star-rating",{tooltip:!1}),GLSR.Tippy.tippy(".glsr-tooltip",{appendTo:function(){return document.body}}),t(".glsr-tooltip").each((function(t,n){var e=n.dataset.tippyContent,i=n.dataset.syntax;n._tippy&&e&&i&&L().languages[i]&&n._tippy.setContent('<pre class="language-'+i+'"><code>'+L().highlight(e,L().languages[i],i)+"</code></pre>")})),p(),new w,new j("form.glsr-form"),new S,new R,new z,new C("#glsr-search-posts",{action:"search-posts",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.rt.bind(this))},onResultClick:function(n){var e=t(n.currentTarget),i=wp.template("glsr-assigned-posts"),r={id:e.data("id"),name:"post_ids[]",url:e.data("url"),title:e.text()};if(i){var o=t(i(r));o.find(".glsr-remove-button").on("click",this.rt.bind(this)),this.el.find(".glsr-selected-entries").append(o),this.it()}this.options.searchEl.focus()}}),new C("#glsr-search-users",{action:"search-users",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.rt.bind(this))},onResultClick:function(n){var e=t(n.currentTarget),i=wp.template("glsr-assigned-users"),r={id:e.data("id"),name:"user_ids[]",url:e.data("url"),title:e.text()};if(i){var o=t(i(r));o.find(".glsr-remove-button").on("click",this.rt.bind(this)),this.el.find(".glsr-selected-entries").append(o),this.it()}this.options.searchEl.focus()}}),new C("#glsr-search-translations",{action:"search-translations",onInit:function(){this.tt()},onResultClick:function(n){var e=t(n.currentTarget),i=e.data("entry"),r=wp.template("glsr-string-"+(i.p1?"plural":"single"));i.index=this.options.entriesEl.children().length,i.prefix=this.options.resultsEl.data("prefix"),r&&(this.options.entriesEl.append(r(i)),this.options.exclude.push({id:i.id}),this.options.results=this.options.results.filter((function(t,n){return n!==e.get(0)}))),this.X()}}),new B("a.glsr-toggle-status"),new E,new N,new Z,new X,new W;var n,e=function(){this.dataset.glsrTrack=this.value};t("select[data-glsr-track]").each(e),t("select[data-glsr-track]").on("change",e),t(".glsr-card.postbox:not(.open)").addClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!1).closest(".glsr-nav-view").addClass("collapsed"),t(".glsr-support-step").not(":checked").length<1&&t(".glsr-card-result").removeClass("hidden"),t(".glsr-support-step").on("change",(function(){var n=t(".glsr-support-step").not(":checked").length>0?"add":"remove";t(".glsr-card-result")[n+"Class"]("hidden")})),t(".glsr-card.postbox .glsr-card-heading").on("click",(function(){var n=t(this).parent(),e=n.closest(".glsr-nav-view"),i=n.hasClass("closed")?"remove":"add";n[i+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==i),i=e.find(".glsr-card.postbox").not(".closed").length>0?"remove":"add",e[i+"Class"]("collapsed")})),t(".post-type-site-review #the-list").on("click",".editinline",(function(){var n=t(this).closest("tr");t(':input[data-name="post_content"]').val(""),t(':input[name="_response"]').val(""),setTimeout((function(){t(':input[data-name="post_content"]').val(n.find("._post_content").text()),t(':input[name="_response"]').val(n.find("._response").text())}),50)})),"no"===GLSR.isLicensed&&jQuery(".post-type-site-review.edit-php .page-title-action").after('<a href="'+GLSR.premiumurl+'" id="glsr-premium-button" class="page-title-action">'+GLSR.text.premium+"</a>"),n=GLSR.text.rate,jQuery("#footer-left",".post-type-site-review, .post-type-site-review-form, .post-type-site-review-theme, .dashboard_page_site-reviews-welcome").html(n.replace("%s",'<strong>Site Reviews</strong> <a href="https://wordpress.org/support/view/plugin-reviews/site-reviews?filter=5#new-post" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a>').replace("%s",'<a href="https://wordpress.org/support/view/plugin-reviews/site-reviews?filter=5#new-post" target="_blank">wordpress.org</a>'))}));var le=function(t){[].forEach.call(document.querySelectorAll('[data-type="site-reviews/'.concat(t,'"] .glsr')),(function(t){var n="glsr-"+window.getComputedStyle(t,null).getPropertyValue("direction");t.classList.add(n)}))};y.on("site-reviews/form",(function(t,n){_.isEmpty(t)||t.error||(le("form"),GLSR.stars=new(D())("select.glsr-star-rating",{tooltip:!1}))})),y.on("site-reviews/reviews",(function(t,n){_.isEmpty(t)||t.error||le("reviews")})),y.on("site-reviews/summary",(function(t,n){_.isEmpty(t)||t.error||le("summary")}))}()}();
compatibility.php CHANGED
@@ -254,3 +254,24 @@ if (!is_wp_version_compatible('5.8')) {
254
  add_filter('block_categories', [glsr(BlocksController::class), 'filterBlockCategories']);
255
  });
256
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  add_filter('block_categories', [glsr(BlocksController::class), 'filterBlockCategories']);
255
  });
256
  }
257
+
258
+ /**
259
+ * This will check updates for any add-ons which do not yet use the "site-reviews/addon/update" hook
260
+ * @param \GeminiLabs\SiteReviews\Application $app
261
+ */
262
+ add_action('site-reviews/addon/update', function ($app) {
263
+ $addons = [
264
+ 'site-reviews-filters/site-reviews-filters.php' => 'GeminiLabs\SiteReviews\Addon\Filters\Application',
265
+ 'site-reviews-forms/site-reviews-forms.php' => 'GeminiLabs\SiteReviews\Addon\Forms\Application',
266
+ 'site-reviews-images/site-reviews-images.php' => 'GeminiLabs\SiteReviews\Addon\Images\Application',
267
+ 'site-reviews-notifications/site-reviews-notifications.php' => 'GeminiLabs\SiteReviews\Addon\Notifications\Application',
268
+ 'site-reviews-themes/site-reviews-themes.php' => 'GeminiLabs\SiteReviews\Addon\Themes\Application',
269
+ 'site-reviews-woocommerce/site-reviews-woocommerce.php' => 'GeminiLabs\SiteReviews\Addon\Woocommerce\Application',
270
+ ];
271
+ foreach ($addons as $basename => $addon) {
272
+ $file = trailingslashit(WP_PLUGIN_DIR).$basename;
273
+ if (file_exists($file)) {
274
+ $app->update($addon, $file);
275
+ }
276
+ }
277
+ });
languages/site-reviews-en_US.po CHANGED
@@ -1671,7 +1671,7 @@ msgctxt "admin-text"
1671
  msgid "Terms Accepted"
1672
  msgstr "Terms Accepted"
1673
 
1674
- #: plugin/Addons/Addon.php:103
1675
  msgctxt "admin-text"
1676
  msgid "Untitled"
1677
  msgstr "Untitled"
@@ -1697,7 +1697,7 @@ msgstr ""
1697
  "adding it here. You can do this by visiting the %s page on your Nifty "
1698
  "Plugins account and clicking the \"Manage Sites\" button."
1699
 
1700
- #: plugin/Addons/Controller.php:199, plugin/Controllers/SettingsController.php:172
1701
  msgctxt "admin-text"
1702
  msgid "License Keys"
1703
  msgstr "License Keys"
@@ -2032,22 +2032,22 @@ msgctxt "admin-text"
2032
  msgid "Settings updated."
2033
  msgstr "Settings updated."
2034
 
2035
- #: plugin/Controllers/SettingsController.php:142
2036
  msgctxt "admin-text"
2037
  msgid "Please update the %s plugin to v%s or greater to enable integration."
2038
  msgstr "Please update the %s plugin to v%s or greater to enable integration."
2039
 
2040
- #: plugin/Controllers/SettingsController.php:136
2041
  msgctxt "admin-text"
2042
  msgid "Please install/activate the %s plugin to enable integration."
2043
  msgstr "Please install/activate the %s plugin to enable integration."
2044
 
2045
- #: plugin/Controllers/SettingsController.php:170
2046
  msgctxt "admin-text"
2047
  msgid "The license you entered is either invalid or has not yet been activated."
2048
  msgstr "The license you entered is either invalid or has not yet been activated."
2049
 
2050
- #: plugin/Controllers/SettingsController.php:171
2051
  msgctxt "admin-text"
2052
  msgid ""
2053
  "To activate your license, please visit the %s page on your Nifty Plugins "
1671
  msgid "Terms Accepted"
1672
  msgstr "Terms Accepted"
1673
 
1674
+ #: plugin/Addons/Addon.php:100
1675
  msgctxt "admin-text"
1676
  msgid "Untitled"
1677
  msgstr "Untitled"
1697
  "adding it here. You can do this by visiting the %s page on your Nifty "
1698
  "Plugins account and clicking the \"Manage Sites\" button."
1699
 
1700
+ #: plugin/Addons/Controller.php:199, plugin/Controllers/SettingsController.php:173
1701
  msgctxt "admin-text"
1702
  msgid "License Keys"
1703
  msgstr "License Keys"
2032
  msgid "Settings updated."
2033
  msgstr "Settings updated."
2034
 
2035
+ #: plugin/Controllers/SettingsController.php:143
2036
  msgctxt "admin-text"
2037
  msgid "Please update the %s plugin to v%s or greater to enable integration."
2038
  msgstr "Please update the %s plugin to v%s or greater to enable integration."
2039
 
2040
+ #: plugin/Controllers/SettingsController.php:137
2041
  msgctxt "admin-text"
2042
  msgid "Please install/activate the %s plugin to enable integration."
2043
  msgstr "Please install/activate the %s plugin to enable integration."
2044
 
2045
+ #: plugin/Controllers/SettingsController.php:171
2046
  msgctxt "admin-text"
2047
  msgid "The license you entered is either invalid or has not yet been activated."
2048
  msgstr "The license you entered is either invalid or has not yet been activated."
2049
 
2050
+ #: plugin/Controllers/SettingsController.php:172
2051
  msgctxt "admin-text"
2052
  msgid ""
2053
  "To activate your license, please visit the %s page on your Nifty Plugins "
languages/site-reviews.pot CHANGED
@@ -1267,7 +1267,7 @@ msgstr ""
1267
  msgid "This review is based on my own experience and is my genuine opinion."
1268
  msgstr ""
1269
 
1270
- #: plugin/Addons/Addon.php:103
1271
  msgctxt "admin-text"
1272
  msgid "Untitled"
1273
  msgstr ""
@@ -1287,7 +1287,7 @@ msgctxt "admin-text"
1287
  msgid "Make sure to first activate your website domain with your license before adding it here. You can do this by visiting the %s page on your Nifty Plugins account and clicking the \"Manage Sites\" button."
1288
  msgstr ""
1289
 
1290
- #: plugin/Addons/Controller.php:199, plugin/Controllers/SettingsController.php:172
1291
  msgctxt "admin-text"
1292
  msgid "License Keys"
1293
  msgstr ""
@@ -1640,22 +1640,22 @@ msgctxt "admin-text"
1640
  msgid "Settings updated."
1641
  msgstr ""
1642
 
1643
- #: plugin/Controllers/SettingsController.php:142
1644
  msgctxt "admin-text"
1645
  msgid "Please update the %s plugin to v%s or greater to enable integration."
1646
  msgstr ""
1647
 
1648
- #: plugin/Controllers/SettingsController.php:136
1649
  msgctxt "admin-text"
1650
  msgid "Please install/activate the %s plugin to enable integration."
1651
  msgstr ""
1652
 
1653
- #: plugin/Controllers/SettingsController.php:170
1654
  msgctxt "admin-text"
1655
  msgid "The license you entered is either invalid or has not yet been activated."
1656
  msgstr ""
1657
 
1658
- #: plugin/Controllers/SettingsController.php:171
1659
  msgctxt "admin-text"
1660
  msgid "To activate your license, please visit the %s page on your Nifty Plugins account and click the \"Manage Sites\" button to activate it for your website."
1661
  msgstr ""
1267
  msgid "This review is based on my own experience and is my genuine opinion."
1268
  msgstr ""
1269
 
1270
+ #: plugin/Addons/Addon.php:100
1271
  msgctxt "admin-text"
1272
  msgid "Untitled"
1273
  msgstr ""
1287
  msgid "Make sure to first activate your website domain with your license before adding it here. You can do this by visiting the %s page on your Nifty Plugins account and clicking the \"Manage Sites\" button."
1288
  msgstr ""
1289
 
1290
+ #: plugin/Addons/Controller.php:199, plugin/Controllers/SettingsController.php:173
1291
  msgctxt "admin-text"
1292
  msgid "License Keys"
1293
  msgstr ""
1640
  msgid "Settings updated."
1641
  msgstr ""
1642
 
1643
+ #: plugin/Controllers/SettingsController.php:143
1644
  msgctxt "admin-text"
1645
  msgid "Please update the %s plugin to v%s or greater to enable integration."
1646
  msgstr ""
1647
 
1648
+ #: plugin/Controllers/SettingsController.php:137
1649
  msgctxt "admin-text"
1650
  msgid "Please install/activate the %s plugin to enable integration."
1651
  msgstr ""
1652
 
1653
+ #: plugin/Controllers/SettingsController.php:171
1654
  msgctxt "admin-text"
1655
  msgid "The license you entered is either invalid or has not yet been activated."
1656
  msgstr ""
1657
 
1658
+ #: plugin/Controllers/SettingsController.php:172
1659
  msgctxt "admin-text"
1660
  msgid "To activate your license, please visit the %s page on your Nifty Plugins account and click the \"Manage Sites\" button to activate it for your website."
1661
  msgstr ""
plugin/Addons/Addon.php CHANGED
@@ -16,7 +16,6 @@ use ReflectionClass;
16
  * @property string $slug
17
  * @property string $testedTo
18
  * @property string $update_url
19
- * @property Updater $updater
20
  * @property string $version
21
  */
22
  abstract class Addon
@@ -28,9 +27,7 @@ abstract class Addon
28
  const NAME = '';
29
  const POST_TYPE = '';
30
  const SLUG = '';
31
- const UPDATE_URL = '';
32
-
33
- protected $updater;
34
 
35
  /**
36
  * @return void
@@ -107,19 +104,4 @@ abstract class Addon
107
  natsort($results);
108
  return $results;
109
  }
110
-
111
- /**
112
- * @return void
113
- */
114
- public function update()
115
- {
116
- $doingCron = defined('DOING_CRON') && DOING_CRON;
117
- if (!current_user_can('manage_options') && !$doingCron) {
118
- return;
119
- }
120
- $this->updater = new Updater(static::UPDATE_URL, $this->file, [
121
- 'license' => glsr_get_option('licenses.'.static::ID),
122
- ]);
123
- $this->updater->init();
124
- }
125
  }
16
  * @property string $slug
17
  * @property string $testedTo
18
  * @property string $update_url
 
19
  * @property string $version
20
  */
21
  abstract class Addon
27
  const NAME = '';
28
  const POST_TYPE = '';
29
  const SLUG = '';
30
+ const UPDATE_URL = 'https://niftyplugins.com';
 
 
31
 
32
  /**
33
  * @return void
104
  natsort($results);
105
  return $results;
106
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  }
plugin/Addons/Hooks.php CHANGED
@@ -20,7 +20,6 @@ abstract class Hooks
20
  */
21
  public function run()
22
  {
23
- add_action('init', [$this->addon, 'update']);
24
  add_action('admin_enqueue_scripts', [$this->controller, 'enqueueAdminAssets']);
25
  add_action('enqueue_block_editor_assets', [$this->controller, 'enqueueBlockAssets'], 9);
26
  add_action('wp_enqueue_scripts', [$this->controller, 'enqueuePublicAssets']);
20
  */
21
  public function run()
22
  {
 
23
  add_action('admin_enqueue_scripts', [$this->controller, 'enqueueAdminAssets']);
24
  add_action('enqueue_block_editor_assets', [$this->controller, 'enqueueBlockAssets'], 9);
25
  add_action('wp_enqueue_scripts', [$this->controller, 'enqueuePublicAssets']);
plugin/Addons/Updater.php CHANGED
@@ -16,6 +16,10 @@ class Updater
16
  * @var array
17
  */
18
  protected $data;
 
 
 
 
19
  /**
20
  * @var string
21
  */
@@ -27,12 +31,19 @@ class Updater
27
  */
28
  public function __construct($apiUrl, $file, array $data = [])
29
  {
 
 
 
30
  if (!function_exists('get_plugin_data')) {
31
  require_once ABSPATH.WPINC.'/plugin.php';
32
  }
33
  $this->apiUrl = trailingslashit(glsr()->filterString('addon/api-url', $apiUrl));
 
 
 
34
  $this->data = wp_parse_args($data, get_plugin_data($file));
35
  $this->plugin = plugin_basename($file);
 
36
  }
37
 
38
  /**
@@ -108,13 +119,12 @@ class Updater
108
  */
109
  public function init()
110
  {
111
- if ($this->apiUrl === Url::home()) {
112
- return;
 
 
 
113
  }
114
- add_filter('plugins_api', [$this, 'filterPluginUpdateDetails'], 10, 3);
115
- add_filter('pre_set_site_transient_update_plugins', [$this, 'filterPluginUpdates'], 999);
116
- add_action('load-update-core.php', [$this, 'onForceUpdateCheck'], 9);
117
- add_action('in_plugin_update_message-'.$this->plugin, [$this, 'renderLicenseMissingLink']);
118
  }
119
 
120
  /**
16
  * @var array
17
  */
18
  protected $data;
19
+ /**
20
+ * @var bool
21
+ */
22
+ protected $isReady = false;
23
  /**
24
  * @var string
25
  */
31
  */
32
  public function __construct($apiUrl, $file, array $data = [])
33
  {
34
+ if (!file_exists($file)) {
35
+ return;
36
+ }
37
  if (!function_exists('get_plugin_data')) {
38
  require_once ABSPATH.WPINC.'/plugin.php';
39
  }
40
  $this->apiUrl = trailingslashit(glsr()->filterString('addon/api-url', $apiUrl));
41
+ if ($this->apiUrl === Url::home()) {
42
+ return;
43
+ }
44
  $this->data = wp_parse_args($data, get_plugin_data($file));
45
  $this->plugin = plugin_basename($file);
46
+ $this->isReady = true;
47
  }
48
 
49
  /**
119
  */
120
  public function init()
121
  {
122
+ if ($this->isReady) {
123
+ add_filter('plugins_api', [$this, 'filterPluginUpdateDetails'], 10, 3);
124
+ add_filter('pre_set_site_transient_update_plugins', [$this, 'filterPluginUpdates'], 999);
125
+ add_action('load-update-core.php', [$this, 'onForceUpdateCheck'], 9);
126
+ add_action('in_plugin_update_message-'.$this->plugin, [$this, 'renderLicenseMissingLink']);
127
  }
 
 
 
 
128
  }
129
 
130
  /**
plugin/Application.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace GeminiLabs\SiteReviews;
4
 
 
5
  use GeminiLabs\SiteReviews\Database\DefaultsManager;
6
  use GeminiLabs\SiteReviews\Database\OptionManager;
7
  use GeminiLabs\SiteReviews\Database\SqlSchema;
@@ -27,6 +28,7 @@ use GeminiLabs\SiteReviews\Modules\Migrate;
27
  * @property array $session
28
  * @property \GeminiLabs\SiteReviews\Arguments $storage
29
  * @property string $taxonomy
 
30
  * @property string $version
31
  * @property string $testedTo;
32
  */
@@ -60,6 +62,11 @@ final class Application extends Container
60
  */
61
  protected $name;
62
 
 
 
 
 
 
63
  /**
64
  * @param string $addonId
65
  * @return false|\GeminiLabs\SiteReviews\Addons\Addon
@@ -149,7 +156,7 @@ final class Application extends Container
149
  }
150
 
151
  /**
152
- * @param object $addon
153
  * @return void
154
  */
155
  public function register($addon)
@@ -179,4 +186,32 @@ final class Application extends Container
179
  update_option(OptionManager::databaseKey(), $this->defaults);
180
  }
181
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  }
2
 
3
  namespace GeminiLabs\SiteReviews;
4
 
5
+ use GeminiLabs\SiteReviews\Addons\Updater;
6
  use GeminiLabs\SiteReviews\Database\DefaultsManager;
7
  use GeminiLabs\SiteReviews\Database\OptionManager;
8
  use GeminiLabs\SiteReviews\Database\SqlSchema;
28
  * @property array $session
29
  * @property \GeminiLabs\SiteReviews\Arguments $storage
30
  * @property string $taxonomy
31
+ * @property array $updated
32
  * @property string $version
33
  * @property string $testedTo;
34
  */
62
  */
63
  protected $name;
64
 
65
+ /**
66
+ * @var array
67
+ */
68
+ protected $updated = [];
69
+
70
  /**
71
  * @param string $addonId
72
  * @return false|\GeminiLabs\SiteReviews\Addons\Addon
156
  }
157
 
158
  /**
159
+ * @param string|object $addon
160
  * @return void
161
  */
162
  public function register($addon)
186
  update_option(OptionManager::databaseKey(), $this->defaults);
187
  }
188
  }
189
+
190
+ /**
191
+ * @param object|string $addon
192
+ * @param string $file
193
+ * @return void
194
+ */
195
+ public function update($addon, $file)
196
+ {
197
+ if (!current_user_can('manage_options') && !(defined('DOING_CRON') && DOING_CRON)) {
198
+ return;
199
+ }
200
+ if (!file_exists($file)) {
201
+ glsr_log()->error("Add-on does not exist: $file")->debug($addon);
202
+ }
203
+ try {
204
+ $reflection = new \ReflectionClass($addon);
205
+ $addonId = $reflection->getConstant('ID');
206
+ $updateUrl = $reflection->getConstant('UPDATE_URL');
207
+ if ($addonId && $updateUrl && !in_array($addonId, $this->updated)) {
208
+ $license = glsr_get_option('licenses.'.$addonId);
209
+ $updater = new Updater($updateUrl, $file, compact('license'));
210
+ $updater->init();
211
+ $this->updated[] = $addonId;
212
+ }
213
+ } catch (\ReflectionException $e) {
214
+ // We don't need to log an error here.
215
+ }
216
+ }
217
  }
plugin/Controllers/MainController.php CHANGED
@@ -148,4 +148,13 @@ class MainController extends Controller
148
  {
149
  $this->execute(new RegisterWidgets());
150
  }
 
 
 
 
 
 
 
 
 
151
  }
148
  {
149
  $this->execute(new RegisterWidgets());
150
  }
151
+
152
+ /**
153
+ * @return void
154
+ * @action init
155
+ */
156
+ public function updateAddons()
157
+ {
158
+ glsr()->action('addon/update', glsr());
159
+ }
160
  }
plugin/Controllers/SettingsController.php CHANGED
@@ -29,6 +29,7 @@ class SettingsController extends Controller
29
  if (filter_input(INPUT_POST, 'option_page') == glsr()->id.'-settings') {
30
  glsr(Notice::class)->addSuccess(_x('Settings updated.', 'admin-text', 'site-reviews'));
31
  }
 
32
  return $options;
33
  }
34
  return $input;
29
  if (filter_input(INPUT_POST, 'option_page') == glsr()->id.'-settings') {
30
  glsr(Notice::class)->addSuccess(_x('Settings updated.', 'admin-text', 'site-reviews'));
31
  }
32
+ glsr(Notice::class)->store(); // store the notices before the page reloads
33
  return $options;
34
  }
35
  return $input;
plugin/Hooks.php CHANGED
@@ -122,6 +122,7 @@ class Hooks implements HooksContract
122
  add_action('init', [$this->main, 'registerShortcodes']);
123
  add_action('init', [$this->main, 'registerTaxonomy']);
124
  add_action('widgets_init', [$this->main, 'registerWidgets']);
 
125
  add_action('admin_menu', [$this->menu, 'registerMenuCount']);
126
  add_action('admin_menu', [$this->menu, 'registerSubMenus']);
127
  add_action('admin_menu', [$this->menu, 'removeSubMenus'], 20);
122
  add_action('init', [$this->main, 'registerShortcodes']);
123
  add_action('init', [$this->main, 'registerTaxonomy']);
124
  add_action('widgets_init', [$this->main, 'registerWidgets']);
125
+ add_action('init', [$this->main, 'updateAddons'], 1);
126
  add_action('admin_menu', [$this->menu, 'registerMenuCount']);
127
  add_action('admin_menu', [$this->menu, 'registerSubMenus']);
128
  add_action('admin_menu', [$this->menu, 'removeSubMenus'], 20);
plugin/Modules/Notice.php CHANGED
@@ -2,55 +2,69 @@
2
 
3
  namespace GeminiLabs\SiteReviews\Modules;
4
 
 
 
5
  use GeminiLabs\SiteReviews\Modules\Html\Builder;
6
- use WP_Error;
7
 
8
  class Notice
9
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  /**
11
  * @param string $type
12
- * @param string|array|WP_Error $message
13
  * @return static
14
  */
15
- public function add($type, $message, array $args = [])
16
  {
17
- if (empty(array_filter([$message, $type]))) {
18
- return $this;
19
  }
20
- $args['message'] = $message;
21
- $args['type'] = $type;
22
- add_settings_error(glsr()->id, '', json_encode($this->normalize($args)));
 
23
  return $this;
24
  }
25
 
26
  /**
27
- * @param string|array|WP_Error $message
28
  * @return static
29
  */
30
- public function addError($message, array $args = [])
31
  {
32
- $this->add('error', $message, $args);
33
- return $this;
34
  }
35
 
36
  /**
37
- * @param string|array|WP_Error $message
38
  * @return static
39
  */
40
- public function addSuccess($message, array $args = [])
41
  {
42
- $this->add('success', $message, $args);
43
- return $this;
44
  }
45
 
46
  /**
47
- * @param string|array|WP_Error $message
48
  * @return static
49
  */
50
- public function addWarning($message, array $args = [])
51
  {
52
- $this->add('warning', $message, $args);
53
- return $this;
54
  }
55
 
56
  /**
@@ -58,9 +72,7 @@ class Notice
58
  */
59
  public function clear()
60
  {
61
- global $wp_settings_errors;
62
- $wp_settings_errors = [];
63
- delete_transient('settings_errors');
64
  return $this;
65
  }
66
 
@@ -69,55 +81,41 @@ class Notice
69
  */
70
  public function get()
71
  {
72
- $notices = array_map('unserialize',
73
- array_unique(array_map('serialize', get_settings_errors(glsr()->id)))
74
- );
75
- $notices = array_reduce($notices, function ($carry, $notice) {
76
- return $carry.$this->buildNotice(json_decode($notice['message'], true));
 
 
 
 
 
77
  });
78
- return glsr()->filterString('notices', $notices);
79
  }
80
 
81
  /**
82
- * @return string
83
  */
84
- protected function buildNotice(array $args)
85
  {
86
- $messages = array_reduce($args['messages'], function ($carry, $message) {
87
- return $carry.glsr(Builder::class)->p($message);
 
 
88
  });
89
- $class = 'notice notice-'.$args['type'];
90
- if ($args['inline']) {
91
- $class .= ' inline';
92
- }
93
- if ($args['dismissible']) {
94
- $class .= ' is-dismissible';
95
- }
96
- return glsr(Builder::class)->div($messages, [
97
- 'class' => $class,
98
- ]);
99
  }
100
 
101
  /**
102
- * @return array
103
  */
104
- protected function normalize(array $args)
105
  {
106
- $defaults = [
107
- 'dismissible' => true,
108
- 'inline' => true,
109
- 'message' => '',
110
- 'type' => '',
111
- ];
112
- $args = shortcode_atts($defaults, $args);
113
- if (!in_array($args['type'], ['error', 'warning', 'success'])) {
114
- $args['type'] = 'success';
115
  }
116
- // @phpstan-ignore-next-line
117
- $args['messages'] = is_wp_error($args['message'])
118
- ? (array) $args['message']->get_error_message()
119
- : (array) $args['message'];
120
- unset($args['message']);
121
- return $args;
122
  }
123
  }
2
 
3
  namespace GeminiLabs\SiteReviews\Modules;
4
 
5
+ use GeminiLabs\SiteReviews\Helpers\Arr;
6
+ use GeminiLabs\SiteReviews\Helpers\Str;
7
  use GeminiLabs\SiteReviews\Modules\Html\Builder;
 
8
 
9
  class Notice
10
  {
11
+ /**
12
+ * @var array
13
+ */
14
+ protected $notices;
15
+
16
+ public function __construct()
17
+ {
18
+ $this->notices = [];
19
+ $notices = get_transient(glsr()->prefix.'notices');
20
+ if (is_array($notices)) {
21
+ $this->notices = $notices;
22
+ delete_transient(glsr()->prefix.'notices');
23
+ }
24
+ }
25
+
26
  /**
27
  * @param string $type
28
+ * @param string|array|\WP_Error $message
29
  * @return static
30
  */
31
+ public function add($type, $message)
32
  {
33
+ if (is_wp_error($message)) {
34
+ $message = $message->get_error_message();
35
  }
36
+ $this->notices[] = [
37
+ 'messages' => (array) $message,
38
+ 'type' => Str::restrictTo(['error', 'warning', 'info', 'success'], $type, 'info'),
39
+ ];
40
  return $this;
41
  }
42
 
43
  /**
44
+ * @param string|array|\WP_Error $message
45
  * @return static
46
  */
47
+ public function addError($message)
48
  {
49
+ return $this->add('error', $message);
 
50
  }
51
 
52
  /**
53
+ * @param string|array|\WP_Error $message
54
  * @return static
55
  */
56
+ public function addSuccess($message)
57
  {
58
+ return $this->add('success', $message);
 
59
  }
60
 
61
  /**
62
+ * @param string|array|\WP_Error $message
63
  * @return static
64
  */
65
+ public function addWarning($message)
66
  {
67
+ return $this->add('warning', $message);
 
68
  }
69
 
70
  /**
72
  */
73
  public function clear()
74
  {
75
+ $this->notices = [];
 
 
76
  return $this;
77
  }
78
 
81
  */
82
  public function get()
83
  {
84
+ $this->sort();
85
+ $notices = glsr()->filterArray('notices', $this->notices);
86
+ return array_reduce($notices, function ($carry, $args) {
87
+ $text = array_reduce($args['messages'], function ($carry, $message) {
88
+ return $carry.wpautop($message);
89
+ });
90
+ return $carry.glsr(Builder::class)->div([
91
+ 'class' => sprintf('notice notice-%s inline is-dismissible', $args['type']),
92
+ 'text' => $text,
93
+ ]);
94
  });
 
95
  }
96
 
97
  /**
98
+ * @return static
99
  */
100
+ public function sort()
101
  {
102
+ $notices = array_map('unserialize', array_unique(array_map('serialize', $this->notices)));
103
+ usort($notices, function ($a, $b) {
104
+ $order = ['error', 'warning', 'info', 'success'];
105
+ return array_search($a['type'], $order) - array_search($b['type'], $order);
106
  });
107
+ $this->notices = $notices;
108
+ return $this;
 
 
 
 
 
 
 
 
109
  }
110
 
111
  /**
112
+ * @return static
113
  */
114
+ public function store()
115
  {
116
+ if (!empty($this->notices)) {
117
+ set_transient(glsr()->prefix.'notices', $this->notices, 30);
 
 
 
 
 
 
 
118
  }
119
+ return $this;
 
 
 
 
 
120
  }
121
  }
plugin/Provider.php CHANGED
@@ -23,6 +23,7 @@ use GeminiLabs\SiteReviews\Controllers\TaxonomyController;
23
  use GeminiLabs\SiteReviews\Controllers\ToolsController;
24
  use GeminiLabs\SiteReviews\Controllers\TranslationController;
25
  use GeminiLabs\SiteReviews\Controllers\WelcomeController;
 
26
  use GeminiLabs\SiteReviews\Modules\Queue;
27
  use GeminiLabs\SiteReviews\Modules\Style;
28
  use GeminiLabs\SiteReviews\Modules\Translation;
@@ -39,6 +40,7 @@ class Provider implements ProviderContract
39
  return $app;
40
  });
41
  $app->singleton(Hooks::class);
 
42
  $app->singleton(Queue::class);
43
  $app->singleton(Style::class);
44
  $app->singleton(Translator::class);
23
  use GeminiLabs\SiteReviews\Controllers\ToolsController;
24
  use GeminiLabs\SiteReviews\Controllers\TranslationController;
25
  use GeminiLabs\SiteReviews\Controllers\WelcomeController;
26
+ use GeminiLabs\SiteReviews\Modules\Notice;
27
  use GeminiLabs\SiteReviews\Modules\Queue;
28
  use GeminiLabs\SiteReviews\Modules\Style;
29
  use GeminiLabs\SiteReviews\Modules\Translation;
40
  return $app;
41
  });
42
  $app->singleton(Hooks::class);
43
+ $app->singleton(Notice::class);
44
  $app->singleton(Queue::class);
45
  $app->singleton(Style::class);
46
  $app->singleton(Translator::class);
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: reviews, ratings, testimonials, woocommerce, product reviews, business rev
5
  Tested up to: 5.8
6
  Requires at least: 5.5
7
  Requires PHP: 5.6
8
- Stable tag: 5.17.3
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -140,6 +140,12 @@ All documentation can be found in the "Help" page of the plugin. If your questio
140
 
141
  ## Changelog
142
 
 
 
 
 
 
 
143
  = 5.17.3 (2021-11-15) =
144
 
145
  - Fixed a potential XSS vunerability on the Console page (the console wasn't escaping HTML correctly when displaying logged errors)
5
  Tested up to: 5.8
6
  Requires at least: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 5.17.4
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
140
 
141
  ## Changelog
142
 
143
+ = 5.17.4 (2021-11-15) =
144
+
145
+ - Fixed add-on updater
146
+ - Fixed compatibility with GamiPress plugin
147
+ - Fixed deactivation notices on WordPress settings pages
148
+
149
  = 5.17.3 (2021-11-15) =
150
 
151
  - Fixed a potential XSS vunerability on the Console page (the console wasn't escaping HTML correctly when displaying logged errors)
site-reviews.php CHANGED
@@ -7,7 +7,7 @@
7
  * Plugin Name: Site Reviews
8
  * Plugin URI: https://wordpress.org/plugins/site-reviews
9
  * Description: Receive and display reviews on your website
10
- * Version: 5.17.3
11
  * Author: Paul Ryley
12
  * Author URI: https://geminilabs.io
13
  * License: GPL2
7
  * Plugin Name: Site Reviews
8
  * Plugin URI: https://wordpress.org/plugins/site-reviews
9
  * Description: Receive and display reviews on your website
10
+ * Version: 5.17.4
11
  * Author: Paul Ryley
12
  * Author URI: https://geminilabs.io
13
  * License: GPL2
views/pages/tools/console.php CHANGED
@@ -1,24 +1,24 @@
1
  <?php defined('ABSPATH') || die; ?>
2
 
3
- <textarea id="log-file" class="large-text code glsr-code glsr-code-large" rows="20" readonly>{{ console }}</textarea>
4
  <form method="post" class="glsr-float-left">
5
  <input type="hidden" name="{{ id }}[_action]" value="download-console">
6
  <?php wp_nonce_field('download-console'); ?>
7
- <button type="submit" class="components-button is-primary" id="download-console">
8
  <?= _x('Download Console', 'admin-text', 'site-reviews'); ?>
9
  </button>
10
  </form>
11
  <form method="post" class="glsr-float-left">
12
  <input type="hidden" name="{{ id }}[_action]" value="fetch-console">
13
  <?php wp_nonce_field('fetch-console'); ?>
14
- <button type="submit" class="glsr-button components-button is-secondary" id="fetch-console">
15
  <span data-loading="<?= esc_attr_x('Reloading...', 'admin-text', 'site-reviews'); ?>"><?= _x('Reload', 'admin-text', 'site-reviews'); ?></span>
16
  </button>
17
  </form>
18
  <form method="post">
19
  <input type="hidden" name="{{ id }}[_action]" value="clear-console">
20
  <?php wp_nonce_field('clear-console'); ?>
21
- <button type="submit" class="glsr-button components-button is-secondary" id="clear-console">
22
  <span data-loading="<?= esc_attr_x('Clearing...', 'admin-text', 'site-reviews'); ?>"><?= _x('Clear', 'admin-text', 'site-reviews'); ?></span>
23
  </button>
24
  </form>
1
  <?php defined('ABSPATH') || die; ?>
2
 
3
+ <textarea id="glsr-log-file" class="large-text code glsr-code glsr-code-large" rows="20" readonly>{{ console }}</textarea>
4
  <form method="post" class="glsr-float-left">
5
  <input type="hidden" name="{{ id }}[_action]" value="download-console">
6
  <?php wp_nonce_field('download-console'); ?>
7
+ <button type="submit" id="glsr-download-console" class="components-button is-primary">
8
  <?= _x('Download Console', 'admin-text', 'site-reviews'); ?>
9
  </button>
10
  </form>
11
  <form method="post" class="glsr-float-left">
12
  <input type="hidden" name="{{ id }}[_action]" value="fetch-console">
13
  <?php wp_nonce_field('fetch-console'); ?>
14
+ <button type="submit" id="glsr-fetch-console" class="glsr-button components-button is-secondary">
15
  <span data-loading="<?= esc_attr_x('Reloading...', 'admin-text', 'site-reviews'); ?>"><?= _x('Reload', 'admin-text', 'site-reviews'); ?></span>
16
  </button>
17
  </form>
18
  <form method="post">
19
  <input type="hidden" name="{{ id }}[_action]" value="clear-console">
20
  <?php wp_nonce_field('clear-console'); ?>
21
+ <button type="submit" id="glsr-clear-console" class="glsr-button components-button is-secondary">
22
  <span data-loading="<?= esc_attr_x('Clearing...', 'admin-text', 'site-reviews'); ?>"><?= _x('Clear', 'admin-text', 'site-reviews'); ?></span>
23
  </button>
24
  </form>
views/pages/tools/system-info.php CHANGED
@@ -4,7 +4,7 @@
4
  <textarea class="large-text code glsr-code glsr-code-large" name="{{ id }}[system-info]" rows="20" onclick="this.select()" readonly>{{ system }}</textarea>
5
  <input type="hidden" name="{{ id }}[_action]" value="download-system-info">
6
  <?php wp_nonce_field('download-system-info'); ?>
7
- <button type="submit" class="components-button is-primary" id="download-system-info">
8
  <?= _x('Download System Info', 'admin-text', 'site-reviews'); ?>
9
  </button>
10
  </form>
4
  <textarea class="large-text code glsr-code glsr-code-large" name="{{ id }}[system-info]" rows="20" onclick="this.select()" readonly>{{ system }}</textarea>
5
  <input type="hidden" name="{{ id }}[_action]" value="download-system-info">
6
  <?php wp_nonce_field('download-system-info'); ?>
7
+ <button type="submit" id="glsr-download-system-info" class="components-button is-primary">
8
  <?= _x('Download System Info', 'admin-text', 'site-reviews'); ?>
9
  </button>
10
  </form>