HEX
Server: Apache/2.4.65 (Debian)
System: Linux 88f31f35b0b8 6.1.0-38-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.147-1 (2025-08-02) x86_64
User: www-data (33)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/feedzy-rss-feeds/build/conditions/index.js
(()=>{var e={485:(e,t)=>{var n;!function(){"use strict";var a={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var l=o.apply(null,n);l&&e.push(l)}}else if("object"===s){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var r in n)a.call(n,r)&&n[r]&&e.push(r)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.React,t=window.wp.domReady;var a=n.n(t);const o=window.wp.element;var s=n(485),l=n.n(s);const r=window.wp.i18n,i=window.wp.components,d=(0,o.forwardRef)((function({icon:e,size:t=24,...n},a){return(0,o.cloneElement)(e,{width:t,height:t,...n,ref:a})})),c=window.wp.primitives,u=(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(c.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),f=({label:t,onDelete:n,initialOpen:a=!1,children:s})=>{const[l,d]=(0,o.useState)(a);return(0,e.createElement)("div",{className:"fz-panel-tab"},(0,e.createElement)("div",{className:"fz-panel-tab__header"},(0,e.createElement)("div",{className:"fz-panel-tab__header__label",onClick:()=>d(!l)},t),(0,e.createElement)(i.Button,{icon:l?"arrow-up-alt2":"arrow-down-alt2",label:l?(0,r.__)("Close Settings","feedzy-rss-feeds"):(0,r.__)("Open Settings","feedzy-rss-feeds"),showTooltip:!0,onClick:()=>d(!l)}),(0,e.createElement)(i.Button,{icon:"no-alt",label:(0,r.__)("Delete","feedzy-rss-feeds"),showTooltip:!0,onClick:n})),l&&(0,e.createElement)("div",{className:"fz-panel-tab__content"},s))},m=window.wp.date,p=({index:t,label:n,value:a,onChange:o})=>{const s=(0,m.__experimentalGetSettings)();return(0,e.createElement)(i.BaseControl,{label:n,id:`date-time-control-${t}`},(0,e.createElement)(i.Dropdown,{position:"bottom left",renderToggle:({onToggle:t,isOpen:n})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(i.Button,{onClick:t,variant:"secondary","aria-expanded":n},a?(0,m.format)(s.formats.datetime,a):(0,r.__)("Select Date","feedzy-rss-feeds"))),renderContent:()=>(0,e.createElement)(i.DateTimePicker,{currentDate:a,onChange:o})}))},_=window.feedzyData.isPro,y=[{label:(0,r.__)("Title","feedzy-rss-feeds"),value:"title"},{label:(0,r.__)("Description","feedzy-rss-feeds"),value:"description",disabled:!_},{label:(0,r.__)("Full Content","feedzy-rss-feeds"),value:"fullcontent",disabled:!_},{label:(0,r.__)("Author","feedzy-rss-feeds"),value:"author",unsupportedOperators:["greater_than","gte","less_than","lte"],disabled:!_},{label:(0,r.__)("Date","feedzy-rss-feeds"),value:"date",unsupportedOperators:["has_value","equals","not_equals","empty","contains","not_contains"],disabled:!_},{label:(0,r.__)("Featured Image","feedzy-rss-feeds"),value:"featured_image",unsupportedOperators:["greater_than","gte","less_than","lte"],disabled:!_},{label:(0,r.__)("Link","feedzy-rss-feeds"),value:"link",unsupportedOperators:["greater_than","gte","less_than","lte"],disabled:!_}],v=({conditions:t,setConditions:n})=>{const[a,s]=(0,o.useState)(!1),c=document.querySelector(".editor-sidebar__panel-tabs"),m=(e,a,o)=>{const s=[...t.conditions];if(s[e][o]=a,"field"===o){const t=y.find((e=>e.value===a));t.unsupportedOperators?.includes(s[e].operator)&&(s[e].operator=Object.keys(window?.feedzyConditionsData?.operators).filter((e=>!t.unsupportedOperators?.includes(e)))[0]),s[e].value=""}n({...t,conditions:s})};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"fz-condition-control"},(0,e.createElement)(i.SelectControl,{label:(0,r.__)("Include If","feedzy-rss-feeds"),value:t.match,options:[{label:(0,r.__)("All conditions are met","feedzy-rss-feeds"),value:"all"},{label:(0,r.__)("Any condition is met","feedzy-rss-feeds"),value:"any"}],onChange:e=>{n({...t,match:e})}}),t.conditions.map(((a,o)=>{const s=y.find((e=>e.value===a.field)),l=Object.keys(window?.feedzyConditionsData?.operators).filter((e=>!s?.unsupportedOperators?.includes(e))),d=y.map((e=>({label:`${e.label}${e.disabled?" (PRO)":""}`,value:e.value,disabled:e.disabled})));return(0,e.createElement)(f,{key:o,label:`${s?.label} ${window.feedzyConditionsData.operators[a.operator]} ${a?.value||""}`,onDelete:()=>(e=>{const a=[...t.conditions];a.splice(e,1),n({...t,conditions:a})})(o),initialOpen:0===o},(0,e.createElement)(i.SelectControl,{label:(0,r.__)("Field","feedzy-rss-feeds"),value:a?.field,options:d,onChange:e=>m(o,e,"field")}),(0,e.createElement)(i.SelectControl,{label:(0,r.__)("Compare Operator","feedzy-rss-feeds"),options:l.map((e=>({label:window.feedzyConditionsData.operators[e],value:e}))),help:["contains","not_contains"].includes(a?.operator)?(0,r.__)("You can use comma(,) and plus(+) keyword.","feedzy-rss-feeds"):"",value:a?.operator,onChange:e=>m(o,e,"operator")}),!["has_value","empty"].includes(a?.operator)&&(0,e.createElement)(e.Fragment,null,"date"===a?.field?(0,e.createElement)(p,{id:o,label:(0,r.__)("Value","feedzy-rss-feeds"),value:a?.value,onChange:e=>m(o,e,"value")}):(0,e.createElement)(i.TextControl,{label:(0,r.__)("Value","feedzy-rss-feeds"),value:a?.value,onChange:e=>m(o,e,"value")})))})),(0,e.createElement)("div",{className:l()("fz-action-btn mt-24",{"is-upsell":!_&&1<=t.conditions.length})},(0,e.createElement)(i.Button,{variant:"secondary",onClick:()=>{if(!_&&1<=t.conditions.length)return c&&(c.style.zIndex=0),void s(!0);const e=[...t.conditions];e.push({field:y[0].value,operator:"contains"}),n({...t,conditions:e})},className:"fz-new-action"},(0,r.__)("Add Condition","feedzy-rss-feeds")," ",(0,e.createElement)(d,{icon:u})))),a&&(0,e.createElement)("div",{id:"feedzy-add-filter-condition",className:"wp-core-ui feedzy-modal"},(0,e.createElement)("div",{className:"modal-content"},(0,e.createElement)("button",{className:"fz-notice close-modal",onClick:()=>{c&&(c.style.zIndex=0),s(!1)}},(0,e.createElement)("span",{className:"dashicons dashicons-no-alt"}),(0,e.createElement)("span",{className:"screen-reader-text"},(0,r.__)("Dismiss this dialog","feedzy-rss-feeds"))),(0,e.createElement)("div",{className:"modal-header"},(0,e.createElement)("h2",null,(0,r.__)("Upgrade to Use Unlimited Conditions","feedzy-rss-feeds")),(0,e.createElement)("p",{style:{color:"red"}},(0,r.__)("Filter Condition limit reached","feedzy-rss-feeds"),(0,e.createElement)("span",null,"("+(0,r.sprintf)(
// translators: %1$s is the number of imports used, %2$s is the total number of imports allowed.
// translators: %1$s is the number of imports used, %2$s is the total number of imports allowed.
(0,r.__)("%1$s/%2$s used","feedzy-rss-feeds"),"1","1")+")"))),(0,e.createElement)("div",{className:"modal-body"},(0,e.createElement)("p",null,(0,r.__)("Your current plan supports only one filter condition. Upgrade to unlock unlimited import configurations and make the most of Feedzy's powerful features!","feedzy-rss-feeds"))),(0,e.createElement)("div",{className:"modal-footer"},(0,e.createElement)("div",{className:"button-container"},(0,e.createElement)("a",{href:"https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/?utm_source=wpadmin&utm_medium=post&utm_campaign=filterCondition&utm_content=feedzy-rss-feeds",target:"_blank",rel:"noreferrer ",className:"button button-primary button-large"},(0,r.__)("Upgrade to PRO","feedzy-rss-feeds"))),(0,e.createElement)("span",null,(0,r.__)("30-day money-back guarantee. No questions asked.","feedzy-rss-feeds"))))))},b=()=>{const[t,n]=(0,o.useState)({conditions:[],match:"all"});return(0,o.useEffect)((()=>{const e=document.getElementById("feed-post-filters-conditions");if(e&&e.value){const t=JSON.parse(e.value);n(t&&t.conditions?t:{conditions:[],match:"all"})}}),[]),(0,o.useEffect)((()=>{document.getElementById("feed-post-filters-conditions").value=JSON.stringify(t)}),[t]),(0,e.createElement)(v,{conditions:t,setConditions:n})};a()((()=>{(0,o.createRoot)(document.getElementById("fz-conditions")).render((0,e.createElement)(b,null))}))})()})();