1import{ai as r,ab as s,k as _}from"./DKEtgErO.js";import{u as d}from"./DAwSvC3w.js";const c={manage_items:"edit_item",manage_events:"edit_event",manage_wallet:"manage_wallet",manage_subscription:"manage_subscription",manage_team:"manage_team",view_revenue:"view_revenue",view_orders:"view_orders",charge_orders:"charge_orders",edit_info:"edit_shop_info",edit_location:"edit_shop_location",edit_services:"edit_shop_services",edit_pricing:"edit_shop_pricing",edit_shipping:"edit_shop_shipping",send_messages:"send_message"},p=r(a=>{const e=a.meta.requiredPermission;if(!e)return;const n=c[e];if(n){const{can:i}=d(),t=i(n);if(!t.allowed){const o=t.restriction?.code;return o==="SELLER_SUSPENDED"?s("/access-denied?reason=suspended"):o?.startsWith("SUBSCRIPTION_")?s("/account/selling/plan"):s(`/access-denied?permission=${encodeURIComponent(e)}`)}}else{const{hasSellerPermission:i}=_();if(!i(e))return s(`/access-denied?permission=${encodeURIComponent(e)}`)}});export{p as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.