=0){var a=this._originalMappings[s];if(void 0===e.column)for(var l=a.originalLine;a&&a.originalLine===l;)o.push({line:r.getArg(a,"generatedLine",null),column:r.getArg(a,"generatedColumn",null),lastColumn:r.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var c=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==c;)o.push({line:r.getArg(a,"generatedLine",null),column:r.getArg(a,"generatedColumn",null),lastColumn:r.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return o},t.SourceMapConsumer=l,c.prototype=Object.create(l.prototype),c.prototype.consumer=l,c.fromSourceMap=function(e){var t=Object.create(c.prototype),n=t._names=o.fromArray(e._names.toArray(),!0),i=t._sources=o.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var s=e._mappings.toArray().slice(),l=t.__generatedMappings=[],d=t.__originalMappings=[],h=0,p=s.length;h1&&(n.source=m+o[1],m+=o[1],n.originalLine=p+o[2],p=n.originalLine,n.originalLine+=1,n.originalColumn=f+o[3],f=n.originalColumn,o.length>4&&(n.name=g+o[4],g+=o[4])),C.push(n),"number"==typeof n.originalLine&&x.push(n)}a(C,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=C,a(x,r.compareByOriginalPositions),this.__originalMappings=x},c.prototype._findMapping=function(e,t,n,r,o,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return i.search(e,t,o,s)},c.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var o=r.getArg(i,"source",null);null!==o&&(o=this._sources.at(o),null!=this.sourceRoot&&(o=r.join(this.sourceRoot,o)));var s=r.getArg(i,"name",null);return null!==s&&(s=this._names.at(s)),{source:o,line:r.getArg(i,"originalLine",null),column:r.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},c.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=r.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=r.urlParse(this.sourceRoot))){var i=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(e){var t=r.getArg(e,"source");if(null!=this.sourceRoot&&(t=r.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var n={source:t=this._sources.indexOf(t),originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(e,"bias",l.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:r.getArg(o,"generatedLine",null),column:r.getArg(o,"generatedColumn",null),lastColumn:r.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},d.prototype=Object.create(l.prototype),d.prototype.constructor=l,d.prototype._version=3,Object.defineProperty(d.prototype,"sources",{get:function(){for(var e=[],t=0;t0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},a.prototype._serializeMappings=function(){for(var e,t,n,o,s=0,a=1,l=0,c=0,u=0,d=0,h="",p=this._mappings.toArray(),f=0,m=p.length;f0){if(!i.compareByGeneratedPositionsInflated(t,p[f-1]))continue;e+=","}e+=r.encode(t.generatedColumn-s),s=t.generatedColumn,null!=t.source&&(o=this._sources.indexOf(t.source),e+=r.encode(o-d),d=o,e+=r.encode(t.originalLine-1-c),c=t.originalLine-1,e+=r.encode(t.originalColumn-l),l=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-u),u=n)),h+=e}return h},a.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=i.relative(t,e));var n=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},a.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=a},1171:function(e,t,n){var r=n(1945).SourceMapGenerator,i=n(3835),o=/(\r?\n)/,s="$$$isSourceNode$$$";function a(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[s]=!0,null!=r&&this.add(r)}a.fromStringWithSourceMap=function(e,t,n){var r=new a,s=e.split(o),l=function(){return s.shift()+(s.shift()||"")},c=1,u=0,d=null;return t.eachMapping((function(e){if(null!==d){if(!(c0&&(d&&h(d,l()),r.add(s.join(""))),t.sources.forEach((function(e){var o=t.sourceContentFor(e);null!=o&&(null!=n&&(e=i.join(n,e)),r.setSourceContent(e,o))})),r;function h(e,t){if(null===e||void 0===e.source)r.add(t);else{var o=n?i.join(n,e.source):e.source;r.add(new a(e.originalLine,e.originalColumn,o,t,e.name))}}},a.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[s]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},a.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[s]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},a.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n=0;u--)"."===(s=l[u])?l.splice(u,1):".."===s?c++:c>0&&(""===s?(l.splice(u+1,c),c=0):(l.splice(u,2),c--));return""===(n=l.join("/"))&&(n=a?"/":"."),r?(r.path=n,o(r)):n}t.urlParse=i,t.urlGenerate=o,t.normalize=s,t.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),a=i(e);if(a&&(e=a.path||"/"),n&&!n.scheme)return a&&(n.scheme=a.scheme),o(n);if(n||t.match(r))return t;if(a&&!a.host&&!a.path)return a.host=t,o(a);var l="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=l,o(a)):l},t.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(n)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var a=!("__proto__"in Object.create(null));function l(e){return e}function c(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function u(e,t){return e===t?0:e>t?1:-1}t.toSetString=a?l:function(e){return c(e)?"$"+e:e},t.fromSetString=a?l:function(e){return c(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=e.source-t.source;return 0!==r||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:e.name-t.name},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=e.source-t.source)||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:e.name-t.name},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=u(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:u(e.name,t.name)}},65:function(e,t,n){t.SourceMapGenerator=n(1945).SourceMapGenerator,t.SourceMapConsumer=n(1606).SourceMapConsumer,t.SourceNode=n(1171).SourceNode},7885:function(e,t,n){var r,i,o;!function(s,a){"use strict";i=[n(65),n(343)],void 0===(o="function"==typeof(r=function(e,t){function n(e){return new Promise((function(t,n){var r=new XMLHttpRequest;r.open("get",e),r.onerror=n,r.onreadystatechange=function(){4===r.readyState&&(r.status>=200&&r.status<300||"file://"===e.substr(0,7)&&r.responseText?t(r.responseText):n(new Error("HTTP status: "+r.status+" retrieving "+e)))},r.send()}))}function r(e){if("undefined"!=typeof window&&window.atob)return window.atob(e);throw new Error("You must supply a polyfill for window.atob in this environment")}function i(e){if("undefined"!=typeof JSON&&JSON.parse)return JSON.parse(e);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function o(e,t){for(var n=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],r=e.split("\n"),i="",o=Math.min(t,20),s=0;s=0&&(a=a.substr(0,l)),a){i=a+i;for(var c=n.length,u=0;u=200&&s.status<400?i(s.responseText):o(new Error("POST to "+t+" failed with status: "+s.status)))},s.open("post",t),s.setRequestHeader("Content-Type","application/json"),r&&"object"==typeof r.headers){var a=r.headers;for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&s.setRequestHeader(l,a[l])}var c={stack:e};null!=n&&(c.message=n),s.send(JSON.stringify(c))}))}}},void 0===(o="function"==typeof r?r.apply(t,i):r)||(e.exports=o)}()},6099:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(6308));function o(e){if(!e.options.indentation&&!e.options.lineSeparator)return;let t;for(e.content+=e.options.lineSeparator,t=0;t0&&(!n&&t.content.length>0&&o(t),s(t,e))}(e.content,t,n);else if("Element"===e.type)!function(e,t,n){t.path.push(e.name),!n&&t.content.length>0&&o(t);if(s(t,"<"+e.name),l(t,e.attributes),null===e.children||t.options.forceSelfClosingEmptyTag&&0===e.children.length){const e=t.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";s(t,e)}else if(0===e.children.length)s(t,">"+e.name+">");else{const r=e.children;s(t,">"),t.level++;let i="preserve"===e.attributes["xml:space"],l=!1;if(!i&&t.options.ignoredPaths&&(l=function(e,t){const n="/"+e.join("/"),r=e[e.length-1];return t.includes(r)||t.includes(n)}(t.path,t.options.ignoredPaths),i=l),!i&&t.options.collapseContent){let e=!1,t=!1,o=!1;r.forEach((function(i,s){"Text"===i.type?(i.content.includes("\n")?(t=!0,i.content=i.content.trim()):0!==s&&s!==r.length-1||n||0===i.content.trim().length&&(i.content=""),i.content.trim().length>0&&(e=!0)):"CDATA"===i.type?e=!0:o=!0})),!e||o&&t||(i=!0)}r.forEach((function(e){a(e,t,n||i)})),t.level--,n||i||o(t),l&&function(e){let t;for(e.content=e.content.replace(/ +$/,""),t=0;t")}t.path.pop()}(e,t,n);else{if("ProcessingInstruction"!==e.type)throw new Error("Unknown node type: "+e.type);c(e,t)}}function l(e,t){Object.keys(t).forEach((function(n){const r=t[n].replace(/"/g,""");s(e," "+n+'="'+r+'"')}))}function c(e,t){t.content.length>0&&o(t),s(t,""+e.name),l(t,e.attributes),s(t,"?>")}function u(e,t={}){t.indentation="indentation"in t?t.indentation:" ",t.collapseContent=!0===t.collapseContent,t.lineSeparator="lineSeparator"in t?t.lineSeparator:"\r\n",t.whiteSpaceAtEndOfSelfclosingTag=!0===t.whiteSpaceAtEndOfSelfclosingTag,t.throwOnFailure=!1!==t.throwOnFailure;try{const n=(0,i.default)(e,{filter:t.filter,strictMode:t.strictMode}),r={content:"",level:0,options:t,path:[]};return n.declaration&&c(n.declaration,r),n.children.forEach((function(e){a(e,r,!1)})),t.lineSeparator?r.content.replace(/\r\n/g,"\n").replace(/\n/g,t.lineSeparator):r.content}catch(n){if(t.throwOnFailure)throw n;return e}}u.minify=(e,t={})=>u(e,Object.assign(Object.assign({},t),{indentation:"",lineSeparator:""})),e.exports=u,t.default=u},6308:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParsingError=void 0;class n extends Error{constructor(e,t){super(e),this.cause=t}}let r;function i(){return a(!1)||function(){const e=u(/^([^<]+)/);if(e){const t={type:"Text",content:e[1]};return{excluded:!1===r.options.filter(t),node:t}}}()||l()||function(){if(r.xml.startsWith("");if(e>-1){const t=e+3,n={type:"CDATA",content:r.xml.substring(0,t)};return r.xml=r.xml.slice(t),{excluded:!1===r.options.filter(n),node:n}}}}()}function o(){return u(/\s*/),a(!0)||l()||function(){const e=u(/^]*>/)||u(/^]*>/)||u(/^/)||u(/^/);if(e){const t={type:"DocumentType",content:e[0]};return{excluded:!1===r.options.filter(t),node:t}}}()||s(!1)}function s(e){const t=u(e?/^<\?(xml)\s*/:/^<\?([\w-:.]+)\s*/);if(!t)return;const n={name:t[1],type:"ProcessingInstruction",attributes:{}};for(;!d()&&!h("?>");){const e=c();if(!e)return;n.attributes[e.name]=e.value}return u(/\?>/),{excluded:!e&&!1===r.options.filter(n),node:n}}function a(e){const t=u(/^<([^?!>\s]+)\s*/);if(!t)return;const o={type:"Element",name:t[1],attributes:{},children:[]},s=!e&&!1===r.options.filter(o);for(;!(d()||h(">")||h("?>")||h("/>"));){const e=c();if(!e)return;o.attributes[e.name]=e.value}if(u(/^\s*\/>/))return o.children=null,{excluded:s,node:o};u(/\??>/);let a=i();for(;a;)a.excluded||o.children.push(a.node),a=i();if(r.options.strictMode){const e=`${o.name}>`;if(!r.xml.startsWith(e))throw new n("Failed to parse XML",`Closing tag not matching "${e}"`);r.xml=r.xml.slice(e.length)}else u(/^<\/\s*[\w-:.\u00C0-\u00FF]+>/);return{excluded:s,node:o}}function l(){const e=u(/^/);if(e){const t={type:"Comment",content:e[0]};return{excluded:!1===r.options.filter(t),node:t}}}function c(){const e=u(/([^=]+)\s*=\s*("[^"]*"|'[^']*'|[^>\s]+)\s*/);if(e)return{name:e[1].trim(),value:(t=e[2].trim(),t.replace(/^['"]|['"]$/g,""))};var t}function u(e){const t=r.xml.match(e);if(t)return r.xml=r.xml.slice(t[0].length),t}function d(){return 0===r.xml.length}function h(e){return 0===r.xml.indexOf(e)}function p(e,t={}){e=e.trim();const i=t.filter||(()=>!0);return r={xml:e,options:Object.assign(Object.assign({},t),{filter:i,strictMode:!0===t.strictMode})},function(){const e=s(!0),t=[];let i,a=o();for(;a;){if("Element"===a.node.type){if(i)throw new Error("Found multiple root nodes");i=a.node}a.excluded||t.push(a.node),a=o()}if(!i)throw new n("Failed to parse XML","Root Element not found");if(0!==r.xml.length)throw new n("Failed to parse XML","Not Well-Formed XML");return{declaration:e?e.node:null,root:i,children:t}}()}t.ParsingError=n,e.exports=p,t.default=p},5616:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,l=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},c=o.push,u=o.indexOf,d={},h=d.toString,p=d.hasOwnProperty,f=p.toString,m=f.call(Object),g={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in w)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function C(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[h.call(e)]||"object":typeof e}var E="3.7.1",k=/HTML$/i,A=function(e,t){return new A.fn.init(e,t)};function O(e){var t=!!e&&"length"in e&&e.length,n=C(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}A.fn=A.prototype={jquery:E,constructor:A,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=A.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return A.each(this,e)},map:function(e){return this.pushStack(A.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(A.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(A.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+j+")"+j+"*"),I=new RegExp(j+"|>"),H=new RegExp(R),z=new RegExp("^"+L+"$"),U={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,W=/^h\d$/i,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/[+~]/,J=new RegExp("\\\\[\\da-fA-F]{1,6}"+j+"?|\\\\([^\\r\\n\\f])","g"),X=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Y=function(){le()},Z=he((function(e){return!0===e.disabled&&S(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(o=a.call(D.childNodes),D.childNodes),o[D.childNodes.length].nodeType}catch(e){m={apply:function(e,t){F.apply(e,a.call(t))},call:function(e){F.apply(e,a.call(arguments,1))}}}function Q(e,t,n,r){var i,o,s,a,c,u,p,f=t&&t.ownerDocument,y=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==y&&9!==y&&11!==y)return n;if(!r&&(le(t),t=t||l,d)){if(11!==y&&(c=K.exec(e)))if(i=c[1]){if(9===y){if(!(s=t.getElementById(i)))return n;if(s.id===i)return m.call(n,s),n}else if(f&&(s=f.getElementById(i))&&Q.contains(t,s)&&s.id===i)return m.call(n,s),n}else{if(c[2])return m.apply(n,t.getElementsByTagName(e)),n;if((i=c[3])&&t.getElementsByClassName)return m.apply(n,t.getElementsByClassName(i)),n}if(!(E[e+" "]||h&&h.test(e))){if(p=e,f=t,1===y&&(I.test(e)||q.test(e))){for((f=G.test(e)&&ae(t.parentNode)||t)==t&&g.scope||((a=t.getAttribute("id"))?a=A.escapeSelector(a):t.setAttribute("id",a=v)),o=(u=ue(e)).length;o--;)u[o]=(a?"#"+a:":scope")+" "+de(u[o]);p=u.join(",")}try{return m.apply(n,f.querySelectorAll(p)),n}catch(t){E(e,!0)}finally{a===v&&t.removeAttribute("id")}}}return ye(e.replace(P,"$1"),t,n,r)}function ee(){var e=[];return function n(r,i){return e.push(r+" ")>t.cacheLength&&delete n[e.shift()],n[r+" "]=i}}function te(e){return e[v]=!0,e}function ne(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return S(t,"input")&&t.type===e}}function ie(e){return function(t){return(S(t,"input")||S(t,"button"))&&t.type===e}}function oe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Z(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function se(e){return te((function(t){return t=+t,te((function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function ae(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var n,r=e?e.ownerDocument||e:D;return r!=l&&9===r.nodeType&&r.documentElement?(c=(l=r).documentElement,d=!A.isXMLDoc(l),f=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&D!=l&&(n=l.defaultView)&&n.top!==n&&n.addEventListener("unload",Y),g.getById=ne((function(e){return c.appendChild(e).id=A.expando,!l.getElementsByName||!l.getElementsByName(A.expando).length})),g.disconnectedMatch=ne((function(e){return f.call(e,"*")})),g.scope=ne((function(){return l.querySelectorAll(":scope")})),g.cssHas=ne((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),g.getById?(t.filter.ID=function(e){var t=e.replace(J,X);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(J,X);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&d)return t.getElementsByClassName(e)},h=[],ne((function(e){var t;c.appendChild(e).innerHTML=" ",e.querySelectorAll("[selected]").length||h.push("\\["+j+"*(?:value|"+O+")"),e.querySelectorAll("[id~="+v+"-]").length||h.push("~="),e.querySelectorAll("a#"+v+"+*").length||h.push(".#.+[+~]"),e.querySelectorAll(":checked").length||h.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&h.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||h.push("\\["+j+"*name"+j+"*="+j+"*(?:''|\"\")")})),g.cssHas||h.push(":has"),h=h.length&&new RegExp(h.join("|")),k=function(e,t){if(e===t)return s=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!g.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument==D&&Q.contains(D,e)?-1:t===l||t.ownerDocument==D&&Q.contains(D,t)?1:i?u.call(i,e)-u.call(i,t):0:4&n?-1:1)},l):l}for(e in Q.matches=function(e,t){return Q(e,null,null,t)},Q.matchesSelector=function(e,t){if(le(e),d&&!E[t+" "]&&(!h||!h.test(t)))try{var n=f.call(e,t);if(n||g.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){E(t,!0)}return Q(t,l,null,[e]).length>0},Q.contains=function(e,t){return(e.ownerDocument||e)!=l&&le(e),A.contains(e,t)},Q.attr=function(e,n){(e.ownerDocument||e)!=l&&le(e);var r=t.attrHandle[n.toLowerCase()],i=r&&p.call(t.attrHandle,n.toLowerCase())?r(e,n,!d):void 0;return void 0!==i?i:e.getAttribute(n)},Q.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},A.uniqueSort=function(e){var t,n=[],r=0,o=0;if(s=!g.sortStable,i=!g.sortStable&&a.call(e,0),_.call(e,k),s){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)N.call(e,n[r],1)}return i=null,e},A.fn.uniqueSort=function(){return this.pushStack(A.uniqueSort(a.apply(this)))},t=A.expr={cacheLength:50,createPseudo:te,match:U,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(J,X),e[3]=(e[3]||e[4]||e[5]||"").replace(J,X),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Q.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Q.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return U.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&H.test(n)&&(t=ue(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(J,X).toLowerCase();return"*"===e?function(){return!0}:function(e){return S(e,t)}},CLASS:function(e){var t=w[e+" "];return t||(t=new RegExp("(^|"+j+")"+e+"("+j+"|$)"))&&w(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=Q.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,p,f=o!==s?"nextSibling":"previousSibling",m=t.parentNode,g=a&&t.nodeName.toLowerCase(),b=!l&&!a,w=!1;if(m){if(o){for(;f;){for(d=t;d=d[f];)if(a?S(d,g):1===d.nodeType)return!1;p=f="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&b){for(w=(h=(c=(u=m[v]||(m[v]={}))[e]||[])[0]===y&&c[1])&&c[2],d=h&&m.childNodes[h];d=++h&&d&&d[f]||(w=h=0)||p.pop();)if(1===d.nodeType&&++w&&d===t){u[e]=[y,h,w];break}}else if(b&&(w=h=(c=(u=t[v]||(t[v]={}))[e]||[])[0]===y&&c[1]),!1===w)for(;(d=++h&&d&&d[f]||(w=h=0)||p.pop())&&(!(a?S(d,g):1===d.nodeType)||!++w||(b&&((u=d[v]||(d[v]={}))[e]=[y,w]),d!==t)););return(w-=i)===r||w%r==0&&w/r>=0}}},PSEUDO:function(e,n){var r,i=t.pseudos[e]||t.setFilters[e.toLowerCase()]||Q.error("unsupported pseudo: "+e);return i[v]?i(n):i.length>1?(r=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var r,o=i(e,n),s=o.length;s--;)e[r=u.call(e,o[s])]=!(t[r]=o[s])})):function(e){return i(e,0,r)}):i}},pseudos:{not:te((function(e){var t=[],n=[],r=ve(e.replace(P,"$1"));return r[v]?te((function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return Q(e,t).length>0}})),contains:te((function(e){return e=e.replace(J,X),function(t){return(t.textContent||A.text(t)).indexOf(e)>-1}})),lang:te((function(e){return z.test(e||"")||Q.error("unsupported lang: "+e),e=e.replace(J,X).toLowerCase(),function(t){var n;do{if(n=d?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=r.location&&r.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return S(e,"input")&&!!e.checked||S(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return W.test(e.nodeName)},input:function(e){return V.test(e.nodeName)},button:function(e){return S(e,"input")&&"button"===e.type||S(e,"button")},text:function(e){var t;return S(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:se((function(){return[0]})),last:se((function(e,t){return[t-1]})),eq:se((function(e,t,n){return[n<0?n+t:n]})),even:se((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:se((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function fe(e,t,n,r,i){for(var o,s=[],a=0,l=e.length,c=null!=t;a-1&&(o[c]=!(s[c]=h))}}else p=fe(p===s?p.splice(v,p.length):p),i?i(null,s,p,l):m.apply(s,p)}))}function ge(e){for(var r,i,o,s=e.length,a=t.relative[e[0].type],l=a||t.relative[" "],c=a?1:0,d=he((function(e){return e===r}),l,!0),h=he((function(e){return u.call(r,e)>-1}),l,!0),p=[function(e,t,i){var o=!a&&(i||t!=n)||((r=t).nodeType?d(e,t,i):h(e,t,i));return r=null,o}];c1&&pe(p),c>1&&de(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(P,"$1"),i,c0,o=e.length>0,s=function(s,a,c,u,h){var p,f,g,v=0,b="0",w=s&&[],x=[],C=n,E=s||o&&t.find.TAG("*",h),k=y+=null==C?1:Math.random()||.1,O=E.length;for(h&&(n=a==l||a||h);b!==O&&null!=(p=E[b]);b++){if(o&&p){for(f=0,a||p.ownerDocument==l||(le(p),c=!d);g=e[f++];)if(g(p,a||l,c)){m.call(u,p);break}h&&(y=k)}i&&((p=!g&&p)&&v--,s&&w.push(p))}if(v+=b,i&&b!==v){for(f=0;g=r[f++];)g(w,x,a,c);if(s){if(v>0)for(;b--;)w[b]||x[b]||(x[b]=T.call(u));x=fe(x)}m.apply(u,x),h&&!s&&x.length>0&&v+r.length>1&&A.uniqueSort(u)}return h&&(y=k,n=C),w};return i?te(s):s}(s,o)),a.selector=e}return a}function ye(e,n,r,i){var o,s,a,l,c,u="function"==typeof e&&e,h=!i&&ue(e=u.selector||e);if(r=r||[],1===h.length){if((s=h[0]=h[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===n.nodeType&&d&&t.relative[s[1].type]){if(!(n=(t.find.ID(a.matches[0].replace(J,X),n)||[])[0]))return r;u&&(n=n.parentNode),e=e.slice(s.shift().value.length)}for(o=U.needsContext.test(e)?0:s.length;o--&&(a=s[o],!t.relative[l=a.type]);)if((c=t.find[l])&&(i=c(a.matches[0].replace(J,X),G.test(s[0].type)&&ae(n.parentNode)||n))){if(s.splice(o,1),!(e=i.length&&de(s)))return m.apply(r,i),r;break}}return(u||ve(e,h))(i,n,!d,r,!n||G.test(e)&&ae(n.parentNode)||n),r}ce.prototype=t.filters=t.pseudos,t.setFilters=new ce,g.sortStable=v.split("").sort(k).join("")===v,le(),g.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))})),A.find=Q,A.expr[":"]=A.expr.pseudos,A.unique=A.uniqueSort,Q.compile=ve,Q.select=ye,Q.setDocument=le,Q.tokenize=ue,Q.escape=A.escapeSelector,Q.getText=A.text,Q.isXML=A.isXMLDoc,Q.selectors=A.expr,Q.support=A.support,Q.uniqueSort=A.uniqueSort}();var R=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&A(e).is(n))break;r.push(e)}return r},B=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},$=A.expr.match.needsContext,q=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(e,t,n){return v(t)?A.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?A.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?A.grep(e,(function(e){return u.call(t,e)>-1!==n})):A.filter(t,e,n)}A.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?A.find.matchesSelector(r,e)?[r]:[]:A.find.matches(e,A.grep(t,(function(e){return 1===e.nodeType})))},A.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(A(e).filter((function(){for(t=0;t1?A.uniqueSort(n):n},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&$.test(e)?A(e):e||[],!1).length}});var H,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||H,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:z.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof A?t[0]:t,A.merge(this,A.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),q.test(r[1])&&A.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(A):A.makeArray(e,this)}).prototype=A.fn,H=A(b);var U=/^(?:parents|prev(?:Until|All))/,V={children:!0,contents:!0,next:!0,prev:!0};function W(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}A.fn.extend({has:function(e){var t=A(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&A.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?A.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(A(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(A.uniqueSort(A.merge(this.get(),A(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),A.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return R(e,"parentNode")},parentsUntil:function(e,t,n){return R(e,"parentNode",n)},next:function(e){return W(e,"nextSibling")},prev:function(e){return W(e,"previousSibling")},nextAll:function(e){return R(e,"nextSibling")},prevAll:function(e){return R(e,"previousSibling")},nextUntil:function(e,t,n){return R(e,"nextSibling",n)},prevUntil:function(e,t,n){return R(e,"previousSibling",n)},siblings:function(e){return B((e.parentNode||{}).firstChild,e)},children:function(e){return B(e.firstChild)},contents:function(e){return null!=e.contentDocument&&s(e.contentDocument)?e.contentDocument:(S(e,"template")&&(e=e.content||e),A.merge([],e.childNodes))}},(function(e,t){A.fn[e]=function(n,r){var i=A.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=A.filter(r,i)),this.length>1&&(V[e]||A.uniqueSort(i),U.test(e)&&i.reverse()),this.pushStack(i)}}));var K=/[^\x20\t\r\n\f]+/g;function G(e){return e}function J(e){throw e}function X(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}A.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return A.each(e.match(K)||[],(function(e,n){t[n]=!0})),t}(e):A.extend({},e);var t,n,r,i,o=[],s=[],a=-1,l=function(){for(i=i||e.once,r=t=!0;s.length;a=-1)for(n=s.shift();++a-1;)o.splice(n,1),n<=a&&a--})),this},has:function(e){return e?A.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},A.extend({Deferred:function(e){var t=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return A.Deferred((function(n){A.each(t,(function(t,r){var i=v(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var o=0;function s(e,t,n,i){return function(){var a=this,l=arguments,c=function(){var r,c;if(!(e=o&&(n!==J&&(a=void 0,l=[r]),t.rejectWith(a,l))}};e?u():(A.Deferred.getErrorHook?u.error=A.Deferred.getErrorHook():A.Deferred.getStackHook&&(u.error=A.Deferred.getStackHook()),r.setTimeout(u))}}return A.Deferred((function(r){t[0][3].add(s(0,r,v(i)?i:G,r.notifyWith)),t[1][3].add(s(0,r,v(e)?e:G)),t[2][3].add(s(0,r,v(n)?n:J))})).promise()},promise:function(e){return null!=e?A.extend(e,i):i}},o={};return A.each(t,(function(e,r){var s=r[2],a=r[5];i[r[1]]=s.add,a&&s.add((function(){n=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=s.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=a.call(arguments),o=A.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?a.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(X(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||v(i[n]&&i[n].then)))return o.then();for(;n--;)X(i[n],s(n),o.reject);return o.promise()}});var Y=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&Y.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},A.readyException=function(e){r.setTimeout((function(){throw e}))};var Z=A.Deferred();function Q(){b.removeEventListener("DOMContentLoaded",Q),r.removeEventListener("load",Q),A.ready()}A.fn.ready=function(e){return Z.then(e).catch((function(e){A.readyException(e)})),this},A.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==e&&--A.readyWait>0||Z.resolveWith(b,[A]))}}),A.ready.then=Z.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(A.ready):(b.addEventListener("DOMContentLoaded",Q),r.addEventListener("load",Q));var ee=function(e,t,n,r,i,o,s){var a=0,l=e.length,c=null==n;if("object"===C(n))for(a in i=!0,n)ee(e,t,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,v(r)||(s=!0),c&&(s?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(A(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each((function(){le.remove(this,e)}))}}),A.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ae.get(e,t),n&&(!r||Array.isArray(n)?r=ae.access(e,t,A.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=A.queue(e,t),r=n.length,i=n.shift(),o=A._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){A.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ae.get(e,n)||ae.access(e,n,{empty:A.Callbacks("once memory").add((function(){ae.remove(e,[t+"queue",n])}))})}}),A.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,Se=/^$|^module$|\/(?:java|ecma)script/i;Ee=b.createDocumentFragment().appendChild(b.createElement("div")),(ke=b.createElement("input")).setAttribute("type","radio"),ke.setAttribute("checked","checked"),ke.setAttribute("name","t"),Ee.appendChild(ke),g.checkClone=Ee.cloneNode(!0).cloneNode(!0).lastChild.checked,Ee.innerHTML="",g.noCloneChecked=!!Ee.cloneNode(!0).lastChild.defaultValue,Ee.innerHTML=" ",g.option=!!Ee.lastChild;var Te={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function _e(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?A.merge([e],n):n}function Ne(e,t){for(var n=0,r=e.length;n",""]);var je=/<|?\w+;/;function Pe(e,t,n,r,i){for(var o,s,a,l,c,u,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p-1)i&&i.push(o);else if(c=ge(o),s=_e(d.appendChild(o),"script"),c&&Ne(s),n)for(u=0;o=s[u++];)Se.test(o.type||"")&&n.push(o);return d}var Le=/^([^.]*)(?:\.(.+)|)/;function Me(){return!0}function De(){return!1}function Fe(e,t,n,r,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)Fe(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=De;else if(!i)return e;return 1===o&&(s=i,i=function(e){return A().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=A.guid++)),e.each((function(){A.event.add(this,t,i,r,n)}))}function Re(e,t,n){n?(ae.set(e,t,!1),A.event.add(e,t,{namespace:!1,handler:function(e){var n,r=ae.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(A.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=a.call(arguments),ae.set(this,t,r),this[t](),n=ae.get(this,t),ae.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(ae.set(this,t,A.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Me)}})):void 0===ae.get(e,t)&&A.event.add(e,t,Me)}A.event={global:{},add:function(e,t,n,r,i){var o,s,a,l,c,u,d,h,p,f,m,g=ae.get(e);if(oe(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&A.find.matchesSelector(me,i),n.guid||(n.guid=A.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(t){return void 0!==A&&A.event.triggered!==t.type?A.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(K)||[""]).length;c--;)p=m=(a=Le.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(d=A.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,d=A.event.special[p]||{},u=A.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&A.expr.match.needsContext.test(i),namespace:f.join(".")},o),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,f,s)||e.addEventListener&&e.addEventListener(p,s)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,u):h.push(u),A.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,s,a,l,c,u,d,h,p,f,m,g=ae.hasData(e)&&ae.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(K)||[""]).length;c--;)if(p=m=(a=Le.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(d=A.event.special[p]||{},h=l[p=(r?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)u=h[o],!i&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,g.handle)||A.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)A.event.remove(e,p+t[c],n,r,!0);A.isEmptyObject(l)&&ae.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=new Array(arguments.length),l=A.event.fix(e),c=(ae.get(this,"events")||Object.create(null))[l.type]||[],u=A.event.special[l.type]||{};for(a[0]=l,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},n=0;n-1:A.find(i,this,null,[c]).length),s[i]&&o.push(r);o.length&&a.push({elem:c,handlers:o})}return c=this,l\s*$/g;function Ie(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&A(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ze(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ue(e,t){var n,r,i,o,s,a;if(1===t.nodeType){if(ae.hasData(e)&&(a=ae.get(e).events))for(i in ae.remove(t,"handle events"),a)for(n=0,r=a[i].length;n1&&"string"==typeof f&&!g.checkClone&&$e.test(f))return e.each((function(i){var o=e.eq(i);m&&(t[0]=f.call(this,i,o.html())),We(o,t,n,r)}));if(h&&(o=(i=Pe(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=A.map(_e(i,"script"),He)).length;d0&&Ne(s,!l&&_e(e,"script")),a},cleanData:function(e){for(var t,n,r,i=A.event.special,o=0;void 0!==(n=e[o]);o++)if(oe(n)){if(t=n[ae.expando]){if(t.events)for(r in t.events)i[r]?A.event.remove(n,r):A.removeEvent(n,r,t.handle);n[ae.expando]=void 0}n[le.expando]&&(n[le.expando]=void 0)}}}),A.fn.extend({detach:function(e){return Ke(this,e,!0)},remove:function(e){return Ke(this,e)},text:function(e){return ee(this,(function(e){return void 0===e?A.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return We(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ie(this,e).appendChild(e)}))},prepend:function(){return We(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ie(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return We(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return We(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(A.cleanData(_e(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return A.clone(this,e,t)}))},html:function(e){return ee(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Be.test(e)&&!Te[(Oe.exec(e)||["",""])[1].toLowerCase()]){e=A.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))||0),l+c}function ut(e,t,n){var r=Xe(e),i=(!g.boxSizingReliable()||n)&&"border-box"===A.css(e,"boxSizing",!1,r),o=i,s=Qe(e,t,r),a="offset"+t[0].toUpperCase()+t.slice(1);if(Ge.test(s)){if(!n)return s;s="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&S(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===A.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===A.css(e,"boxSizing",!1,r),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+ct(e,t,n||(i?"border":"content"),o,r,s)+"px"}function dt(e,t,n,r,i){return new dt.prototype.init(e,t,n,r,i)}A.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Qe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=ie(t),l=Je.test(t),c=e.style;if(l||(t=it(a)),s=A.cssHooks[t]||A.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:c[t];"string"===(o=typeof n)&&(i=pe.exec(n))&&i[1]&&(n=be(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=i&&i[3]||(A.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,s,a=ie(t);return Je.test(t)||(t=it(a)),(s=A.cssHooks[t]||A.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Qe(e,t,r)),"normal"===i&&t in at&&(i=at[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),A.each(["height","width"],(function(e,t){A.cssHooks[t]={get:function(e,n,r){if(n)return!ot.test(A.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ut(e,t,r):Ye(e,st,(function(){return ut(e,t,r)}))},set:function(e,n,r){var i,o=Xe(e),s=!g.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===A.css(e,"boxSizing",!1,o),l=r?ct(e,t,r,a,o):0;return a&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-ct(e,t,"border",!1,o)-.5)),l&&(i=pe.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=A.css(e,t)),lt(0,n,l)}}})),A.cssHooks.marginLeft=et(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Qe(e,"marginLeft"))||e.getBoundingClientRect().left-Ye(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(e,t){A.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+fe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(A.cssHooks[e+t].set=lt)})),A.fn.extend({css:function(e,t){return ee(this,(function(e,t,n){var r,i,o={},s=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;s1)}}),A.Tween=dt,dt.prototype={constructor:dt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||A.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(A.cssNumber[n]?"":"px")},cur:function(){var e=dt.propHooks[this.prop];return e&&e.get?e.get(this):dt.propHooks._default.get(this)},run:function(e){var t,n=dt.propHooks[this.prop];return this.options.duration?this.pos=t=A.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):dt.propHooks._default.set(this),this}},dt.prototype.init.prototype=dt.prototype,dt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=A.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){A.fx.step[e.prop]?A.fx.step[e.prop](e):1!==e.elem.nodeType||!A.cssHooks[e.prop]&&null==e.elem.style[it(e.prop)]?e.elem[e.prop]=e.now:A.style(e.elem,e.prop,e.now+e.unit)}}},dt.propHooks.scrollTop=dt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},A.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},A.fx=dt.prototype.init,A.fx.step={};var ht,pt,ft=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;function gt(){pt&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(gt):r.setTimeout(gt,A.fx.interval),A.fx.tick())}function vt(){return r.setTimeout((function(){ht=void 0})),ht=Date.now()}function yt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=fe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function bt(e,t,n){for(var r,i=(wt.tweeners[t]||[]).concat(wt.tweeners["*"]),o=0,s=i.length;o1)},removeAttr:function(e){return this.each((function(){A.removeAttr(this,e)}))}}),A.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?A.prop(e,t,n):(1===o&&A.isXMLDoc(e)||(i=A.attrHooks[t.toLowerCase()]||(A.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void A.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=A.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&S(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(K);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),xt={set:function(e,t,n){return!1===t?A.removeAttr(e,n):e.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=Ct[t]||A.find.attr;Ct[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=Ct[s],Ct[s]=i,i=null!=n(e,t,r)?s:null,Ct[s]=o),i}}));var Et=/^(?:input|select|textarea|button)$/i,kt=/^(?:a|area)$/i;function At(e){return(e.match(K)||[]).join(" ")}function Ot(e){return e.getAttribute&&e.getAttribute("class")||""}function St(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(K)||[]}A.fn.extend({prop:function(e,t){return ee(this,A.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[A.propFix[e]||e]}))}}),A.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&A.isXMLDoc(e)||(t=A.propFix[t]||t,i=A.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=A.find.attr(e,"tabindex");return t?parseInt(t,10):Et.test(e.nodeName)||kt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(A.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(e){var t,n,r,i,o,s;return v(e)?this.each((function(t){A(this).addClass(e.call(this,t,Ot(this)))})):(t=St(e)).length?this.each((function(){if(r=Ot(this),n=1===this.nodeType&&" "+At(r)+" "){for(o=0;o-1;)n=n.replace(" "+i+" "," ");s=At(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,s=typeof e,a="string"===s||Array.isArray(e);return v(e)?this.each((function(n){A(this).toggleClass(e.call(this,n,Ot(this),t),t)})):"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):(n=St(e),this.each((function(){if(a)for(o=A(this),i=0;i-1)return!0;return!1}});var Tt=/\r/g;A.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=v(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,A(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=A.map(i,(function(e){return null==e?"":e+""}))),(t=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=A.valHooks[i.type]||A.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Tt,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(e){var t=A.find.attr(e,"value");return null!=t?t:At(A.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:i.length;for(r=o<0?l:s?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=A.inArray(A(e).val(),t)>-1}},g.checkOn||(A.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var _t=r.location,Nt={guid:Date.now()},jt=/\?/;A.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||A.error("Invalid XML: "+(n?A.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Pt=/^(?:focusinfocus|focusoutblur)$/,Lt=function(e){e.stopPropagation()};A.extend(A.event,{trigger:function(e,t,n,i){var o,s,a,l,c,u,d,h,f=[n||b],m=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(s=h=a=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!Pt.test(m+A.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[A.expando]?e:new A.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:A.makeArray(t,[e]),d=A.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(n,t))){if(!i&&!d.noBubble&&!y(n)){for(l=d.delegateType||m,Pt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(n.ownerDocument||b)&&f.push(a.defaultView||a.parentWindow||r)}for(o=0;(s=f[o++])&&!e.isPropagationStopped();)h=s,e.type=o>1?l:d.bindType||m,(u=(ae.get(s,"events")||Object.create(null))[e.type]&&ae.get(s,"handle"))&&u.apply(s,t),(u=c&&s[c])&&u.apply&&oe(s)&&(e.result=u.apply(s,t),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),t)||!oe(n)||c&&v(n[m])&&!y(n)&&((a=n[c])&&(n[c]=null),A.event.triggered=m,e.isPropagationStopped()&&h.addEventListener(m,Lt),n[m](),e.isPropagationStopped()&&h.removeEventListener(m,Lt),A.event.triggered=void 0,a&&(n[c]=a)),e.result}},simulate:function(e,t,n){var r=A.extend(new A.Event,n,{type:e,isSimulated:!0});A.event.trigger(r,null,t)}}),A.fn.extend({trigger:function(e,t){return this.each((function(){A.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return A.event.trigger(e,t,n,!0)}});var Mt=/\[\]$/,Dt=/\r?\n/g,Ft=/^(?:submit|button|image|reset|file)$/i,Rt=/^(?:input|select|textarea|keygen)/i;function Bt(e,t,n,r){var i;if(Array.isArray(t))A.each(t,(function(t,i){n||Mt.test(e)?r(e,i):Bt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==C(t))r(e,t);else for(i in t)Bt(e+"["+i+"]",t[i],n,r)}A.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!A.isPlainObject(e))A.each(e,(function(){i(this.name,this.value)}));else for(n in e)Bt(n,e[n],t,i);return r.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=A.prop(this,"elements");return e?A.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!A(this).is(":disabled")&&Rt.test(this.nodeName)&&!Ft.test(e)&&(this.checked||!Ae.test(e))})).map((function(e,t){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}})):{name:t.name,value:n.replace(Dt,"\r\n")}})).get()}});var $t=/%20/g,qt=/#.*$/,It=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,zt=/^(?:GET|HEAD)$/,Ut=/^\/\//,Vt={},Wt={},Kt="*/".concat("*"),Gt=b.createElement("a");function Jt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(K)||[];if(v(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Xt(e,t,n,r){var i={},o=e===Wt;function s(a){var l;return i[a]=!0,A.each(e[a]||[],(function(e,a){var c=a(t,n,r);return"string"!=typeof c||o||i[c]?o?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)})),l}return s(t.dataTypes[0])||!i["*"]&&s("*")}function Yt(e,t){var n,r,i=A.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&A.extend(!0,e,r),e}Gt.href=_t.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_t.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_t.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Yt(Yt(e,A.ajaxSettings),t):Yt(A.ajaxSettings,e)},ajaxPrefilter:Jt(Vt),ajaxTransport:Jt(Wt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,o,s,a,l,c,u,d,h,p=A.ajaxSetup({},t),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?A(f):A.event,g=A.Deferred(),v=A.Callbacks("once memory"),y=p.statusCode||{},w={},x={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Ht.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||C;return n&&n.abort(t),k(0,t),this}};if(g.promise(E),p.url=((e||p.url||_t.href)+"").replace(Ut,_t.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(K)||[""],null==p.crossDomain){l=b.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Gt.protocol+"//"+Gt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=A.param(p.data,p.traditional)),Xt(Vt,p,t,E),c)return E;for(d in(u=A.event&&p.global)&&0==A.active++&&A.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!zt.test(p.type),i=p.url.replace(qt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace($t,"+")):(h=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(jt.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(It,"$1"),h=(jt.test(i)?"&":"?")+"_="+Nt.guid+++h),p.url=i+h),p.ifModified&&(A.lastModified[i]&&E.setRequestHeader("If-Modified-Since",A.lastModified[i]),A.etag[i]&&E.setRequestHeader("If-None-Match",A.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&E.setRequestHeader("Content-Type",p.contentType),E.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Kt+"; q=0.01":""):p.accepts["*"]),p.headers)E.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(f,E,p)||c))return E.abort();if(C="abort",v.add(p.complete),E.done(p.success),E.fail(p.error),n=Xt(Wt,p,t,E)){if(E.readyState=1,u&&m.trigger("ajaxSend",[E,p]),c)return E;p.async&&p.timeout>0&&(a=r.setTimeout((function(){E.abort("timeout")}),p.timeout));try{c=!1,n.send(w,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(e,t,s,l){var d,h,b,w,x,C=t;c||(c=!0,a&&r.clearTimeout(a),n=void 0,o=l||"",E.readyState=e>0?4:0,d=e>=200&&e<300||304===e,s&&(w=function(e,t,n){for(var r,i,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(p,E,s)),!d&&A.inArray("script",p.dataTypes)>-1&&A.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),w=function(e,t,n,r){var i,o,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=c[l+" "+o]||c["* "+o]))for(i in c)if((a=i.split(" "))[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[i]:!0!==c[i]&&(o=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(p,w,E,d),d?(p.ifModified&&((x=E.getResponseHeader("Last-Modified"))&&(A.lastModified[i]=x),(x=E.getResponseHeader("etag"))&&(A.etag[i]=x)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=w.state,h=w.data,d=!(b=w.error))):(b=C,!e&&C||(C="error",e<0&&(e=0))),E.status=e,E.statusText=(t||C)+"",d?g.resolveWith(f,[h,C,E]):g.rejectWith(f,[E,C,b]),E.statusCode(y),y=void 0,u&&m.trigger(d?"ajaxSuccess":"ajaxError",[E,p,d?h:b]),v.fireWith(f,[E,C]),u&&(m.trigger("ajaxComplete",[E,p]),--A.active||A.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return A.get(e,t,n,"json")},getScript:function(e,t){return A.get(e,void 0,t,"script")}}),A.each(["get","post"],(function(e,t){A[t]=function(e,n,r,i){return v(n)&&(i=i||r,r=n,n=void 0),A.ajax(A.extend({url:e,type:t,dataType:i,data:n,success:r},A.isPlainObject(e)&&e))}})),A.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),A._evalUrl=function(e,t,n){return A.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){A.globalEval(e,t,n)}})},A.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=A(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){A(this).wrapInner(e.call(this,t))})):this.each((function(){var t=A(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(n){A(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(e){return!A.expr.pseudos.visible(e)},A.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Zt={0:200,1223:204},Qt=A.ajaxSettings.xhr();g.cors=!!Qt&&"withCredentials"in Qt,g.ajax=Qt=!!Qt,A.ajaxTransport((function(e){var t,n;if(g.cors||Qt&&!e.crossDomain)return{send:function(i,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);t=function(e){return function(){t&&(t=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Zt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),n=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),A.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),A.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return A.globalEval(e),e}}}),A.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),A.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=A("
+
+```php
+{{ id }}
+
+flash()
+ ->priority(3)
+ ->success('{{ successMessage }}');
+
+flash()
+ ->priority(1)
+ ->error('{{ errorMessage }}');
+
+flash()
+ ->priority(4)
+ ->warning('{{ warningMessage }}');
+
+flash()
+ ->priority(2)
+ ->info('{{ infoMessage }}');
+```
+
+| param | description |
+|-------------|--------------------------------------------------------------------------------------------|
+| `$priority` | The priority of the notification, the higher the priority, the sooner it will be displayed |
+
+---
+
+ hops
+
+This method sets the number of requests that the flash message should persist for. By default, flash messages are only displayed for a single request and are then discarded. By setting the number of hops, the flash message will be persisted for multiple requests.
+
+As an example, with a multi-page form, you may want to store messages until all pages have been filled.
+
+{% assign id = '#/ usage hops' %}
+{% assign type = site.data.messages.types | sample %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+flash()->hops(int $hops);
+```
+
+```php
+flash()
+ ->hops(2)
+ ->{{ type }}('{{ message }}');
+```
+
+| param | description |
+|---------|---------------------------------------------------------------|
+| `$hops` | indicate how many requests the flash message will persist for |
+
+---
+
+ translate
+
+This method sets the `locale` to be used for the translation of the flash message. If a non-null value is provided,
+the flash message will be translated into the specified language. If null is provided, the **default** `locale` will be used.
+
+```php
+flash()->translate(string $locale = null);
+```
+
+{% assign id = '#/ usage translate' %}
+{% assign type = 'success' %}
+{% assign message = 'ุชู
ุช ุงูุนู
ููุฉ ุจูุฌุงุญ.' %}
+{% assign title = 'ุชูุงูููุง' %}
+{% assign options = '{"rtl": true, "position": "top-right"}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+flash()
+ ->translate('ar')
+ ->{{ type }}('Your request was processed successfully.', 'Congratulations!');
+```
+
+{% assign id = '#/ usage translate with position' %}
+{% assign type = 'success' %}
+{% assign message = 'ุชู
ุช ุงูุนู
ููุฉ ุจูุฌุงุญ.' %}
+{% assign title = 'ุชูุงูููุง' %}
+{% assign options = '{"rtl": true, "position": "top-left"}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+flash()
+ ->translate('ar')
+ ->option('position', 'top-left')
+ ->{{ type }}('Your request was processed successfully.', 'Congratulations!');
+```
+
+| param | description |
+|-----------|------------------------------------------------------------------------------|
+| `$locale` | The locale to be used for the translation, or null to use the default locale |
+
+It is **important** to note that the `translate()` method only sets the locale to be used for the translation of the flash message.
+It does not actually perform the translation itself.
+
+In order to translate the flash message, you will need to provide the appropriate translation keys in your translation files.
+
+In the above example, to translate the flash message into `Arabic`, If you are using ** Laravel** you will need to add the following keys to the `resources/lang/ar/messages.php` file:
+
+```php
+return [
+ 'Your request was processed successfully.' => 'ุชู
ุช ุงูุนู
ููุฉ ุจูุฌุงุญ.',
+ 'Congratulations!' => 'ุชูุงูููุง',
+];
+```
diff --git a/docs/pages/javascript.md b/docs/pages/javascript.md
index 0f374054..487715c8 100644
--- a/docs/pages/javascript.md
+++ b/docs/pages/javascript.md
@@ -5,16 +5,16 @@ title: JavaScript
description: Easily add flash notification messages to your JavaScript application with PHPFlasher. Follow our step-by-step guide to install the library using npm or include it in your project using CDN links, and start engaging and informing your users with powerful flash messages.
---
-{% PHPFlasher %} assets can be installed from a cdn or using npm
+PHPFlasher assets can be installed from a cdn or using npm
## Installation
-Quick start guide for installing the {% PHPFlasher %} from cdn or npm.
+Quick start guide for installing the PHPFlasher from cdn or npm.
---
### cdn
-To pull in the {% PHPFlasher %} via CDN, grab the latest version from [jsdelivr](https://www.jsdelivr.com/package/npm/@flasher/flasher)
+To pull in the PHPFlasher via CDN, grab the latest version from [jsdelivr](https://www.jsdelivr.com/package/npm/@flasher/flasher)
@@ -33,7 +33,7 @@ To pull in the {% PHPFlasher %} via CDN, grab the latest version from [jsdelivr]
### npm
-To install {% PHPFlasher %} from npm use the following command:
+To install PHPFlasher from npm use the following command:
```shell
npm i @flasher/flasher
@@ -68,7 +68,7 @@ or if you are using a cdn like this:
### Other adapters
-First grad the cdn for any js library adapter supported by {% PHPFlasher %} or install it with npm
+First grad the cdn for any js library adapter supported by PHPFlasher or install it with npm
and then call the `create()` method on flasher object :
```html
diff --git a/docs/pages/laravel.md b/docs/pages/laravel.md
index 3fcebdac..bc6d5986 100644
--- a/docs/pages/laravel.md
+++ b/docs/pages/laravel.md
@@ -6,45 +6,31 @@ description: Easily add flash notification messages to your Laravel application
framework: laravel
---
-## {% PHPFlasher %} Laravel
+## Requirements
-{% PHPFlasher %} is a trusted and well-supported package
-that allows you to easily integrate flash notification messages into your **Laravel** projects.
+PHPFlasher offers a seamless way to incorporate flash notifications in Laravel projects, enhancing user feedback with minimal setup.
-To use {% PHPFlasher %} in a **Laravel** application, you need :
+Requirements for using PHPFlasher with Laravel:
-> **PHP** >= 8.2
-> **Laravel** >= 11.0
+> **PHP** v8.2 or higher
+> **Laravel** v11.0 or higher
---
## Installation
-{% PHPFlasher %} is modular and consists of multiple libraries,
-allowing users to install and use only the specific components they need for their project.
-
-{% PHPFlasher %} can be installed using composer :
+PHPFlasher 's modular design lets you select and install only the components your project needs.
```shell
composer require php-flasher/flasher-laravel
```
-After installation, you need to run another command to set up the necessary assets for {% PHPFlasher %}:
+After installation, you need to run another command to set up the necessary assets for PHPFlasher :
```shell
php artisan flasher:install
```
-
----
-
-{% PHPFlasher %} includes a default notification style , but users can also install additional adapters to customize the appearance of notifications within their projects such as :
-
-* **[Toastr](/library/toastr/)**
-* **[Noty](/library/noty/)**
-* **[Notyf](/library/notyf/)**
-* **[Sweet Alert](/library/sweetalert/)**
-
---
{% include _usage.md %}
@@ -56,7 +42,7 @@ php artisan flasher:install
As optional, if you want to modify the default configuration, you can publish the configuration file:
```bash
-php artisan flasher:install
+php artisan flasher:install --config
```
The configuration file will be located at `config/flasher.php` and will have the following content:
@@ -76,10 +62,10 @@ return [
'/vendor/flasher/flasher.min.css',
],
- // Whether to translate PHPFlasher messages using Laravel's translation service
+ // Enable translation of PHPFlasher messages using Laravel's translator service
'translate' => true,
- // Automatically inject PHPFlasher assets into HTML response
+ // Automatically inject PHPFlasher assets in HTML response
'inject_assets' => true,
// Configuration for the flash bag (converting Laravel flash messages)
@@ -194,10 +180,10 @@ class BookController
## RTL support
-{% PHPFlasher %} makes it easy to incorporate **right-to-left** languages like `Arabic` or `Hebrew`.
-it automatically detects the text direction and handles the necessary adjustments for you.
+PHPFlasher makes it easy to incorporate **right-to-left** languages like `Arabic` or `Hebrew`.
+it automatically detects the text direction and handles the necessary adjustments for you.
-Simply make sure the translation service is enabled and let {% PHPFlasher %} handle the rest.
+Simply make sure the translation service is enabled and let PHPFlasher handle the rest.
{% assign id = '#/ phpflasher rtl' %}
{% assign type = 'success' %}
@@ -218,14 +204,14 @@ flash()
## Translation
-{% PHPFlasher %} allows you to translate your notification `messages`, `presets`, it comes with `Arabic`, `English` and `French` translations out of the box, but you can easily add your own translations.
+PHPFlasher allows you to translate your notification `messages` and `presets`, it comes with `Arabic`, `English`, `French`, `German`, `Spanish`, `Portuguese`, `Russian`, and `Chinese` translations out of the box. but you can easily add your own translations.
-For example, if you need to override the `English` translation strings for {% PHPFlasher %}, you can create a language file at the following location:
+For example, to override the `English` translation strings for PHPFlasher , you can create a language file at the following location:
**`/resources/lang/vendor/flasher/en/messages.php`**.
-In this file, you should **only** define the translation strings you want to override. Any translation strings that you don't override will still be loaded from {% PHPFlasher %}'s original language files.
+In this file, you should **only** define the translation strings you want to override. Any translation strings that you don't override will still be loaded from PHPFlasher 's original language files.
-Here is a list of the default translation keys for {% PHPFlasher %}:
+Here are examples of the default translation keys for `Arabic`, `English`, and `French` in PHPFlasher :
```php
These translation files facilitate localizing notifications to match user preferences and ensure that your applications can communicate effectively across different linguistic contexts.
+
{% assign id = '#/ laravel arabic translations' %}
{% assign successMessage = 'ุชู
ุฅูุดุงุก ุงูู
ูู' %}
{% assign errorMessage = 'ุญุฏุซ ุฎุทุฃ ุฃุซูุงุก ุฅุฑุณุงู ุทูุจู.' %}
diff --git a/docs/pages/library/noty.md b/docs/pages/library/noty.md
index 18581928..c6ad45a4 100644
--- a/docs/pages/library/noty.md
+++ b/docs/pages/library/noty.md
@@ -6,36 +6,96 @@ handler: noty
data-controller: noty
---
-## Installation
+## Laravel
-** Laravel**:
+ Installation
```shell
composer require php-flasher/flasher-noty-laravel
```
-Then, run:
+
+After installation, you need to run another command to set up the necessary assets for PHPFlasher :
+
```shell
php artisan flasher:install
```
+ Configuration
+
+```php
+ [
+ 'noty' => [
+ 'scripts' => [
+ '/vendor/flasher/noty.min.js',
+ '/vendor/flasher/flasher-noty.min.js'
+ ],
+ 'styles' => [
+ '/vendor/flasher/noty.css',
+ '/vendor/flasher/mint.css'
+ ],
+ 'options' => [
+ // Optional: Add global options here
+ 'layout' => 'topRight'
+ ],
+ ],
+ ],
+];
+```
-** Symfony**:
+## Symfony
+
+ Installation
```shell
composer require php-flasher/flasher-noty-symfony
```
-Then, run:
+
+After installation, you need to run another command to set up the necessary assets for PHPFlasher :
+
```shell
php bin/console flasher:install
```
+ Configuration
+
+```yaml
+# config/packages/flasher.yaml
+
+flasher:
+ plugins:
+ noty:
+ scripts:
+ - '/vendor/flasher/noty.min.js'
+ - '/vendor/flasher/flasher-noty.min.js'
+ styles:
+ - '/vendor/flasher/noty.css'
+ - '/vendor/flasher/mint.css'
+ options:
+ # Optional: Add global options here
+ layout: topRight
+```
+
---
## Usage
+---
+
+> The methods described in the **[Usage](/installation/#-usage)** section can also be used with the `notyf` adapter.
+
+---
+
+To display a notification message, you can either use the `noty()` helper method or obtain an instance of `noty` from the service container.
+Then, before returning a view or redirecting, call the `success()` method and pass in the desired message to be displayed.
+
+ success
+
{% assign id = '#/ noty' %}
-{% assign type = site.data.messages.types | sample %}
+{% assign type = 'success' %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{}' %}
{% include example.html %}
@@ -43,26 +103,82 @@ php bin/console flasher:install
```php
{{ id }}
-namespace App\Controller;
+use Flasher\Noty\Prime\NotyInterface;
-class AppController
+class BookController
{
- public function save()
+ public function saveBook()
{
- noty()->{{ type }}('{{ message }}');
+ noty()->success('{{ message }}');
+
+ // or simply
+
+ noty('{{ message }}');
+ }
+
+ /**
+ * if you prefer to use dependency injection
+ */
+ public function register(NotyInterface $noty)
+ {
+ // ...
+
+ $noty->success('{{ site.data.messages["success"] | sample }}');
+
+ // ... redirect or render the view
}
}
```
----
+ info
-## Modifiers
+{% assign id = '#/ usage info' %}
+{% assign type = 'info' %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+noty()->{{ type }}('{{ message }}');
+```
+
+ warning
+
+{% assign id = '#/ usage warning' %}
+{% assign type = 'warning' %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+noty()->{{ type }}('{{ message }}');
+```
+
+ error
+
+{% assign id = '#/ usage error' %}
+{% assign type = 'error' %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+noty()->{{ type }}('{{ message }}');
+```
+
+---
For more information on Noty options and usage, please refer to the original documentation at [https://ned.im/noty/](https://ned.im/noty/)
---
-> The methods described in the **[Usage](/installation/#-modifiers)** section can also be used with the `noty` adapter.
+> The methods described in the **[Usage](/installation/#-usage)** section can also be used with the `notyf` adapter.
---
@@ -112,30 +228,30 @@ noty()->theme(string $theme);
{% assign infoMessage = site.data.messages['info'] | sample %}
@@ -166,30 +282,30 @@ noty()
{% assign infoMessage = site.data.messages['info'] | sample %}
@@ -222,30 +338,30 @@ noty()
{% assign infoMessage = site.data.messages['info'] | sample %}
@@ -278,30 +394,30 @@ noty()
{% assign infoMessage = site.data.messages['info'] | sample %}
@@ -334,30 +450,30 @@ noty()
{% assign infoMessage = site.data.messages['info'] | sample %}
diff --git a/docs/pages/library/notyf.md b/docs/pages/library/notyf.md
index f7bed96c..424a9711 100644
--- a/docs/pages/library/notyf.md
+++ b/docs/pages/library/notyf.md
@@ -6,36 +6,92 @@ handler: notyf
data-controller: notyf
---
-## Installation
+## Laravel
-** Laravel**:
+ Installation
```shell
composer require php-flasher/flasher-notyf-laravel
```
-Then, run:
+
+After installation, you need to run another command to set up the necessary assets for PHPFlasher :
+
+
```shell
php artisan flasher:install
```
-
+ Configuration
-** Symfony**:
+```php
+ [
+ 'notyf' => [
+ 'scripts' => [
+ '/vendor/flasher/flasher-notyf.min.js',
+ ],
+ 'styles' => [
+ '/vendor/flasher/flasher-notyf.min.css',
+ ],
+ 'options' => [
+ // Optional: Add global options here
+ 'dismissible' => true,
+ ],
+ ],
+ ],
+];
+```
+
+## Symfony
+
+ Installation
```shell
composer require php-flasher/flasher-notyf-symfony
```
-Then, run:
+
+After installation, you need to run another command to set up the necessary assets for PHPFlasher :
+
```shell
php bin/console flasher:install
```
+ Configuration
+
+```yaml
+# config/packages/flasher.yaml
+
+flasher:
+ plugins:
+ notyf:
+ scripts:
+ - '/vendor/flasher/flasher-notyf.min.js'
+ styles:
+ - '/vendor/flasher/flasher-notyf.min.css'
+ options:
+ # Optional: Add global options here
+ dismissible: true
+```
+
---
## Usage
-{% assign id = '#/ notyf' %}
-{% assign type = site.data.messages.types | sample %}
+---
+
+> The methods described in the **[Usage](/installation/#-usage)** section can also be used with the `notyf` adapter.
+
+---
+
+To display a notification message, you can either use the `notyf()` helper method or obtain an instance of `notyf` from the service container.
+Then, before returning a view or redirecting, call the `success()` method and pass in the desired message to be displayed.
+
+ success
+
+{% assign id = '#/ noty' %}
+{% assign type = 'success' %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{}' %}
{% include example.html %}
@@ -43,26 +99,82 @@ php bin/console flasher:install
```php
{{ id }}
-namespace App\Controller;
+use Flasher\Notyf\Prime\NotyfInterface;
-class AppController
+class BookController
{
- public function save()
+ public function saveBook()
{
- notyf()->{{ type }}('{{ message }}');
+ notyf()->success('{{ message }}');
+
+ // or simply
+
+ notyf('{{ message }}');
}
-}
+
+ /**
+ * if you prefer to use dependency injection
+ */
+ public function register(NotyfInterface $notyf)
+ {
+ // ...
+
+ $notyf->success('{{ site.data.messages["success"] | sample }}');
+
+ // ... redirect or render the view
+ }
+}
+```
+
+ info
+
+{% assign id = '#/ usage info' %}
+{% assign type = 'info' %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+notyf()->{{ type }}('{{ message }}');
+```
+
+ warning
+
+{% assign id = '#/ usage warning' %}
+{% assign type = 'warning' %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+notyf()->{{ type }}('{{ message }}');
+```
+
+ error
+
+{% assign id = '#/ usage error' %}
+{% assign type = 'error' %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+notyf()->{{ type }}('{{ message }}');
```
---
-## Modifiers
-
For more information on Notyf options and usage, please refer to the original documentation at [https://github.com/caroso1222/notyf](https://github.com/caroso1222/notyf)
---
-> The methods described in the **[Usage](/installation/#-modifiers)** section can also be used with the `notyf` adapter.
+> The methods described in the **[Usage](/installation/#-usage)** section can also be used with the `notyf` adapter.
---
diff --git a/docs/pages/library/sweetalert.md b/docs/pages/library/sweetalert.md
index eaaf18d7..0fd7dbf7 100644
--- a/docs/pages/library/sweetalert.md
+++ b/docs/pages/library/sweetalert.md
@@ -6,36 +6,94 @@ handler: sweetalert
data-controller: sweetalert
---
-## Installation
+## Laravel
-** Laravel**:
+ Installation
```shell
composer require php-flasher/flasher-sweetalert-laravel
```
-Then, run:
+
+After installation, you need to run another command to set up the necessary assets for PHPFlasher :
+
```shell
php artisan flasher:install
```
+ Configuration
+
+```php
+ [
+ 'sweetalert' => [
+ 'scripts' => [
+ '/vendor/flasher/sweetalert2.min.js',
+ '/vendor/flasher/flasher-sweetalert.min.js',
+ ],
+ 'styles' => [
+ '/vendor/flasher/sweetalert2.min.css',
+ ],
+ 'options' => [
+ // Optional: Add global options here
+ 'position' => 'center'
+ ],
+ ],
+ ],
+];
+```
-** Symfony**:
+## Symfony
+
+ Installation
```shell
composer require php-flasher/flasher-sweetalert-symfony
```
-Then, run:
+
+After installation, you need to run another command to set up the necessary assets for PHPFlasher :
+
```shell
php bin/console flasher:install
```
----
+ Configuration
+
+```yaml
+# config/packages/flasher.yaml
+
+flasher:
+ plugins:
+ sweetalert:
+ scripts:
+ - '/vendor/flasher/sweetalert2.min.js'
+ - '/vendor/flasher/flasher-sweetalert.min.js'
+ styles:
+ - '/vendor/flasher/sweetalert2.min.css'
+ options:
+ # Optional: Add global options here
+ position: center
+```
+
+---
## Usage
-{% assign id = '#/ sweetalert' %}
-{% assign type = site.data.messages.types | sample %}
+---
+
+> The methods described in the **[Usage](/installation/#-usage)** section can also be used with the `notyf` adapter.
+
+---
+
+To display a notification message, you can either use the `sweetalert()` helper method or obtain an instance of `sweetalert` from the service container.
+Then, before returning a view or redirecting, call the `success()` method and pass in the desired message to be displayed.
+
+ success
+
+{% assign id = '#/ noty' %}
+{% assign type = 'success' %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{}' %}
{% include example.html %}
@@ -43,26 +101,82 @@ php bin/console flasher:install
```php
{{ id }}
-namespace App\Controller;
+use Flasher\SweetAlert\Prime\SweetAlertInterface;
-class AppController
+class BookController
{
- public function save()
+ public function saveBook()
{
- sweetalert()->{{ type }}('{{ message }}');
+ sweetalert()->success('{{ message }}');
+
+ // or simply
+
+ sweetalert('{{ message }}');
}
-}
+
+ /**
+ * if you prefer to use dependency injection
+ */
+ public function register(SweetAlertInterface $sweetalert)
+ {
+ // ...
+
+ $sweetalert->success('{{ site.data.messages["success"] | sample }}');
+
+ // ... redirect or render the view
+ }
+}
```
----
+ info
-## Modifiers
+{% assign id = '#/ usage info' %}
+{% assign type = 'info' %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+sweetalert()->{{ type }}('{{ message }}');
+```
+
+ warning
+
+{% assign id = '#/ usage warning' %}
+{% assign type = 'warning' %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+sweetalert()->{{ type }}('{{ message }}');
+```
+
+ error
+
+{% assign id = '#/ usage error' %}
+{% assign type = 'error' %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+sweetalert()->{{ type }}('{{ message }}');
+```
+
+---
For more information on Sweetalert2 alert options and usage, please refer to the original documentation at [https://sweetalert2.github.io](https://sweetalert2.github.io)
---
-> The methods described in the **[Usage](/installation/#-modifiers)** section can also be used with the `sweetalert` adapter.
+> The methods described in the **[Usage](/installation/#-usage)** section can also be used with the `notyf` adapter.
---
diff --git a/docs/pages/library/toastr.md b/docs/pages/library/toastr.md
index 9f25000d..fcbc35ca 100644
--- a/docs/pages/library/toastr.md
+++ b/docs/pages/library/toastr.md
@@ -6,36 +6,97 @@ handler: toastr
data-controller: toastr
---
-## Installation
+## Laravel
-** Laravel**:
+ Installation
```shell
composer require php-flasher/flasher-toastr-laravel
```
-Then, run:
+
+After installation, you need to run another command to set up the necessary assets for PHPFlasher :
+
```shell
php artisan flasher:install
```
+ Configuration
+
+```php
+ [
+ 'toastr' => [
+ 'scripts' => [
+ '/vendor/flasher/jquery.min.js',
+ '/vendor/flasher/toastr.min.js',
+ '/vendor/flasher/flasher-toastr.min.js',
+ ],
+ 'styles' => [
+ '/vendor/flasher/toastr.min.css',
+ ],
+ 'options' => [
+ // Optional: Add global options here
+ 'closeButton' => true
+ ],
+ ],
+ ],
+];
+```
+
-** Symfony**:
+## Symfony
+
+ Installation
```shell
composer require php-flasher/flasher-toastr-symfony
```
-Then, run:
+
+After installation, you need to run another command to set up the necessary assets for PHPFlasher :
+
```shell
php bin/console flasher:install
```
+ Configuration
+
+```yaml
+# config/packages/flasher.yaml
+
+flasher:
+ plugins:
+ noty:
+ scripts:
+ - '/vendor/flasher/jquery.min.js'
+ - '/vendor/flasher/toastr.min.js'
+ - '/vendor/flasher/flasher-toastr.min.js'
+ styles:
+ - '/vendor/flasher/toastr.min.css'
+ options:
+ # Optional: Add global options here
+ closeButton: true
+```
+
---
## Usage
-{% assign id = '#/ toastr' %}
-{% assign type = site.data.messages.types | sample %}
+---
+
+> The methods described in the **[Usage](/installation/#-usage)** section can also be used with the `notyf` adapter.
+
+---
+
+To display a notification message, you can either use the `toastr()` helper method or obtain an instance of `toastr` from the service container.
+Then, before returning a view or redirecting, call the `success()` method and pass in the desired message to be displayed.
+
+ success
+
+{% assign id = '#/ noty' %}
+{% assign type = 'success' %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{}' %}
{% include example.html %}
@@ -43,27 +104,82 @@ php bin/console flasher:install
```php
{{ id }}
-namespace App\Controller;
+use Flasher\Toastr\Prime\ToastrInterface;
-class AppController
+class BookController
{
- public function save()
+ public function saveBook()
{
- toastr()->{{ type }}('{{ message }}');
+ toastr()->success('{{ message }}');
+
+ // or simply
+
+ toastr('{{ message }}');
}
-}
+
+ /**
+ * if you prefer to use dependency injection
+ */
+ public function register(ToastrInterface $toastr)
+ {
+ // ...
+
+ $toastr->success('{{ site.data.messages["success"] | sample }}');
+
+ // ... redirect or render the view
+ }
+}
+```
+
+ info
+
+{% assign id = '#/ usage info' %}
+{% assign type = 'info' %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+toastr()->{{ type }}('{{ message }}');
+```
+
+ warning
+
+{% assign id = '#/ usage warning' %}
+{% assign type = 'warning' %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+toastr()->{{ type }}('{{ message }}');
+```
+
+ error
+
+{% assign id = '#/ usage error' %}
+{% assign type = 'error' %}
+{% assign message = site.data.messages[type] | sample %}
+{% assign options = '{}' %}
+{% include example.html %}
+
+```php
+{{ id }}
+
+toastr()->{{ type }}('{{ message }}');
```
---
-
-## Modifiers
-
For more information on Toastr options and usage, please refer to the original documentation at [https://github.com/CodeSeven/toastr](https://github.com/CodeSeven/toastr)
---
-> The methods described in the **[Usage](/installation/#-modifiers)** section can also be used with the `toastr` adapter.
+> The methods described in the **[Usage](/installation/#-usage)** section can also be used with the `notyf` adapter.
---
diff --git a/docs/pages/livewire.md b/docs/pages/livewire.md
index 8d31c053..6c8f9197 100644
--- a/docs/pages/livewire.md
+++ b/docs/pages/livewire.md
@@ -5,23 +5,25 @@ description: Learn how to seamlessly integrate flash notification messages into
adapter: flasher
---
-{% PHPFlasher %} provides a seamless integration with Livewire v3.
+PHPFlasher provides a seamless integration with Livewire v3.
## Requirements
-> **PHP** >= 8.2
-> **Laravel** >= 11
+> **PHP** v8.2 or higher
+> **Laravel** v11.0 or higher
---
## Installation
-To integrate {% PHPFlasher %} with Livewire, follow the same installation steps as for the [Laravel Installation](/laravel) package.
+To integrate PHPFlasher with Livewire, follow the same installation steps as for the [Laravel Installation](/laravel) package.
```shell
composer require php-flasher/flasher-laravel
```
-Then, run:
+
+After installation, you need to run another command to set up the necessary assets for PHPFlasher :
+
```shell
php artisan flasher:install
```
diff --git a/docs/pages/phpstan.md b/docs/pages/phpstan.md
deleted file mode 100644
index 547fa712..00000000
--- a/docs/pages/phpstan.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
-permalink: /phpstan/
-title: PHPStan
-description: Seamlessly integrate PHPFlasher with PHPStan to validate dynamic methods and enhance code analysis in your projects. This open-source initiative is designed to help maintain clean and reliable code with minimal configuration.
----
-
-## PHPFlasher extension for PHPStan
-
-{% PHPFlasher %} extends PHPStan by providing a straightforward solution to validate dynamic methods. This integration aids in keeping your code analysis precise and free of errors that may occur due to the dynamic nature of {% PHPFlasher %}.
-
----
-
-## Configuration
-
-Add the {% PHPFlasher %} extension to your PHPStan setup by updating your project's `phpstan.neon` file:
-
-```neon
-includes:
- - vendor/php-flasher/flasher/extension.neon
-```
-
-By including this configuration, PHPStan will recognize and validate all dynamic methods introduced by {% PHPFlasher %}, ensuring a clean and accurate code analysis process.
diff --git a/docs/pages/symfony.md b/docs/pages/symfony.md
index 3493f3c4..e404af21 100644
--- a/docs/pages/symfony.md
+++ b/docs/pages/symfony.md
@@ -5,11 +5,11 @@ description: Integrate PHPFlasher in your Symfony application to enhance user ex
framework: symfony
---
-## {% PHPFlasher %} for Symfony
+## Requirements
-{% PHPFlasher %} offers a seamless way to incorporate flash notifications in {% Symfony %} projects, enhancing user feedback with minimal setup.
+PHPFlasher offers a seamless way to incorporate flash notifications in Symfony projects, enhancing user feedback with minimal setup.
-Requirements for using {% PHPFlasher %} with Symfony:
+Requirements for using PHPFlasher with Symfony:
> **PHP** v8.2 or higher
> **Symfony** v7.0 or higher
@@ -18,13 +18,13 @@ Requirements for using {% PHPFlasher %} with Symfony:
## Installation
-{% PHPFlasher %}'s modular design lets you select and install only the components your project needs.
+PHPFlasher 's modular design lets you select and install only the components your project needs.
```shell
composer require php-flasher/flasher-symfony
```
-After installation, you need to run another command to set up the necessary assets for {% PHPFlasher %}:
+After installation, you need to run another command to set up the necessary assets for PHPFlasher :
```shell
php bin/console flasher:install
@@ -32,15 +32,6 @@ php bin/console flasher:install
---
-{% PHPFlasher %} includes a default notification style , but users can also install and use additional adapters to customize the appearance of notifications within their projects such as :
-
-* **[Toastr](/library/toastr/)**
-* **[Noty](/library/noty/)**
-* **[Notyf](/library/notyf/)**
-* **[Sweet Alert](/library/sweetalert/)**
-
----
-
{% include _usage.md %}
---
@@ -69,7 +60,7 @@ flasher:
styles:
- '/vendor/flasher/flasher.min.css'
- # Enable translation of PHPFlasher messages using Symfony's service
+ # Enable translation of PHPFlasher messages using Symfony's translator service
translate: true
# Automatically inject PHPFlasher assets in HTML response
@@ -178,10 +169,10 @@ class BookController
## RTL support
-{% PHPFlasher %} makes it easy to incorporate **right-to-left** languages like `Arabic` or `Hebrew`.
+PHPFlasher makes it easy to incorporate **right-to-left** languages like `Arabic` or `Hebrew`.
it automatically detects the text direction and handles the necessary adjustments for you.
-Simply make sure the translation service is enabled and let {% PHPFlasher %} handle the rest.
+Simply make sure the translation service is enabled and let PHPFlasher handle the rest.
{% assign id = '#/ phpflasher rtl' %}
{% assign type = 'success' %}
@@ -202,14 +193,14 @@ flash()
## Translation
-{% PHPFlasher %} allows you to translate your notification `messages`, `presets`, it comes with `Arabic`, `English` and `French` translations out of the box, but you can easily add your own translations.
+PHPFlasher allows you to translate your notification `messages` and `presets`, it comes with `Arabic`, `English`, `French`, `German`, `Spanish`, `Portuguese`, `Russian`, and `Chinese` translations out of the box. but you can easily add your own translations.
-For example, if you need to override the `English` translation strings for {% PHPFlasher %}, you can create a language file at the following location:
+For example, to override the `English` translation strings for PHPFlasher , you can create a language file at the following location:
**`translations/flasher.en.yaml`**.
-In this file, you should **only** define the translation strings you want to override. Any translation strings that you don't override will still be loaded from {% PHPFlasher %}'s original language files.
+In this file, you should **only** define the translation strings you want to override. Any translation strings that you don't override will still be loaded from PHPFlasher 's original language files.
-Here is a list of the default translation keys for {% PHPFlasher %}:
+Here are examples of the default translation keys for `Arabic`, `English`, and `French` in PHPFlasher :
```yaml
# translations/flasher.ar.yaml
@@ -259,6 +250,8 @@ The resource was deleted: 'La ressource :resource a รฉtรฉ supprimรฉe'
resource: ''
```
+> These translation files facilitate localizing notifications to match user preferences and ensure that your applications can communicate effectively across different linguistic contexts.
+
{% assign id = '#/ symfony arabic translations' %}
{% assign successMessage = 'ุชู
ุฅูุดุงุก ุงูู
ูู' %}
{% assign errorMessage = 'ุญุฏุซ ุฎุทุฃ ุฃุซูุงุก ุฅุฑุณุงู ุทูุจู.' %}
diff --git a/extension.neon b/extension.neon
index 843ad3af..352e690b 100644
--- a/extension.neon
+++ b/extension.neon
@@ -1,3 +1,2 @@
includes:
- - src/Prime/extension.neon
- src/Laravel/extension.neon
diff --git a/package-lock.json b/package-lock.json
index dd9a9063..f69b6341 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -17,17 +17,17 @@
],
"devDependencies": {
"@antfu/eslint-config": "2.12.2",
- "@babel/core": "^7.24.4",
- "@babel/preset-env": "^7.24.4",
+ "@babel/core": "^7.24.5",
+ "@babel/preset-env": "^7.24.5",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-eslint": "^9.0.5",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
- "@types/node": "^20.12.6",
+ "@types/node": "^20.12.8",
"@typescript-eslint/eslint-plugin": "7.5.0",
- "@typescript-eslint/parser": "^7.6.0",
+ "@typescript-eslint/parser": "^7.8.0",
"autoprefixer": "^10.4.19",
"browserslist": "^4.23.0",
"cross-env": "7.0.3",
@@ -41,16 +41,16 @@
"eslint-plugin-prettier": "^5.1.3",
"postcss-discard-comments": "^6.0.2",
"punycode": "2.3.1",
- "rollup": "^4.14.1",
+ "rollup": "^4.17.2",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-clear": "^2.0.7",
"rollup-plugin-copy": "3.5.0",
"rollup-plugin-filesize": "^10.0.0",
"rollup-plugin-postcss": "^4.0.2",
- "sass": "^1.74.1",
+ "sass": "^1.76.0",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
- "typescript": "^5.4.4"
+ "typescript": "^5.4.5"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@@ -322,21 +322,21 @@
}
},
"node_modules/@babel/core": {
- "version": "7.24.4",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz",
- "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.5.tgz",
+ "integrity": "sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==",
"dev": true,
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.24.2",
- "@babel/generator": "^7.24.4",
+ "@babel/generator": "^7.24.5",
"@babel/helper-compilation-targets": "^7.23.6",
- "@babel/helper-module-transforms": "^7.23.3",
- "@babel/helpers": "^7.24.4",
- "@babel/parser": "^7.24.4",
+ "@babel/helper-module-transforms": "^7.24.5",
+ "@babel/helpers": "^7.24.5",
+ "@babel/parser": "^7.24.5",
"@babel/template": "^7.24.0",
- "@babel/traverse": "^7.24.1",
- "@babel/types": "^7.24.0",
+ "@babel/traverse": "^7.24.5",
+ "@babel/types": "^7.24.5",
"convert-source-map": "^2.0.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
@@ -352,12 +352,12 @@
}
},
"node_modules/@babel/generator": {
- "version": "7.24.4",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz",
- "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz",
+ "integrity": "sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==",
"dev": true,
"dependencies": {
- "@babel/types": "^7.24.0",
+ "@babel/types": "^7.24.5",
"@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.25",
"jsesc": "^2.5.1"
@@ -407,19 +407,19 @@
}
},
"node_modules/@babel/helper-create-class-features-plugin": {
- "version": "7.24.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.4.tgz",
- "integrity": "sha512-lG75yeuUSVu0pIcbhiYMXBXANHrpUPaOfu7ryAzskCgKUHuAxRQI5ssrtmF0X9UXldPlvT0XM/A4F44OXRt6iQ==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.5.tgz",
+ "integrity": "sha512-uRc4Cv8UQWnE4NXlYTIIdM7wfFkOqlFztcC/gVXDKohKoVB3OyonfelUBaJzSwpBntZ2KYGF/9S7asCHsXwW6g==",
"dev": true,
"dependencies": {
"@babel/helper-annotate-as-pure": "^7.22.5",
"@babel/helper-environment-visitor": "^7.22.20",
"@babel/helper-function-name": "^7.23.0",
- "@babel/helper-member-expression-to-functions": "^7.23.0",
+ "@babel/helper-member-expression-to-functions": "^7.24.5",
"@babel/helper-optimise-call-expression": "^7.22.5",
"@babel/helper-replace-supers": "^7.24.1",
"@babel/helper-skip-transparent-expression-wrappers": "^7.22.5",
- "@babel/helper-split-export-declaration": "^7.22.6",
+ "@babel/helper-split-export-declaration": "^7.24.5",
"semver": "^6.3.1"
},
"engines": {
@@ -497,12 +497,12 @@
}
},
"node_modules/@babel/helper-member-expression-to-functions": {
- "version": "7.23.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz",
- "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.5.tgz",
+ "integrity": "sha512-4owRteeihKWKamtqg4JmWSsEZU445xpFRXPEwp44HbgbxdWlUV1b4Agg4lkA806Lil5XM/e+FJyS0vj5T6vmcA==",
"dev": true,
"dependencies": {
- "@babel/types": "^7.23.0"
+ "@babel/types": "^7.24.5"
},
"engines": {
"node": ">=6.9.0"
@@ -521,16 +521,16 @@
}
},
"node_modules/@babel/helper-module-transforms": {
- "version": "7.23.3",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz",
- "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz",
+ "integrity": "sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==",
"dev": true,
"dependencies": {
"@babel/helper-environment-visitor": "^7.22.20",
- "@babel/helper-module-imports": "^7.22.15",
- "@babel/helper-simple-access": "^7.22.5",
- "@babel/helper-split-export-declaration": "^7.22.6",
- "@babel/helper-validator-identifier": "^7.22.20"
+ "@babel/helper-module-imports": "^7.24.3",
+ "@babel/helper-simple-access": "^7.24.5",
+ "@babel/helper-split-export-declaration": "^7.24.5",
+ "@babel/helper-validator-identifier": "^7.24.5"
},
"engines": {
"node": ">=6.9.0"
@@ -552,9 +552,9 @@
}
},
"node_modules/@babel/helper-plugin-utils": {
- "version": "7.24.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz",
- "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz",
+ "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==",
"dev": true,
"engines": {
"node": ">=6.9.0"
@@ -595,12 +595,12 @@
}
},
"node_modules/@babel/helper-simple-access": {
- "version": "7.22.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz",
- "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz",
+ "integrity": "sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==",
"dev": true,
"dependencies": {
- "@babel/types": "^7.22.5"
+ "@babel/types": "^7.24.5"
},
"engines": {
"node": ">=6.9.0"
@@ -619,12 +619,12 @@
}
},
"node_modules/@babel/helper-split-export-declaration": {
- "version": "7.22.6",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
- "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz",
+ "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==",
"dev": true,
"dependencies": {
- "@babel/types": "^7.22.5"
+ "@babel/types": "^7.24.5"
},
"engines": {
"node": ">=6.9.0"
@@ -640,9 +640,9 @@
}
},
"node_modules/@babel/helper-validator-identifier": {
- "version": "7.22.20",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
- "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz",
+ "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==",
"dev": true,
"engines": {
"node": ">=6.9.0"
@@ -672,14 +672,14 @@
}
},
"node_modules/@babel/helpers": {
- "version": "7.24.4",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz",
- "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.5.tgz",
+ "integrity": "sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==",
"dev": true,
"dependencies": {
"@babel/template": "^7.24.0",
- "@babel/traverse": "^7.24.1",
- "@babel/types": "^7.24.0"
+ "@babel/traverse": "^7.24.5",
+ "@babel/types": "^7.24.5"
},
"engines": {
"node": ">=6.9.0"
@@ -701,9 +701,9 @@
}
},
"node_modules/@babel/parser": {
- "version": "7.24.4",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz",
- "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz",
+ "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==",
"dev": true,
"bin": {
"parser": "bin/babel-parser.js"
@@ -713,13 +713,13 @@
}
},
"node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": {
- "version": "7.24.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.4.tgz",
- "integrity": "sha512-qpl6vOOEEzTLLcsuqYYo8yDtrTocmu2xkGvgNebvPjT9DTtfFYGmgDqY+rBYXNlqL4s9qLDn6xkrJv4RxAPiTA==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.5.tgz",
+ "integrity": "sha512-LdXRi1wEMTrHVR4Zc9F8OewC3vdm5h4QB6L71zy6StmYeqGi1b3ttIO8UC+BfZKcH9jdr4aI249rBkm+3+YvHw==",
"dev": true,
"dependencies": {
"@babel/helper-environment-visitor": "^7.22.20",
- "@babel/helper-plugin-utils": "^7.24.0"
+ "@babel/helper-plugin-utils": "^7.24.5"
},
"engines": {
"node": ">=6.9.0"
@@ -1089,12 +1089,12 @@
}
},
"node_modules/@babel/plugin-transform-block-scoping": {
- "version": "7.24.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.4.tgz",
- "integrity": "sha512-nIFUZIpGKDf9O9ttyRXpHFpKC+X3Y5mtshZONuEUYBomAKoM4y029Jr+uB1bHGPhNmK8YXHevDtKDOLmtRrp6g==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.5.tgz",
+ "integrity": "sha512-sMfBc3OxghjC95BkYrYocHL3NaOplrcaunblzwXhGmlPwpmfsxr4vK+mBBt49r+S240vahmv+kUxkeKgs+haCw==",
"dev": true,
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.0"
+ "@babel/helper-plugin-utils": "^7.24.5"
},
"engines": {
"node": ">=6.9.0"
@@ -1137,18 +1137,18 @@
}
},
"node_modules/@babel/plugin-transform-classes": {
- "version": "7.24.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.1.tgz",
- "integrity": "sha512-ZTIe3W7UejJd3/3R4p7ScyyOoafetUShSf4kCqV0O7F/RiHxVj/wRaRnQlrGwflvcehNA8M42HkAiEDYZu2F1Q==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.5.tgz",
+ "integrity": "sha512-gWkLP25DFj2dwe9Ck8uwMOpko4YsqyfZJrOmqqcegeDYEbp7rmn4U6UQZNj08UF6MaX39XenSpKRCvpDRBtZ7Q==",
"dev": true,
"dependencies": {
"@babel/helper-annotate-as-pure": "^7.22.5",
"@babel/helper-compilation-targets": "^7.23.6",
"@babel/helper-environment-visitor": "^7.22.20",
"@babel/helper-function-name": "^7.23.0",
- "@babel/helper-plugin-utils": "^7.24.0",
+ "@babel/helper-plugin-utils": "^7.24.5",
"@babel/helper-replace-supers": "^7.24.1",
- "@babel/helper-split-export-declaration": "^7.22.6",
+ "@babel/helper-split-export-declaration": "^7.24.5",
"globals": "^11.1.0"
},
"engines": {
@@ -1184,12 +1184,12 @@
}
},
"node_modules/@babel/plugin-transform-destructuring": {
- "version": "7.24.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.1.tgz",
- "integrity": "sha512-ow8jciWqNxR3RYbSNVuF4U2Jx130nwnBnhRw6N6h1bOejNkABmcI5X5oz29K4alWX7vf1C+o6gtKXikzRKkVdw==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.5.tgz",
+ "integrity": "sha512-SZuuLyfxvsm+Ah57I/i1HVjveBENYK9ue8MJ7qkc7ndoNjqquJiElzA7f5yaAXjyW2hKojosOTAQQRX50bPSVg==",
"dev": true,
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.0"
+ "@babel/helper-plugin-utils": "^7.24.5"
},
"engines": {
"node": ">=6.9.0"
@@ -1503,15 +1503,15 @@
}
},
"node_modules/@babel/plugin-transform-object-rest-spread": {
- "version": "7.24.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.1.tgz",
- "integrity": "sha512-XjD5f0YqOtebto4HGISLNfiNMTTs6tbkFf2TOqJlYKYmbo+mN9Dnpl4SRoofiziuOWMIyq3sZEUqLo3hLITFEA==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.5.tgz",
+ "integrity": "sha512-7EauQHszLGM3ay7a161tTQH7fj+3vVM/gThlz5HpFtnygTxjrlvoeq7MPVA1Vy9Q555OB8SnAOsMkLShNkkrHA==",
"dev": true,
"dependencies": {
"@babel/helper-compilation-targets": "^7.23.6",
- "@babel/helper-plugin-utils": "^7.24.0",
+ "@babel/helper-plugin-utils": "^7.24.5",
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
- "@babel/plugin-transform-parameters": "^7.24.1"
+ "@babel/plugin-transform-parameters": "^7.24.5"
},
"engines": {
"node": ">=6.9.0"
@@ -1553,12 +1553,12 @@
}
},
"node_modules/@babel/plugin-transform-optional-chaining": {
- "version": "7.24.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.1.tgz",
- "integrity": "sha512-n03wmDt+987qXwAgcBlnUUivrZBPZ8z1plL0YvgQalLm+ZE5BMhGm94jhxXtA1wzv1Cu2aaOv1BM9vbVttrzSg==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.5.tgz",
+ "integrity": "sha512-xWCkmwKT+ihmA6l7SSTpk8e4qQl/274iNbSKRRS8mpqFR32ksy36+a+LWY8OXCCEefF8WFlnOHVsaDI2231wBg==",
"dev": true,
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.0",
+ "@babel/helper-plugin-utils": "^7.24.5",
"@babel/helper-skip-transparent-expression-wrappers": "^7.22.5",
"@babel/plugin-syntax-optional-chaining": "^7.8.3"
},
@@ -1570,12 +1570,12 @@
}
},
"node_modules/@babel/plugin-transform-parameters": {
- "version": "7.24.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.1.tgz",
- "integrity": "sha512-8Jl6V24g+Uw5OGPeWNKrKqXPDw2YDjLc53ojwfMcKwlEoETKU9rU0mHUtcg9JntWI/QYzGAXNWEcVHZ+fR+XXg==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.5.tgz",
+ "integrity": "sha512-9Co00MqZ2aoky+4j2jhofErthm6QVLKbpQrvz20c3CH9KQCLHyNB+t2ya4/UrRpQGR+Wrwjg9foopoeSdnHOkA==",
"dev": true,
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.0"
+ "@babel/helper-plugin-utils": "^7.24.5"
},
"engines": {
"node": ">=6.9.0"
@@ -1601,14 +1601,14 @@
}
},
"node_modules/@babel/plugin-transform-private-property-in-object": {
- "version": "7.24.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.1.tgz",
- "integrity": "sha512-pTHxDVa0BpUbvAgX3Gat+7cSciXqUcY9j2VZKTbSB6+VQGpNgNO9ailxTGHSXlqOnX1Hcx1Enme2+yv7VqP9bg==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.5.tgz",
+ "integrity": "sha512-JM4MHZqnWR04jPMujQDTBVRnqxpLLpx2tkn7iPn+Hmsc0Gnb79yvRWOkvqFOx3Z7P7VxiRIR22c4eGSNj87OBQ==",
"dev": true,
"dependencies": {
"@babel/helper-annotate-as-pure": "^7.22.5",
- "@babel/helper-create-class-features-plugin": "^7.24.1",
- "@babel/helper-plugin-utils": "^7.24.0",
+ "@babel/helper-create-class-features-plugin": "^7.24.5",
+ "@babel/helper-plugin-utils": "^7.24.5",
"@babel/plugin-syntax-private-property-in-object": "^7.14.5"
},
"engines": {
@@ -1726,12 +1726,12 @@
}
},
"node_modules/@babel/plugin-transform-typeof-symbol": {
- "version": "7.24.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.1.tgz",
- "integrity": "sha512-CBfU4l/A+KruSUoW+vTQthwcAdwuqbpRNB8HQKlZABwHRhsdHZ9fezp4Sn18PeAlYxTNiLMlx4xUBV3AWfg1BA==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.5.tgz",
+ "integrity": "sha512-UTGnhYVZtTAjdwOTzT+sCyXmTn8AhaxOS/MjG9REclZ6ULHWF9KoCZur0HSGU7hk8PdBFKKbYe6+gqdXWz84Jg==",
"dev": true,
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.0"
+ "@babel/helper-plugin-utils": "^7.24.5"
},
"engines": {
"node": ">=6.9.0"
@@ -1804,16 +1804,16 @@
}
},
"node_modules/@babel/preset-env": {
- "version": "7.24.4",
- "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.4.tgz",
- "integrity": "sha512-7Kl6cSmYkak0FK/FXjSEnLJ1N9T/WA2RkMhu17gZ/dsxKJUuTYNIylahPTzqpLyJN4WhDif8X0XK1R8Wsguo/A==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.5.tgz",
+ "integrity": "sha512-UGK2ifKtcC8i5AI4cH+sbLLuLc2ktYSFJgBAXorKAsHUZmrQ1q6aQ6i3BvU24wWs2AAKqQB6kq3N9V9Gw1HiMQ==",
"dev": true,
"dependencies": {
"@babel/compat-data": "^7.24.4",
"@babel/helper-compilation-targets": "^7.23.6",
- "@babel/helper-plugin-utils": "^7.24.0",
+ "@babel/helper-plugin-utils": "^7.24.5",
"@babel/helper-validator-option": "^7.23.5",
- "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.4",
+ "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.5",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.1",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.1",
"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.1",
@@ -1840,12 +1840,12 @@
"@babel/plugin-transform-async-generator-functions": "^7.24.3",
"@babel/plugin-transform-async-to-generator": "^7.24.1",
"@babel/plugin-transform-block-scoped-functions": "^7.24.1",
- "@babel/plugin-transform-block-scoping": "^7.24.4",
+ "@babel/plugin-transform-block-scoping": "^7.24.5",
"@babel/plugin-transform-class-properties": "^7.24.1",
"@babel/plugin-transform-class-static-block": "^7.24.4",
- "@babel/plugin-transform-classes": "^7.24.1",
+ "@babel/plugin-transform-classes": "^7.24.5",
"@babel/plugin-transform-computed-properties": "^7.24.1",
- "@babel/plugin-transform-destructuring": "^7.24.1",
+ "@babel/plugin-transform-destructuring": "^7.24.5",
"@babel/plugin-transform-dotall-regex": "^7.24.1",
"@babel/plugin-transform-duplicate-keys": "^7.24.1",
"@babel/plugin-transform-dynamic-import": "^7.24.1",
@@ -1865,13 +1865,13 @@
"@babel/plugin-transform-new-target": "^7.24.1",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.24.1",
"@babel/plugin-transform-numeric-separator": "^7.24.1",
- "@babel/plugin-transform-object-rest-spread": "^7.24.1",
+ "@babel/plugin-transform-object-rest-spread": "^7.24.5",
"@babel/plugin-transform-object-super": "^7.24.1",
"@babel/plugin-transform-optional-catch-binding": "^7.24.1",
- "@babel/plugin-transform-optional-chaining": "^7.24.1",
- "@babel/plugin-transform-parameters": "^7.24.1",
+ "@babel/plugin-transform-optional-chaining": "^7.24.5",
+ "@babel/plugin-transform-parameters": "^7.24.5",
"@babel/plugin-transform-private-methods": "^7.24.1",
- "@babel/plugin-transform-private-property-in-object": "^7.24.1",
+ "@babel/plugin-transform-private-property-in-object": "^7.24.5",
"@babel/plugin-transform-property-literals": "^7.24.1",
"@babel/plugin-transform-regenerator": "^7.24.1",
"@babel/plugin-transform-reserved-words": "^7.24.1",
@@ -1879,7 +1879,7 @@
"@babel/plugin-transform-spread": "^7.24.1",
"@babel/plugin-transform-sticky-regex": "^7.24.1",
"@babel/plugin-transform-template-literals": "^7.24.1",
- "@babel/plugin-transform-typeof-symbol": "^7.24.1",
+ "@babel/plugin-transform-typeof-symbol": "^7.24.5",
"@babel/plugin-transform-unicode-escapes": "^7.24.1",
"@babel/plugin-transform-unicode-property-regex": "^7.24.1",
"@babel/plugin-transform-unicode-regex": "^7.24.1",
@@ -1945,19 +1945,19 @@
}
},
"node_modules/@babel/traverse": {
- "version": "7.24.1",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz",
- "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz",
+ "integrity": "sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==",
"dev": true,
"dependencies": {
- "@babel/code-frame": "^7.24.1",
- "@babel/generator": "^7.24.1",
+ "@babel/code-frame": "^7.24.2",
+ "@babel/generator": "^7.24.5",
"@babel/helper-environment-visitor": "^7.22.20",
"@babel/helper-function-name": "^7.23.0",
"@babel/helper-hoist-variables": "^7.22.5",
- "@babel/helper-split-export-declaration": "^7.22.6",
- "@babel/parser": "^7.24.1",
- "@babel/types": "^7.24.0",
+ "@babel/helper-split-export-declaration": "^7.24.5",
+ "@babel/parser": "^7.24.5",
+ "@babel/types": "^7.24.5",
"debug": "^4.3.1",
"globals": "^11.1.0"
},
@@ -1975,13 +1975,13 @@
}
},
"node_modules/@babel/types": {
- "version": "7.24.0",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz",
- "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==",
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz",
+ "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==",
"dev": true,
"dependencies": {
- "@babel/helper-string-parser": "^7.23.4",
- "@babel/helper-validator-identifier": "^7.22.20",
+ "@babel/helper-string-parser": "^7.24.1",
+ "@babel/helper-validator-identifier": "^7.24.5",
"to-fast-properties": "^2.0.0"
},
"engines": {
@@ -2015,7 +2015,7 @@
},
"node_modules/@clack/prompts/node_modules/is-unicode-supported": {
"version": "1.3.0",
- "extraneous": true,
+ "dev": true,
"inBundle": true,
"license": "MIT",
"engines": {
@@ -2844,9 +2844,9 @@
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.1.tgz",
- "integrity": "sha512-fH8/o8nSUek8ceQnT7K4EQbSiV7jgkHq81m9lWZFIXjJ7lJzpWXbQFpT/Zh6OZYnpFykvzC3fbEvEAFZu03dPA==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.17.2.tgz",
+ "integrity": "sha512-NM0jFxY8bB8QLkoKxIQeObCaDlJKewVlIEkuyYKm5An1tdVZ966w2+MPQ2l8LBZLjR+SgyV+nRkTIunzOYBMLQ==",
"cpu": [
"arm"
],
@@ -2857,9 +2857,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.1.tgz",
- "integrity": "sha512-Y/9OHLjzkunF+KGEoJr3heiD5X9OLa8sbT1lm0NYeKyaM3oMhhQFvPB0bNZYJwlq93j8Z6wSxh9+cyKQaxS7PQ==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.17.2.tgz",
+ "integrity": "sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==",
"cpu": [
"arm64"
],
@@ -2870,9 +2870,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.1.tgz",
- "integrity": "sha512-+kecg3FY84WadgcuSVm6llrABOdQAEbNdnpi5X3UwWiFVhZIZvKgGrF7kmLguvxHNQy+UuRV66cLVl3S+Rkt+Q==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.17.2.tgz",
+ "integrity": "sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==",
"cpu": [
"arm64"
],
@@ -2883,9 +2883,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.1.tgz",
- "integrity": "sha512-2pYRzEjVqq2TB/UNv47BV/8vQiXkFGVmPFwJb+1E0IFFZbIX8/jo1olxqqMbo6xCXf8kabANhp5bzCij2tFLUA==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.17.2.tgz",
+ "integrity": "sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==",
"cpu": [
"x64"
],
@@ -2896,9 +2896,22 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.1.tgz",
- "integrity": "sha512-mS6wQ6Do6/wmrF9aTFVpIJ3/IDXhg1EZcQFYHZLHqw6AzMBjTHWnCG35HxSqUNphh0EHqSM6wRTT8HsL1C0x5g==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.17.2.tgz",
+ "integrity": "sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.17.2.tgz",
+ "integrity": "sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==",
"cpu": [
"arm"
],
@@ -2909,9 +2922,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.1.tgz",
- "integrity": "sha512-p9rGKYkHdFMzhckOTFubfxgyIO1vw//7IIjBBRVzyZebWlzRLeNhqxuSaZ7kCEKVkm/kuC9fVRW9HkC/zNRG2w==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.17.2.tgz",
+ "integrity": "sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==",
"cpu": [
"arm64"
],
@@ -2922,9 +2935,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.1.tgz",
- "integrity": "sha512-nDY6Yz5xS/Y4M2i9JLQd3Rofh5OR8Bn8qe3Mv/qCVpHFlwtZSBYSPaU4mrGazWkXrdQ98GB//H0BirGR/SKFSw==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.17.2.tgz",
+ "integrity": "sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==",
"cpu": [
"arm64"
],
@@ -2935,11 +2948,11 @@
]
},
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.1.tgz",
- "integrity": "sha512-im7HE4VBL+aDswvcmfx88Mp1soqL9OBsdDBU8NqDEYtkri0qV0THhQsvZtZeNNlLeCUQ16PZyv7cqutjDF35qw==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.17.2.tgz",
+ "integrity": "sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==",
"cpu": [
- "ppc64le"
+ "ppc64"
],
"dev": true,
"optional": true,
@@ -2948,9 +2961,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.1.tgz",
- "integrity": "sha512-RWdiHuAxWmzPJgaHJdpvUUlDz8sdQz4P2uv367T2JocdDa98iRw2UjIJ4QxSyt077mXZT2X6pKfT2iYtVEvOFw==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.17.2.tgz",
+ "integrity": "sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==",
"cpu": [
"riscv64"
],
@@ -2961,9 +2974,9 @@
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.1.tgz",
- "integrity": "sha512-VMgaGQ5zRX6ZqV/fas65/sUGc9cPmsntq2FiGmayW9KMNfWVG/j0BAqImvU4KTeOOgYSf1F+k6at1UfNONuNjA==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.17.2.tgz",
+ "integrity": "sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==",
"cpu": [
"s390x"
],
@@ -2974,9 +2987,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.1.tgz",
- "integrity": "sha512-9Q7DGjZN+hTdJomaQ3Iub4m6VPu1r94bmK2z3UeWP3dGUecRC54tmVu9vKHTm1bOt3ASoYtEz6JSRLFzrysKlA==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.17.2.tgz",
+ "integrity": "sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==",
"cpu": [
"x64"
],
@@ -2987,9 +3000,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.1.tgz",
- "integrity": "sha512-JNEG/Ti55413SsreTguSx0LOVKX902OfXIKVg+TCXO6Gjans/k9O6ww9q3oLGjNDaTLxM+IHFMeXy/0RXL5R/g==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.17.2.tgz",
+ "integrity": "sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==",
"cpu": [
"x64"
],
@@ -3000,9 +3013,9 @@
]
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.1.tgz",
- "integrity": "sha512-ryS22I9y0mumlLNwDFYZRDFLwWh3aKaC72CWjFcFvxK0U6v/mOkM5Up1bTbCRAhv3kEIwW2ajROegCIQViUCeA==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.17.2.tgz",
+ "integrity": "sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==",
"cpu": [
"arm64"
],
@@ -3013,9 +3026,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.1.tgz",
- "integrity": "sha512-TdloItiGk+T0mTxKx7Hp279xy30LspMso+GzQvV2maYePMAWdmrzqSNZhUpPj3CGw12aGj57I026PgLCTu8CGg==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.17.2.tgz",
+ "integrity": "sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==",
"cpu": [
"ia32"
],
@@ -3026,9 +3039,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.1.tgz",
- "integrity": "sha512-wQGI+LY/Py20zdUPq+XCem7JcPOyzIJBm3dli+56DJsQOHbnXZFEwgmnC6el1TPAfC8lBT3m+z69RmLykNUbew==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.17.2.tgz",
+ "integrity": "sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==",
"cpu": [
"x64"
],
@@ -3876,9 +3889,9 @@
"dev": true
},
"node_modules/@types/node": {
- "version": "20.12.6",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.6.tgz",
- "integrity": "sha512-3KurE8taB8GCvZBPngVbp0lk5CKi8M9f9k1rsADh0Evdz5SzJ+Q+Hx9uHoFGsLnLnd1xmkDQr2hVhlA0Mn0lKQ==",
+ "version": "20.12.8",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.8.tgz",
+ "integrity": "sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
@@ -4044,15 +4057,15 @@
"dev": true
},
"node_modules/@typescript-eslint/parser": {
- "version": "7.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.6.0.tgz",
- "integrity": "sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg==",
+ "version": "7.8.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.8.0.tgz",
+ "integrity": "sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==",
"dev": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "7.6.0",
- "@typescript-eslint/types": "7.6.0",
- "@typescript-eslint/typescript-estree": "7.6.0",
- "@typescript-eslint/visitor-keys": "7.6.0",
+ "@typescript-eslint/scope-manager": "7.8.0",
+ "@typescript-eslint/types": "7.8.0",
+ "@typescript-eslint/typescript-estree": "7.8.0",
+ "@typescript-eslint/visitor-keys": "7.8.0",
"debug": "^4.3.4"
},
"engines": {
@@ -4072,13 +4085,13 @@
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
- "version": "7.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.6.0.tgz",
- "integrity": "sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w==",
+ "version": "7.8.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz",
+ "integrity": "sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "7.6.0",
- "@typescript-eslint/visitor-keys": "7.6.0"
+ "@typescript-eslint/types": "7.8.0",
+ "@typescript-eslint/visitor-keys": "7.8.0"
},
"engines": {
"node": "^18.18.0 || >=20.0.0"
@@ -4089,9 +4102,9 @@
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
- "version": "7.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.6.0.tgz",
- "integrity": "sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ==",
+ "version": "7.8.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.8.0.tgz",
+ "integrity": "sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==",
"dev": true,
"engines": {
"node": "^18.18.0 || >=20.0.0"
@@ -4102,13 +4115,13 @@
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
- "version": "7.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.6.0.tgz",
- "integrity": "sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw==",
+ "version": "7.8.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz",
+ "integrity": "sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "7.6.0",
- "@typescript-eslint/visitor-keys": "7.6.0",
+ "@typescript-eslint/types": "7.8.0",
+ "@typescript-eslint/visitor-keys": "7.8.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -4130,12 +4143,12 @@
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
- "version": "7.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.6.0.tgz",
- "integrity": "sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==",
+ "version": "7.8.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz",
+ "integrity": "sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "7.6.0",
+ "@typescript-eslint/types": "7.8.0",
"eslint-visitor-keys": "^3.4.3"
},
"engines": {
@@ -11860,9 +11873,9 @@
}
},
"node_modules/rollup": {
- "version": "4.14.1",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.1.tgz",
- "integrity": "sha512-4LnHSdd3QK2pa1J6dFbfm1HN0D7vSK/ZuZTsdyUAlA6Rr1yTouUTL13HaDOGJVgby461AhrNGBS7sCGXXtT+SA==",
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.17.2.tgz",
+ "integrity": "sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==",
"dev": true,
"dependencies": {
"@types/estree": "1.0.5"
@@ -11875,21 +11888,22 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.14.1",
- "@rollup/rollup-android-arm64": "4.14.1",
- "@rollup/rollup-darwin-arm64": "4.14.1",
- "@rollup/rollup-darwin-x64": "4.14.1",
- "@rollup/rollup-linux-arm-gnueabihf": "4.14.1",
- "@rollup/rollup-linux-arm64-gnu": "4.14.1",
- "@rollup/rollup-linux-arm64-musl": "4.14.1",
- "@rollup/rollup-linux-powerpc64le-gnu": "4.14.1",
- "@rollup/rollup-linux-riscv64-gnu": "4.14.1",
- "@rollup/rollup-linux-s390x-gnu": "4.14.1",
- "@rollup/rollup-linux-x64-gnu": "4.14.1",
- "@rollup/rollup-linux-x64-musl": "4.14.1",
- "@rollup/rollup-win32-arm64-msvc": "4.14.1",
- "@rollup/rollup-win32-ia32-msvc": "4.14.1",
- "@rollup/rollup-win32-x64-msvc": "4.14.1",
+ "@rollup/rollup-android-arm-eabi": "4.17.2",
+ "@rollup/rollup-android-arm64": "4.17.2",
+ "@rollup/rollup-darwin-arm64": "4.17.2",
+ "@rollup/rollup-darwin-x64": "4.17.2",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.17.2",
+ "@rollup/rollup-linux-arm-musleabihf": "4.17.2",
+ "@rollup/rollup-linux-arm64-gnu": "4.17.2",
+ "@rollup/rollup-linux-arm64-musl": "4.17.2",
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.17.2",
+ "@rollup/rollup-linux-riscv64-gnu": "4.17.2",
+ "@rollup/rollup-linux-s390x-gnu": "4.17.2",
+ "@rollup/rollup-linux-x64-gnu": "4.17.2",
+ "@rollup/rollup-linux-x64-musl": "4.17.2",
+ "@rollup/rollup-win32-arm64-msvc": "4.17.2",
+ "@rollup/rollup-win32-ia32-msvc": "4.17.2",
+ "@rollup/rollup-win32-x64-msvc": "4.17.2",
"fsevents": "~2.3.2"
}
},
@@ -12910,9 +12924,9 @@
"optional": true
},
"node_modules/sass": {
- "version": "1.74.1",
- "resolved": "https://registry.npmjs.org/sass/-/sass-1.74.1.tgz",
- "integrity": "sha512-w0Z9p/rWZWelb88ISOLyvqTWGmtmu2QJICqDBGyNnfG4OUnPX9BBjjYIXUpXCMOOg5MQWNpqzt876la1fsTvUA==",
+ "version": "1.76.0",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.76.0.tgz",
+ "integrity": "sha512-nc3LeqvF2FNW5xGF1zxZifdW3ffIz5aBb7I7tSvOoNu7z1RQ6pFt9MBuiPtjgaI62YWrM/txjWlOCFiGtf2xpw==",
"dev": true,
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
@@ -13934,9 +13948,9 @@
}
},
"node_modules/typescript": {
- "version": "5.4.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz",
- "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==",
+ "version": "5.4.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
+ "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
diff --git a/package.json b/package.json
index 5ff9da50..858864ec 100644
--- a/package.json
+++ b/package.json
@@ -19,17 +19,17 @@
},
"devDependencies": {
"@antfu/eslint-config": "2.12.2",
- "@babel/core": "^7.24.4",
- "@babel/preset-env": "^7.24.4",
+ "@babel/core": "^7.24.5",
+ "@babel/preset-env": "^7.24.5",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-eslint": "^9.0.5",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
- "@types/node": "^20.12.6",
+ "@types/node": "^20.12.8",
"@typescript-eslint/eslint-plugin": "7.5.0",
- "@typescript-eslint/parser": "^7.6.0",
+ "@typescript-eslint/parser": "^7.8.0",
"autoprefixer": "^10.4.19",
"browserslist": "^4.23.0",
"cross-env": "7.0.3",
@@ -43,15 +43,15 @@
"eslint-plugin-prettier": "^5.1.3",
"postcss-discard-comments": "^6.0.2",
"punycode": "2.3.1",
- "rollup": "^4.14.1",
+ "rollup": "^4.17.2",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-clear": "^2.0.7",
"rollup-plugin-copy": "3.5.0",
"rollup-plugin-filesize": "^10.0.0",
"rollup-plugin-postcss": "^4.0.2",
- "sass": "^1.74.1",
+ "sass": "^1.76.0",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
- "typescript": "^5.4.4"
+ "typescript": "^5.4.5"
}
}
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
deleted file mode 100644
index 8465c664..00000000
--- a/pnpm-workspace.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-prefer-workspace-packages: true
-
-packages:
- - src/Prime/Resources
- - src/Noty/Prime/Resources
- - src/Notyf/Prime/Resources
- - src/SweetAlert/Prime/Resources
- - src/Toastr/Prime/Resources
diff --git a/src/Laravel/Facade/Flasher.php b/src/Laravel/Facade/Flasher.php
index 0fc8e34a..6f1400dc 100644
--- a/src/Laravel/Facade/Flasher.php
+++ b/src/Laravel/Facade/Flasher.php
@@ -7,7 +7,6 @@ namespace Flasher\Laravel\Facade;
use Flasher\Prime\Notification\Envelope;
use Flasher\Prime\Notification\NotificationBuilder;
use Flasher\Prime\Stamp\StampInterface;
-use Flasher\Prime\Translation\ResourceInterface;
use Illuminate\Support\Facades\Facade;
/**
@@ -33,11 +32,11 @@ use Illuminate\Support\Facades\Facade;
* @method static Envelope warning(string $message, array $options = [], ?string $title = null)
* @method static Envelope flash(?string $type = null, ?string $message = null, array $options = [], ?string $title = null)
* @method static Envelope preset(string $preset, array $parameters = [])
- * @method static Envelope operation(string $operation, string|ResourceInterface|null $resource = null)
- * @method static Envelope created(string|ResourceInterface|null $resource = null)
- * @method static Envelope updated(string|ResourceInterface|null $resource = null)
- * @method static Envelope saved(string|ResourceInterface|null $resource = null)
- * @method static Envelope deleted(string|ResourceInterface|null $resource = null)
+ * @method static Envelope operation(string $operation, string|object|null $resource = null)
+ * @method static Envelope created(string|object|null $resource = null)
+ * @method static Envelope updated(string|object|null $resource = null)
+ * @method static Envelope saved(string|object|null $resource = null)
+ * @method static Envelope deleted(string|object|null $resource = null)
* @method static Envelope push()
* @method static Envelope addSuccess(string $message, array $options = [], ?string $title = null)
* @method static Envelope addError(string $message, array $options = [], ?string $title = null)
diff --git a/src/Laravel/Translation/Translator.php b/src/Laravel/Translation/Translator.php
index 00c04c6a..ed9850b5 100644
--- a/src/Laravel/Translation/Translator.php
+++ b/src/Laravel/Translation/Translator.php
@@ -15,6 +15,8 @@ final readonly class Translator implements TranslatorInterface
public function translate(string $id, array $parameters = [], ?string $locale = null): string
{
+ $parameters = $this->formatParameters($parameters);
+
$translation = $this->translator->has('flasher::messages.'.$id, $locale)
? $this->translator->get('flasher::messages.'.$id, $parameters, $locale)
: ($this->translator->has('messages.'.$id, $locale)
@@ -32,4 +34,20 @@ final readonly class Translator implements TranslatorInterface
{
return $this->translator->getLocale();
}
+
+ /**
+ * Formats the parameters by stripping the colon prefix from keys for Laravel's translator.
+ *
+ * @param array $parameters
+ *
+ * @return array
+ */
+ private function formatParameters(array $parameters): array
+ {
+ foreach ($parameters as $key => $value) {
+ $parameters[ltrim($key, ':')] = $value;
+ }
+
+ return $parameters;
+ }
}
diff --git a/src/Noty/Prime/.phpstorm.meta.php b/src/Noty/Prime/.phpstorm.meta.php
index abef64e2..12d17435 100644
--- a/src/Noty/Prime/.phpstorm.meta.php
+++ b/src/Noty/Prime/.phpstorm.meta.php
@@ -8,11 +8,12 @@ expectedArguments(\Flasher\Noty\Prime\noty(), 1, 'success', 'error', 'info', 'wa
expectedArguments(\Flasher\Noty\Prime\NotyBuilder::layout(), 0, 'top', 'topLeft', 'topCenter', 'topRight', 'center', 'centerLeft', 'centerRight', 'bottom', 'bottomLeft', 'bottomCenter', 'bottomRight');
expectedArguments(\Flasher\Noty\Prime\NotyBuilder::theme(), 0, 'relax', 'mint', 'metroui');
expectedArguments(\Flasher\Noty\Prime\NotyBuilder::timeout(), 0, false, 1000, 3000, 3500, 5000);
-expectedArguments(\Flasher\Noty\Prime\NotyBuilder::closeWith(), 0, 'click', 'button', array('click', 'button'));
+expectedArguments(\Flasher\Noty\Prime\NotyBuilder::closeWith(), 0, 'click', 'button', ['click', 'button']);
expectedArguments(\Flasher\Noty\Prime\NotyBuilder::animation(), 0, 'open', 'close');
expectedArguments(\Flasher\Noty\Prime\NotyBuilder::sounds(), 0, 'sources', 'volume', 'conditions');
expectedArguments(\Flasher\Noty\Prime\NotyBuilder::docTitle(), 0, 'conditions');
expectedArguments(\Flasher\Noty\Prime\NotyBuilder::queue(), 0, 'global');
override(\Flasher\Prime\FlasherInterface::use(), map(['noty' => \Flasher\Noty\Prime\NotyInterface::class]));
+override(\Flasher\Prime\FlasherInterface::create(), map(['noty' => \Flasher\Noty\Prime\NotyInterface::class]));
override(\Flasher\Prime\Container\FlasherContainer::create(), map(['flasher.noty' => \Flasher\Noty\Prime\NotyInterface::class]));
diff --git a/src/Noty/Prime/NotyBuilder.php b/src/Noty/Prime/NotyBuilder.php
index 430c7958..bcdbc5ec 100644
--- a/src/Noty/Prime/NotyBuilder.php
+++ b/src/Noty/Prime/NotyBuilder.php
@@ -19,7 +19,7 @@ final class NotyBuilder extends NotificationBuilder
/**
* @param array $options
*/
- public function alert(?string $message = null, array $options = []): self
+ public function alert(?string $message = null, ?string $title = null, array $options = []): self
{
$this->type('alert');
@@ -27,6 +27,10 @@ final class NotyBuilder extends NotificationBuilder
$this->message($message);
}
+ if ($title) {
+ $this->title($title);
+ }
+
if ([] !== $options) {
$this->options($options);
}
@@ -91,6 +95,9 @@ final class NotyBuilder extends NotificationBuilder
}
/**
+ * @param "open"|"close" $animation
+ * @param "noty_effects_open"|"noty_effects_close"|string $effect
+ *
* If string, assumed to be CSS class name. If null, no animation at all. If function, runs the function. (v3.0.1+)
* You can use animate.css class names or your custom css animations as well.
*/
@@ -101,6 +108,9 @@ final class NotyBuilder extends NotificationBuilder
return $this;
}
+ /**
+ * @param "sources"|"volume"|"conditions" $option
+ */
public function sounds(string $option, mixed $value): self
{
$this->option('sounds.'.$option, $value);
@@ -108,6 +118,9 @@ final class NotyBuilder extends NotificationBuilder
return $this;
}
+ /**
+ * @param "conditions"|string $option
+ */
public function docTitle(string $option, string $docTitle): self
{
$this->option('docTitle'.$option, $docTitle);
diff --git a/src/Noty/Prime/Resources/assets/noty.ts b/src/Noty/Prime/Resources/assets/noty.ts
index 18b64b5c..1fd6db32 100644
--- a/src/Noty/Prime/Resources/assets/noty.ts
+++ b/src/Noty/Prime/Resources/assets/noty.ts
@@ -16,7 +16,7 @@ export default class NotyPlugin extends AbstractPlugin {
const noty = new Noty(options)
noty.show()
// @ts-expect-error
- noty.layoutDom?.dataset.turboCache = 'false'
+ noty.layoutDom?.dataset.turboTemporary = ''
})
}
diff --git a/src/Noty/Prime/Resources/dist/flasher-noty.esm.js b/src/Noty/Prime/Resources/dist/flasher-noty.esm.js
index 313d867b..8218e7f5 100644
--- a/src/Noty/Prime/Resources/dist/flasher-noty.esm.js
+++ b/src/Noty/Prime/Resources/dist/flasher-noty.esm.js
@@ -52,7 +52,7 @@ class NotyPlugin extends AbstractPlugin {
const options = Object.assign({ text: envelope.message, type: envelope.type }, envelope.options);
const noty = new Noty(options);
noty.show();
- (_a = noty.layoutDom) === null || _a === void 0 ? void 0 : _a.dataset.turboCache = 'false';
+ (_a = noty.layoutDom) === null || _a === void 0 ? void 0 : _a.dataset.turboTemporary = '';
});
}
renderOptions(options) {
diff --git a/src/Noty/Prime/Resources/dist/flasher-noty.js b/src/Noty/Prime/Resources/dist/flasher-noty.js
index 6bfb3cb0..466d91a8 100644
--- a/src/Noty/Prime/Resources/dist/flasher-noty.js
+++ b/src/Noty/Prime/Resources/dist/flasher-noty.js
@@ -55,7 +55,7 @@
const options = Object.assign({ text: envelope.message, type: envelope.type }, envelope.options);
const noty = new Noty(options);
noty.show();
- (_a = noty.layoutDom) === null || _a === void 0 ? void 0 : _a.dataset.turboCache = 'false';
+ (_a = noty.layoutDom) === null || _a === void 0 ? void 0 : _a.dataset.turboTemporary = '';
});
}
renderOptions(options) {
diff --git a/src/Noty/Prime/Resources/dist/flasher-noty.min.js b/src/Noty/Prime/Resources/dist/flasher-noty.min.js
index ea5c1af7..a644ef19 100644
--- a/src/Noty/Prime/Resources/dist/flasher-noty.min.js
+++ b/src/Noty/Prime/Resources/dist/flasher-noty.min.js
@@ -1 +1 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@flasher/flasher"),require("noty")):"function"==typeof define&&define.amd?define(["@flasher/flasher","noty"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Noty=t(e.flasher,e.Noty)}(this,(function(e,t){"use strict";class s{success(e,t,s){this.flash("success",e,t,s)}error(e,t,s){this.flash("error",e,t,s)}info(e,t,s){this.flash("info",e,t,s)}warning(e,t,s){this.flash("warning",e,t,s)}flash(e,t,s,o){if("object"==typeof e?(e=(o=e).type,t=o.message,s=o.title):"object"==typeof t?(t=(o=t).message,s=o.title):"object"==typeof s&&(s=(o=s).title),void 0===t)throw new Error("message option is required");const n={type:e,message:t,title:s||e,options:o||{},metadata:{plugin:""}};this.renderOptions(o||{}),this.renderEnvelopes([n])}}const o=new class extends s{renderEnvelopes(e){e.forEach((e=>{var s;const o=Object.assign({text:e.message,type:e.type},e.options),n=new t(o);n.show(),null===(s=n.layoutDom)||void 0===s||(s.dataset.turboCache="false")}))}renderOptions(e){t.overrideDefaults(Object.assign({timeout:e.timeout||5e3},e))}};return e.addPlugin("noty",o),o}));
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@flasher/flasher"),require("noty")):"function"==typeof define&&define.amd?define(["@flasher/flasher","noty"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Noty=t(e.flasher,e.Noty)}(this,(function(e,t){"use strict";class s{success(e,t,s){this.flash("success",e,t,s)}error(e,t,s){this.flash("error",e,t,s)}info(e,t,s){this.flash("info",e,t,s)}warning(e,t,s){this.flash("warning",e,t,s)}flash(e,t,s,o){if("object"==typeof e?(e=(o=e).type,t=o.message,s=o.title):"object"==typeof t?(t=(o=t).message,s=o.title):"object"==typeof s&&(s=(o=s).title),void 0===t)throw new Error("message option is required");const n={type:e,message:t,title:s||e,options:o||{},metadata:{plugin:""}};this.renderOptions(o||{}),this.renderEnvelopes([n])}}const o=new class extends s{renderEnvelopes(e){e.forEach((e=>{var s;const o=Object.assign({text:e.message,type:e.type},e.options),n=new t(o);n.show(),null===(s=n.layoutDom)||void 0===s||(s.dataset.turboTemporary="")}))}renderOptions(e){t.overrideDefaults(Object.assign({timeout:e.timeout||5e3},e))}};return e.addPlugin("noty",o),o}));
diff --git a/src/Noty/Prime/Resources/public/flasher-noty.min.js b/src/Noty/Prime/Resources/public/flasher-noty.min.js
index ea5c1af7..a644ef19 100644
--- a/src/Noty/Prime/Resources/public/flasher-noty.min.js
+++ b/src/Noty/Prime/Resources/public/flasher-noty.min.js
@@ -1 +1 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@flasher/flasher"),require("noty")):"function"==typeof define&&define.amd?define(["@flasher/flasher","noty"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Noty=t(e.flasher,e.Noty)}(this,(function(e,t){"use strict";class s{success(e,t,s){this.flash("success",e,t,s)}error(e,t,s){this.flash("error",e,t,s)}info(e,t,s){this.flash("info",e,t,s)}warning(e,t,s){this.flash("warning",e,t,s)}flash(e,t,s,o){if("object"==typeof e?(e=(o=e).type,t=o.message,s=o.title):"object"==typeof t?(t=(o=t).message,s=o.title):"object"==typeof s&&(s=(o=s).title),void 0===t)throw new Error("message option is required");const n={type:e,message:t,title:s||e,options:o||{},metadata:{plugin:""}};this.renderOptions(o||{}),this.renderEnvelopes([n])}}const o=new class extends s{renderEnvelopes(e){e.forEach((e=>{var s;const o=Object.assign({text:e.message,type:e.type},e.options),n=new t(o);n.show(),null===(s=n.layoutDom)||void 0===s||(s.dataset.turboCache="false")}))}renderOptions(e){t.overrideDefaults(Object.assign({timeout:e.timeout||5e3},e))}};return e.addPlugin("noty",o),o}));
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@flasher/flasher"),require("noty")):"function"==typeof define&&define.amd?define(["@flasher/flasher","noty"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Noty=t(e.flasher,e.Noty)}(this,(function(e,t){"use strict";class s{success(e,t,s){this.flash("success",e,t,s)}error(e,t,s){this.flash("error",e,t,s)}info(e,t,s){this.flash("info",e,t,s)}warning(e,t,s){this.flash("warning",e,t,s)}flash(e,t,s,o){if("object"==typeof e?(e=(o=e).type,t=o.message,s=o.title):"object"==typeof t?(t=(o=t).message,s=o.title):"object"==typeof s&&(s=(o=s).title),void 0===t)throw new Error("message option is required");const n={type:e,message:t,title:s||e,options:o||{},metadata:{plugin:""}};this.renderOptions(o||{}),this.renderEnvelopes([n])}}const o=new class extends s{renderEnvelopes(e){e.forEach((e=>{var s;const o=Object.assign({text:e.message,type:e.type},e.options),n=new t(o);n.show(),null===(s=n.layoutDom)||void 0===s||(s.dataset.turboTemporary="")}))}renderOptions(e){t.overrideDefaults(Object.assign({timeout:e.timeout||5e3},e))}};return e.addPlugin("noty",o),o}));
diff --git a/src/Noty/Prime/functions.php b/src/Noty/Prime/functions.php
index 6f3b17ae..3387dae9 100644
--- a/src/Noty/Prime/functions.php
+++ b/src/Noty/Prime/functions.php
@@ -24,6 +24,8 @@ if (!\function_exists('Flasher\Noty\Prime\noty')) {
* @return Envelope|NotyInterface Returns an Envelope containing the notification details when arguments are provided.
* Returns an instance of NotyInterface when no arguments are provided.
*
+ * @phpstan-return ($message is empty ? NotyInterface : Envelope)
+ *
* Usage:
* 1. Without arguments - Get the Noty factory: $noty = noty();
* 2. With arguments - Create and return a Noty notification:
diff --git a/src/Noty/Prime/helpers.php b/src/Noty/Prime/helpers.php
index 9db91fe1..d7e904dd 100644
--- a/src/Noty/Prime/helpers.php
+++ b/src/Noty/Prime/helpers.php
@@ -23,6 +23,8 @@ if (!function_exists('noty')) {
* @return Envelope|NotyInterface Returns an Envelope containing the notification details when arguments are provided.
* Returns an instance of NotyInterface when no arguments are provided.
*
+ * @phpstan-return ($message is empty ? NotyInterface : Envelope)
+ *
* Usage:
* 1. Without arguments - Get the Noty factory: $noty = noty();
* 2. With arguments - Create and return a Noty notification:
diff --git a/src/Notyf/Prime/.phpstorm.meta.php b/src/Notyf/Prime/.phpstorm.meta.php
index a00f6082..d2ece8f0 100644
--- a/src/Notyf/Prime/.phpstorm.meta.php
+++ b/src/Notyf/Prime/.phpstorm.meta.php
@@ -10,5 +10,6 @@ expectedArguments(\Flasher\Notyf\Prime\NotyfBuilder::position(), 0, 'x', 'y');
expectedArguments(\Flasher\Notyf\Prime\NotyfBuilder::position(), 1, 'top', 'right', 'bottom', 'left', 'center');
override(\Flasher\Prime\FlasherInterface::use(), map(['notyf' => \Flasher\Notyf\Prime\NotyfInterface::class]));
+override(\Flasher\Prime\FlasherInterface::create(), map(['notyf' => \Flasher\Notyf\Prime\NotyfInterface::class]));
override(\Flasher\Prime\Container\FlasherContainer::create(), map(['flasher.notyf' => \Notyf\Notyf\Prime\NotyfInterface::class]));
diff --git a/src/Notyf/Prime/NotyfBuilder.php b/src/Notyf/Prime/NotyfBuilder.php
index 468a391c..f36bb9d4 100644
--- a/src/Notyf/Prime/NotyfBuilder.php
+++ b/src/Notyf/Prime/NotyfBuilder.php
@@ -9,7 +9,7 @@ use Flasher\Prime\Notification\NotificationBuilder;
final class NotyfBuilder extends NotificationBuilder
{
/**
- * Number of miliseconds before hiding the notification. Use 0 for infinite duration.
+ * Number of milliseconds before hiding the notification. Use 0 for infinite duration.
*/
public function duration(int $duration): self
{
@@ -31,8 +31,12 @@ final class NotyfBuilder extends NotificationBuilder
/**
* Viewport location where notifications are rendered.
*
- * @param "x"|"y" $position
- * @param "left"|"center"|"right"|"top"|"bottom" $value
+ * @param "x"|"y" $position specifies the axis: 'x' for horizontal, 'y' for vertical
+ * @param "left"|"center"|"right"|"top"|"bottom" $value Position value, dependent on the axis:
+ * - If $position is 'x', $value must be 'left', 'center' or 'right'.
+ * - If $position is 'y', $value must be 'top', 'center' or 'bottom'.
+ *
+ * @phpstan-param ($position is 'x' ? "left"|"center"|"right" : "top"|"center"|"bottom") $value
*/
public function position(string $position, string $value): self
{
@@ -53,4 +57,11 @@ final class NotyfBuilder extends NotificationBuilder
return $this;
}
+
+ public function background(string $background): self
+ {
+ $this->option('background', $background);
+
+ return $this;
+ }
}
diff --git a/src/Notyf/Prime/Resources/assets/notyf.ts b/src/Notyf/Prime/Resources/assets/notyf.ts
index 95b63ff1..2951cf41 100644
--- a/src/Notyf/Prime/Resources/assets/notyf.ts
+++ b/src/Notyf/Prime/Resources/assets/notyf.ts
@@ -15,9 +15,9 @@ export default class NotyfPlugin extends AbstractPlugin {
})
// @ts-expect-error
- this.notyf.view.container.dataset.turboCache = 'false'
+ this.notyf.view.container.dataset.turboTemporary = ''
// @ts-expect-error
- this.notyf.view.a11yContainer.dataset.turboCache = 'false'
+ this.notyf.view.a11yContainer.dataset.turboTemporary = ''
}
public renderOptions(options: Options): void {
diff --git a/src/Notyf/Prime/Resources/dist/flasher-notyf.esm.js b/src/Notyf/Prime/Resources/dist/flasher-notyf.esm.js
index 7eb4c685..ef4a24cd 100644
--- a/src/Notyf/Prime/Resources/dist/flasher-notyf.esm.js
+++ b/src/Notyf/Prime/Resources/dist/flasher-notyf.esm.js
@@ -474,8 +474,8 @@ class NotyfPlugin extends AbstractPlugin {
const options = Object.assign(Object.assign({}, envelope), envelope.options);
(_a = this.notyf) === null || _a === void 0 ? void 0 : _a.open(options);
});
- this.notyf.view.container.dataset.turboCache = 'false';
- this.notyf.view.a11yContainer.dataset.turboCache = 'false';
+ this.notyf.view.container.dataset.turboTemporary = '';
+ this.notyf.view.a11yContainer.dataset.turboTemporary = '';
}
renderOptions(options) {
const nOptions = Object.assign({ duration: options.duration || 5000 }, options);
diff --git a/src/Notyf/Prime/Resources/dist/flasher-notyf.js b/src/Notyf/Prime/Resources/dist/flasher-notyf.js
index 88d0a185..4d5a6ed1 100644
--- a/src/Notyf/Prime/Resources/dist/flasher-notyf.js
+++ b/src/Notyf/Prime/Resources/dist/flasher-notyf.js
@@ -478,8 +478,8 @@
const options = Object.assign(Object.assign({}, envelope), envelope.options);
(_a = this.notyf) === null || _a === void 0 ? void 0 : _a.open(options);
});
- this.notyf.view.container.dataset.turboCache = 'false';
- this.notyf.view.a11yContainer.dataset.turboCache = 'false';
+ this.notyf.view.container.dataset.turboTemporary = '';
+ this.notyf.view.a11yContainer.dataset.turboTemporary = '';
}
renderOptions(options) {
const nOptions = Object.assign({ duration: options.duration || 5000 }, options);
diff --git a/src/Notyf/Prime/Resources/dist/flasher-notyf.min.js b/src/Notyf/Prime/Resources/dist/flasher-notyf.min.js
index 6d8dd4df..821cbb5a 100644
--- a/src/Notyf/Prime/Resources/dist/flasher-notyf.min.js
+++ b/src/Notyf/Prime/Resources/dist/flasher-notyf.min.js
@@ -1 +1 @@
-!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("@flasher/flasher")):"function"==typeof define&&define.amd?define(["@flasher/flasher"],i):(t="undefined"!=typeof globalThis?globalThis:t||self).notyf=i(t.flasher)}(this,(function(t){"use strict";class i{success(t,i,e){this.flash("success",t,i,e)}error(t,i,e){this.flash("error",t,i,e)}info(t,i,e){this.flash("info",t,i,e)}warning(t,i,e){this.flash("warning",t,i,e)}flash(t,i,e,n){if("object"==typeof t?(t=(n=t).type,i=n.message,e=n.title):"object"==typeof i?(i=(n=i).message,e=n.title):"object"==typeof e&&(e=(n=e).title),void 0===i)throw new Error("message option is required");const o={type:t,message:i,title:e||t,options:n||{},metadata:{plugin:""}};this.renderOptions(n||{}),this.renderEnvelopes([o])}}var e,n=function(){return n=Object.assign||function(t){for(var i,e=1,n=arguments.length;e{var i;const e=Object.assign(Object.assign({},t),t.options);null===(i=this.notyf)||void 0===i||i.open(e)})),this.notyf.view.container.dataset.turboCache="false",this.notyf.view.a11yContainer.dataset.turboCache="false"}renderOptions(t){const i=Object.assign({duration:t.duration||5e3},t);i.types=i.types||[],i.types.push({type:"info",className:"notyf__toast--info",background:"#5784E5",icon:{className:"notyf__icon--info",tagName:"i"}}),i.types.push({type:"warning",className:"notyf__toast--warning",background:"#E3A008",icon:{className:"notyf__icon--warning",tagName:"i"}}),this.notyf=this.notyf||new p(i)}};return t.addPlugin("notyf",f),f}));
+!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("@flasher/flasher")):"function"==typeof define&&define.amd?define(["@flasher/flasher"],i):(t="undefined"!=typeof globalThis?globalThis:t||self).notyf=i(t.flasher)}(this,(function(t){"use strict";class i{success(t,i,e){this.flash("success",t,i,e)}error(t,i,e){this.flash("error",t,i,e)}info(t,i,e){this.flash("info",t,i,e)}warning(t,i,e){this.flash("warning",t,i,e)}flash(t,i,e,n){if("object"==typeof t?(t=(n=t).type,i=n.message,e=n.title):"object"==typeof i?(i=(n=i).message,e=n.title):"object"==typeof e&&(e=(n=e).title),void 0===i)throw new Error("message option is required");const o={type:t,message:i,title:e||t,options:n||{},metadata:{plugin:""}};this.renderOptions(n||{}),this.renderEnvelopes([o])}}var e,n=function(){return n=Object.assign||function(t){for(var i,e=1,n=arguments.length;e{var i;const e=Object.assign(Object.assign({},t),t.options);null===(i=this.notyf)||void 0===i||i.open(e)})),this.notyf.view.container.dataset.turboTemporary="",this.notyf.view.a11yContainer.dataset.turboTemporary=""}renderOptions(t){const i=Object.assign({duration:t.duration||5e3},t);i.types=i.types||[],i.types.push({type:"info",className:"notyf__toast--info",background:"#5784E5",icon:{className:"notyf__icon--info",tagName:"i"}}),i.types.push({type:"warning",className:"notyf__toast--warning",background:"#E3A008",icon:{className:"notyf__icon--warning",tagName:"i"}}),this.notyf=this.notyf||new p(i)}};return t.addPlugin("notyf",f),f}));
diff --git a/src/Notyf/Prime/Resources/public/flasher-notyf.min.js b/src/Notyf/Prime/Resources/public/flasher-notyf.min.js
index 6d8dd4df..821cbb5a 100644
--- a/src/Notyf/Prime/Resources/public/flasher-notyf.min.js
+++ b/src/Notyf/Prime/Resources/public/flasher-notyf.min.js
@@ -1 +1 @@
-!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("@flasher/flasher")):"function"==typeof define&&define.amd?define(["@flasher/flasher"],i):(t="undefined"!=typeof globalThis?globalThis:t||self).notyf=i(t.flasher)}(this,(function(t){"use strict";class i{success(t,i,e){this.flash("success",t,i,e)}error(t,i,e){this.flash("error",t,i,e)}info(t,i,e){this.flash("info",t,i,e)}warning(t,i,e){this.flash("warning",t,i,e)}flash(t,i,e,n){if("object"==typeof t?(t=(n=t).type,i=n.message,e=n.title):"object"==typeof i?(i=(n=i).message,e=n.title):"object"==typeof e&&(e=(n=e).title),void 0===i)throw new Error("message option is required");const o={type:t,message:i,title:e||t,options:n||{},metadata:{plugin:""}};this.renderOptions(n||{}),this.renderEnvelopes([o])}}var e,n=function(){return n=Object.assign||function(t){for(var i,e=1,n=arguments.length;e{var i;const e=Object.assign(Object.assign({},t),t.options);null===(i=this.notyf)||void 0===i||i.open(e)})),this.notyf.view.container.dataset.turboCache="false",this.notyf.view.a11yContainer.dataset.turboCache="false"}renderOptions(t){const i=Object.assign({duration:t.duration||5e3},t);i.types=i.types||[],i.types.push({type:"info",className:"notyf__toast--info",background:"#5784E5",icon:{className:"notyf__icon--info",tagName:"i"}}),i.types.push({type:"warning",className:"notyf__toast--warning",background:"#E3A008",icon:{className:"notyf__icon--warning",tagName:"i"}}),this.notyf=this.notyf||new p(i)}};return t.addPlugin("notyf",f),f}));
+!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("@flasher/flasher")):"function"==typeof define&&define.amd?define(["@flasher/flasher"],i):(t="undefined"!=typeof globalThis?globalThis:t||self).notyf=i(t.flasher)}(this,(function(t){"use strict";class i{success(t,i,e){this.flash("success",t,i,e)}error(t,i,e){this.flash("error",t,i,e)}info(t,i,e){this.flash("info",t,i,e)}warning(t,i,e){this.flash("warning",t,i,e)}flash(t,i,e,n){if("object"==typeof t?(t=(n=t).type,i=n.message,e=n.title):"object"==typeof i?(i=(n=i).message,e=n.title):"object"==typeof e&&(e=(n=e).title),void 0===i)throw new Error("message option is required");const o={type:t,message:i,title:e||t,options:n||{},metadata:{plugin:""}};this.renderOptions(n||{}),this.renderEnvelopes([o])}}var e,n=function(){return n=Object.assign||function(t){for(var i,e=1,n=arguments.length;e{var i;const e=Object.assign(Object.assign({},t),t.options);null===(i=this.notyf)||void 0===i||i.open(e)})),this.notyf.view.container.dataset.turboTemporary="",this.notyf.view.a11yContainer.dataset.turboTemporary=""}renderOptions(t){const i=Object.assign({duration:t.duration||5e3},t);i.types=i.types||[],i.types.push({type:"info",className:"notyf__toast--info",background:"#5784E5",icon:{className:"notyf__icon--info",tagName:"i"}}),i.types.push({type:"warning",className:"notyf__toast--warning",background:"#E3A008",icon:{className:"notyf__icon--warning",tagName:"i"}}),this.notyf=this.notyf||new p(i)}};return t.addPlugin("notyf",f),f}));
diff --git a/src/Notyf/Prime/functions.php b/src/Notyf/Prime/functions.php
index 82ff2093..618a41d1 100644
--- a/src/Notyf/Prime/functions.php
+++ b/src/Notyf/Prime/functions.php
@@ -24,6 +24,8 @@ if (!\function_exists('Flasher\Notyf\Prime\notyf')) {
* @return Envelope|NotyfInterface Returns an Envelope containing the notification details when arguments are provided.
* Returns an instance of NotyfInterface when no arguments are provided.
*
+ * @phpstan-return ($message is empty ? NotyfInterface : Envelope)
+ *
* Usage:
* 1. Without arguments - Get the Notyf factory: $notyf = notyf();
* 2. With arguments - Create and return a Notyf notification:
diff --git a/src/Notyf/Prime/helpers.php b/src/Notyf/Prime/helpers.php
index 90a93319..903cdd37 100644
--- a/src/Notyf/Prime/helpers.php
+++ b/src/Notyf/Prime/helpers.php
@@ -23,6 +23,8 @@ if (!function_exists('notyf')) {
* @return Envelope|NotyfInterface Returns an Envelope containing the notification details when arguments are provided.
* Returns an instance of NotyfInterface when no arguments are provided.
*
+ * @phpstan-return ($message is empty ? NotyfInterface : Envelope)
+ *
* Usage:
* 1. Without arguments - Get the Notyf factory: $notyf = notyf();
* 2. With arguments - Create and return a Notyf notification:
diff --git a/src/Prime/.phpstorm.meta.php b/src/Prime/.phpstorm.meta.php
index d60d3ef2..b64296ae 100644
--- a/src/Prime/.phpstorm.meta.php
+++ b/src/Prime/.phpstorm.meta.php
@@ -4,20 +4,19 @@ namespace PHPSTORM_META;
override(Envelope::get(0), type(0));
-override(\Flasher\Prime\FlasherInterface::create(), map([
- 'flasher' => \Flasher\Prime\Factory\NotificationFactory::class,
- 'theme.' => \Flasher\Prime\Factory\NotificationFactory::class,
-]));
-
-override(\Flasher\Prime\FlasherInterface::using(), map([
- 'flasher' => \Flasher\Prime\Factory\NotificationFactory::class,
- 'theme.' => \Flasher\Prime\Factory\NotificationFactory::class,
-]));
+override(\Flasher\Prime\FlasherInterface::create(), map(['flasher' => \Flasher\Prime\Factory\FlasherFactory::class, 'theme.' => \Flasher\Prime\Factory\FlasherFactory::class]));
+override(\Flasher\Prime\Container\FlasherContainer::create(), map(['flasher' => \Flasher\Prime\Factory\FlasherFactory::class, 'theme.' => \Flasher\Prime\Factory\FlasherFactory::class]));
+override(\Flasher\Prime\FlasherInterface::use(), map(['flasher' => \Flasher\Prime\Factory\FlasherFactory::class, 'theme.' => \Flasher\Prime\Factory\FlasherFactory::class]));
registerArgumentsSet('types', 'success', 'error', 'warning', 'info');
expectedArguments(\Flasher\Prime\Notification\NotificationBuilderInterface::type(), 0, argumentsSet('types'));
expectedArguments(\Flasher\Prime\Notification\NotificationBuilderInterface::addFlash(), 0, argumentsSet('types'));
+expectedArguments(\Flasher\Prime\Notification\NotificationBuilderInterface::flash(), 0, argumentsSet('types'));
expectedArguments(\Flasher\Prime\Notification\NotificationInterface::setType(), 0, argumentsSet('types'));
+expectedArguments(flash(), 1, argumentsSet('types'));
+expectedArguments(\Flasher\Prime\flash(), 1, argumentsSet('types'));
expectedReturnValues(\Flasher\Prime\Notification\NotificationInterface::getType(), argumentsSet('types'));
expectedArguments(\Flasher\Prime\Notification\NotificationBuilderInterface::handler(), 0, 'flasher', 'toastr', 'noty', 'notyf', 'sweetalert');
+
+expectedArguments(\Flasher\Prime\FlasherInterface::render(), 0, 'html', 'json', 'array');
diff --git a/src/Prime/Container/FlasherContainer.php b/src/Prime/Container/FlasherContainer.php
index 7a84d6f9..400d93a2 100644
--- a/src/Prime/Container/FlasherContainer.php
+++ b/src/Prime/Container/FlasherContainer.php
@@ -47,7 +47,12 @@ final class FlasherContainer
*
* @param string $id the service identifier
*
- * @return FlasherInterface|NotificationFactoryInterface the service instance
+ * @phpstan-return ($id is 'flasher' ? \Flasher\Prime\FlasherInterface :
+ * ($id is 'flasher.noty' ? \Flasher\Noty\Prime\NotyInterface :
+ * ($id is 'flasher.notyf' ? \Flasher\Notyf\Prime\NotyfInterface :
+ * ($id is 'flasher.sweetalert' ? \Flasher\SweetAlert\Prime\SweetAlertInterface :
+ * ($id is 'flasher.toastr' ? \Flasher\Toastr\Prime\ToastrInterface :
+ * \Flasher\Prime\Factory\NotificationFactoryInterface)))))
*/
public static function create(string $id): FlasherInterface|NotificationFactoryInterface
{
diff --git a/src/Prime/EventDispatcher/EventListener/TranslationListener.php b/src/Prime/EventDispatcher/EventListener/TranslationListener.php
index c1e109dd..7e640413 100644
--- a/src/Prime/EventDispatcher/EventListener/TranslationListener.php
+++ b/src/Prime/EventDispatcher/EventListener/TranslationListener.php
@@ -38,13 +38,12 @@ final readonly class TranslationListener implements EventListenerInterface
private function translateEnvelope(Envelope $envelope): void
{
- $stamp = $envelope->get(TranslationStamp::class);
- if (!$stamp instanceof TranslationStamp) {
- return;
- }
+ $translationStamp = $envelope->get(TranslationStamp::class);
- $locale = $stamp->getLocale() ?: $this->translator->getLocale();
- $parameters = $stamp->getParameters() ?: $this->getParameters($envelope, $locale);
+ $locale = $translationStamp?->getLocale() ?: $this->translator->getLocale();
+
+ $parameters = $translationStamp?->getParameters() ?: [];
+ $parameters = array_merge($parameters, $this->getParameters($envelope, $locale));
$this->applyTranslations($envelope, $locale, $parameters);
diff --git a/src/Prime/Factory/FlasherFactory.php b/src/Prime/Factory/FlasherFactory.php
new file mode 100644
index 00000000..8ca77b77
--- /dev/null
+++ b/src/Prime/Factory/FlasherFactory.php
@@ -0,0 +1,19 @@
+storageManager);
+ }
+}
diff --git a/src/Prime/Factory/FlasherFactoryInterface.php b/src/Prime/Factory/FlasherFactoryInterface.php
new file mode 100644
index 00000000..3b07d9d2
--- /dev/null
+++ b/src/Prime/Factory/FlasherFactoryInterface.php
@@ -0,0 +1,12 @@
+plugin ?: 'flasher', $this->storageManager);
- }
-
/**
* @param mixed[] $parameters
*/
diff --git a/src/Prime/Factory/NotificationFactoryLocatorInterface.php b/src/Prime/Factory/NotificationFactoryLocatorInterface.php
index b7518f35..1e0d06b4 100644
--- a/src/Prime/Factory/NotificationFactoryLocatorInterface.php
+++ b/src/Prime/Factory/NotificationFactoryLocatorInterface.php
@@ -8,5 +8,13 @@ interface NotificationFactoryLocatorInterface
{
public function has(string $id): bool;
+ /**
+ * @phpstan-return ($id is 'flasher' ? \Flasher\Prime\Factory\FlasherFactoryInterface :
+ * ($id is 'noty' ? \Flasher\Noty\Prime\NotyInterface :
+ * ($id is 'notyf' ? \Flasher\Notyf\Prime\NotyfInterface :
+ * ($id is 'sweetalert' ? \Flasher\SweetAlert\Prime\SweetAlertInterface :
+ * ($id is 'toastr' ? \Flasher\Toastr\Prime\ToastrInterface :
+ * \Flasher\Prime\Factory\NotificationFactoryInterface)))))
+ */
public function get(string $id): NotificationFactoryInterface;
}
diff --git a/src/Prime/Flasher.php b/src/Prime/Flasher.php
index 1111e933..8007656d 100644
--- a/src/Prime/Flasher.php
+++ b/src/Prime/Flasher.php
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Flasher\Prime;
-use Flasher\Prime\Factory\NotificationFactory;
+use Flasher\Prime\Factory\FlasherFactory;
use Flasher\Prime\Factory\NotificationFactoryInterface;
use Flasher\Prime\Factory\NotificationFactoryLocatorInterface;
use Flasher\Prime\Response\ResponseManagerInterface;
@@ -37,7 +37,7 @@ final readonly class Flasher implements FlasherInterface
return $this->factoryLocator->get($alias);
}
- return new NotificationFactory($this->storageManager, $alias);
+ return new FlasherFactory($this->storageManager, $alias);
}
public function create(?string $alias): NotificationFactoryInterface
diff --git a/src/Prime/FlasherInterface.php b/src/Prime/FlasherInterface.php
index 9aa34985..5cb6405c 100644
--- a/src/Prime/FlasherInterface.php
+++ b/src/Prime/FlasherInterface.php
@@ -5,11 +5,12 @@ declare(strict_types=1);
namespace Flasher\Prime;
use Flasher\Prime\Factory\NotificationFactoryInterface;
+use Flasher\Prime\Response\Presenter\ArrayPresenter;
/**
- * @mixin \Flasher\Prime\Notification\NotificationBuilderInterface
+ * @mixin \Flasher\Prime\Notification\FlasherBuilder
*
- * @method NotificationFactoryInterface create(string $alias)
+ * @phpstan-import-type ArrayPresenterType from ArrayPresenter
*/
interface FlasherInterface
{
@@ -17,9 +18,30 @@ interface FlasherInterface
* Get a notification factory instance.
*
* @throws \InvalidArgumentException
+ *
+ * @phpstan-return ($alias is 'flasher' ? \Flasher\Prime\Factory\FlasherFactoryInterface :
+ * ($alias is 'noty' ? \Flasher\Noty\Prime\NotyInterface :
+ * ($alias is 'notyf' ? \Flasher\Notyf\Prime\NotyfInterface :
+ * ($alias is 'sweetalert' ? \Flasher\SweetAlert\Prime\SweetAlertInterface :
+ * ($alias is 'toastr' ? \Flasher\Toastr\Prime\ToastrInterface :
+ * \Flasher\Prime\Factory\NotificationFactoryInterface)))))
*/
public function use(string $alias): NotificationFactoryInterface;
+ /**
+ * Get a notification factory instance.
+ *
+ * @throws \InvalidArgumentException
+ *
+ * @phpstan-return ($alias is 'flasher' ? \Flasher\Prime\Factory\FlasherFactoryInterface :
+ * ($alias is 'noty' ? \Flasher\Noty\Prime\NotyInterface :
+ * ($alias is 'notyf' ? \Flasher\Notyf\Prime\NotyfInterface :
+ * ($alias is 'sweetalert' ? \Flasher\SweetAlert\Prime\SweetAlertInterface :
+ * ($alias is 'toastr' ? \Flasher\Toastr\Prime\ToastrInterface :
+ * \Flasher\Prime\Factory\NotificationFactoryInterface)))))
+ */
+ public function create(string $alias): NotificationFactoryInterface;
+
/**
* Renders the flash notifications based on the specified criteria, presenter, and context.
*
@@ -27,7 +49,10 @@ interface FlasherInterface
* @param string|"html"|"json" $presenter The presenter format for rendering the notifications (e.g., 'html', 'json').
* @param array $context additional context or options for rendering
*
- * @phpstan-return ($presenter is 'html' ? string : mixed)
+ * @phpstan-return ($presenter is 'html' ? string :
+ * ($presenter is 'array' ? ArrayPresenterType :
+ * ($presenter is 'json' ? ArrayPresenterType :
+ * mixed)))
*/
public function render(string $presenter = 'html', array $criteria = [], array $context = []): mixed;
}
diff --git a/src/Prime/Notification/FlasherBuilder.php b/src/Prime/Notification/FlasherBuilder.php
new file mode 100644
index 00000000..a1dfd9fb
--- /dev/null
+++ b/src/Prime/Notification/FlasherBuilder.php
@@ -0,0 +1,29 @@
+option('timeout', $milliseconds);
+
+ return $this;
+ }
+
+ public function direction(string $direction): self
+ {
+ $this->option('direction', $direction);
+
+ return $this;
+ }
+
+ public function position(string $position): self
+ {
+ $this->option('position', $position);
+
+ return $this;
+ }
+}
diff --git a/src/Prime/Notification/NotificationBuilder.php b/src/Prime/Notification/NotificationBuilder.php
index 737fdcc3..14350005 100644
--- a/src/Prime/Notification/NotificationBuilder.php
+++ b/src/Prime/Notification/NotificationBuilder.php
@@ -8,7 +8,7 @@ use Flasher\Prime\Stamp\PluginStamp;
use Flasher\Prime\Storage\StorageManagerInterface;
use Flasher\Prime\Support\Traits\Macroable;
-class NotificationBuilder implements NotificationBuilderInterface
+abstract class NotificationBuilder implements NotificationBuilderInterface
{
use Macroable;
use NotificationBuilderMethods;
diff --git a/src/Prime/Notification/NotificationBuilderInterface.php b/src/Prime/Notification/NotificationBuilderInterface.php
index e3879415..c42e9f23 100644
--- a/src/Prime/Notification/NotificationBuilderInterface.php
+++ b/src/Prime/Notification/NotificationBuilderInterface.php
@@ -5,7 +5,6 @@ declare(strict_types=1);
namespace Flasher\Prime\Notification;
use Flasher\Prime\Stamp\StampInterface;
-use Flasher\Prime\Translation\ResourceInterface;
interface NotificationBuilderInterface
{
@@ -83,15 +82,15 @@ interface NotificationBuilderInterface
*/
public function preset(string $preset, array $parameters = []): Envelope;
- public function operation(string $operation, string|ResourceInterface|null $resource = null): Envelope;
+ public function operation(string $operation, string|object|null $resource = null): Envelope;
- public function created(string|ResourceInterface|null $resource = null): Envelope;
+ public function created(string|object|null $resource = null): Envelope;
- public function updated(string|ResourceInterface|null $resource = null): Envelope;
+ public function updated(string|object|null $resource = null): Envelope;
- public function saved(string|ResourceInterface|null $resource = null): Envelope;
+ public function saved(string|object|null $resource = null): Envelope;
- public function deleted(string|ResourceInterface|null $resource = null): Envelope;
+ public function deleted(string|object|null $resource = null): Envelope;
public function push(): Envelope;
diff --git a/src/Prime/Notification/NotificationBuilderMethods.php b/src/Prime/Notification/NotificationBuilderMethods.php
index 831e8a25..cfa7522e 100644
--- a/src/Prime/Notification/NotificationBuilderMethods.php
+++ b/src/Prime/Notification/NotificationBuilderMethods.php
@@ -39,9 +39,9 @@ trait NotificationBuilderMethods
return $this;
}
- public function options(array $options, bool $merge = true): static
+ public function options(array $options, bool $append = true): static
{
- if ($merge) {
+ if ($append) {
$options = array_merge($this->envelope->getOptions(), $options);
}
diff --git a/src/Prime/Notification/NotificationStorageMethods.php b/src/Prime/Notification/NotificationStorageMethods.php
index a3e38daa..318ea255 100644
--- a/src/Prime/Notification/NotificationStorageMethods.php
+++ b/src/Prime/Notification/NotificationStorageMethods.php
@@ -6,7 +6,6 @@ namespace Flasher\Prime\Notification;
use Flasher\Prime\Stamp\PresetStamp;
use Flasher\Prime\Storage\StorageManagerInterface;
-use Flasher\Prime\Translation\ResourceInterface;
trait NotificationStorageMethods
{
@@ -82,22 +81,13 @@ trait NotificationStorageMethods
public function operation(string $operation, string|object|null $resource = null): Envelope
{
- if ($resource instanceof ResourceInterface) {
- $type = $resource->getResourceType();
- $name = $resource->getResourceName();
+ $resource = match (true) {
+ \is_string($resource) => $resource,
+ \is_object($resource) => $this->resolveResourceName($resource),
+ default => null,
+ };
- $resource = sprintf(
- '%s %s',
- $type,
- '' === $name ? '' : sprintf('"%s"', $name)
- );
- }
-
- $parameters = [
- 'resource' => $resource ?: 'resource',
- ];
-
- return $this->preset($operation, $parameters);
+ return $this->preset($operation, [':resource' => $resource ?: 'resource']);
}
public function push(): Envelope
@@ -108,4 +98,11 @@ trait NotificationStorageMethods
return $envelope;
}
+
+ private function resolveResourceName(object $object): ?string
+ {
+ $displayName = \is_callable([$object, 'getFlashIdentifier']) ? $object->getFlashIdentifier() : null;
+
+ return $displayName ?: basename(str_replace('\\', '/', $object::class));
+ }
}
diff --git a/src/Prime/Phpstan/ReturnTypes/FlashHelperExtension.php b/src/Prime/Phpstan/ReturnTypes/FlashHelperExtension.php
deleted file mode 100644
index 30fac5e8..00000000
--- a/src/Prime/Phpstan/ReturnTypes/FlashHelperExtension.php
+++ /dev/null
@@ -1,56 +0,0 @@
- [FlasherInterface::class, NotificationFactoryInterface::class],
- 'Flasher\Prime\flash' => [FlasherInterface::class, NotificationFactoryInterface::class],
- 'noty' => NotyInterface::class,
- 'Flasher\Noty\Prime\noty' => NotyInterface::class,
- 'notyf' => NotyfInterface::class,
- 'Flasher\Notyf\Prime\notyf' => NotyfInterface::class,
- 'sweetalert' => SweetAlertInterface::class,
- 'Flasher\SweetAlert\Prime\sweetalert' => SweetAlertInterface::class,
- 'toastr' => ToastrInterface::class,
- 'Flasher\Toastr\Prime\toastr' => ToastrInterface::class,
- ];
-
- public function isFunctionSupported(FunctionReflection $functionReflection): bool
- {
- return \array_key_exists($functionReflection->getName(), self::MAPPING);
- }
-
- public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope): ?Type
- {
- if (\count($functionCall->getArgs())) {
- return new ObjectType(Envelope::class);
- }
-
- $types = self::MAPPING[$functionReflection->getName()];
-
- if (\is_array($types)) {
- return TypeCombinator::union(...array_map(fn ($type) => new ObjectType($type), $types));
- }
-
- return new ObjectType($types);
- }
-}
diff --git a/src/Prime/Phpstan/ReturnTypes/FlasherContainerDynamicStaticMethodReturnTypeExtension.php b/src/Prime/Phpstan/ReturnTypes/FlasherContainerDynamicStaticMethodReturnTypeExtension.php
deleted file mode 100644
index 7f4332e8..00000000
--- a/src/Prime/Phpstan/ReturnTypes/FlasherContainerDynamicStaticMethodReturnTypeExtension.php
+++ /dev/null
@@ -1,53 +0,0 @@
- FlasherInterface::class,
- 'flasher.noty' => NotyInterface::class,
- 'flasher.notyf' => NotyfInterface::class,
- 'flasher.sweetalert' => SweetAlertInterface::class,
- 'flasher.toastr' => ToastrInterface::class,
- ];
-
- public function getClass(): string
- {
- return FlasherContainer::class;
- }
-
- public function isStaticMethodSupported(MethodReflection $methodReflection): bool
- {
- return 'create' === $methodReflection->getName();
- }
-
- public function getTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope): ?Type
- {
- $args = $methodCall->getArgs();
- $type = $scope->getType($args[0]->value);
-
- foreach ($type->getConstantStrings() as $service) {
- $factory = $service->getValue();
-
- return isset(self::MAPPING[$factory]) ? new ObjectType(self::MAPPING[$factory]) : null;
- }
-
- return null;
- }
-}
diff --git a/src/Prime/Resources/assets/flasher-plugin.ts b/src/Prime/Resources/assets/flasher-plugin.ts
index e6a085f0..4d8e63b5 100644
--- a/src/Prime/Resources/assets/flasher-plugin.ts
+++ b/src/Prime/Resources/assets/flasher-plugin.ts
@@ -59,7 +59,7 @@ export default class FlasherPlugin extends AbstractPlugin {
document.body.appendChild(container)
}
- container.dataset.turboCache = 'false'
+ container.dataset.turboTemporary = ''
return container
}
diff --git a/src/Prime/Resources/dist/flasher.esm.js b/src/Prime/Resources/dist/flasher.esm.js
index 3c04fe3a..bcdc6b17 100644
--- a/src/Prime/Resources/dist/flasher.esm.js
+++ b/src/Prime/Resources/dist/flasher.esm.js
@@ -116,7 +116,7 @@ class FlasherPlugin extends AbstractPlugin {
Object.entries(options.style).forEach(([key, value]) => container.style.setProperty(key, value));
document.body.appendChild(container);
}
- container.dataset.turboCache = 'false';
+ container.dataset.turboTemporary = '';
return container;
}
addToContainer(container, envelope, options) {
diff --git a/src/Prime/Resources/dist/flasher.js b/src/Prime/Resources/dist/flasher.js
index 93711c2d..d260ba63 100644
--- a/src/Prime/Resources/dist/flasher.js
+++ b/src/Prime/Resources/dist/flasher.js
@@ -122,7 +122,7 @@
Object.entries(options.style).forEach(([key, value]) => container.style.setProperty(key, value));
document.body.appendChild(container);
}
- container.dataset.turboCache = 'false';
+ container.dataset.turboTemporary = '';
return container;
}
addToContainer(container, envelope, options) {
diff --git a/src/Prime/Resources/dist/flasher.min.js b/src/Prime/Resources/dist/flasher.min.js
index 43e463f8..bbedfab2 100644
--- a/src/Prime/Resources/dist/flasher.min.js
+++ b/src/Prime/Resources/dist/flasher.min.js
@@ -1 +1 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).flasher=t()}(this,(function(){"use strict";function e(e,t,s,n){return new(s||(s=Promise))((function(o,r){function i(e){try{a(n.next(e))}catch(e){r(e)}}function l(e){try{a(n.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(i,l)}a((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class t{success(e,t,s){this.flash("success",e,t,s)}error(e,t,s){this.flash("error",e,t,s)}info(e,t,s){this.flash("info",e,t,s)}warning(e,t,s){this.flash("warning",e,t,s)}flash(e,t,s,n){if("object"==typeof e?(e=(n=e).type,t=n.message,s=n.title):"object"==typeof t?(t=(n=t).message,s=n.title):"object"==typeof s&&(s=(n=s).title),void 0===t)throw new Error("message option is required");const o={type:e,message:t,title:s||e,options:n||{},metadata:{plugin:""}};this.renderOptions(n||{}),this.renderEnvelopes([o])}}class s extends t{constructor(e){super(),this.options={timeout:5e3,timeouts:{success:5e3,info:5e3,error:5e3,warning:5e3},fps:30,position:"top-right",direction:"top",rtl:!1,style:{}},this.theme=e}renderEnvelopes(e){const t=()=>e.forEach((e=>{var t,s;const n=null!==(t=this.options.timeouts[e.type])&&void 0!==t?t:this.options.timeout,o=Object.assign(Object.assign(Object.assign({},this.options),e.options),{timeout:null!==(s=e.options.timeout)&&void 0!==s?s:n});this.addToContainer(this.createContainer(o),e,o)}));"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()}renderOptions(e){this.options=Object.assign(Object.assign({},this.options),e)}createContainer(e){let t=document.querySelector(`.fl-wrapper[data-position="${e.position}"]`);return t||(t=document.createElement("div"),t.className="fl-wrapper",t.dataset.position=e.position,Object.entries(e.style).forEach((([e,s])=>t.style.setProperty(e,s))),document.body.appendChild(t)),t.dataset.turboCache="false",t}addToContainer(e,t,s){var n;const o=this.stringToHTML(this.theme.render(t));o.classList.add(...("fl-container"+(s.rtl?" fl-rtl":"")).split(" ")),"bottom"===s.direction?e.append(o):e.prepend(o),requestAnimationFrame((()=>o.classList.add("fl-show"))),null===(n=o.querySelector(".fl-close"))||void 0===n||n.addEventListener("click",(e=>{e.stopPropagation(),this.removeNotification(o)})),this.addProgressBar(o,s)}addProgressBar(e,{timeout:t,fps:s}){if(t<=0||s<=0)return;const n=e.querySelector(".fl-progress-bar");if(!n)return;const o=document.createElement("span");o.classList.add("fl-progress"),n.append(o);const r=1e3/s;let i=0;const l=()=>{i+=1;const s=100*(1-r*(i/t));o.style.width=`${s}%`,s<=0&&(clearInterval(a),this.removeNotification(e))};let a=window.setInterval(l,r);e.addEventListener("mouseout",(()=>a=window.setInterval(l,r))),e.addEventListener("mouseover",(()=>clearInterval(a)))}removeNotification(e){e.classList.remove("fl-show"),e.ontransitionend=()=>{var t,s;!(null===(t=e.parentElement)||void 0===t?void 0:t.hasChildNodes())&&(null===(s=e.parentElement)||void 0===s||s.remove()),e.remove()}}stringToHTML(e){const t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstElementChild}}const n=new class extends t{constructor(){super(...arguments),this.defaultPlugin="flasher",this.plugins=new Map,this.themes=new Map}render(t){return e(this,void 0,void 0,(function*(){const e=this.resolveResponse(t);yield this.addAssets([{urls:e.styles,nonce:e.context.csp_style_nonce,type:"style"},{urls:e.scripts,nonce:e.context.csp_script_nonce,type:"script"}]),this.renderOptions(e.options),this.renderEnvelopes(e.envelopes)}))}renderEnvelopes(e){const t={};e.forEach((e=>{const s=this.resolvePluginAlias(e.metadata.plugin);t[s]=t[s]||[],t[s].push(e)})),Object.entries(t).forEach((([e,t])=>{this.use(e).renderEnvelopes(t)}))}renderOptions(e){Object.entries(e).forEach((([e,t])=>{this.use(e).renderOptions(t)}))}addPlugin(e,t){this.plugins.set(e,t)}addTheme(e,t){this.themes.set(e,t)}use(e){e=this.resolvePluginAlias(e),this.resolvePlugin(e);const t=this.plugins.get(e);if(!t)throw new Error(`Unable to resolve "${e}" plugin, did you forget to register it?`);return t}create(e){return this.use(e)}resolveResponse(e){const t=Object.assign({envelopes:[],options:{},scripts:[],styles:[],context:{}},e);return Object.entries(t.options).forEach((([e,s])=>{t.options[e]=this.resolveOptions(s)})),t.context.csp_style_nonce=t.context.csp_style_nonce||"",t.context.csp_script_nonce=t.context.csp_script_nonce||"",t.envelopes.forEach((s=>{s.metadata=s.metadata||{},s.metadata.plugin=this.resolvePluginAlias(s.metadata.plugin),this.addThemeStyles(t,s.metadata.plugin),s.options=this.resolveOptions(s.options),s.context=e.context})),t}resolveOptions(e){return Object.entries(e).forEach((([t,s])=>{e[t]=this.resolveFunction(s)})),e}resolveFunction(e){var t,s;if("string"!=typeof e)return e;const n=e.match(/^function\s*(\w*)\s*\(([^)]*)\)\s*\{([\s\S]*)\}$/)||e.match(/^\s*(\(([^)]*)\)|[^=]+)\s*=>\s*([\s\S]+)$/);if(!n)return e;const o=null!==(s=null===(t=n[2])||void 0===t?void 0:t.split(",").map((e=>e.trim())))&&void 0!==s?s:[];let r=n[3].trim();r.startsWith("{")||(r=`{ return ${r}; }`);try{return new Function(...o,r)}catch(t){return console.error("Error converting string to function:",t),e}}resolvePlugin(e){if(this.plugins.get(e)||!e.includes("theme."))return;const t=this.themes.get(e.replace("theme.",""));t&&this.addPlugin(e,new s(t))}resolvePluginAlias(e){return"flasher"===(e=e||this.defaultPlugin)?"theme.flasher":e}addAssets(t){return e(this,void 0,void 0,(function*(){for(const{urls:e,nonce:s,type:n}of t)for(const t of e)yield this.loadAsset(t,s,n)}))}loadAsset(t,s,n){return e(this,void 0,void 0,(function*(){if(document.querySelector(`${"style"===n?"link":"script"}[src="${t}"]`))return;const e=document.createElement("style"===n?"link":"script");return"style"===n?(e.rel="stylesheet",e.href=t):(e.type="text/javascript",e.src=t),s&&e.setAttribute("nonce",s),document.head.appendChild(e),new Promise(((s,n)=>{e.onload=()=>s(),e.onerror=()=>n(new Error(`Failed to load ${t}`))}))}))}addThemeStyles(e,t){var s;if("flasher"!==t&&!t.includes("theme."))return;t=t.replace("theme.","");const n=(null===(s=this.themes.get(t))||void 0===s?void 0:s.styles)||[];e.styles=Array.from(new Set([...e.styles,...n]))}};return n.addTheme("flasher",{render:e=>{const{type:t,title:s,message:n}=e,o="error"===t||"warning"===t;return`\n \n
\n
\n
\n ${s} \n ${n} \n
\n
× \n
\n
\n
`}}),n}));
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).flasher=t()}(this,(function(){"use strict";function e(e,t,s,n){return new(s||(s=Promise))((function(o,r){function i(e){try{a(n.next(e))}catch(e){r(e)}}function l(e){try{a(n.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(i,l)}a((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class t{success(e,t,s){this.flash("success",e,t,s)}error(e,t,s){this.flash("error",e,t,s)}info(e,t,s){this.flash("info",e,t,s)}warning(e,t,s){this.flash("warning",e,t,s)}flash(e,t,s,n){if("object"==typeof e?(e=(n=e).type,t=n.message,s=n.title):"object"==typeof t?(t=(n=t).message,s=n.title):"object"==typeof s&&(s=(n=s).title),void 0===t)throw new Error("message option is required");const o={type:e,message:t,title:s||e,options:n||{},metadata:{plugin:""}};this.renderOptions(n||{}),this.renderEnvelopes([o])}}class s extends t{constructor(e){super(),this.options={timeout:5e3,timeouts:{success:5e3,info:5e3,error:5e3,warning:5e3},fps:30,position:"top-right",direction:"top",rtl:!1,style:{}},this.theme=e}renderEnvelopes(e){const t=()=>e.forEach((e=>{var t,s;const n=null!==(t=this.options.timeouts[e.type])&&void 0!==t?t:this.options.timeout,o=Object.assign(Object.assign(Object.assign({},this.options),e.options),{timeout:null!==(s=e.options.timeout)&&void 0!==s?s:n});this.addToContainer(this.createContainer(o),e,o)}));"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()}renderOptions(e){this.options=Object.assign(Object.assign({},this.options),e)}createContainer(e){let t=document.querySelector(`.fl-wrapper[data-position="${e.position}"]`);return t||(t=document.createElement("div"),t.className="fl-wrapper",t.dataset.position=e.position,Object.entries(e.style).forEach((([e,s])=>t.style.setProperty(e,s))),document.body.appendChild(t)),t.dataset.turboTemporary="",t}addToContainer(e,t,s){var n;const o=this.stringToHTML(this.theme.render(t));o.classList.add(...("fl-container"+(s.rtl?" fl-rtl":"")).split(" ")),"bottom"===s.direction?e.append(o):e.prepend(o),requestAnimationFrame((()=>o.classList.add("fl-show"))),null===(n=o.querySelector(".fl-close"))||void 0===n||n.addEventListener("click",(e=>{e.stopPropagation(),this.removeNotification(o)})),this.addProgressBar(o,s)}addProgressBar(e,{timeout:t,fps:s}){if(t<=0||s<=0)return;const n=e.querySelector(".fl-progress-bar");if(!n)return;const o=document.createElement("span");o.classList.add("fl-progress"),n.append(o);const r=1e3/s;let i=0;const l=()=>{i+=1;const s=100*(1-r*(i/t));o.style.width=`${s}%`,s<=0&&(clearInterval(a),this.removeNotification(e))};let a=window.setInterval(l,r);e.addEventListener("mouseout",(()=>a=window.setInterval(l,r))),e.addEventListener("mouseover",(()=>clearInterval(a)))}removeNotification(e){e.classList.remove("fl-show"),e.ontransitionend=()=>{var t,s;!(null===(t=e.parentElement)||void 0===t?void 0:t.hasChildNodes())&&(null===(s=e.parentElement)||void 0===s||s.remove()),e.remove()}}stringToHTML(e){const t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstElementChild}}const n=new class extends t{constructor(){super(...arguments),this.defaultPlugin="flasher",this.plugins=new Map,this.themes=new Map}render(t){return e(this,void 0,void 0,(function*(){const e=this.resolveResponse(t);yield this.addAssets([{urls:e.styles,nonce:e.context.csp_style_nonce,type:"style"},{urls:e.scripts,nonce:e.context.csp_script_nonce,type:"script"}]),this.renderOptions(e.options),this.renderEnvelopes(e.envelopes)}))}renderEnvelopes(e){const t={};e.forEach((e=>{const s=this.resolvePluginAlias(e.metadata.plugin);t[s]=t[s]||[],t[s].push(e)})),Object.entries(t).forEach((([e,t])=>{this.use(e).renderEnvelopes(t)}))}renderOptions(e){Object.entries(e).forEach((([e,t])=>{this.use(e).renderOptions(t)}))}addPlugin(e,t){this.plugins.set(e,t)}addTheme(e,t){this.themes.set(e,t)}use(e){e=this.resolvePluginAlias(e),this.resolvePlugin(e);const t=this.plugins.get(e);if(!t)throw new Error(`Unable to resolve "${e}" plugin, did you forget to register it?`);return t}create(e){return this.use(e)}resolveResponse(e){const t=Object.assign({envelopes:[],options:{},scripts:[],styles:[],context:{}},e);return Object.entries(t.options).forEach((([e,s])=>{t.options[e]=this.resolveOptions(s)})),t.context.csp_style_nonce=t.context.csp_style_nonce||"",t.context.csp_script_nonce=t.context.csp_script_nonce||"",t.envelopes.forEach((s=>{s.metadata=s.metadata||{},s.metadata.plugin=this.resolvePluginAlias(s.metadata.plugin),this.addThemeStyles(t,s.metadata.plugin),s.options=this.resolveOptions(s.options),s.context=e.context})),t}resolveOptions(e){return Object.entries(e).forEach((([t,s])=>{e[t]=this.resolveFunction(s)})),e}resolveFunction(e){var t,s;if("string"!=typeof e)return e;const n=e.match(/^function\s*(\w*)\s*\(([^)]*)\)\s*\{([\s\S]*)\}$/)||e.match(/^\s*(\(([^)]*)\)|[^=]+)\s*=>\s*([\s\S]+)$/);if(!n)return e;const o=null!==(s=null===(t=n[2])||void 0===t?void 0:t.split(",").map((e=>e.trim())))&&void 0!==s?s:[];let r=n[3].trim();r.startsWith("{")||(r=`{ return ${r}; }`);try{return new Function(...o,r)}catch(t){return console.error("Error converting string to function:",t),e}}resolvePlugin(e){if(this.plugins.get(e)||!e.includes("theme."))return;const t=this.themes.get(e.replace("theme.",""));t&&this.addPlugin(e,new s(t))}resolvePluginAlias(e){return"flasher"===(e=e||this.defaultPlugin)?"theme.flasher":e}addAssets(t){return e(this,void 0,void 0,(function*(){for(const{urls:e,nonce:s,type:n}of t)for(const t of e)yield this.loadAsset(t,s,n)}))}loadAsset(t,s,n){return e(this,void 0,void 0,(function*(){if(document.querySelector(`${"style"===n?"link":"script"}[src="${t}"]`))return;const e=document.createElement("style"===n?"link":"script");return"style"===n?(e.rel="stylesheet",e.href=t):(e.type="text/javascript",e.src=t),s&&e.setAttribute("nonce",s),document.head.appendChild(e),new Promise(((s,n)=>{e.onload=()=>s(),e.onerror=()=>n(new Error(`Failed to load ${t}`))}))}))}addThemeStyles(e,t){var s;if("flasher"!==t&&!t.includes("theme."))return;t=t.replace("theme.","");const n=(null===(s=this.themes.get(t))||void 0===s?void 0:s.styles)||[];e.styles=Array.from(new Set([...e.styles,...n]))}};return n.addTheme("flasher",{render:e=>{const{type:t,title:s,message:n}=e,o="error"===t||"warning"===t;return`\n \n
\n
\n
\n ${s} \n ${n} \n
\n
× \n
\n
\n
`}}),n}));
diff --git a/src/Prime/Resources/public/flasher.min.js b/src/Prime/Resources/public/flasher.min.js
index 43e463f8..bbedfab2 100644
--- a/src/Prime/Resources/public/flasher.min.js
+++ b/src/Prime/Resources/public/flasher.min.js
@@ -1 +1 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).flasher=t()}(this,(function(){"use strict";function e(e,t,s,n){return new(s||(s=Promise))((function(o,r){function i(e){try{a(n.next(e))}catch(e){r(e)}}function l(e){try{a(n.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(i,l)}a((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class t{success(e,t,s){this.flash("success",e,t,s)}error(e,t,s){this.flash("error",e,t,s)}info(e,t,s){this.flash("info",e,t,s)}warning(e,t,s){this.flash("warning",e,t,s)}flash(e,t,s,n){if("object"==typeof e?(e=(n=e).type,t=n.message,s=n.title):"object"==typeof t?(t=(n=t).message,s=n.title):"object"==typeof s&&(s=(n=s).title),void 0===t)throw new Error("message option is required");const o={type:e,message:t,title:s||e,options:n||{},metadata:{plugin:""}};this.renderOptions(n||{}),this.renderEnvelopes([o])}}class s extends t{constructor(e){super(),this.options={timeout:5e3,timeouts:{success:5e3,info:5e3,error:5e3,warning:5e3},fps:30,position:"top-right",direction:"top",rtl:!1,style:{}},this.theme=e}renderEnvelopes(e){const t=()=>e.forEach((e=>{var t,s;const n=null!==(t=this.options.timeouts[e.type])&&void 0!==t?t:this.options.timeout,o=Object.assign(Object.assign(Object.assign({},this.options),e.options),{timeout:null!==(s=e.options.timeout)&&void 0!==s?s:n});this.addToContainer(this.createContainer(o),e,o)}));"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()}renderOptions(e){this.options=Object.assign(Object.assign({},this.options),e)}createContainer(e){let t=document.querySelector(`.fl-wrapper[data-position="${e.position}"]`);return t||(t=document.createElement("div"),t.className="fl-wrapper",t.dataset.position=e.position,Object.entries(e.style).forEach((([e,s])=>t.style.setProperty(e,s))),document.body.appendChild(t)),t.dataset.turboCache="false",t}addToContainer(e,t,s){var n;const o=this.stringToHTML(this.theme.render(t));o.classList.add(...("fl-container"+(s.rtl?" fl-rtl":"")).split(" ")),"bottom"===s.direction?e.append(o):e.prepend(o),requestAnimationFrame((()=>o.classList.add("fl-show"))),null===(n=o.querySelector(".fl-close"))||void 0===n||n.addEventListener("click",(e=>{e.stopPropagation(),this.removeNotification(o)})),this.addProgressBar(o,s)}addProgressBar(e,{timeout:t,fps:s}){if(t<=0||s<=0)return;const n=e.querySelector(".fl-progress-bar");if(!n)return;const o=document.createElement("span");o.classList.add("fl-progress"),n.append(o);const r=1e3/s;let i=0;const l=()=>{i+=1;const s=100*(1-r*(i/t));o.style.width=`${s}%`,s<=0&&(clearInterval(a),this.removeNotification(e))};let a=window.setInterval(l,r);e.addEventListener("mouseout",(()=>a=window.setInterval(l,r))),e.addEventListener("mouseover",(()=>clearInterval(a)))}removeNotification(e){e.classList.remove("fl-show"),e.ontransitionend=()=>{var t,s;!(null===(t=e.parentElement)||void 0===t?void 0:t.hasChildNodes())&&(null===(s=e.parentElement)||void 0===s||s.remove()),e.remove()}}stringToHTML(e){const t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstElementChild}}const n=new class extends t{constructor(){super(...arguments),this.defaultPlugin="flasher",this.plugins=new Map,this.themes=new Map}render(t){return e(this,void 0,void 0,(function*(){const e=this.resolveResponse(t);yield this.addAssets([{urls:e.styles,nonce:e.context.csp_style_nonce,type:"style"},{urls:e.scripts,nonce:e.context.csp_script_nonce,type:"script"}]),this.renderOptions(e.options),this.renderEnvelopes(e.envelopes)}))}renderEnvelopes(e){const t={};e.forEach((e=>{const s=this.resolvePluginAlias(e.metadata.plugin);t[s]=t[s]||[],t[s].push(e)})),Object.entries(t).forEach((([e,t])=>{this.use(e).renderEnvelopes(t)}))}renderOptions(e){Object.entries(e).forEach((([e,t])=>{this.use(e).renderOptions(t)}))}addPlugin(e,t){this.plugins.set(e,t)}addTheme(e,t){this.themes.set(e,t)}use(e){e=this.resolvePluginAlias(e),this.resolvePlugin(e);const t=this.plugins.get(e);if(!t)throw new Error(`Unable to resolve "${e}" plugin, did you forget to register it?`);return t}create(e){return this.use(e)}resolveResponse(e){const t=Object.assign({envelopes:[],options:{},scripts:[],styles:[],context:{}},e);return Object.entries(t.options).forEach((([e,s])=>{t.options[e]=this.resolveOptions(s)})),t.context.csp_style_nonce=t.context.csp_style_nonce||"",t.context.csp_script_nonce=t.context.csp_script_nonce||"",t.envelopes.forEach((s=>{s.metadata=s.metadata||{},s.metadata.plugin=this.resolvePluginAlias(s.metadata.plugin),this.addThemeStyles(t,s.metadata.plugin),s.options=this.resolveOptions(s.options),s.context=e.context})),t}resolveOptions(e){return Object.entries(e).forEach((([t,s])=>{e[t]=this.resolveFunction(s)})),e}resolveFunction(e){var t,s;if("string"!=typeof e)return e;const n=e.match(/^function\s*(\w*)\s*\(([^)]*)\)\s*\{([\s\S]*)\}$/)||e.match(/^\s*(\(([^)]*)\)|[^=]+)\s*=>\s*([\s\S]+)$/);if(!n)return e;const o=null!==(s=null===(t=n[2])||void 0===t?void 0:t.split(",").map((e=>e.trim())))&&void 0!==s?s:[];let r=n[3].trim();r.startsWith("{")||(r=`{ return ${r}; }`);try{return new Function(...o,r)}catch(t){return console.error("Error converting string to function:",t),e}}resolvePlugin(e){if(this.plugins.get(e)||!e.includes("theme."))return;const t=this.themes.get(e.replace("theme.",""));t&&this.addPlugin(e,new s(t))}resolvePluginAlias(e){return"flasher"===(e=e||this.defaultPlugin)?"theme.flasher":e}addAssets(t){return e(this,void 0,void 0,(function*(){for(const{urls:e,nonce:s,type:n}of t)for(const t of e)yield this.loadAsset(t,s,n)}))}loadAsset(t,s,n){return e(this,void 0,void 0,(function*(){if(document.querySelector(`${"style"===n?"link":"script"}[src="${t}"]`))return;const e=document.createElement("style"===n?"link":"script");return"style"===n?(e.rel="stylesheet",e.href=t):(e.type="text/javascript",e.src=t),s&&e.setAttribute("nonce",s),document.head.appendChild(e),new Promise(((s,n)=>{e.onload=()=>s(),e.onerror=()=>n(new Error(`Failed to load ${t}`))}))}))}addThemeStyles(e,t){var s;if("flasher"!==t&&!t.includes("theme."))return;t=t.replace("theme.","");const n=(null===(s=this.themes.get(t))||void 0===s?void 0:s.styles)||[];e.styles=Array.from(new Set([...e.styles,...n]))}};return n.addTheme("flasher",{render:e=>{const{type:t,title:s,message:n}=e,o="error"===t||"warning"===t;return`\n \n
\n
\n
\n ${s} \n ${n} \n
\n
× \n
\n
\n
`}}),n}));
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).flasher=t()}(this,(function(){"use strict";function e(e,t,s,n){return new(s||(s=Promise))((function(o,r){function i(e){try{a(n.next(e))}catch(e){r(e)}}function l(e){try{a(n.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(i,l)}a((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class t{success(e,t,s){this.flash("success",e,t,s)}error(e,t,s){this.flash("error",e,t,s)}info(e,t,s){this.flash("info",e,t,s)}warning(e,t,s){this.flash("warning",e,t,s)}flash(e,t,s,n){if("object"==typeof e?(e=(n=e).type,t=n.message,s=n.title):"object"==typeof t?(t=(n=t).message,s=n.title):"object"==typeof s&&(s=(n=s).title),void 0===t)throw new Error("message option is required");const o={type:e,message:t,title:s||e,options:n||{},metadata:{plugin:""}};this.renderOptions(n||{}),this.renderEnvelopes([o])}}class s extends t{constructor(e){super(),this.options={timeout:5e3,timeouts:{success:5e3,info:5e3,error:5e3,warning:5e3},fps:30,position:"top-right",direction:"top",rtl:!1,style:{}},this.theme=e}renderEnvelopes(e){const t=()=>e.forEach((e=>{var t,s;const n=null!==(t=this.options.timeouts[e.type])&&void 0!==t?t:this.options.timeout,o=Object.assign(Object.assign(Object.assign({},this.options),e.options),{timeout:null!==(s=e.options.timeout)&&void 0!==s?s:n});this.addToContainer(this.createContainer(o),e,o)}));"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()}renderOptions(e){this.options=Object.assign(Object.assign({},this.options),e)}createContainer(e){let t=document.querySelector(`.fl-wrapper[data-position="${e.position}"]`);return t||(t=document.createElement("div"),t.className="fl-wrapper",t.dataset.position=e.position,Object.entries(e.style).forEach((([e,s])=>t.style.setProperty(e,s))),document.body.appendChild(t)),t.dataset.turboTemporary="",t}addToContainer(e,t,s){var n;const o=this.stringToHTML(this.theme.render(t));o.classList.add(...("fl-container"+(s.rtl?" fl-rtl":"")).split(" ")),"bottom"===s.direction?e.append(o):e.prepend(o),requestAnimationFrame((()=>o.classList.add("fl-show"))),null===(n=o.querySelector(".fl-close"))||void 0===n||n.addEventListener("click",(e=>{e.stopPropagation(),this.removeNotification(o)})),this.addProgressBar(o,s)}addProgressBar(e,{timeout:t,fps:s}){if(t<=0||s<=0)return;const n=e.querySelector(".fl-progress-bar");if(!n)return;const o=document.createElement("span");o.classList.add("fl-progress"),n.append(o);const r=1e3/s;let i=0;const l=()=>{i+=1;const s=100*(1-r*(i/t));o.style.width=`${s}%`,s<=0&&(clearInterval(a),this.removeNotification(e))};let a=window.setInterval(l,r);e.addEventListener("mouseout",(()=>a=window.setInterval(l,r))),e.addEventListener("mouseover",(()=>clearInterval(a)))}removeNotification(e){e.classList.remove("fl-show"),e.ontransitionend=()=>{var t,s;!(null===(t=e.parentElement)||void 0===t?void 0:t.hasChildNodes())&&(null===(s=e.parentElement)||void 0===s||s.remove()),e.remove()}}stringToHTML(e){const t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstElementChild}}const n=new class extends t{constructor(){super(...arguments),this.defaultPlugin="flasher",this.plugins=new Map,this.themes=new Map}render(t){return e(this,void 0,void 0,(function*(){const e=this.resolveResponse(t);yield this.addAssets([{urls:e.styles,nonce:e.context.csp_style_nonce,type:"style"},{urls:e.scripts,nonce:e.context.csp_script_nonce,type:"script"}]),this.renderOptions(e.options),this.renderEnvelopes(e.envelopes)}))}renderEnvelopes(e){const t={};e.forEach((e=>{const s=this.resolvePluginAlias(e.metadata.plugin);t[s]=t[s]||[],t[s].push(e)})),Object.entries(t).forEach((([e,t])=>{this.use(e).renderEnvelopes(t)}))}renderOptions(e){Object.entries(e).forEach((([e,t])=>{this.use(e).renderOptions(t)}))}addPlugin(e,t){this.plugins.set(e,t)}addTheme(e,t){this.themes.set(e,t)}use(e){e=this.resolvePluginAlias(e),this.resolvePlugin(e);const t=this.plugins.get(e);if(!t)throw new Error(`Unable to resolve "${e}" plugin, did you forget to register it?`);return t}create(e){return this.use(e)}resolveResponse(e){const t=Object.assign({envelopes:[],options:{},scripts:[],styles:[],context:{}},e);return Object.entries(t.options).forEach((([e,s])=>{t.options[e]=this.resolveOptions(s)})),t.context.csp_style_nonce=t.context.csp_style_nonce||"",t.context.csp_script_nonce=t.context.csp_script_nonce||"",t.envelopes.forEach((s=>{s.metadata=s.metadata||{},s.metadata.plugin=this.resolvePluginAlias(s.metadata.plugin),this.addThemeStyles(t,s.metadata.plugin),s.options=this.resolveOptions(s.options),s.context=e.context})),t}resolveOptions(e){return Object.entries(e).forEach((([t,s])=>{e[t]=this.resolveFunction(s)})),e}resolveFunction(e){var t,s;if("string"!=typeof e)return e;const n=e.match(/^function\s*(\w*)\s*\(([^)]*)\)\s*\{([\s\S]*)\}$/)||e.match(/^\s*(\(([^)]*)\)|[^=]+)\s*=>\s*([\s\S]+)$/);if(!n)return e;const o=null!==(s=null===(t=n[2])||void 0===t?void 0:t.split(",").map((e=>e.trim())))&&void 0!==s?s:[];let r=n[3].trim();r.startsWith("{")||(r=`{ return ${r}; }`);try{return new Function(...o,r)}catch(t){return console.error("Error converting string to function:",t),e}}resolvePlugin(e){if(this.plugins.get(e)||!e.includes("theme."))return;const t=this.themes.get(e.replace("theme.",""));t&&this.addPlugin(e,new s(t))}resolvePluginAlias(e){return"flasher"===(e=e||this.defaultPlugin)?"theme.flasher":e}addAssets(t){return e(this,void 0,void 0,(function*(){for(const{urls:e,nonce:s,type:n}of t)for(const t of e)yield this.loadAsset(t,s,n)}))}loadAsset(t,s,n){return e(this,void 0,void 0,(function*(){if(document.querySelector(`${"style"===n?"link":"script"}[src="${t}"]`))return;const e=document.createElement("style"===n?"link":"script");return"style"===n?(e.rel="stylesheet",e.href=t):(e.type="text/javascript",e.src=t),s&&e.setAttribute("nonce",s),document.head.appendChild(e),new Promise(((s,n)=>{e.onload=()=>s(),e.onerror=()=>n(new Error(`Failed to load ${t}`))}))}))}addThemeStyles(e,t){var s;if("flasher"!==t&&!t.includes("theme."))return;t=t.replace("theme.","");const n=(null===(s=this.themes.get(t))||void 0===s?void 0:s.styles)||[];e.styles=Array.from(new Set([...e.styles,...n]))}};return n.addTheme("flasher",{render:e=>{const{type:t,title:s,message:n}=e,o="error"===t||"warning"===t;return`\n \n
\n
\n
\n ${s} \n ${n} \n
\n
× \n
\n
\n
`}}),n}));
diff --git a/src/Prime/Response/Presenter/ArrayPresenter.php b/src/Prime/Response/Presenter/ArrayPresenter.php
index 581f3da4..ac8011f0 100644
--- a/src/Prime/Response/Presenter/ArrayPresenter.php
+++ b/src/Prime/Response/Presenter/ArrayPresenter.php
@@ -6,22 +6,25 @@ namespace Flasher\Prime\Response\Presenter;
use Flasher\Prime\Response\Response;
+/**
+ * @phpstan-type ArrayPresenterType array{
+ * envelopes: array,
+ * metadata: array,
+ * }>,
+ * scripts: string[],
+ * styles: string[],
+ * options: array>,
+ * context: array,
+ * }
+ */
final class ArrayPresenter implements PresenterInterface
{
/**
- * @return array{
- * envelopes: array,
- * metadata: array,
- * }>,
- * scripts: string[],
- * styles: string[],
- * options: array>,
- * context: array,
- * }
+ * @phpstan-return ArrayPresenterType
*/
public function render(Response $response): array
{
diff --git a/src/Prime/Response/ResponseManagerInterface.php b/src/Prime/Response/ResponseManagerInterface.php
index 963e87a6..4ba12a19 100644
--- a/src/Prime/Response/ResponseManagerInterface.php
+++ b/src/Prime/Response/ResponseManagerInterface.php
@@ -4,13 +4,22 @@ declare(strict_types=1);
namespace Flasher\Prime\Response;
+use Flasher\Prime\Response\Presenter\ArrayPresenter;
use Flasher\Prime\Response\Presenter\PresenterInterface;
+/**
+ * @phpstan-import-type ArrayPresenterType from ArrayPresenter
+ */
interface ResponseManagerInterface
{
/**
* @param array $criteria
* @param array $context
+ *
+ * @phpstan-return ($presenter is 'html' ? string :
+ * ($presenter is 'array' ? ArrayPresenterType :
+ * ($presenter is 'json' ? ArrayPresenterType :
+ * mixed)))
*/
public function render(string $presenter = 'html', array $criteria = [], array $context = []): mixed;
diff --git a/src/Prime/Support/Traits/MethodAliasResolver.php b/src/Prime/Support/Traits/MethodAliasResolver.php
deleted file mode 100644
index 1a4a832c..00000000
--- a/src/Prime/Support/Traits/MethodAliasResolver.php
+++ /dev/null
@@ -1,68 +0,0 @@
-
- */
- protected array $methodAliases = [];
-
- /**
- * Retrieves all method aliases.
- *
- * @return array
- */
- protected function getMethodAliases(): array
- {
- return $this->methodAliases;
- }
-
- /**
- * Retrieves the real method name for a given alias.
- */
- protected function resolveMethodAlias(string $method): string
- {
- if (!$this->hasMethodAlias($method)) {
- throw new \BadMethodCallException(sprintf('Method %s::%s does not exist.', static::class, $method));
- }
-
- return $this->methodAliases[$method];
- }
-
- /**
- * Checks if a method alias exists.
- */
- protected function hasMethodAlias(string $method): bool
- {
- return \array_key_exists($method, $this->methodAliases);
- }
-
- /**
- * Calls the real method for a given alias with the provided parameters.
- *
- * @param array $parameters
- */
- protected function callMethodAlias(string $method, array $parameters): mixed
- {
- $alias = $this->resolveMethodAlias($method);
-
- if (!method_exists($this, $alias)) {
- throw new \BadMethodCallException(sprintf('Method %s::%s does not exist.', static::class, $alias));
- }
-
- return $this->$alias(...$parameters);
- }
-}
diff --git a/src/Prime/Translation/ResourceInterface.php b/src/Prime/Translation/ResourceInterface.php
deleted file mode 100644
index af4161a2..00000000
--- a/src/Prime/Translation/ResourceInterface.php
+++ /dev/null
@@ -1,12 +0,0 @@
- $options additional options for the flash message
* @param string|null $title the title of the flash message
*
- * @return Envelope|FlasherInterface|NotificationFactoryInterface Returns an Envelope containing the message details when arguments are provided.
- * Returns an instance of FlasherInterface or NotificationFactoryInterface when no arguments are provided.
+ * @return Envelope|FlasherInterface Returns an Envelope containing the message details when arguments are provided.
+ * Returns an instance of FlasherInterface or NotificationFactoryInterface when no arguments are provided.
+ *
+ * @phpstan-return ($message is empty ? FlasherInterface : Envelope)
*
* Usage:
* 1. Without arguments - Get the Flasher factory: $flasher = flash();
* 2. With arguments - Create and return a flash message:
* flash('Message', Type::SUCCESS, ['option' => 'value'], 'Title');
*/
- function flash(?string $message = null, string $type = Type::SUCCESS, array $options = [], ?string $title = null): Envelope|FlasherInterface|NotificationFactoryInterface
+ function flash(?string $message = null, string $type = Type::SUCCESS, array $options = [], ?string $title = null): Envelope|FlasherInterface
{
$factory = FlasherContainer::create('flasher');
diff --git a/src/Prime/helpers.php b/src/Prime/helpers.php
index f86cb1e8..caec5102 100644
--- a/src/Prime/helpers.php
+++ b/src/Prime/helpers.php
@@ -23,15 +23,17 @@ if (!function_exists('flash')) {
* @param array $options additional options for the flash message
* @param string|null $title the title of the flash message
*
- * @return Envelope|FlasherInterface|NotificationFactoryInterface Returns an Envelope containing the message details when arguments are provided.
- * Returns an instance of FlasherInterface or NotificationFactoryInterface when no arguments are provided.
+ * @return Envelope|FlasherInterface Returns an Envelope containing the message details when arguments are provided.
+ * Returns an instance of FlasherInterface or NotificationFactoryInterface when no arguments are provided.
+ *
+ * @phpstan-return ($message is empty ? FlasherInterface : Envelope)
*
* Usage:
* 1. Without arguments - Get the Flasher factory: $flasher = flash();
* 2. With arguments - Create and return a flash message:
* flash('Message', Type::SUCCESS, ['option' => 'value'], 'Title');
*/
- function flash(?string $message = null, string $type = Type::SUCCESS, array $options = [], ?string $title = null): Envelope|FlasherInterface|NotificationFactoryInterface
+ function flash(?string $message = null, string $type = Type::SUCCESS, array $options = [], ?string $title = null): Envelope|FlasherInterface
{
$factory = FlasherContainer::create('flasher');
diff --git a/src/SweetAlert/Prime/.phpstorm.meta.php b/src/SweetAlert/Prime/.phpstorm.meta.php
index 163438cc..7aad3239 100644
--- a/src/SweetAlert/Prime/.phpstorm.meta.php
+++ b/src/SweetAlert/Prime/.phpstorm.meta.php
@@ -15,5 +15,6 @@ expectedArguments(\Flasher\SweetAlert\Prime\SweetAlertBuilder::grow(), 0, 'row',
expectedArguments(\Flasher\SweetAlert\Prime\SweetAlertBuilder::customClass(), 0, 'container', 'popup', 'header', 'title', 'closeButton', 'icon', 'image', 'content', 'input', 'inputLabel', 'validationMessage', 'actions', 'confirmButton', 'denyButton', 'cancelButton', 'loader', 'footer');
override(\Flasher\Prime\FlasherInterface::use(), map(['sweetalert' => \Flasher\SweetAlert\Prime\SweetAlertInterface::class]));
+override(\Flasher\Prime\FlasherInterface::create(), map(['sweetalert' => \Flasher\SweetAlert\Prime\SweetAlertInterface::class]));
override(\Flasher\Prime\Container\FlasherContainer::create(), map(['flasher.sweetalert' => \Flasher\SweetAlert\Prime\SweetAlertInterface::class]));
diff --git a/src/SweetAlert/Prime/SweetAlertBuilder.php b/src/SweetAlert/Prime/SweetAlertBuilder.php
index 76ca4018..523991f8 100644
--- a/src/SweetAlert/Prime/SweetAlertBuilder.php
+++ b/src/SweetAlert/Prime/SweetAlertBuilder.php
@@ -161,6 +161,8 @@ final class SweetAlertBuilder extends NotificationBuilder
}
/**
+ * @param "top"|"top-start"|"top-end"|"center"|"center-start"|"center-end"|"bottom"|"bottom-start"|"bottom-end" $position
+ *
* Whether or not an alert should be treated as a toast notification. This option is normally coupled with the
* position parameter and a timer. Toasts are NEVER autofocused.
*/
@@ -188,8 +190,10 @@ final class SweetAlertBuilder extends NotificationBuilder
}
/**
+ * @param "text"|"email"|"password"|"number"|"tel"|"range"|"textarea"|"search"|"url"|"select"|"radio"|"checkbox"|"file"|"date"|"datetime-local"|"time"|"week"|"month" $input
+ *
* Input field type, can be text, email, password, number, tel, range, textarea, select, radio, checkbox, file and
- * url.
+ * url
*/
public function input(string $input): self
{
@@ -229,8 +233,10 @@ final class SweetAlertBuilder extends NotificationBuilder
}
/**
+ * @param "top"|"top-start"|"top-end"|"center"|"center-start"|"center-end"|"bottom"|"bottom-start"|"bottom-end" $position
+ *
* Popup window position, can be 'top', 'top-start', 'top-end', 'center', 'center-start', 'center-end', 'bottom',
- * 'bottom-start', or 'bottom-end'.
+ * 'bottom-start', or 'bottom-end'
*/
public function position(string $position): self
{
@@ -240,8 +246,10 @@ final class SweetAlertBuilder extends NotificationBuilder
}
/**
+ * @param "row"|"column"|"fullscreen"|false $grow
+ *
* Paired with window position, sets the direction the popup should grow in, can be set to 'row', 'column',
- * 'fullscreen', or false.
+ * 'fullscreen', or false
*/
public function grow(bool|string $grow): self
{
@@ -251,7 +259,9 @@ final class SweetAlertBuilder extends NotificationBuilder
}
/**
- * A custom CSS class for the popup.
+ * @param "container"|"popup"|"header"|"title"|"closeButton"|"icon"|"image"|"content"|"input"|"inputLabel"|"validationMessage"|"actions"|"confirmButton"|"denyButton"|"cancelButton"|"loader"|"footer" $customClass
+ *
+ * A custom CSS class for the popup
*/
public function customClass(string $customClass, string $value): self
{
diff --git a/src/SweetAlert/Prime/functions.php b/src/SweetAlert/Prime/functions.php
index 3ca8970a..540f99ef 100644
--- a/src/SweetAlert/Prime/functions.php
+++ b/src/SweetAlert/Prime/functions.php
@@ -24,6 +24,8 @@ if (!\function_exists('Flasher\SweetAlert\Prime\sweetalert')) {
* @return Envelope|SweetAlertInterface Returns an Envelope containing the notification details when arguments are provided.
* Returns an instance of SweetAlertInterface when no arguments are provided.
*
+ * @phpstan-return ($message is empty ? SweetAlertInterface : Envelope)
+ *
* Usage:
* 1. Without arguments - Get the Sweetalert factory: $sweetalert = sweetalert();
* 2. With arguments - Create and return a Sweetalert notification:
diff --git a/src/SweetAlert/Prime/helpers.php b/src/SweetAlert/Prime/helpers.php
index 8b7c0aac..f94b833b 100644
--- a/src/SweetAlert/Prime/helpers.php
+++ b/src/SweetAlert/Prime/helpers.php
@@ -23,6 +23,8 @@ if (!function_exists('sweetalert')) {
* @return Envelope|SweetAlertInterface Returns an Envelope containing the notification details when arguments are provided.
* Returns an instance of SweetAlertInterface when no arguments are provided.
*
+ * @phpstan-return ($message is empty ? SweetAlertInterface : Envelope)
+ *
* Usage:
* 1. Without arguments - Get the Sweetalert factory: $sweetalert = sweetalert();
* 2. With arguments - Create and return a Sweetalert notification:
diff --git a/src/Symfony/Resources/config/services.php b/src/Symfony/Resources/config/services.php
index 16ab30ea..a806fef0 100644
--- a/src/Symfony/Resources/config/services.php
+++ b/src/Symfony/Resources/config/services.php
@@ -78,11 +78,11 @@ return static function (ContainerConfigurator $container): void {
->set('flasher.translation_listener', TranslationListener::class)
->args([service('flasher.translator')->nullOnInvalid()])
- ->tag('kernel.event_listener')
+ ->tag('flasher.event_listener')
->set('flasher.preset_listener', ApplyPresetListener::class)
->args([param('flasher.presets')])
- ->tag('kernel.event_listener')
+ ->tag('flasher.event_listener')
->set('flasher.install_command', InstallCommand::class)
->args([service('flasher.asset_manager')])
@@ -96,6 +96,7 @@ return static function (ContainerConfigurator $container): void {
])
->set('flasher.notification_factory', NotificationFactory::class)
+ ->abstract()
->args([service('flasher.storage_manager')])
->set('flasher.storage', Storage::class)
diff --git a/src/Symfony/Support/PluginExtension.php b/src/Symfony/Support/PluginExtension.php
deleted file mode 100644
index 5c07dbfc..00000000
--- a/src/Symfony/Support/PluginExtension.php
+++ /dev/null
@@ -1,52 +0,0 @@
-plugin->getName();
- }
-
- public function load(array $configs, ContainerBuilder $container): void
- {
- $definition = new ChildDefinition('flasher.notification_factory');
- $definition
- ->setClass($this->plugin->getFactory())
- ->setPublic(true)
- ->addTag('flasher.factory', ['alias' => $this->plugin->getAlias()]);
-
- $identifier = $this->plugin->getServiceId();
- $container->setDefinition($identifier, $definition);
-
- foreach ((array) $this->plugin->getServiceAliases() as $alias) {
- $container->setAlias($alias, $identifier);
- }
- }
-
- public function prepend(ContainerBuilder $container): void
- {
- $container->prependExtensionConfig('flasher', [
- 'plugins' => [
- $this->plugin->getAlias() => [
- 'scripts' => (array) $this->plugin->getScripts(),
- 'styles' => (array) $this->plugin->getStyles(),
- 'options' => $this->plugin->getOptions(),
- ],
- ],
- ]);
- }
-}
diff --git a/src/Toastr/Prime/.phpstorm.meta.php b/src/Toastr/Prime/.phpstorm.meta.php
index e77c82ff..c950ee6a 100644
--- a/src/Toastr/Prime/.phpstorm.meta.php
+++ b/src/Toastr/Prime/.phpstorm.meta.php
@@ -9,9 +9,11 @@ expectedArguments(\Flasher\Toastr\Prime\ToastrBuilder::showMethod(), 0, 'fadeIn'
expectedArguments(\Flasher\Toastr\Prime\ToastrBuilder::hideMethod(), 0, 'fadeIn', 'fadeOut', 'slideDown', 'show');
expectedArguments(\Flasher\Toastr\Prime\ToastrBuilder::showEasing(), 0, 'swing', 'linear');
expectedArguments(\Flasher\Toastr\Prime\ToastrBuilder::hideEasing(), 0, 'swing', 'linear');
+expectedArguments(\Flasher\Toastr\Prime\ToastrBuilder::timeOut(), 0, 0, 3000, 5000, 9000);
expectedArguments(\Flasher\Toastr\Prime\ToastrBuilder::positionClass(), 0, 'toast-top-right', 'toast-top-center', 'toast-bottom-center', 'toast-top-full-width', 'toast-bottom-full-width', 'toast-top-left', 'toast-bottom-right', 'toast-bottom-left');
override(\Flasher\Prime\FlasherInterface::use(), map(['toastr' => \Flasher\Toastr\Prime\ToastrInterface::class]));
+override(\Flasher\Prime\FlasherInterface::create(), map(['toastr' => \Flasher\Toastr\Prime\ToastrInterface::class]));
override(\Flasher\Prime\Container\FlasherContainer::create(), map(['flasher.toastr' => \Flasher\Toastr\Prime\ToastrInterface::class]));
expectedArguments(\Flasher\Toastr\Prime\ToastrBuilder::option(), 0, 'closeButton', 'closeClass', 'closeDuration', 'closeEasing', 'closeHtml', 'closeMethod', 'closeOnHover', 'containerId', 'debug', 'escapeHtml', 'extendedTimeOut', 'hideDuration', 'hideEasing', 'hideMethod', 'iconClass', 'messageClass', 'newestOnTop', 'onHidden', 'onShown', 'positionClass', 'preventDuplicates', 'progressBar', 'progressClass', 'rtl', 'showDuration', 'showEasing', 'showMethod', 'tapToDismiss', 'target', 'timeOut', 'titleClass', 'toastClass');
diff --git a/src/Toastr/Prime/Resources/assets/toastr.ts b/src/Toastr/Prime/Resources/assets/toastr.ts
index 500560fa..14e7be51 100644
--- a/src/Toastr/Prime/Resources/assets/toastr.ts
+++ b/src/Toastr/Prime/Resources/assets/toastr.ts
@@ -8,7 +8,7 @@ export default class ToastrPlugin extends AbstractPlugin {
envelopes.forEach((envelope) => {
const { message, title, type, options } = envelope
const instance = toastr[type as ToastrType](message, title, options as ToastrOptions)
- instance && instance.parent().attr('data-turbo-cache', 'false')
+ instance && instance.parent().attr('data-turbo-temporary', '')
})
}
diff --git a/src/Toastr/Prime/Resources/dist/flasher-toastr.esm.js b/src/Toastr/Prime/Resources/dist/flasher-toastr.esm.js
index 14f34452..b2228bfb 100644
--- a/src/Toastr/Prime/Resources/dist/flasher-toastr.esm.js
+++ b/src/Toastr/Prime/Resources/dist/flasher-toastr.esm.js
@@ -50,7 +50,7 @@ class ToastrPlugin extends AbstractPlugin {
envelopes.forEach((envelope) => {
const { message, title, type, options } = envelope;
const instance = toastr$1[type](message, title, options);
- instance && instance.parent().attr('data-turbo-cache', 'false');
+ instance && instance.parent().attr('data-turbo-temporary', '');
});
}
renderOptions(options) {
diff --git a/src/Toastr/Prime/Resources/dist/flasher-toastr.js b/src/Toastr/Prime/Resources/dist/flasher-toastr.js
index 9a3130d8..72f36bbf 100644
--- a/src/Toastr/Prime/Resources/dist/flasher-toastr.js
+++ b/src/Toastr/Prime/Resources/dist/flasher-toastr.js
@@ -53,7 +53,7 @@
envelopes.forEach((envelope) => {
const { message, title, type, options } = envelope;
const instance = toastr$1[type](message, title, options);
- instance && instance.parent().attr('data-turbo-cache', 'false');
+ instance && instance.parent().attr('data-turbo-temporary', '');
});
}
renderOptions(options) {
diff --git a/src/Toastr/Prime/Resources/dist/flasher-toastr.min.js b/src/Toastr/Prime/Resources/dist/flasher-toastr.min.js
index a5344970..06f5c9ba 100644
--- a/src/Toastr/Prime/Resources/dist/flasher-toastr.min.js
+++ b/src/Toastr/Prime/Resources/dist/flasher-toastr.min.js
@@ -1 +1 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@flasher/flasher"),require("toastr")):"function"==typeof define&&define.amd?define(["@flasher/flasher","toastr"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).toastr=t(e.flasher,e.toastr)}(this,(function(e,t){"use strict";class s{success(e,t,s){this.flash("success",e,t,s)}error(e,t,s){this.flash("error",e,t,s)}info(e,t,s){this.flash("info",e,t,s)}warning(e,t,s){this.flash("warning",e,t,s)}flash(e,t,s,o){if("object"==typeof e?(e=(o=e).type,t=o.message,s=o.title):"object"==typeof t?(t=(o=t).message,s=o.title):"object"==typeof s&&(s=(o=s).title),void 0===t)throw new Error("message option is required");const r={type:e,message:t,title:s||e,options:o||{},metadata:{plugin:""}};this.renderOptions(o||{}),this.renderEnvelopes([r])}}const o=new class extends s{renderEnvelopes(e){e.forEach((e=>{const{message:s,title:o,type:r,options:i}=e,n=t[r](s,o,i);n&&n.parent().attr("data-turbo-cache","false")}))}renderOptions(e){t.options=Object.assign({timeOut:e.timeOut||5e3,progressBar:e.progressBar||!0},e)}};return e.addPlugin("toastr",o),o}));
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@flasher/flasher"),require("toastr")):"function"==typeof define&&define.amd?define(["@flasher/flasher","toastr"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).toastr=t(e.flasher,e.toastr)}(this,(function(e,t){"use strict";class s{success(e,t,s){this.flash("success",e,t,s)}error(e,t,s){this.flash("error",e,t,s)}info(e,t,s){this.flash("info",e,t,s)}warning(e,t,s){this.flash("warning",e,t,s)}flash(e,t,s,r){if("object"==typeof e?(e=(r=e).type,t=r.message,s=r.title):"object"==typeof t?(t=(r=t).message,s=r.title):"object"==typeof s&&(s=(r=s).title),void 0===t)throw new Error("message option is required");const o={type:e,message:t,title:s||e,options:r||{},metadata:{plugin:""}};this.renderOptions(r||{}),this.renderEnvelopes([o])}}const r=new class extends s{renderEnvelopes(e){e.forEach((e=>{const{message:s,title:r,type:o,options:i}=e,n=t[o](s,r,i);n&&n.parent().attr("data-turbo-temporary","")}))}renderOptions(e){t.options=Object.assign({timeOut:e.timeOut||5e3,progressBar:e.progressBar||!0},e)}};return e.addPlugin("toastr",r),r}));
diff --git a/src/Toastr/Prime/Resources/public/flasher-toastr.min.js b/src/Toastr/Prime/Resources/public/flasher-toastr.min.js
index a5344970..06f5c9ba 100644
--- a/src/Toastr/Prime/Resources/public/flasher-toastr.min.js
+++ b/src/Toastr/Prime/Resources/public/flasher-toastr.min.js
@@ -1 +1 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@flasher/flasher"),require("toastr")):"function"==typeof define&&define.amd?define(["@flasher/flasher","toastr"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).toastr=t(e.flasher,e.toastr)}(this,(function(e,t){"use strict";class s{success(e,t,s){this.flash("success",e,t,s)}error(e,t,s){this.flash("error",e,t,s)}info(e,t,s){this.flash("info",e,t,s)}warning(e,t,s){this.flash("warning",e,t,s)}flash(e,t,s,o){if("object"==typeof e?(e=(o=e).type,t=o.message,s=o.title):"object"==typeof t?(t=(o=t).message,s=o.title):"object"==typeof s&&(s=(o=s).title),void 0===t)throw new Error("message option is required");const r={type:e,message:t,title:s||e,options:o||{},metadata:{plugin:""}};this.renderOptions(o||{}),this.renderEnvelopes([r])}}const o=new class extends s{renderEnvelopes(e){e.forEach((e=>{const{message:s,title:o,type:r,options:i}=e,n=t[r](s,o,i);n&&n.parent().attr("data-turbo-cache","false")}))}renderOptions(e){t.options=Object.assign({timeOut:e.timeOut||5e3,progressBar:e.progressBar||!0},e)}};return e.addPlugin("toastr",o),o}));
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@flasher/flasher"),require("toastr")):"function"==typeof define&&define.amd?define(["@flasher/flasher","toastr"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).toastr=t(e.flasher,e.toastr)}(this,(function(e,t){"use strict";class s{success(e,t,s){this.flash("success",e,t,s)}error(e,t,s){this.flash("error",e,t,s)}info(e,t,s){this.flash("info",e,t,s)}warning(e,t,s){this.flash("warning",e,t,s)}flash(e,t,s,r){if("object"==typeof e?(e=(r=e).type,t=r.message,s=r.title):"object"==typeof t?(t=(r=t).message,s=r.title):"object"==typeof s&&(s=(r=s).title),void 0===t)throw new Error("message option is required");const o={type:e,message:t,title:s||e,options:r||{},metadata:{plugin:""}};this.renderOptions(r||{}),this.renderEnvelopes([o])}}const r=new class extends s{renderEnvelopes(e){e.forEach((e=>{const{message:s,title:r,type:o,options:i}=e,n=t[o](s,r,i);n&&n.parent().attr("data-turbo-temporary","")}))}renderOptions(e){t.options=Object.assign({timeOut:e.timeOut||5e3,progressBar:e.progressBar||!0},e)}};return e.addPlugin("toastr",r),r}));
diff --git a/src/Toastr/Prime/ToastrBuilder.php b/src/Toastr/Prime/ToastrBuilder.php
index 2bc6aabf..f471d31b 100644
--- a/src/Toastr/Prime/ToastrBuilder.php
+++ b/src/Toastr/Prime/ToastrBuilder.php
@@ -108,7 +108,9 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
- * Indicates the entry transition of the pop-up.
+ * @param string $hideEasing
+ *
+ * Indicates the entry transition of the pop-up
*/
public function hideEasing(string $hideEasing): self
{
@@ -118,7 +120,9 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
- * Indicates the opening animation of the pop-up.
+ * @param string $hideMethod
+ *
+ * Indicates the opening animation of the pop-up
*/
public function hideMethod(string $hideMethod): self
{
@@ -165,6 +169,9 @@ final class ToastrBuilder extends NotificationBuilder
return $this;
}
+ /**
+ * @param "toast-top-right"|"toast-top-center"|"toast-bottom-center"|"toast-top-full-width"|"toast-bottom-full-width"|"toast-top-left"|"toast-bottom-right"|"toast-bottom-left" $positionClass
+ */
public function positionClass(string $positionClass): self
{
$this->option('positionClass', $positionClass);
@@ -221,7 +228,9 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
- * Indicates the entry transition of the pop-up.
+ * @param string $showEasing
+ *
+ * Indicates the entry transition of the pop-up
*/
public function showEasing(string $showEasing): self
{
@@ -231,7 +240,9 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
- * Indicates the opening animation of the pop-up.
+ * @param string $showMethod
+ *
+ * Indicates the opening animation of the pop-up
*/
public function showMethod(string $showMethod): self
{
diff --git a/src/Toastr/Prime/functions.php b/src/Toastr/Prime/functions.php
index 1b31998c..d750aefa 100644
--- a/src/Toastr/Prime/functions.php
+++ b/src/Toastr/Prime/functions.php
@@ -24,6 +24,8 @@ if (!\function_exists('Flasher\Toastr\Prime\toastr')) {
* @return Envelope|ToastrInterface Returns an Envelope containing the notification details when arguments are provided.
* Returns an instance of ToastrInterface when no arguments are provided.
*
+ * @phpstan-return ($message is empty ? ToastrInterface : Envelope)
+ *
* Usage:
* 1. Without arguments - Get the Toastr factory: $toastr = toastr();
* 2. With arguments - Create and return a Toastr notification:
diff --git a/src/Toastr/Prime/helpers.php b/src/Toastr/Prime/helpers.php
index 74e0f9ef..5fc90c4b 100644
--- a/src/Toastr/Prime/helpers.php
+++ b/src/Toastr/Prime/helpers.php
@@ -23,6 +23,8 @@ if (!function_exists('toastr')) {
* @return Envelope|ToastrInterface Returns an Envelope containing the notification details when arguments are provided.
* Returns an instance of ToastrInterface when no arguments are provided.
*
+ * @phpstan-return ($message is empty ? ToastrInterface : Envelope)
+ *
* Usage:
* 1. Without arguments - Get the Toastr factory: $toastr = toastr();
* 2. With arguments - Create and return a Toastr notification:
diff --git a/taskfile.dist.yml b/taskfile.dist.yml
index 311c3d63..405e3369 100644
--- a/taskfile.dist.yml
+++ b/taskfile.dist.yml
@@ -13,7 +13,8 @@ tasks:
desc: "๐ Update project dependencies to the lowest possible versions within the specified version constraints, ensuring compatibility."
cmds:
- composer update --prefer-lowest -W
- - npm run ncu && npm install --force
+ - npm run ncu
+ - npm install --force
aliases:
- u
- up
@@ -26,17 +27,25 @@ tasks:
- req
lint:
- desc: "๐ Run various linting tools to ensure code quality, including PHP-CS-Fixer, PHPStan, Composer validation, and PHPLint."
+ desc: "๐ Run various linting tools to ensure code quality."
cmds:
- - vendor/bin/php-cs-fixer fix
+ - vendor/bin/php-cs-fixer fix --dry-run
- vendor/bin/phpstan analyse
- composer validate --strict
- vendor/bin/phplint
+ - find src/ -name "composer.json" -exec composer validate --strict {} \;
aliases:
- pint
- check
- validate
+ fix:
+ desc: "๐ ๏ธ Automatically fix coding standards issues."
+ cmds:
+ - vendor/bin/php-cs-fixer fix
+ aliases:
+ - lintf
+
test:
desc: "โ
Run PHPUnit tests to verify the correctness of the codebase."
cmds:
@@ -45,3 +54,10 @@ tasks:
- tests
- phpunit
- unit
+
+ security:
+ desc: "๐ Check for security vulnerabilities in the project dependencies."
+ cmds:
+ - symfony security:check
+ aliases:
+ - seccheck
diff --git a/tests/Noty/Prime/NotyBuilderTest.php b/tests/Noty/Prime/NotyBuilderTest.php
index bc5610d2..e5a0bb48 100644
--- a/tests/Noty/Prime/NotyBuilderTest.php
+++ b/tests/Noty/Prime/NotyBuilderTest.php
@@ -102,12 +102,12 @@ final class NotyBuilderTest extends TestCase
public function testSounds(): void
{
- $this->notyBuilder->sounds('open', 'sound.mp3');
+ $this->notyBuilder->sounds('sources', 'sound.mp3');
$envelope = $this->notyBuilder->getEnvelope();
$options = $envelope->getNotification()->getOptions();
- $this->assertSame(['sounds.open' => 'sound.mp3'], $options);
+ $this->assertSame(['sounds.sources' => 'sound.mp3'], $options);
}
public function testDocTitle(): void
diff --git a/tests/Prime/EventDispatcher/EventDispatcherTest.php b/tests/Prime/EventDispatcher/EventDispatcherTest.php
index 7d9cae28..1187060d 100644
--- a/tests/Prime/EventDispatcher/EventDispatcherTest.php
+++ b/tests/Prime/EventDispatcher/EventDispatcherTest.php
@@ -57,6 +57,7 @@ final class EventDispatcherTest extends TestCase
$event = new StoppableEvent();
$listener = new StoppableEventListener();
+ $this->dispatcher->addListener($listener);
$this->dispatcher->addListener($listener);
$this->dispatcher->dispatch($event);
diff --git a/tests/Prime/EventDispatcher/EventListener/TranslationListenerTest.php b/tests/Prime/EventDispatcher/EventListener/TranslationListenerTest.php
index 7d88619e..8f1e73de 100644
--- a/tests/Prime/EventDispatcher/EventListener/TranslationListenerTest.php
+++ b/tests/Prime/EventDispatcher/EventListener/TranslationListenerTest.php
@@ -76,4 +76,21 @@ final class TranslationListenerTest extends TestCase
$this->assertEquals($envelopes, $event->getEnvelopes());
}
+
+ public function testTranslationThrowExceptionWithInvalidParams(): void
+ {
+ $this->expectException(\InvalidArgumentException::class);
+
+ $eventDispatcher = new EventDispatcher();
+
+ $listener = new TranslationListener(new EchoTranslator());
+ $eventDispatcher->addListener($listener);
+
+ $envelopes[] = new Envelope(new Notification(), new PresetStamp('created', ['resource' => new Notification()]));
+
+ $event = new PresentationEvent($envelopes, []);
+ $eventDispatcher->dispatch($event);
+
+ $this->assertEquals($envelopes, $event->getEnvelopes());
+ }
}
diff --git a/tests/Prime/Factory/NotificationFactoryTest.php b/tests/Prime/Factory/FlasherFactoryTest.php
similarity index 89%
rename from tests/Prime/Factory/NotificationFactoryTest.php
rename to tests/Prime/Factory/FlasherFactoryTest.php
index e5affe20..7a8052a7 100644
--- a/tests/Prime/Factory/NotificationFactoryTest.php
+++ b/tests/Prime/Factory/FlasherFactoryTest.php
@@ -4,20 +4,21 @@ declare(strict_types=1);
namespace Flasher\Tests\Prime\Factory;
+use Flasher\Prime\Factory\FlasherFactory;
use Flasher\Prime\Factory\NotificationFactory;
use Flasher\Prime\Notification\NotificationBuilderInterface;
use Flasher\Prime\Storage\StorageManagerInterface;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase;
-final class NotificationFactoryTest extends TestCase
+final class FlasherFactoryTest extends TestCase
{
use MockeryPHPUnitIntegration;
public function testCreateNotificationBuilder(): void
{
$storageManager = \Mockery::mock(StorageManagerInterface::class);
- $factory = new NotificationFactory($storageManager);
+ $factory = new FlasherFactory($storageManager);
$builder = $factory->createNotificationBuilder();
@@ -35,7 +36,7 @@ final class NotificationFactoryTest extends TestCase
->andReturnTrue();
$storageManager = \Mockery::mock(StorageManagerInterface::class);
- $factory = \Mockery::mock(NotificationFactory::class, [$storageManager]) // @phpstan-ignore-line
+ $factory = \Mockery::mock(NotificationFactory::class, [$storageManager])
->makePartial()
->allows('createNotificationBuilder')
->andReturns($mockedInterface)
diff --git a/tests/Prime/FlasherTest.php b/tests/Prime/FlasherTest.php
index 9cf4d831..2a181cd5 100644
--- a/tests/Prime/FlasherTest.php
+++ b/tests/Prime/FlasherTest.php
@@ -81,7 +81,7 @@ final class FlasherTest extends MockeryTestCase
->get('alias')
->andReturns(\Mockery::mock(NotificationFactoryInterface::class));
- $result = $this->flasher->create('alias');
+ $result = $this->flasher->use('alias');
$this->assertInstanceOf(NotificationFactoryInterface::class, $result);
}
diff --git a/tests/Prime/Notification/NotificationBuilderTest.php b/tests/Prime/Notification/FlasherBuilderTest.php
similarity index 94%
rename from tests/Prime/Notification/NotificationBuilderTest.php
rename to tests/Prime/Notification/FlasherBuilderTest.php
index 50a0d487..dbb424ff 100644
--- a/tests/Prime/Notification/NotificationBuilderTest.php
+++ b/tests/Prime/Notification/FlasherBuilderTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Flasher\Tests\Prime\Notification;
+use Flasher\Prime\Notification\FlasherBuilder;
use Flasher\Prime\Notification\Notification;
use Flasher\Prime\Notification\NotificationBuilder;
use Flasher\Prime\Notification\NotificationBuilderInterface;
@@ -22,7 +23,7 @@ use Flasher\Prime\Storage\StorageManagerInterface;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
-final class NotificationBuilderTest extends TestCase
+final class FlasherBuilderTest extends TestCase
{
public function testAddSuccessMessage(): void
{
@@ -323,7 +324,7 @@ final class NotificationBuilderTest extends TestCase
$this->assertInstanceOf(PresetStamp::class, $stamp);
$this->assertSame('created', $stamp->getPreset());
- $this->assertSame(['resource' => 'resource'], $stamp->getParameters());
+ $this->assertSame([':resource' => 'resource'], $stamp->getParameters());
}
public function testAddUpdated(): void
@@ -339,7 +340,7 @@ final class NotificationBuilderTest extends TestCase
$this->assertInstanceOf(PresetStamp::class, $stamp);
$this->assertSame('updated', $stamp->getPreset());
- $this->assertSame(['resource' => 'resource'], $stamp->getParameters());
+ $this->assertSame([':resource' => 'resource'], $stamp->getParameters());
}
public function testAddSaved(): void
@@ -355,7 +356,7 @@ final class NotificationBuilderTest extends TestCase
$this->assertInstanceOf(PresetStamp::class, $stamp);
$this->assertSame('saved', $stamp->getPreset());
- $this->assertSame(['resource' => 'resource'], $stamp->getParameters());
+ $this->assertSame([':resource' => 'resource'], $stamp->getParameters());
}
public function testAddDeleted(): void
@@ -371,7 +372,7 @@ final class NotificationBuilderTest extends TestCase
$this->assertInstanceOf(PresetStamp::class, $stamp);
$this->assertSame('deleted', $stamp->getPreset());
- $this->assertSame(['resource' => 'resource'], $stamp->getParameters());
+ $this->assertSame([':resource' => 'resource'], $stamp->getParameters());
}
public function testPreset(): void
@@ -397,7 +398,7 @@ final class NotificationBuilderTest extends TestCase
$this->assertInstanceOf(PresetStamp::class, $stamp);
$this->assertSame('someOperation', $stamp->getPreset());
- $this->assertSame(['resource' => 'resource'], $stamp->getParameters());
+ $this->assertSame([':resource' => 'resource'], $stamp->getParameters());
}
public function testCreated(): void
@@ -410,7 +411,7 @@ final class NotificationBuilderTest extends TestCase
$this->assertInstanceOf(PresetStamp::class, $stamp);
$this->assertSame('created', $stamp->getPreset());
- $this->assertSame(['resource' => 'resource'], $stamp->getParameters());
+ $this->assertSame([':resource' => 'resource'], $stamp->getParameters());
}
public function testUpdated(): void
@@ -423,7 +424,7 @@ final class NotificationBuilderTest extends TestCase
$this->assertInstanceOf(PresetStamp::class, $stamp);
$this->assertSame('updated', $stamp->getPreset());
- $this->assertSame(['resource' => 'resource'], $stamp->getParameters());
+ $this->assertSame([':resource' => 'resource'], $stamp->getParameters());
}
public function testSaved(): void
@@ -435,7 +436,7 @@ final class NotificationBuilderTest extends TestCase
$this->assertInstanceOf(PresetStamp::class, $stamp);
$this->assertSame('saved', $stamp->getPreset());
- $this->assertSame(['resource' => 'resource'], $stamp->getParameters());
+ $this->assertSame([':resource' => 'resource'], $stamp->getParameters());
}
public function testDeleted(): void
@@ -447,7 +448,7 @@ final class NotificationBuilderTest extends TestCase
$this->assertInstanceOf(PresetStamp::class, $stamp);
$this->assertSame('deleted', $stamp->getPreset());
- $this->assertSame(['resource' => 'resource'], $stamp->getParameters());
+ $this->assertSame([':resource' => 'resource'], $stamp->getParameters());
}
public function testWithStamps(): void
@@ -526,6 +527,6 @@ final class NotificationBuilderTest extends TestCase
/** @var StorageManagerInterface $storageManager */
$storageManager = $storageManager ?: $this->createMock(StorageManagerInterface::class);
- return new NotificationBuilder(new Notification(), $storageManager);
+ return new FlasherBuilder(new Notification(), $storageManager);
}
}