AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/1534260/cwd/plugins/mojo-marketplace-wp-plugin/build/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /proc/1534260/cwd/plugins/mojo-marketplace-wp-plugin/build/marketplace.js
!function(){var e={184:function(e,t){var a;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var o=typeof a;if("string"===o||"number"===o)e.push(a);else if(Array.isArray(a)){if(a.length){var l=r.apply(null,a);l&&e.push(l)}}else if("object"===o){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){e.push(a.toString());continue}for(var i in a)n.call(a,i)&&a[i]&&e.push(i)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(a=function(){return r}.apply(t,[]))||(e.exports=a)}()}},t={};function a(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,a),o.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e,t,n=window.React,r=window.wp.apiFetch,o=a.n(r),l=a(184),i=a.n(l),s=window.wp.element;function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},c.apply(this,arguments)}(t=e||(e={})).Pop="POP",t.Push="PUSH",t.Replace="REPLACE";const u="popstate";function d(e,t){if(!1===e||null==e)throw new Error(t)}function m(e,t){return{usr:e.state,key:e.key,idx:t}}function p(e,t,a,n){return void 0===a&&(a=null),c({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?f(t):t,{state:a,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function h(e){let{pathname:t="/",search:a="",hash:n=""}=e;return a&&"?"!==a&&(t+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),t}function f(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substr(a),e=e.substr(0,a));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}var g;function y(e,t,a,n){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(g||(g={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const v=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",E=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const w=["post","put","patch","delete"],k=(new Set(w),["get",...w]);function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},C.apply(this,arguments)}new Set(k),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const b=n.createContext(null),S=n.createContext(null),x=n.createContext(null),N=n.createContext({outlet:null,matches:[],isDataRoute:!1});function U(){return null!=n.useContext(x)}function R(){return U()||d(!1),n.useContext(x).location}function P(e){n.useContext(S).static||n.useLayoutEffect(e)}function L(){let{isDataRoute:e}=n.useContext(N);return e?function(){let{router:e}=function(e){let t=n.useContext(b);return t||d(!1),t}(T.UseNavigateStable),t=function(e){let t=function(e){let t=n.useContext(N);return t||d(!1),t}(),a=t.matches[t.matches.length-1];return a.route.id||d(!1),a.route.id}(O.UseNavigateStable),a=n.useRef(!1);return P((()=>{a.current=!0})),n.useCallback((function(n,r){void 0===r&&(r={}),a.current&&("number"==typeof n?e.navigate(n):e.navigate(n,C({fromRouteId:t},r)))}),[e,t])}():function(){U()||d(!1);let e=n.useContext(b),{basename:t,navigator:a}=n.useContext(S),{matches:r}=n.useContext(N),{pathname:o}=R(),l=JSON.stringify(function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(r).map((e=>e.pathnameBase))),i=n.useRef(!1);return P((()=>{i.current=!0})),n.useCallback((function(n,r){if(void 0===r&&(r={}),!i.current)return;if("number"==typeof n)return void a.go(n);let s=function(e,t,a,n){let r;void 0===n&&(n=!1),"string"==typeof e?r=f(e):(r=c({},e),d(!r.pathname||!r.pathname.includes("?"),y("?","pathname","search",r)),d(!r.pathname||!r.pathname.includes("#"),y("#","pathname","hash",r)),d(!r.search||!r.search.includes("#"),y("#","search","hash",r)));let o,l=""===e||""===r.pathname,i=l?"/":r.pathname;if(n||null==i)o=a;else{let e=t.length-1;if(i.startsWith("..")){let t=i.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:a,search:n="",hash:r=""}="string"==typeof e?f(e):e,o=a?a.startsWith("/")?a:function(e,t){let a=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?a.length>1&&a.pop():"."!==e&&a.push(e)})),a.length>1?a.join("/"):"/"}(a,t):t;return{pathname:o,search:v(n),hash:E(r)}}(r,o),u=i&&"/"!==i&&i.endsWith("/"),m=(l||"."===i)&&a.endsWith("/");return s.pathname.endsWith("/")||!u&&!m||(s.pathname+="/"),s}(n,JSON.parse(l),o,"path"===r.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:[t,s.pathname].join("/").replace(/\/\/+/g,"/")),(r.replace?a.replace:a.push)(s,r.state,r)}),[t,a,l,o,e])}()}n.Component;var T=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(T||{}),O=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(O||{});function A(t){let{basename:a="/",children:r=null,location:o,navigationType:l=e.Pop,navigator:i,static:s=!1}=t;U()&&d(!1);let c=a.replace(/^\/*/,"/"),u=n.useMemo((()=>({basename:c,navigator:i,static:s})),[c,i,s]);"string"==typeof o&&(o=f(o));let{pathname:m="/",search:p="",hash:h="",state:g=null,key:y="default"}=o,v=n.useMemo((()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,n=e.charAt(a);return n&&"/"!==n?null:e.slice(a)||"/"}(m,c);return null==e?null:{location:{pathname:e,search:p,hash:h,state:g,key:y},navigationType:l}}),[c,m,p,h,g,y,l]);return null==v?null:n.createElement(S.Provider,{value:u},n.createElement(x.Provider,{children:r,value:v}))}n.startTransition,new Promise((()=>{})),n.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const B=n.startTransition;function j(t){let{basename:a,children:r,future:o,window:l}=t,i=n.useRef();var s;null==i.current&&(i.current=(void 0===(s={window:l,v5Compat:!0})&&(s={}),function(t,a,n,r){void 0===r&&(r={});let{window:o=document.defaultView,v5Compat:l=!1}=r,i=o.history,s=e.Pop,f=null,g=y();function y(){return(i.state||{idx:null}).idx}function v(){s=e.Pop;let t=y(),a=null==t?null:t-g;g=t,f&&f({action:s,location:w.location,delta:a})}function E(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,a="string"==typeof e?e:h(e);return d(t,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,t)}null==g&&(g=0,i.replaceState(c({},i.state,{idx:g}),""));let w={get action(){return s},get location(){return t(o,i)},listen(e){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(u,v),f=e,()=>{o.removeEventListener(u,v),f=null}},createHref(e){return a(o,e)},createURL:E,encodeLocation(e){let t=E(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,a){s=e.Push;let r=p(w.location,t,a);n&&n(r,t),g=y()+1;let c=m(r,g),u=w.createHref(r);try{i.pushState(c,"",u)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(u)}l&&f&&f({action:s,location:w.location,delta:1})},replace:function(t,a){s=e.Replace;let r=p(w.location,t,a);n&&n(r,t),g=y();let o=m(r,g),c=w.createHref(r);i.replaceState(o,"",c),l&&f&&f({action:s,location:w.location,delta:0})},go(e){return i.go(e)}};return w}((function(e,t){let{pathname:a="/",search:n="",hash:r=""}=f(e.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),p("",{pathname:a,search:n,hash:r},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let a=e.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let t=e.location.href,a=t.indexOf("#");n=-1===a?t:t.slice(0,a)}return n+"#"+("string"==typeof t?t:h(t))}),(function(e,t){!function(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),s)));let g=i.current,[y,v]=n.useState({action:g.action,location:g.location}),{v7_startTransition:E}=o||{},w=n.useCallback((e=>{E&&B?B((()=>v(e))):v(e)}),[v,E]);return n.useLayoutEffect((()=>g.listen(w)),[g,w]),n.createElement(A,{basename:a,children:r,location:y.location,navigationType:y.action,navigator:g})}var _,F;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"}(_||(_={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(F||(F={}));var I=window.wp.components,D=({item:e,Components:t,methods:a,constants:r})=>{const o=e=>{e.data=e.data||{},e.data.page=window.location.href,a.apiFetch({url:`${r.resturl}${r.eventendpoint}`,method:"POST",data:e})},l=t=>{t.keycode&&ENTER!==t.keycode||o({action:"newfold-marketplaceitem-click",data:{element:"button",label:t.target.innerText,productId:e.id}})},i=t=>{t.keycode&&ENTER!==t.keycode||o({action:"newfold-marketplaceitem-click",data:{element:"a",href:t.target.getAttribute("href"),label:t.target.innerText,productId:e.id}})};return a.useEffect((()=>{const t=document.getElementById(`marketplace-item-${e.id}`),a=Array.from(t.querySelectorAll("button")),n=Array.from(t.querySelectorAll("a"));return a.length&&a.forEach((e=>{"close"!==e.getAttribute("data-action")&&(e.addEventListener("click",l),e.addEventListener("onkeydown",l))})),n.length&&n.forEach((e=>{"close"!==e.getAttribute("data-action")&&(e.addEventListener("click",i),e.addEventListener("onkeydown",i))})),()=>{a.length&&a.forEach((e=>{"close"!==e.getAttribute("data-action")&&(e.removeEventListener("click",l),e.removeEventListener("onkeydown",l))})),n.length&&n.forEach((e=>{"close"!==e.getAttribute("data-action")&&(e.removeEventListener("click",i),e.removeEventListener("onkeydown",i))}))}}),[]),(0,n.createElement)(t.Card,{className:`marketplace-item marketplace-item-${e.id} ${e.full_price?"product-has-full-price":""}`,id:`marketplace-item-${e.id}`},e.productThumbnailUrl&&(0,n.createElement)(t.CardMedia,null,(0,n.createElement)("img",{src:e.productThumbnailUrl,alt:e.name+" thumbnail"})),(0,n.createElement)(t.CardHeader,null,(0,n.createElement)("h2",null,e.name),(e=>{let t,a,r;return e.price>0&&e.price_formatted&&(a=(0,n.createElement)("div",{className:"price"},e.price_formatted),e.full_price>0&&e.full_price_formatted?(r=(0,n.createElement)("s",{className:"price full-price"},e.full_price_formatted),t=(0,n.createElement)("div",{className:"price-wrap has-full-price"},r,a)):t=(0,n.createElement)("div",{className:"price-wrap"},a)),t})(e)),e.description&&(0,n.createElement)(t.CardBody,{dangerouslySetInnerHTML:{__html:e.description}}),(0,n.createElement)(t.CardFooter,null,(e=>{let a,o;return e.primaryUrl&&e.primaryCallToAction&&(a=(0,n.createElement)(t.Button,{variant:"primary",className:"primary-cta",target:"_blank",href:e.primaryUrl,...r.supportsCTB&&e.clickToBuyId?{"data-action":"load-nfd-ctb","data-ctb-id":e.clickToBuyId}:{}},e.primaryCallToAction)),e.secondaryCallToAction&&e.secondaryUrl&&(o=(0,n.createElement)(t.Button,{variant:"secondary",className:"secondary-cta",target:"_blank",href:e.secondaryUrl},e.secondaryCallToAction)),(0,n.createElement)(n.Fragment,null,a,o)})(e)))},M=({marketplaceItems:e,currentCount:t,category:a,Components:r,methods:o,constants:l,saveCategoryDisplayCount:i})=>{const[s,c]=o.useState(t),[u,d]=o.useState([]),[m,p]=o.useState([]);return o.useEffect((()=>{d(((e,t)=>e.filter((e=>e.categories.includes(t.title))))(e,a))}),[]),o.useEffect((()=>{p(((e,t)=>{let a=0;return e.filter((e=>(a++,a<=t)))})(u,s))}),[u,s]),o.useEffect((()=>{i(a.name,s)}),[s]),(0,n.createElement)("div",{className:`marketplace-list marketplace-list-${a.name}`},(0,n.createElement)("div",{className:"grid col2"},m.length>0&&m.map((e=>(0,n.createElement)(D,{key:e.hash,item:e,Components:r,methods:o,constants:l}))),!m.length&&(0,n.createElement)("p",null,"Sorry, no marketplace items. Please, try again later.")),u&&u.length>s&&(0,n.createElement)("div",{style:{display:"flex",margin:"1rem 0"}},(0,n.createElement)(r.Button,{onClick:()=>{c(s+l.perPage)},variant:"primary",className:"align-center",style:{margin:"auto"}},"Load More")))},W=({width:e,height:t,customClass:a})=>(0,n.createElement)("div",{className:"newfold-marketplace-skeleton "+a,style:{width:e||"100%",height:t||"auto"}}),$=({width:e,height:t})=>(0,n.createElement)(W,{width:e||"500px",height:t||"45px",customClass:"filterbar-skeleton"}),H=()=>(0,n.createElement)("div",{className:"marketplace-item-skeleton"},(0,n.createElement)("div",{className:"skeleton-item-media"},(0,n.createElement)(W,{width:"100%",height:"auto",customClass:"marketplace-item-img-skeleton"})),(0,n.createElement)("div",{className:"skeleton-item-body"},(0,n.createElement)(W,{width:"170px",height:"20px",customClass:"marketplace-item-title-skeleton"}),(0,n.createElement)(W,{width:"100%",height:"10px",customClass:"marketplace-item-desc-skeleton"}),(0,n.createElement)(W,{width:"100%",height:"10px",customClass:"marketplace-item-desc-skeleton"}),(0,n.createElement)(W,{width:"70%",height:"10px",customClass:"marketplace-item-desc-skeleton"}),(0,n.createElement)(W,{width:"80px",height:"36px",customClass:"marketplace-item-button-skeleton"}))),q=({items:e=6,filter:t=!0,containerClassNames:a="grid col2"})=>(0,n.createElement)("div",{className:"newfold-marketplace-isloading"},t&&(0,n.createElement)($,null),(0,n.createElement)("div",{className:a},(e=>{const t=e;let a=[];for(let e=0;e<t;e++)a.push(e);return a.map((e=>(0,n.createElement)(H,{key:e})))})(e))),J=({methods:e,constants:t,Components:a,...r})=>{const[o,l]=e.useState(!0),[i,s]=e.useState(!1),[c,u]=e.useState([]),[d,m]=e.useState([]),[p,h]=e.useState(),f=e.useNavigate(),g=e.useLocation();e.useEffect((()=>{e.apiFetch({url:`${t.resturl}/newfold-marketplace/v1/marketplace`}).then((e=>{e.hasOwnProperty("categories")&&e.hasOwnProperty("products")?(m(e.products.data),u(y(e.categories.data))):s(!0)}))}),[]),e.useEffect((()=>{o||(d.length<1?s(!0):s(!1))}),[d]),e.useEffect((()=>{if(o&&c.length>1){if(g.pathname.includes("marketplace/")){const e=g.pathname.substring(g.pathname.lastIndexOf("/")+1);e&&0==c.filter((t=>t.name===e)).length?h(0):h(e)}l(!1),E()}}),[c]);const y=e=>{if(!e.length)return[];let a=[];return e.forEach((e=>{e.currentCount=t.perPage,e.className="newfold-marketplace-tab-"+e.name,e.products_count>0&&a.push(e)})),a},v=(e,t)=>{let a=[...c];a.forEach((a=>{a.name===e&&(a.currentCount=t)})),u(a)},E=()=>{c&&c.forEach((e=>{if(e.styles&&!document.querySelector('[data-styleid="'+e.className+'"]')){const t=document.createElement("style");t.textContent=e.styles,t.dataset.styleid=e.className,document.head.appendChild(t)}}))};return(0,n.createElement)("div",{className:e.classnames("newfold-marketplace-wrapper")},o&&(0,n.createElement)(q,null),i&&(0,n.createElement)("h3",null,"Oops, there was an error loading the marketplace, please try again later."),!o&&!i&&(0,n.createElement)(a.TabPanel,{className:"newfold-marketplace-tabs",activeClass:"current-tab",orientation:"horizontal",initialTabName:p,onSelect:e=>{f("/marketplace/"+e,{replace:!0})},tabs:c},(r=>(0,n.createElement)(M,{marketplaceItems:d,category:r,Components:a,methods:e,constants:t,currentCount:r.currentCount,saveCategoryDisplayCount:v}))))},V=()=>(0,n.createElement)(j,null,(0,n.createElement)("div",{className:"mojo-app"},(0,n.createElement)(J,{Components:{Button:I.Button,Card:I.Card,CardBody:I.CardBody,CardFooter:I.CardFooter,CardHeader:I.CardHeader,CardMedia:I.CardMedia,TabPanel:I.TabPanel,Spinner:I.Spinner},constants:{resturl:window.mojo.restUrl,eventendpoint:"/newfold-data/v1/events/",perPage:12,supportsCTB:!1},methods:{apiFetch:o(),classnames:i(),useEffect:n.useEffect,useState:s.useState,useNavigate:L,useLocation:R}}))),z=window.wp.domReady;a.n(z)()((()=>(0,s.render)((0,n.createElement)(V,null),document.getElementById("mojo-marketplace-app"))))}()}();

Anon7 - 2022
AnonSec Team