PageSourceSearch

https://rxburnplanner.com/assets/MemorySourceWorker-DhGRgOVN.js

js rxburnplanner.com collected 2026-10-05 11:45:48 UTC 8,878 bytes, 1 lines download raw bytes

1import{d4 as O,f as b,fF as M,fH as Z,fG as C,fJ as P,fK as $,fI as k,fE as D,fs as F,fN as Q,fO as B,fP as W,fQ as G,dr as S}from"./index-CyVzZKgG.js";import{t as N,n as L}from"./objectIdUtils-4dd1rf9p.js";import{f as z}from"./FeatureStore-DZpNE1Gl.js";import{f as E,a as _}from"./queryUtils-BIR2uwrr.js";import{W as H}from"./QueryEngine-KAgJyoxW.js";import{S as J,E as U,p as I,d as T,f as j,h as w}from"./sourceUtils-CxG44S9h.js";import"./BoundsStore-DZCxxFxh.js";import"./PooledRBush-DB__5DQZ.js";import"./timeSupport-b5uPa2kt.js";import"./optimizedFeatureQueryEngineAdapter-ChO8t3qC.js";import"./WhereClauseCache-BTC9eqgS.js";import"./WhereClause-CCCZLDyG.js";import"./utils-Csm8gh3v.js";import"./utils-Cr4jv42a.js";import"./ClassBreaksDefinition-B9s3WXiT.js";import"./SnappingCandidate-DGkpYqI6.js";import"./FixedIntervalBinParameters--Fojn42v.js";import"./date-Ctp1FiBW.js";const K=D,V={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:D},X={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryAttachmentWithTypeWildcard:!1,supportsQueryBins:!0,supportsQueryPivot:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0,supportsQueryWithCacheHint:!0},queryBinsCapabilities:J};function Y(g){return S(g)?g.z!=null:!!g.hasZ}function ee(g){return S(g)?g.m!=null:!!g.hasM}class be{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){var e;(e=this._queryEngine)==null||e.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e){const i=[],{features:a}=e,n=this._inferLayerProperties(a,e.fields),l=e.fields||[],d=e.hasM!=null?e.hasM:!!n.hasM,y=e.hasZ!=null?e.hasZ:!!n.hasZ,o=!e.spatialReference&&!n.spatialReference,u=o?K:e.spatialReference||n.spatialReference,h=o?V:null,c=e.geometryType||n.geometryType,m=!c;let r=e.objectIdField||n.objectIdField,t=e.timeInfo;const f=new O(l);if(!m&&(o&&i.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!c))throw new b("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!r)throw new b("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&r!==n.objectIdField&&(i.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${r}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),r=n.objectIdField),r&&!n.objectIdField){const s=f.get(r);s?(r=s.name,s.type="esriFieldTypeOID",s.editable=!1,s.nullable=!1):l.unshift({alias:r,name:r,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const s of l){if(s.name==null&&(s.name=s.alias),s.alias==null&&(s.alias=s.name),!s.name)throw new b("feature-layer:invalid-field-name","field name is missing",{field:s});if(s.name===r&&(s.type="esriFieldTypeOID"),!M.jsonValues.includes(s.type))throw new b("feature-layer:invalid-field-type",`invalid type for field "${s.name}"`,{field:s});s.length==null&&(s.length=Z(s))}const p={};for(const s of l)if(s.type!=="esriFieldTypeOID"&&s.type!=="esriFieldTypeGlobalID"){const q=C(s);q!==void 0&&(p[s.name]=q)}if(t){if(t.startTimeField){const s=f.get(t.startTimeField);s?(t.startTimeField=s.name,s.type="esriFieldTypeDate"):t.startTimeField=null}if(t.endTimeField){const s=f.get(t.endTimeField);s?(t.endTimeField=s.name,s.type="esriFieldTypeDate"):t.endTimeField=null}if(t.trackIdField){const s=f.get(t.trackIdField);s?t.trackIdField=s.name:(t.trackIdField=null,i.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:t}}))}t.startTimeField||t.endTimeField||(i.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:t}}),t=null)}const x=f.dateFields.length?{timeZoneIANA:e.dateFieldsTimeZone??P}:null;this._createDefaultAttributes=$(p,r);const R={warnings:i,featureErrors:[],layerDefinition:{...X,drawingInfo:G(c),templates:k(p),extent:h,geometryType:c,objectIdField:r,fields:l,hasZ:y,hasM:d,timeInfo:t,dateFieldsTimeReference:x},assignedObjectIds:{}},v={type:"object-id",fieldName:r};
1if(this._queryEngine=new H({fieldsIndex:O.fromLayerJSON({fields:l,timeInfo:t,dateFieldsTimeReference:x}),geometryType:c,hasM:d,hasZ:y,featureIdInfo:v,spatialReference:u,featureStore:new z({geometryType:c,hasM:d,hasZ:y}),timeInfo:t}),!(a!=null&&a.length))return this._nextObjectId=N,R;const A=L(r,a);return this._nextObjectId=A+1,await E(a,u),this._loadInitialFeatures(R,a)}async applyEdits(e){const{spatialReference:i,geometryType:a}=this._queryEngine;return await Promise.all([U(i,a),E(e.adds,i),E(e.updates,i)]),this._applyEdits(e)}queryFeatures(e,i={}){return this._queryEngine.executeQuery(e,i.signal)}queryFeatureCount(e,i={}){return this._queryEngine.executeQueryForCount(e,i.signal)}queryObjectIds(e,i={}){return this._queryEngine.executeQueryForIds(e,i.signal)}queryExtent(e,i={}){return this._queryEngine.executeQueryForExtent(e,i.signal)}querySnapping(e,i={}){return this._queryEngine.executeQueryForSnapping(e,i.signal)}queryAttributeBins(e,i={}){return this._queryEngine.executeAttributeBinsQuery(e,i.signal)}_inferLayerProperties(e,i){let a,n,l=null,d=null,y=null;for(const o of e){const u=o.geometry;if(u!=null&&(l||(l=F(u)),d||(d=u.spatialReference),a==null&&(a=Y(u)),n==null&&(n=ee(u)),l&&d&&a!=null&&n!=null))break}if(i&&i.length){let o=null;i.some(u=>{const h=u.type==="esriFieldTypeOID",c=!u.type&&u.name&&u.name.toLowerCase()==="objectid";return o=u,h||c})&&(y=o.name)}return{geometryType:l,spatialReference:d,objectIdField:y,hasM:n,hasZ:a}}async _loadInitialFeatures(e,i){const{geometryType:a,hasM:n,hasZ:l,objectIdField:d,spatialReference:y,featureStore:o,fieldsIndex:u}=this._queryEngine,h=[],c={type:"object-id",fieldName:d};for(const t of i){if(t.uid!=null&&(e.assignedObjectIds[t.uid]=-1),t.geometry&&a!==F(t.geometry)){e.featureErrors.push(I("Incorrect geometry type."));continue}const f=this._createDefaultAttributes(),p=T(u,f,t.attributes,!0);p?e.featureErrors.push(p):(this._assignObjectId(f,t.attributes,!0),t.attributes=f,t.uid!=null&&(e.assignedObjectIds[t.uid]=t.attributes[d]),t.geometry!=null&&(t.geometry=_(t.geometry,t.geometry.spatialReference,y)),h.push(t))}o.addMany(Q([],h,a,l,n,c));const{fullExtent:m,timeExtent:r}=await this._queryEngine.fetchRecomputedExtents();if(e.layerDefinition.extent=m,r){const{start:t,end:f}=r;e.layerDefinition.timeInfo.timeExtent=[t,f]}return e}async _applyEdits(e){const{adds:i,updates:a,deletes:n}=e,l={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(i!=null&&i.length&&this._applyAddEdits(l,i),a!=null&&a.length&&this._applyUpdateEdits(l,a),n==null?void 0:n.length){for(const o of n)l.deleteResults.push(j(o));this._queryEngine.featureStore.removeManyById(n)}const{fullExtent:d,timeExtent:y}=await this._queryEngine.fetchRecomputedExtents();return{extent:d,timeExtent:y,featureEditResults:l}}_applyAddEdits(e,i){const{addResults:a}=e,{geometryType:n,hasM:l,hasZ:d,objectIdField:y,spatialReference:o,featureStore:u,featureIdInfo:h,fieldsIndex:c}=this._queryEngine,m=[];for(const r of i){if(r.geometry&&n!==F(r.geometry)){a.push(I("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),f=T(c,t,r.attributes);if(f)a.push(f);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,r.uid!=null){const p=r.attributes[y];e.uidToObjectId[r.uid]=p}if(r.geometry!=null){const p=r.geometry.spatialReference??o;r.geometry=_(w(r.geometry,p),p,o)}m.push(r),a.push(j(r.attributes[y]))}}u.addMany(Q([],m,n,d,l,h))}_applyUpdateEdits({updateResults:e},i){const{geometryType:a,hasM:n,hasZ:l,objectIdField:d,spatialReference:y,featureStore:o,fieldsIndex:u,featureIdInfo:h}=this._queryEngine;for(const c of i){const{attributes:m,geometry:r}=c,t=m==null?void 0:m[d];if(t==null){e.push(I(`Identifier field ${d} missing`));continue}if(!o.has(t)){e.push(I(`Feature with object id ${t} missing`));continue}const f=B(o.getFeature(t),a,l,n);if(r!=null){if(a!==F(r)){e.push(I("Incorrect geometry type."));continue}const p=r.spatialReference??y;f.geometry=_(w(r,p),p,y)}if(m){const p=T(u,f.attributes,m);if(p){e.push(p);continue}}o.add(W(f,a,l,n,h)),e.push(j(t))}}_assignObjectId(e,i,a=!1){const n=this._queryEngine.objectIdField;a&&i&&isFinite(i[n])?e[n]=i[n]:e[n]=this._nextObjectId++}
1}export{be 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.