pdap-design-system 2.5.2-beta.1 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/dist/components/ErrorBoundary/PdapErrorBoundary.vue.d.ts +18 -0
- package/dist/components/FlexContainer/FlexContainer.vue.d.ts +2 -1
- package/dist/components/Form/PdapForm.vue.d.ts +1 -1
- package/dist/components/GridContainer/GridContainer.vue.d.ts +1 -0
- package/dist/components/GridItem/GridItem.vue.d.ts +1 -0
- package/dist/demo/App.vue.d.ts +2 -0
- package/dist/demo/main.d.ts +1 -0
- package/dist/demo/pages/ComponentDemo.vue.d.ts +2 -0
- package/dist/demo/router.d.ts +2 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +944 -954
- package/dist/styles.css +1 -1
- package/docs/components.md +3 -3
- package/package.json +3 -2
package/README.md
CHANGED
@@ -145,6 +145,7 @@ Use this [terminology](https://docs.pdap.io/activities/terms-and-definitions).
|
|
145
145
|
| `test` | Run all test suites |
|
146
146
|
| `test:changed` | Run only test suites affected by changed files |
|
147
147
|
| `typecheck` | Run type check on all `ts` and `vue` files |
|
148
|
+
| `dev` | Run demo app to check visual changes to components |
|
148
149
|
|
149
150
|
|
150
151
|
_n.b. There are some other scripts defined in the `package.json` `"scripts"` field, but they are mostly for CI or cleanup post-build, etc. You shouldn't need them._
|
@@ -0,0 +1,18 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
2
|
+
component: {
|
3
|
+
type: StringConstructor;
|
4
|
+
default: string;
|
5
|
+
};
|
6
|
+
}, any, {
|
7
|
+
error: boolean;
|
8
|
+
}, {}, {
|
9
|
+
interceptError(error: any): void;
|
10
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
11
|
+
component: {
|
12
|
+
type: StringConstructor;
|
13
|
+
default: string;
|
14
|
+
};
|
15
|
+
}>>, {
|
16
|
+
component: string;
|
17
|
+
}, {}>;
|
18
|
+
export default _default;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { PdapFlexContainerProps } from './types';
|
2
|
+
/** @deprecated Please use TailwindCSS class instead */
|
2
3
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PdapFlexContainerProps>, {
|
3
4
|
alignment: string;
|
4
5
|
component: string;
|
@@ -6,8 +7,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
6
7
|
alignment: string;
|
7
8
|
component: string;
|
8
9
|
}>>>, {
|
9
|
-
alignment: "center" | "start";
|
10
10
|
component: string;
|
11
|
+
alignment: "center" | "start";
|
11
12
|
}, {}>, {
|
12
13
|
default?(_: {}): any;
|
13
14
|
}>;
|
@@ -4,8 +4,8 @@ export type VuelidateInstance = typeof v$.value;
|
|
4
4
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PdapFormProps>, {
|
5
5
|
error: null;
|
6
6
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
7
|
-
submit: (...args: any[]) => void;
|
8
7
|
change: (...args: any[]) => void;
|
8
|
+
submit: (...args: any[]) => void;
|
9
9
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PdapFormProps>, {
|
10
10
|
error: null;
|
11
11
|
}>>> & {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { PdapGridContainerProps } from './types';
|
2
|
+
/** @deprecated use TailwindCSS class instead */
|
2
3
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PdapGridContainerProps>, {
|
3
4
|
columns: string;
|
4
5
|
component: string;
|
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
2
|
+
export default _default;
|
@@ -0,0 +1 @@
|
|
1
|
+
import '../styles/styles.css';
|
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
2
|
+
export default _default;
|
package/dist/index.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),T=require("vue-router"),pe=e.defineComponent({__name:"PdapButton",props:{intent:{default:"primary"},isLoading:{type:Boolean,default:!1}},setup(t){const r=t,n=e.reactive({"pdap-button":!0,[`pdap-button-${r.intent}`]:!!r.intent,"pdap-button-loading":r.isLoading});return(a,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(n)},[e.renderSlot(a.$slots,"default")],2))}});const D=e.defineComponent({__name:"FlexContainer",props:{alignment:{default:"start"},component:{default:"div"}},setup(t){const r=t,n=e.reactive({"pdap-flex-container":!0,[`pdap-flex-container-${r.alignment}`]:!0});return(a,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{class:e.normalizeClass(n)},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},8,["class"]))}});const Se={class:"pdap-footer"},Ne={class:"pdap-footer-social-links"},je=["href"],Te={class:"pdap-footer-copyright"},Ae=e.createElementVNode("br",null,null,-1),Le=e.createElementVNode("p",{class:"pdap-footer-copyright"},[e.createTextVNode(" PDAP is a non-profit. EIN: 85-4207132. "),e.createElementVNode("a",{href:"https://docs.pdap.io/meta/policy/pdap-privacy-policy",alt:"Privacy Policy",target:"_blank"},[e.createElementVNode("br"),e.createTextVNode(" Privacy Policy "),e.createElementVNode("i",{class:"fa fa-external-link"})]),e.createElementVNode("br"),e.createElementVNode("a",{href:"mailto:contact@pdap.io"},"contact@pdap.io")],-1),Ie={class:"pdap-footer-widget-links"},ze=e.createElementVNode("a",{href:"https://www.guidestar.org/profile/85-4207132",target:"_blank"},[e.createElementVNode("img",{src:"https://widgets.guidestar.org/gximage2?o=9973356&l=v4"})],-1),De=["href"],Me=["src"],Fe=["src"],qe=e.defineComponent({__name:"PdapFooter",props:{logoImageSrc:{default:"node_modules/pdap-design-system/dist/images/acronym.svg"},logoImageAnchorPath:{default:"/"}},setup(t){const r=t,n=e.inject("footerLinks",[{href:"https://github.com/orgs/Police-Data-Accessibility-Project",text:"Github"},{href:"https://discord.gg/wMqex8nKZJ",text:"Discord"},{href:"https://www.linkedin.com/company/pdap",text:"LinkedIn"},{path:"/jobs",text:"Jobs"}]),a=r.logoImageAnchorPath.startsWith("/");return(o,s)=>{const u=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("footer",Se,[e.createVNode(D,{alignment:"center"},{default:e.withCtx(()=>[e.createElementVNode("ul",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),c=>(e.openBlock(),e.createElementBlock("li",{key:c.text,class:"pdap-footer-link-container"},[c.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-footer-social-link",href:c.href,target:"_blank",referrerpolicy:"no-referrer"},e.toDisplayString(c.text),9,je)):e.createCommentVNode("",!0),c.path?(e.openBlock(),e.createBlock(u,{key:1,"active-class":"pdap-footer-social-link-current","exact-active-class":"pdap-footer-social-link-current-exact",class:"pdap-footer-social-link",to:c.path},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("p",Te,[e.createTextVNode(" © "+e.toDisplayString(new Date().getFullYear())+" Police Data Accessibility Project",1),Ae]),Le,e.createElementVNode("div",Ie,[ze,e.unref(a)?(e.openBlock(),e.createBlock(u,{key:1,to:o.logoImageAnchorPath,class:"pdap-footer-logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:o.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Fe)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("a",{key:0,href:o.logoImageAnchorPath,class:"pdap-footer-logo"},[e.createElementVNode("img",{src:o.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Me)],8,De))])]),_:1})])}}});function ee(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function C(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?ee(Object(n),!0).forEach(function(a){He(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function He(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function te(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(t).reduce((n,a)=>(r.includes(a)||(n[a]=e.unref(t[a])),n),{})}function M(t){return typeof t=="function"}function Ge(t){return e.isReactive(t)||e.isReadonly(t)}function fe(t,r,n){let a=t;const o=r.split(".");for(let s=0;s<o.length;s++){if(!a[o[s]])return n;a=a[o[s]]}return a}function U(t,r,n){return e.computed(()=>t.some(a=>fe(r,a,{[n]:!1})[n]))}function re(t,r,n){return e.computed(()=>t.reduce((a,o)=>{const s=fe(r,o,{[n]:!1})[n]||[];return a.concat(s)},[]))}function ge(t,r,n,a){return t.call(a,e.unref(r),e.unref(n),a)}function he(t){return t.$valid!==void 0?!t.$valid:!t}function We(t,r,n,a,o,s,u){let{$lazy:c,$rewardEarly:l}=o,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],m=arguments.length>8?arguments[8]:void 0,h=arguments.length>9?arguments[9]:void 0,$=arguments.length>10?arguments[10]:void 0;const f=e.ref(!!a.value),i=e.ref(0);n.value=!1;const p=e.watch([r,a].concat(d,$),()=>{if(c&&!a.value||l&&!h.value&&!n.value)return;let g;try{g=ge(t,r,m,u)}catch(v){g=Promise.reject(v)}i.value++,n.value=!!i.value,f.value=!1,Promise.resolve(g).then(v=>{i.value--,n.value=!!i.value,s.value=v,f.value=he(v)}).catch(v=>{i.value--,n.value=!!i.value,s.value=v,f.value=!0})},{immediate:!0,deep:typeof r=="object"});return{$invalid:f,$unwatch:p}}function Ue(t,r,n,a,o,s,u,c){let{$lazy:l,$rewardEarly:d}=a;const m=()=>({}),h=e.computed(()=>{if(l&&!n.value||d&&!c.value)return!1;let $=!0;try{const f=ge(t,r,u,s);o.value=f,$=he(f)}catch(f){o.value=f}return $});return{$unwatch:m,$invalid:h}}function Xe(t,r,n,a,o,s,u,c,l,d,m){const h=e.ref(!1),$=t.$params||{},f=e.ref(null);let i,p;t.$async?{$invalid:i,$unwatch:p}=We(t.$validator,r,h,n,a,f,o,t.$watchTargets,l,d,m):{$invalid:i,$unwatch:p}=Ue(t.$validator,r,n,a,f,o,l,d);const g=t.$message;return{$message:M(g)?e.computed(()=>g(te({$pending:h,$invalid:i,$params:te($),$model:r,$response:f,$validator:s,$propertyPath:c,$property:u}))):g||"",$params:$,$pending:h,$invalid:i,$response:f,$unwatch:p}}function Ke(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=e.unref(t),n=Object.keys(r),a={},o={},s={};let u=null;return n.forEach(c=>{const l=r[c];switch(!0){case M(l.$validator):a[c]=l;break;case M(l):a[c]={$validator:l};break;case c==="$validationGroups":u=l;break;case c.startsWith("$"):s[c]=l;break;default:o[c]=l}}),{rules:a,nestedValidators:o,config:s,validationGroups:u}}const Ze="__root";function Qe(t,r,n,a,o,s,u,c,l){const d=Object.keys(t),m=a.get(o,t),h=e.ref(!1),$=e.ref(!1),f=e.ref(0);if(m){if(!m.$partial)return m;m.$unwatch(),h.value=m.$dirty.value}const i={$dirty:h,$path:o,$touch:()=>{h.value||(h.value=!0)},$reset:()=>{h.value&&(h.value=!1)},$commit:()=>{}};return d.length?(d.forEach(p=>{i[p]=Xe(t[p],r,i.$dirty,s,u,p,n,o,l,$,f)}),i.$externalResults=e.computed(()=>c.value?[].concat(c.value).map((p,g)=>({$propertyPath:o,$property:n,$validator:"$externalResults",$uid:`${o}-externalResult-${g}`,$message:p,$params:{},$response:null,$pending:!1})):[]),i.$invalid=e.computed(()=>{const p=d.some(g=>e.unref(i[g].$invalid));return $.value=p,!!i.$externalResults.value.length||p}),i.$pending=e.computed(()=>d.some(p=>e.unref(i[p].$pending))),i.$error=e.computed(()=>i.$dirty.value?i.$pending.value||i.$invalid.value:!1),i.$silentErrors=e.computed(()=>d.filter(p=>e.unref(i[p].$invalid)).map(p=>{const g=i[p];return e.reactive({$propertyPath:o,$property:n,$validator:p,$uid:`${o}-${p}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(i.$externalResults.value)),i.$errors=e.computed(()=>i.$dirty.value?i.$silentErrors.value:[]),i.$unwatch=()=>d.forEach(p=>{i[p].$unwatch()}),i.$commit=()=>{$.value=!0,f.value=Date.now()},a.set(o,t,i),i):(m&&a.set(o,t,i),i)}function Je(t,r,n,a,o,s,u){const c=Object.keys(t);return c.length?c.reduce((l,d)=>(l[d]=X({validations:t[d],state:r,key:d,parentKey:n,resultsCache:a,globalConfig:o,instance:s,externalResults:u}),l),{}):{}}function Ye(t,r,n){const a=e.computed(()=>[r,n].filter(i=>i).reduce((i,p)=>i.concat(Object.values(e.unref(p))),[])),o=e.computed({get(){return t.$dirty.value||(a.value.length?a.value.every(i=>i.$dirty):!1)},set(i){t.$dirty.value=i}}),s=e.computed(()=>{const i=e.unref(t.$silentErrors)||[],p=a.value.filter(g=>(e.unref(g).$silentErrors||[]).length).reduce((g,v)=>g.concat(...v.$silentErrors),[]);return i.concat(p)}),u=e.computed(()=>{const i=e.unref(t.$errors)||[],p=a.value.filter(g=>(e.unref(g).$errors||[]).length).reduce((g,v)=>g.concat(...v.$errors),[]);return i.concat(p)}),c=e.computed(()=>a.value.some(i=>i.$invalid)||e.unref(t.$invalid)||!1),l=e.computed(()=>a.value.some(i=>e.unref(i.$pending))||e.unref(t.$pending)||!1),d=e.computed(()=>a.value.some(i=>i.$dirty)||a.value.some(i=>i.$anyDirty)||o.value),m=e.computed(()=>o.value?l.value||c.value:!1),h=()=>{t.$touch(),a.value.forEach(i=>{i.$touch()})},$=()=>{t.$commit(),a.value.forEach(i=>{i.$commit()})},f=()=>{t.$reset(),a.value.forEach(i=>{i.$reset()})};return a.value.length&&a.value.every(i=>i.$dirty)&&h(),{$dirty:o,$errors:u,$invalid:c,$anyDirty:d,$error:m,$pending:l,$touch:h,$reset:f,$silentErrors:s,$commit:$}}function X(t){let{validations:r,state:n,key:a,parentKey:o,childResults:s,resultsCache:u,globalConfig:c={},instance:l,externalResults:d}=t;const m=o?`${o}.${a}`:a,{rules:h,nestedValidators:$,config:f,validationGroups:i}=Ke(r),p=C(C({},c),f),g=a?e.computed(()=>{const y=e.unref(n);return y?e.unref(y[a]):void 0}):n,v=C({},e.unref(d)||{}),x=e.computed(()=>{const y=e.unref(d);return a?y?e.unref(y[a]):void 0:y}),V=Qe(h,g,a,u,m,p,l,x,n),w=Je($,g,m,u,p,l,x),B={};i&&Object.entries(i).forEach(y=>{let[O,E]=y;B[O]={$invalid:U(E,w,"$invalid"),$error:U(E,w,"$error"),$pending:U(E,w,"$pending"),$errors:re(E,w,"$errors"),$silentErrors:re(E,w,"$silentErrors")}});const{$dirty:k,$errors:I,$invalid:H,$anyDirty:ke,$error:Ee,$pending:G,$touch:W,$reset:Ce,$silentErrors:Pe,$commit:Y}=Ye(V,w,s),Re=a?e.computed({get:()=>e.unref(g),set:y=>{k.value=!0;const O=e.unref(n),E=e.unref(d);E&&(E[a]=v[a]),e.isRef(O[a])?O[a].value=y:O[a]=y}}):null;a&&p.$autoDirty&&e.watch(g,()=>{k.value||W();const y=e.unref(d);y&&(y[a]=v[a])},{flush:"sync"});async function Ve(){return W(),p.$rewardEarly&&(Y(),await e.nextTick()),await e.nextTick(),new Promise(y=>{if(!G.value)return y(!H.value);const O=e.watch(G,()=>{y(!H.value),O()})})}function Be(y){return(s.value||{})[y]}function Oe(){e.isRef(d)?d.value=v:Object.keys(v).length===0?Object.keys(d).forEach(y=>{delete d[y]}):Object.assign(d,v)}return e.reactive(C(C(C({},V),{},{$model:Re,$dirty:k,$error:Ee,$errors:I,$invalid:H,$anyDirty:ke,$pending:G,$touch:W,$reset:Ce,$path:m||Ze,$silentErrors:Pe,$validate:Ve,$commit:Y},s&&{$getResultsForChild:Be,$clearExternalResults:Oe,$validationGroups:B}),w))}class et{constructor(){this.storage=new Map}set(r,n,a){this.storage.set(r,{rules:n,result:a})}checkRulesValidity(r,n,a){const o=Object.keys(a),s=Object.keys(n);return s.length!==o.length||!s.every(c=>o.includes(c))?!1:s.every(c=>n[c].$params?Object.keys(n[c].$params).every(l=>e.unref(a[c].$params[l])===e.unref(n[c].$params[l])):!0)}get(r,n){const a=this.storage.get(r);if(!a)return;const{rules:o,result:s}=a,u=this.checkRulesValidity(r,n,o),c=s.$unwatch?s.$unwatch:()=>({});return u?s:{$dirty:s.$dirty,$partial:!0,$unwatch:c}}}const z={COLLECT_ALL:!0,COLLECT_NONE:!1},ne=Symbol("vuelidate#injectChildResults"),ae=Symbol("vuelidate#removeChildResults");function tt(t){let{$scope:r,instance:n}=t;const a={},o=e.ref([]),s=e.computed(()=>o.value.reduce((m,h)=>(m[h]=e.unref(a[h]),m),{}));function u(m,h){let{$registerAs:$,$scope:f,$stopPropagation:i}=h;i||r===z.COLLECT_NONE||f===z.COLLECT_NONE||r!==z.COLLECT_ALL&&r!==f||(a[$]=m,o.value.push($))}n.__vuelidateInjectInstances=[].concat(n.__vuelidateInjectInstances||[],u);function c(m){o.value=o.value.filter(h=>h!==m),delete a[m]}n.__vuelidateRemoveInstances=[].concat(n.__vuelidateRemoveInstances||[],c);const l=e.inject(ne,[]);e.provide(ne,n.__vuelidateInjectInstances);const d=e.inject(ae,[]);return e.provide(ae,n.__vuelidateRemoveInstances),{childResults:s,sendValidationResultsToParent:l,removeValidationResultsFromParent:d}}function $e(t){return new Proxy(t,{get(r,n){return typeof r[n]=="object"?$e(r[n]):e.computed(()=>r[n])}})}let oe=0;function rt(t,r){var n;let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(a=t,t=void 0,r=void 0);let{$registerAs:o,$scope:s=z.COLLECT_ALL,$stopPropagation:u,$externalResults:c,currentVueInstance:l}=a;const d=l||((n=e.getCurrentInstance())===null||n===void 0?void 0:n.proxy),m=d?d.$options:{};o||(oe+=1,o=`_vuelidate_${oe}`);const h=e.ref({}),$=new et,{childResults:f,sendValidationResultsToParent:i,removeValidationResultsFromParent:p}=d?tt({$scope:s,instance:d}):{childResults:e.ref({})};if(!t&&m.validations){const g=m.validations;r=e.ref({}),e.onBeforeMount(()=>{r.value=d,e.watch(()=>M(g)?g.call(r.value,new $e(r.value)):g,v=>{h.value=X({validations:v,state:r,childResults:f,resultsCache:$,globalConfig:a,instance:d,externalResults:c||d.vuelidateExternalResults})},{immediate:!0})}),a=m.validationsConfig||a}else{const g=e.isRef(t)||Ge(t)?t:e.reactive(t||{});e.watch(g,v=>{h.value=X({validations:v,state:r,childResults:f,resultsCache:$,globalConfig:a,instance:d??{},externalResults:c})},{immediate:!0})}return d&&(i.forEach(g=>g(h,{$registerAs:o,$scope:s,$stopPropagation:u})),e.onBeforeUnmount(()=>p.forEach(g=>g(o)))),e.computed(()=>C(C({},e.unref(h.value)),f.value))}var b=(t=>(t.CHECKBOX="checkbox",t.TEXT="text",t.PASSWORD="password",t))(b||{});const nt=["id","name","placeholder","value"],at=["id","name","placeholder","value"],ot=["id","name","checked","value"],st=["id"],lt=["for"],ve=e.defineComponent({__name:"PdapInput",props:{error:{},id:{},label:{},name:{},placeholder:{},type:{},value:{},defaultChecked:{type:Boolean}},emits:["change","input"],setup(t,{emit:r}){const n=t,a=r,o=()=>{u.value=!u.value,a("change",u.value.toString())},s=l=>{a("input",l.target.value)},u=e.ref(n.defaultChecked),c=e.computed(()=>`pdap-${n.name}-input-error`);return(l,d)=>{var m;return e.openBlock(),e.createBlock(e.unref(be),{class:e.normalizeClass({"pdap-input":!0,"pdap-input-error":Number((m=l.error)==null?void 0:m.length)>=1})},{default:e.withCtx(()=>[l.type===e.unref(b).TEXT?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:0,id:l.id,type:"text",name:l.name,placeholder:l.placeholder,value:l.value},l.$attrs,{onInput:s}),null,16,nt)):e.createCommentVNode("",!0),l.type===e.unref(b).PASSWORD?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:1,id:l.id,type:"password",name:l.name,placeholder:l.placeholder,value:l.value},l.$attrs,{onInput:s}),null,16,at)):l.type===e.unref(b).CHECKBOX?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:2,id:l.id,class:"pdap-input-checkbox",name:l.name,checked:u.value,type:"checkbox",value:l.value},l.$attrs,{onChange:o}),null,16,ot)):e.createCommentVNode("",!0),l.error?(e.openBlock(),e.createElementBlock("div",{key:3,id:c.value,class:"pdap-input-error-message"},e.toDisplayString(l.error),9,st)):e.createCommentVNode("",!0),e.createElementVNode("label",{class:"pdap-input-label",for:l.id},e.toDisplayString(l.label),9,lt)]),_:1},8,["class"])}}});function se(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function N(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?se(Object(n),!0).forEach(function(a){it(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function it(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function A(t){return typeof t=="function"}function F(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function q(t){return A(t.$validator)?N({},t):{$validator:t}}function ct(t){return F(t)&&A(t.then)}function P(t){return typeof t=="object"?t.$valid:t}function S(t){return t.$validator||t}function K(t,r){if(!F(t))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof t}`);if(!F(r)&&!A(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=q(r);return n.$params=N(N({},n.$params||{}),t),n}function L(t,r){if(!A(t)&&typeof e.unref(t)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof t}`);if(!F(r)&&!A(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=q(r);return n.$message=t,n}function ut(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=q(t);return N(N({},n),{},{$async:!0,$watchTargets:r})}function dt(t){return{$validator(r){for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];return e.unref(r).reduce((s,u,c)=>{const l=Object.entries(u).reduce((d,m)=>{let[h,$]=m;const f=t[h]||{},i=Object.entries(f).reduce((p,g)=>{let[v,x]=g;const w=S(x).call(this,$,u,c,...a),B=P(w);if(p.$data[v]=w,p.$data.$invalid=!B||!!p.$data.$invalid,p.$data.$error=p.$data.$invalid,!B){let k=x.$message||"";const I=x.$params||{};typeof k=="function"&&(k=k({$pending:!1,$invalid:!B,$params:I,$model:$,$response:w})),p.$errors.push({$property:h,$message:k,$params:I,$response:w,$model:$,$pending:!1,$validator:v})}return{$valid:p.$valid&&B,$data:p.$data,$errors:p.$errors}},{$valid:!0,$data:{},$errors:[]});return d.$data[h]=i.$data,d.$errors[h]=i.$errors,{$valid:d.$valid&&i.$valid,$data:d.$data,$errors:d.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:s.$valid&&l.$valid,$data:s.$data.concat(l.$data),$errors:s.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:r=>{let{$response:n}=r;return n?n.$errors.map(a=>Object.values(a).map(o=>o.map(s=>s.$message)).reduce((o,s)=>o.concat(s),[])):[]}}}const _=t=>{if(t=e.unref(t),Array.isArray(t))return!!t.length;if(t==null)return!1;if(t===!1)return!0;if(t instanceof Date)return!isNaN(t.getTime());if(typeof t=="object"){for(let r in t)return!0;return!1}return!!String(t).length},Z=t=>(t=e.unref(t),Array.isArray(t)?t.length:typeof t=="object"?Object.keys(t).length:String(t).length);function R(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a=>(a=e.unref(a),!_(a)||r.every(o=>(o.lastIndex=0,o.test(a))))}var j=Object.freeze({__proto__:null,forEach:dt,len:Z,normalizeValidatorObject:q,regex:R,req:_,unwrap:e.unref,unwrapNormalizedValidator:S,unwrapValidatorResponse:P,withAsync:ut,withMessage:L,withParams:K}),mt=R(/^[a-zA-Z]*$/),pt={$validator:mt,$message:"The value is not alphabetical",$params:{type:"alpha"}},ft=R(/^[a-zA-Z0-9]*$/),gt={$validator:ft,$message:"The value must be alpha-numeric",$params:{type:"alphaNum"}},ht=R(/^\d*(\.\d+)?$/),$t={$validator:ht,$message:"Value must be numeric",$params:{type:"numeric"}};function vt(t,r){return n=>!_(n)||(!/\s/.test(n)||n instanceof Date)&&+e.unref(t)<=+n&&+e.unref(r)>=+n}function yt(t,r){return{$validator:vt(t,r),$message:n=>{let{$params:a}=n;return`The value must be between ${a.min} and ${a.max}`},$params:{min:t,max:r,type:"between"}}}const _t=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;var wt=R(_t),Q={$validator:wt,$message:"Value is not a valid email address",$params:{type:"email"}};function bt(t){if(!_(t))return!0;if(typeof t!="string")return!1;const r=t.split(".");return r.length===4&&r.every(xt)}const xt=t=>{if(t.length>3||t.length===0||t[0]==="0"&&t!=="0"||!t.match(/^\d+$/))return!1;const r=+t|0;return r>=0&&r<=255};var kt={$validator:bt,$message:"The value is not a valid IP address",$params:{type:"ipAddress"}};function Et(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:":";return r=>{if(t=e.unref(t),!_(r))return!0;if(typeof r!="string")return!1;const n=typeof t=="string"&&t!==""?r.split(t):r.length===12||r.length===16?r.match(/.{2}/g):null;return n!==null&&(n.length===6||n.length===8)&&n.every(Ct)}}const Ct=t=>t.toLowerCase().match(/^[0-9a-f]{2}$/);function Pt(t){return{$validator:Et(t),$message:"The value is not a valid MAC Address",$params:{type:"macAddress"}}}function Rt(t){return r=>!_(r)||Z(r)<=e.unref(t)}function Vt(t){return{$validator:Rt(t),$message:r=>{let{$params:n}=r;return`The maximum length allowed is ${n.max}`},$params:{max:t,type:"maxLength"}}}function Bt(t){return r=>!_(r)||Z(r)>=e.unref(t)}function Ot(t){return{$validator:Bt(t),$message:r=>{let{$params:n}=r;return`This field should be at least ${n.min} characters long`},$params:{min:t,type:"minLength"}}}function St(t){return typeof t=="string"&&(t=t.trim()),_(t)}var J={$validator:St,$message:"Value is required",$params:{type:"required"}};const le=(t,r)=>t?_(typeof r=="string"?r.trim():r):!0;function Nt(t){return function(r,n){if(typeof t!="function")return le(e.unref(t),r);const a=t.call(this,r,n);return le(a,r)}}function jt(t){return{$validator:Nt(t),$message:"The value is required",$params:{type:"requiredIf",prop:t}}}const ie=(t,r)=>t?!0:_(typeof r=="string"?r.trim():r);function Tt(t){return function(r,n){if(typeof t!="function")return ie(e.unref(t),r);const a=t.call(this,r,n);return ie(a,r)}}function At(t){return{$validator:Tt(t),$message:"The value is required",$params:{type:"requiredUnless",prop:t}}}function Lt(t){return r=>e.unref(r)===e.unref(t)}function It(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"other";return{$validator:Lt(t),$message:n=>`The value must be equal to the ${r} value`,$params:{equalTo:t,otherName:r,type:"sameAs"}}}const zt=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;var Dt=R(zt),Mt={$validator:Dt,$message:"The value is not a valid URL address",$params:{type:"url"}};function Ft(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce((o,s)=>P(o)?o:S(s).apply(this,n),!1)}}function qt(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce(async(o,s)=>{const u=await o;return P(u)?u:S(s).apply(this,n)},Promise.resolve(!1))}}function Ht(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(u=>u.$async),o=r.reduce((u,c)=>c.$watchTargets?u.concat(c.$watchTargets):u,[]);let s=()=>!1;return r.length&&(s=a?qt(r):Ft(r)),{$async:a,$validator:s,$watchTargets:o}}function Gt(){return K({type:"or"},L("The value does not match any of the provided validators",Ht(...arguments)))}function Wt(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce((o,s)=>P(o)?S(s).apply(this,n):o,!0)}}function Ut(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce(async(o,s)=>{const u=await o;return P(u)?S(s).apply(this,n):u},Promise.resolve(!0))}}function Xt(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(u=>u.$async),o=r.reduce((u,c)=>c.$watchTargets?u.concat(c.$watchTargets):u,[]);let s=()=>!1;return r.length&&(s=a?Ut(r):Wt(r)),{$async:a,$validator:s,$watchTargets:o}}function Kt(){return K({type:"and"},L("The value does not match all of the provided validators",Xt(...arguments)))}function Zt(t){return function(r,n){if(!_(r))return!0;const a=S(t).call(this,r,n);return ct(a)?a.then(o=>!P(o)):!P(a)}}function Qt(t){return{$validator:Zt(t),$message:"The value does not match the provided validator",$params:{type:"not"}}}function Jt(t){return r=>!_(r)||(!/\s/.test(r)||r instanceof Date)&&+r>=+e.unref(t)}function Yt(t){return{$validator:Jt(t),$message:r=>{let{$params:n}=r;return`The minimum value allowed is ${n.min}`},$params:{min:t,type:"minValue"}}}function er(t){return r=>!_(r)||(!/\s/.test(r)||r instanceof Date)&&+r<=+e.unref(t)}var tr=t=>({$validator:er(t),$message:r=>{let{$params:n}=r;return`The maximum value allowed is ${n.max}`},$params:{max:t,type:"maxValue"}}),rr=R(/(^[0-9]*$)|(^-[0-9]+$)/),nr={$validator:rr,$message:"Value is not an integer",$params:{type:"integer"}},ar=R(/^[-]?\d*(\.\d+)?$/),or={$validator:ar,$message:"Value must be decimal",$params:{type:"decimal"}};function sr(t){let{t:r,messagePath:n=o=>{let{$validator:s}=o;return`validations.${s}`},messageParams:a=o=>o}=t;return function(s){let{withArguments:u=!1,messagePath:c=n,messageParams:l=a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};function d(m){return r(c(m),l(N({model:m.$model,property:m.$property,pending:m.$pending,invalid:m.$invalid,response:m.$response,validator:m.$validator,propertyPath:m.$propertyPath},m.$params)))}return u&&typeof s=="function"?function(){return L(d,s(...arguments))}:L(d,s)}}const ye=Object.freeze(Object.defineProperty({__proto__:null,alpha:pt,alphaNum:gt,and:Kt,between:yt,createI18nMessage:sr,decimal:or,email:Q,helpers:j,integer:nr,ipAddress:kt,macAddress:Pt,maxLength:Vt,maxValue:tr,minLength:Ot,minValue:Yt,not:Qt,numeric:$t,or:Gt,required:J,requiredIf:jt,requiredUnless:At,sameAs:It,url:Mt},Symbol.toStringTag,{value:"Module"})),_e=j.regex(/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$ %^&*-]).{8,}$/);function ce(t){return["maxLength","minLength"].includes(t)}function ue(t){return t==="required"}function de(t){return t==="email"}function me(t){return t==="password"}function lr(t,r){return{[t]:ye[t](r)}}function ir(t,r,n){return{[t]:j.withMessage(n,ye[t](r))}}function cr(){return{required:J}}function ur(t){return{required:j.withMessage(t,J)}}function dr(){return{email:Q}}function mr(t){return{email:j.withMessage(t,Q)}}function pr(){return{password:_e}}function fr(t){return{password:j.withMessage(t,_e)}}function gr(t,r){if(ce(t)&&typeof r.message=="string"&&typeof r.value=="number")return ir(t,r.value,r.message);if(ce(t)&&typeof r.message>"u"&&typeof r.value=="number")return lr(t,r.value);if(de(t)&&typeof r.message=="string")return mr(r.message);if(de(t)&&typeof r.message>"u")return dr();if(me(t)&&typeof r.message=="string")return fr(r.message);if(me(t)&&typeof r.message>"u")return pr();if(ue(t)&&typeof r.message=="string")return ur(r.message);if(ue(t)&&typeof r.message>"u")return cr();throw new Error("No valid rule detected")}const hr=["id","name"],$r={key:0,class:"pdap-form-error-message"},we=e.defineComponent({__name:"PdapForm",props:{error:{default:null},id:{},name:{},schema:{}},emits:["submit","change"],setup(t,{emit:r}){const n=t,a=r,o=e.computed(()=>n.schema.map($=>{const f={...$};return delete f.validators,f}));let s=e.reactive(o.value.reduce(($,f)=>{switch(f.type){case b.CHECKBOX:return{...$,[f.name]:String(f.defaultChecked)};case b.TEXT:case b.PASSWORD:default:return{...$,[f.name]:f.value}}},{}));const u=n.schema.reduce(($,f)=>{const i=Object.entries(f.validators??{}).reduce((p,[g,v])=>({...p,...gr(g,v)}),{});return{...$,[f.name]:{...i}}},{}),c=rt(u,s,{$autoDirty:!1,$lazy:!0}),l=e.ref(n.error);function d($,f){s[$]=f,m()}e.watchEffect(()=>{n.error?l.value=n.error:l.value&&c.value.$errors.length===0?l.value=null:!l.value&&c.value.$errors.length>0&&(l.value="Please update this form to correct the errors")}),e.watchEffect(()=>{});function m(){a("change",{...s})}async function h($){if(await c.value.$validate()){a("submit",{...s}),c.value.$reset(),$.target.reset(),s=Object.entries(s).reduce((p,[g,v])=>({...p,[g]:["true","false"].includes(v)?v:""}),{});return}}return($,f)=>(e.openBlock(),e.createElementBlock("form",{id:$.id,name:$.name,class:"pdap-form",onChange:m,onSubmit:f[0]||(f[0]=e.withModifiers(i=>h(i),["prevent"]))},[typeof l.value=="string"?(e.openBlock(),e.createElementBlock("div",$r,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,i=>{var p,g,v,x;return e.openBlock(),e.createBlock(ve,e.mergeProps(i,{key:i.name,error:(p=e.unref(c)[i.name])!=null&&p.$error?(x=(v=(g=e.unref(c)[i.name])==null?void 0:g.$errors)==null?void 0:v[0])==null?void 0:x.$message:"",value:e.unref(s)[i.name],onChange:V=>d(i.name,V),onInput:V=>d(i.name,V)}),null,16,["error","value","onChange","onInput"])}),128)),e.renderSlot($.$slots,"default")],40,hr))}});const be=e.defineComponent({__name:"GridContainer",props:{columns:{default:"auto"},component:{default:"div"},rows:{default:"auto"},templateColumns:{},templateRows:{}},setup(t){const r=t,n=e.reactive({"pdap-grid-container":!0,[`pdap-grid-container-column-${r.columns}`]:r.columns!=="auto"}),a=r.templateRows||typeof r.rows=="number",o=r.templateRows??`repeat(${r.rows}, minmax(0, 1fr))`,s=e.reactive({...a&&{gridTemplateRows:o},...r.templateColumns&&{gridTemplateColumns:r.templateColumns}});return(u,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.component),{class:e.normalizeClass(n),style:e.normalizeStyle(s)},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:3},8,["class","style"]))}});const vr=e.defineComponent({__name:"GridItem",props:{component:{default:"div"},spanColumn:{default:1},spanRow:{default:1}},setup(t){const r=t,n=e.reactive({"pdap-grid-item":!0,[`pdap-grid-item-span-column-${r.spanColumn}`]:r.spanColumn>1}),a=e.reactive({...r.spanRow>1&&{gridRow:`span ${r.spanRow} / span ${r.spanRow}`}});return(o,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.component),{class:e.normalizeClass(n),style:e.normalizeStyle(a)},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});const yr=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[e.createElementVNode("path",{d:"M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"})],-1),_r=[yr],wr=["aria-expanded"],br=["href"],xe=e.defineComponent({__name:"PdapNav",props:{topPosition:{}},setup(t){let r=e.inject("navLinks");typeof r>"u"&&(r=[],console.error(`Hey, PDAP developer
|
2
|
-
`,"Did you forget to inject some linkData for the Nav component?"));const n=e.reactive({isExpanded:!1,isMobile:!0}),a=e.reactive({"pdap-nav":!0});e.onBeforeMount(()=>{o(),window.addEventListener("resize",o)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",o)});async function o(){window.innerWidth<=1024?n.isMobile=!0:n.isMobile=!1,await e.nextTick()}async function s(){var c,l;const u=document.querySelector("body");!n.isExpanded&&n.isMobile?(n.isExpanded=!0,u!=null&&u.classList.contains("lock-scroll")||(c=document.querySelector("body"))==null||c.classList.add("lock-scroll")):n.isExpanded&&n.isMobile&&(n.isExpanded=!1,(l=document.querySelector("body"))==null||l.classList.remove("lock-scroll")),await e.nextTick()}return(u,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{"aria-controls":"nav",class:"pdap-nav-open-button",role:"button",onClick:s},_r),e.createElementVNode("nav",{id:"nav","aria-expanded":n.isMobile&&n.isExpanded||!n.isMobile,class:e.normalizeClass(a),style:e.normalizeStyle(n.isMobile?{top:`${u.topPosition}px`}:{})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),l=>(e.openBlock(),e.createElementBlock("li",{key:l.text,class:"pdap-nav-link-container"},[l.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-nav-link",href:l.href,target:"_blank",referrerpolicy:"no-referrer",onClick:s},e.toDisplayString(l.text),9,br)):e.createCommentVNode("",!0),l.path?(e.openBlock(),e.createBlock(e.unref(T.RouterLink),{key:1,"active-class":"pdap-nav-link-current","exact-active-class":"pdap-nav-link-current-exact",class:"pdap-nav-link",to:l.path,onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))],14,wr)],64))}});const xr=["href"],kr=["src"],Er=["src"],Cr=e.defineComponent({__name:"PdapHeader",props:{logoImageSrc:{default:"node_modules/pdap-design-system/dist/images/lockup.svg"},logoImageAnchorPath:{default:"/"}},setup(t){const r=t,n=e.ref(),a=e.ref(null),o=r.logoImageAnchorPath.startsWith("/");e.onMounted(()=>{s(),window.addEventListener("resize",s)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",s)});function s(){a.value&&(n.value=a.value.offsetHeight)}return(u,c)=>(e.openBlock(),e.createElementBlock("header",{ref_key:"el",ref:a,class:"pdap-header"},[e.unref(o)?(e.openBlock(),e.createBlock(e.unref(T.RouterLink),{key:1,to:u.logoImageAnchorPath,class:"logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:u.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Er)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("a",{key:0,href:u.logoImageAnchorPath,class:"logo"},[e.createElementVNode("img",{src:u.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,kr)],8,xr)),e.createVNode(xe,{"top-position":n.value},null,8,["top-position"])],512))}});const Pr=e.createElementVNode("h2",{class:"mt-0"},"Search our database",-1),Rr=e.createElementVNode("p",{class:"pb-4 md:pb-8"},[e.createTextVNode(" If you are looking for something specific, we may already be tracking it. "),e.createElementVNode("a",{href:"https://pdap.io/data"},"Learn more about the data here.")],-1),Vr={class:"max-w-[unset] text-med"},Br=["href"],Or=["href"],Sr=e.defineComponent({__name:"QuickSearchForm",props:{baseUrlForRedirect:{default:"https://data-sources.pdap.io"}},setup(t){const r=T.useRouter(),n=t,a=[{id:"search-term",name:"searchTerm",label:"What are you looking for?",type:b.TEXT,placeholder:"Enter a keyword, or 'all'",value:""},{id:"location",name:"location",label:"From where?",type:b.TEXT,placeholder:"Enter a place, or 'all'",value:""}],o=e.ref(void 0),s=r.getRoutes().some(l=>l.path.includes("/search/"));function u(l){o.value&&Object.values(l).some(Boolean)&&(o.value=void 0)}function c(l){if(Object.values(l).every(h=>!h)){o.value="Either a search term or a location is required.";return}let{location:d,searchTerm:m}=l;d=d&&d.length>0?d:"all",m=m&&m.length>0?m:"all",s?r.push(`/search/${m}/${d}`):window.location.assign(`${n.baseUrlForRedirect}/search/${m}/${d}`)}return(l,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(D,{class:"p-0"},{default:e.withCtx(()=>[Pr,Rr]),_:1}),e.createVNode(D,{alignment:"center",class:"pdap-quick-search-form h-full max-h-[75-vh] justify-start p-0"},{default:e.withCtx(()=>[e.createVNode(we,{id:"quick-search-form",class:"flex flex-wrap gap-x-4",error:o.value,schema:a,name:"quickSearchForm",onChange:u,onSubmit:c},{default:e.withCtx(()=>[e.createVNode(pe,{type:"submit",class:"flex-grow-0 flex-shrink-0 basis-full max-w-[unset] mt-4"},{default:e.withCtx(()=>[e.createTextVNode("Search Data Sources")]),_:1})]),_:1},8,["error"]),e.createElementVNode("p",Vr,[e.createTextVNode(" For example, you could search for "),e.unref(s)?(e.openBlock(),e.createBlock(e.unref(T.RouterLink),{key:0,to:"/search/stops/pittsburgh"},{default:e.withCtx(()=>[e.createTextVNode(" stops in Pittsburgh ")]),_:1})):(e.openBlock(),e.createElementBlock("a",{key:1,target:"_blank",rel:"noreferrer",href:`${n.baseUrlForRedirect}/search/stops/pittsburgh`}," stops in Pittsburgh ",8,Br)),e.createTextVNode(" or "),e.unref(s)?(e.openBlock(),e.createBlock(e.unref(T.RouterLink),{key:2,to:"/search/complaints/all"},{default:e.withCtx(()=>[e.createTextVNode(" complaints everywhere ")]),_:1})):(e.openBlock(),e.createElementBlock("a",{key:3,target:"_blank",rel:"noreferrer",href:`${n.baseUrlForRedirect}/search/complaints/all`}," complaints everywhere ",8,Or)),e.createTextVNode(" . ")])]),_:1})],64))}});const Nr=["alt","src"],jr=e.defineComponent({__name:"TileIcon",props:{imgAltText:{},imgSrc:{}},setup(t){return(r,n)=>(e.openBlock(),e.createElementBlock("img",{class:"pdap-tile-icon",alt:r.imgAltText,src:r.imgSrc},null,8,Nr))}});const Tr={content:["./src/**/*.vue","./src/**/*.css"],theme:{extend:{colors:{brand:{blue:{light:"rgba(var(--color-brand-blue-light)/<alpha-value>)",medium:"rgba(var(--color-brand-blue-medium)/<alpha-value>)"},gold:"rgba(var(--color-brand-gold)/<alpha-value>)",wine:"rgba(var(--color-brand-wine)/<alpha-value>)"},neutral:{50:"rgba(var(--color-neutral-50)/<alpha-value>)",100:"rgba(var(--color-neutral-100)/<alpha-value>)",200:"rgba(var(--color-neutral-200)/<alpha-value>)",300:"rgba(var(--color-neutral-300)/<alpha-value>)",400:"rgba(var(--color-neutral-400)/<alpha-value>)",500:"rgba(var(--color-neutral-500)/<alpha-value>)",600:"rgba(var(--color-neutral-600)/<alpha-value>)",700:"rgba(var(--color-neutral-700)/<alpha-value>)",800:"rgba(var(--color-neutral-800)/<alpha-value>)",900:"rgba(var(--color-neutral-900)/<alpha-value>)",950:"rgba(var(--color-neutral-950)/<alpha-value>)"}},brightness:{85:".85"},maxWidth:{"4xl":"59rem"},screens:{xs:"500px"}},fontFamily:{sans:['"Libre Franklin"',"ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto","Oxygen","Ubuntu","Cantarell",'"Fira Sans"','"Droid Sans"','"Helvetica Neue"',"sans-serif"],serif:["ui-serif","Georgia"],mono:['"Source Code Pro"',"monospace","ui-monospace","SFMono-Regular"]},fontSize:{xs:"0.75rem",sm:"0.875rem",med:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.75rem","4xl":"2rem","5xl":"2.625rem","6xl":"3rem"}}};exports.Button=pe;exports.FlexContainer=D;exports.Footer=qe;exports.Form=we;exports.GridContainer=be;exports.GridItem=vr;exports.Header=Cr;exports.Input=ve;exports.Nav=xe;exports.PdapInputTypes=b;exports.QuickSearchForm=Sr;exports.TileIcon=jr;exports.tailwindConfig=Tr;
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("vue-router"),de=e.defineComponent({__name:"PdapButton",props:{intent:{default:"primary"},isLoading:{type:Boolean,default:!1}},setup(t){const r=t,n=e.reactive({"pdap-button":!0,[`pdap-button-${r.intent}`]:!!r.intent,"pdap-button-loading":r.isLoading});return(a,s)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(n)},[e.renderSlot(a.$slots,"default")],2))}});const Ie={name:"FlexContainer"},Se=e.defineComponent({...Ie,props:{alignment:{default:"start"},component:{default:"div"}},setup(t){const r=t,n=e.reactive({"pdap-flex-container":!0,[`pdap-flex-container-${r.alignment}`]:!0});return(a,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{class:e.normalizeClass(n)},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},8,["class"]))}}),ze="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxMTMuOCA4Ni4xIiBzdHlsZT0iZW5hYm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MS43LDUuNmg0LjRMODQsNjQuNnoiLz4KPHBhdGggZD0iTTEwNC43LDcxLjFoLTIuNnY5LjFoLTVWNTcuM2g3LjZjNS4xLDAsOC40LDIuNCw4LjQsNi43UzEwOS44LDcxLjEsMTA0LjcsNzEuMXogTTEwNC43LDYxLjVoLTIuNnY1LjNoMi42CgljMi4zLDAsMy4zLTAuOSwzLjMtMi43UzEwNi45LDYxLjUsMTA0LjcsNjEuNXoiLz4KPC9zdmc+Cg==",Oe={class:"pdap-footer"},be={class:"pdap-flex-container-center"},ke={class:"pdap-footer-social-links"},Ae=["href"],_e={class:"pdap-footer-copyright"},Ye=e.createElementVNode("br",null,null,-1),Pe=e.createElementVNode("p",{class:"pdap-footer-copyright"},[e.createTextVNode(" PDAP is a non-profit. EIN: 85-4207132. "),e.createElementVNode("a",{href:"https://docs.pdap.io/meta/policy/pdap-privacy-policy",alt:"Privacy Policy",target:"_blank"},[e.createElementVNode("br"),e.createTextVNode(" Privacy Policy "),e.createElementVNode("i",{class:"fa fa-external-link"})]),e.createElementVNode("br"),e.createElementVNode("a",{href:"mailto:contact@pdap.io"},"contact@pdap.io")],-1),Qe={class:"pdap-footer-widget-links"},Ve=e.createElementVNode("a",{href:"https://www.guidestar.org/profile/85-4207132",target:"_blank"},[e.createElementVNode("img",{src:"https://widgets.guidestar.org/gximage2?o=9973356&l=v4"})],-1),Be=["href"],Re=["src"],Ue=["src"],Fe=e.defineComponent({__name:"PdapFooter",props:{logoImageSrc:{default:ze},logoImageAnchorPath:{default:"/"}},setup(t){const r=t,n=e.inject("footerLinks",[{href:"https://github.com/orgs/Police-Data-Accessibility-Project",text:"Github"},{href:"https://discord.gg/wMqex8nKZJ",text:"Discord"},{href:"https://www.linkedin.com/company/pdap",text:"LinkedIn"},{path:"/jobs",text:"Jobs"}]),a=r.logoImageAnchorPath.startsWith("/");return(s,o)=>{const c=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("footer",Oe,[e.createElementVNode("div",be,[e.createElementVNode("ul",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),l=>(e.openBlock(),e.createElementBlock("li",{key:l.text,class:"pdap-footer-link-container"},[l.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-footer-social-link",href:l.href,target:"_blank",referrerpolicy:"no-referrer"},e.toDisplayString(l.text),9,Ae)):e.createCommentVNode("",!0),l.path?(e.openBlock(),e.createBlock(c,{key:1,"active-class":"pdap-footer-social-link-current","exact-active-class":"pdap-footer-social-link-current-exact",class:"pdap-footer-social-link",to:l.path},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("p",_e,[e.createTextVNode(" © "+e.toDisplayString(new Date().getFullYear())+" Police Data Accessibility Project",1),Ye]),Pe,e.createElementVNode("div",Qe,[Ve,e.unref(a)?(e.openBlock(),e.createBlock(c,{key:1,to:s.logoImageAnchorPath,class:"pdap-footer-logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:s.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Ue)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("a",{key:0,href:s.logoImageAnchorPath,class:"pdap-footer-logo"},[e.createElementVNode("img",{src:s.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Re)],8,Be))])])])}}});function q(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function T(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?q(Object(n),!0).forEach(function(a){Ge(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Ge(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function ee(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(t).reduce((n,a)=>(r.includes(a)||(n[a]=e.unref(t[a])),n),{})}function Q(t){return typeof t=="function"}function We(t){return e.isReactive(t)||e.isReadonly(t)}function Me(t,r,n){let a=t;const s=r.split(".");for(let o=0;o<s.length;o++){if(!a[s[o]])return n;a=a[s[o]]}return a}function G(t,r,n){return e.computed(()=>t.some(a=>Me(r,a,{[n]:!1})[n]))}function te(t,r,n){return e.computed(()=>t.reduce((a,s)=>{const o=Me(r,s,{[n]:!1})[n]||[];return a.concat(o)},[]))}function me(t,r,n,a){return t.call(a,e.unref(r),e.unref(n),a)}function ge(t){return t.$valid!==void 0?!t.$valid:!t}function Ze(t,r,n,a,s,o,c){let{$lazy:l,$rewardEarly:u}=s,L=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],d=arguments.length>8?arguments[8]:void 0,p=arguments.length>9?arguments[9]:void 0,f=arguments.length>10?arguments[10]:void 0;const m=e.ref(!!a.value),i=e.ref(0);n.value=!1;const M=e.watch([r,a].concat(L,f),()=>{if(l&&!a.value||u&&!p.value&&!n.value)return;let g;try{g=me(t,r,d,c)}catch(j){g=Promise.reject(j)}i.value++,n.value=!!i.value,m.value=!1,Promise.resolve(g).then(j=>{i.value--,n.value=!!i.value,o.value=j,m.value=ge(j)}).catch(j=>{i.value--,n.value=!!i.value,o.value=j,m.value=!0})},{immediate:!0,deep:typeof r=="object"});return{$invalid:m,$unwatch:M}}function He(t,r,n,a,s,o,c,l){let{$lazy:u,$rewardEarly:L}=a;const d=()=>({}),p=e.computed(()=>{if(u&&!n.value||L&&!l.value)return!1;let f=!0;try{const m=me(t,r,c,o);s.value=m,f=ge(m)}catch(m){s.value=m}return f});return{$unwatch:d,$invalid:p}}function Je(t,r,n,a,s,o,c,l,u,L,d){const p=e.ref(!1),f=t.$params||{},m=e.ref(null);let i,M;t.$async?{$invalid:i,$unwatch:M}=Ze(t.$validator,r,p,n,a,m,s,t.$watchTargets,u,L,d):{$invalid:i,$unwatch:M}=He(t.$validator,r,n,a,m,s,u,L);const g=t.$message;return{$message:Q(g)?e.computed(()=>g(ee({$pending:p,$invalid:i,$params:ee(f),$model:r,$response:m,$validator:o,$propertyPath:l,$property:c}))):g||"",$params:f,$pending:p,$invalid:i,$response:m,$unwatch:M}}function Xe(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=e.unref(t),n=Object.keys(r),a={},s={},o={};let c=null;return n.forEach(l=>{const u=r[l];switch(!0){case Q(u.$validator):a[l]=u;break;case Q(u):a[l]={$validator:u};break;case l==="$validationGroups":c=u;break;case l.startsWith("$"):o[l]=u;break;default:s[l]=u}}),{rules:a,nestedValidators:s,config:o,validationGroups:c}}const Ke="__root";function qe(t,r,n,a,s,o,c,l,u){const L=Object.keys(t),d=a.get(s,t),p=e.ref(!1),f=e.ref(!1),m=e.ref(0);if(d){if(!d.$partial)return d;d.$unwatch(),p.value=d.$dirty.value}const i={$dirty:p,$path:s,$touch:()=>{p.value||(p.value=!0)},$reset:()=>{p.value&&(p.value=!1)},$commit:()=>{}};return L.length?(L.forEach(M=>{i[M]=Je(t[M],r,i.$dirty,o,c,M,n,s,u,f,m)}),i.$externalResults=e.computed(()=>l.value?[].concat(l.value).map((M,g)=>({$propertyPath:s,$property:n,$validator:"$externalResults",$uid:`${s}-externalResult-${g}`,$message:M,$params:{},$response:null,$pending:!1})):[]),i.$invalid=e.computed(()=>{const M=L.some(g=>e.unref(i[g].$invalid));return f.value=M,!!i.$externalResults.value.length||M}),i.$pending=e.computed(()=>L.some(M=>e.unref(i[M].$pending))),i.$error=e.computed(()=>i.$dirty.value?i.$pending.value||i.$invalid.value:!1),i.$silentErrors=e.computed(()=>L.filter(M=>e.unref(i[M].$invalid)).map(M=>{const g=i[M];return e.reactive({$propertyPath:s,$property:n,$validator:M,$uid:`${s}-${M}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(i.$externalResults.value)),i.$errors=e.computed(()=>i.$dirty.value?i.$silentErrors.value:[]),i.$unwatch=()=>L.forEach(M=>{i[M].$unwatch()}),i.$commit=()=>{f.value=!0,m.value=Date.now()},a.set(s,t,i),i):(d&&a.set(s,t,i),i)}function et(t,r,n,a,s,o,c){const l=Object.keys(t);return l.length?l.reduce((u,L)=>(u[L]=W({validations:t[L],state:r,key:L,parentKey:n,resultsCache:a,globalConfig:s,instance:o,externalResults:c}),u),{}):{}}function tt(t,r,n){const a=e.computed(()=>[r,n].filter(i=>i).reduce((i,M)=>i.concat(Object.values(e.unref(M))),[])),s=e.computed({get(){return t.$dirty.value||(a.value.length?a.value.every(i=>i.$dirty):!1)},set(i){t.$dirty.value=i}}),o=e.computed(()=>{const i=e.unref(t.$silentErrors)||[],M=a.value.filter(g=>(e.unref(g).$silentErrors||[]).length).reduce((g,j)=>g.concat(...j.$silentErrors),[]);return i.concat(M)}),c=e.computed(()=>{const i=e.unref(t.$errors)||[],M=a.value.filter(g=>(e.unref(g).$errors||[]).length).reduce((g,j)=>g.concat(...j.$errors),[]);return i.concat(M)}),l=e.computed(()=>a.value.some(i=>i.$invalid)||e.unref(t.$invalid)||!1),u=e.computed(()=>a.value.some(i=>e.unref(i.$pending))||e.unref(t.$pending)||!1),L=e.computed(()=>a.value.some(i=>i.$dirty)||a.value.some(i=>i.$anyDirty)||s.value),d=e.computed(()=>s.value?u.value||l.value:!1),p=()=>{t.$touch(),a.value.forEach(i=>{i.$touch()})},f=()=>{t.$commit(),a.value.forEach(i=>{i.$commit()})},m=()=>{t.$reset(),a.value.forEach(i=>{i.$reset()})};return a.value.length&&a.value.every(i=>i.$dirty)&&p(),{$dirty:s,$errors:c,$invalid:l,$anyDirty:L,$error:d,$pending:u,$touch:p,$reset:m,$silentErrors:o,$commit:f}}function W(t){let{validations:r,state:n,key:a,parentKey:s,childResults:o,resultsCache:c,globalConfig:l={},instance:u,externalResults:L}=t;const d=s?`${s}.${a}`:a,{rules:p,nestedValidators:f,config:m,validationGroups:i}=Xe(r),M=T(T({},l),m),g=a?e.computed(()=>{const y=e.unref(n);return y?e.unref(y[a]):void 0}):n,j=T({},e.unref(L)||{}),$=e.computed(()=>{const y=e.unref(L);return a?y?e.unref(y[a]):void 0:y}),E=qe(p,g,a,c,d,M,u,$,n),h=et(f,g,d,c,M,u,$),I={};i&&Object.entries(i).forEach(y=>{let[S,C]=y;I[S]={$invalid:G(C,h,"$invalid"),$error:G(C,h,"$error"),$pending:G(C,h,"$pending"),$errors:te(C,h,"$errors"),$silentErrors:te(C,h,"$silentErrors")}});const{$dirty:D,$errors:Y,$invalid:R,$anyDirty:Ne,$error:$e,$pending:U,$touch:F,$reset:De,$silentErrors:Ce,$commit:K}=tt(E,h,o),Te=a?e.computed({get:()=>e.unref(g),set:y=>{D.value=!0;const S=e.unref(n),C=e.unref(L);C&&(C[a]=j[a]),e.isRef(S[a])?S[a].value=y:S[a]=y}}):null;a&&M.$autoDirty&&e.watch(g,()=>{D.value||F();const y=e.unref(L);y&&(y[a]=j[a])},{flush:"sync"});async function ve(){return F(),M.$rewardEarly&&(K(),await e.nextTick()),await e.nextTick(),new Promise(y=>{if(!U.value)return y(!R.value);const S=e.watch(U,()=>{y(!R.value),S()})})}function xe(y){return(o.value||{})[y]}function Ee(){e.isRef(L)?L.value=j:Object.keys(j).length===0?Object.keys(L).forEach(y=>{delete L[y]}):Object.assign(L,j)}return e.reactive(T(T(T({},E),{},{$model:Te,$dirty:D,$error:$e,$errors:Y,$invalid:R,$anyDirty:Ne,$pending:U,$touch:F,$reset:De,$path:d||Ke,$silentErrors:Ce,$validate:ve,$commit:K},o&&{$getResultsForChild:xe,$clearExternalResults:Ee,$validationGroups:I}),h))}class rt{constructor(){this.storage=new Map}set(r,n,a){this.storage.set(r,{rules:n,result:a})}checkRulesValidity(r,n,a){const s=Object.keys(a),o=Object.keys(n);return o.length!==s.length||!o.every(l=>s.includes(l))?!1:o.every(l=>n[l].$params?Object.keys(n[l].$params).every(u=>e.unref(a[l].$params[u])===e.unref(n[l].$params[u])):!0)}get(r,n){const a=this.storage.get(r);if(!a)return;const{rules:s,result:o}=a,c=this.checkRulesValidity(r,n,s),l=o.$unwatch?o.$unwatch:()=>({});return c?o:{$dirty:o.$dirty,$partial:!0,$unwatch:l}}}const P={COLLECT_ALL:!0,COLLECT_NONE:!1},re=Symbol("vuelidate#injectChildResults"),ne=Symbol("vuelidate#removeChildResults");function nt(t){let{$scope:r,instance:n}=t;const a={},s=e.ref([]),o=e.computed(()=>s.value.reduce((d,p)=>(d[p]=e.unref(a[p]),d),{}));function c(d,p){let{$registerAs:f,$scope:m,$stopPropagation:i}=p;i||r===P.COLLECT_NONE||m===P.COLLECT_NONE||r!==P.COLLECT_ALL&&r!==m||(a[f]=d,s.value.push(f))}n.__vuelidateInjectInstances=[].concat(n.__vuelidateInjectInstances||[],c);function l(d){s.value=s.value.filter(p=>p!==d),delete a[d]}n.__vuelidateRemoveInstances=[].concat(n.__vuelidateRemoveInstances||[],l);const u=e.inject(re,[]);e.provide(re,n.__vuelidateInjectInstances);const L=e.inject(ne,[]);return e.provide(ne,n.__vuelidateRemoveInstances),{childResults:o,sendValidationResultsToParent:u,removeValidationResultsFromParent:L}}function pe(t){return new Proxy(t,{get(r,n){return typeof r[n]=="object"?pe(r[n]):e.computed(()=>r[n])}})}let ae=0;function at(t,r){var n;let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(a=t,t=void 0,r=void 0);let{$registerAs:s,$scope:o=P.COLLECT_ALL,$stopPropagation:c,$externalResults:l,currentVueInstance:u}=a;const L=u||((n=e.getCurrentInstance())===null||n===void 0?void 0:n.proxy),d=L?L.$options:{};s||(ae+=1,s=`_vuelidate_${ae}`);const p=e.ref({}),f=new rt,{childResults:m,sendValidationResultsToParent:i,removeValidationResultsFromParent:M}=L?nt({$scope:o,instance:L}):{childResults:e.ref({})};if(!t&&d.validations){const g=d.validations;r=e.ref({}),e.onBeforeMount(()=>{r.value=L,e.watch(()=>Q(g)?g.call(r.value,new pe(r.value)):g,j=>{p.value=W({validations:j,state:r,childResults:m,resultsCache:f,globalConfig:a,instance:L,externalResults:l||L.vuelidateExternalResults})},{immediate:!0})}),a=d.validationsConfig||a}else{const g=e.isRef(t)||We(t)?t:e.reactive(t||{});e.watch(g,j=>{p.value=W({validations:j,state:r,childResults:m,resultsCache:f,globalConfig:a,instance:L??{},externalResults:l})},{immediate:!0})}return L&&(i.forEach(g=>g(p,{$registerAs:s,$scope:o,$stopPropagation:c})),e.onBeforeUnmount(()=>M.forEach(g=>g(s)))),e.computed(()=>T(T({},e.unref(p.value)),m.value))}var N=(t=>(t.CHECKBOX="checkbox",t.TEXT="text",t.PASSWORD="password",t))(N||{});const st=["id","name","placeholder","value"],ot=["id","name","placeholder","value"],ut=["id","name","checked","value"],it=["id"],lt=["for"],fe=e.defineComponent({__name:"PdapInput",props:{error:{},id:{},label:{},name:{},placeholder:{},type:{},value:{},defaultChecked:{type:Boolean}},emits:["change","input"],setup(t,{emit:r}){const n=t,a=r,s=()=>{c.value=!c.value,a("change",c.value.toString())},o=u=>{a("input",u.target.value)},c=e.ref(n.defaultChecked),l=e.computed(()=>`pdap-${n.name}-input-error`);return(u,L)=>{var d;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"pdap-grid-container":!0,"pdap-input":!0,"pdap-input-error":Number((d=u.error)==null?void 0:d.length)>=1})},[u.type===e.unref(N).TEXT?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:0,id:u.id,type:"text",name:u.name,placeholder:u.placeholder,value:u.value},u.$attrs,{onInput:o}),null,16,st)):e.createCommentVNode("",!0),u.type===e.unref(N).PASSWORD?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:1,id:u.id,type:"password",name:u.name,placeholder:u.placeholder,value:u.value},u.$attrs,{onInput:o}),null,16,ot)):u.type===e.unref(N).CHECKBOX?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:2,id:u.id,class:"pdap-input-checkbox",name:u.name,checked:c.value,type:"checkbox",value:u.value},u.$attrs,{onChange:s}),null,16,ut)):e.createCommentVNode("",!0),u.error?(e.openBlock(),e.createElementBlock("div",{key:3,id:l.value,class:"pdap-input-error-message"},e.toDisplayString(u.error),9,it)):e.createCommentVNode("",!0),e.createElementVNode("label",{class:"pdap-input-label",for:u.id},e.toDisplayString(u.label),9,lt)],2)}}});function se(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function O(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?se(Object(n),!0).forEach(function(a){ct(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function ct(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function A(t){return typeof t=="function"}function V(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function B(t){return A(t.$validator)?O({},t):{$validator:t}}function Lt(t){return V(t)&&A(t.then)}function v(t){return typeof t=="object"?t.$valid:t}function z(t){return t.$validator||t}function Z(t,r){if(!V(t))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof t}`);if(!V(r)&&!A(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=B(r);return n.$params=O(O({},n.$params||{}),t),n}function _(t,r){if(!A(t)&&typeof e.unref(t)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof t}`);if(!V(r)&&!A(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=B(r);return n.$message=t,n}function dt(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=B(t);return O(O({},n),{},{$async:!0,$watchTargets:r})}function Mt(t){return{$validator(r){for(var n=arguments.length,a=new Array(n>1?n-1:0),s=1;s<n;s++)a[s-1]=arguments[s];return e.unref(r).reduce((o,c,l)=>{const u=Object.entries(c).reduce((L,d)=>{let[p,f]=d;const m=t[p]||{},i=Object.entries(m).reduce((M,g)=>{let[j,$]=g;const h=z($).call(this,f,c,l,...a),I=v(h);if(M.$data[j]=h,M.$data.$invalid=!I||!!M.$data.$invalid,M.$data.$error=M.$data.$invalid,!I){let D=$.$message||"";const Y=$.$params||{};typeof D=="function"&&(D=D({$pending:!1,$invalid:!I,$params:Y,$model:f,$response:h})),M.$errors.push({$property:p,$message:D,$params:Y,$response:h,$model:f,$pending:!1,$validator:j})}return{$valid:M.$valid&&I,$data:M.$data,$errors:M.$errors}},{$valid:!0,$data:{},$errors:[]});return L.$data[p]=i.$data,L.$errors[p]=i.$errors,{$valid:L.$valid&&i.$valid,$data:L.$data,$errors:L.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:o.$valid&&u.$valid,$data:o.$data.concat(u.$data),$errors:o.$errors.concat(u.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:r=>{let{$response:n}=r;return n?n.$errors.map(a=>Object.values(a).map(s=>s.map(o=>o.$message)).reduce((s,o)=>s.concat(o),[])):[]}}}const w=t=>{if(t=e.unref(t),Array.isArray(t))return!!t.length;if(t==null)return!1;if(t===!1)return!0;if(t instanceof Date)return!isNaN(t.getTime());if(typeof t=="object"){for(let r in t)return!0;return!1}return!!String(t).length},H=t=>(t=e.unref(t),Array.isArray(t)?t.length:typeof t=="object"?Object.keys(t).length:String(t).length);function x(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a=>(a=e.unref(a),!w(a)||r.every(s=>(s.lastIndex=0,s.test(a))))}var b=Object.freeze({__proto__:null,forEach:Mt,len:H,normalizeValidatorObject:B,regex:x,req:w,unwrap:e.unref,unwrapNormalizedValidator:z,unwrapValidatorResponse:v,withAsync:dt,withMessage:_,withParams:Z}),mt=x(/^[a-zA-Z]*$/),gt={$validator:mt,$message:"The value is not alphabetical",$params:{type:"alpha"}},pt=x(/^[a-zA-Z0-9]*$/),ft={$validator:pt,$message:"The value must be alpha-numeric",$params:{type:"alphaNum"}},jt=x(/^\d*(\.\d+)?$/),yt={$validator:jt,$message:"Value must be numeric",$params:{type:"numeric"}};function wt(t,r){return n=>!w(n)||(!/\s/.test(n)||n instanceof Date)&&+e.unref(t)<=+n&&+e.unref(r)>=+n}function ht(t,r){return{$validator:wt(t,r),$message:n=>{let{$params:a}=n;return`The value must be between ${a.min} and ${a.max}`},$params:{min:t,max:r,type:"between"}}}const Nt=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;var $t=x(Nt),J={$validator:$t,$message:"Value is not a valid email address",$params:{type:"email"}};function Dt(t){if(!w(t))return!0;if(typeof t!="string")return!1;const r=t.split(".");return r.length===4&&r.every(Ct)}const Ct=t=>{if(t.length>3||t.length===0||t[0]==="0"&&t!=="0"||!t.match(/^\d+$/))return!1;const r=+t|0;return r>=0&&r<=255};var Tt={$validator:Dt,$message:"The value is not a valid IP address",$params:{type:"ipAddress"}};function vt(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:":";return r=>{if(t=e.unref(t),!w(r))return!0;if(typeof r!="string")return!1;const n=typeof t=="string"&&t!==""?r.split(t):r.length===12||r.length===16?r.match(/.{2}/g):null;return n!==null&&(n.length===6||n.length===8)&&n.every(xt)}}const xt=t=>t.toLowerCase().match(/^[0-9a-f]{2}$/);function Et(t){return{$validator:vt(t),$message:"The value is not a valid MAC Address",$params:{type:"macAddress"}}}function It(t){return r=>!w(r)||H(r)<=e.unref(t)}function St(t){return{$validator:It(t),$message:r=>{let{$params:n}=r;return`The maximum length allowed is ${n.max}`},$params:{max:t,type:"maxLength"}}}function zt(t){return r=>!w(r)||H(r)>=e.unref(t)}function Ot(t){return{$validator:zt(t),$message:r=>{let{$params:n}=r;return`This field should be at least ${n.min} characters long`},$params:{min:t,type:"minLength"}}}function bt(t){return typeof t=="string"&&(t=t.trim()),w(t)}var X={$validator:bt,$message:"Value is required",$params:{type:"required"}};const oe=(t,r)=>t?w(typeof r=="string"?r.trim():r):!0;function kt(t){return function(r,n){if(typeof t!="function")return oe(e.unref(t),r);const a=t.call(this,r,n);return oe(a,r)}}function At(t){return{$validator:kt(t),$message:"The value is required",$params:{type:"requiredIf",prop:t}}}const ue=(t,r)=>t?!0:w(typeof r=="string"?r.trim():r);function _t(t){return function(r,n){if(typeof t!="function")return ue(e.unref(t),r);const a=t.call(this,r,n);return ue(a,r)}}function Yt(t){return{$validator:_t(t),$message:"The value is required",$params:{type:"requiredUnless",prop:t}}}function Pt(t){return r=>e.unref(r)===e.unref(t)}function Qt(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"other";return{$validator:Pt(t),$message:n=>`The value must be equal to the ${r} value`,$params:{equalTo:t,otherName:r,type:"sameAs"}}}const Vt=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;var Bt=x(Vt),Rt={$validator:Bt,$message:"The value is not a valid URL address",$params:{type:"url"}};function Ut(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce((s,o)=>v(s)?s:z(o).apply(this,n),!1)}}function Ft(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce(async(s,o)=>{const c=await s;return v(c)?c:z(o).apply(this,n)},Promise.resolve(!1))}}function Gt(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(c=>c.$async),s=r.reduce((c,l)=>l.$watchTargets?c.concat(l.$watchTargets):c,[]);let o=()=>!1;return r.length&&(o=a?Ft(r):Ut(r)),{$async:a,$validator:o,$watchTargets:s}}function Wt(){return Z({type:"or"},_("The value does not match any of the provided validators",Gt(...arguments)))}function Zt(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce((s,o)=>v(s)?z(o).apply(this,n):s,!0)}}function Ht(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce(async(s,o)=>{const c=await s;return v(c)?z(o).apply(this,n):c},Promise.resolve(!0))}}function Jt(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(c=>c.$async),s=r.reduce((c,l)=>l.$watchTargets?c.concat(l.$watchTargets):c,[]);let o=()=>!1;return r.length&&(o=a?Ht(r):Zt(r)),{$async:a,$validator:o,$watchTargets:s}}function Xt(){return Z({type:"and"},_("The value does not match all of the provided validators",Jt(...arguments)))}function Kt(t){return function(r,n){if(!w(r))return!0;const a=z(t).call(this,r,n);return Lt(a)?a.then(s=>!v(s)):!v(a)}}function qt(t){return{$validator:Kt(t),$message:"The value does not match the provided validator",$params:{type:"not"}}}function er(t){return r=>!w(r)||(!/\s/.test(r)||r instanceof Date)&&+r>=+e.unref(t)}function tr(t){return{$validator:er(t),$message:r=>{let{$params:n}=r;return`The minimum value allowed is ${n.min}`},$params:{min:t,type:"minValue"}}}function rr(t){return r=>!w(r)||(!/\s/.test(r)||r instanceof Date)&&+r<=+e.unref(t)}var nr=t=>({$validator:rr(t),$message:r=>{let{$params:n}=r;return`The maximum value allowed is ${n.max}`},$params:{max:t,type:"maxValue"}}),ar=x(/(^[0-9]*$)|(^-[0-9]+$)/),sr={$validator:ar,$message:"Value is not an integer",$params:{type:"integer"}},or=x(/^[-]?\d*(\.\d+)?$/),ur={$validator:or,$message:"Value must be decimal",$params:{type:"decimal"}};function ir(t){let{t:r,messagePath:n=s=>{let{$validator:o}=s;return`validations.${o}`},messageParams:a=s=>s}=t;return function(o){let{withArguments:c=!1,messagePath:l=n,messageParams:u=a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};function L(d){return r(l(d),u(O({model:d.$model,property:d.$property,pending:d.$pending,invalid:d.$invalid,response:d.$response,validator:d.$validator,propertyPath:d.$propertyPath},d.$params)))}return c&&typeof o=="function"?function(){return _(L,o(...arguments))}:_(L,o)}}const je=Object.freeze(Object.defineProperty({__proto__:null,alpha:gt,alphaNum:ft,and:Xt,between:ht,createI18nMessage:ir,decimal:ur,email:J,helpers:b,integer:sr,ipAddress:Tt,macAddress:Et,maxLength:St,maxValue:nr,minLength:Ot,minValue:tr,not:qt,numeric:yt,or:Wt,required:X,requiredIf:At,requiredUnless:Yt,sameAs:Qt,url:Rt},Symbol.toStringTag,{value:"Module"})),ye=b.regex(/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$ %^&*-]).{8,}$/);function ie(t){return["maxLength","minLength"].includes(t)}function le(t){return t==="required"}function ce(t){return t==="email"}function Le(t){return t==="password"}function lr(t,r){return{[t]:je[t](r)}}function cr(t,r,n){return{[t]:b.withMessage(n,je[t](r))}}function Lr(){return{required:X}}function dr(t){return{required:b.withMessage(t,X)}}function Mr(){return{email:J}}function mr(t){return{email:b.withMessage(t,J)}}function gr(){return{password:ye}}function pr(t){return{password:b.withMessage(t,ye)}}function fr(t,r){if(ie(t)&&typeof r.message=="string"&&typeof r.value=="number")return cr(t,r.value,r.message);if(ie(t)&&typeof r.message>"u"&&typeof r.value=="number")return lr(t,r.value);if(ce(t)&&typeof r.message=="string")return mr(r.message);if(ce(t)&&typeof r.message>"u")return Mr();if(Le(t)&&typeof r.message=="string")return pr(r.message);if(Le(t)&&typeof r.message>"u")return gr();if(le(t)&&typeof r.message=="string")return dr(r.message);if(le(t)&&typeof r.message>"u")return Lr();throw new Error("No valid rule detected")}const jr=["id","name"],yr={key:0,class:"pdap-form-error-message"},we=e.defineComponent({__name:"PdapForm",props:{error:{default:null},id:{},name:{},schema:{}},emits:["submit","change"],setup(t,{emit:r}){const n=t,a=r,s=e.computed(()=>n.schema.map(f=>{const m={...f};return delete m.validators,m}));let o=e.reactive(s.value.reduce((f,m)=>{switch(m.type){case N.CHECKBOX:return{...f,[m.name]:String(m.defaultChecked)};case N.TEXT:case N.PASSWORD:default:return{...f,[m.name]:m.value}}},{}));const c=n.schema.reduce((f,m)=>{const i=Object.entries(m.validators??{}).reduce((M,[g,j])=>({...M,...fr(g,j)}),{});return{...f,[m.name]:{...i}}},{}),l=at(c,o,{$autoDirty:!1,$lazy:!0}),u=e.ref(n.error);function L(f,m){o[f]=m,d()}e.watchEffect(()=>{n.error?u.value=n.error:u.value&&l.value.$errors.length===0?u.value=null:!u.value&&l.value.$errors.length>0&&(u.value="Please update this form to correct the errors")}),e.watchEffect(()=>{});function d(){a("change",{...o})}async function p(f){if(await l.value.$validate()){a("submit",{...o}),l.value.$reset(),f.target.reset(),o=Object.entries(o).reduce((M,[g,j])=>({...M,[g]:["true","false"].includes(j)?j:""}),{});return}}return(f,m)=>(e.openBlock(),e.createElementBlock("form",{id:f.id,name:f.name,class:"pdap-form",onChange:d,onSubmit:m[0]||(m[0]=e.withModifiers(i=>p(i),["prevent"]))},[typeof u.value=="string"?(e.openBlock(),e.createElementBlock("div",yr,e.toDisplayString(u.value),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,i=>{var M,g,j,$;return e.openBlock(),e.createBlock(fe,e.mergeProps(i,{key:i.name,error:(M=e.unref(l)[i.name])!=null&&M.$error?($=(j=(g=e.unref(l)[i.name])==null?void 0:g.$errors)==null?void 0:j[0])==null?void 0:$.$message:"",value:e.unref(o)[i.name],onChange:E=>L(i.name,E),onInput:E=>L(i.name,E)}),null,16,["error","value","onChange","onInput"])}),128)),e.renderSlot(f.$slots,"default")],40,jr))}});const wr={name:"GridContainer"},hr=e.defineComponent({...wr,props:{columns:{default:"auto"},component:{default:"div"},rows:{default:"auto"},templateColumns:{},templateRows:{}},setup(t){const r=t,n=e.reactive({"pdap-grid-container":!0,[`pdap-grid-container-column-${r.columns}`]:r.columns!=="auto"}),a=r.templateRows||typeof r.rows=="number",s=r.templateRows??`repeat(${r.rows}, minmax(0, 1fr))`,o=e.reactive({...a&&{gridTemplateRows:s},...r.templateColumns&&{gridTemplateColumns:r.templateColumns}});return(c,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component),{class:e.normalizeClass(n),style:e.normalizeStyle(o)},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["class","style"]))}}),Nr={name:"GridItem"},$r=e.defineComponent({...Nr,props:{component:{default:"div"},spanColumn:{default:1},spanRow:{default:1}},setup(t){const r=t,n=e.reactive({"pdap-grid-item":!0,[`pdap-grid-item-span-column-${r.spanColumn}`]:r.spanColumn>1}),a=e.reactive({...r.spanRow>1&&{gridRow:`span ${r.spanRow} / span ${r.spanRow}`}});return(s,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),{class:e.normalizeClass(n),style:e.normalizeStyle(a)},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});const Dr=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[e.createElementVNode("path",{d:"M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"})],-1),Cr=[Dr],Tr=["aria-expanded"],vr=["href"],he=e.defineComponent({__name:"PdapNav",props:{topPosition:{}},setup(t){let r=e.inject("navLinks");typeof r>"u"&&(r=[],console.error(`Hey, PDAP developer
|
2
|
+
`,"Did you forget to inject some linkData for the Nav component?"));const n=e.reactive({isExpanded:!1,isMobile:!0}),a=e.reactive({"pdap-nav":!0});e.onBeforeMount(()=>{s(),window.addEventListener("resize",s)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",s)});async function s(){window.innerWidth<=1024?n.isMobile=!0:n.isMobile=!1,await e.nextTick()}async function o(){var l,u;const c=document.querySelector("body");!n.isExpanded&&n.isMobile?(n.isExpanded=!0,c!=null&&c.classList.contains("lock-scroll")||(l=document.querySelector("body"))==null||l.classList.add("lock-scroll")):n.isExpanded&&n.isMobile&&(n.isExpanded=!1,(u=document.querySelector("body"))==null||u.classList.remove("lock-scroll")),await e.nextTick()}return(c,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{"aria-controls":"nav",class:"pdap-nav-open-button",role:"button",onClick:o},Cr),e.createElementVNode("nav",{id:"nav","aria-expanded":n.isMobile&&n.isExpanded||!n.isMobile,class:e.normalizeClass(a),style:e.normalizeStyle(n.isMobile?{top:`${c.topPosition}px`}:{})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),u=>(e.openBlock(),e.createElementBlock("li",{key:u.text,class:"pdap-nav-link-container"},[u.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-nav-link",href:u.href,target:"_blank",referrerpolicy:"no-referrer",onClick:o},e.toDisplayString(u.text),9,vr)):e.createCommentVNode("",!0),u.path?(e.openBlock(),e.createBlock(e.unref(k.RouterLink),{key:1,"active-class":"pdap-nav-link-current","exact-active-class":"pdap-nav-link-current-exact",class:"pdap-nav-link",to:u.path,onClick:o},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))],14,Tr)],64))}});const xr="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MDkuNCAxMTEuNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTA5LjQgMTExLjc7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggZD0iTTAsMTAw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EuNiwxMDEuNXoiLz4KPHBhdGggZD0iTTUwMy45LDEwMC44Yy01LDAtOC4yLTMuOC04LjItOXYtOWgtMy4xdi02LjZoMy4xVjY1LjloOC45djEwLjJoNC4ydjYuNmgtNC4ydjcuNGMwLDEuOSwxLDMuMiwyLjcsMy4yaDIuMnY3LjRoLTUuNlYxMDAuOHoKCSIvPgo8cG9seWdvbiBwb2ludHM9IjkxLjcsMjAuMiA3Ni4yLDIwLjIgODguNCw4IDgzLjEsMi43IDcxLjUsMTQuMyA3MS41LDAgNjQsMCA2NCwxNC4zIDUyLjMsMi43IDQ3LDggNTkuMiwyMC4yIDQzLjcsMjAuMiA0My43LDI3LjggCgk1OC4xLDI3LjggNDcsMzguOCA1Mi4zLDQ0LjEgNjQsMzIuNSA2NCw0OCA3MS41LDQ4IDcxLjUsMzIuNSA4My4xLDQ0LjEgODguNCwzOC44IDc3LjQsMjcuOCA5MS43LDI3LjggIi8+Cjwvc3ZnPgo=",Er=["href"],Ir=["src"],Sr=["src"],zr=e.defineComponent({__name:"PdapHeader",props:{logoImageSrc:{default:xr},logoImageAnchorPath:{default:"/"}},setup(t){const r=t,n=e.ref(),a=e.ref(null),s=r.logoImageAnchorPath.startsWith("/");e.onMounted(()=>{o(),window.addEventListener("resize",o)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",o)});function o(){a.value&&(n.value=a.value.offsetHeight)}return(c,l)=>(e.openBlock(),e.createElementBlock("header",{ref_key:"el",ref:a,class:"pdap-header"},[e.unref(s)?(e.openBlock(),e.createBlock(e.unref(k.RouterLink),{key:1,to:c.logoImageAnchorPath,class:"logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:c.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Sr)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("a",{key:0,href:c.logoImageAnchorPath,class:"logo"},[e.createElementVNode("img",{src:c.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Ir)],8,Er)),e.createVNode(he,{"top-position":n.value},null,8,["top-position"])],512))}});const Or=e.createElementVNode("div",{class:"pdap-flex-container"},[e.createElementVNode("h2",{class:"mt-0"},"Search our database"),e.createElementVNode("p",{class:"pb-4 md:pb-8"},[e.createTextVNode(" If you are looking for something specific, we may already be tracking it. "),e.createElementVNode("a",{href:"https://pdap.io/data"},"Learn more about the data here.")])],-1),br={class:"pdap-quick-search-form h-full max-h-[75-vh] justify-start p-0"},kr={class:"max-w-[unset] text-med"},Ar=["href"],_r=["href"],Yr=e.defineComponent({__name:"QuickSearchForm",props:{baseUrlForRedirect:{default:"https://data-sources.pdap.io"}},setup(t){const r=k.useRouter(),n=t,a=[{id:"search-term",name:"searchTerm",label:"What are you looking for?",type:N.TEXT,placeholder:"Enter a keyword, or 'all'",value:""},{id:"location",name:"location",label:"From where?",type:N.TEXT,placeholder:"Enter a place, or 'all'",value:""}],s=e.ref(void 0),o=r.getRoutes().some(u=>u.path.includes("/search/"));function c(u){s.value&&Object.values(u).some(Boolean)&&(s.value=void 0)}function l(u){if(Object.values(u).every(p=>!p)){s.value="Either a search term or a location is required.";return}let{location:L,searchTerm:d}=u;L=L&&L.length>0?L:"all",d=d&&d.length>0?d:"all",o?r.push(`/search/${d}/${L}`):window.location.assign(`${n.baseUrlForRedirect}/search/${d}/${L}`)}return(u,L)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[Or,e.createElementVNode("div",br,[e.createVNode(we,{id:"quick-search-form",class:"flex flex-wrap gap-x-4",error:s.value,schema:a,name:"quickSearchForm",onChange:c,onSubmit:l},{default:e.withCtx(()=>[e.createVNode(de,{type:"submit",class:"flex-grow-0 flex-shrink-0 basis-full max-w-[unset] mt-4"},{default:e.withCtx(()=>[e.createTextVNode("Search Data Sources")]),_:1})]),_:1},8,["error"]),e.createElementVNode("p",kr,[e.createTextVNode(" For example, you could search for "),e.unref(o)?(e.openBlock(),e.createBlock(e.unref(k.RouterLink),{key:0,to:"/search/stops/pittsburgh"},{default:e.withCtx(()=>[e.createTextVNode(" stops in Pittsburgh ")]),_:1})):(e.openBlock(),e.createElementBlock("a",{key:1,target:"_blank",rel:"noreferrer",href:`${n.baseUrlForRedirect}/search/stops/pittsburgh`}," stops in Pittsburgh ",8,Ar)),e.createTextVNode(" or "),e.unref(o)?(e.openBlock(),e.createBlock(e.unref(k.RouterLink),{key:2,to:"/search/complaints/all"},{default:e.withCtx(()=>[e.createTextVNode(" complaints everywhere ")]),_:1})):(e.openBlock(),e.createElementBlock("a",{key:3,target:"_blank",rel:"noreferrer",href:`${n.baseUrlForRedirect}/search/complaints/all`}," complaints everywhere ",8,_r)),e.createTextVNode(" . ")])])],64))}});const Pr=["alt","src"],Qr=e.defineComponent({__name:"TileIcon",props:{imgAltText:{},imgSrc:{}},setup(t){return(r,n)=>(e.openBlock(),e.createElementBlock("img",{class:"pdap-tile-icon",alt:r.imgAltText,src:r.imgSrc},null,8,Pr))}});const Vr={content:["./src/**/*.vue","./src/**/*.css"],theme:{extend:{colors:{brand:{blue:{light:"rgba(var(--color-brand-blue-light)/<alpha-value>)",medium:"rgba(var(--color-brand-blue-medium)/<alpha-value>)"},gold:"rgba(var(--color-brand-gold)/<alpha-value>)",wine:"rgba(var(--color-brand-wine)/<alpha-value>)"},neutral:{50:"rgba(var(--color-neutral-50)/<alpha-value>)",100:"rgba(var(--color-neutral-100)/<alpha-value>)",200:"rgba(var(--color-neutral-200)/<alpha-value>)",300:"rgba(var(--color-neutral-300)/<alpha-value>)",400:"rgba(var(--color-neutral-400)/<alpha-value>)",500:"rgba(var(--color-neutral-500)/<alpha-value>)",600:"rgba(var(--color-neutral-600)/<alpha-value>)",700:"rgba(var(--color-neutral-700)/<alpha-value>)",800:"rgba(var(--color-neutral-800)/<alpha-value>)",900:"rgba(var(--color-neutral-900)/<alpha-value>)",950:"rgba(var(--color-neutral-950)/<alpha-value>)"}},brightness:{85:".85"},maxWidth:{"4xl":"59rem"},screens:{xs:"500px"}},fontFamily:{sans:['"Libre Franklin"',"ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto","Oxygen","Ubuntu","Cantarell",'"Fira Sans"','"Droid Sans"','"Helvetica Neue"',"sans-serif"],serif:["ui-serif","Georgia"],mono:['"Source Code Pro"',"monospace","ui-monospace","SFMono-Regular"]},fontSize:{xs:"0.75rem",sm:"0.875rem",med:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.75rem","4xl":"2rem","5xl":"2.625rem","6xl":"3rem"}}};exports.Button=de;exports.FlexContainer=Se;exports.Footer=Fe;exports.Form=we;exports.GridContainer=hr;exports.GridItem=$r;exports.Header=zr;exports.Input=fe;exports.Nav=he;exports.PdapInputTypes=N;exports.QuickSearchForm=Yr;exports.TileIcon=Qr;exports.tailwindConfig=Vr;
|